diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..78842f7f2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,126 @@ +--- +Language: Cpp +AccessModifierOffset: -4 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: Left +AlignTrailingComments: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: false +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Allman +BreakBeforeInheritanceComma: false +BreakBeforeTernaryOperators: true +BreakConstructorInitializersBeforeComma: false +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +# BreakAfterJavaFieldAnnotations: false +BreakStringLiterals: true +ColumnLimit: 132 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 4 +ContinuationIndentWidth: 4 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +FixNamespaceComments: true +ForEachMacros: + - for +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '.*\.generated\.h' + Priority: 100 + - Regex: '.*(PCH).*' + Priority: -1 + - Regex: '".*"' + Priority: 1 + - Regex: '^<.*\.(h)>' + Priority: 3 + - Regex: '^<.*>' + Priority: 4 +IncludeIsMainRegex: '([-_](test|unittest))?$' +IndentCaseLabels: true +IndentPPDirectives: None +IndentWidth: 4 +IndentWrappedFunctionNames: false +# JavaScriptQuotes: Leave +# JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +# ObjCBinPackProtocolList: Never +# ObjCBlockIndentWidth: 2 +# ObjCSpaceAfterProperty: false +# ObjCSpaceBeforeProtocolList: true +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +RawStringFormats: + - Language: Cpp + Delimiters: + - cc + - CC + - cpp + - Cpp + - CPP + - 'c++' + - 'C++' + CanonicalDelimiter: '' + BasedOnStyle: google + - Language: TextProto + Delimiters: + - pb + - PB + - proto + - PROTO + EnclosingFunctions: + - EqualsProto + - EquivToProto + - PARSE_PARTIAL_TEXT_PROTO + - PARSE_TEST_PROTO + - PARSE_TEXT_PROTO + - ParseTextOrDie + - ParseTextProtoOrDie + CanonicalDelimiter: '' +ReflowComments: false +SortIncludes: true +SortUsingDeclarations: true +SpaceAfterCStyleCast: false +SpaceAfterTemplateKeyword: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 4 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: true +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Auto +TabWidth: 4 +UseTab: Never +... diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..d36b25ec1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +name: Create a pull request to other versions + +on: + pull_request: + branches: + - devel + - UE5_devel_humble + types: ["closed"] + + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + create_pr: + runs-on: ubuntu-latest + name: create_pr to other branchs + if: github.event.pull_request.merged == true + strategy: + matrix: + version: + - devel + - UE5_devel_humble + steps: + - name: Checkout + uses: actions/checkout@v4 + if: matrix.version != github.base_ref + with: + ref: ${{ matrix.version }} + - name: Debug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo ${{ matrix.version }}, ${{ github.base_ref }}, $GITHUB_SHA. ${{ github.event.pull_request.user.login }} + - name: Cherry pick and create PR + if: matrix.version != github.base_ref + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: carloscastrojumo/github-cherry-pick-action@v1.0.9 + with: + branch: ${{ matrix.version }} + labels: | + cherry-pick + reviewers: | + ${{ github.event.pull_request.user.login }} + token: ${{ secrets.GITHUB_TOKEN }} + cherry-pick-branch: auto_created_${{ matrix.version }}_${{ github.sha }} + title: '[cherry-pick to ${{ matrix.version }} from ${{ github.base_ref }}] ${{ github.event.pull_request.title }}' + body: 'Cherry picking ${{ github.event.pull_request.title }} onto this branch' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 686ec4685..1f4500687 100644 --- a/.gitignore +++ b/.gitignore @@ -51,5 +51,5 @@ Intermediate/* *_BuiltData.uasset -docs/source/_build +_readthedocs docs/source/README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ae860fad..315b0477d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +exclude: ^(ThirdParty/)|^(.github/) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 8427d0c99..a58c2963d 100644 --- a/README.md +++ b/README.md @@ -6,32 +6,49 @@ https://rclUE.readthedocs.io/en/devel/ ## Supported versions +Main support + - Ubuntu 20.04 -- Unreal Engine 4.27 +- Unreal Engine 5.10 - ROS2 Foxy -- Clang: 11.0.1 (from UE) +- Clang: 13.0.1 + +Maintenance/experimental + +- Ubuntu 22.04 and ROS2 Humble(`UE5_devel_humble` branch) +- Ubuntu 24.04 and ROS2 Humble(`UE5_devel_jazzy` branch) -Please setup UE4 by following [Linux Quick Start](https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/) +Please download UE5.10 for Linux by following [Unreal Engine for Linux](https://www.unrealengine.com/en-US/linux) ## Branches -### master +- `devel`: This build of the plugin is based on ROS2 Foxy and has been tested on Ubuntu 20 and UE5.10. +- `UE5_devel_foxy`: Same as above. +- `UE5_devel_humble_20.04`(experimental): This build of the plugin is based on ROS 2 humble and has been tested on Ubuntu 20.04 and UE5.1. +- `UE5_devel_humble`(experimental): This build of the plugin is based on ROS 2 humble, Ubuntu 22.04 and UE5.1. +- `UE5_devel_jazzy`(experimental): This build of the plugin is based on ROS 2 jazzy, Ubuntu 24.04 and UE5.1. -This build of the plugin is based on ROS2 Foxy and has been tested on Ubuntu 20. -This branch currently represents the release branch. +## TroubleShooting -### Other branches +### Missing library +Due to pre-compiled libraries, ThirdParty/ros/lib/librcl.so dynamically links libyaml.so and libspdlog.so.1, which needs to be provided by/installed on the host system. If not, Unreal fails to load the plugin or package the project without further details. -Experimental and WIP +On some operating systems, even with libyaml and libspdlog installed, the version appendix may not exist. You can try creating them using: + +``` +cd /lib64 +ln -s libyaml.so +ln -s libspdlog.so.1 +``` -# RclUE and ROS2 +# rclUE and ROS2 ## Description -- We use ros2 'foxy' lightweighted (not all binaries are included). Source/ThirdParty/ros folder is fully autogenerated by Scripts/update_ros.py (check script to see what is actually includes). + +- We use ros2 'foxy' lightweighted (not all binaries are included). Source/ThirdParty/ros folder is fully autogenerated by [UE_tools](https://github.com/rapyuta-robotics/UE_tools) - ros includes [UE_msgs](https://github.com/rapyuta-robotics/UE_msgs) -- Ros2 middleware, Product name: eProsima Fast DDS, License: Apache 2, RMW implementation: rmw_fastrtps_cpp -- to use this plugin change the world settings to use meters as units instead of the default centimeters +- UE uses centimeters but ROS uses meters. Please convert manually or use [URRConversionUtils](https://rapyutasimulationplugins.readthedocs.io/en/devel/doxygen_generated/html/d4/dc1/class_u_r_r_conversion_utils.html) in [RapyutaSimulationPlugins](https://rapyutasimulationplugins.readthedocs.io/en/devel/index.html) - within the Unreal Editor: Edit->Plugins, search and enable for `rclc` ## Windows is currently unsupported @@ -42,26 +59,22 @@ The plugin folder contains a video "Example_BP_PubSub.mp4" demonstrating how to An example setup using this plugin can be found at [turtlebot3-UE](https://github.com/rapyuta-robotics/turtlebot3-UE) -# Notes on working with ROS2 and UE4 +# Notes on working with ROS 2 and UE -- rcl and void\* types cannot be managed by UE4 (no UPROPERTY) and therefore can't be used directly in Blueprint. Whenever access to these variables is needed, the user should write a class to wrap it and all of their handling must be done in C++. -- some basic numerical types are not natively supported in Blueprint (e.g. double, unsigned int). In order to use these, a workaround is needed (a plugin implementing those types for BP, a modified UE4 or a custom implementation). +- rcl and void\* types cannot be managed by UE (no UPROPERTY) and therefore can't be used directly in Blueprint. Whenever access to these variables is needed, the user should write a class to wrap it and all of their handling must be done in C++. +- some basic numerical types are not natively supported in Blueprint (e.g. double, unsigned int). In order to use these, a workaround is needed (a plugin implementing those types for BP, a modified UE or a custom implementation). - In autogenerated messages, the method MsgToString() should be implemented by the user as its current purpose is to help debugging. # How to update ROS inside RclUE -Currently there is a scripts in [UE_tools](https://github.com/rapyuta-robotics/UE_tools) for automatic build and update ROS2 (foxy) libraries. Following steps 1) build and copy ros2 base library under rclUE, 2) generatee UE src codes to access msg from UE. Please check UE_tools README and `UE_tools/default_config.yaml` - ``` - git clone https://github.com/rapyuta-robotics/UE_tools - cd UE_tools - # build and copy ros2 base libraries - python3 build_install_codegen.py -b --remove --type base +Currently there is a scripts in [UE_tools](https://github.com/rapyuta-robotics/UE_tools) to automatically build and update ROS2 libraries. Please follow [steps](https://github.com/rapyuta-robotics/UE_tools#general-usage) + +# Add CustomMsg in rclUE or other Plugins +Please check [CustomMsgExample](https://github.com/yuokamoto/rclUE-Examples/blob/custom_msg_example/Plugins/CustomMsgExample/README.md) as a example of custom msg in different plugin then rclUE. - # Generate msg classes to access msg from UE - python3 build_install_codegen.py -bc --type pkgs - ``` # Install pre-commit + Please install pre-commit before commiting your changes. Follow this instruction https://pre-commit.com/ @@ -90,8 +103,8 @@ documentation is built with three tools make --always-make html ``` 3. Open following in your browser. - - Sphinx at `file:////docs/source/_build/html/index.html` - - Original doxygen output at `file:////docs/source/_build/html/doxygen_generated/html/index.html` + - Sphinx at `file:////docs/source/_readthedocs/html/index.html` + - Original doxygen output at `file:////docs/source/_readthedocs/html/doxygen_generated/html/index.html` # Maintainer diff --git a/Source/rclUE/Private/Actions/ROS2Fibonacci.cpp b/Source/rclUE/Private/Actions/ROS2Fibonacci.cpp index e2072ae11..2fe073086 100644 --- a/Source/rclUE/Private/Actions/ROS2Fibonacci.cpp +++ b/Source/rclUE/Private/Actions/ROS2Fibonacci.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/action/Fibonacci.action - do not modify #include "Actions/ROS2Fibonacci.h" diff --git a/Source/rclUE/Private/Actions/ROS2GenericAction.cpp b/Source/rclUE/Private/Actions/ROS2GenericAction.cpp index ffa8d7911..f0b456ab9 100644 --- a/Source/rclUE/Private/Actions/ROS2GenericAction.cpp +++ b/Source/rclUE/Private/Actions/ROS2GenericAction.cpp @@ -1,9 +1,7 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "Actions/ROS2GenericAction.h" -DEFINE_LOG_CATEGORY(LogROS2Action); - const rosidl_action_type_support_t* UROS2GenericAction::GetTypeSupport() const { checkNoEntry(); diff --git a/Source/rclUE/Private/Actions/ROS2LookupTF.cpp b/Source/rclUE/Private/Actions/ROS2LookupTF.cpp index e8ec622a5..b6c4f2fdd 100644 --- a/Source/rclUE/Private/Actions/ROS2LookupTF.cpp +++ b/Source/rclUE/Private/Actions/ROS2LookupTF.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/action/LookupTransform.action - do not modify #include "Actions/ROS2LookupTF.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Acc.cpp b/Source/rclUE/Private/Msgs/ROS2Acc.cpp index 463e2e305..9f0896464 100644 --- a/Source/rclUE/Private/Msgs/ROS2Acc.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Acc.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Accel.msg - do not modify #include "Msgs/ROS2Acc.h" diff --git a/Source/rclUE/Private/Msgs/ROS2AccCov.cpp b/Source/rclUE/Private/Msgs/ROS2AccCov.cpp index 22733e48f..21a3fbd00 100644 --- a/Source/rclUE/Private/Msgs/ROS2AccCov.cpp +++ b/Source/rclUE/Private/Msgs/ROS2AccCov.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelWithCovariance.msg - do not modify #include "Msgs/ROS2AccCov.h" diff --git a/Source/rclUE/Private/Msgs/ROS2AccCovStamped.cpp b/Source/rclUE/Private/Msgs/ROS2AccCovStamped.cpp index 2bca371f3..8e7917536 100644 --- a/Source/rclUE/Private/Msgs/ROS2AccCovStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2AccCovStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelWithCovarianceStamped.msg - do not modify #include "Msgs/ROS2AccCovStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2AccStamped.cpp b/Source/rclUE/Private/Msgs/ROS2AccStamped.cpp index 101655e2c..e2e82ee78 100644 --- a/Source/rclUE/Private/Msgs/ROS2AccStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2AccStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelStamped.msg - do not modify #include "Msgs/ROS2AccStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2BatteryState.cpp b/Source/rclUE/Private/Msgs/ROS2BatteryState.cpp index 91b1bb75e..0a15f138a 100644 --- a/Source/rclUE/Private/Msgs/ROS2BatteryState.cpp +++ b/Source/rclUE/Private/Msgs/ROS2BatteryState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/BatteryState.msg - do not modify #include "Msgs/ROS2BatteryState.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Bool.cpp b/Source/rclUE/Private/Msgs/ROS2Bool.cpp index 792e1f451..e7349500f 100644 --- a/Source/rclUE/Private/Msgs/ROS2Bool.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Bool.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Bool.msg - do not modify #include "Msgs/ROS2Bool.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Byte.cpp b/Source/rclUE/Private/Msgs/ROS2Byte.cpp index 440fb27b9..06e20f61a 100644 --- a/Source/rclUE/Private/Msgs/ROS2Byte.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Byte.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Byte.msg - do not modify #include "Msgs/ROS2Byte.h" diff --git a/Source/rclUE/Private/Msgs/ROS2ByteMA.cpp b/Source/rclUE/Private/Msgs/ROS2ByteMA.cpp index 95ffcf808..01e6f39c8 100644 --- a/Source/rclUE/Private/Msgs/ROS2ByteMA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2ByteMA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/ByteMultiArray.msg - do not modify #include "Msgs/ROS2ByteMA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2CameraInfo.cpp b/Source/rclUE/Private/Msgs/ROS2CameraInfo.cpp index e2fbb510f..9accd3b28 100644 --- a/Source/rclUE/Private/Msgs/ROS2CameraInfo.cpp +++ b/Source/rclUE/Private/Msgs/ROS2CameraInfo.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/CameraInfo.msg - do not modify #include "Msgs/ROS2CameraInfo.h" diff --git a/Source/rclUE/Private/Msgs/ROS2ChannelFloat32.cpp b/Source/rclUE/Private/Msgs/ROS2ChannelFloat32.cpp index 25f427dea..67b668180 100644 --- a/Source/rclUE/Private/Msgs/ROS2ChannelFloat32.cpp +++ b/Source/rclUE/Private/Msgs/ROS2ChannelFloat32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/ChannelFloat32.msg - do not modify #include "Msgs/ROS2ChannelFloat32.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Char.cpp b/Source/rclUE/Private/Msgs/ROS2Char.cpp index 86ef367d2..8bbd709e4 100644 --- a/Source/rclUE/Private/Msgs/ROS2Char.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Char.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Char.msg - do not modify #include "Msgs/ROS2Char.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Clock.cpp b/Source/rclUE/Private/Msgs/ROS2Clock.cpp index 63e037758..8855395cb 100644 --- a/Source/rclUE/Private/Msgs/ROS2Clock.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Clock.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from rosgraph_msgs/msg/Clock.msg - do not modify #include "Msgs/ROS2Clock.h" diff --git a/Source/rclUE/Private/Msgs/ROS2ColorRGBA.cpp b/Source/rclUE/Private/Msgs/ROS2ColorRGBA.cpp index 6e1d4cabd..6a052a596 100644 --- a/Source/rclUE/Private/Msgs/ROS2ColorRGBA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2ColorRGBA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_msgs/msg/ColorRGBA.msg - do not modify #include "Msgs/ROS2ColorRGBA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2CompImg.cpp b/Source/rclUE/Private/Msgs/ROS2CompImg.cpp index 04e981930..5668a7dbf 100644 --- a/Source/rclUE/Private/Msgs/ROS2CompImg.cpp +++ b/Source/rclUE/Private/Msgs/ROS2CompImg.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/CompressedImage.msg - do not modify #include "Msgs/ROS2CompImg.h" diff --git a/Source/rclUE/Private/Msgs/ROS2DiagnosticArray.cpp b/Source/rclUE/Private/Msgs/ROS2DiagnosticArray.cpp index aa2502f31..fc9084cf6 100644 --- a/Source/rclUE/Private/Msgs/ROS2DiagnosticArray.cpp +++ b/Source/rclUE/Private/Msgs/ROS2DiagnosticArray.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/DiagnosticArray.msg - do not modify #include "Msgs/ROS2DiagnosticArray.h" diff --git a/Source/rclUE/Private/Msgs/ROS2DiagnosticStatus.cpp b/Source/rclUE/Private/Msgs/ROS2DiagnosticStatus.cpp index c31c1507f..eaa6da427 100644 --- a/Source/rclUE/Private/Msgs/ROS2DiagnosticStatus.cpp +++ b/Source/rclUE/Private/Msgs/ROS2DiagnosticStatus.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/DiagnosticStatus.msg - do not modify #include "Msgs/ROS2DiagnosticStatus.h" diff --git a/Source/rclUE/Private/Msgs/ROS2DisparityImg.cpp b/Source/rclUE/Private/Msgs/ROS2DisparityImg.cpp index 8a2811553..eb86f1348 100644 --- a/Source/rclUE/Private/Msgs/ROS2DisparityImg.cpp +++ b/Source/rclUE/Private/Msgs/ROS2DisparityImg.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from stereo_msgs/msg/DisparityImage.msg - do not modify #include "Msgs/ROS2DisparityImg.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Duration.cpp b/Source/rclUE/Private/Msgs/ROS2Duration.cpp index 53f90adca..8652fbee1 100644 --- a/Source/rclUE/Private/Msgs/ROS2Duration.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Duration.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from builtin_interfaces/msg/Duration.msg - do not modify #include "Msgs/ROS2Duration.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Empty.cpp b/Source/rclUE/Private/Msgs/ROS2Empty.cpp index 1fdb635c3..5361e7714 100644 --- a/Source/rclUE/Private/Msgs/ROS2Empty.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Empty.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Empty.msg - do not modify #include "Msgs/ROS2Empty.h" diff --git a/Source/rclUE/Private/Msgs/ROS2EntityState.cpp b/Source/rclUE/Private/Msgs/ROS2EntityState.cpp index bb051c9e5..e3d861cc8 100644 --- a/Source/rclUE/Private/Msgs/ROS2EntityState.cpp +++ b/Source/rclUE/Private/Msgs/ROS2EntityState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/msg/EntityState.msg - do not modify #include "Msgs/ROS2EntityState.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Float32.cpp b/Source/rclUE/Private/Msgs/ROS2Float32.cpp index 94c1ff910..6da450513 100644 --- a/Source/rclUE/Private/Msgs/ROS2Float32.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Float32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float32.msg - do not modify #include "Msgs/ROS2Float32.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Float32MA.cpp b/Source/rclUE/Private/Msgs/ROS2Float32MA.cpp index c2d9fc6e1..3da4b74e8 100644 --- a/Source/rclUE/Private/Msgs/ROS2Float32MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Float32MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float32MultiArray.msg - do not modify #include "Msgs/ROS2Float32MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Float64.cpp b/Source/rclUE/Private/Msgs/ROS2Float64.cpp index a4cbe742d..9ef9615db 100644 --- a/Source/rclUE/Private/Msgs/ROS2Float64.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Float64.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float64.msg - do not modify #include "Msgs/ROS2Float64.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Float64MA.cpp b/Source/rclUE/Private/Msgs/ROS2Float64MA.cpp index 8d9358655..0fe8a3dae 100644 --- a/Source/rclUE/Private/Msgs/ROS2Float64MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Float64MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float64MultiArray.msg - do not modify #include "Msgs/ROS2Float64MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2FluidPressure.cpp b/Source/rclUE/Private/Msgs/ROS2FluidPressure.cpp index beafe7ccd..71d7222f6 100644 --- a/Source/rclUE/Private/Msgs/ROS2FluidPressure.cpp +++ b/Source/rclUE/Private/Msgs/ROS2FluidPressure.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/FluidPressure.msg - do not modify #include "Msgs/ROS2FluidPressure.h" diff --git a/Source/rclUE/Private/Msgs/ROS2GenericMsg.cpp b/Source/rclUE/Private/Msgs/ROS2GenericMsg.cpp index 6c54e7656..d3836cd2b 100644 --- a/Source/rclUE/Private/Msgs/ROS2GenericMsg.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GenericMsg.cpp @@ -1,9 +1,7 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "Msgs/ROS2GenericMsg.h" -DEFINE_LOG_CATEGORY(LogROS2Msg); - // Add default functionality here for any IROS2MsgInterface functions that are not pure virtual. const rosidl_message_type_support_t* UROS2GenericMsg::GetTypeSupport() const diff --git a/Source/rclUE/Private/Msgs/ROS2GoalID.cpp b/Source/rclUE/Private/Msgs/ROS2GoalID.cpp index e8c338860..26406685f 100644 --- a/Source/rclUE/Private/Msgs/ROS2GoalID.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GoalID.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalID.msg - do not modify #include "Msgs/ROS2GoalID.h" diff --git a/Source/rclUE/Private/Msgs/ROS2GoalInfo.cpp b/Source/rclUE/Private/Msgs/ROS2GoalInfo.cpp index 908b52bca..7f9f143d5 100644 --- a/Source/rclUE/Private/Msgs/ROS2GoalInfo.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GoalInfo.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from action_msgs/msg/GoalInfo.msg - do not modify #include "Msgs/ROS2GoalInfo.h" diff --git a/Source/rclUE/Private/Msgs/ROS2GoalStatus.cpp b/Source/rclUE/Private/Msgs/ROS2GoalStatus.cpp index 1631c40fd..fd8b41ae9 100644 --- a/Source/rclUE/Private/Msgs/ROS2GoalStatus.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GoalStatus.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalStatus.msg - do not modify #include "Msgs/ROS2GoalStatus.h" diff --git a/Source/rclUE/Private/Msgs/ROS2GoalStatusArray.cpp b/Source/rclUE/Private/Msgs/ROS2GoalStatusArray.cpp index 2c7aa9fe5..2b71f0ca4 100644 --- a/Source/rclUE/Private/Msgs/ROS2GoalStatusArray.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GoalStatusArray.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalStatusArray.msg - do not modify #include "Msgs/ROS2GoalStatusArray.h" diff --git a/Source/rclUE/Private/Msgs/ROS2GridCells.cpp b/Source/rclUE/Private/Msgs/ROS2GridCells.cpp index d38614b6a..22017a221 100644 --- a/Source/rclUE/Private/Msgs/ROS2GridCells.cpp +++ b/Source/rclUE/Private/Msgs/ROS2GridCells.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/GridCells.msg - do not modify #include "Msgs/ROS2GridCells.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Header.cpp b/Source/rclUE/Private/Msgs/ROS2Header.cpp index 17cf8b92e..da608fac2 100644 --- a/Source/rclUE/Private/Msgs/ROS2Header.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Header.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_msgs/msg/Header.msg - do not modify #include "Msgs/ROS2Header.h" diff --git a/Source/rclUE/Private/Msgs/ROS2HitEvent.cpp b/Source/rclUE/Private/Msgs/ROS2HitEvent.cpp new file mode 100644 index 000000000..708c04a80 --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2HitEvent.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/HitEvent.msg - do not modify + +#include "Msgs/ROS2HitEvent.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2HitEventMsg::Init() +{ + ue_msgs__msg__HitEvent__init(&hit_event_msg); +} + +void UROS2HitEventMsg::Fini() +{ + ue_msgs__msg__HitEvent__fini(&hit_event_msg); +} + +const rosidl_message_type_support_t* UROS2HitEventMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(ue_msgs, msg, HitEvent); +} + +void UROS2HitEventMsg::SetMsg(const FROSHitEvent& Inputs) +{ + Inputs.SetROS2(hit_event_msg); +} + +void UROS2HitEventMsg::GetMsg(FROSHitEvent& Outputs) const +{ + Outputs.SetFromROS2(hit_event_msg); +} + +void* UROS2HitEventMsg::Get() +{ + return &hit_event_msg; +} + +FString UROS2HitEventMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2HitResult.cpp b/Source/rclUE/Private/Msgs/ROS2HitResult.cpp new file mode 100644 index 000000000..c29fec060 --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2HitResult.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/HitResult.msg - do not modify + +#include "Msgs/ROS2HitResult.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2HitResultMsg::Init() +{ + ue_msgs__msg__HitResult__init(&hit_result_msg); +} + +void UROS2HitResultMsg::Fini() +{ + ue_msgs__msg__HitResult__fini(&hit_result_msg); +} + +const rosidl_message_type_support_t* UROS2HitResultMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(ue_msgs, msg, HitResult); +} + +void UROS2HitResultMsg::SetMsg(const FROSHitResult& Inputs) +{ + Inputs.SetROS2(hit_result_msg); +} + +void UROS2HitResultMsg::GetMsg(FROSHitResult& Outputs) const +{ + Outputs.SetFromROS2(hit_result_msg); +} + +void* UROS2HitResultMsg::Get() +{ + return &hit_result_msg; +} + +FString UROS2HitResultMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2IM.cpp b/Source/rclUE/Private/Msgs/ROS2IM.cpp index da743597d..903636176 100644 --- a/Source/rclUE/Private/Msgs/ROS2IM.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IM.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarker.msg - do not modify #include "Msgs/ROS2IM.h" diff --git a/Source/rclUE/Private/Msgs/ROS2IMCtrl.cpp b/Source/rclUE/Private/Msgs/ROS2IMCtrl.cpp index 3a6b8c749..3d3120f69 100644 --- a/Source/rclUE/Private/Msgs/ROS2IMCtrl.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IMCtrl.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerControl.msg - do not modify #include "Msgs/ROS2IMCtrl.h" diff --git a/Source/rclUE/Private/Msgs/ROS2IMFeedback.cpp b/Source/rclUE/Private/Msgs/ROS2IMFeedback.cpp index d1fda9001..69f196d3f 100644 --- a/Source/rclUE/Private/Msgs/ROS2IMFeedback.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IMFeedback.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerFeedback.msg - do not modify #include "Msgs/ROS2IMFeedback.h" diff --git a/Source/rclUE/Private/Msgs/ROS2IMInit.cpp b/Source/rclUE/Private/Msgs/ROS2IMInit.cpp index 0a059cc1d..ec1739975 100644 --- a/Source/rclUE/Private/Msgs/ROS2IMInit.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IMInit.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerInit.msg - do not modify #include "Msgs/ROS2IMInit.h" diff --git a/Source/rclUE/Private/Msgs/ROS2IMPose.cpp b/Source/rclUE/Private/Msgs/ROS2IMPose.cpp index dc212eafa..bad4efa87 100644 --- a/Source/rclUE/Private/Msgs/ROS2IMPose.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IMPose.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerPose.msg - do not modify #include "Msgs/ROS2IMPose.h" diff --git a/Source/rclUE/Private/Msgs/ROS2IMUpdate.cpp b/Source/rclUE/Private/Msgs/ROS2IMUpdate.cpp index 3fa6816ec..e7408f8e4 100644 --- a/Source/rclUE/Private/Msgs/ROS2IMUpdate.cpp +++ b/Source/rclUE/Private/Msgs/ROS2IMUpdate.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerUpdate.msg - do not modify #include "Msgs/ROS2IMUpdate.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Illuminance.cpp b/Source/rclUE/Private/Msgs/ROS2Illuminance.cpp index 46fccf081..3fdfb0d3c 100644 --- a/Source/rclUE/Private/Msgs/ROS2Illuminance.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Illuminance.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Illuminance.msg - do not modify #include "Msgs/ROS2Illuminance.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Img.cpp b/Source/rclUE/Private/Msgs/ROS2Img.cpp index d4d2ad56a..70b891ede 100644 --- a/Source/rclUE/Private/Msgs/ROS2Img.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Img.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Image.msg - do not modify #include "Msgs/ROS2Img.h" diff --git a/Source/rclUE/Private/Msgs/ROS2ImgMarker.cpp b/Source/rclUE/Private/Msgs/ROS2ImgMarker.cpp index a3aaa1927..736595541 100644 --- a/Source/rclUE/Private/Msgs/ROS2ImgMarker.cpp +++ b/Source/rclUE/Private/Msgs/ROS2ImgMarker.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/ImageMarker.msg - do not modify #include "Msgs/ROS2ImgMarker.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Imu.cpp b/Source/rclUE/Private/Msgs/ROS2Imu.cpp index 600f43972..a4bceedb5 100644 --- a/Source/rclUE/Private/Msgs/ROS2Imu.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Imu.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Imu.msg - do not modify #include "Msgs/ROS2Imu.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Inertia.cpp b/Source/rclUE/Private/Msgs/ROS2Inertia.cpp index 215b4b2ef..def91f147 100644 --- a/Source/rclUE/Private/Msgs/ROS2Inertia.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Inertia.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Inertia.msg - do not modify #include "Msgs/ROS2Inertia.h" diff --git a/Source/rclUE/Private/Msgs/ROS2InertiaStamped.cpp b/Source/rclUE/Private/Msgs/ROS2InertiaStamped.cpp index cd13c4507..54b765a60 100644 --- a/Source/rclUE/Private/Msgs/ROS2InertiaStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2InertiaStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/InertiaStamped.msg - do not modify #include "Msgs/ROS2InertiaStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int16.cpp b/Source/rclUE/Private/Msgs/ROS2Int16.cpp index 2a9010d53..b81e9b513 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int16.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int16.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int16.msg - do not modify #include "Msgs/ROS2Int16.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int16MA.cpp b/Source/rclUE/Private/Msgs/ROS2Int16MA.cpp index a07fb4aee..be59a0179 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int16MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int16MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int16MultiArray.msg - do not modify #include "Msgs/ROS2Int16MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int32.cpp b/Source/rclUE/Private/Msgs/ROS2Int32.cpp index b6a660ced..ce637eedc 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int32.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int32.msg - do not modify #include "Msgs/ROS2Int32.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int32MA.cpp b/Source/rclUE/Private/Msgs/ROS2Int32MA.cpp index 931ce3378..88db1f31e 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int32MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int32MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int32MultiArray.msg - do not modify #include "Msgs/ROS2Int32MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int64.cpp b/Source/rclUE/Private/Msgs/ROS2Int64.cpp index ca1626427..b3c1e2ac4 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int64.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int64.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int64.msg - do not modify #include "Msgs/ROS2Int64.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int64MA.cpp b/Source/rclUE/Private/Msgs/ROS2Int64MA.cpp index a7a165a7c..20962ca1d 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int64MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int64MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int64MultiArray.msg - do not modify #include "Msgs/ROS2Int64MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int8.cpp b/Source/rclUE/Private/Msgs/ROS2Int8.cpp index fd542c709..e50071c75 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int8.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int8.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int8.msg - do not modify #include "Msgs/ROS2Int8.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Int8MA.cpp b/Source/rclUE/Private/Msgs/ROS2Int8MA.cpp index 21c0b54fb..e4c8a2c4d 100644 --- a/Source/rclUE/Private/Msgs/ROS2Int8MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Int8MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int8MultiArray.msg - do not modify #include "Msgs/ROS2Int8MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2JointState.cpp b/Source/rclUE/Private/Msgs/ROS2JointState.cpp index 8c1031365..a8fa8c57c 100644 --- a/Source/rclUE/Private/Msgs/ROS2JointState.cpp +++ b/Source/rclUE/Private/Msgs/ROS2JointState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JointState.msg - do not modify #include "Msgs/ROS2JointState.h" diff --git a/Source/rclUE/Private/Msgs/ROS2JointTraj.cpp b/Source/rclUE/Private/Msgs/ROS2JointTraj.cpp index c08f7bb29..1016f6715 100644 --- a/Source/rclUE/Private/Msgs/ROS2JointTraj.cpp +++ b/Source/rclUE/Private/Msgs/ROS2JointTraj.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/JointTrajectory.msg - do not modify #include "Msgs/ROS2JointTraj.h" diff --git a/Source/rclUE/Private/Msgs/ROS2JointTrajPoint.cpp b/Source/rclUE/Private/Msgs/ROS2JointTrajPoint.cpp index fa3e71f53..06a3e094a 100644 --- a/Source/rclUE/Private/Msgs/ROS2JointTrajPoint.cpp +++ b/Source/rclUE/Private/Msgs/ROS2JointTrajPoint.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/JointTrajectoryPoint.msg - do not modify #include "Msgs/ROS2JointTrajPoint.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Joy.cpp b/Source/rclUE/Private/Msgs/ROS2Joy.cpp index 8b5d9e741..2c5848622 100644 --- a/Source/rclUE/Private/Msgs/ROS2Joy.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Joy.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Joy.msg - do not modify #include "Msgs/ROS2Joy.h" diff --git a/Source/rclUE/Private/Msgs/ROS2JoyFeedback.cpp b/Source/rclUE/Private/Msgs/ROS2JoyFeedback.cpp index 7459495f6..ac332e894 100644 --- a/Source/rclUE/Private/Msgs/ROS2JoyFeedback.cpp +++ b/Source/rclUE/Private/Msgs/ROS2JoyFeedback.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JoyFeedback.msg - do not modify #include "Msgs/ROS2JoyFeedback.h" diff --git a/Source/rclUE/Private/Msgs/ROS2JoyFeedbackArray.cpp b/Source/rclUE/Private/Msgs/ROS2JoyFeedbackArray.cpp index ec9cad3c6..e3e48173d 100644 --- a/Source/rclUE/Private/Msgs/ROS2JoyFeedbackArray.cpp +++ b/Source/rclUE/Private/Msgs/ROS2JoyFeedbackArray.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JoyFeedbackArray.msg - do not modify #include "Msgs/ROS2JoyFeedbackArray.h" diff --git a/Source/rclUE/Private/Msgs/ROS2KeyValue.cpp b/Source/rclUE/Private/Msgs/ROS2KeyValue.cpp index 72efd484c..363aea4e7 100644 --- a/Source/rclUE/Private/Msgs/ROS2KeyValue.cpp +++ b/Source/rclUE/Private/Msgs/ROS2KeyValue.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/KeyValue.msg - do not modify #include "Msgs/ROS2KeyValue.h" diff --git a/Source/rclUE/Private/Msgs/ROS2LaserEcho.cpp b/Source/rclUE/Private/Msgs/ROS2LaserEcho.cpp index 9232a926b..48ca5777c 100644 --- a/Source/rclUE/Private/Msgs/ROS2LaserEcho.cpp +++ b/Source/rclUE/Private/Msgs/ROS2LaserEcho.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/LaserEcho.msg - do not modify #include "Msgs/ROS2LaserEcho.h" diff --git a/Source/rclUE/Private/Msgs/ROS2LaserScan.cpp b/Source/rclUE/Private/Msgs/ROS2LaserScan.cpp index 92b908964..e48621b03 100644 --- a/Source/rclUE/Private/Msgs/ROS2LaserScan.cpp +++ b/Source/rclUE/Private/Msgs/ROS2LaserScan.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/LaserScan.msg - do not modify #include "Msgs/ROS2LaserScan.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MADim.cpp b/Source/rclUE/Private/Msgs/ROS2MADim.cpp index e70446b4f..1cf586cac 100644 --- a/Source/rclUE/Private/Msgs/ROS2MADim.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MADim.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/MultiArrayDimension.msg - do not modify #include "Msgs/ROS2MADim.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MALayout.cpp b/Source/rclUE/Private/Msgs/ROS2MALayout.cpp index 5ed768cf6..5348efbee 100644 --- a/Source/rclUE/Private/Msgs/ROS2MALayout.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MALayout.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/MultiArrayLayout.msg - do not modify #include "Msgs/ROS2MALayout.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MagneticField.cpp b/Source/rclUE/Private/Msgs/ROS2MagneticField.cpp index ad2977abf..fa8b2ed63 100644 --- a/Source/rclUE/Private/Msgs/ROS2MagneticField.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MagneticField.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MagneticField.msg - do not modify #include "Msgs/ROS2MagneticField.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MapMetaData.cpp b/Source/rclUE/Private/Msgs/ROS2MapMetaData.cpp index 8112d23b0..f2f985dca 100644 --- a/Source/rclUE/Private/Msgs/ROS2MapMetaData.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MapMetaData.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/MapMetaData.msg - do not modify #include "Msgs/ROS2MapMetaData.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Marker.cpp b/Source/rclUE/Private/Msgs/ROS2Marker.cpp index f1af51c7a..bb635904b 100644 --- a/Source/rclUE/Private/Msgs/ROS2Marker.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Marker.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/Marker.msg - do not modify #include "Msgs/ROS2Marker.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MarkerArray.cpp b/Source/rclUE/Private/Msgs/ROS2MarkerArray.cpp index 538fc6104..adaae4935 100644 --- a/Source/rclUE/Private/Msgs/ROS2MarkerArray.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MarkerArray.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/MarkerArray.msg - do not modify #include "Msgs/ROS2MarkerArray.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MenuEntry.cpp b/Source/rclUE/Private/Msgs/ROS2MenuEntry.cpp index 6846932ff..b98a42b39 100644 --- a/Source/rclUE/Private/Msgs/ROS2MenuEntry.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MenuEntry.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/MenuEntry.msg - do not modify #include "Msgs/ROS2MenuEntry.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Mesh.cpp b/Source/rclUE/Private/Msgs/ROS2Mesh.cpp index 0bedc2d7b..3a677f7ca 100644 --- a/Source/rclUE/Private/Msgs/ROS2Mesh.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Mesh.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/Mesh.msg - do not modify #include "Msgs/ROS2Mesh.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MeshFile.cpp b/Source/rclUE/Private/Msgs/ROS2MeshFile.cpp new file mode 100644 index 000000000..3403e719c --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2MeshFile.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from visualization_msgs/msg/MeshFile.msg - do not modify + +#include "Msgs/ROS2MeshFile.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2MeshFileMsg::Init() +{ + visualization_msgs__msg__MeshFile__init(&mesh_file_msg); +} + +void UROS2MeshFileMsg::Fini() +{ + visualization_msgs__msg__MeshFile__fini(&mesh_file_msg); +} + +const rosidl_message_type_support_t* UROS2MeshFileMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(visualization_msgs, msg, MeshFile); +} + +void UROS2MeshFileMsg::SetMsg(const FROSMeshFile& Inputs) +{ + Inputs.SetROS2(mesh_file_msg); +} + +void UROS2MeshFileMsg::GetMsg(FROSMeshFile& Outputs) const +{ + Outputs.SetFromROS2(mesh_file_msg); +} + +void* UROS2MeshFileMsg::Get() +{ + return &mesh_file_msg; +} + +FString UROS2MeshFileMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2MeshTriangle.cpp b/Source/rclUE/Private/Msgs/ROS2MeshTriangle.cpp index 2749bde0c..4885c3787 100644 --- a/Source/rclUE/Private/Msgs/ROS2MeshTriangle.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MeshTriangle.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/MeshTriangle.msg - do not modify #include "Msgs/ROS2MeshTriangle.h" diff --git a/Source/rclUE/Private/Msgs/ROS2ModelCoefficients.cpp b/Source/rclUE/Private/Msgs/ROS2ModelCoefficients.cpp index c485a156b..ac6365445 100644 --- a/Source/rclUE/Private/Msgs/ROS2ModelCoefficients.cpp +++ b/Source/rclUE/Private/Msgs/ROS2ModelCoefficients.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/ModelCoefficients.msg - do not modify #include "Msgs/ROS2ModelCoefficients.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointState.cpp b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointState.cpp index 9f995eb85..fc23fe440 100644 --- a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointState.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MultiDOFJointState.msg - do not modify #include "Msgs/ROS2MultiDOFJointState.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTraj.cpp b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTraj.cpp index 5ffa6fe26..dcd093721 100644 --- a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTraj.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTraj.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/MultiDOFJointTrajectory.msg - do not modify #include "Msgs/ROS2MultiDOFJointTraj.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTrajPoint.cpp b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTrajPoint.cpp index a540eb760..9df19ccfd 100644 --- a/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTrajPoint.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MultiDOFJointTrajPoint.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/MultiDOFJointTrajectoryPoint.msg - do not modify #include "Msgs/ROS2MultiDOFJointTrajPoint.h" diff --git a/Source/rclUE/Private/Msgs/ROS2MultiEchoLaserScan.cpp b/Source/rclUE/Private/Msgs/ROS2MultiEchoLaserScan.cpp index 3e80bb38b..c2e39c658 100644 --- a/Source/rclUE/Private/Msgs/ROS2MultiEchoLaserScan.cpp +++ b/Source/rclUE/Private/Msgs/ROS2MultiEchoLaserScan.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MultiEchoLaserScan.msg - do not modify #include "Msgs/ROS2MultiEchoLaserScan.h" diff --git a/Source/rclUE/Private/Msgs/ROS2NavSatFix.cpp b/Source/rclUE/Private/Msgs/ROS2NavSatFix.cpp index cff60286a..0f2ff7e12 100644 --- a/Source/rclUE/Private/Msgs/ROS2NavSatFix.cpp +++ b/Source/rclUE/Private/Msgs/ROS2NavSatFix.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/NavSatFix.msg - do not modify #include "Msgs/ROS2NavSatFix.h" diff --git a/Source/rclUE/Private/Msgs/ROS2NavSatStatus.cpp b/Source/rclUE/Private/Msgs/ROS2NavSatStatus.cpp index 6363e3684..5003f15b0 100644 --- a/Source/rclUE/Private/Msgs/ROS2NavSatStatus.cpp +++ b/Source/rclUE/Private/Msgs/ROS2NavSatStatus.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/NavSatStatus.msg - do not modify #include "Msgs/ROS2NavSatStatus.h" diff --git a/Source/rclUE/Private/Msgs/ROS2OccupancyGrid.cpp b/Source/rclUE/Private/Msgs/ROS2OccupancyGrid.cpp index 70dc95b79..1aad8eccc 100644 --- a/Source/rclUE/Private/Msgs/ROS2OccupancyGrid.cpp +++ b/Source/rclUE/Private/Msgs/ROS2OccupancyGrid.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/OccupancyGrid.msg - do not modify #include "Msgs/ROS2OccupancyGrid.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Odom.cpp b/Source/rclUE/Private/Msgs/ROS2Odom.cpp index 89c7b1f8b..37e06ad13 100644 --- a/Source/rclUE/Private/Msgs/ROS2Odom.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Odom.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/Odometry.msg - do not modify #include "Msgs/ROS2Odom.h" diff --git a/Source/rclUE/Private/Msgs/ROS2OverlapEvent.cpp b/Source/rclUE/Private/Msgs/ROS2OverlapEvent.cpp new file mode 100644 index 000000000..6d0eca0ab --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2OverlapEvent.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/OverlapEvent.msg - do not modify + +#include "Msgs/ROS2OverlapEvent.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2OverlapEventMsg::Init() +{ + ue_msgs__msg__OverlapEvent__init(&overlap_event_msg); +} + +void UROS2OverlapEventMsg::Fini() +{ + ue_msgs__msg__OverlapEvent__fini(&overlap_event_msg); +} + +const rosidl_message_type_support_t* UROS2OverlapEventMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(ue_msgs, msg, OverlapEvent); +} + +void UROS2OverlapEventMsg::SetMsg(const FROSOverlapEvent& Inputs) +{ + Inputs.SetROS2(overlap_event_msg); +} + +void UROS2OverlapEventMsg::GetMsg(FROSOverlapEvent& Outputs) const +{ + Outputs.SetFromROS2(overlap_event_msg); +} + +void* UROS2OverlapEventMsg::Get() +{ + return &overlap_event_msg; +} + +FString UROS2OverlapEventMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2OverlappingObjects.cpp b/Source/rclUE/Private/Msgs/ROS2OverlappingObjects.cpp new file mode 100644 index 000000000..e3bbfedb9 --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2OverlappingObjects.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/OverlappingObjects.msg - do not modify + +#include "Msgs/ROS2OverlappingObjects.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2OverlappingObjectsMsg::Init() +{ + ue_msgs__msg__OverlappingObjects__init(&overlapping_objects_msg); +} + +void UROS2OverlappingObjectsMsg::Fini() +{ + ue_msgs__msg__OverlappingObjects__fini(&overlapping_objects_msg); +} + +const rosidl_message_type_support_t* UROS2OverlappingObjectsMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(ue_msgs, msg, OverlappingObjects); +} + +void UROS2OverlappingObjectsMsg::SetMsg(const FROSOverlappingObjects& Inputs) +{ + Inputs.SetROS2(overlapping_objects_msg); +} + +void UROS2OverlappingObjectsMsg::GetMsg(FROSOverlappingObjects& Outputs) const +{ + Outputs.SetFromROS2(overlapping_objects_msg); +} + +void* UROS2OverlappingObjectsMsg::Get() +{ + return &overlapping_objects_msg; +} + +FString UROS2OverlappingObjectsMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2Overlaps.cpp b/Source/rclUE/Private/Msgs/ROS2Overlaps.cpp new file mode 100644 index 000000000..27af3514e --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2Overlaps.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/Overlaps.msg - do not modify + +#include "Msgs/ROS2Overlaps.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2OverlapsMsg::Init() +{ + ue_msgs__msg__Overlaps__init(&overlaps_msg); +} + +void UROS2OverlapsMsg::Fini() +{ + ue_msgs__msg__Overlaps__fini(&overlaps_msg); +} + +const rosidl_message_type_support_t* UROS2OverlapsMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(ue_msgs, msg, Overlaps); +} + +void UROS2OverlapsMsg::SetMsg(const FROSOverlaps& Inputs) +{ + Inputs.SetROS2(overlaps_msg); +} + +void UROS2OverlapsMsg::GetMsg(FROSOverlaps& Outputs) const +{ + Outputs.SetFromROS2(overlaps_msg); +} + +void* UROS2OverlapsMsg::Get() +{ + return &overlaps_msg; +} + +FString UROS2OverlapsMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2Path.cpp b/Source/rclUE/Private/Msgs/ROS2Path.cpp index fd9abc71a..183dbef21 100644 --- a/Source/rclUE/Private/Msgs/ROS2Path.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Path.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/Path.msg - do not modify #include "Msgs/ROS2Path.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Plane.cpp b/Source/rclUE/Private/Msgs/ROS2Plane.cpp index 4a112a6cd..30b459f11 100644 --- a/Source/rclUE/Private/Msgs/ROS2Plane.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Plane.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/Plane.msg - do not modify #include "Msgs/ROS2Plane.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Point.cpp b/Source/rclUE/Private/Msgs/ROS2Point.cpp index 478d4cdb4..b196c3c11 100644 --- a/Source/rclUE/Private/Msgs/ROS2Point.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Point.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Point.msg - do not modify #include "Msgs/ROS2Point.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Point32.cpp b/Source/rclUE/Private/Msgs/ROS2Point32.cpp index 043f19647..fa6b605b7 100644 --- a/Source/rclUE/Private/Msgs/ROS2Point32.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Point32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Point32.msg - do not modify #include "Msgs/ROS2Point32.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PointCloud.cpp b/Source/rclUE/Private/Msgs/ROS2PointCloud.cpp index 41da7ed0a..13f6abd80 100644 --- a/Source/rclUE/Private/Msgs/ROS2PointCloud.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PointCloud.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointCloud.msg - do not modify #include "Msgs/ROS2PointCloud.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PointCloud2.cpp b/Source/rclUE/Private/Msgs/ROS2PointCloud2.cpp index 5f9ffe2cc..86cb8ec9c 100644 --- a/Source/rclUE/Private/Msgs/ROS2PointCloud2.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PointCloud2.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointCloud2.msg - do not modify #include "Msgs/ROS2PointCloud2.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PointField.cpp b/Source/rclUE/Private/Msgs/ROS2PointField.cpp index 869c658cb..6e613fe92 100644 --- a/Source/rclUE/Private/Msgs/ROS2PointField.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PointField.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointField.msg - do not modify #include "Msgs/ROS2PointField.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PointIndices.cpp b/Source/rclUE/Private/Msgs/ROS2PointIndices.cpp index 16f95e198..44310a2bb 100644 --- a/Source/rclUE/Private/Msgs/ROS2PointIndices.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PointIndices.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/PointIndices.msg - do not modify #include "Msgs/ROS2PointIndices.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PointStamped.cpp b/Source/rclUE/Private/Msgs/ROS2PointStamped.cpp index 987cb70c1..c7614553a 100644 --- a/Source/rclUE/Private/Msgs/ROS2PointStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PointStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PointStamped.msg - do not modify #include "Msgs/ROS2PointStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Polygon.cpp b/Source/rclUE/Private/Msgs/ROS2Polygon.cpp index ac32bf748..5db7c331e 100644 --- a/Source/rclUE/Private/Msgs/ROS2Polygon.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Polygon.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Polygon.msg - do not modify #include "Msgs/ROS2Polygon.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PolygonMesh.cpp b/Source/rclUE/Private/Msgs/ROS2PolygonMesh.cpp index 384f322c5..c24aa1005 100644 --- a/Source/rclUE/Private/Msgs/ROS2PolygonMesh.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PolygonMesh.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/PolygonMesh.msg - do not modify #include "Msgs/ROS2PolygonMesh.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PolygonStamped.cpp b/Source/rclUE/Private/Msgs/ROS2PolygonStamped.cpp index b9efd1516..f4c8f06da 100644 --- a/Source/rclUE/Private/Msgs/ROS2PolygonStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PolygonStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PolygonStamped.msg - do not modify #include "Msgs/ROS2PolygonStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Pose.cpp b/Source/rclUE/Private/Msgs/ROS2Pose.cpp index b0d64e9a7..15381546a 100644 --- a/Source/rclUE/Private/Msgs/ROS2Pose.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Pose.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Pose.msg - do not modify #include "Msgs/ROS2Pose.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Pose2D.cpp b/Source/rclUE/Private/Msgs/ROS2Pose2D.cpp index 418d0f36c..11bc0ac07 100644 --- a/Source/rclUE/Private/Msgs/ROS2Pose2D.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Pose2D.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Pose2D.msg - do not modify #include "Msgs/ROS2Pose2D.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PoseArray.cpp b/Source/rclUE/Private/Msgs/ROS2PoseArray.cpp index 8884c4d26..9538520ef 100644 --- a/Source/rclUE/Private/Msgs/ROS2PoseArray.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PoseArray.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseArray.msg - do not modify #include "Msgs/ROS2PoseArray.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PoseCov.cpp b/Source/rclUE/Private/Msgs/ROS2PoseCov.cpp index c837ebc6e..c2b801292 100644 --- a/Source/rclUE/Private/Msgs/ROS2PoseCov.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PoseCov.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseWithCovariance.msg - do not modify #include "Msgs/ROS2PoseCov.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PoseCovStamped.cpp b/Source/rclUE/Private/Msgs/ROS2PoseCovStamped.cpp index 601c64dfb..49fdfba00 100644 --- a/Source/rclUE/Private/Msgs/ROS2PoseCovStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PoseCovStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseWithCovarianceStamped.msg - do not modify #include "Msgs/ROS2PoseCovStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2PoseStamped.cpp b/Source/rclUE/Private/Msgs/ROS2PoseStamped.cpp index 61fc43c05..46f094bdc 100644 --- a/Source/rclUE/Private/Msgs/ROS2PoseStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2PoseStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseStamped.msg - do not modify #include "Msgs/ROS2PoseStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Quat.cpp b/Source/rclUE/Private/Msgs/ROS2Quat.cpp index f9014cdaa..0e9b0a40e 100644 --- a/Source/rclUE/Private/Msgs/ROS2Quat.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Quat.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Quaternion.msg - do not modify #include "Msgs/ROS2Quat.h" diff --git a/Source/rclUE/Private/Msgs/ROS2QuatStamped.cpp b/Source/rclUE/Private/Msgs/ROS2QuatStamped.cpp index 36dd3321c..5fee7db0e 100644 --- a/Source/rclUE/Private/Msgs/ROS2QuatStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2QuatStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/QuaternionStamped.msg - do not modify #include "Msgs/ROS2QuatStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Range.cpp b/Source/rclUE/Private/Msgs/ROS2Range.cpp index 3259be6c7..d66fd77ea 100644 --- a/Source/rclUE/Private/Msgs/ROS2Range.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Range.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Range.msg - do not modify #include "Msgs/ROS2Range.h" diff --git a/Source/rclUE/Private/Msgs/ROS2RegionOfInterest.cpp b/Source/rclUE/Private/Msgs/ROS2RegionOfInterest.cpp index bd701c542..ddc11a95e 100644 --- a/Source/rclUE/Private/Msgs/ROS2RegionOfInterest.cpp +++ b/Source/rclUE/Private/Msgs/ROS2RegionOfInterest.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/RegionOfInterest.msg - do not modify #include "Msgs/ROS2RegionOfInterest.h" diff --git a/Source/rclUE/Private/Msgs/ROS2RelativeHumidity.cpp b/Source/rclUE/Private/Msgs/ROS2RelativeHumidity.cpp index 5396372c0..ef0129510 100644 --- a/Source/rclUE/Private/Msgs/ROS2RelativeHumidity.cpp +++ b/Source/rclUE/Private/Msgs/ROS2RelativeHumidity.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/RelativeHumidity.msg - do not modify #include "Msgs/ROS2RelativeHumidity.h" diff --git a/Source/rclUE/Private/Msgs/ROS2SolidPrimitive.cpp b/Source/rclUE/Private/Msgs/ROS2SolidPrimitive.cpp index 1c962653d..816c8c970 100644 --- a/Source/rclUE/Private/Msgs/ROS2SolidPrimitive.cpp +++ b/Source/rclUE/Private/Msgs/ROS2SolidPrimitive.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/SolidPrimitive.msg - do not modify #include "Msgs/ROS2SolidPrimitive.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Str.cpp b/Source/rclUE/Private/Msgs/ROS2Str.cpp index 76706f5eb..bc3e92aa9 100644 --- a/Source/rclUE/Private/Msgs/ROS2Str.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Str.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/String.msg - do not modify #include "Msgs/ROS2Str.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TF.cpp b/Source/rclUE/Private/Msgs/ROS2TF.cpp index 9b310e904..ee3cc1bcd 100644 --- a/Source/rclUE/Private/Msgs/ROS2TF.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TF.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Transform.msg - do not modify #include "Msgs/ROS2TF.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TF2Err.cpp b/Source/rclUE/Private/Msgs/ROS2TF2Err.cpp index 83a567929..77a5edcf7 100644 --- a/Source/rclUE/Private/Msgs/ROS2TF2Err.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TF2Err.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/msg/TF2Error.msg - do not modify #include "Msgs/ROS2TF2Err.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TFMsg.cpp b/Source/rclUE/Private/Msgs/ROS2TFMsg.cpp index 79dd5c7c6..26e414a87 100644 --- a/Source/rclUE/Private/Msgs/ROS2TFMsg.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TFMsg.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/msg/TFMessage.msg - do not modify #include "Msgs/ROS2TFMsg.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TFStamped.cpp b/Source/rclUE/Private/Msgs/ROS2TFStamped.cpp index ce06fbf15..5efbaf72e 100644 --- a/Source/rclUE/Private/Msgs/ROS2TFStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TFStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TransformStamped.msg - do not modify #include "Msgs/ROS2TFStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Temperature.cpp b/Source/rclUE/Private/Msgs/ROS2Temperature.cpp index 145f09b9e..cc1efdb5e 100644 --- a/Source/rclUE/Private/Msgs/ROS2Temperature.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Temperature.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Temperature.msg - do not modify #include "Msgs/ROS2Temperature.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Time.cpp b/Source/rclUE/Private/Msgs/ROS2Time.cpp index 7c698e675..362bfee7d 100644 --- a/Source/rclUE/Private/Msgs/ROS2Time.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Time.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from builtin_interfaces/msg/Time.msg - do not modify #include "Msgs/ROS2Time.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TimeReference.cpp b/Source/rclUE/Private/Msgs/ROS2TimeReference.cpp index 4c308f78d..a9c472432 100644 --- a/Source/rclUE/Private/Msgs/ROS2TimeReference.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TimeReference.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/TimeReference.msg - do not modify #include "Msgs/ROS2TimeReference.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Twist.cpp b/Source/rclUE/Private/Msgs/ROS2Twist.cpp index 463d5a6f5..14afb1bae 100644 --- a/Source/rclUE/Private/Msgs/ROS2Twist.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Twist.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Twist.msg - do not modify #include "Msgs/ROS2Twist.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TwistCov.cpp b/Source/rclUE/Private/Msgs/ROS2TwistCov.cpp index 18aa890bd..6dd4a98f4 100644 --- a/Source/rclUE/Private/Msgs/ROS2TwistCov.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TwistCov.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistWithCovariance.msg - do not modify #include "Msgs/ROS2TwistCov.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TwistCovStamped.cpp b/Source/rclUE/Private/Msgs/ROS2TwistCovStamped.cpp index ad61689e2..a1e77480d 100644 --- a/Source/rclUE/Private/Msgs/ROS2TwistCovStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TwistCovStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistWithCovarianceStamped.msg - do not modify #include "Msgs/ROS2TwistCovStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2TwistStamped.cpp b/Source/rclUE/Private/Msgs/ROS2TwistStamped.cpp index 294e9fae9..5c7832375 100644 --- a/Source/rclUE/Private/Msgs/ROS2TwistStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2TwistStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistStamped.msg - do not modify #include "Msgs/ROS2TwistStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt16.cpp b/Source/rclUE/Private/Msgs/ROS2UInt16.cpp index a3f866ae3..02e276897 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt16.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt16.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt16.msg - do not modify #include "Msgs/ROS2UInt16.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt16MA.cpp b/Source/rclUE/Private/Msgs/ROS2UInt16MA.cpp index cbc6dc992..130154f99 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt16MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt16MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt16MultiArray.msg - do not modify #include "Msgs/ROS2UInt16MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt32.cpp b/Source/rclUE/Private/Msgs/ROS2UInt32.cpp index 2123a29c7..b0057dc42 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt32.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt32.msg - do not modify #include "Msgs/ROS2UInt32.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt32MA.cpp b/Source/rclUE/Private/Msgs/ROS2UInt32MA.cpp index 62bbbd8eb..de6f18fe9 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt32MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt32MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt32MultiArray.msg - do not modify #include "Msgs/ROS2UInt32MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt64.cpp b/Source/rclUE/Private/Msgs/ROS2UInt64.cpp index cedf820f1..6a11c3bbb 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt64.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt64.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt64.msg - do not modify #include "Msgs/ROS2UInt64.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt64MA.cpp b/Source/rclUE/Private/Msgs/ROS2UInt64MA.cpp index 418953990..550eff7ac 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt64MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt64MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt64MultiArray.msg - do not modify #include "Msgs/ROS2UInt64MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt8.cpp b/Source/rclUE/Private/Msgs/ROS2UInt8.cpp index 1af538f3f..b065d94dd 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt8.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt8.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt8.msg - do not modify #include "Msgs/ROS2UInt8.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UInt8MA.cpp b/Source/rclUE/Private/Msgs/ROS2UInt8MA.cpp index 1eaa94e6b..fb57206a9 100644 --- a/Source/rclUE/Private/Msgs/ROS2UInt8MA.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UInt8MA.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt8MultiArray.msg - do not modify #include "Msgs/ROS2UInt8MA.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UUID.cpp b/Source/rclUE/Private/Msgs/ROS2UUID.cpp index e8456e98f..d58866a29 100644 --- a/Source/rclUE/Private/Msgs/ROS2UUID.cpp +++ b/Source/rclUE/Private/Msgs/ROS2UUID.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from unique_identifier_msgs/msg/UUID.msg - do not modify #include "Msgs/ROS2UUID.h" diff --git a/Source/rclUE/Private/Msgs/ROS2UVCoordinate.cpp b/Source/rclUE/Private/Msgs/ROS2UVCoordinate.cpp new file mode 100644 index 000000000..ec16eccd9 --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2UVCoordinate.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from visualization_msgs/msg/UVCoordinate.msg - do not modify + +#include "Msgs/ROS2UVCoordinate.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2UVCoordinateMsg::Init() +{ + visualization_msgs__msg__UVCoordinate__init(&uv_coordinate_msg); +} + +void UROS2UVCoordinateMsg::Fini() +{ + visualization_msgs__msg__UVCoordinate__fini(&uv_coordinate_msg); +} + +const rosidl_message_type_support_t* UROS2UVCoordinateMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(visualization_msgs, msg, UVCoordinate); +} + +void UROS2UVCoordinateMsg::SetMsg(const FROSUVCoordinate& Inputs) +{ + Inputs.SetROS2(uv_coordinate_msg); +} + +void UROS2UVCoordinateMsg::GetMsg(FROSUVCoordinate& Outputs) const +{ + Outputs.SetFromROS2(uv_coordinate_msg); +} + +void* UROS2UVCoordinateMsg::Get() +{ + return &uv_coordinate_msg; +} + +FString UROS2UVCoordinateMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2Vec3.cpp b/Source/rclUE/Private/Msgs/ROS2Vec3.cpp index ef71f529e..ec3bcfd5d 100644 --- a/Source/rclUE/Private/Msgs/ROS2Vec3.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Vec3.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Vector3.msg - do not modify #include "Msgs/ROS2Vec3.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Vec3Stamped.cpp b/Source/rclUE/Private/Msgs/ROS2Vec3Stamped.cpp index 0123607d6..55bc1dfec 100644 --- a/Source/rclUE/Private/Msgs/ROS2Vec3Stamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Vec3Stamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Vector3Stamped.msg - do not modify #include "Msgs/ROS2Vec3Stamped.h" diff --git a/Source/rclUE/Private/Msgs/ROS2VelocityStamped.cpp b/Source/rclUE/Private/Msgs/ROS2VelocityStamped.cpp new file mode 100644 index 000000000..7702359cf --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROS2VelocityStamped.cpp @@ -0,0 +1,43 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from geometry_msgs/msg/VelocityStamped.msg - do not modify + +#include "Msgs/ROS2VelocityStamped.h" + +#include "Kismet/GameplayStatics.h" + +void UROS2VelocityStampedMsg::Init() +{ + geometry_msgs__msg__VelocityStamped__init(&velocity_stamped_msg); +} + +void UROS2VelocityStampedMsg::Fini() +{ + geometry_msgs__msg__VelocityStamped__fini(&velocity_stamped_msg); +} + +const rosidl_message_type_support_t* UROS2VelocityStampedMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(geometry_msgs, msg, VelocityStamped); +} + +void UROS2VelocityStampedMsg::SetMsg(const FROSVelocityStamped& Inputs) +{ + Inputs.SetROS2(velocity_stamped_msg); +} + +void UROS2VelocityStampedMsg::GetMsg(FROSVelocityStamped& Outputs) const +{ + Outputs.SetFromROS2(velocity_stamped_msg); +} + +void* UROS2VelocityStampedMsg::Get() +{ + return &velocity_stamped_msg; +} + +FString UROS2VelocityStampedMsg::MsgToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Msgs/ROS2Vertices.cpp b/Source/rclUE/Private/Msgs/ROS2Vertices.cpp index 52047f004..bfbe97b75 100644 --- a/Source/rclUE/Private/Msgs/ROS2Vertices.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Vertices.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/Vertices.msg - do not modify #include "Msgs/ROS2Vertices.h" diff --git a/Source/rclUE/Private/Msgs/ROS2WStr.cpp b/Source/rclUE/Private/Msgs/ROS2WStr.cpp index b5d2cb028..3a76a9ee3 100644 --- a/Source/rclUE/Private/Msgs/ROS2WStr.cpp +++ b/Source/rclUE/Private/Msgs/ROS2WStr.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/WString.msg - do not modify #include "Msgs/ROS2WStr.h" diff --git a/Source/rclUE/Private/Msgs/ROS2Wrench.cpp b/Source/rclUE/Private/Msgs/ROS2Wrench.cpp index 292a3fee1..c7e40b72c 100644 --- a/Source/rclUE/Private/Msgs/ROS2Wrench.cpp +++ b/Source/rclUE/Private/Msgs/ROS2Wrench.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Wrench.msg - do not modify #include "Msgs/ROS2Wrench.h" diff --git a/Source/rclUE/Private/Msgs/ROS2WrenchStamped.cpp b/Source/rclUE/Private/Msgs/ROS2WrenchStamped.cpp index 2f01eed44..ae6b01dc3 100644 --- a/Source/rclUE/Private/Msgs/ROS2WrenchStamped.cpp +++ b/Source/rclUE/Private/Msgs/ROS2WrenchStamped.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/WrenchStamped.msg - do not modify #include "Msgs/ROS2WrenchStamped.h" diff --git a/Source/rclUE/Private/Msgs/ROSNotification.cpp b/Source/rclUE/Private/Msgs/ROSNotification.cpp new file mode 100755 index 000000000..c6ca56c1e --- /dev/null +++ b/Source/rclUE/Private/Msgs/ROSNotification.cpp @@ -0,0 +1,43 @@ +#include "Msgs/ROSNotification2D.h" + +void UROSNotification2DMsg::Init() +{ + guided_vr_interfaces__msg__Notification2D__init(&Notification2D_msg); +} + +void UROSNotification2DMsg::Fini() +{ + guided_vr_interfaces__msg__Notification2D__fini(&Notification2D_msg); +} + +const rosidl_message_type_support_t* UROSNotification2DMsg::GetTypeSupport() const +{ + return ROSIDL_GET_MSG_TYPE_SUPPORT(guided_vr_interfaces, msg, Notification2D); +} + +void UROSNotification2DMsg::SetMsg(const FROSNotification2D& Input) +{ + Input.SetROS2(Notification2D_msg); +} + +void UROSNotification2DMsg::GetMsg(FROSNotification2D& Output) const +{ + Output.SetFromROS2(Notification2D_msg); +} + +void* UROSNotification2DMsg::Get() +{ + return &Notification2D_msg; +} + +FString UROSNotification2DMsg::MsgToString() const +{ + // Provide a readable summary + return FString::Printf( + TEXT("Notification2D(Source=%s, Level=%d, Id=%d, PolygonPoints=%d)"), + *FString(Notification2D_msg.source.data.data), + Notification2D_msg.level.data, + Notification2D_msg.id, + static_cast(Notification2D_msg.polygon.size) + ); +} \ No newline at end of file diff --git a/Source/rclUE/Private/ROS2Action.cpp b/Source/rclUE/Private/ROS2Action.cpp index 583dd97f1..c470e5ffd 100644 --- a/Source/rclUE/Private/ROS2Action.cpp +++ b/Source/rclUE/Private/ROS2Action.cpp @@ -1,43 +1,70 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2Action.h" -UROS2Action::UROS2Action() +DEFINE_LOG_CATEGORY(LogROS2Action); + +bool UROS2Action::InitializeWithROS2(UROS2NodeComponent* InROS2Node) { - PrimaryComponentTick.bCanEverTick = true; + OwnerNode = InROS2Node; + return Init(); } -void UROS2Action::Init(const TEnumAsByte QoS) +bool UROS2Action::Init() { - check(OwnerNode != nullptr); - check(OwnerNode->State == UROS2State::Initialized); - if (State == UROS2State::Created) + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (!res) { - InitializeAction(); + return false; + } - check(IsValid(Action)); + if (State == UROS2State::Created) + { + if (!InitializeAction()) + { + return false; + } - InitializeActionComponent(QoS); + InitializeActionComponent(); State = UROS2State::Initialized; + + return true; } + + return false; } -void UROS2Action::InitializeAction() +bool UROS2Action::InitializeAction() { - check(ActionName != FString()); - check(ActionClass); + if (ActionName.IsEmpty()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Action, Warning, TEXT("ActionName can\'t be empty.")); + return false; + } + + if (!IsValid(ActionClass) || ActionClass == UROS2GenericAction::StaticClass()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Action, Warning, TEXT("ActionClass is empty or UROS2GenericAction. Please set valid class.")); + return false; + } Action = NewObject(this, ActionClass); - check(IsValid(Action)); + if (!IsValid(Action)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Action, Warning, TEXT("Failed to create Action")); + return false; + } Action->Init(); + return true; } void UROS2Action::Destroy() { - if (Action != nullptr) + if (IsValid(Action)) { Action->Fini(); } @@ -48,7 +75,7 @@ void UROS2Action::ProcessReady(rcl_wait_set_t* wait_set) checkNoEntry(); } -void UROS2Action::InitializeActionComponent(const TEnumAsByte QoS) +void UROS2Action::InitializeActionComponent() { checkNoEntry(); -} \ No newline at end of file +} diff --git a/Source/rclUE/Private/ROS2ActionClient.cpp b/Source/rclUE/Private/ROS2ActionClient.cpp index e29d62cc6..b8b2a1090 100644 --- a/Source/rclUE/Private/ROS2ActionClient.cpp +++ b/Source/rclUE/Private/ROS2ActionClient.cpp @@ -1,21 +1,44 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2ActionClient.h" #include "rclcUtilities.h" -void UROS2ActionClient::InitializeActionComponent(const TEnumAsByte QoS) +UROS2ActionClient* UROS2ActionClient::CreateActionClient(UObject* InOwner, + const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalResponseDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InFeedbackDelegate, + const FSimpleCallback& InCancelResponseDelegate, + const UROS2QoS InGoalQoS, + const UROS2QoS InResultQoS, + const UROS2QoS InFeedbackQoS, + const UROS2QoS InCancelQoS) +{ + UROS2ActionClient* client = NewObject(InOwner); + client->ActionClass = InActionClass; + client->ActionName = InActionName; + client->GoalQoS = InGoalQoS; + client->ResultQoS = InResultQoS; + client->FeedbackQoS = InFeedbackQoS; + client->CancelQoS = InCancelQoS; + client->SetDelegates(InFeedbackDelegate, InResultResponseDelegate, InGoalResponseDelegate, InCancelResponseDelegate); + return client; +} + +void UROS2ActionClient::InitializeActionComponent() { const rosidl_action_type_support_t* action_type_support = Action->GetTypeSupport(); client = rcl_action_get_zero_initialized_client(); rcl_action_client_options_t client_opt = rcl_action_client_get_default_options(); - client_opt.goal_service_qos = QoS_LUT[QoS]; - client_opt.result_service_qos = QoS_LUT[QoS]; - client_opt.cancel_service_qos = QoS_LUT[QoS]; - client_opt.feedback_topic_qos = QoS_LUT[QoS]; - client_opt.status_topic_qos = QoS_LUT[QoS]; + client_opt.goal_service_qos = QoS_LUT[GoalQoS]; + client_opt.result_service_qos = QoS_LUT[ResultQoS]; + client_opt.cancel_service_qos = QoS_LUT[CancelQoS]; + client_opt.feedback_topic_qos = QoS_LUT[FeedbackQoS]; + client_opt.status_topic_qos = QoS_LUT[UROS2QoS::Default]; // status is not supported yet. rcl_ret_t rc = rcl_action_client_init(&client, OwnerNode->GetNode(), action_type_support, TCHAR_TO_UTF8(*ActionName), &client_opt); @@ -25,7 +48,9 @@ void UROS2ActionClient::Destroy() { Super::Destroy(); - if (OwnerNode != nullptr) + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (res) { RCSOFTCHECK(rcl_action_client_fini(&client, OwnerNode->GetNode())); } @@ -33,13 +58,20 @@ void UROS2ActionClient::Destroy() void UROS2ActionClient::ProcessReady(rcl_wait_set_t* wait_set) { + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } + TArray> IsReady = {false, false, false, false, false}; RCSOFTCHECK(rcl_action_client_wait_set_get_entities_ready( wait_set, &client, &IsReady[0], &IsReady[1], &IsReady[2], &IsReady[3], &IsReady[4])); if (IsReady[0]) { - UE_LOG(LogROS2Action, Log, TEXT("8. Action Client - Received feedback (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("8. Action Client - Received feedback")); void* data = Action->GetFeedbackMessage(); RCSOFTCHECK(rcl_action_take_feedback(&client, data)); FeedbackDelegate.ExecuteIfBound(Action); @@ -47,12 +79,12 @@ void UROS2ActionClient::ProcessReady(rcl_wait_set_t* wait_set) if (IsReady[1]) { - ensureMsgf(false, TEXT("Action Client take status not implemented yet (%s)"), *__LOG_INFO__); + ensureMsgf(false, TEXT("Action Client take status not implemented yet")); } if (IsReady[2]) { - UE_LOG(LogROS2Action, Log, TEXT("4. Action Client - Received goal response (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("4. Action Client - Received goal response")); void* data = Action->GetGoalResponse(); RCSOFTCHECK(rcl_action_take_goal_response(&client, &goal_res_id, data)); GoalResponseDelegate.ExecuteIfBound(Action); @@ -60,32 +92,35 @@ void UROS2ActionClient::ProcessReady(rcl_wait_set_t* wait_set) if (IsReady[3]) { - UE_LOG(LogROS2Action, Log, TEXT("D. Action Client - Received cancel response (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("D. Action Client - Received cancel response")); void* data = Action->GetCancelResponse(); RCSOFTCHECK(rcl_action_take_cancel_response(&client, &cancel_res_id, data)); - CancelDelegate.ExecuteIfBound(); + CancelResponseDelegate.ExecuteIfBound(); } if (IsReady[4]) { - UE_LOG(LogROS2Action, Log, TEXT("10. Action Client - Received result response (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("10. Action Client - Received result response")); void* data = Action->GetResultResponse(); RCSOFTCHECK(rcl_action_take_result_response(&client, &result_res_id, data)); - ResultDelegate.ExecuteIfBound(Action); + ResultResponseDelegate.ExecuteIfBound(Action); } } -bool UROS2ActionClient::UpdateAndSendGoal() +bool UROS2ActionClient::SendGoal() { - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return false; + } bool bActionServerIsAvailable = false; RCSOFTCHECK(rcl_action_server_is_available(OwnerNode->GetNode(), &client, &bActionServerIsAvailable)); if (bActionServerIsAvailable) { - UE_LOG(LogROS2Action, Log, TEXT("1. Action Client - Send goal (%s)"), *__LOG_INFO__); - SetGoalDelegate.ExecuteIfBound(Action); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("1. Action Client - Send goal")); const void* goal = Action->GetGoalRequest(); int64_t Seq; @@ -93,24 +128,38 @@ bool UROS2ActionClient::UpdateAndSendGoal() } else { - UE_LOG(LogROS2Action, Error, TEXT("Action Server Unavailable (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Error, TEXT("Action Server Unavailable")); } return bActionServerIsAvailable; } -void UROS2ActionClient::GetResultRequest() +void UROS2ActionClient::SendResultRequest() { - UE_LOG(LogROS2Action, Log, TEXT("5. Action Client - Send result request (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("5. Action Client - Send result request")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } + const void* result = Action->GetResultRequest(); int64_t Seq; RCSOFTCHECK(rcl_action_send_result_request(&client, result, &Seq)); } -void UROS2ActionClient::CancelActionRequest() +void UROS2ActionClient::SendCancelRequest() { - UE_LOG(LogROS2Action, Log, TEXT("A. Action Client - Send cancel action request (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("A. Action Client - Send cancel action request")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } + action_msgs__srv__CancelGoal_Request* cancel_request = (action_msgs__srv__CancelGoal_Request*)Action->GetCancelRequest(); cancel_request->goal_info.stamp = UROS2Utils::FloatToROSStamp(UGameplayStatics::GetTimeSeconds(GetWorld())); @@ -118,40 +167,37 @@ void UROS2ActionClient::CancelActionRequest() RCSOFTCHECK(rcl_action_send_cancel_request(&client, Action->GetCancelRequest(), &Seq)); } -void UROS2ActionClient::SetDelegates(const FActionCallback& SetGoal, - const FActionCallback& Feedback, - const FActionCallback& Result, - const FActionCallback& GoalResponse, - const FSimpleCallback& Cancel) +void UROS2ActionClient::SetDelegates(const FActionCallback& InFeedbackDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InGoalResponseDelegate, + const FSimpleCallback& InCancelResponseDelegate) { - if (!SetGoal.IsBound()) - { - UE_LOG(LogROS2Action, Warning, TEXT("SetGoalDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); - } - - if (!Feedback.IsBound()) + if (!InFeedbackDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("FeedbackDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("FeedbackDelegate is not set - is this on purpose?")); } - if (!Result.IsBound()) + if (!InResultResponseDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("ResultDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("ResultResponseDelegate is not set - is this on purpose?")); } - if (!GoalResponse.IsBound()) + if (!InGoalResponseDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("GoalResponseDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("GoalResponseDelegate is not set - is this on purpose?")); } - if (!Cancel.IsBound()) + if (!InCancelResponseDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("CancelDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("CancelResponseDelegate is not set - is this on purpose?")); } - SetGoalDelegate = SetGoal; - GoalResponseDelegate = GoalResponse; - FeedbackDelegate = Feedback; - ResultDelegate = Result; - CancelDelegate = Cancel; + GoalResponseDelegate.Unbind(); + FeedbackDelegate.Unbind(); + ResultResponseDelegate.Unbind(); + CancelResponseDelegate.Unbind(); + GoalResponseDelegate = InGoalResponseDelegate; + FeedbackDelegate = InFeedbackDelegate; + ResultResponseDelegate = InResultResponseDelegate; + CancelResponseDelegate = InCancelResponseDelegate; } diff --git a/Source/rclUE/Private/ROS2ActionServer.cpp b/Source/rclUE/Private/ROS2ActionServer.cpp index 5c17fbfe1..d2ee8ec40 100644 --- a/Source/rclUE/Private/ROS2ActionServer.cpp +++ b/Source/rclUE/Private/ROS2ActionServer.cpp @@ -1,39 +1,64 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2ActionServer.h" #include "rclcUtilities.h" -void UROS2ActionServer::InitializeActionComponent(const TEnumAsByte QoS) +UROS2ActionServer* UROS2ActionServer::CreateActionServer(UObject* InOwner, + const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalDelegate, + const FSimpleCallback& InResultDelegate, + const FSimpleCallback& InCancelDelegate, + const UROS2QoS InGoalQoS, + const UROS2QoS InResultQoS, + const UROS2QoS InFeedbackQoS, + const UROS2QoS InCancelQoS) +{ + UROS2ActionServer* server = NewObject(InOwner); + server->ActionClass = InActionClass; + server->ActionName = InActionName; + server->GoalQoS = InGoalQoS; + server->ResultQoS = InResultQoS; + server->CancelQoS = InCancelQoS; + server->SetDelegates(InGoalDelegate, InCancelDelegate, InResultDelegate); + return server; +} + +void UROS2ActionServer::InitializeActionComponent() { const rosidl_action_type_support_t* action_type_support = Action->GetTypeSupport(); server = rcl_action_get_zero_initialized_server(); rcl_action_server_options_t server_opt = rcl_action_server_get_default_options(); - server_opt.goal_service_qos = QoS_LUT[QoS]; - server_opt.result_service_qos = QoS_LUT[QoS]; - server_opt.cancel_service_qos = QoS_LUT[QoS]; - server_opt.feedback_topic_qos = QoS_LUT[QoS]; - server_opt.status_topic_qos = QoS_LUT[QoS]; + server_opt.goal_service_qos = QoS_LUT[GoalQoS]; + server_opt.result_service_qos = QoS_LUT[ResultQoS]; + server_opt.cancel_service_qos = QoS_LUT[CancelQoS]; + server_opt.feedback_topic_qos = QoS_LUT[FeedbackQoS]; + server_opt.status_topic_qos = QoS_LUT[UROS2QoS::Default]; // status is not supported yet. rcl_allocator_t allocator = rcl_get_default_allocator(); RCSOFTCHECK(rcl_ros_clock_init(&ros_clock, &allocator)); rcl_ret_t rc = rcl_action_server_init( &server, OwnerNode->GetNode(), &ros_clock, action_type_support, TCHAR_TO_UTF8(*ActionName), &server_opt); - - check(rc == RCL_RET_OK); } void UROS2ActionServer::Destroy() { Super::Destroy(); - if (OwnerNode != nullptr) + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (res) { RCSOFTCHECK(rcl_action_server_fini(&server, OwnerNode->GetNode())); RCSOFTCHECK(rcl_ros_clock_fini(&ros_clock)); } + + GoalDelegate.Unbind(); + CancelDelegate.Unbind(); + ResultDelegate.Unbind(); } void UROS2ActionServer::ProcessReady(rcl_wait_set_t* wait_set) @@ -44,50 +69,43 @@ void UROS2ActionServer::ProcessReady(rcl_wait_set_t* wait_set) if (IsReady[0]) { - UE_LOG(LogROS2Action, Log, TEXT("2. Action Server - Received goal request (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("2. Action Server - Received goal request")); void* data = Action->GetGoalRequest(); RCSOFTCHECK(rcl_action_take_goal_request(&server, &goal_req_id, data)); - if (HandleGoalDelegate.IsBound() && HandleGoalDelegate.Execute(Action)) // ExecuteIfBound do not exist? - { - HandleAcceptedDelegate.ExecuteIfBound(); - } + GoalDelegate.ExecuteIfBound(Action); } if (IsReady[1]) { - UE_LOG(LogROS2Action, Log, TEXT("B. Action Server - Received cancel action request (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("B. Action Server - Received cancel action request")); void* data = Action->GetCancelRequest(); RCSOFTCHECK(rcl_action_take_cancel_request(&server, &cancel_req_id, data)); - HandleCancelDelegate.ExecuteIfBound(); + CancelDelegate.ExecuteIfBound(); } if (IsReady[2]) { - UE_LOG(LogROS2Action, Log, TEXT("6. Action Server - Received result request (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("6. Action Server - Received result request")); void* data = Action->GetResultRequest(); RCSOFTCHECK(rcl_action_take_result_request(&server, &result_req_id, data)); - // HandleGoalDelegate.ExecuteIfBound(Action); + ResultDelegate.ExecuteIfBound(); } if (IsReady[3]) { - ensureMsgf(false, TEXT("Action Server goal expired not implemented yet (%s)"), *__LOG_INFO__); + ensureMsgf(false, TEXT("Action Server goal expired not implemented yet")); } } -void UROS2ActionServer::SendGoalResponse() +void UROS2ActionServer::ProcessAndSendCancelResponse(const int InReturnCode) { - UE_LOG(LogROS2Action, Log, TEXT("3. Action Server - Send goal response (%s)"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); - RCSOFTCHECK(rcl_action_send_goal_response(&server, &goal_req_id, Action->GetGoalResponse())); -} - -void UROS2ActionServer::ProcessAndSendCancelResponse() -{ - UE_LOG(LogROS2Action, Log, TEXT("C. Action Server - Send cancel response (%s)"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("C. Action Server - Send cancel response")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } rcl_action_cancel_request_t cancel_request = rcl_action_get_zero_initialized_cancel_request(); cancel_request.goal_info.stamp = UROS2Utils::FloatToROSStamp(UGameplayStatics::GetTimeSeconds(GetWorld())); @@ -97,65 +115,73 @@ void UROS2ActionServer::ProcessAndSendCancelResponse() action_msgs__srv__CancelGoal_Response* CancelResponse = (action_msgs__srv__CancelGoal_Response*)Action->GetCancelResponse(); CancelResponse = &cancel_response.msg; + CancelResponse->return_code = InReturnCode; RCSOFTCHECK(rcl_action_send_cancel_response(&server, &cancel_req_id, Action->GetCancelResponse())); } -void UROS2ActionServer::UpdateAndSendFeedback() +void UROS2ActionServer::SendGoalResponse() { - UE_LOG(LogROS2Action, Log, TEXT("7. Action Server - Publish feedback (%s)"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); - - UpdateFeedbackDelegate.ExecuteIfBound(Action); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("3. Action Server - Send goal response")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } - RCSOFTCHECK(rcl_action_publish_feedback(&server, Action->GetFeedbackMessage())); + RCSOFTCHECK(rcl_action_send_goal_response(&server, &goal_req_id, Action->GetGoalResponse())); } -void UROS2ActionServer::UpdateAndSendResult() +void UROS2ActionServer::SendFeedback() { - UE_LOG(LogROS2Action, Log, TEXT("9. Action Server - Send result response (%s)"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); - - UpdateResultDelegate.ExecuteIfBound(Action); + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("7. Action Server - Publish feedback")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } - RCSOFTCHECK(rcl_action_send_result_response(&server, &result_req_id, Action->GetResultResponse())); + RCSOFTCHECK(rcl_action_publish_feedback(&server, Action->GetFeedbackMessage())); } -void UROS2ActionServer::SetDelegates(const FActionCallback& UpdateFeedback, - const FActionCallback& UpdateResult, - const FActionGoalCallback& HandleGoal, - const FSimpleCallback& HandleCancel, - const FSimpleCallback& HandleAccepted) +void UROS2ActionServer::SendResultResponse() { - if (!UpdateFeedback.IsBound()) + UE_LOG_WITH_INFO(LogROS2Action, Log, TEXT("9. Action Server - Send result response")); + bool res = true; + IS_ACTION_INITED(OwnerNode, GetName(), res); + if (!res) { - UE_LOG(LogROS2Action, Warning, TEXT("UpdateFeedbackDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + return; } - if (!UpdateResult.IsBound()) - { - UE_LOG(LogROS2Action, Warning, TEXT("UpdateResultDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); - } + RCSOFTCHECK(rcl_action_send_result_response(&server, &result_req_id, Action->GetResultResponse())); +} - if (!HandleGoal.IsBound()) +void UROS2ActionServer::SetDelegates(const FActionCallback& InGoalDelegate, + const FSimpleCallback& InCancelDelegate, + const FSimpleCallback& InResultDelegate) +{ + if (!InGoalDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("HandleGoalDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("GoalDelegate is not set - is this on purpose?")); } - if (!HandleCancel.IsBound()) + if (!InCancelDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("HandleCancelDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("CancelDelegate is not set - is this on purpose?")); } - if (!HandleAccepted.IsBound()) + if (!InResultDelegate.IsBound()) { - UE_LOG(LogROS2Action, Warning, TEXT("HandleAcceptedDelegate is not set - is this on purpose? (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Action, Warning, TEXT("ResultDelegate is not set - is this on purpose?")); } - UpdateFeedbackDelegate = UpdateFeedback; - UpdateResultDelegate = UpdateResult; - HandleGoalDelegate = HandleGoal; - HandleCancelDelegate = HandleCancel; - HandleAcceptedDelegate = HandleAccepted; + GoalDelegate.Unbind(); + CancelDelegate.Unbind(); + ResultDelegate.Unbind(); + + GoalDelegate = InGoalDelegate; + CancelDelegate = InCancelDelegate; + ResultDelegate = InResultDelegate; } diff --git a/Source/rclUE/Private/ROS2Node.cpp b/Source/rclUE/Private/ROS2Node.cpp index b1f83c8ff..3aeaf869b 100644 --- a/Source/rclUE/Private/ROS2Node.cpp +++ b/Source/rclUE/Private/ROS2Node.cpp @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2Node.h" @@ -6,425 +6,109 @@ #include "ROS2ActionServer.h" #include "ROS2Publisher.h" #include "ROS2ServiceClient.h" +#include "ROS2ServiceServer.h" +#include "ROS2Subscriber.h" #include "ROS2Subsystem.h" #include #include -DEFINE_LOG_CATEGORY(LogROS2Node); - AROS2Node::AROS2Node() { PrimaryActorTick.bCanEverTick = true; PrimaryActorTick.bStartWithTickEnabled = true; RootComponent = CreateDefaultSubobject(TEXT("Root")); -} - -void AROS2Node::EndPlay(const EEndPlayReason::Type EndPlayReason) -{ - for (auto& s : Subscriptions) - { - RCSOFTCHECK(rcl_subscription_fini(&s.rcl_subscription, &node)); - } - - for (auto& s : Services) - { - RCSOFTCHECK(rcl_service_fini(&s.rcl_service, &node)); - } - - TArray PubComponents; - GetComponents(UROS2Publisher::StaticClass(), PubComponents, true); - for (auto& c : PubComponents) - { - UROS2Publisher* Pub = Cast(c); - if (Pub != nullptr) - { - Pub->Destroy(); - } - } - - RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); - - UE_LOG(LogROS2Node, Log, TEXT("[%s] ROS2Node EndPlay - rcl_node_fini"), *GetName()); - RCSOFTCHECK(rcl_node_fini(&node)); - - Super::EndPlay(EndPlayReason); -} - -void AROS2Node::Tick(float DeltaTime) -{ - check(State == UROS2State::Initialized); - - Super::Tick(DeltaTime); - - if (Subscriptions.Num() > 0 || Clients.Num() > 0 || Services.Num() > 0 || ActionClients.Num() > 0 || ActionServers.Num() > 0) - { - SpinSome(); - } + ActorComponent = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); } // This can't be pre-placed in AROS2Node::BeginPlay() as the order of rcl(c) instructions could be // different/relevant in each of Child classes void AROS2Node::Init() { - if (State == UROS2State::Created) + if (nullptr == ActorComponent) { - UE_LOG(LogROS2Node, Log, TEXT("[%s] start initializing.."), *GetName()); - if (!rcl_node_is_valid(&node)) // ensures that it stays safe when called multiple times - { - Support = GetGameInstance()->GetSubsystem()->GetSupport(); - - UE_LOG(LogROS2Node, Log, TEXT("[%s] rclc_node_init_default"), *GetName()); - - RCSOFTCHECK(rclc_node_init_default(&node, TCHAR_TO_UTF8(*Name), TCHAR_TO_UTF8(*Namespace), &Support->Get())); - } - - State = UROS2State::Initialized; + return; } - - UE_LOG(LogROS2Node, Log, TEXT("[%s] ROS2Node inited"), *GetName()); + ActorComponent->Name = Name; + ActorComponent->Namespace = Namespace; + ActorComponent->Init(); } rcl_node_t* AROS2Node::GetNode() { - return &node; + if (nullptr == ActorComponent) + { + return nullptr; + } + return ActorComponent->GetNode(); } void AROS2Node::AddSubscription(const FString& TopicName, TSubclassOf MsgClass, const FSubscriptionCallback& Callback) { - check(State == UROS2State::Initialized); - - bool SubExists = false; - for (auto& s : Subscriptions) + if (nullptr == ActorComponent) { - SubExists |= (s.TopicName == TopicName); - } - - if (!ensure(!SubExists)) - { - UE_LOG(LogROS2Node, - Warning, - TEXT("[%s] Subscriber for [%s] topic already exists (%s)"), - *GetName(), - *TopicName, - *__LOG_INFO__); return; } - if (!Callback.IsBound()) - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] Callback is not set - is this on purpose? (%s)"), *GetName(), *__LOG_INFO__); - } - - UROS2GenericMsg* TopicMessage = NewObject(this, MsgClass); - TopicMessage->Init(); - - FSubscription NewSub; - NewSub.TopicName = TopicName; - NewSub.TopicType = MsgClass; - NewSub.TopicMsg = TopicMessage; - NewSub.Callback = Callback; - NewSub.Ready = false; - - NewSub.rcl_subscription = rcl_get_zero_initialized_subscription(); - const rosidl_message_type_support_t* type_support = TopicMessage->GetTypeSupport(); - rcl_subscription_options_t sub_opt = rcl_subscription_get_default_options(); - RCSOFTCHECK(rcl_subscription_init(&NewSub.rcl_subscription, &node, type_support, TCHAR_TO_UTF8(*TopicName), &sub_opt)); - - Subscriptions.Emplace(MoveTemp(NewSub)); - - // invalidate wait_set - if (rcl_wait_set_is_valid(&wait_set)) - { - RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); - } + UROS2Subscriber* NewSub = NewObject(this); + NewSub->TopicName = TopicName; + NewSub->MsgClass = MsgClass; + NewSub->Callback = Callback; + ActorComponent->AddSubscription(NewSub); } void AROS2Node::AddServiceServer(const FString& ServiceName, const TSubclassOf SrvClass, const FServiceCallback& Callback) { - check(State == UROS2State::Initialized); - - if (!Callback.IsBound()) + if (nullptr == ActorComponent) { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] Callback is not set - is this on purpose? (%s)"), *GetName(), *__LOG_INFO__); + return; } - UROS2GenericSrv* Service = NewObject(this, SrvClass); - Service->Init(); - - FService NewSrv; - NewSrv.ServiceName = ServiceName; - NewSrv.ServiceType = SrvClass; - NewSrv.Service = Service; - NewSrv.Callback = Callback; - NewSrv.Ready = false; - - NewSrv.rcl_service = rcl_get_zero_initialized_service(); - const rosidl_service_type_support_t* type_support = Service->GetTypeSupport(); - rcl_service_options_t srv_opt = rcl_service_get_default_options(); - RCSOFTCHECK(rcl_service_init(&NewSrv.rcl_service, &node, type_support, TCHAR_TO_UTF8(*ServiceName), &srv_opt)); - - Services.Emplace(MoveTemp(NewSrv)); + UROS2ServiceServer* NewSrv = NewObject(this); + NewSrv->ServiceName = ServiceName; + NewSrv->SrvClass = SrvClass; + NewSrv->SrvCallback = Callback; - // invalidate wait_set - if (rcl_wait_set_is_valid(&wait_set)) - { - RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); - } + ActorComponent->AddServiceServer(NewSrv); } void AROS2Node::AddPublisher(UROS2Publisher* InPublisher) { - check(IsValid(InPublisher)); - - if (false == (InPublisher->UpdateDelegate.IsBound())) - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] UpdateDelegate is not set - is this on purpose? (%s)"), *GetName(), *__LOG_INFO__); - } - - if (false == Publishers.Contains(InPublisher)) + if (nullptr == ActorComponent) { - InPublisher->RegisterComponent(); - InPublisher->OwnerNode = this; - Publishers.Add(InPublisher); - } - else - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] Publisher is re-added (%s)"), *InPublisher->GetName(), *__LOG_INFO__); + return; } + ActorComponent->AddPublisher(InPublisher); } void AROS2Node::AddServiceClient(UROS2ServiceClient* InClient) { - check(IsValid(InClient)); - - if (!InClient->RequestDelegate.IsBound()) - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] RequestDelegate is not set - is this on purpose? (%s)"), *GetName(), *__LOG_INFO__); - } - - if (!InClient->ResponseDelegate.IsBound()) + if (nullptr == ActorComponent) { - UE_LOG( - LogROS2Node, Warning, TEXT("[%s] ResponseDelegate is not set - is this on purpose? (%s)"), *GetName(), *__LOG_INFO__); - } - - if (false == Clients.Contains(InClient)) - { - InClient->OwnerNode = this; - InClient->Init(UROS2QoS::Services); - Clients.Add(InClient); - } - else - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] ServiceClient is re-added (%s)"), *GetName(), *__LOG_INFO__); + return; } + ActorComponent->AddServiceClient(InClient); } void AROS2Node::AddActionClient(UROS2ActionClient* InActionClient) { - check(IsValid(InActionClient)); - - if (false == ActionClients.Contains(InActionClient)) - { - InActionClient->OwnerNode = this; - InActionClient->Init(UROS2QoS::Default); - ActionClients.Add(InActionClient); - } - else + if (nullptr == ActorComponent) { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] ActionClient is re-added (%s)"), *GetName(), *__LOG_INFO__); + return; } + ActorComponent->AddActionClient(InActionClient); } void AROS2Node::AddActionServer(UROS2ActionServer* InActionServer) { - check(IsValid(InActionServer)); - - if (false == ActionServers.Contains(InActionServer)) - { - InActionServer->OwnerNode = this; - InActionServer->Init(UROS2QoS::Default); - ActionServers.Add(InActionServer); - } - else - { - UE_LOG(LogROS2Node, Warning, TEXT("[%s] ActionServer is re-added (%s)"), *GetName(), *__LOG_INFO__); - } -} - -void AROS2Node::HandleSubscriptions() -{ - for (auto i = 0; i < wait_set.size_of_subscriptions; i++) - { - if (wait_set.subscriptions[i]) - { - const rcl_subscription_t* currentSub = wait_set.subscriptions[i]; - for (auto& s : Subscriptions) - { - if (&s.rcl_subscription == currentSub) - { - s.Ready = true; - } - } - } - } - - for (auto& s : Subscriptions) - { - if (s.Ready == true) - { - void* data = s.TopicMsg->Get(); - rmw_message_info_t messageInfo; - RCSOFTCHECK(rcl_take(&s.rcl_subscription, data, &messageInfo, nullptr)); - - const FSubscriptionCallback* SubCallback = &s.Callback; - SubCallback->ExecuteIfBound(s.TopicMsg); - - s.Ready = false; - } - } -} - -void AROS2Node::HandleServices() -{ - for (auto i = 0; i < wait_set.size_of_services; i++) - { - if (wait_set.services[i]) - { - const rcl_service_t* currentService = wait_set.services[i]; - for (auto& s : Services) - { - if (&s.rcl_service == currentService) - { - s.Ready = true; - } - } - } - } - - for (auto& s : Services) - { - if (s.Ready == true) - { - rmw_service_info_t req_info; - void* data = s.Service->GetRequest(); - RCSOFTCHECK(rcl_take_request_with_info(&s.rcl_service, &req_info, data)); - - UE_LOG(LogROS2Node, Log, TEXT("[%s] ROS2Node Executing Service (%s)"), *GetName(), *__LOG_INFO__); - - const FServiceCallback* SrvCallback = &s.Callback; - SrvCallback->ExecuteIfBound(s.Service); - - RCSOFTCHECK(rcl_send_response(&s.rcl_service, &req_info.request_id, s.Service->GetResponse())); - - s.Ready = false; - } - } -} - -void AROS2Node::HandleClients() -{ - for (auto i = 0; i < wait_set.size_of_clients; i++) - { - if (wait_set.clients[i]) - { - const rcl_client_t* current_client = wait_set.clients[i]; - for (auto& c : Clients) - { - if (&c->client == current_client) - { - c->Ready = true; - } - } - } - } - - for (auto& c : Clients) - { - if (c->Ready == true) - { - rmw_service_info_t req_info; - void* data = c->Service->GetResponse(); - RCSOFTCHECK(rcl_take_response_with_info(&c->client, &req_info, data)); - - UE_LOG(LogROS2Node, - Log, - TEXT("[%s] ROS2Node Executing Answer Delegate for Service Client (%s)"), - *GetName(), - *__LOG_INFO__); - - const FServiceClientCallback* SrvClientCallback = &c->ResponseDelegate; - SrvClientCallback->ExecuteIfBound(c->Service); - - c->Ready = false; - } - } -} - -void AROS2Node::SpinSome() -{ - if (!rcl_wait_set_is_valid(&wait_set)) - { - RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); - wait_set = rcl_get_zero_initialized_wait_set(); - RCSOFTCHECK(rcl_wait_set_init(&wait_set, - Subscriptions.Num() + ActionClients.Num() * 2, - NGuardConditions, - NTimers + ActionServers.Num(), - Clients.Num() + ActionClients.Num() * 3, - Services.Num() + ActionServers.Num() * 3, - NEvents, - &Support->Get().context, - rcl_get_default_allocator())); - } - - RCSOFTCHECK(rcl_wait_set_clear(&wait_set)); - - for (auto& s : Subscriptions) - { - RCSOFTCHECK(rcl_wait_set_add_subscription(&wait_set, &s.rcl_subscription, nullptr)); - } - - for (auto& c : Clients) - { - RCSOFTCHECK(rcl_wait_set_add_client(&wait_set, &c->client, nullptr)); - } - - for (auto& s : Services) - { - RCSOFTCHECK(rcl_wait_set_add_service(&wait_set, &s.rcl_service, nullptr)); - } - - for (auto& a : ActionClients) + if (nullptr == ActorComponent) { - RCSOFTCHECK(rcl_action_wait_set_add_action_client(&wait_set, &a->client, nullptr, nullptr)); - } - - for (auto& a : ActionServers) - { - RCSOFTCHECK(rcl_action_wait_set_add_action_server(&wait_set, &a->server, nullptr)); - } - - rcl_ret_t rc = rcl_wait(&wait_set, 0); - RCLC_UNUSED(rc); - - HandleSubscriptions(); - HandleServices(); - HandleClients(); - - for (auto& a : ActionServers) - { - a->ProcessReady(&wait_set); - } - - for (auto& a : ActionClients) - { - a->ProcessReady(&wait_set); + return; } + ActorComponent->AddActionServer(InActionServer); } diff --git a/Source/rclUE/Private/ROS2NodeComponent.cpp b/Source/rclUE/Private/ROS2NodeComponent.cpp new file mode 100644 index 000000000..7b79d403c --- /dev/null +++ b/Source/rclUE/Private/ROS2NodeComponent.cpp @@ -0,0 +1,558 @@ +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. + +#include "ROS2NodeComponent.h" + +#include "ROS2ActionClient.h" +#include "ROS2ActionServer.h" +#include "ROS2Publisher.h" +#include "ROS2ServiceClient.h" +#include "ROS2ServiceServer.h" +#include "ROS2Subscriber.h" +#include "ROS2Subsystem.h" + +#include +#include + +DEFINE_LOG_CATEGORY(LogROS2Node); + +UROS2NodeComponent* UROS2NodeComponent::CreateNewNode(UObject* InOwner, + const FString& InNodeName, + const FString& InNodeNamespace, + const FString& InCompName, + bool Init) +{ + UROS2NodeComponent* node = NewObject(InOwner, UROS2NodeComponent::StaticClass(), FName(*InCompName)); + node->Name = InNodeName; + node->Namespace = InNodeNamespace; + if (Init) + { + node->Init(); + } + return node; +} + +UROS2NodeComponent::UROS2NodeComponent() +{ + PrimaryComponentTick.bCanEverTick = true; + PrimaryComponentTick.bStartWithTickEnabled = true; +} + +void UROS2NodeComponent::EndPlay(const EEndPlayReason::Type EndPlayReason) +{ + for (auto& c : Subscriptions) + { + c->Destroy(); + } + + for (auto& c : Publishers) + { + c->Destroy(); + } + for (auto& c : ServiceServers) + { + c->Destroy(); + } + + for (auto& c : ServiceClients) + { + c->Destroy(); + } + + for (auto& c : ActionServers) + { + c->Destroy(); + } + + for (auto& c : ActionClients) + { + c->Destroy(); + } + + RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); + + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Log, TEXT("ROS2Node EndPlay - rcl_node_fini")); + RCSOFTCHECK(rcl_node_fini(&node)); + + Super::EndPlay(EndPlayReason); +} + +void UROS2NodeComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + if (State != UROS2State::Initialized) + { + UE_LOG_WITH_INFO_NAMED_THROTTLE( + 5, LogLastHit, LogROS2Node, Warning, TEXT("ROS2 Node is not initialized yet. Please initialize Node.")); + return; + } + + if (Subscriptions.Num() > 0 || ServiceClients.Num() > 0 || ServiceServers.Num() > 0 || ActionClients.Num() > 0 || + ActionServers.Num() > 0) + { + SpinSome(); + } +} + +// This can't be pre-placed in UROS2NodeComponent::BeginPlay() as the order of rcl(c) instructions could be +// different/relevant in each of Child classes +void UROS2NodeComponent::Init() +{ + this->RegisterComponent(); + if (Name.IsEmpty()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("ROS2 Node name can\'t be empty")); + return; + } + if (State == UROS2State::Created) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Log, TEXT("start initializing..")); + if (!rcl_node_is_valid(&node)) // ensures that it stays safe when called multiple times + { + Support = GetWorld()->GetGameInstance()->GetSubsystem()->GetSupport(); + + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Log, TEXT("rclc_node_init_default")); + node = rcl_get_zero_initialized_node(); + RCSOFTCHECK(rclc_node_init_default(&node, TCHAR_TO_UTF8(*Name), TCHAR_TO_UTF8(*Namespace), &Support->Get())); + } + + State = UROS2State::Initialized; + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Log, TEXT("ROS2Node inited")); + } +} + +rcl_node_t* UROS2NodeComponent::GetNode() +{ + return &node; +} + +// Publisher//////////////////// +void UROS2NodeComponent::AddPublisher(UROS2Publisher* InPublisher) +{ + if (!IsValid(InPublisher)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("Publisher is not valid.")); + return; + } + + if (false == Publishers.Contains(InPublisher)) + { + if (InPublisher->InitializeWithROS2(this)) + { + Publishers.Add(InPublisher); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] Publisher is re-added"), *InPublisher->GetName()); + } +} + +UROS2Publisher* UROS2NodeComponent::CreateLoopPublisherWithClass(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const float InPubFrequency) +{ + UROS2Publisher* publisher = NewObject(this, InPublisherClass); + publisher->TopicName = InTopicName; + publisher->PublicationFrequencyHz = InPubFrequency; + publisher->SetDefaultDelegates(); + AddPublisher(publisher); + return publisher; +} + +UROS2Publisher* UROS2NodeComponent::CreateLoopPublisher(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + const float InPubFrequency, + const FTopicCallback& InUpdateDelegate, + const UROS2QoS InQoS) +{ + UROS2Publisher* publisher = NewObject(this, InPublisherClass); + publisher->MsgClass = InMsgClass; + publisher->TopicName = InTopicName; + publisher->QoS = InQoS; + publisher->PublicationFrequencyHz = InPubFrequency; + publisher->SetDelegates(InUpdateDelegate); + AddPublisher(publisher); + return publisher; +} + +UROS2Publisher* UROS2NodeComponent::CreatePublisherWithClass(const TSubclassOf& InPublisherClass, + const FString& InTopicName) +{ + UROS2Publisher* publisher = NewObject(this, InPublisherClass); + if (!InTopicName.IsEmpty()) + { + publisher->TopicName = InTopicName; + } + AddPublisher(publisher); + return publisher; +} + +UROS2Publisher* UROS2NodeComponent::CreatePublisher(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + const UROS2QoS InQoS) +{ + UROS2Publisher* publisher = NewObject(this, InPublisherClass); + publisher->MsgClass = InMsgClass; + publisher->TopicName = InTopicName; + publisher->QoS = InQoS; + publisher->PublicationFrequencyHz = -1; + AddPublisher(publisher); + return publisher; +} + +// Subscriber//////////////////// +void UROS2NodeComponent::AddSubscription(UROS2Subscriber* InSubscriber) +{ + if (!IsValid(InSubscriber)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("Subscriber is not valid.")); + return; + } + if (false == Subscriptions.Contains(InSubscriber)) + { + if (InSubscriber->InitializeWithROS2(this)) + { + Subscriptions.Add(InSubscriber); + InvalidateWaitSet(); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] Subscriber is re-added"), *InSubscriber->GetName()); + } +} + +UROS2Subscriber* UROS2NodeComponent::CreateSubscriber(const FString& InTopicName, + const TSubclassOf& InMsgClass, + const FSubscriptionCallback& InCallback, + const UROS2QoS InQoS) +{ + UROS2Subscriber* subscriber = NewObject(this); + subscriber->MsgClass = InMsgClass; + subscriber->TopicName = InTopicName; + subscriber->Callback = InCallback; + subscriber->QoS = InQoS; + AddSubscription(subscriber); + return subscriber; +} + +//service client +void UROS2NodeComponent::AddServiceClient(UROS2ServiceClient* InServiceClient) +{ + if (!IsValid(InServiceClient)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("ServiceClient is not valid.")); + return; + } + + if (false == ServiceClients.Contains(InServiceClient)) + { + if (InServiceClient->InitializeWithROS2(this)) + { + ServiceClients.Add(InServiceClient); + InvalidateWaitSet(); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] ServiceClient is re-added"), *InServiceClient->GetName()); + } +} + +UROS2ServiceClient* UROS2NodeComponent::CreateServiceClient(const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InResponseDelegate, + const UROS2QoS InQoS) +{ + UROS2ServiceClient* client = NewObject(this); + client->SrvClass = InSrvClass; + client->ServiceName = InServiceName; + client->QoS = InQoS; + client->SetDelegates(InResponseDelegate); + AddServiceClient(client); + return client; +} + +//service server +void UROS2NodeComponent::AddServiceServer(UROS2ServiceServer* InServiceServer) +{ + if (!IsValid(InServiceServer)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("ServiceServer is not valid.")); + return; + } + + if (false == ServiceServers.Contains(InServiceServer)) + { + if (InServiceServer->InitializeWithROS2(this)) + { + ServiceServers.Add(InServiceServer); + InvalidateWaitSet(); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] ServiceServer is re-added"), *InServiceServer->GetName()); + } +} + +UROS2ServiceServer* UROS2NodeComponent::CreateServiceServer(const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InCallback, + const UROS2QoS InQoS) + +{ + UROS2ServiceServer* server = NewObject(this); + server->SrvClass = InSrvClass; + server->ServiceName = InServiceName; + server->QoS = InQoS; + server->SrvCallback = InCallback; + AddServiceServer(server); + return server; +} + +//action client +void UROS2NodeComponent::AddActionClient(UROS2ActionClient* InActionClient) +{ + if (!IsValid(InActionClient)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("ActionClient is not valid.")); + return; + } + + if (false == ActionClients.Contains(InActionClient)) + { + if (InActionClient->InitializeWithROS2(this)) + { + ActionClients.Add(InActionClient); + InvalidateWaitSet(); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] ActionClient is re-added"), *InActionClient->GetName()); + } +} + +UROS2ActionClient* UROS2NodeComponent::CreateActionClient(const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalResponseDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InFeedbackDelegate, + const FSimpleCallback& InCancelResponseDelegate, + const UROS2QoS InGoalQoS, + const UROS2QoS InResultQoS, + const UROS2QoS InFeedbackQoS, + const UROS2QoS InCancelQoS) +{ + UROS2ActionClient* client = NewObject(this); + client->ActionClass = InActionClass; + client->ActionName = InActionName; + client->GoalQoS = InGoalQoS; + client->ResultQoS = InResultQoS; + client->FeedbackQoS = InFeedbackQoS; + client->CancelQoS = InCancelQoS; + client->SetDelegates(InFeedbackDelegate, InResultResponseDelegate, InGoalResponseDelegate, InCancelResponseDelegate); + AddActionClient(client); + return client; +} + +void UROS2NodeComponent::AddActionServer(UROS2ActionServer* InActionServer) +{ + if (!IsValid(InActionServer)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Warning, TEXT("ActionServer is not valid.")); + return; + } + + if (false == ActionServers.Contains(InActionServer)) + { + if (InActionServer->InitializeWithROS2(this)) + { + ActionServers.Add(InActionServer); + InvalidateWaitSet(); + } + } + else + { + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] ActionServer is re-added"), *InActionServer->GetName()); + } +} + +UROS2ActionServer* UROS2NodeComponent::CreateActionServer(const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalDelegate, + const FSimpleCallback& InResultDelegate, + const FSimpleCallback& InCancelDelegate, + const UROS2QoS InGoalQoS, + const UROS2QoS InResultQoS, + const UROS2QoS InFeedbackQoS, + const UROS2QoS InCancelQoS) +{ + UROS2ActionServer* server = NewObject(this); + server->ActionClass = InActionClass; + server->ActionName = InActionName; + server->GoalQoS = InGoalQoS; + server->ResultQoS = InResultQoS; + server->FeedbackQoS = InFeedbackQoS; + server->CancelQoS = InCancelQoS; + server->SetDelegates(InGoalDelegate, InCancelDelegate, InResultDelegate); + AddActionServer(server); + return server; +} + +void UROS2NodeComponent::HandleSubscriptions() +{ + for (auto i = 0; i < wait_set.size_of_subscriptions; i++) + { + if (wait_set.subscriptions[i]) + { + const rcl_subscription_t* currentSub = wait_set.subscriptions[i]; + for (auto& s : Subscriptions) + { + if (&s->rcl_subscription == currentSub) + { + s->Ready = true; + } + } + } + } + + for (auto& s : Subscriptions) + { + s->ProcessReady(); + } +} + +void UROS2NodeComponent::HandleServiceServers() +{ + for (auto i = 0; i < wait_set.size_of_services; i++) + { + if (wait_set.services[i]) + { + const rcl_service_t* currentService = wait_set.services[i]; + for (auto& s : ServiceServers) + { + if (&s->rcl_service == currentService) + { + s->Ready = true; + } + } + } + } + + for (auto& s : ServiceServers) + { + s->ProcessReady(); + } +} + +void UROS2NodeComponent::HandleServiceClients() +{ + for (auto i = 0; i < wait_set.size_of_clients; i++) + { + if (wait_set.clients[i]) + { + const rcl_client_t* current_client = wait_set.clients[i]; + for (auto& c : ServiceClients) + { + if (&c->client == current_client) + { + c->Ready = true; + } + } + } + } + + for (auto& c : ServiceClients) + { + c->ProcessReady(); + } +} + +void UROS2NodeComponent::HandleActionClients() +{ + for (auto& a : ActionClients) + { + a->ProcessReady(&wait_set); + } +} + +void UROS2NodeComponent::HandleActionServers() +{ + for (auto& a : ActionServers) + { + a->ProcessReady(&wait_set); + } +} + +void UROS2NodeComponent::SpinSome() +{ + // ref + // action: rcl_action_wait_set_add_action_server. + // https://github.com/ros2/rcl/blob/3eb0f7536e9023c1af3dd2a6eefcfc11bd20129e/rcl_action/src/rcl_action/action_server.c#L956 + if (!rcl_wait_set_is_valid(&wait_set)) + { + RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); + wait_set = rcl_get_zero_initialized_wait_set(); + RCSOFTCHECK(rcl_wait_set_init(&wait_set, + Subscriptions.Num() + ActionClients.Num() * 2, // action feedback and status + NGuardConditions, + NTimers + ActionServers.Num(), // action timeout + ServiceClients.Num() + ActionClients.Num() * 3, // action goal, cancel and result + ServiceServers.Num() + ActionServers.Num() * 3, // action goal, cancel and result + NEvents, + &Support->Get().context, + rcl_get_default_allocator())); + } + + RCSOFTCHECK(rcl_wait_set_clear(&wait_set)); + + // todo add timer for action + for (auto& s : Subscriptions) + { + RCSOFTCHECK(rcl_wait_set_add_subscription(&wait_set, &s->rcl_subscription, nullptr)); + } + + for (auto& c : ServiceClients) + { + RCSOFTCHECK(rcl_wait_set_add_client(&wait_set, &c->client, nullptr)); + } + + for (auto& s : ServiceServers) + { + RCSOFTCHECK(rcl_wait_set_add_service(&wait_set, &s->rcl_service, nullptr)); + } + + for (auto& a : ActionClients) + { + RCSOFTCHECK(rcl_action_wait_set_add_action_client(&wait_set, &a->client, nullptr, nullptr)); + } + + for (auto& a : ActionServers) + { + RCSOFTCHECK(rcl_action_wait_set_add_action_server(&wait_set, &a->server, nullptr)); + } + + rcl_ret_t rc = rcl_wait(&wait_set, 0); + RCLC_UNUSED(rc); + + HandleSubscriptions(); + HandleServiceServers(); + HandleServiceClients(); + HandleActionClients(); + HandleActionServers(); +} + +void UROS2NodeComponent::InvalidateWaitSet() +{ + // invalidate wait_set so that in next spin_some() call the + // 'executor->wait_set' is updated accordingly + if (rcl_wait_set_is_valid(&wait_set)) + { + RCSOFTCHECK(rcl_wait_set_fini(&wait_set)); + } +} diff --git a/Source/rclUE/Private/ROS2Publisher.cpp b/Source/rclUE/Private/ROS2Publisher.cpp index 72cccd99f..4707e0007 100644 --- a/Source/rclUE/Private/ROS2Publisher.cpp +++ b/Source/rclUE/Private/ROS2Publisher.cpp @@ -5,109 +5,122 @@ #include #include -DEFINE_LOG_CATEGORY(LogROS2Publisher); - -UROS2Publisher* UROS2Publisher::CreatePublisher(UObject* InOwner, - const FString& InTopicName, - const TSubclassOf& InPublisherClass, - const TSubclassOf& InMsgClass, - int32 InPubFrequency) +UROS2Publisher* UROS2Publisher::CreateLoopPublisherWithClass(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const float InPubFrequency) { UROS2Publisher* publisher = NewObject(InOwner, InPublisherClass); - publisher->MsgClass = InMsgClass; publisher->TopicName = InTopicName; publisher->PublicationFrequencyHz = InPubFrequency; - publisher->SetupUpdateCallback(); + publisher->SetDefaultDelegates(); return publisher; } -UROS2Publisher::UROS2Publisher() +UROS2Publisher* UROS2Publisher::CreateLoopPublisher(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + float InPubFrequency, + const FTopicCallback& InUpdateDelegate, + const UROS2QoS InQoS) { - PrimaryComponentTick.bCanEverTick = true; + UROS2Publisher* publisher = NewObject(InOwner, InPublisherClass); + publisher->MsgClass = InMsgClass; + publisher->TopicName = InTopicName; + publisher->PublicationFrequencyHz = InPubFrequency; + publisher->QoS = InQoS; + publisher->SetDelegates(InUpdateDelegate); + return publisher; } -void UROS2Publisher::Init(const TEnumAsByte QoS) +UROS2Publisher* UROS2Publisher::CreatePublisherWithClass(UObject* InOwner, + const TSubclassOf& InPublisherClass, + const FString& InTopicName) { - check(OwnerNode != nullptr); - check(OwnerNode->State == UROS2State::Initialized); - - if (State == UROS2State::Created) + UROS2Publisher* publisher = NewObject(InOwner, InPublisherClass); + if (!InTopicName.IsEmpty()) { - InitializeMessage(); // needed to get type support - - check(IsValid(TopicMessage)); + publisher->TopicName = InTopicName; + } + return publisher; +} - const rosidl_message_type_support_t* msg_type_support = TopicMessage->GetTypeSupport(); +UROS2Publisher* UROS2Publisher::CreatePublisher(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + float InPubFrequency, + const UROS2QoS InQoS) +{ + UROS2Publisher* publisher = NewObject(InOwner, InPublisherClass); + publisher->MsgClass = InMsgClass; + publisher->TopicName = InTopicName; + publisher->PublicationFrequencyHz = InPubFrequency; + publisher->QoS = InQoS; + publisher->SetDefaultDelegates(); + return publisher; +} - OwnerNode->Init(); - UE_LOG(LogROS2Publisher, Log, TEXT("Publisher Init - rclc_publisher_init_default (%s)"), *__LOG_INFO__); +void UROS2Publisher::InitializeTopicComponent() +{ + TimerManager = NewObject( + this, URRTimerManager::StaticClass(), FName(*FString::Printf(TEXT("%s_TimerManager"), *GetName()))); + const rosidl_message_type_support_t* msg_type_support = TopicMessage->GetTypeSupport(); - RclPublisher = rcl_get_zero_initialized_publisher(); - rcl_publisher_options_t pub_opt = rcl_publisher_get_default_options(); + RclPublisher = rcl_get_zero_initialized_publisher(); + rcl_publisher_options_t pub_opt = rcl_publisher_get_default_options(); - pub_opt.qos = QoS_LUT[QoS]; + pub_opt.qos = QoS_LUT[QoS]; - RCSOFTCHECK(rcl_publisher_init(&RclPublisher, OwnerNode->GetNode(), msg_type_support, TCHAR_TO_UTF8(*TopicName), &pub_opt)); + RCSOFTCHECK(rcl_publisher_init(&RclPublisher, OwnerNode->GetNode(), msg_type_support, TCHAR_TO_UTF8(*TopicName), &pub_opt)); - StartPublishTimer(); + StartPublishTimer(); - State = UROS2State::Initialized; - } + State = UROS2State::Initialized; } - void UROS2Publisher::StopPublishTimer() { - GetWorld()->GetTimerManager().ClearTimer(TimerHandle); + if (TimerManager != nullptr) + { + TimerManager->StopTimer(); + } } void UROS2Publisher::StartPublishTimer() { - if (PublicationFrequencyHz > 0) + if (PublicationFrequencyHz > 0 && TimerManager != nullptr) { - GetWorld()->GetTimerManager().SetTimer( - TimerHandle, this, &UROS2Publisher::UpdateAndPublishMessage, 1.f / PublicationFrequencyHz, true); + TimerManager->LogInfo = TopicName; + FTimerDelegate TimerDelegate = FTimerDelegate::CreateUObject(this, &UROS2Publisher::UpdateAndPublish); + TimerManager->SetTimer(TimerDelegate, 1.f / PublicationFrequencyHz); } } -void UROS2Publisher::RegisterToROS2Node(AROS2Node* InROS2Node) -{ - SetupUpdateCallback(); - InROS2Node->AddPublisher(this); -} - void UROS2Publisher::Destroy() { - UE_LOG(LogROS2Publisher, Log, TEXT("Publisher Destroy (%s)"), *__LOG_INFO__); - if (TopicMessage != nullptr) - { - TopicMessage->Fini(); - } - - if (OwnerNode != nullptr) + Super::Destroy(); + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (res) { - UE_LOG(LogROS2Publisher, Log, TEXT("Publisher Destroy - rcl_publisher_fini (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO_SHORT_NAMED(LogROS2Topic, Log, TEXT("Publisher Destroy - rcl_publisher_fini ")); RCSOFTCHECK(rcl_publisher_fini(&RclPublisher, OwnerNode->GetNode())); } - UE_LOG(LogROS2Publisher, Log, TEXT("Publisher Destroy - Done (%s)"), *__LOG_INFO__); -} - -void UROS2Publisher::InitializeMessage() -{ - check(TopicName != FString()); - check(MsgClass); - - TopicMessage = NewObject(this, MsgClass); - - check(IsValid(TopicMessage)); - - TopicMessage->Init(); + StopPublishTimer(); + UpdateDelegate.Unbind(); } -void UROS2Publisher::UpdateAndPublishMessage() +void UROS2Publisher::UpdateAndPublish() { - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); + bool res = true; + IS_TOPIC_INITED(OwnerNode, GetName(), res); + if (!res) + { + UE_LOG_WITH_INFO_SHORT_NAMED(LogROS2Topic, Error, TEXT("Publisher is not initialized yet ")); + return; + } UpdateDelegate.ExecuteIfBound(TopicMessage); @@ -116,10 +129,28 @@ void UROS2Publisher::UpdateAndPublishMessage() void UROS2Publisher::Publish() { - check(State == UROS2State::Initialized); - check(OwnerNode != nullptr); + bool res = true; + IS_TOPIC_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } - PublishedMsg = TopicMessage->Get(); + RCSOFTCHECK(rcl_publish(&RclPublisher, TopicMessage->Get(), nullptr)); +} - RCSOFTCHECK(rcl_publish(&RclPublisher, PublishedMsg, nullptr)); +void UROS2Publisher::SetDelegates(const FTopicCallback& InUpdateDelegate) +{ + if (!InUpdateDelegate.IsBound()) + { + UE_LOG_WITH_INFO_SHORT_NAMED(LogROS2Topic, Warning, TEXT("UpdateDelegate is not set - is this on purpose? ")); + } + UpdateDelegate.Unbind(); + UpdateDelegate = InUpdateDelegate; +} + +void UROS2Publisher::SetDefaultDelegates() +{ + UpdateDelegate.Unbind(); + UpdateDelegate.BindDynamic(this, &UROS2Publisher::UpdateMessage); } diff --git a/Source/rclUE/Private/ROS2Service.cpp b/Source/rclUE/Private/ROS2Service.cpp new file mode 100644 index 000000000..629f6af1f --- /dev/null +++ b/Source/rclUE/Private/ROS2Service.cpp @@ -0,0 +1,81 @@ +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. + +#include "ROS2Service.h" + +DEFINE_LOG_CATEGORY(LogROS2Srv); + +bool UROS2Service::InitializeWithROS2(UROS2NodeComponent* InROS2Node) +{ + OwnerNode = InROS2Node; + return Init(); +} + +bool UROS2Service::Init() +{ + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (!res) + { + return false; + } + + if (State == UROS2State::Created) + { + if (!InitializeService()) + { + return false; + } + + InitializeServiceComponent(); + + State = UROS2State::Initialized; + } + + Ready = false; + + return true; +} + +bool UROS2Service::InitializeService() +{ + if (ServiceName.IsEmpty()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Srv, Warning, TEXT("ServiceName can\'t be empty.")); + return false; + } + + if (!IsValid(SrvClass) || SrvClass == UROS2GenericSrv::StaticClass()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Srv, Warning, TEXT("SrvClass is empty or UROS2GenericSrv. Please set valid class.")); + return false; + } + + Service = NewObject(this, SrvClass); + + if (!IsValid(Service)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Srv, Warning, TEXT("Failed to create Service")); + return false; + } + + Service->Init(); + return true; +} + +void UROS2Service::Destroy() +{ + if (IsValid(Service)) + { + Service->Fini(); + } +} + +void UROS2Service::ProcessReady() +{ + checkNoEntry(); +} + +void UROS2Service::InitializeServiceComponent() +{ + checkNoEntry(); +} diff --git a/Source/rclUE/Private/ROS2ServiceClient.cpp b/Source/rclUE/Private/ROS2ServiceClient.cpp index 5e6d719fa..0c47c3563 100644 --- a/Source/rclUE/Private/ROS2ServiceClient.cpp +++ b/Source/rclUE/Private/ROS2ServiceClient.cpp @@ -1,85 +1,85 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2ServiceClient.h" -DEFINE_LOG_CATEGORY(LogROS2Service); - -// Sets default values for this component's properties -UROS2ServiceClient::UROS2ServiceClient() +UROS2ServiceClient* UROS2ServiceClient::CreateServiceClient(UObject* InOwner, + const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InResponseDelegate, + const UROS2QoS InQoS) { - PrimaryComponentTick.bCanEverTick = true; + UROS2ServiceClient* client = NewObject(InOwner); + client->SrvClass = InSrvClass; + client->ServiceName = InServiceName; + client->QoS = InQoS; + client->SetDelegates(InResponseDelegate); + return client; } -void UROS2ServiceClient::Init(TEnumAsByte QoS) +void UROS2ServiceClient::InitializeServiceComponent() { - check(OwnerNode != nullptr); - check(OwnerNode->State == UROS2State::Initialized); - if (State == UROS2State::Created) - { - InitializeService(); - - check(IsValid(Service)); - - const rosidl_service_type_support_t* srv_type_support = Service->GetTypeSupport(); - - client = rcl_get_zero_initialized_client(); - rcl_client_options_t client_opt = rcl_client_get_default_options(); + const rosidl_service_type_support_t* srv_type_support = Service->GetTypeSupport(); - client_opt.qos = QoS_LUT[QoS]; + client = rcl_get_zero_initialized_client(); + rcl_client_options_t client_opt = rcl_client_get_default_options(); - RCSOFTCHECK(rcl_client_init(&client, OwnerNode->GetNode(), srv_type_support, TCHAR_TO_UTF8(*ServiceName), &client_opt)); + client_opt.qos = QoS_LUT[QoS]; - State = UROS2State::Initialized; - } - - Ready = false; + RCSOFTCHECK(rcl_client_init(&client, OwnerNode->GetNode(), srv_type_support, TCHAR_TO_UTF8(*ServiceName), &client_opt)); } -void UROS2ServiceClient::InitializeService() +void UROS2ServiceClient::Destroy() { - check(ServiceName != FString()); - check(SrvClass); - - Service = NewObject(this, SrvClass); + Super::Destroy(); - check(IsValid(Service)); + bool result = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), result); + if (result) + { + UE_LOG_WITH_INFO(LogROS2Srv, Log, TEXT("Client Destroy - rcl_client_fini ")); + RCSOFTCHECK(rcl_client_fini(&client, OwnerNode->GetNode())); + } - Service->Init(); + ResponseDelegate.Unbind(); } -void UROS2ServiceClient::Destroy() +void UROS2ServiceClient::ProcessReady() { - if (Service != nullptr) + bool result = true; + IS_SRV_INITED(OwnerNode, GetName(), result); + if (!result) { - Service->Fini(); + return; } - if (OwnerNode != nullptr) + if (Ready == true) { - UE_LOG(LogROS2Service, Log, TEXT("Client Destroy - rcl_client_fini (%s)"), *__LOG_INFO__); - RCSOFTCHECK(rcl_client_fini(&client, OwnerNode->GetNode())); + rmw_service_info_t req_info; + void* data = Service->GetResponse(); + RCSOFTCHECK(rcl_take_response_with_info(&client, &req_info, data)); + + UE_LOG_WITH_INFO_NAMED(LogROS2Srv, Log, TEXT("ROS2Node Executing Response delegate for Service Client")); + + ResponseDelegate.ExecuteIfBound(Service); + + Ready = false; } } -void UROS2ServiceClient::UpdateAndSendRequest() +void UROS2ServiceClient::SendRequest() { - UE_LOG(LogROS2Service, Log, TEXT("%s"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(IsValid(OwnerNode)); - if (!IsServiceReady()) + bool result = true; + IS_SRV_INITED(OwnerNode, GetName(), result); + if (!result) { - UE_LOG(LogROS2Service, Error, TEXT("Service named %s is not ready yet (%s)"), *ServiceName, *__LOG_INFO__); return; } - RequestDelegate.ExecuteIfBound(Service); - SendRequest(); -} -void UROS2ServiceClient::SendRequest() -{ - UE_LOG(LogROS2Service, Log, TEXT("%s"), *__LOG_INFO__); - check(State == UROS2State::Initialized); - check(OwnerNode != nullptr); + if (!IsServiceReady()) + { + UE_LOG_WITH_INFO(LogROS2Srv, Error, TEXT("Service named %s is not ready yet"), *ServiceName); + return; + } req = Service->GetRequest(); @@ -89,6 +89,13 @@ void UROS2ServiceClient::SendRequest() bool UROS2ServiceClient::IsServiceReady() { + bool result = true; + IS_SRV_INITED(OwnerNode, GetName(), result); + if (!result) + { + return false; + } + bool is_ready; rcl_ret_t ret = rcl_service_server_is_available(OwnerNode->GetNode(), &client, &is_ready); if (RCL_RET_NODE_INVALID == ret) @@ -102,7 +109,17 @@ bool UROS2ServiceClient::IsServiceReady() } if (ret != RCL_RET_OK) { - UE_LOG(LogROS2Service, Error, TEXT("rcl_service_server_is_available failed (%s)"), *__LOG_INFO__); + UE_LOG_WITH_INFO(LogROS2Srv, Error, TEXT("rcl_service_server_is_available failed ")); } return is_ready; } + +void UROS2ServiceClient::SetDelegates(const FServiceCallback& InResponseDelegate) +{ + if (!InResponseDelegate.IsBound()) + { + UE_LOG_WITH_INFO(LogROS2Srv, Warning, TEXT("ResponseDelegate is not set - is this on purpose? ")); + } + ResponseDelegate.Unbind(); + ResponseDelegate = InResponseDelegate; +} diff --git a/Source/rclUE/Private/ROS2ServiceServer.cpp b/Source/rclUE/Private/ROS2ServiceServer.cpp new file mode 100644 index 000000000..cf93d7e18 --- /dev/null +++ b/Source/rclUE/Private/ROS2ServiceServer.cpp @@ -0,0 +1,81 @@ +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. + +#include "ROS2ServiceServer.h" + +UROS2ServiceServer* UROS2ServiceServer::CreateServiceServer(UObject* InOwner, + const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InCallback, + const UROS2QoS InQoS) +{ + UROS2ServiceServer* server = NewObject(InOwner); + server->SrvClass = InSrvClass; + server->ServiceName = InServiceName; + server->QoS = InQoS; + server->SetDelegates(InCallback); + return server; +} + +void UROS2ServiceServer::InitializeServiceComponent() +{ + rcl_service = rcl_get_zero_initialized_service(); + const rosidl_service_type_support_t* type_support = Service->GetTypeSupport(); + rcl_service_options_t srv_opt = rcl_service_get_default_options(); + srv_opt.qos = QoS_LUT[QoS]; + RCSOFTCHECK(rcl_service_init(&rcl_service, OwnerNode->GetNode(), type_support, TCHAR_TO_UTF8(*ServiceName), &srv_opt)); +} + +void UROS2ServiceServer::Destroy() +{ + Super::Destroy(); + + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (res) + { + UE_LOG_WITH_INFO(LogROS2Srv, Log, TEXT("Service server Destroy - rcl_service_fini ")); + RCSOFTCHECK(rcl_service_fini(&rcl_service, OwnerNode->GetNode())); + } +} + +void UROS2ServiceServer::ProcessReady() +{ + bool res = true; + IS_SRV_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } + + if (Ready == true) + { + rmw_service_info_t req_info; + void* data = Service->GetRequest(); + RCSOFTCHECK(rcl_take_request_with_info(&rcl_service, &req_info, data)); + + if (bRejectConsecutiveIdenticalRequest && UROS2Utils::IsEqualWMSrvInfo(req_info, LastReqInfo, true)) + { + UE_LOG_WITH_INFO(LogROS2Srv, Warning, TEXT("Rejecting consecutive identical request")); + return; + } + LastReqInfo = req_info; + + UE_LOG_WITH_INFO_NAMED(LogROS2Node, Log, TEXT("ROS2Node Executing Service server callback")); + + SrvCallback.ExecuteIfBound(Service); + + RCSOFTCHECK(rcl_send_response(&rcl_service, &req_info.request_id, Service->GetResponse())); + + Ready = false; + } +} + +void UROS2ServiceServer::SetDelegates(const FServiceCallback& InSrvCallback) +{ + if (!InSrvCallback.IsBound()) + { + UE_LOG_WITH_INFO(LogROS2Srv, Warning, TEXT("SrvCallback is not set - is this on purpose? ")); + } + + SrvCallback = InSrvCallback; +} diff --git a/Source/rclUE/Private/ROS2Subscriber.cpp b/Source/rclUE/Private/ROS2Subscriber.cpp new file mode 100644 index 000000000..aadac3701 --- /dev/null +++ b/Source/rclUE/Private/ROS2Subscriber.cpp @@ -0,0 +1,79 @@ +// Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + +#include "ROS2Subscriber.h" + +#include +#include + +UROS2Subscriber* UROS2Subscriber::CreateSubscriber(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InMsgClass, + const FSubscriptionCallback& InCallback, + const UROS2QoS InQoS) +{ + UROS2Subscriber* subscriber = NewObject(InOwner); + subscriber->MsgClass = InMsgClass; + subscriber->TopicName = InTopicName; + subscriber->QoS = InQoS; + subscriber->SetDelegates(InCallback); + return subscriber; +} + +void UROS2Subscriber::InitializeTopicComponent() +{ + const rosidl_message_type_support_t* msg_type_support = TopicMessage->GetTypeSupport(); + + rcl_subscription = rcl_get_zero_initialized_subscription(); + const rosidl_message_type_support_t* type_support = TopicMessage->GetTypeSupport(); + rcl_subscription_options_t sub_opt = rcl_subscription_get_default_options(); + sub_opt.qos = QoS_LUT[QoS]; + RCSOFTCHECK(rcl_subscription_init(&rcl_subscription, OwnerNode->GetNode(), type_support, TCHAR_TO_UTF8(*TopicName), &sub_opt)); + + State = UROS2State::Initialized; +} + +void UROS2Subscriber::Destroy() +{ + Super::Destroy(); + + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (res) + { + UE_LOG_WITH_INFO(LogROS2Topic, Log, TEXT("Subscriber Destroy - rcl_Subscriber_fini ")); + RCSOFTCHECK(rcl_subscription_fini(&rcl_subscription, OwnerNode->GetNode())); + } + Callback.Unbind(); +} + +void UROS2Subscriber::ProcessReady() +{ + bool res = true; + IS_TOPIC_INITED(OwnerNode, GetName(), res); + if (!res) + { + return; + } + + if (Ready == true) + { + void* data = TopicMessage->Get(); + rmw_message_info_t messageInfo; + RCSOFTCHECK(rcl_take(&rcl_subscription, data, &messageInfo, nullptr)); + + Callback.ExecuteIfBound(TopicMessage); + + Ready = false; + } +} + +void UROS2Subscriber::SetDelegates(const FSubscriptionCallback& InCallback) +{ + if (!InCallback.IsBound()) + { + UE_LOG_WITH_INFO(LogROS2Topic, Warning, TEXT("Callback is not set - is this on purpose? ")); + } + + Callback.Unbind(); + Callback = InCallback; +} diff --git a/Source/rclUE/Private/ROS2Subsystem.cpp b/Source/rclUE/Private/ROS2Subsystem.cpp index 58d616afb..44389185e 100644 --- a/Source/rclUE/Private/ROS2Subsystem.cpp +++ b/Source/rclUE/Private/ROS2Subsystem.cpp @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2Subsystem.h" @@ -48,4 +48,4 @@ TStatId UROS2Subsystem::GetStatId() const UROS2Support* UROS2Subsystem::GetSupport() const { return Support; -} \ No newline at end of file +} diff --git a/Source/rclUE/Private/ROS2Support.cpp b/Source/rclUE/Private/ROS2Support.cpp index 9e8de3368..85e5b8e20 100644 --- a/Source/rclUE/Private/ROS2Support.cpp +++ b/Source/rclUE/Private/ROS2Support.cpp @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "ROS2Support.h" @@ -11,9 +11,9 @@ void UROS2Support::Init() { allocator = rcl_get_default_allocator(); RCSOFTCHECK(rclc_support_init(&support, 0, nullptr, &allocator)); -} +} void UROS2Support::Fini() { RCSOFTCHECK(rclc_support_fini(&support)); -} \ No newline at end of file +} diff --git a/Source/rclUE/Private/ROS2Topic.cpp b/Source/rclUE/Private/ROS2Topic.cpp new file mode 100644 index 000000000..a10804dbc --- /dev/null +++ b/Source/rclUE/Private/ROS2Topic.cpp @@ -0,0 +1,78 @@ +// Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + +#include "ROS2Topic.h" + +#include +#include + +DEFINE_LOG_CATEGORY(LogROS2Topic); + +bool UROS2Topic::InitializeWithROS2(UROS2NodeComponent* InROS2Node) +{ + OwnerNode = InROS2Node; + return Init(); +} + +bool UROS2Topic::Init() +{ + bool res = true; + IS_ROS2NODE_INITED(OwnerNode, GetName(), res); + if (!res) + { + return false; + } + + if (State == UROS2State::Created) + { + if (!InitializeMessage()) + { + return false; + } + + InitializeTopicComponent(); + + State = UROS2State::Initialized; + + return true; + } + + return false; +} + +bool UROS2Topic::InitializeMessage() +{ + if (TopicName.IsEmpty()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Topic, Warning, TEXT("TopicName can\'t be empty.")); + return false; + } + + if (!IsValid(MsgClass) || MsgClass == UROS2GenericMsg::StaticClass()) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Topic, Warning, TEXT("MsgClass is empty or UROS2GenericMsg. Please set valid class.")); + return false; + } + + TopicMessage = NewObject(this, MsgClass); + if (!IsValid(TopicMessage)) + { + UE_LOG_WITH_INFO_NAMED(LogROS2Topic, Warning, TEXT("Failed to create Msg")); + return false; + } + + TopicMessage->Init(); + return true; +} + +void UROS2Topic::Destroy() +{ + if (IsValid(TopicMessage)) + { + TopicMessage->Fini(); + } +} + +void UROS2Topic::InitializeTopicComponent() +{ + checkNoEntry(); +} diff --git a/Source/rclUE/Private/Srvs/ROS2AddDiag.cpp b/Source/rclUE/Private/Srvs/ROS2AddDiag.cpp index 9ad019aef..758cf5089 100644 --- a/Source/rclUE/Private/Srvs/ROS2AddDiag.cpp +++ b/Source/rclUE/Private/Srvs/ROS2AddDiag.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/srv/AddDiagnostics.srv - do not modify #include "Srvs/ROS2AddDiag.h" diff --git a/Source/rclUE/Private/Srvs/ROS2AddTwoInts.cpp b/Source/rclUE/Private/Srvs/ROS2AddTwoInts.cpp index f26965184..ff9e05924 100644 --- a/Source/rclUE/Private/Srvs/ROS2AddTwoInts.cpp +++ b/Source/rclUE/Private/Srvs/ROS2AddTwoInts.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/AddTwoInts.srv - do not modify #include "Srvs/ROS2AddTwoInts.h" diff --git a/Source/rclUE/Private/Srvs/ROS2Attach.cpp b/Source/rclUE/Private/Srvs/ROS2Attach.cpp index ae2e703e7..1ab2620d8 100644 --- a/Source/rclUE/Private/Srvs/ROS2Attach.cpp +++ b/Source/rclUE/Private/Srvs/ROS2Attach.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/Attach.srv - do not modify #include "Srvs/ROS2Attach.h" diff --git a/Source/rclUE/Private/Srvs/ROS2CancelGoal.cpp b/Source/rclUE/Private/Srvs/ROS2CancelGoal.cpp index 5cac91c86..bb68b047e 100644 --- a/Source/rclUE/Private/Srvs/ROS2CancelGoal.cpp +++ b/Source/rclUE/Private/Srvs/ROS2CancelGoal.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from action_msgs/srv/CancelGoal.srv - do not modify #include "Srvs/ROS2CancelGoal.h" diff --git a/Source/rclUE/Private/Srvs/ROS2DeleteEntity.cpp b/Source/rclUE/Private/Srvs/ROS2DeleteEntity.cpp index 25a0f86df..69656af52 100644 --- a/Source/rclUE/Private/Srvs/ROS2DeleteEntity.cpp +++ b/Source/rclUE/Private/Srvs/ROS2DeleteEntity.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/DeleteEntity.srv - do not modify #include "Srvs/ROS2DeleteEntity.h" diff --git a/Source/rclUE/Private/Srvs/ROS2FrameGraph.cpp b/Source/rclUE/Private/Srvs/ROS2FrameGraph.cpp index c548d2ce7..b6905cd34 100644 --- a/Source/rclUE/Private/Srvs/ROS2FrameGraph.cpp +++ b/Source/rclUE/Private/Srvs/ROS2FrameGraph.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/srv/FrameGraph.srv - do not modify #include "Srvs/ROS2FrameGraph.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GenericSrv.cpp b/Source/rclUE/Private/Srvs/ROS2GenericSrv.cpp index fc104cb11..5977596e7 100644 --- a/Source/rclUE/Private/Srvs/ROS2GenericSrv.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GenericSrv.cpp @@ -1,9 +1,7 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. #include "Srvs/ROS2GenericSrv.h" -DEFINE_LOG_CATEGORY(LogROS2Srv); - const rosidl_service_type_support_t* UROS2GenericSrv::GetTypeSupport() const { checkNoEntry(); diff --git a/Source/rclUE/Private/Srvs/ROS2GetBoolFromId.cpp b/Source/rclUE/Private/Srvs/ROS2GetBoolFromId.cpp index 8cfd01d8a..39457f813 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetBoolFromId.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetBoolFromId.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetBoolFromId.srv - do not modify #include "Srvs/ROS2GetBoolFromId.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GetEntityState.cpp b/Source/rclUE/Private/Srvs/ROS2GetEntityState.cpp index c93adfdc6..497a4ebef 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetEntityState.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetEntityState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetEntityState.srv - do not modify #include "Srvs/ROS2GetEntityState.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GetIMs.cpp b/Source/rclUE/Private/Srvs/ROS2GetIMs.cpp index 40529650d..355f7a53c 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetIMs.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetIMs.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/srv/GetInteractiveMarkers.srv - do not modify #include "Srvs/ROS2GetIMs.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GetInt32FromId.cpp b/Source/rclUE/Private/Srvs/ROS2GetInt32FromId.cpp index 7cd5c7a40..6e88dad03 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetInt32FromId.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetInt32FromId.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetInt32FromId.srv - do not modify #include "Srvs/ROS2GetInt32FromId.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GetMap.cpp b/Source/rclUE/Private/Srvs/ROS2GetMap.cpp index ab86345c8..02d4fcc28 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetMap.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetMap.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/GetMap.srv - do not modify #include "Srvs/ROS2GetMap.h" diff --git a/Source/rclUE/Private/Srvs/ROS2GetPlan.cpp b/Source/rclUE/Private/Srvs/ROS2GetPlan.cpp index d6a8e17a0..78c60a8b7 100644 --- a/Source/rclUE/Private/Srvs/ROS2GetPlan.cpp +++ b/Source/rclUE/Private/Srvs/ROS2GetPlan.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/GetPlan.srv - do not modify #include "Srvs/ROS2GetPlan.h" diff --git a/Source/rclUE/Private/Srvs/ROS2LoadMap.cpp b/Source/rclUE/Private/Srvs/ROS2LoadMap.cpp new file mode 100644 index 000000000..dbc6b736a --- /dev/null +++ b/Source/rclUE/Private/Srvs/ROS2LoadMap.cpp @@ -0,0 +1,65 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from nav_msgs/srv/LoadMap.srv - do not modify + +#include "Srvs/ROS2LoadMap.h" + +const rosidl_service_type_support_t* UROS2LoadMapSrv::GetTypeSupport() const +{ + return ROSIDL_GET_SRV_TYPE_SUPPORT(nav_msgs, srv, LoadMap); +} + +void UROS2LoadMapSrv::Init() +{ + nav_msgs__srv__LoadMap_Request__init(&LoadMap_req); + nav_msgs__srv__LoadMap_Response__init(&LoadMap_res); +} + +void UROS2LoadMapSrv::Fini() +{ + nav_msgs__srv__LoadMap_Request__fini(&LoadMap_req); + nav_msgs__srv__LoadMap_Response__fini(&LoadMap_res); +} + +void UROS2LoadMapSrv::SetRequest(const FROSLoadMapReq& Request) +{ + Request.SetROS2(LoadMap_req); +} + +void UROS2LoadMapSrv::GetRequest(FROSLoadMapReq& Request) const +{ + Request.SetFromROS2(LoadMap_req); +} + +void UROS2LoadMapSrv::SetResponse(const FROSLoadMapRes& Response) +{ + Response.SetROS2(LoadMap_res); +} + +void UROS2LoadMapSrv::GetResponse(FROSLoadMapRes& Response) const +{ + Response.SetFromROS2(LoadMap_res); +} + +void* UROS2LoadMapSrv::GetRequest() +{ + return &LoadMap_req; +} + +void* UROS2LoadMapSrv::GetResponse() +{ + return &LoadMap_res; +} + +FString UROS2LoadMapSrv::SrvRequestToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} + +FString UROS2LoadMapSrv::SrvResponseToString() const +{ + /* TODO: Fill here */ + checkNoEntry(); + return FString(); +} diff --git a/Source/rclUE/Private/Srvs/ROS2SelfTest.cpp b/Source/rclUE/Private/Srvs/ROS2SelfTest.cpp index 25a46325b..c81ca0759 100644 --- a/Source/rclUE/Private/Srvs/ROS2SelfTest.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SelfTest.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/srv/SelfTest.srv - do not modify #include "Srvs/ROS2SelfTest.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SetBool.cpp b/Source/rclUE/Private/Srvs/ROS2SetBool.cpp index 6fab94101..28f7357c3 100644 --- a/Source/rclUE/Private/Srvs/ROS2SetBool.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SetBool.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/SetBool.srv - do not modify #include "Srvs/ROS2SetBool.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SetCameraInfo.cpp b/Source/rclUE/Private/Srvs/ROS2SetCameraInfo.cpp index 68f1c5f16..34649e78c 100644 --- a/Source/rclUE/Private/Srvs/ROS2SetCameraInfo.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SetCameraInfo.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/srv/SetCameraInfo.srv - do not modify #include "Srvs/ROS2SetCameraInfo.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SetEntityState.cpp b/Source/rclUE/Private/Srvs/ROS2SetEntityState.cpp index f92d88e90..2eecd886e 100644 --- a/Source/rclUE/Private/Srvs/ROS2SetEntityState.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SetEntityState.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SetEntityState.srv - do not modify #include "Srvs/ROS2SetEntityState.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SetInt32.cpp b/Source/rclUE/Private/Srvs/ROS2SetInt32.cpp index cb42e9a4a..f20f22e0e 100644 --- a/Source/rclUE/Private/Srvs/ROS2SetInt32.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SetInt32.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SetInt32.srv - do not modify #include "Srvs/ROS2SetInt32.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SetMap.cpp b/Source/rclUE/Private/Srvs/ROS2SetMap.cpp index ed773a576..6930adce3 100644 --- a/Source/rclUE/Private/Srvs/ROS2SetMap.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SetMap.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/SetMap.srv - do not modify #include "Srvs/ROS2SetMap.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SpawnEntities.cpp b/Source/rclUE/Private/Srvs/ROS2SpawnEntities.cpp index a2ea9b8aa..f52c1fd34 100644 --- a/Source/rclUE/Private/Srvs/ROS2SpawnEntities.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SpawnEntities.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnEntities.srv - do not modify #include "Srvs/ROS2SpawnEntities.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SpawnEntity.cpp b/Source/rclUE/Private/Srvs/ROS2SpawnEntity.cpp index 9080346a3..19015eccf 100644 --- a/Source/rclUE/Private/Srvs/ROS2SpawnEntity.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SpawnEntity.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnEntity.srv - do not modify #include "Srvs/ROS2SpawnEntity.h" diff --git a/Source/rclUE/Private/Srvs/ROS2SpawnWorld.cpp b/Source/rclUE/Private/Srvs/ROS2SpawnWorld.cpp index a0aeed056..70ee5fcf7 100644 --- a/Source/rclUE/Private/Srvs/ROS2SpawnWorld.cpp +++ b/Source/rclUE/Private/Srvs/ROS2SpawnWorld.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnWorld.srv - do not modify #include "Srvs/ROS2SpawnWorld.h" diff --git a/Source/rclUE/Private/Srvs/ROS2StdSrvEmpty.cpp b/Source/rclUE/Private/Srvs/ROS2StdSrvEmpty.cpp index 2a99dc43e..74268ad95 100644 --- a/Source/rclUE/Private/Srvs/ROS2StdSrvEmpty.cpp +++ b/Source/rclUE/Private/Srvs/ROS2StdSrvEmpty.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/Empty.srv - do not modify #include "Srvs/ROS2StdSrvEmpty.h" diff --git a/Source/rclUE/Private/Srvs/ROS2StdSrvSetBool.cpp b/Source/rclUE/Private/Srvs/ROS2StdSrvSetBool.cpp index ab3679cb4..3a2ea069e 100644 --- a/Source/rclUE/Private/Srvs/ROS2StdSrvSetBool.cpp +++ b/Source/rclUE/Private/Srvs/ROS2StdSrvSetBool.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/SetBool.srv - do not modify #include "Srvs/ROS2StdSrvSetBool.h" diff --git a/Source/rclUE/Private/Srvs/ROS2StdSrvTrigger.cpp b/Source/rclUE/Private/Srvs/ROS2StdSrvTrigger.cpp index 5a4ed8e1e..03c003142 100644 --- a/Source/rclUE/Private/Srvs/ROS2StdSrvTrigger.cpp +++ b/Source/rclUE/Private/Srvs/ROS2StdSrvTrigger.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/Trigger.srv - do not modify #include "Srvs/ROS2StdSrvTrigger.h" diff --git a/Source/rclUE/Private/Srvs/ROS2Trigger.cpp b/Source/rclUE/Private/Srvs/ROS2Trigger.cpp index 163a9bbe2..672394a0e 100644 --- a/Source/rclUE/Private/Srvs/ROS2Trigger.cpp +++ b/Source/rclUE/Private/Srvs/ROS2Trigger.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/Trigger.srv - do not modify #include "Srvs/ROS2Trigger.h" diff --git a/Source/rclUE/Private/Srvs/ROS2UpdateFilename.cpp b/Source/rclUE/Private/Srvs/ROS2UpdateFilename.cpp index c922e291c..26035d97e 100644 --- a/Source/rclUE/Private/Srvs/ROS2UpdateFilename.cpp +++ b/Source/rclUE/Private/Srvs/ROS2UpdateFilename.cpp @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/srv/UpdateFilename.srv - do not modify #include "Srvs/ROS2UpdateFilename.h" diff --git a/Source/rclUE/Public/Actions/ROS2Fibonacci.h b/Source/rclUE/Public/Actions/ROS2Fibonacci.h index df2672d50..d11d33159 100644 --- a/Source/rclUE/Public/Actions/ROS2Fibonacci.h +++ b/Source/rclUE/Public/Actions/ROS2Fibonacci.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/action/Fibonacci.action - do not modify #pragma once @@ -28,7 +28,7 @@ struct RCLUE_API FROSFibonacciSGReq GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; UPROPERTY(EditAnywhere, BlueprintReadWrite) int Order = 0; @@ -90,7 +90,7 @@ struct RCLUE_API FROSFibonacciGRReq GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; FROSFibonacciGRReq() { @@ -145,7 +145,7 @@ struct RCLUE_API FROSFibonacciGRRes } if (!rosidl_runtime_c__int32__Sequence__init(&out_ros_data.result.sequence, Sequence.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.result.sequence ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.result.sequence ")); } UROS2Utils::ArrayUEToROSSequence(Sequence, out_ros_data.result.sequence.data, Sequence.Num()); } @@ -157,7 +157,7 @@ struct RCLUE_API FROSFibonacciFB GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Sequence; @@ -191,7 +191,7 @@ struct RCLUE_API FROSFibonacciFB } if (!rosidl_runtime_c__int32__Sequence__init(&out_ros_data.feedback.sequence, Sequence.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.feedback.sequence ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.feedback.sequence ")); } UROS2Utils::ArrayUEToROSSequence(Sequence, out_ros_data.feedback.sequence.data, Sequence.Num()); } diff --git a/Source/rclUE/Public/Actions/ROS2GenericAction.h b/Source/rclUE/Public/Actions/ROS2GenericAction.h index ae733a04d..3d7a501f3 100644 --- a/Source/rclUE/Public/Actions/ROS2GenericAction.h +++ b/Source/rclUE/Public/Actions/ROS2GenericAction.h @@ -3,12 +3,13 @@ * @brief This should be refactored with other generic ROS2 types (Msgs, Sensors, Actions). * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not bottlenecks and control flow inside them should be fine) * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. - * + * */ #pragma once -#include #include "rclcUtilities.h" + +#include #include #include "ROS2GenericAction.generated.h" @@ -20,36 +21,42 @@ UCLASS(Blueprintable) class RCLUE_API UROS2GenericAction : public UObject { - GENERATED_BODY() - + GENERATED_BODY() + public: - UFUNCTION(BlueprintCallable) - virtual void Init(); - - UFUNCTION(BlueprintCallable) - virtual void Fini(); - - virtual void* GetGoalRequest(); - virtual void* GetGoalResponse(); - virtual void* GetResultRequest(); - virtual void* GetResultResponse(); - virtual void* GetFeedbackMessage(); - - void* GetCancelRequest(); - void* GetCancelResponse(); - - virtual const rosidl_action_type_support_t* GetTypeSupport() const; - - UFUNCTION(BlueprintCallable) - virtual const FString ActionGoalToString() const; - - UFUNCTION(BlueprintCallable) - virtual const FString ActionResultToString() const; - - UFUNCTION(BlueprintCallable) - virtual const FString ActionFeedbackToString() const; + UFUNCTION(BlueprintCallable) + virtual void Init(); + + UFUNCTION(BlueprintCallable) + virtual void Fini(); + + virtual void* GetGoalRequest(); + virtual void* GetGoalResponse(); + virtual void* GetResultRequest(); + virtual void* GetResultResponse(); + virtual void* GetFeedbackMessage(); + + void* GetCancelRequest(); + void* GetCancelResponse(); + + virtual const rosidl_action_type_support_t* GetTypeSupport() const; + + UFUNCTION(BlueprintCallable) + virtual const FString ActionGoalToString() const; + + UFUNCTION(BlueprintCallable) + virtual const FString ActionResultToString() const; + + UFUNCTION(BlueprintCallable) + virtual const FString ActionFeedbackToString() const; + + UFUNCTION(BlueprintCallable) + int GetCancelResponseReturnCode() + { + return cancel_response.return_code; + } private: - action_msgs__srv__CancelGoal_Request cancel_request; - action_msgs__srv__CancelGoal_Response cancel_response; + action_msgs__srv__CancelGoal_Request cancel_request; + action_msgs__srv__CancelGoal_Response cancel_response; }; diff --git a/Source/rclUE/Public/Actions/ROS2LookupTF.h b/Source/rclUE/Public/Actions/ROS2LookupTF.h index 07d49ed7c..42a62b2ab 100644 --- a/Source/rclUE/Public/Actions/ROS2LookupTF.h +++ b/Source/rclUE/Public/Actions/ROS2LookupTF.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/action/LookupTransform.action - do not modify #pragma once @@ -30,7 +30,7 @@ struct RCLUE_API FROSLookupTFSGReq GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; UPROPERTY(EditAnywhere, BlueprintReadWrite) FString TargetFrame; @@ -134,7 +134,7 @@ struct RCLUE_API FROSLookupTFGRReq GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; FROSLookupTFGRReq() { @@ -200,7 +200,7 @@ struct RCLUE_API FROSLookupTFFB GENERATED_BODY() public: - TArray> GoalId; + TArray> GoalId; FROSLookupTFFB() { diff --git a/Source/rclUE/Public/Msgs/ROS2Acc.h b/Source/rclUE/Public/Msgs/ROS2Acc.h index aa4ac2051..4bc08cebd 100644 --- a/Source/rclUE/Public/Msgs/ROS2Acc.h +++ b/Source/rclUE/Public/Msgs/ROS2Acc.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Accel.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2AccCov.h b/Source/rclUE/Public/Msgs/ROS2AccCov.h index c3f9d067e..0c9b9eee2 100644 --- a/Source/rclUE/Public/Msgs/ROS2AccCov.h +++ b/Source/rclUE/Public/Msgs/ROS2AccCov.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelWithCovariance.msg - do not modify #pragma once @@ -29,7 +29,7 @@ struct RCLUE_API FROSAccCov UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSAcc Accel; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Covariance; FROSAccCov() diff --git a/Source/rclUE/Public/Msgs/ROS2AccCovStamped.h b/Source/rclUE/Public/Msgs/ROS2AccCovStamped.h index 81c4bd6c2..d8c3270a4 100644 --- a/Source/rclUE/Public/Msgs/ROS2AccCovStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2AccCovStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelWithCovarianceStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2AccStamped.h b/Source/rclUE/Public/Msgs/ROS2AccStamped.h index e58713424..2c130145a 100644 --- a/Source/rclUE/Public/Msgs/ROS2AccStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2AccStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/AccelStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2BatteryState.h b/Source/rclUE/Public/Msgs/ROS2BatteryState.h index 86e8e97d8..ddb6a1a68 100644 --- a/Source/rclUE/Public/Msgs/ROS2BatteryState.h +++ b/Source/rclUE/Public/Msgs/ROS2BatteryState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/BatteryState.msg - do not modify #pragma once @@ -168,7 +168,7 @@ struct RCLUE_API FROSBatteryState } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.cell_voltage, CellVoltage.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cell_voltage ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cell_voltage ")); } UROS2Utils::ArrayUEToROSSequence(CellVoltage, out_ros_data.cell_voltage.data, CellVoltage.Num()); @@ -178,7 +178,7 @@ struct RCLUE_API FROSBatteryState } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.cell_temperature, CellTemperature.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cell_temperature ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cell_temperature ")); } UROS2Utils::ArrayUEToROSSequence(CellTemperature, out_ros_data.cell_temperature.data, CellTemperature.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2Bool.h b/Source/rclUE/Public/Msgs/ROS2Bool.h index 0e7179f63..e08e12612 100644 --- a/Source/rclUE/Public/Msgs/ROS2Bool.h +++ b/Source/rclUE/Public/Msgs/ROS2Bool.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Bool.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Byte.h b/Source/rclUE/Public/Msgs/ROS2Byte.h index c60824ea3..4adb238cc 100644 --- a/Source/rclUE/Public/Msgs/ROS2Byte.h +++ b/Source/rclUE/Public/Msgs/ROS2Byte.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Byte.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2ByteMA.h b/Source/rclUE/Public/Msgs/ROS2ByteMA.h index 6fe017767..c690b6944 100644 --- a/Source/rclUE/Public/Msgs/ROS2ByteMA.h +++ b/Source/rclUE/Public/Msgs/ROS2ByteMA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/ByteMultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSByteMA } if (!rosidl_runtime_c__byte__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2CameraInfo.h b/Source/rclUE/Public/Msgs/ROS2CameraInfo.h index 9b4df8f27..6419b22c9 100644 --- a/Source/rclUE/Public/Msgs/ROS2CameraInfo.h +++ b/Source/rclUE/Public/Msgs/ROS2CameraInfo.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/CameraInfo.msg - do not modify #pragma once @@ -39,16 +39,16 @@ struct RCLUE_API FROSCameraInfo UPROPERTY(EditAnywhere, BlueprintReadWrite) FString DistortionModel; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray D; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray K; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray R; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray P; UPROPERTY(EditAnywhere) @@ -110,7 +110,7 @@ struct RCLUE_API FROSCameraInfo } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.d, D.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.d ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.d ")); } UROS2Utils::ArrayUEToROSSequence(D, out_ros_data.d.data, D.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2ChannelFloat32.h b/Source/rclUE/Public/Msgs/ROS2ChannelFloat32.h index 8423bfd4b..4edb42e67 100644 --- a/Source/rclUE/Public/Msgs/ROS2ChannelFloat32.h +++ b/Source/rclUE/Public/Msgs/ROS2ChannelFloat32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/ChannelFloat32.msg - do not modify #pragma once @@ -52,7 +52,7 @@ struct RCLUE_API FROSChannelFloat32 } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.values, Values.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); } UROS2Utils::ArrayUEToROSSequence(Values, out_ros_data.values.data, Values.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Char.h b/Source/rclUE/Public/Msgs/ROS2Char.h index 07db1ecf7..791311010 100644 --- a/Source/rclUE/Public/Msgs/ROS2Char.h +++ b/Source/rclUE/Public/Msgs/ROS2Char.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Char.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Clock.h b/Source/rclUE/Public/Msgs/ROS2Clock.h index 1f30cc4f3..568cb473b 100644 --- a/Source/rclUE/Public/Msgs/ROS2Clock.h +++ b/Source/rclUE/Public/Msgs/ROS2Clock.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from rosgraph_msgs/msg/Clock.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2ColorRGBA.h b/Source/rclUE/Public/Msgs/ROS2ColorRGBA.h index 4fc69c7ab..07d7595fb 100644 --- a/Source/rclUE/Public/Msgs/ROS2ColorRGBA.h +++ b/Source/rclUE/Public/Msgs/ROS2ColorRGBA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_msgs/msg/ColorRGBA.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2CompImg.h b/Source/rclUE/Public/Msgs/ROS2CompImg.h index 0cf0df5f4..85537631e 100644 --- a/Source/rclUE/Public/Msgs/ROS2CompImg.h +++ b/Source/rclUE/Public/Msgs/ROS2CompImg.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/CompressedImage.msg - do not modify #pragma once @@ -60,7 +60,7 @@ struct RCLUE_API FROSCompImg } if (!rosidl_runtime_c__uint8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2DiagnosticArray.h b/Source/rclUE/Public/Msgs/ROS2DiagnosticArray.h index 848a9fdd6..5ee92e04c 100644 --- a/Source/rclUE/Public/Msgs/ROS2DiagnosticArray.h +++ b/Source/rclUE/Public/Msgs/ROS2DiagnosticArray.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/DiagnosticArray.msg - do not modify #pragma once @@ -55,7 +55,7 @@ struct RCLUE_API FROSDiagnosticArray } if (!diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(&out_ros_data.status, Status.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status ")); } UROS2Utils::ArrayUEToROSSequence( Status, out_ros_data.status.data, Status.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2DiagnosticStatus.h b/Source/rclUE/Public/Msgs/ROS2DiagnosticStatus.h index 27a7c86cc..758a20446 100644 --- a/Source/rclUE/Public/Msgs/ROS2DiagnosticStatus.h +++ b/Source/rclUE/Public/Msgs/ROS2DiagnosticStatus.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/DiagnosticStatus.msg - do not modify #pragma once @@ -80,7 +80,7 @@ struct RCLUE_API FROSDiagnosticStatus } if (!diagnostic_msgs__msg__KeyValue__Sequence__init(&out_ros_data.values, Values.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); } UROS2Utils::ArrayUEToROSSequence( Values, out_ros_data.values.data, Values.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2DisparityImg.h b/Source/rclUE/Public/Msgs/ROS2DisparityImg.h index 2e7f6ba15..77422f139 100644 --- a/Source/rclUE/Public/Msgs/ROS2DisparityImg.h +++ b/Source/rclUE/Public/Msgs/ROS2DisparityImg.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from stereo_msgs/msg/DisparityImage.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Duration.h b/Source/rclUE/Public/Msgs/ROS2Duration.h index 5aa5470ff..cea92787d 100644 --- a/Source/rclUE/Public/Msgs/ROS2Duration.h +++ b/Source/rclUE/Public/Msgs/ROS2Duration.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from builtin_interfaces/msg/Duration.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Empty.h b/Source/rclUE/Public/Msgs/ROS2Empty.h index 636b3ae74..ba289866e 100644 --- a/Source/rclUE/Public/Msgs/ROS2Empty.h +++ b/Source/rclUE/Public/Msgs/ROS2Empty.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Empty.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2EntityState.h b/Source/rclUE/Public/Msgs/ROS2EntityState.h index f9c258e9e..d9426cad2 100644 --- a/Source/rclUE/Public/Msgs/ROS2EntityState.h +++ b/Source/rclUE/Public/Msgs/ROS2EntityState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/msg/EntityState.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Float32.h b/Source/rclUE/Public/Msgs/ROS2Float32.h index f57e459d6..d612c8c2b 100644 --- a/Source/rclUE/Public/Msgs/ROS2Float32.h +++ b/Source/rclUE/Public/Msgs/ROS2Float32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float32.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Float32MA.h b/Source/rclUE/Public/Msgs/ROS2Float32MA.h index 58b2bf12c..5826c7ce1 100644 --- a/Source/rclUE/Public/Msgs/ROS2Float32MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Float32MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float32MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSFloat32MA } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Float64.h b/Source/rclUE/Public/Msgs/ROS2Float64.h index e42a9be21..dac71ea6a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Float64.h +++ b/Source/rclUE/Public/Msgs/ROS2Float64.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float64.msg - do not modify #pragma once @@ -24,7 +24,7 @@ struct RCLUE_API FROSFloat64 GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Data = 0.f; FROSFloat64() diff --git a/Source/rclUE/Public/Msgs/ROS2Float64MA.h b/Source/rclUE/Public/Msgs/ROS2Float64MA.h index db596ed38..fcc3a62b0 100644 --- a/Source/rclUE/Public/Msgs/ROS2Float64MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Float64MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Float64MultiArray.msg - do not modify #pragma once @@ -29,7 +29,7 @@ struct RCLUE_API FROSFloat64MA UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSMALayout Layout; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Data; FROSFloat64MA() @@ -53,7 +53,7 @@ struct RCLUE_API FROSFloat64MA } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2FluidPressure.h b/Source/rclUE/Public/Msgs/ROS2FluidPressure.h index 454f345b6..c1bc1c0ec 100644 --- a/Source/rclUE/Public/Msgs/ROS2FluidPressure.h +++ b/Source/rclUE/Public/Msgs/ROS2FluidPressure.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/FluidPressure.msg - do not modify #pragma once @@ -28,10 +28,10 @@ struct RCLUE_API FROSFluidPressure UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSHeader Header; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double FluidPressure = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Variance = 0.f; FROSFluidPressure() diff --git a/Source/rclUE/Public/Msgs/ROS2GenericMsg.h b/Source/rclUE/Public/Msgs/ROS2GenericMsg.h index 54c6654ee..03cacea7f 100644 --- a/Source/rclUE/Public/Msgs/ROS2GenericMsg.h +++ b/Source/rclUE/Public/Msgs/ROS2GenericMsg.h @@ -3,17 +3,16 @@ * @brief This should be refactored with other generic ROS2 types (Msgs, Sensors, Actions). * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not bottlenecks and control flow inside them should be fine) * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. - * + * */ #pragma once -#include #include "rclcUtilities.h" -#include "ROS2GenericMsg.generated.h" +#include -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Msg, Log, All); +#include "ROS2GenericMsg.generated.h" /** * @brief This should be refactored with other generic ROS2 types (Msgs, Sensors, Actions). @@ -22,20 +21,20 @@ DECLARE_LOG_CATEGORY_EXTERN(LogROS2Msg, Log, All); UCLASS(Blueprintable) class RCLUE_API UROS2GenericMsg : public UObject { - GENERATED_BODY() + GENERATED_BODY() - // Add interface functions to this class. This is the class that will be inherited to implement this interface. + // Add interface functions to this class. This is the class that will be inherited to implement this interface. public: - UFUNCTION(BlueprintCallable) - virtual void Init(); - - UFUNCTION(BlueprintCallable) - virtual void Fini(); - - virtual void* Get(); - - virtual const rosidl_message_type_support_t* GetTypeSupport() const; - - UFUNCTION(BlueprintCallable) - virtual FString MsgToString() const; + UFUNCTION(BlueprintCallable) + virtual void Init(); + + UFUNCTION(BlueprintCallable) + virtual void Fini(); + + virtual void* Get(); + + virtual const rosidl_message_type_support_t* GetTypeSupport() const; + + UFUNCTION(BlueprintCallable) + virtual FString MsgToString() const; }; diff --git a/Source/rclUE/Public/Msgs/ROS2GoalID.h b/Source/rclUE/Public/Msgs/ROS2GoalID.h index 6116df3eb..24c10e520 100644 --- a/Source/rclUE/Public/Msgs/ROS2GoalID.h +++ b/Source/rclUE/Public/Msgs/ROS2GoalID.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalID.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2GoalInfo.h b/Source/rclUE/Public/Msgs/ROS2GoalInfo.h index c96f91563..7382013fd 100644 --- a/Source/rclUE/Public/Msgs/ROS2GoalInfo.h +++ b/Source/rclUE/Public/Msgs/ROS2GoalInfo.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from action_msgs/msg/GoalInfo.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2GoalStatus.h b/Source/rclUE/Public/Msgs/ROS2GoalStatus.h index 933e719fc..35e70ba2f 100644 --- a/Source/rclUE/Public/Msgs/ROS2GoalStatus.h +++ b/Source/rclUE/Public/Msgs/ROS2GoalStatus.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalStatus.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2GoalStatusArray.h b/Source/rclUE/Public/Msgs/ROS2GoalStatusArray.h index 75fb01c3f..ccb860d19 100644 --- a/Source/rclUE/Public/Msgs/ROS2GoalStatusArray.h +++ b/Source/rclUE/Public/Msgs/ROS2GoalStatusArray.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from actionlib_msgs/msg/GoalStatusArray.msg - do not modify #pragma once @@ -55,7 +55,7 @@ struct RCLUE_API FROSGoalStatusArray } if (!actionlib_msgs__msg__GoalStatus__Sequence__init(&out_ros_data.status_list, StatusList.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status_list ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status_list ")); } UROS2Utils::ArrayUEToROSSequence( StatusList, out_ros_data.status_list.data, StatusList.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2GridCells.h b/Source/rclUE/Public/Msgs/ROS2GridCells.h index 796b19b33..f9be56141 100644 --- a/Source/rclUE/Public/Msgs/ROS2GridCells.h +++ b/Source/rclUE/Public/Msgs/ROS2GridCells.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/GridCells.msg - do not modify #pragma once @@ -67,7 +67,7 @@ struct RCLUE_API FROSGridCells } if (!geometry_msgs__msg__Point__Sequence__init(&out_ros_data.cells, Cells.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cells ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.cells ")); } UROS2Utils::VectorArrayUEToROSSequence(Cells, out_ros_data.cells.data, Cells.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Header.h b/Source/rclUE/Public/Msgs/ROS2Header.h index 3df83441a..f40f7d59a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Header.h +++ b/Source/rclUE/Public/Msgs/ROS2Header.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_msgs/msg/Header.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2HitEvent.h b/Source/rclUE/Public/Msgs/ROS2HitEvent.h new file mode 100644 index 000000000..6be164715 --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2HitEvent.h @@ -0,0 +1,97 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/HitEvent.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "ue_msgs/msg/hit_event.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "Msgs/ROS2HitResult.h" + +// Generated +#include "ROS2HitEvent.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSHitEvent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString SelfName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString OtherActorName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector NormalImpluse = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSHitResult HitResult; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString OtherComponentName; + + FROSHitEvent() + { + } + + void SetFromROS2(const ue_msgs__msg__HitEvent& in_ros_data) + { + SelfName = UROS2Utils::StringROSToUE(in_ros_data.self_name); + + OtherActorName = UROS2Utils::StringROSToUE(in_ros_data.other_actor_name); + + NormalImpluse = UROS2Utils::VectorROSToUE(in_ros_data.normal_impluse); + + HitResult.SetFromROS2(in_ros_data.hit_result); + + OtherComponentName = UROS2Utils::StringROSToUE(in_ros_data.other_component_name); + } + + void SetROS2(ue_msgs__msg__HitEvent& out_ros_data) const + { + UROS2Utils::StringUEToROS(SelfName, out_ros_data.self_name); + + UROS2Utils::StringUEToROS(OtherActorName, out_ros_data.other_actor_name); + + out_ros_data.normal_impluse = UROS2Utils::VectorUEToROS(NormalImpluse); + + HitResult.SetROS2(out_ros_data.hit_result); + + UROS2Utils::StringUEToROS(OtherComponentName, out_ros_data.other_component_name); + } +}; + +UCLASS() +class RCLUE_API UROS2HitEventMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSHitEvent& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSHitEvent& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + ue_msgs__msg__HitEvent hit_event_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2HitResult.h b/Source/rclUE/Public/Msgs/ROS2HitResult.h new file mode 100644 index 000000000..28f56cd4d --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2HitResult.h @@ -0,0 +1,201 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/HitResult.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "ue_msgs/msg/hit_result.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) + +// Generated +#include "ROS2HitResult.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSHitResult +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool bBlockingHit = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool bStartPenetrating = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ComponentName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ActorName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float Distance = 0.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + uint8 ElementIndex = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int FaceIndex = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString BoneName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int Item = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString MyBoneName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int MyItem = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float PenetrationDepth = 0.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString PhysicsMaterialName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float Time = 0.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector ImpactNormal = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector ImpactPoint = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector Normal = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector Location = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector TraceStart = FVector::ZeroVector; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FVector TraceEnd = FVector::ZeroVector; + + FROSHitResult() + { + } + + void SetFromROS2(const ue_msgs__msg__HitResult& in_ros_data) + { + bBlockingHit = in_ros_data.blocking_hit; + + bStartPenetrating = in_ros_data.start_penetrating; + + ComponentName = UROS2Utils::StringROSToUE(in_ros_data.component_name); + + ActorName = UROS2Utils::StringROSToUE(in_ros_data.actor_name); + + Distance = in_ros_data.distance; + + ElementIndex = in_ros_data.element_index; + + FaceIndex = in_ros_data.face_index; + + BoneName = UROS2Utils::StringROSToUE(in_ros_data.bone_name); + + Item = in_ros_data.item; + + MyBoneName = UROS2Utils::StringROSToUE(in_ros_data.my_bone_name); + + MyItem = in_ros_data.my_item; + + PenetrationDepth = in_ros_data.penetration_depth; + + PhysicsMaterialName = UROS2Utils::StringROSToUE(in_ros_data.physics_material_name); + + Time = in_ros_data.time; + + ImpactNormal = UROS2Utils::VectorROSToUE(in_ros_data.impact_normal); + + ImpactPoint = UROS2Utils::VectorROSToUE(in_ros_data.impact_point); + + Normal = UROS2Utils::VectorROSToUE(in_ros_data.normal); + + Location = UROS2Utils::VectorROSToUE(in_ros_data.location); + + TraceStart = UROS2Utils::VectorROSToUE(in_ros_data.trace_start); + + TraceEnd = UROS2Utils::VectorROSToUE(in_ros_data.trace_end); + } + + void SetROS2(ue_msgs__msg__HitResult& out_ros_data) const + { + out_ros_data.blocking_hit = bBlockingHit; + + out_ros_data.start_penetrating = bStartPenetrating; + + UROS2Utils::StringUEToROS(ComponentName, out_ros_data.component_name); + + UROS2Utils::StringUEToROS(ActorName, out_ros_data.actor_name); + + out_ros_data.distance = Distance; + + out_ros_data.element_index = ElementIndex; + + out_ros_data.face_index = FaceIndex; + + UROS2Utils::StringUEToROS(BoneName, out_ros_data.bone_name); + + out_ros_data.item = Item; + + UROS2Utils::StringUEToROS(MyBoneName, out_ros_data.my_bone_name); + + out_ros_data.my_item = MyItem; + + out_ros_data.penetration_depth = PenetrationDepth; + + UROS2Utils::StringUEToROS(PhysicsMaterialName, out_ros_data.physics_material_name); + + out_ros_data.time = Time; + + out_ros_data.impact_normal = UROS2Utils::VectorUEToROS(ImpactNormal); + + out_ros_data.impact_point = UROS2Utils::VectorUEToROS(ImpactPoint); + + out_ros_data.normal = UROS2Utils::VectorUEToROS(Normal); + + out_ros_data.location = UROS2Utils::VectorUEToROS(Location); + + out_ros_data.trace_start = UROS2Utils::VectorUEToROS(TraceStart); + + out_ros_data.trace_end = UROS2Utils::VectorUEToROS(TraceEnd); + } +}; + +UCLASS() +class RCLUE_API UROS2HitResultMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSHitResult& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSHitResult& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + ue_msgs__msg__HitResult hit_result_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2IM.h b/Source/rclUE/Public/Msgs/ROS2IM.h index 52db15ddb..01685b1c8 100644 --- a/Source/rclUE/Public/Msgs/ROS2IM.h +++ b/Source/rclUE/Public/Msgs/ROS2IM.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarker.msg - do not modify #pragma once @@ -92,7 +92,7 @@ struct RCLUE_API FROSIM } if (!visualization_msgs__msg__MenuEntry__Sequence__init(&out_ros_data.menu_entries, MenuEntries.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.menu_entries ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.menu_entries ")); } UROS2Utils::ArrayUEToROSSequence( MenuEntries, out_ros_data.menu_entries.data, MenuEntries.Num()); @@ -103,7 +103,7 @@ struct RCLUE_API FROSIM } if (!visualization_msgs__msg__InteractiveMarkerControl__Sequence__init(&out_ros_data.controls, Controls.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.controls ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.controls ")); } UROS2Utils::ArrayUEToROSSequence( Controls, out_ros_data.controls.data, Controls.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2IMCtrl.h b/Source/rclUE/Public/Msgs/ROS2IMCtrl.h index 949a29469..11a2d264f 100644 --- a/Source/rclUE/Public/Msgs/ROS2IMCtrl.h +++ b/Source/rclUE/Public/Msgs/ROS2IMCtrl.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerControl.msg - do not modify #pragma once @@ -106,7 +106,7 @@ struct RCLUE_API FROSIMCtrl } if (!visualization_msgs__msg__Marker__Sequence__init(&out_ros_data.markers, Markers.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); } UROS2Utils::ArrayUEToROSSequence( Markers, out_ros_data.markers.data, Markers.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2IMFeedback.h b/Source/rclUE/Public/Msgs/ROS2IMFeedback.h index a5f8c9ef1..ea2f79844 100644 --- a/Source/rclUE/Public/Msgs/ROS2IMFeedback.h +++ b/Source/rclUE/Public/Msgs/ROS2IMFeedback.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerFeedback.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2IMInit.h b/Source/rclUE/Public/Msgs/ROS2IMInit.h index 5c2b371a2..93722081a 100644 --- a/Source/rclUE/Public/Msgs/ROS2IMInit.h +++ b/Source/rclUE/Public/Msgs/ROS2IMInit.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerInit.msg - do not modify #pragma once @@ -61,7 +61,7 @@ struct RCLUE_API FROSIMInit } if (!visualization_msgs__msg__InteractiveMarker__Sequence__init(&out_ros_data.markers, Markers.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); } UROS2Utils::ArrayUEToROSSequence( Markers, out_ros_data.markers.data, Markers.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2IMPose.h b/Source/rclUE/Public/Msgs/ROS2IMPose.h index add756ddc..f422f3611 100644 --- a/Source/rclUE/Public/Msgs/ROS2IMPose.h +++ b/Source/rclUE/Public/Msgs/ROS2IMPose.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerPose.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2IMUpdate.h b/Source/rclUE/Public/Msgs/ROS2IMUpdate.h index b278c6784..61d08d15d 100644 --- a/Source/rclUE/Public/Msgs/ROS2IMUpdate.h +++ b/Source/rclUE/Public/Msgs/ROS2IMUpdate.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/InteractiveMarkerUpdate.msg - do not modify #pragma once @@ -85,7 +85,7 @@ struct RCLUE_API FROSIMUpdate } if (!visualization_msgs__msg__InteractiveMarker__Sequence__init(&out_ros_data.markers, Markers.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); } UROS2Utils::ArrayUEToROSSequence( Markers, out_ros_data.markers.data, Markers.Num()); @@ -96,7 +96,7 @@ struct RCLUE_API FROSIMUpdate } if (!visualization_msgs__msg__InteractiveMarkerPose__Sequence__init(&out_ros_data.poses, Poses.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); } UROS2Utils::ArrayUEToROSSequence( Poses, out_ros_data.poses.data, Poses.Num()); @@ -107,7 +107,7 @@ struct RCLUE_API FROSIMUpdate } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.erases, Erases.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.erases ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.erases ")); } UROS2Utils::StringArrayUEToROSSequence(Erases, out_ros_data.erases.data, Erases.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Illuminance.h b/Source/rclUE/Public/Msgs/ROS2Illuminance.h index 8693116fe..b0221092a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Illuminance.h +++ b/Source/rclUE/Public/Msgs/ROS2Illuminance.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Illuminance.msg - do not modify #pragma once @@ -28,10 +28,10 @@ struct RCLUE_API FROSIlluminance UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSHeader Header; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Illuminance = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Variance = 0.f; FROSIlluminance() diff --git a/Source/rclUE/Public/Msgs/ROS2Img.h b/Source/rclUE/Public/Msgs/ROS2Img.h index 73f6bda32..b34aca33a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Img.h +++ b/Source/rclUE/Public/Msgs/ROS2Img.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Image.msg - do not modify #pragma once @@ -88,7 +88,7 @@ struct RCLUE_API FROSImg } if (!rosidl_runtime_c__uint8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2ImgMarker.h b/Source/rclUE/Public/Msgs/ROS2ImgMarker.h index c573d3dcb..7cf09cce6 100644 --- a/Source/rclUE/Public/Msgs/ROS2ImgMarker.h +++ b/Source/rclUE/Public/Msgs/ROS2ImgMarker.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/ImageMarker.msg - do not modify #pragma once @@ -140,7 +140,7 @@ struct RCLUE_API FROSImgMarker } if (!geometry_msgs__msg__Point__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::VectorArrayUEToROSSequence(Points, out_ros_data.points.data, Points.Num()); @@ -150,7 +150,7 @@ struct RCLUE_API FROSImgMarker } if (!std_msgs__msg__ColorRGBA__Sequence__init(&out_ros_data.outline_colors, OutlineColors.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.outline_colors ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.outline_colors ")); } UROS2Utils::ArrayUEToROSSequence( OutlineColors, out_ros_data.outline_colors.data, OutlineColors.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2Imu.h b/Source/rclUE/Public/Msgs/ROS2Imu.h index c8aeeed7a..7650cfc94 100644 --- a/Source/rclUE/Public/Msgs/ROS2Imu.h +++ b/Source/rclUE/Public/Msgs/ROS2Imu.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Imu.msg - do not modify #pragma once @@ -32,19 +32,19 @@ struct RCLUE_API FROSImu UPROPERTY(EditAnywhere, BlueprintReadWrite) FQuat Orientation = FQuat::Identity; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray OrientationCovariance; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector AngularVelocity = FVector::ZeroVector; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray AngularVelocityCovariance; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector LinearAcceleration = FVector::ZeroVector; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray LinearAccelerationCovariance; FROSImu() diff --git a/Source/rclUE/Public/Msgs/ROS2Inertia.h b/Source/rclUE/Public/Msgs/ROS2Inertia.h index a08d17670..6dc2ae8dc 100644 --- a/Source/rclUE/Public/Msgs/ROS2Inertia.h +++ b/Source/rclUE/Public/Msgs/ROS2Inertia.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Inertia.msg - do not modify #pragma once @@ -24,28 +24,28 @@ struct RCLUE_API FROSInertia GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double M = 0.f; UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector Com = FVector::ZeroVector; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Ixx = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Ixy = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Ixz = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Iyy = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Iyz = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Izz = 0.f; FROSInertia() diff --git a/Source/rclUE/Public/Msgs/ROS2InertiaStamped.h b/Source/rclUE/Public/Msgs/ROS2InertiaStamped.h index e05d0186e..cc4ce3e5e 100644 --- a/Source/rclUE/Public/Msgs/ROS2InertiaStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2InertiaStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/InertiaStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Int16.h b/Source/rclUE/Public/Msgs/ROS2Int16.h index a65cad8f7..f51a6eb81 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int16.h +++ b/Source/rclUE/Public/Msgs/ROS2Int16.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int16.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Int16MA.h b/Source/rclUE/Public/Msgs/ROS2Int16MA.h index 05d64e9a6..5446e966d 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int16MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Int16MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int16MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSInt16MA } if (!rosidl_runtime_c__int16__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Int32.h b/Source/rclUE/Public/Msgs/ROS2Int32.h index 8c79ac83b..4cd15474f 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int32.h +++ b/Source/rclUE/Public/Msgs/ROS2Int32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int32.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Int32MA.h b/Source/rclUE/Public/Msgs/ROS2Int32MA.h index 91d9126a8..596bd5016 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int32MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Int32MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int32MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSInt32MA } if (!rosidl_runtime_c__int32__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Int64.h b/Source/rclUE/Public/Msgs/ROS2Int64.h index 7e33fce60..275ede179 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int64.h +++ b/Source/rclUE/Public/Msgs/ROS2Int64.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int64.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Int64MA.h b/Source/rclUE/Public/Msgs/ROS2Int64MA.h index f34dafbfe..2dac08b7a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int64MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Int64MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int64MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSInt64MA } if (!rosidl_runtime_c__int64__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Int8.h b/Source/rclUE/Public/Msgs/ROS2Int8.h index 32d94de62..c5157c896 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int8.h +++ b/Source/rclUE/Public/Msgs/ROS2Int8.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int8.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Int8MA.h b/Source/rclUE/Public/Msgs/ROS2Int8MA.h index 0557a70f5..f92ac3754 100644 --- a/Source/rclUE/Public/Msgs/ROS2Int8MA.h +++ b/Source/rclUE/Public/Msgs/ROS2Int8MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/Int8MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSInt8MA } if (!rosidl_runtime_c__int8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2JointState.h b/Source/rclUE/Public/Msgs/ROS2JointState.h index 9798c9d29..e47e6aa13 100644 --- a/Source/rclUE/Public/Msgs/ROS2JointState.h +++ b/Source/rclUE/Public/Msgs/ROS2JointState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JointState.msg - do not modify #pragma once @@ -33,13 +33,13 @@ struct RCLUE_API FROSJointState UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Name; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Position; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Velocity; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Effort; FROSJointState() @@ -69,7 +69,7 @@ struct RCLUE_API FROSJointState } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.name, Name.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.name ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.name ")); } UROS2Utils::StringArrayUEToROSSequence(Name, out_ros_data.name.data, Name.Num()); @@ -79,7 +79,7 @@ struct RCLUE_API FROSJointState } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.position, Position.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.position ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.position ")); } UROS2Utils::ArrayUEToROSSequence(Position, out_ros_data.position.data, Position.Num()); @@ -89,7 +89,7 @@ struct RCLUE_API FROSJointState } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.velocity, Velocity.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocity ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocity ")); } UROS2Utils::ArrayUEToROSSequence(Velocity, out_ros_data.velocity.data, Velocity.Num()); @@ -99,7 +99,7 @@ struct RCLUE_API FROSJointState } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.effort, Effort.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.effort ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.effort ")); } UROS2Utils::ArrayUEToROSSequence(Effort, out_ros_data.effort.data, Effort.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2JointTraj.h b/Source/rclUE/Public/Msgs/ROS2JointTraj.h index bca5adb96..fceaadbb6 100644 --- a/Source/rclUE/Public/Msgs/ROS2JointTraj.h +++ b/Source/rclUE/Public/Msgs/ROS2JointTraj.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/JointTrajectory.msg - do not modify #pragma once @@ -62,7 +62,7 @@ struct RCLUE_API FROSJointTraj } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.joint_names, JointNames.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); } UROS2Utils::StringArrayUEToROSSequence(JointNames, out_ros_data.joint_names.data, JointNames.Num()); @@ -72,7 +72,7 @@ struct RCLUE_API FROSJointTraj } if (!trajectory_msgs__msg__JointTrajectoryPoint__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::ArrayUEToROSSequence( Points, out_ros_data.points.data, Points.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2JointTrajPoint.h b/Source/rclUE/Public/Msgs/ROS2JointTrajPoint.h index 4be6e8bd3..e97c7086f 100644 --- a/Source/rclUE/Public/Msgs/ROS2JointTrajPoint.h +++ b/Source/rclUE/Public/Msgs/ROS2JointTrajPoint.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/JointTrajectoryPoint.msg - do not modify #pragma once @@ -26,16 +26,16 @@ struct RCLUE_API FROSJointTrajPoint GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Positions; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Velocities; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Accelerations; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Effort; UPROPERTY(EditAnywhere, BlueprintReadWrite) @@ -67,7 +67,7 @@ struct RCLUE_API FROSJointTrajPoint } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.positions, Positions.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.positions ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.positions ")); } UROS2Utils::ArrayUEToROSSequence(Positions, out_ros_data.positions.data, Positions.Num()); @@ -77,7 +77,7 @@ struct RCLUE_API FROSJointTrajPoint } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.velocities, Velocities.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocities ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocities ")); } UROS2Utils::ArrayUEToROSSequence(Velocities, out_ros_data.velocities.data, Velocities.Num()); @@ -87,7 +87,7 @@ struct RCLUE_API FROSJointTrajPoint } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.accelerations, Accelerations.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.accelerations ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.accelerations ")); } UROS2Utils::ArrayUEToROSSequence(Accelerations, out_ros_data.accelerations.data, Accelerations.Num()); @@ -97,7 +97,7 @@ struct RCLUE_API FROSJointTrajPoint } if (!rosidl_runtime_c__float64__Sequence__init(&out_ros_data.effort, Effort.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.effort ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.effort ")); } UROS2Utils::ArrayUEToROSSequence(Effort, out_ros_data.effort.data, Effort.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2Joy.h b/Source/rclUE/Public/Msgs/ROS2Joy.h index 1d22c9210..5a2b6ef32 100644 --- a/Source/rclUE/Public/Msgs/ROS2Joy.h +++ b/Source/rclUE/Public/Msgs/ROS2Joy.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Joy.msg - do not modify #pragma once @@ -58,7 +58,7 @@ struct RCLUE_API FROSJoy } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.axes, Axes.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.axes ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.axes ")); } UROS2Utils::ArrayUEToROSSequence(Axes, out_ros_data.axes.data, Axes.Num()); @@ -68,7 +68,7 @@ struct RCLUE_API FROSJoy } if (!rosidl_runtime_c__int32__Sequence__init(&out_ros_data.buttons, Buttons.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.buttons ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.buttons ")); } UROS2Utils::ArrayUEToROSSequence(Buttons, out_ros_data.buttons.data, Buttons.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2JoyFeedback.h b/Source/rclUE/Public/Msgs/ROS2JoyFeedback.h index 50443e418..20b822da0 100644 --- a/Source/rclUE/Public/Msgs/ROS2JoyFeedback.h +++ b/Source/rclUE/Public/Msgs/ROS2JoyFeedback.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JoyFeedback.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2JoyFeedbackArray.h b/Source/rclUE/Public/Msgs/ROS2JoyFeedbackArray.h index 956e4e8f0..ad324d79c 100644 --- a/Source/rclUE/Public/Msgs/ROS2JoyFeedbackArray.h +++ b/Source/rclUE/Public/Msgs/ROS2JoyFeedbackArray.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/JoyFeedbackArray.msg - do not modify #pragma once @@ -47,7 +47,7 @@ struct RCLUE_API FROSJoyFeedbackArray } if (!sensor_msgs__msg__JoyFeedback__Sequence__init(&out_ros_data.array, Array.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.array ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.array ")); } UROS2Utils::ArrayUEToROSSequence( Array, out_ros_data.array.data, Array.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2KeyValue.h b/Source/rclUE/Public/Msgs/ROS2KeyValue.h index 76dab5cbf..667d3fabf 100644 --- a/Source/rclUE/Public/Msgs/ROS2KeyValue.h +++ b/Source/rclUE/Public/Msgs/ROS2KeyValue.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/msg/KeyValue.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2LaserEcho.h b/Source/rclUE/Public/Msgs/ROS2LaserEcho.h index 2cdf5abff..f125b5aff 100644 --- a/Source/rclUE/Public/Msgs/ROS2LaserEcho.h +++ b/Source/rclUE/Public/Msgs/ROS2LaserEcho.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/LaserEcho.msg - do not modify #pragma once @@ -45,7 +45,7 @@ struct RCLUE_API FROSLaserEcho } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.echoes, Echoes.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.echoes ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.echoes ")); } UROS2Utils::ArrayUEToROSSequence(Echoes, out_ros_data.echoes.data, Echoes.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2LaserScan.h b/Source/rclUE/Public/Msgs/ROS2LaserScan.h index d51256548..494ce06de 100644 --- a/Source/rclUE/Public/Msgs/ROS2LaserScan.h +++ b/Source/rclUE/Public/Msgs/ROS2LaserScan.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/LaserScan.msg - do not modify #pragma once @@ -107,7 +107,7 @@ struct RCLUE_API FROSLaserScan } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.ranges, Ranges.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.ranges ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.ranges ")); } UROS2Utils::ArrayUEToROSSequence(Ranges, out_ros_data.ranges.data, Ranges.Num()); @@ -117,7 +117,7 @@ struct RCLUE_API FROSLaserScan } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.intensities, Intensities.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.intensities ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.intensities ")); } UROS2Utils::ArrayUEToROSSequence(Intensities, out_ros_data.intensities.data, Intensities.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2MADim.h b/Source/rclUE/Public/Msgs/ROS2MADim.h index 5a828e7a1..fed56d882 100644 --- a/Source/rclUE/Public/Msgs/ROS2MADim.h +++ b/Source/rclUE/Public/Msgs/ROS2MADim.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/MultiArrayDimension.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2MALayout.h b/Source/rclUE/Public/Msgs/ROS2MALayout.h index f4e37de63..8abdc8a3c 100644 --- a/Source/rclUE/Public/Msgs/ROS2MALayout.h +++ b/Source/rclUE/Public/Msgs/ROS2MALayout.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/MultiArrayLayout.msg - do not modify #pragma once @@ -52,7 +52,7 @@ struct RCLUE_API FROSMALayout } if (!example_interfaces__msg__MultiArrayDimension__Sequence__init(&out_ros_data.dim, Dim.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.dim ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.dim ")); } UROS2Utils::ArrayUEToROSSequence( Dim, out_ros_data.dim.data, Dim.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2MagneticField.h b/Source/rclUE/Public/Msgs/ROS2MagneticField.h index 5ff1718be..1c78c07e7 100644 --- a/Source/rclUE/Public/Msgs/ROS2MagneticField.h +++ b/Source/rclUE/Public/Msgs/ROS2MagneticField.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MagneticField.msg - do not modify #pragma once @@ -32,7 +32,7 @@ struct RCLUE_API FROSMagneticField UPROPERTY(EditAnywhere, BlueprintReadWrite) FVector MagneticField = FVector::ZeroVector; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray MagneticFieldCovariance; FROSMagneticField() diff --git a/Source/rclUE/Public/Msgs/ROS2MapMetaData.h b/Source/rclUE/Public/Msgs/ROS2MapMetaData.h index f80a97320..b9c692a56 100644 --- a/Source/rclUE/Public/Msgs/ROS2MapMetaData.h +++ b/Source/rclUE/Public/Msgs/ROS2MapMetaData.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/MapMetaData.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Marker.h b/Source/rclUE/Public/Msgs/ROS2Marker.h index b1ed8e852..5ac811f71 100644 --- a/Source/rclUE/Public/Msgs/ROS2Marker.h +++ b/Source/rclUE/Public/Msgs/ROS2Marker.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/Marker.msg - do not modify #pragma once @@ -15,11 +15,15 @@ // Generated Msg/Srv/Action(can be empty) #include "Msgs/ROS2ColorRGBA.h" +#include "Msgs/ROS2CompImg.h" #include "Msgs/ROS2Duration.h" #include "Msgs/ROS2Header.h" +#include "Msgs/ROS2MeshFile.h" #include "Msgs/ROS2Pose.h" +#include "Msgs/ROS2UVCoordinate.h" #include "geometry_msgs/msg/detail/point__functions.h" #include "std_msgs/msg/detail/color_rgba__functions.h" +#include "visualization_msgs/msg/detail/uv_coordinate__functions.h" // Generated #include "ROS2Marker.generated.h" @@ -83,12 +87,24 @@ struct RCLUE_API FROSMarker UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Colors; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TextureResource; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSCompImg Texture; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray UvCoordinates; + UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Text; UPROPERTY(EditAnywhere, BlueprintReadWrite) FString MeshResource; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSMeshFile MeshFile; + UPROPERTY(EditAnywhere, BlueprintReadWrite) bool bMeshUseEmbeddedMaterials = false; @@ -123,10 +139,19 @@ struct RCLUE_API FROSMarker UROS2Utils::SequenceROSToUEArray( in_ros_data.colors.data, Colors, in_ros_data.colors.size); + TextureResource = UROS2Utils::StringROSToUE(in_ros_data.texture_resource); + + Texture.SetFromROS2(in_ros_data.texture); + + UROS2Utils::SequenceROSToUEArray( + in_ros_data.uv_coordinates.data, UvCoordinates, in_ros_data.uv_coordinates.size); + Text = UROS2Utils::StringROSToUE(in_ros_data.text); MeshResource = UROS2Utils::StringROSToUE(in_ros_data.mesh_resource); + MeshFile.SetFromROS2(in_ros_data.mesh_file); + bMeshUseEmbeddedMaterials = in_ros_data.mesh_use_embedded_materials; } @@ -158,7 +183,7 @@ struct RCLUE_API FROSMarker } if (!geometry_msgs__msg__Point__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::VectorArrayUEToROSSequence(Points, out_ros_data.points.data, Points.Num()); @@ -168,14 +193,31 @@ struct RCLUE_API FROSMarker } if (!std_msgs__msg__ColorRGBA__Sequence__init(&out_ros_data.colors, Colors.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.colors ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.colors ")); } UROS2Utils::ArrayUEToROSSequence(Colors, out_ros_data.colors.data, Colors.Num()); + UROS2Utils::StringUEToROS(TextureResource, out_ros_data.texture_resource); + + Texture.SetROS2(out_ros_data.texture); + + if (out_ros_data.uv_coordinates.data) + { + visualization_msgs__msg__UVCoordinate__Sequence__fini(&out_ros_data.uv_coordinates); + } + if (!visualization_msgs__msg__UVCoordinate__Sequence__init(&out_ros_data.uv_coordinates, UvCoordinates.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.uv_coordinates ")); + } + UROS2Utils::ArrayUEToROSSequence( + UvCoordinates, out_ros_data.uv_coordinates.data, UvCoordinates.Num()); + UROS2Utils::StringUEToROS(Text, out_ros_data.text); UROS2Utils::StringUEToROS(MeshResource, out_ros_data.mesh_resource); + MeshFile.SetROS2(out_ros_data.mesh_file); + out_ros_data.mesh_use_embedded_materials = bMeshUseEmbeddedMaterials; } }; diff --git a/Source/rclUE/Public/Msgs/ROS2MarkerArray.h b/Source/rclUE/Public/Msgs/ROS2MarkerArray.h index 09a8b07c0..d2e5a87a0 100644 --- a/Source/rclUE/Public/Msgs/ROS2MarkerArray.h +++ b/Source/rclUE/Public/Msgs/ROS2MarkerArray.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/MarkerArray.msg - do not modify #pragma once @@ -47,7 +47,7 @@ struct RCLUE_API FROSMarkerArray } if (!visualization_msgs__msg__Marker__Sequence__init(&out_ros_data.markers, Markers.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); } UROS2Utils::ArrayUEToROSSequence( Markers, out_ros_data.markers.data, Markers.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2MenuEntry.h b/Source/rclUE/Public/Msgs/ROS2MenuEntry.h index 24927b935..babad15f0 100644 --- a/Source/rclUE/Public/Msgs/ROS2MenuEntry.h +++ b/Source/rclUE/Public/Msgs/ROS2MenuEntry.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/msg/MenuEntry.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Mesh.h b/Source/rclUE/Public/Msgs/ROS2Mesh.h index 5ab682e82..93405e15f 100644 --- a/Source/rclUE/Public/Msgs/ROS2Mesh.h +++ b/Source/rclUE/Public/Msgs/ROS2Mesh.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/Mesh.msg - do not modify #pragma once @@ -54,7 +54,7 @@ struct RCLUE_API FROSMesh } if (!shape_msgs__msg__MeshTriangle__Sequence__init(&out_ros_data.triangles, Triangles.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.triangles ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.triangles ")); } UROS2Utils::ArrayUEToROSSequence( Triangles, out_ros_data.triangles.data, Triangles.Num()); @@ -65,7 +65,7 @@ struct RCLUE_API FROSMesh } if (!geometry_msgs__msg__Point__Sequence__init(&out_ros_data.vertices, Vertices.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.vertices ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.vertices ")); } UROS2Utils::VectorArrayUEToROSSequence(Vertices, out_ros_data.vertices.data, Vertices.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2MeshFile.h b/Source/rclUE/Public/Msgs/ROS2MeshFile.h new file mode 100644 index 000000000..c826ed15e --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2MeshFile.h @@ -0,0 +1,84 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from visualization_msgs/msg/MeshFile.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "visualization_msgs/msg/mesh_file.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +// Generated +#include "ROS2MeshFile.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSMeshFile +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Filename; + + UPROPERTY(EditAnywhere) + TArray Data; + + FROSMeshFile() + { + } + + void SetFromROS2(const visualization_msgs__msg__MeshFile& in_ros_data) + { + Filename = UROS2Utils::StringROSToUE(in_ros_data.filename); + + UROS2Utils::SequenceROSToUEArray(in_ros_data.data.data, Data, in_ros_data.data.size); + } + + void SetROS2(visualization_msgs__msg__MeshFile& out_ros_data) const + { + UROS2Utils::StringUEToROS(Filename, out_ros_data.filename); + + if (out_ros_data.data.data) + { + rosidl_runtime_c__uint8__Sequence__fini(&out_ros_data.data); + } + if (!rosidl_runtime_c__uint8__Sequence__init(&out_ros_data.data, Data.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + } + UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); + } +}; + +UCLASS() +class RCLUE_API UROS2MeshFileMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSMeshFile& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSMeshFile& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + visualization_msgs__msg__MeshFile mesh_file_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2MeshTriangle.h b/Source/rclUE/Public/Msgs/ROS2MeshTriangle.h index 6e3394b10..6d3be35ab 100644 --- a/Source/rclUE/Public/Msgs/ROS2MeshTriangle.h +++ b/Source/rclUE/Public/Msgs/ROS2MeshTriangle.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/MeshTriangle.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2ModelCoefficients.h b/Source/rclUE/Public/Msgs/ROS2ModelCoefficients.h index 82a464517..37b30402e 100644 --- a/Source/rclUE/Public/Msgs/ROS2ModelCoefficients.h +++ b/Source/rclUE/Public/Msgs/ROS2ModelCoefficients.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/ModelCoefficients.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSModelCoefficients } if (!rosidl_runtime_c__float32__Sequence__init(&out_ros_data.values, Values.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.values ")); } UROS2Utils::ArrayUEToROSSequence(Values, out_ros_data.values.data, Values.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointState.h b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointState.h index 441881349..29194e4e7 100644 --- a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointState.h +++ b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MultiDOFJointState.msg - do not modify #pragma once @@ -76,7 +76,7 @@ struct RCLUE_API FROSMultiDOFJointState } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.joint_names, JointNames.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); } UROS2Utils::StringArrayUEToROSSequence(JointNames, out_ros_data.joint_names.data, JointNames.Num()); @@ -86,7 +86,7 @@ struct RCLUE_API FROSMultiDOFJointState } if (!geometry_msgs__msg__Transform__Sequence__init(&out_ros_data.transforms, Transforms.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); } UROS2Utils::TransformArrayUEToROSSequence(Transforms, out_ros_data.transforms.data, Transforms.Num()); @@ -96,7 +96,7 @@ struct RCLUE_API FROSMultiDOFJointState } if (!geometry_msgs__msg__Twist__Sequence__init(&out_ros_data.twist, Twist.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.twist ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.twist ")); } UROS2Utils::ArrayUEToROSSequence(Twist, out_ros_data.twist.data, Twist.Num()); @@ -106,7 +106,7 @@ struct RCLUE_API FROSMultiDOFJointState } if (!geometry_msgs__msg__Wrench__Sequence__init(&out_ros_data.wrench, Wrench.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.wrench ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.wrench ")); } UROS2Utils::ArrayUEToROSSequence(Wrench, out_ros_data.wrench.data, Wrench.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTraj.h b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTraj.h index 00e2d9a0b..e78cd7404 100644 --- a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTraj.h +++ b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTraj.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/MultiDOFJointTrajectory.msg - do not modify #pragma once @@ -62,7 +62,7 @@ struct RCLUE_API FROSMultiDOFJointTraj } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.joint_names, JointNames.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.joint_names ")); } UROS2Utils::StringArrayUEToROSSequence(JointNames, out_ros_data.joint_names.data, JointNames.Num()); @@ -72,7 +72,7 @@ struct RCLUE_API FROSMultiDOFJointTraj } if (!trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::ArrayUEToROSSequence( Points, out_ros_data.points.data, Points.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTrajPoint.h b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTrajPoint.h index 0d6bf0d13..5bb23238d 100644 --- a/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTrajPoint.h +++ b/Source/rclUE/Public/Msgs/ROS2MultiDOFJointTrajPoint.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from trajectory_msgs/msg/MultiDOFJointTrajectoryPoint.msg - do not modify #pragma once @@ -65,7 +65,7 @@ struct RCLUE_API FROSMultiDOFJointTrajPoint } if (!geometry_msgs__msg__Transform__Sequence__init(&out_ros_data.transforms, Transforms.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); } UROS2Utils::TransformArrayUEToROSSequence(Transforms, out_ros_data.transforms.data, Transforms.Num()); @@ -75,7 +75,7 @@ struct RCLUE_API FROSMultiDOFJointTrajPoint } if (!geometry_msgs__msg__Twist__Sequence__init(&out_ros_data.velocities, Velocities.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocities ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.velocities ")); } UROS2Utils::ArrayUEToROSSequence( Velocities, out_ros_data.velocities.data, Velocities.Num()); @@ -86,7 +86,7 @@ struct RCLUE_API FROSMultiDOFJointTrajPoint } if (!geometry_msgs__msg__Twist__Sequence__init(&out_ros_data.accelerations, Accelerations.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.accelerations ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.accelerations ")); } UROS2Utils::ArrayUEToROSSequence( Accelerations, out_ros_data.accelerations.data, Accelerations.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2MultiEchoLaserScan.h b/Source/rclUE/Public/Msgs/ROS2MultiEchoLaserScan.h index 34828e058..df04bccb2 100644 --- a/Source/rclUE/Public/Msgs/ROS2MultiEchoLaserScan.h +++ b/Source/rclUE/Public/Msgs/ROS2MultiEchoLaserScan.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/MultiEchoLaserScan.msg - do not modify #pragma once @@ -110,7 +110,7 @@ struct RCLUE_API FROSMultiEchoLaserScan } if (!sensor_msgs__msg__LaserEcho__Sequence__init(&out_ros_data.ranges, Ranges.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.ranges ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.ranges ")); } UROS2Utils::ArrayUEToROSSequence( Ranges, out_ros_data.ranges.data, Ranges.Num()); @@ -121,7 +121,7 @@ struct RCLUE_API FROSMultiEchoLaserScan } if (!sensor_msgs__msg__LaserEcho__Sequence__init(&out_ros_data.intensities, Intensities.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.intensities ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.intensities ")); } UROS2Utils::ArrayUEToROSSequence( Intensities, out_ros_data.intensities.data, Intensities.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2NavSatFix.h b/Source/rclUE/Public/Msgs/ROS2NavSatFix.h index 7c861e74e..0906c8e22 100644 --- a/Source/rclUE/Public/Msgs/ROS2NavSatFix.h +++ b/Source/rclUE/Public/Msgs/ROS2NavSatFix.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/NavSatFix.msg - do not modify #pragma once @@ -38,16 +38,16 @@ struct RCLUE_API FROSNavSatFix UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSNavSatStatus Status; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Latitude = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Longitude = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Altitude = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray PositionCovariance; UPROPERTY(EditAnywhere, BlueprintReadWrite) diff --git a/Source/rclUE/Public/Msgs/ROS2NavSatStatus.h b/Source/rclUE/Public/Msgs/ROS2NavSatStatus.h index e0f264cd1..a8f9f00b5 100644 --- a/Source/rclUE/Public/Msgs/ROS2NavSatStatus.h +++ b/Source/rclUE/Public/Msgs/ROS2NavSatStatus.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/NavSatStatus.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2OccupancyGrid.h b/Source/rclUE/Public/Msgs/ROS2OccupancyGrid.h index ff2e5de24..4769f04cf 100644 --- a/Source/rclUE/Public/Msgs/ROS2OccupancyGrid.h +++ b/Source/rclUE/Public/Msgs/ROS2OccupancyGrid.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/OccupancyGrid.msg - do not modify #pragma once @@ -61,7 +61,7 @@ struct RCLUE_API FROSOccupancyGrid } if (!rosidl_runtime_c__int8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2Odom.h b/Source/rclUE/Public/Msgs/ROS2Odom.h index a24a7a1c1..355535fa4 100644 --- a/Source/rclUE/Public/Msgs/ROS2Odom.h +++ b/Source/rclUE/Public/Msgs/ROS2Odom.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/Odometry.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2OverlapEvent.h b/Source/rclUE/Public/Msgs/ROS2OverlapEvent.h new file mode 100644 index 000000000..19b874243 --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2OverlapEvent.h @@ -0,0 +1,111 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/OverlapEvent.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "ue_msgs/msg/overlap_event.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "Msgs/ROS2HitResult.h" + +// Generated +#include "ROS2OverlapEvent.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSOverlapEvent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool bBegin = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString SelfName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString OtherActorName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString OtherComponentName; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int OtherBodyIndex = 0; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool bFromSweep = false; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSHitResult SweepResult; + + FROSOverlapEvent() + { + } + + void SetFromROS2(const ue_msgs__msg__OverlapEvent& in_ros_data) + { + bBegin = in_ros_data.begin; + + SelfName = UROS2Utils::StringROSToUE(in_ros_data.self_name); + + OtherActorName = UROS2Utils::StringROSToUE(in_ros_data.other_actor_name); + + OtherComponentName = UROS2Utils::StringROSToUE(in_ros_data.other_component_name); + + OtherBodyIndex = in_ros_data.other_body_index; + + bFromSweep = in_ros_data.from_sweep; + + SweepResult.SetFromROS2(in_ros_data.sweep_result); + } + + void SetROS2(ue_msgs__msg__OverlapEvent& out_ros_data) const + { + out_ros_data.begin = bBegin; + + UROS2Utils::StringUEToROS(SelfName, out_ros_data.self_name); + + UROS2Utils::StringUEToROS(OtherActorName, out_ros_data.other_actor_name); + + UROS2Utils::StringUEToROS(OtherComponentName, out_ros_data.other_component_name); + + out_ros_data.other_body_index = OtherBodyIndex; + + out_ros_data.from_sweep = bFromSweep; + + SweepResult.SetROS2(out_ros_data.sweep_result); + } +}; + +UCLASS() +class RCLUE_API UROS2OverlapEventMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSOverlapEvent& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSOverlapEvent& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + ue_msgs__msg__OverlapEvent overlap_event_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2OverlappingObjects.h b/Source/rclUE/Public/Msgs/ROS2OverlappingObjects.h new file mode 100644 index 000000000..78d59fa5f --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2OverlappingObjects.h @@ -0,0 +1,93 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/OverlappingObjects.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "ue_msgs/msg/overlapping_objects.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "rosidl_runtime_c/string_functions.h" + +// Generated +#include "ROS2OverlappingObjects.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSOverlappingObjects +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Actors; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Components; + + FROSOverlappingObjects() + { + } + + void SetFromROS2(const ue_msgs__msg__OverlappingObjects& in_ros_data) + { + UROS2Utils::StringSequenceROSToUEArray(in_ros_data.actors.data, Actors, in_ros_data.actors.size); + + UROS2Utils::StringSequenceROSToUEArray( + in_ros_data.components.data, Components, in_ros_data.components.size); + } + + void SetROS2(ue_msgs__msg__OverlappingObjects& out_ros_data) const + { + if (out_ros_data.actors.data) + { + rosidl_runtime_c__String__Sequence__fini(&out_ros_data.actors); + } + if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.actors, Actors.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.actors ")); + } + UROS2Utils::StringArrayUEToROSSequence(Actors, out_ros_data.actors.data, Actors.Num()); + + if (out_ros_data.components.data) + { + rosidl_runtime_c__String__Sequence__fini(&out_ros_data.components); + } + if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.components, Components.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.components ")); + } + UROS2Utils::StringArrayUEToROSSequence(Components, out_ros_data.components.data, Components.Num()); + } +}; + +UCLASS() +class RCLUE_API UROS2OverlappingObjectsMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSOverlappingObjects& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSOverlappingObjects& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + ue_msgs__msg__OverlappingObjects overlapping_objects_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2Overlaps.h b/Source/rclUE/Public/Msgs/ROS2Overlaps.h new file mode 100644 index 000000000..8c8709f9b --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2Overlaps.h @@ -0,0 +1,97 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from ue_msgs/msg/Overlaps.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "ue_msgs/msg/overlaps.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "Msgs/ROS2OverlappingObjects.h" +#include "rosidl_runtime_c/string_functions.h" +#include "ue_msgs/msg/detail/overlapping_objects__functions.h" + +// Generated +#include "ROS2Overlaps.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSOverlaps +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Targets; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Overlaps; + + FROSOverlaps() + { + } + + void SetFromROS2(const ue_msgs__msg__Overlaps& in_ros_data) + { + UROS2Utils::StringSequenceROSToUEArray( + in_ros_data.targets.data, Targets, in_ros_data.targets.size); + + UROS2Utils::SequenceROSToUEArray( + in_ros_data.overlaps.data, Overlaps, in_ros_data.overlaps.size); + } + + void SetROS2(ue_msgs__msg__Overlaps& out_ros_data) const + { + if (out_ros_data.targets.data) + { + rosidl_runtime_c__String__Sequence__fini(&out_ros_data.targets); + } + if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.targets, Targets.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.targets ")); + } + UROS2Utils::StringArrayUEToROSSequence(Targets, out_ros_data.targets.data, Targets.Num()); + + if (out_ros_data.overlaps.data) + { + ue_msgs__msg__OverlappingObjects__Sequence__fini(&out_ros_data.overlaps); + } + if (!ue_msgs__msg__OverlappingObjects__Sequence__init(&out_ros_data.overlaps, Overlaps.Num())) + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.overlaps ")); + } + UROS2Utils::ArrayUEToROSSequence( + Overlaps, out_ros_data.overlaps.data, Overlaps.Num()); + } +}; + +UCLASS() +class RCLUE_API UROS2OverlapsMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSOverlaps& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSOverlaps& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + ue_msgs__msg__Overlaps overlaps_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2Path.h b/Source/rclUE/Public/Msgs/ROS2Path.h index 765dbaa48..297394345 100644 --- a/Source/rclUE/Public/Msgs/ROS2Path.h +++ b/Source/rclUE/Public/Msgs/ROS2Path.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/msg/Path.msg - do not modify #pragma once @@ -55,7 +55,7 @@ struct RCLUE_API FROSPath } if (!geometry_msgs__msg__PoseStamped__Sequence__init(&out_ros_data.poses, Poses.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); } UROS2Utils::ArrayUEToROSSequence( Poses, out_ros_data.poses.data, Poses.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2Plane.h b/Source/rclUE/Public/Msgs/ROS2Plane.h index 2af5768b7..2b533d6d8 100644 --- a/Source/rclUE/Public/Msgs/ROS2Plane.h +++ b/Source/rclUE/Public/Msgs/ROS2Plane.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/Plane.msg - do not modify #pragma once @@ -25,7 +25,7 @@ struct RCLUE_API FROSPlane GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Coef; FROSPlane() diff --git a/Source/rclUE/Public/Msgs/ROS2Point.h b/Source/rclUE/Public/Msgs/ROS2Point.h index 57ac1a709..9184be4e1 100644 --- a/Source/rclUE/Public/Msgs/ROS2Point.h +++ b/Source/rclUE/Public/Msgs/ROS2Point.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Point.msg - do not modify #pragma once @@ -24,13 +24,13 @@ struct RCLUE_API FROSPoint GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double X = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Y = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Z = 0.f; FROSPoint() diff --git a/Source/rclUE/Public/Msgs/ROS2Point32.h b/Source/rclUE/Public/Msgs/ROS2Point32.h index 4a8810fec..10d27e40d 100644 --- a/Source/rclUE/Public/Msgs/ROS2Point32.h +++ b/Source/rclUE/Public/Msgs/ROS2Point32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Point32.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2PointCloud.h b/Source/rclUE/Public/Msgs/ROS2PointCloud.h index 342e7d423..8ce47bb89 100644 --- a/Source/rclUE/Public/Msgs/ROS2PointCloud.h +++ b/Source/rclUE/Public/Msgs/ROS2PointCloud.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointCloud.msg - do not modify #pragma once @@ -63,7 +63,7 @@ struct RCLUE_API FROSPointCloud } if (!geometry_msgs__msg__Point32__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::ArrayUEToROSSequence(Points, out_ros_data.points.data, Points.Num()); @@ -73,7 +73,7 @@ struct RCLUE_API FROSPointCloud } if (!sensor_msgs__msg__ChannelFloat32__Sequence__init(&out_ros_data.channels, Channels.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.channels ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.channels ")); } UROS2Utils::ArrayUEToROSSequence( Channels, out_ros_data.channels.data, Channels.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2PointCloud2.h b/Source/rclUE/Public/Msgs/ROS2PointCloud2.h index b94945649..9b67dbbe1 100644 --- a/Source/rclUE/Public/Msgs/ROS2PointCloud2.h +++ b/Source/rclUE/Public/Msgs/ROS2PointCloud2.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointCloud2.msg - do not modify #pragma once @@ -95,7 +95,7 @@ struct RCLUE_API FROSPointCloud2 } if (!sensor_msgs__msg__PointField__Sequence__init(&out_ros_data.fields, Fields.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.fields ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.fields ")); } UROS2Utils::ArrayUEToROSSequence( Fields, out_ros_data.fields.data, Fields.Num()); @@ -112,7 +112,7 @@ struct RCLUE_API FROSPointCloud2 } if (!rosidl_runtime_c__uint8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2PointField.h b/Source/rclUE/Public/Msgs/ROS2PointField.h index 12c7199f9..087ade619 100644 --- a/Source/rclUE/Public/Msgs/ROS2PointField.h +++ b/Source/rclUE/Public/Msgs/ROS2PointField.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/PointField.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2PointIndices.h b/Source/rclUE/Public/Msgs/ROS2PointIndices.h index d18279041..329427826 100644 --- a/Source/rclUE/Public/Msgs/ROS2PointIndices.h +++ b/Source/rclUE/Public/Msgs/ROS2PointIndices.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/PointIndices.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSPointIndices } if (!rosidl_runtime_c__int32__Sequence__init(&out_ros_data.indices, Indices.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.indices ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.indices ")); } UROS2Utils::ArrayUEToROSSequence(Indices, out_ros_data.indices.data, Indices.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2PointStamped.h b/Source/rclUE/Public/Msgs/ROS2PointStamped.h index ac893472f..88ca3a4a3 100644 --- a/Source/rclUE/Public/Msgs/ROS2PointStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2PointStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PointStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Polygon.h b/Source/rclUE/Public/Msgs/ROS2Polygon.h index 5a9c802c9..096e04171 100644 --- a/Source/rclUE/Public/Msgs/ROS2Polygon.h +++ b/Source/rclUE/Public/Msgs/ROS2Polygon.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Polygon.msg - do not modify #pragma once @@ -47,7 +47,7 @@ struct RCLUE_API FROSPolygon } if (!geometry_msgs__msg__Point32__Sequence__init(&out_ros_data.points, Points.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.points ")); } UROS2Utils::ArrayUEToROSSequence(Points, out_ros_data.points.data, Points.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2PolygonMesh.h b/Source/rclUE/Public/Msgs/ROS2PolygonMesh.h index 3e22be50e..a47bf1fa3 100644 --- a/Source/rclUE/Public/Msgs/ROS2PolygonMesh.h +++ b/Source/rclUE/Public/Msgs/ROS2PolygonMesh.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/PolygonMesh.msg - do not modify #pragma once @@ -63,7 +63,7 @@ struct RCLUE_API FROSPolygonMesh } if (!pcl_msgs__msg__Vertices__Sequence__init(&out_ros_data.polygons, Polygons.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.polygons ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.polygons ")); } UROS2Utils::ArrayUEToROSSequence( Polygons, out_ros_data.polygons.data, Polygons.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2PolygonStamped.h b/Source/rclUE/Public/Msgs/ROS2PolygonStamped.h index 93ba98011..ffd1c15fc 100644 --- a/Source/rclUE/Public/Msgs/ROS2PolygonStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2PolygonStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PolygonStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Pose.h b/Source/rclUE/Public/Msgs/ROS2Pose.h index 436150b44..7a03e1c3d 100644 --- a/Source/rclUE/Public/Msgs/ROS2Pose.h +++ b/Source/rclUE/Public/Msgs/ROS2Pose.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Pose.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Pose2D.h b/Source/rclUE/Public/Msgs/ROS2Pose2D.h index db0291fca..5f73aa488 100644 --- a/Source/rclUE/Public/Msgs/ROS2Pose2D.h +++ b/Source/rclUE/Public/Msgs/ROS2Pose2D.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Pose2D.msg - do not modify #pragma once @@ -24,13 +24,13 @@ struct RCLUE_API FROSPose2D GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double X = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Y = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Theta = 0.f; FROSPose2D() diff --git a/Source/rclUE/Public/Msgs/ROS2PoseArray.h b/Source/rclUE/Public/Msgs/ROS2PoseArray.h index ac436cfff..4a1336fa2 100644 --- a/Source/rclUE/Public/Msgs/ROS2PoseArray.h +++ b/Source/rclUE/Public/Msgs/ROS2PoseArray.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseArray.msg - do not modify #pragma once @@ -54,7 +54,7 @@ struct RCLUE_API FROSPoseArray } if (!geometry_msgs__msg__Pose__Sequence__init(&out_ros_data.poses, Poses.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.poses ")); } UROS2Utils::ArrayUEToROSSequence(Poses, out_ros_data.poses.data, Poses.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2PoseCov.h b/Source/rclUE/Public/Msgs/ROS2PoseCov.h index 2efcc729c..de1eec5eb 100644 --- a/Source/rclUE/Public/Msgs/ROS2PoseCov.h +++ b/Source/rclUE/Public/Msgs/ROS2PoseCov.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseWithCovariance.msg - do not modify #pragma once @@ -29,7 +29,7 @@ struct RCLUE_API FROSPoseCov UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSPose Pose; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Covariance; FROSPoseCov() diff --git a/Source/rclUE/Public/Msgs/ROS2PoseCovStamped.h b/Source/rclUE/Public/Msgs/ROS2PoseCovStamped.h index 5b2f0cd5b..8faaf87c1 100644 --- a/Source/rclUE/Public/Msgs/ROS2PoseCovStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2PoseCovStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseWithCovarianceStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2PoseStamped.h b/Source/rclUE/Public/Msgs/ROS2PoseStamped.h index b82515808..0d6a38895 100644 --- a/Source/rclUE/Public/Msgs/ROS2PoseStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2PoseStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/PoseStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Quat.h b/Source/rclUE/Public/Msgs/ROS2Quat.h index 0ae696e4c..dc7dbfd04 100644 --- a/Source/rclUE/Public/Msgs/ROS2Quat.h +++ b/Source/rclUE/Public/Msgs/ROS2Quat.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Quaternion.msg - do not modify #pragma once @@ -24,16 +24,16 @@ struct RCLUE_API FROSQuat GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double X = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Y = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Z = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double W = 0.f; FROSQuat() diff --git a/Source/rclUE/Public/Msgs/ROS2QuatStamped.h b/Source/rclUE/Public/Msgs/ROS2QuatStamped.h index f42b407dd..5e644137c 100644 --- a/Source/rclUE/Public/Msgs/ROS2QuatStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2QuatStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/QuaternionStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Range.h b/Source/rclUE/Public/Msgs/ROS2Range.h index cd67ed0c0..63fbf193b 100644 --- a/Source/rclUE/Public/Msgs/ROS2Range.h +++ b/Source/rclUE/Public/Msgs/ROS2Range.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Range.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2RegionOfInterest.h b/Source/rclUE/Public/Msgs/ROS2RegionOfInterest.h index 853674c2e..6a597097e 100644 --- a/Source/rclUE/Public/Msgs/ROS2RegionOfInterest.h +++ b/Source/rclUE/Public/Msgs/ROS2RegionOfInterest.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/RegionOfInterest.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2RelativeHumidity.h b/Source/rclUE/Public/Msgs/ROS2RelativeHumidity.h index 0ed515f60..eba0505a2 100644 --- a/Source/rclUE/Public/Msgs/ROS2RelativeHumidity.h +++ b/Source/rclUE/Public/Msgs/ROS2RelativeHumidity.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/RelativeHumidity.msg - do not modify #pragma once @@ -28,10 +28,10 @@ struct RCLUE_API FROSRelativeHumidity UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSHeader Header; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double RelativeHumidity = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Variance = 0.f; FROSRelativeHumidity() diff --git a/Source/rclUE/Public/Msgs/ROS2SolidPrimitive.h b/Source/rclUE/Public/Msgs/ROS2SolidPrimitive.h index d21635ef6..6994a188b 100644 --- a/Source/rclUE/Public/Msgs/ROS2SolidPrimitive.h +++ b/Source/rclUE/Public/Msgs/ROS2SolidPrimitive.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from shape_msgs/msg/SolidPrimitive.msg - do not modify #pragma once @@ -14,6 +14,7 @@ #include "rclcUtilities.h" // Generated Msg/Srv/Action(can be empty) +#include "Msgs/ROS2Polygon.h" #include "rosidl_runtime_c/primitives_sequence_functions.h" // Generated @@ -29,6 +30,7 @@ struct RCLUE_API FROSSolidPrimitive static constexpr uint8 SPHERE = 2; static constexpr uint8 CYLINDER = 3; static constexpr uint8 CONE = 4; + static constexpr uint8 PRISM = 5; static constexpr uint8 BOX_X = 0; static constexpr uint8 BOX_Y = 1; static constexpr uint8 BOX_Z = 2; @@ -37,13 +39,17 @@ struct RCLUE_API FROSSolidPrimitive static constexpr uint8 CYLINDER_RADIUS = 1; static constexpr uint8 CONE_HEIGHT = 0; static constexpr uint8 CONE_RADIUS = 1; + static constexpr uint8 PRISM_HEIGHT = 0; UPROPERTY(EditAnywhere, BlueprintReadWrite) uint8 Type = 0; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Dimensions; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSPolygon Polygon; + FROSSolidPrimitive() { Dimensions.SetNumZeroed(3); @@ -54,6 +60,8 @@ struct RCLUE_API FROSSolidPrimitive Type = in_ros_data.type; UROS2Utils::SequenceROSToUEArray(in_ros_data.dimensions.data, Dimensions, 3); + + Polygon.SetFromROS2(in_ros_data.polygon); } void SetROS2(shape_msgs__msg__SolidPrimitive& out_ros_data) const @@ -61,6 +69,8 @@ struct RCLUE_API FROSSolidPrimitive out_ros_data.type = Type; UROS2Utils::ArrayUEToROSSequence(Dimensions, out_ros_data.dimensions.data, 3); + + Polygon.SetROS2(out_ros_data.polygon); } }; @@ -104,6 +114,11 @@ class RCLUE_API UROS2SolidPrimitiveMsg : public UROS2GenericMsg return FROSSolidPrimitive::CONE; } UFUNCTION(BlueprintCallable) + static uint8 CONST_PRISM() + { + return FROSSolidPrimitive::PRISM; + } + UFUNCTION(BlueprintCallable) static uint8 CONST_BOX_X() { return FROSSolidPrimitive::BOX_X; @@ -143,6 +158,11 @@ class RCLUE_API UROS2SolidPrimitiveMsg : public UROS2GenericMsg { return FROSSolidPrimitive::CONE_RADIUS; } + UFUNCTION(BlueprintCallable) + static uint8 CONST_PRISM_HEIGHT() + { + return FROSSolidPrimitive::PRISM_HEIGHT; + } private: virtual FString MsgToString() const override; diff --git a/Source/rclUE/Public/Msgs/ROS2Str.h b/Source/rclUE/Public/Msgs/ROS2Str.h index 5243eb290..29463286e 100644 --- a/Source/rclUE/Public/Msgs/ROS2Str.h +++ b/Source/rclUE/Public/Msgs/ROS2Str.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/String.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TF.h b/Source/rclUE/Public/Msgs/ROS2TF.h index ad7a36a0c..d18aa9592 100644 --- a/Source/rclUE/Public/Msgs/ROS2TF.h +++ b/Source/rclUE/Public/Msgs/ROS2TF.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Transform.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TF2Err.h b/Source/rclUE/Public/Msgs/ROS2TF2Err.h index 5f4b35237..c6d2856d0 100644 --- a/Source/rclUE/Public/Msgs/ROS2TF2Err.h +++ b/Source/rclUE/Public/Msgs/ROS2TF2Err.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/msg/TF2Error.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TFMsg.h b/Source/rclUE/Public/Msgs/ROS2TFMsg.h index 105a64bb3..88f84f588 100644 --- a/Source/rclUE/Public/Msgs/ROS2TFMsg.h +++ b/Source/rclUE/Public/Msgs/ROS2TFMsg.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/msg/TFMessage.msg - do not modify #pragma once @@ -47,7 +47,7 @@ struct RCLUE_API FROSTFMsg } if (!geometry_msgs__msg__TransformStamped__Sequence__init(&out_ros_data.transforms, Transforms.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.transforms ")); } UROS2Utils::ArrayUEToROSSequence( Transforms, out_ros_data.transforms.data, Transforms.Num()); diff --git a/Source/rclUE/Public/Msgs/ROS2TFStamped.h b/Source/rclUE/Public/Msgs/ROS2TFStamped.h index 1b15f9166..4a1978f82 100644 --- a/Source/rclUE/Public/Msgs/ROS2TFStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2TFStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TransformStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Temperature.h b/Source/rclUE/Public/Msgs/ROS2Temperature.h index 2008cd969..e0af3a793 100644 --- a/Source/rclUE/Public/Msgs/ROS2Temperature.h +++ b/Source/rclUE/Public/Msgs/ROS2Temperature.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/Temperature.msg - do not modify #pragma once @@ -28,10 +28,10 @@ struct RCLUE_API FROSTemperature UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSHeader Header; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Temperature = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Variance = 0.f; FROSTemperature() diff --git a/Source/rclUE/Public/Msgs/ROS2Time.h b/Source/rclUE/Public/Msgs/ROS2Time.h index d29874e2f..d080baa29 100644 --- a/Source/rclUE/Public/Msgs/ROS2Time.h +++ b/Source/rclUE/Public/Msgs/ROS2Time.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from builtin_interfaces/msg/Time.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TimeReference.h b/Source/rclUE/Public/Msgs/ROS2TimeReference.h index 6d4aba105..ea9f2511b 100644 --- a/Source/rclUE/Public/Msgs/ROS2TimeReference.h +++ b/Source/rclUE/Public/Msgs/ROS2TimeReference.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/msg/TimeReference.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Twist.h b/Source/rclUE/Public/Msgs/ROS2Twist.h index c23d1bfdc..e1cdc6d1d 100644 --- a/Source/rclUE/Public/Msgs/ROS2Twist.h +++ b/Source/rclUE/Public/Msgs/ROS2Twist.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Twist.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TwistCov.h b/Source/rclUE/Public/Msgs/ROS2TwistCov.h index a34f6b2db..96040738e 100644 --- a/Source/rclUE/Public/Msgs/ROS2TwistCov.h +++ b/Source/rclUE/Public/Msgs/ROS2TwistCov.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistWithCovariance.msg - do not modify #pragma once @@ -29,7 +29,7 @@ struct RCLUE_API FROSTwistCov UPROPERTY(EditAnywhere, BlueprintReadWrite) FROSTwist Twist; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray Covariance; FROSTwistCov() diff --git a/Source/rclUE/Public/Msgs/ROS2TwistCovStamped.h b/Source/rclUE/Public/Msgs/ROS2TwistCovStamped.h index a605c2676..48d8c274b 100644 --- a/Source/rclUE/Public/Msgs/ROS2TwistCovStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2TwistCovStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistWithCovarianceStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2TwistStamped.h b/Source/rclUE/Public/Msgs/ROS2TwistStamped.h index a0eacacd0..fa978d919 100644 --- a/Source/rclUE/Public/Msgs/ROS2TwistStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2TwistStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/TwistStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UInt16.h b/Source/rclUE/Public/Msgs/ROS2UInt16.h index dd851be1d..90ee8c857 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt16.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt16.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt16.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UInt16MA.h b/Source/rclUE/Public/Msgs/ROS2UInt16MA.h index c60a5a2e5..06d79b556 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt16MA.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt16MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt16MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSUInt16MA } if (!rosidl_runtime_c__uint16__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2UInt32.h b/Source/rclUE/Public/Msgs/ROS2UInt32.h index 8e2589978..f9575a2c1 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt32.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt32.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UInt32MA.h b/Source/rclUE/Public/Msgs/ROS2UInt32MA.h index 9cd034fc5..8bd372a6a 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt32MA.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt32MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt32MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSUInt32MA } if (!rosidl_runtime_c__uint32__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2UInt64.h b/Source/rclUE/Public/Msgs/ROS2UInt64.h index d5f425719..4c2b1daca 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt64.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt64.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt64.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UInt64MA.h b/Source/rclUE/Public/Msgs/ROS2UInt64MA.h index ab2e344d9..fc9c99a74 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt64MA.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt64MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt64MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSUInt64MA } if (!rosidl_runtime_c__uint64__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2UInt8.h b/Source/rclUE/Public/Msgs/ROS2UInt8.h index ba7ac9e32..df28b4238 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt8.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt8.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt8.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UInt8MA.h b/Source/rclUE/Public/Msgs/ROS2UInt8MA.h index be3fe3cbd..2a9bedd24 100644 --- a/Source/rclUE/Public/Msgs/ROS2UInt8MA.h +++ b/Source/rclUE/Public/Msgs/ROS2UInt8MA.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/UInt8MultiArray.msg - do not modify #pragma once @@ -53,7 +53,7 @@ struct RCLUE_API FROSUInt8MA } if (!rosidl_runtime_c__uint8__Sequence__init(&out_ros_data.data, Data.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.data ")); } UROS2Utils::ArrayUEToROSSequence(Data, out_ros_data.data.data, Data.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2UUID.h b/Source/rclUE/Public/Msgs/ROS2UUID.h index ad8c0f2dc..e7029cab1 100644 --- a/Source/rclUE/Public/Msgs/ROS2UUID.h +++ b/Source/rclUE/Public/Msgs/ROS2UUID.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from unique_identifier_msgs/msg/UUID.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2UVCoordinate.h b/Source/rclUE/Public/Msgs/ROS2UVCoordinate.h new file mode 100644 index 000000000..4eab62f45 --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2UVCoordinate.h @@ -0,0 +1,75 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from visualization_msgs/msg/UVCoordinate.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "visualization_msgs/msg/uv_coordinate.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) + +// Generated +#include "ROS2UVCoordinate.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSUVCoordinate +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float U = 0.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float V = 0.f; + + FROSUVCoordinate() + { + } + + void SetFromROS2(const visualization_msgs__msg__UVCoordinate& in_ros_data) + { + U = in_ros_data.u; + + V = in_ros_data.v; + } + + void SetROS2(visualization_msgs__msg__UVCoordinate& out_ros_data) const + { + out_ros_data.u = U; + + out_ros_data.v = V; + } +}; + +UCLASS() +class RCLUE_API UROS2UVCoordinateMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSUVCoordinate& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSUVCoordinate& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + visualization_msgs__msg__UVCoordinate uv_coordinate_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2Vec3.h b/Source/rclUE/Public/Msgs/ROS2Vec3.h index d2b6793cd..c4a818b1f 100644 --- a/Source/rclUE/Public/Msgs/ROS2Vec3.h +++ b/Source/rclUE/Public/Msgs/ROS2Vec3.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Vector3.msg - do not modify #pragma once @@ -24,13 +24,13 @@ struct RCLUE_API FROSVec3 GENERATED_BODY() public: - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double X = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Y = 0.f; - UPROPERTY(EditAnywhere) + UPROPERTY(EditAnywhere, BlueprintReadWrite) double Z = 0.f; FROSVec3() diff --git a/Source/rclUE/Public/Msgs/ROS2Vec3Stamped.h b/Source/rclUE/Public/Msgs/ROS2Vec3Stamped.h index 5b27f14be..3613b3f1e 100644 --- a/Source/rclUE/Public/Msgs/ROS2Vec3Stamped.h +++ b/Source/rclUE/Public/Msgs/ROS2Vec3Stamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Vector3Stamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2VelocityStamped.h b/Source/rclUE/Public/Msgs/ROS2VelocityStamped.h new file mode 100644 index 000000000..718d996af --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROS2VelocityStamped.h @@ -0,0 +1,91 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from geometry_msgs/msg/VelocityStamped.msg - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "geometry_msgs/msg/velocity_stamped.h" + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) +#include "Msgs/ROS2Header.h" +#include "Msgs/ROS2Twist.h" + +// Generated +#include "ROS2VelocityStamped.generated.h" + +USTRUCT(Blueprintable) +struct RCLUE_API FROSVelocityStamped +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSHeader Header; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString BodyFrameId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ReferenceFrameId; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSTwist Velocity; + + FROSVelocityStamped() + { + } + + void SetFromROS2(const geometry_msgs__msg__VelocityStamped& in_ros_data) + { + Header.SetFromROS2(in_ros_data.header); + + BodyFrameId = UROS2Utils::StringROSToUE(in_ros_data.body_frame_id); + + ReferenceFrameId = UROS2Utils::StringROSToUE(in_ros_data.reference_frame_id); + + Velocity.SetFromROS2(in_ros_data.velocity); + } + + void SetROS2(geometry_msgs__msg__VelocityStamped& out_ros_data) const + { + Header.SetROS2(out_ros_data.header); + + UROS2Utils::StringUEToROS(BodyFrameId, out_ros_data.body_frame_id); + + UROS2Utils::StringUEToROS(ReferenceFrameId, out_ros_data.reference_frame_id); + + Velocity.SetROS2(out_ros_data.velocity); + } +}; + +UCLASS() +class RCLUE_API UROS2VelocityStampedMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSVelocityStamped& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSVelocityStamped& Output) const; + + virtual void* Get() override; + +private: + virtual FString MsgToString() const override; + + geometry_msgs__msg__VelocityStamped velocity_stamped_msg; +}; diff --git a/Source/rclUE/Public/Msgs/ROS2Vertices.h b/Source/rclUE/Public/Msgs/ROS2Vertices.h index 63041c9a3..3beade00a 100644 --- a/Source/rclUE/Public/Msgs/ROS2Vertices.h +++ b/Source/rclUE/Public/Msgs/ROS2Vertices.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/msg/Vertices.msg - do not modify #pragma once @@ -46,7 +46,7 @@ struct RCLUE_API FROSVertices } if (!rosidl_runtime_c__uint32__Sequence__init(&out_ros_data.vertices, Vertices.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.vertices ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.vertices ")); } UROS2Utils::ArrayUEToROSSequence(Vertices, out_ros_data.vertices.data, Vertices.Num()); } diff --git a/Source/rclUE/Public/Msgs/ROS2WStr.h b/Source/rclUE/Public/Msgs/ROS2WStr.h index a9032aa15..ede21f1ed 100644 --- a/Source/rclUE/Public/Msgs/ROS2WStr.h +++ b/Source/rclUE/Public/Msgs/ROS2WStr.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/msg/WString.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2Wrench.h b/Source/rclUE/Public/Msgs/ROS2Wrench.h index 83144e384..e2ce8a86e 100644 --- a/Source/rclUE/Public/Msgs/ROS2Wrench.h +++ b/Source/rclUE/Public/Msgs/ROS2Wrench.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/Wrench.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROS2WrenchStamped.h b/Source/rclUE/Public/Msgs/ROS2WrenchStamped.h index 6dc306ff2..b8390d79a 100644 --- a/Source/rclUE/Public/Msgs/ROS2WrenchStamped.h +++ b/Source/rclUE/Public/Msgs/ROS2WrenchStamped.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from geometry_msgs/msg/WrenchStamped.msg - do not modify #pragma once diff --git a/Source/rclUE/Public/Msgs/ROSNotification2D.h b/Source/rclUE/Public/Msgs/ROSNotification2D.h new file mode 100755 index 000000000..050ecf9e1 --- /dev/null +++ b/Source/rclUE/Public/Msgs/ROSNotification2D.h @@ -0,0 +1,90 @@ +#pragma once + +#include "CoreMinimal.h" +#include "guided_vr_interfaces/msg/notification2_d.h" +#include "Msgs/ROS2GenericMsg.h" +#include "geometry_msgs/msg/point.h" +#include "rclcUtilities.h" +#include "ROS2Time.h" +#include "ROSNotification2D.generated.h" + +USTRUCT(BlueprintType) +struct RCLUE_API FROSNotification2D +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Source; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Desc; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + uint8 Level; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSTime Stamp; // Assume you have a Blueprintable wrapper for builtin_interfaces/Time + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int32 Id; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Polygon; + + void SetROS2(guided_vr_interfaces__msg__Notification2D& OutROSData) const + { + UROS2Utils::StringUEToROS(Source, OutROSData.source.data); + UROS2Utils::StringUEToROS(Source, OutROSData.desc.data); + OutROSData.level.data = Level; + Stamp.SetROS2(OutROSData.stamp); + OutROSData.id = Id; + // Convert Polygon array + size_t sz = Polygon.Num(); + if (OutROSData.polygon.size != sz) { + geometry_msgs__msg__Point__Sequence__fini(&OutROSData.polygon); + geometry_msgs__msg__Point__Sequence__init(&OutROSData.polygon, sz); + } + for (size_t i = 0; i < sz; ++i) { + OutROSData.polygon.data[i].x = Polygon[i].X; + OutROSData.polygon.data[i].y = Polygon[i].Y; + OutROSData.polygon.data[i].z = 0.0; + } + } + + void SetFromROS2(const guided_vr_interfaces__msg__Notification2D& InROSData) + { + Source = UROS2Utils::StringROSToUE(InROSData.source.data); + Desc = UROS2Utils::StringROSToUE(InROSData.desc.data); + Level = InROSData.level.data; + Stamp.SetFromROS2(InROSData.stamp); + Id = InROSData.id; + Polygon.Empty(); + for (size_t i = 0; i < InROSData.polygon.size; ++i) { + auto& pt = InROSData.polygon.data[i]; + Polygon.Add(FVector2D(pt.x, pt.y)); + } + } +}; + +UCLASS() +class RCLUE_API UROSNotification2DMsg : public UROS2GenericMsg +{ + GENERATED_BODY() + +public: + virtual void Init() override; + virtual void Fini() override; + virtual const rosidl_message_type_support_t* GetTypeSupport() const override; + + UFUNCTION(BlueprintCallable) + void SetMsg(const FROSNotification2D& Input); + + UFUNCTION(BlueprintCallable) + void GetMsg(FROSNotification2D& Output) const; + + virtual void* Get() override; + virtual FString MsgToString() const override; + +private: + guided_vr_interfaces__msg__Notification2D Notification2D_msg; +}; \ No newline at end of file diff --git a/Source/rclUE/Public/RCLUE.h b/Source/rclUE/Public/RCLUE.h index 46a4f32e8..c83773ffa 100644 --- a/Source/rclUE/Public/RCLUE.h +++ b/Source/rclUE/Public/RCLUE.h @@ -10,9 +10,9 @@ #include /** - * @brief Unreal Engine Module class. This is used to initialize a module after + * @brief Unreal Engine Module class. This is used to initialize a module after * it's been loaded, and also to clean it up before the module is unloaded. - * @sa[Unreal Engine IModuleInterface](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Core/Modules/IModuleInterface/) + * @sa[Unreal Engine IModuleInterface](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/Modules/IModuleInterface/) */ class FRCLUEModule : public IModuleInterface { diff --git a/Source/rclUE/Public/ROS2Action.h b/Source/rclUE/Public/ROS2Action.h index bab4161f2..a68e92a1e 100644 --- a/Source/rclUE/Public/ROS2Action.h +++ b/Source/rclUE/Public/ROS2Action.h @@ -2,65 +2,85 @@ * @file ROS2Action.h * @brief Base class implementing ROS2 actions from which ActionServer and ActionClient should inherit * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. - * + * */ #pragma once -#include "ROS2Node.h" - +// UE #include #include #include +//rclUE +#include "ROS2NodeComponent.h" +#include "Srvs/ROS2CancelGoal.h" +#include "rclcUtilities.h" + #include "ROS2Action.generated.h" +DECLARE_LOG_CATEGORY_EXTERN(LogROS2Action, Log, All); + +#define IS_ACTION_INITED(InNode, InName, OutRes) \ + IS_ROS2NODE_INITED(InNode, InName, OutRes); \ + \ + if (State != UROS2State::Initialized) \ + { \ + UE_LOG_WITH_INFO( \ + LogROS2Action, Warning, TEXT("[%s] Action Client/Server is not initialized yet. Please initialize Action."), *InName); \ + OutRes = false; \ + } + /** * @brief Base class implementing ROS2 actions from which ActionServer and ActionClient should inherit * * type of action is defined by ActionClass */ -UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) -class RCLUE_API UROS2Action : public UActorComponent +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2Action : public UObject { GENERATED_BODY() public: /** - * @brief Construct a new UROS2Action object - * - */ - UROS2Action(); + * @brief Initialize action + * + * @param InROS2Node ROS2Node which this action belongs to + * @return true + * @return false + */ + virtual bool InitializeWithROS2(UROS2NodeComponent* InROS2Node); -public: /** * @brief Initialize action and action component - * - * @param QoS Quality of Service - * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + * + * @return true + * @return false */ UFUNCTION(BlueprintCallable) - void Init(const TEnumAsByte QoS); + virtual bool Init(); /** * @brief Create and Initize action - * + * + * @return true + * @return false */ UFUNCTION(BlueprintCallable) - void InitializeAction(); + virtual bool InitializeAction(); /** * @brief Destroy this actor component. - * + * */ UFUNCTION() virtual void Destroy(); /** - * @brief Determine the relevant action client functions to call. - * Should be implemented in ActionServer and ActionClient - * - * @param wait_set + * @brief Determine the relevant action functions to call. + * Should be implemented in #UROS2ActionServer and #UROS2ActionClient + * + * @param wait_set */ virtual void ProcessReady(rcl_wait_set_t* wait_set); @@ -69,27 +89,46 @@ class RCLUE_API UROS2Action : public UActorComponent //! type of action UPROPERTY(EditAnywhere, BlueprintReadWrite) - TSubclassOf ActionClass; + TSubclassOf ActionClass; //! ROS2 Action Instance UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - UROS2GenericAction* Action; + UROS2GenericAction* Action; //! ROS2Node which own this action. UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - AROS2Node* OwnerNode; + UROS2NodeComponent* OwnerNode; - //! Action state + //! Action state UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - TEnumAsByte State = UROS2State::Created; + TEnumAsByte State = UROS2State::Created; + + //! Quality of Cancel + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS CancelQoS = UROS2QoS::Services; + + //! Quality of Goal + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS GoalQoS = UROS2QoS::Services; + + //! Quality of Result + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS ResultQoS = UROS2QoS::Services; + + //! Quality of Feedback + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS FeedbackQoS = UROS2QoS::Default; protected: /** - * @brief Initialize ROS2 Action. Should be implemented in ActionServer and ActionClient - * - * @param QoS Quality of Service + * @brief Initialize ROS2 Action. Should be implemented in #UROS2ActionServer and #UROS2ActionClient + * * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) */ UFUNCTION() - virtual void InitializeActionComponent(const TEnumAsByte QoS); + virtual void InitializeActionComponent(); }; diff --git a/Source/rclUE/Public/ROS2ActionClient.h b/Source/rclUE/Public/ROS2ActionClient.h index d7d584b92..a69d7d385 100644 --- a/Source/rclUE/Public/ROS2ActionClient.h +++ b/Source/rclUE/Public/ROS2ActionClient.h @@ -10,7 +10,7 @@ #pragma once #include "ROS2Action.h" -#include "ROS2Node.h" +#include "ROS2NodeComponent.h" #include @@ -20,14 +20,37 @@ * @brief Class implementing ROS2 action clients. Wrapper class of rclc action client. Callbacks are set through the SetDelegates * method * @sa [rclc action client](https://docs.ros2.org/dashing/api/rcl_action/action__client_8h.html) - * @sa [Unreal Engine Delegates](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/) + * @sa [Unreal Engine Delegates](https://docs.unrealengine.com/5.1/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/) */ -UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) class RCLUE_API UROS2ActionClient : public UROS2Action { GENERATED_BODY() public: + /** + * @brief Create Action Client + * + * @param InOwner + * @param InActionName + * @param InActionClass + * @param InFeedbackDelegate + * @param InResultResponseDelegate + * @param InGoalResponseDelegate + * @param InCancelResponseDelegate + * @return UROS2ActionClient* + */ + static UROS2ActionClient* CreateActionClient(UObject* InOwner, + const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalResponseDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InFeedbackDelegate, + const FSimpleCallback& InCancelResponseDelegate, + const UROS2QoS InGoalQoS = UROS2QoS::Services, + const UROS2QoS InResultQoS = UROS2QoS::Services, + const UROS2QoS InFeedbackQoS = UROS2QoS::Default, + const UROS2QoS InCancelQoS = UROS2QoS::Services); /** * @brief Destroy action client from rclc * @@ -46,24 +69,47 @@ class RCLUE_API UROS2ActionClient : public UROS2Action * */ UFUNCTION(BlueprintCallable) - bool UpdateAndSendGoal(); + bool SendGoal(); + + /** + * @brief Send a goal + * + * @tparam TUEStruct + * @param InGoalData + */ + template + void SendGoal(const TUEStruct& InGoalData) + { + if (IsValid(OwnerNode) && OwnerNode->State == UROS2State::Initialized && State == UROS2State::Initialized) + { + // Update [TopicMessage] with [InMessageData] + CastChecked(Action)->SetGoalRequest(InGoalData); + + // Send [Action] + SendGoal(); + } + else + { + UE_LOG_WITH_INFO_NAMED(LogTemp, Log, TEXT("Action client or node is not yet initialized")); + } + } /** * @brief Send result request to get result with rcl_action_send_result_request * */ UFUNCTION(BlueprintCallable) - void GetResultRequest(); + void SendResultRequest(); /** * @brief Send cancel request with rcl_action_send_cancel_request * */ UFUNCTION(BlueprintCallable) - void CancelActionRequest(); + void SendCancelRequest(); /** - * @brief Set the Delegates object + * @brief Set the Delegates * * @param SetGoal * @param Feedback @@ -72,11 +118,10 @@ class RCLUE_API UROS2ActionClient : public UROS2Action * @param Cancel */ UFUNCTION(BlueprintCallable) - void SetDelegates(const FActionCallback& SetGoal, - const FActionCallback& Feedback, - const FActionCallback& Result, - const FActionCallback& GoalResponse, - const FSimpleCallback& Cancel); + void SetDelegates(const FActionCallback& InFeedbackDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InGoalResponseDelegate, + const FSimpleCallback& InCancelResponseDelegate); //! ROS2 action client from rclc rcl_action_client_t client; @@ -86,18 +131,83 @@ class RCLUE_API UROS2ActionClient : public UROS2Action rmw_request_id_t result_res_id; rmw_request_id_t cancel_res_id; - FActionCallback SetGoalDelegate; - FActionCallback FeedbackDelegate; - FActionCallback ResultDelegate; FActionCallback GoalResponseDelegate; - FSimpleCallback CancelDelegate; + FActionCallback ResultResponseDelegate; + FActionCallback FeedbackDelegate; + FSimpleCallback CancelResponseDelegate; /** * @brief Initialize ROS2 action client with rcl_action_client_init. * Set QOS for all goal, result, cancel, feedback and status * - * @param QoS Quality of Service - * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) */ - virtual void InitializeActionComponent(const TEnumAsByte QoS) override; + virtual void InitializeActionComponent() override; +}; + +/** + * @brief ROS2 Action client Component. Wrapper of #UROS2ActionClient for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ActionClientComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ActionClient* ActionClient = nullptr; + + //! this is pass to #UROS2ActionClient::ActionName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ActionName = TEXT(""); + + //! this is pass to #UROS2ActionClient::ActionClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf ActionClass; + + //! this is pass to #UROS2ActionClient::CancelQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS CancelQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionClient::GoalQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS GoalQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionClient::ResultQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS ResultQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionClient::FeedbackQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS FeedbackQoS = UROS2QoS::Default; + + FActionCallback GoalResponseDelegate; + FActionCallback ResultResponseDelegate; + FActionCallback FeedbackDelegate; + FSimpleCallback CancelResponseDelegate; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreateActionClient() + { + if (ActionClient == nullptr) + { + ActionClient = UROS2ActionClient::CreateActionClient(this, + ActionName, + ActionClass, + GoalResponseDelegate, + ResultResponseDelegate, + FeedbackDelegate, + CancelResponseDelegate, + GoalQoS, + ResultQoS, + FeedbackQoS, + CancelQoS); + } + } + + virtual void BeginPlay() override + { + DefaultCreateActionClient(); + Super::BeginPlay(); + }; }; diff --git a/Source/rclUE/Public/ROS2ActionServer.h b/Source/rclUE/Public/ROS2ActionServer.h index 0c1df10ab..b352ada17 100644 --- a/Source/rclUE/Public/ROS2ActionServer.h +++ b/Source/rclUE/Public/ROS2ActionServer.h @@ -10,27 +10,36 @@ #pragma once #include "ROS2Action.h" -#include "ROS2Node.h" +#include "ROS2NodeComponent.h" #include #include "ROS2ActionServer.generated.h" -DECLARE_DYNAMIC_DELEGATE_RetVal_OneParam(bool, FActionGoalCallback, UROS2GenericAction*, InAction /*Action*/); - /** * @brief Class implementing ROS2 action servers. Wrapper class of rclc action server. Callbacks are set through the SetDelegates * method * @sa [rclc action client](https://docs.ros2.org/dashing/api/rcl_action/action__server_8h.html) * @sa [Unreal Engine - * Delegates](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/) + * Delegates](https://docs.unrealengine.com/5.1/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/) */ -UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) class RCLUE_API UROS2ActionServer : public UROS2Action { GENERATED_BODY() public: + static UROS2ActionServer* CreateActionServer(UObject* InOwner, + const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalDelegate, + const FSimpleCallback& InResultDelegate, + const FSimpleCallback& InCancelDelegate, + const UROS2QoS InGoalQoS = UROS2QoS::Services, + const UROS2QoS InResultQoS = UROS2QoS::Services, + const UROS2QoS InFeedbackQoS = UROS2QoS::Default, + const UROS2QoS InCancelQoS = UROS2QoS::Services); + /** * @brief Destroy action server from rclc * @@ -45,48 +54,45 @@ class RCLUE_API UROS2ActionServer : public UROS2Action virtual void ProcessReady(rcl_wait_set_t* wait_set) override; /** - * @brief Send action goal response with rcl_action_send_goal_response - * + * @brief Process and send cancel response with rcl_action_process_cancel_request + * @param InReturnCode return code + * @sa [CancelGoal](https://docs.ros2.org/foxy/api/action_msgs/srv/CancelGoal.html) */ UFUNCTION(BlueprintCallable) - void SendGoalResponse(); + void ProcessAndSendCancelResponse(const int InReturnCode); /** - * @brief Process and send cancel response with rcl_action_process_cancel_request + * @brief Send action goal response with rcl_action_send_goal_response * */ UFUNCTION(BlueprintCallable) - void ProcessAndSendCancelResponse(); + void SendGoalResponse(); /** * @brief Update and send feedback with rcl_action_publish_feedback * */ UFUNCTION(BlueprintCallable) - void UpdateAndSendFeedback(); + void SendFeedback(); /** * @brief Update and send feedback with rcl_action_send_result_response * */ UFUNCTION(BlueprintCallable) - void UpdateAndSendResult(); + void SendResultResponse(); /** - * @brief Set the Delegates object + * @brief Set the Delegates * - * @param UpdateFeedback - * @param UpdateResult * @param HandleGoal * @param HandleCancel * @param HandleAccepted */ UFUNCTION(BlueprintCallable) - void SetDelegates(const FActionCallback& UpdateFeedback, - const FActionCallback& UpdateResult, - const FActionGoalCallback& HandleGoal, - const FSimpleCallback& HandleCancel, - const FSimpleCallback& HandleAccepted); + void SetDelegates(const FActionCallback& InGoalDelegate, + const FSimpleCallback& InCancelDelegate, + const FSimpleCallback& InResultDelegate); //! ROS2 action server from rclc rcl_action_server_t server; @@ -97,18 +103,80 @@ class RCLUE_API UROS2ActionServer : public UROS2Action rmw_request_id_t result_req_id; rmw_request_id_t cancel_req_id; - FActionCallback UpdateFeedbackDelegate; - FActionCallback UpdateResultDelegate; - FActionGoalCallback HandleGoalDelegate; - FSimpleCallback HandleCancelDelegate; - FSimpleCallback HandleAcceptedDelegate; + FActionCallback GoalDelegate; + FSimpleCallback ResultDelegate; + FSimpleCallback CancelDelegate; /** - * @brief Initialize ROS2 action client with rcl_action_server_init. + * @brief Initialize ROS2 action server with rcl_action_server_init. * Set QOS for all goal, result, cancel, feedback and status * - * @param QoS Quality of Service - * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) */ - virtual void InitializeActionComponent(const TEnumAsByte QoS) override; + virtual void InitializeActionComponent() override; +}; + +/** + * @brief ROS2 Action server Component. Wrapper of #UROS2ActionServer for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ActionServerComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ActionServer* ActionServer = nullptr; + + //! this is pass to #UROS2ActionServer::ActionName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ActionName = TEXT(""); + + //! this is pass to #UROS2ActionServer::ActionClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf ActionClass; + + //! this is pass to #UROS2ActionServer::CancelQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS CancelQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionServer::GoalQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS GoalQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionServer::ResultQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS ResultQoS = UROS2QoS::Services; + + //! this is pass to #UROS2ActionServer::FeedbackQoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS FeedbackQoS = UROS2QoS::Default; + + FActionCallback GoalDelegate; + FSimpleCallback ResultDelegate; + FSimpleCallback CancelDelegate; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreateActionServer() + { + if (ActionServer == nullptr) + { + ActionServer = UROS2ActionServer::CreateActionServer(this, + ActionName, + ActionClass, + GoalDelegate, + ResultDelegate, + CancelDelegate, + GoalQoS, + ResultQoS, + FeedbackQoS, + CancelQoS); + } + } + + virtual void BeginPlay() override + { + DefaultCreateActionServer(); + Super::BeginPlay(); + }; }; diff --git a/Source/rclUE/Public/ROS2Node.h b/Source/rclUE/Public/ROS2Node.h index c83f48bec..10d376571 100644 --- a/Source/rclUE/Public/ROS2Node.h +++ b/Source/rclUE/Public/ROS2Node.h @@ -18,10 +18,9 @@ #include "GameFramework/Actor.h" // rclUE -#include "Actions/ROS2GenericAction.h" -#include "Msgs/ROS2GenericMsg.h" -#include "ROS2Support.h" -#include "Srvs/ROS2GenericSrv.h" +#include "ROS2NodeComponent.h" +#include "ROS2Service.h" +#include "ROS2Subscriber.h" #include "ROS2Node.generated.h" @@ -30,41 +29,6 @@ class UROS2ServiceClient; class UROS2ActionServer; class UROS2ActionClient; -// Reminder: functions bound to delegates must be UFUNCTION -DECLARE_DYNAMIC_DELEGATE_OneParam(FSubscriptionCallback, const UROS2GenericMsg*, InMessage); -DECLARE_DYNAMIC_DELEGATE_OneParam(FServiceCallback, UROS2GenericSrv*, InService /*Service*/); -DECLARE_DYNAMIC_DELEGATE_OneParam(FActionCallback, UROS2GenericAction*, InAction /*Action*/); -DECLARE_DYNAMIC_DELEGATE(FSimpleCallback); - -/** - * @brief RR_ROS2_SUBSCRIBE_TO_TOPIC - * FSubscriptionCallback is of dynamic delegate type to be serializable for BP use - * FSubscriptionCallback::BindDynamic is a macro, instead of a function. - * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! - */ -#define RR_ROS2_SUBSCRIBE_TO_TOPIC(InROS2Node, InUserObject, InTopicName, InMsgClass, InCallback) \ - if (ensure(IsValid(InROS2Node))) \ - { \ - FSubscriptionCallback cb; \ - cb.BindDynamic(InUserObject, InCallback); \ - InROS2Node->AddSubscription(InTopicName, InMsgClass, cb); \ - } - -#define RR_ROS2_CREATE_SERVICE_CLIENT( \ - InROS2Node, InUserObject, InFullServiceName, InServiceClass, InServiceResponseCallback, OutServiceClient) \ - OutServiceClient = NewObject(InUserObject); \ - OutServiceClient->RegisterComponent(); \ - OutServiceClient->ServiceName = InFullServiceName; \ - OutServiceClient->SrvClass = InServiceClass; \ - \ - /* Bounded method will be called when receive response*/ \ - OutServiceClient->ResponseDelegate.BindDynamic(InUserObject, InServiceResponseCallback); \ - \ - /* Register service to InROS2Node*/ \ - InROS2Node->AddServiceClient(OutServiceClient); - -#define RR_ROS2_STOP_SERVICE_CLIENT(InServiceClient) InServiceClient->RevokeRequestResponseCallbacks(); - /** * @brief Helper structs which is components of the node and should register to * the node with the appropriate methods (AddSubscription). @@ -90,7 +54,7 @@ struct RCLUE_API FSubscription FSubscriptionCallback Callback; UPROPERTY(EditAnywhere, BlueprintReadWrite) - bool Ready; + bool Ready = false; }; /** @@ -121,10 +85,8 @@ struct RCLUE_API FService }; /** - * Class implementing ROS2 node. - * This class also handles tasks performed by the executor in rclc. - * Components of the node and not additional distinct entities Publishers, subscribers, services, service clients, action servers - * and action clients should register to the node with the appropriate methods (Add*). + * @brief Wrapper Actor implementation of UROS2NodeComponent. + * @deprecated Use UROS2NodeComponent instead. */ UCLASS(Blueprintable) class RCLUE_API AROS2Node : public AActor @@ -133,38 +95,18 @@ class RCLUE_API AROS2Node : public AActor public: //! A constructor. - /*! - Constructor - */ AROS2Node(); -protected: - /** - * @brief Overridable function called whenever this actor is being removed from a level - * @param EndPlayReason - * \sa [AActor::EndPlay](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/AActor/EndPlay/) - */ - virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; - public: - /** - * @brief Called every frame - * - * @param DeltaTime - * @sa [Actor - * Ticking](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/Ticking/) - */ - virtual void Tick(float DeltaTime) override; + UROS2NodeComponent* ActorComponent = nullptr; -public: /** * @brief Initilize rosnode with rclc_node_init_default - * This can't be pre-placed in AROS2Node::BeginPlay() as the order of rcl(c) instructions could be different/relevant in each of - * Child classes + * This can't be pre-placed in AROS2Node::BeginPlay() as the order of rcl(c) instructions could be different/relevant in + * each of Child classes * */ - UFUNCTION(BlueprintCallable) - void Init(); + UFUNCTION(BlueprintCallable) void Init(); rcl_node_t* GetNode(); @@ -196,7 +138,7 @@ class RCLUE_API AROS2Node : public AActor /** * @brief Create ServiceServer with rcl_service_init and add to #Services. - * + * @note Keep original arguments, instead of take ServiceServer as arg in ROS2NodeComponent. * @param ServiceName * @param SrvClass * @param Callback @@ -222,84 +164,11 @@ class RCLUE_API AROS2Node : public AActor UFUNCTION(BlueprintCallable) void AddActionServer(UROS2ActionServer* InActionServer); - //! Node state - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - TEnumAsByte State = UROS2State::Created; - UPROPERTY(EditAnywhere, BlueprintReadWrite) FString Name = TEXT("node"); UPROPERTY(EditAnywhere, BlueprintReadWrite) - FString Namespace = TEXT("ros_global"); - - //! wait_set quantities - currently unused - UPROPERTY(VisibleAnywhere, Category = "Diagnostics") - int NGuardConditions = 0; - - UPROPERTY(VisibleAnywhere, Category = "Diagnostics") - int NTimers = 0; - - UPROPERTY(VisibleAnywhere, Category = "Diagnostics") - int NEvents = 0; - -protected: - /** - * @brief method used to wait on communication and call delegates when appropriate modeled after executor + actions - * - */ - UFUNCTION() - void SpinSome(); - - rcl_wait_set_t wait_set; - - UPROPERTY() - UROS2Support* Support; - - rcl_node_t node; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray Subscriptions; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray Services; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray Publishers; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray Clients; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray ActionClients; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray ActionServers; - - UPROPERTY() - FTimerHandle TimerHandle; + FString Namespace = TEXT(""); private: - /** - * @brief based on _rclc_default_scheduling of the rclc executor. - * Called inside #SpinSome. rcl_take to get topic and execute Callback. - * - */ - UFUNCTION() - void HandleSubscriptions(); - - /** - * @brief based on _rclc_default_scheduling of the rclc executor. - * Called inside #SpinSome. rcl_take_request_with_info to get request, execute Callback and rcl_send_response to send response - * - */ - UFUNCTION() - void HandleServices(); - - /** - * @brief based on _rclc_default_scheduling of the rclc executor. - * Called inside #SpinSome. rcl_take_response_with_info to get response and execute Callback. - * - */ - UFUNCTION() - void HandleClients(); }; diff --git a/Source/rclUE/Public/ROS2NodeComponent.h b/Source/rclUE/Public/ROS2NodeComponent.h new file mode 100644 index 000000000..bdea76f28 --- /dev/null +++ b/Source/rclUE/Public/ROS2NodeComponent.h @@ -0,0 +1,748 @@ +/** + * @file ROS2NodeComponent.h + * @brief Class implementing ROS2 node. + * This class also handles tasks performed by the executor in rclc. + * Additionally, helper structs FSubscription and FService are defined here as they are considered components of the node and not + * additional distinct entities Publishers, subscribers, services, service clients, action servers and action clients should + * register to the node with the appropriate methods (Add*). + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + * + */ + +#pragma once + +// UE +#include "Components/ActorComponent.h" +#include "Containers/Map.h" +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" + +// rclUE +#include "Actions/ROS2GenericAction.h" +#include "Msgs/ROS2GenericMsg.h" +#include "ROS2Support.h" +#include "Srvs/ROS2GenericSrv.h" + +#include "ROS2NodeComponent.generated.h" + +class UROS2Publisher; +class UROS2Subscriber; +class UROS2ServiceServer; +class UROS2ServiceClient; +class UROS2ActionServer; +class UROS2ActionClient; + +DECLARE_LOG_CATEGORY_EXTERN(LogROS2Node, Log, All); + +// Reminder: functions bound to delegates must be UFUNCTION +DECLARE_DYNAMIC_DELEGATE_OneParam(FActionCallback, UROS2GenericAction*, InAction /*Action*/); +DECLARE_DYNAMIC_DELEGATE(FSimpleCallback); + +//! BP requires a custom-made callback thus it must be Dynamic +DECLARE_DYNAMIC_DELEGATE_OneParam(FSubscriptionCallback, const UROS2GenericMsg*, InMessage); +DECLARE_DYNAMIC_DELEGATE_OneParam(FTopicCallback, UROS2GenericMsg*, InTopicMessage); +DECLARE_DYNAMIC_DELEGATE_OneParam(FServiceCallback, UROS2GenericSrv*, InService /*Service*/); + +/** + * @brief Create #FTopicCallback and call #UROS2NodeComponent::CreateLoopPublisher + * FTopicCallback is of dynamic delegate type to be serializable for BP use + * FTopicCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InTopicName pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InPublisherClass pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InMsgClass pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InPubFrequency pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InCallback convert to #FTopicCallback and pass to #UROS2NodeComponent::CreateLoopPublisher + * @param OutPublisher return value of #UROS2NodeComponent::CreateLoopPublisher + */ +#define ROS2_CREATE_LOOP_PUBLISHER( \ + InROS2Node, InUserObject, InTopicName, InPublisherClass, InMsgClass, InPubFrequency, InCallback, OutPublisher) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FTopicCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + OutPublisher = InROS2Node->CreateLoopPublisher(InTopicName, InPublisherClass, InMsgClass, InPubFrequency, cb); \ + } + +/** + * @brief Create #FTopicCallback and call #UROS2NodeComponent::CreateLoopPublisher + * FTopicCallback is of dynamic delegate type to be serializable for BP use + * FTopicCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InTopicName pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InPublisherClass pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InMsgClass pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InPubFrequency pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InCallback convert to #FTopicCallback and pass to #UROS2NodeComponent::CreateLoopPublisher + * @param InQoS pass to #UROS2NodeComponent::CreateLoopPublisher + * @param OutPublisher return value of #UROS2NodeComponent::CreateLoopPublisher + * + */ +#define ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS( \ + InROS2Node, InUserObject, InTopicName, InPublisherClass, InMsgClass, InPubFrequency, InCallback, InQoS, OutPublisher) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FTopicCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + OutPublisher = InROS2Node->CreateLoopPublisher(InTopicName, InPublisherClass, InMsgClass, InPubFrequency, cb, InQoS); \ + } + +/** + * @brief Create #FsSubscriptionCallback and call #UROS2NodeComponent::CreateSubscriber + * FSubscriptionCallback is of dynamic delegate type to be serializable for BP use + * FSubscriptionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InTopicName pass to #UROS2NodeComponent::CreateSubscriber + * @param InMsgClass pass to #UROS2NodeComponent::CreateSubscriber + * @param InCallback convert to #FSubscriptionCallback and pass to #UROS2NodeComponent::CreateSubscriber + */ +#define ROS2_CREATE_SUBSCRIBER(InROS2Node, InUserObject, InTopicName, InMsgClass, InCallback) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FSubscriptionCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + InROS2Node->CreateSubscriber(InTopicName, InMsgClass, cb); \ + } + +/** + * @brief Create #FsSubscriptionCallback and call #UROS2NodeComponent::CreateSubscriberWithQoS + * FSubscriptionCallback is of dynamic delegate type to be serializable for BP use + * FSubscriptionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InTopicName pass to #UROS2NodeComponent::CreateSubscriberWithQoS + * @param InMsgClass pass to #UROS2NodeComponent::CreateSubscriberWithQoS + * @param InCallback convert to #FSubscriptionCallback and pass to #UROS2NodeComponent::CreateSubscriber + * @param InQoS pass to #UROS2NodeComponent::CreateSubscriber + */ +#define ROS2_CREATE_SUBSCRIBERW_WITH_QOS(InROS2Node, InUserObject, InTopicName, InMsgClass, InCallback, InQoS) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FSubscriptionCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + InROS2Node->CreateSubscriber(InTopicName, InMsgClass, cb, InQoS); \ + } + +/** + * @brief Create #FServiceCallback and call #UROS2NodeComponent::CreateServiceClient + * FServiceCallback is of dynamic delegate type to be serializable for BP use + * FServiceCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InServiceName pass to #UROS2NodeComponent::CreateServiceClient + * @param InSrvClass pass to #UROS2NodeComponent::CreateServiceClient + * @param InRequestCallback convert to #FServiceCallback and pass to #UROS2NodeComponent::CreateServiceClient + * @param OutClient return value of #UROS2NodeComponent::CreateServiceClient + */ +#define ROS2_CREATE_SERVICE_CLIENT(InROS2Node, InUserObject, InServiceName, InSrvClass, InRequestCallback, OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback req; \ + req.BindDynamic(InUserObject, InRequestCallback); \ + OutClient = InROS2Node->CreateServiceClient(InServiceName, InSrvClass, req); \ + } + +/** + * @brief Create #FServiceCallback and call #UROS2NodeComponent::CreateServiceClient + * FServiceCallback is of dynamic delegate type to be serializable for BP use + * FServiceCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InServiceName pass to #UROS2NodeComponent::CreateServiceClient + * @param InSrvClass pass to #UROS2NodeComponent::CreateServiceClient + * @param InRequestCallback convert to #FServiceCallback and pass to #UROS2NodeComponent::CreateServiceClient + * @param InQoS pass to #UROS2NodeComponent::CreateServiceClient + * @param OutClient return value of #UROS2NodeComponent::CreateServiceClient + */ +#define ROS2_CREATE_SERVICE_CLIENT_WITH_QOS( \ + InROS2Node, InUserObject, InServiceName, InSrvClass, InRequestCallback, InQoS, OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback req; \ + req.BindDynamic(InUserObject, InRequestCallback); \ + OutClient = InROS2Node->CreateServiceClient(InServiceName, InSrvClass, req, InQoS); \ + } + +/** + * @brief Create #FServiceCallback and call #UROS2NodeComponent::CreateServiceServer + * FServiceCallback is of dynamic delegate type to be serializable for BP use + * FServiceCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InServiceName pass to #UROS2NodeComponent::CreateServiceServer + * @param InSrvClass pass to #UROS2NodeComponent::CreateServiceServer + * @param InResponseCallback convert to #FServiceCallback and pass to #UROS2NodeComponent::CreateServiceServer + */ +#define ROS2_CREATE_SERVICE_SERVER(InROS2Node, InUserObject, InServiceName, InSrvClass, InResponseCallback) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback res; \ + res.BindDynamic(InUserObject, InResponseCallback); \ + InROS2Node->CreateServiceServer(InServiceName, InSrvClass, res); \ + } + +/** + * @brief Create #FServiceCallback and call #UROS2NodeComponent::CreateServiceServer + * FServiceCallback is of dynamic delegate type to be serializable for BP use + * FServiceCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InServiceName pass to #UROS2NodeComponent::CreateServiceServer + * @param InSrvClass pass to #UROS2NodeComponent::CreateServiceServer + * @param InResponseCallback convert to #FServiceCallback and pass to #UROS2NodeComponent::CreateServiceServer + * @param InQoS pass to #UROS2NodeComponent::CreateServiceServer + */ +#define ROS2_CREATE_SERVICE_SERVER_WITH_QOS(InROS2Node, InUserObject, InServiceName, InSrvClass, InQoS, InResponseCallback) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback res; \ + res.BindDynamic(InUserObject, InResponseCallback); \ + InROS2Node->CreateServiceServer(InServiceName, InSrvClass, res, InQoS); \ + } + +/** + * @brief Create #FActionCallback and call #UROS2NodeComponent::CreateActionClient + * FActionCallback is of dynamic delegate type to be serializable for BP use + * FActionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InActionName pass to #UROS2NodeComponent::CreateActionClient + * @param InActionClass pass to #UROS2NodeComponent::CreateActionClient + * @param InGoalResponseDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InResultResponseDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InFeedbackDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InCancelResponseDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param OutClient return value of #UROS2NodeComponent::CreateActionClient + */ +#define ROS2_CREATE_ACTION_CLIENT(InROS2Node, \ + InUserObject, \ + InActionName, \ + InActionClass, \ + InGoalResponseDelegate, \ + InResultResponseDelegate, \ + InFeedbackDelegate, \ + InCancelResponseDelegate, \ + OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Feedback, Result, Goal; \ + FSimpleCallback Cancel; \ + Goal.BindDynamic(InUserObject, InGoalResponseDelegate); \ + Result.BindDynamic(InUserObject, InResultResponseDelegate); \ + Feedback.BindDynamic(InUserObject, InFeedbackDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelResponseDelegate); \ + OutClient = InROS2Node->CreateActionClient(InActionName, InActionClass, Goal, Result, Feedback, Cancel); \ + } + +/** + * @brief Create #FActionCallback and call #UROS2NodeComponent::CreateActionClient + * FActionCallback is of dynamic delegate type to be serializable for BP use + * FActionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InActionName pass to #UROS2NodeComponent::CreateActionClient + * @param InActionClass pass to #UROS2NodeComponent::CreateActionClient + * @param InGoalResponseDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InResultResponseDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InFeedbackDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InCancelResponseDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionClient + * @param InGoalQoS pass to #UROS2NodeComponent::CreateActionClient + * @param InResultQoS pass to #UROS2NodeComponent::CreateActionClient + * @param InFeedbackQoS pass to #UROS2NodeComponent::CreateActionClient + * @param InCancelQoS pass to #UROS2NodeComponent::CreateActionClient + * @param OutClient return value of #UROS2NodeComponent::CreateActionClient + */ +#define ROS2_CREATE_ACTION_CLIENT_WITH_QOS(InROS2Node, \ + InUserObject, \ + InActionName, \ + InActionClass, \ + InGoalResponseDelegate, \ + InResultResponseDelegate, \ + InFeedbackDelegate, \ + InCancelResponseDelegate, \ + InGoalQoS, \ + InResultQoS, \ + InFeedbackQoS, \ + InCancelQoS, \ + OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Feedback, Result, Goal; \ + FSimpleCallback Cancel; \ + Goal.BindDynamic(InUserObject, InGoalResponseDelegate); \ + Result.BindDynamic(InUserObject, InResultResponseDelegate); \ + Feedback.BindDynamic(InUserObject, InFeedbackDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelResponseDelegate); \ + OutClient = InROS2Node->CreateActionClient( \ + InActionName, InActionClass, Goal, Result, Feedback, Cancel, InGoalQoS, InResultQoS, InFeedbackQoS, InCancelQoS); \ + } + +/** + * @brief Create #FActionCallback and call #UROS2NodeComponent::CreateActionServer + * FActionCallback is of dynamic delegate type to be serializable for BP use + * FActionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InActionName pass to #UROS2NodeComponent::CreateActionServer + * @param InActionClass pass to #UROS2NodeComponent::CreateActionServer + * @param InGoalDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param InResultDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param InCancelDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param OutServer return value of #UROS2NodeComponent::CreateActionServer + */ +#define ROS2_CREATE_ACTION_SERVER( \ + InROS2Node, InUserObject, InActionName, InActionClass, InGoalDelegate, InResultDelegate, InCancelDelegate, OutServer) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Goal; \ + FSimpleCallback Result, Cancel; \ + Goal.BindDynamic(InUserObject, InGoalDelegate); \ + Result.BindDynamic(InUserObject, InResultDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelDelegate); \ + OutServer = InROS2Node->CreateActionServer(InActionName, InActionClass, Goal, Result, Cancel); \ + } + +/** + * @brief Create #FActionCallback and call #UROS2NodeComponent::CreateActionServer + * FActionCallback is of dynamic delegate type to be serializable for BP use + * FActionCallback::BindDynamic is a macro, instead of a function. + * Thus InCallback can only be a direct UFUNCTION() method & cannot be used as typed param! + * @param InROS2Node #UROS2NodeComponent + * @param InUserObject Objects of InCallback + * @param InActionName pass to #UROS2NodeComponent::CreateActionServer + * @param InActionClass pass to #UROS2NodeComponent::CreateActionServer + * @param InGoalDelegate convert to #FActionCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param InResultDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param InCancelDelegate convert to #FSimpleCallback and pass to #UROS2NodeComponent::CreateActionServer + * @param InGoalQoS pass to #UROS2NodeComponent::CreateActionServer + * @param InResultQoS pass to #UROS2NodeComponent::CreateActionServer + * @param InFeedbackQoS pass to #UROS2NodeComponent::CreateActionServer + * @param InCancelQoS pass to #UROS2NodeComponent::CreateActionServer + * @param OutServer return value of #UROS2NodeComponent::CreateActionServer + */ +#define ROS2_CREATE_ACTION_SERVER_WITH_QOS(InROS2Node, \ + InUserObject, \ + InActionName, \ + InActionClass, \ + InGoalDelegate, \ + InResultDelegate, \ + InCancelDelegate, \ + InGoalQoS, \ + InResultQoS, \ + InFeedbackQoS, \ + InCancelQoS, \ + OutServer) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Goal; \ + FSimpleCallback Result, Cancel; \ + Goal.BindDynamic(InUserObject, InGoalDelegate); \ + Result.BindDynamic(InUserObject, InResultDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelDelegate); \ + OutServer = InROS2Node->CreateActionServer( \ + InActionName, InActionClass, Goal, Result, Cancel, InGoalQoS, InResultQoS, InFeedbackQoS, InCancelQoS); \ + } + +/** + * @brief Check #UROS2NodeComponent is initialized or not. + * @param InNode #UROS2NodeComponent + * @param InName Node name. Used only for logging. + * @param OutRes bool result. true if initialized, false otherwise. + */ +#define IS_ROS2NODE_INITED(InNode, InName, OutRes) \ + if (!IsValid(InNode)) \ + { \ + UE_LOG_WITH_INFO(LogROS2Node, Warning, TEXT("[%s] ROS2 Node is nullptr. Please set OwnerNode."), *InName); \ + OutRes = false; \ + } \ + else if (InNode->State != UROS2State::Initialized) \ + { \ + UE_LOG_WITH_INFO( \ + LogROS2Node, Warning, TEXT("[%s] ROS2 Node is not initialized yet. Please initialize OwnerNode."), *InName); \ + OutRes = false; \ + } \ + else \ + { \ + OutRes = true; \ + } + +/** + * @brief Class implementing ROS2 node. + * This class also handles tasks performed by the executor in rclc. + * Components of the node and not additional distinct entities publishers, subscribers, services, service clients, action servers + * and action clients should register to the node with the appropriate methods (Add*). + */ +UCLASS(ClassGroup = (Custom), Blueprintable, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2NodeComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + /** + * @brief Create a New Node object. + * Used outside of constructor. + * @param InNodeName + * @param InNodeNamespace + * @param InCompName + * @return UROS2NodeComponent* + */ + UFUNCTION(BlueprintCallable) + static UROS2NodeComponent* CreateNewNode(UObject* InOwner, + const FString& InNodeName, + const FString& InNodeNamespace, + const FString& InCompName = TEXT("ROS2NodeComponent"), + const bool Init = true); + + //! A constructor. + UROS2NodeComponent(); + +protected: + /** + * @brief Overridable function called whenever this actor is being removed from a level + * @param EndPlayReason + * \sa [AActor::EndPlay](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/AActor/EndPlay/) + */ + virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; + +public: + /** + * @brief Called every frame. + * + * @param DeltaTime + * @param TickType + * @param ThisTickFunction + */ + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + +public: + /** + * @brief Initilize rosnode with rclc_node_init_default + * This can't be pre-placed in #UROS2NodeComponent::BeginPlay() as the order of rcl(c) instructions could be different/relevant + * in each of Child classes + * + */ + UFUNCTION(BlueprintCallable) + void Init(); + + rcl_node_t* GetNode(); + + /** + * @brief Set this node to #UROS2Publisher::OwnerNode of InPublisher and add to #Publishers. + * + * @param InPublisher + */ + UFUNCTION(BlueprintCallable) + void AddPublisher(UROS2Publisher* InPublisher); + + /** + * @brief Create a new #UROS2Publisher of custom publisher class and add to Node. + * Custom Publisher class is expected to override #UROS2Publisher::Update which in loop with frequency. + * @param InTopicName Topic name + * @param InPublisherClass Custom output publisher type class + * @param InPubFrequency Publishing frequency + */ + UFUNCTION(BlueprintCallable) + UROS2Publisher* CreateLoopPublisherWithClass(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const float InPubFrequency); + + /** + * @brief Create a new #UROS2Publisher and add to Node. + * + * @param InTopicName Topic name + * @param InPublisherClass Custom output publisher type class + * @param InMsgClass Custom message type class + * @param InPubFrequency Publishing frequency + * @param InUpdateDelegate Delegate which is called with given frequency. + * @param InQoS QoS. Default is #UROS2QoS::Default + */ + UFUNCTION(BlueprintCallable) + UROS2Publisher* CreateLoopPublisher(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + const float InPubFrequency, + const FTopicCallback& InUpdateDelegate, + const UROS2QoS InQoS = UROS2QoS::Default); + + /** + * @brief Create a new #UROS2Publisher of custom publisher class and add to Node. + * + * @param InPublisherClass + * @param InTopicName + * @return UROS2Publisher* + */ + UFUNCTION(BlueprintCallable) + UROS2Publisher* CreatePublisherWithClass(const TSubclassOf& InPublisherClass, + const FString& InTopicName = TEXT("")); + + /** + * @brief Create a new #UROS2Publisher and add to Node. + * + * @param InTopicName Topic name + * @param InPublisherClass Custom output publisher type class + * @param InMsgClass Custom message type class + * @param InQoS QoS. Default is #UROS2QoS::Default + */ + UFUNCTION(BlueprintCallable) + UROS2Publisher* CreatePublisher(const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + const UROS2QoS InQoS = UROS2QoS::Default); + + /** + * @brief Methods to register subscribers. + * @param TopicName + * @param MsgClass + * @param Callback + */ + UFUNCTION(BlueprintCallable) + void AddSubscription(UROS2Subscriber* InSubscriber); + + /** + * @brief Create a new #UROS2Subscriber and add to Node. + * + * @param InTopicName + * @param InMsgClass + * @param InCallback + * @return UROS2Subscriber* + */ + UFUNCTION(BlueprintCallable) + UROS2Subscriber* CreateSubscriber(const FString& InTopicName, + const TSubclassOf& InMsgClass, + const FSubscriptionCallback& InCallback, + const UROS2QoS InQoS = UROS2QoS::Default); + + /** + * @brief Set this node to #UROS2ServiceClient::OwnerNode and add to #ServiceClients. + * + * @param InClient + */ + UFUNCTION(BlueprintCallable) + void AddServiceClient(UROS2ServiceClient* InServiceClient); + + /** + * @brief Create a new #UROS2ServiceClient and add to Node. + * + * @param InServiceName + * @param InSrvClass + * @param InRequestDelegate + * @param InResponseDelegate + * @param InQoS QoS. Default is #UROS2QoS::Default + * @return UROS2NodeComponent* + */ + UFUNCTION(BlueprintCallable) + UROS2ServiceClient* CreateServiceClient(const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InResponseDelegate, + const UROS2QoS InQoS = UROS2QoS::Services); + + /** + * @brief Create ServiceServer with rcl_service_init and add to #ServiceServers. + * + * @param ServiceName + * @param SrvClass + * @param Callback + */ + UFUNCTION(BlueprintCallable) + void AddServiceServer(UROS2ServiceServer* InServiceServer); + + /** + * @brief Create a new #UROS2ServiceServer and add to Node. + * + * @param InTopicName Topic name + * @param InSrvClass Custom message type class + * @param InCallback Callback function + */ + UFUNCTION(BlueprintCallable) + UROS2ServiceServer* CreateServiceServer(const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InCallback, + const UROS2QoS InQoS = UROS2QoS::Services); + + /** + * @brief Set this node to #UROS2ActionClient::OwnerNode and add to #ActionClients. + * + * @param InActionClient + */ + UFUNCTION(BlueprintCallable) + void AddActionClient(UROS2ActionClient* InActionClient); + + /** + * @brief Create a new #UROS2ActionClient and add to Node. + * + * @param InActionName + * @param InActionClass + * @param InFeedbackDelegate + * @param InResultResponseDelegate + * @param InGoalResponseDelegate + * @param InCancelResponseDelegate + * @param InFeedbackQoS + * @param InResultQoS + * @param InGoalQoS + * @param InCancelQoS + * @return UROS2ActionClient* + */ + UROS2ActionClient* CreateActionClient(const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalResponseDelegate, + const FActionCallback& InResultResponseDelegate, + const FActionCallback& InFeedbackDelegate, + const FSimpleCallback& InCancelResponseDelegate, + const UROS2QoS InGoalQoS = UROS2QoS::Services, + const UROS2QoS InResultQoS = UROS2QoS::Services, + const UROS2QoS InFeedbackQoS = UROS2QoS::Default, + const UROS2QoS InCancelQoS = UROS2QoS::Services); + /** + * @brief Set this node to #UROS2ActionClient::OwnerNode and add to #ActionServers. + * + * @param InActionServer + */ + UFUNCTION(BlueprintCallable) + void AddActionServer(UROS2ActionServer* InActionServer); + + /** + * @brief Create a Action Server and add to Node + * + * @param InActionName + * @param InActionClass + * @param InGoalDelegate + * @param InCancelDelegate + * @param InResultDelegate + * @param InFeedbackQoS + * @param InResultQoS + * @param InGoalQoS + * @param InCancelQoS + * @return UROS2ActionServer* + */ + UROS2ActionServer* CreateActionServer(const FString& InActionName, + const TSubclassOf& InActionClass, + const FActionCallback& InGoalDelegate, + const FSimpleCallback& InResultDelegate, + const FSimpleCallback& InCancelDelegate, + const UROS2QoS InGoalQoS = UROS2QoS::Services, + const UROS2QoS InResultQoS = UROS2QoS::Services, + const UROS2QoS InFeedbackQoS = UROS2QoS::Default, + const UROS2QoS InCancelQoS = UROS2QoS::Services); + + //! Node state + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + TEnumAsByte State = UROS2State::Created; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Name = TEXT("node"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Namespace = TEXT(""); + + //! wait_set quantities - currently unused + UPROPERTY(VisibleAnywhere, Category = "Diagnostics") + int NGuardConditions = 0; + + UPROPERTY(VisibleAnywhere, Category = "Diagnostics") + int NTimers = 0; + + UPROPERTY(VisibleAnywhere, Category = "Diagnostics") + int NEvents = 0; + +protected: + /** + * @brief method used to wait on communication and call delegates when appropriate modeled after executor + actions. + * @sa [rclc_executor_spin_some in + * rclc/executor.c](https://github.com/ros2/rclc/blob/243ee63ca369f0fb90397ba9ae0ca1283ab16ad3/rclc/src/rclc/executor.c#L1802) + */ + UFUNCTION() + void SpinSome(); + + rcl_wait_set_t wait_set; + + UPROPERTY() + UROS2Support* Support; + + rcl_node_t node; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Subscriptions; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray ServiceServers; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray Publishers; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray ServiceClients; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray ActionClients; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TArray ActionServers; + + //! internal property used to log throttle. + UPROPERTY() + float LogLastHit = 0.f; + +private: + /** + * @brief based on _rclc_default_scheduling of the rclc executor. + * Called inside #SpinSome. rcl_take to get topic and execute Callback. + * + */ + UFUNCTION() + void HandleSubscriptions(); + + /** + * @brief based on _rclc_default_scheduling of the rclc executor. + * Called inside #SpinSome. rcl_take_request_with_info to get request, execute Callback and rcl_send_response to send response + * + */ + UFUNCTION() + void HandleServiceServers(); + + /** + * @brief based on _rclc_default_scheduling of the rclc executor. + * Called inside #SpinSome. rcl_take_response_with_info to get response and execute Callback. + * + */ + UFUNCTION() + void HandleServiceClients(); + + /** + * @brief based on _rclc_default_scheduling of the rclc executor. + * Called inside #SpinSome. rcl_take_response_with_info to get response and execute Callback. + * + */ + UFUNCTION() + void HandleActionClients(); + + /** + * @brief based on _rclc_default_scheduling of the rclc executor. + * Called inside #SpinSome. rcl_take_response_with_info to get response and execute Callback. + * + */ + UFUNCTION() + void HandleActionServers(); + + /** + * @brief invalidate #wait_set so that in next spin_some() call the + * #wait_set is updated accordingly in #SpinSome + * @sa [rclc_executor_add_subscription_with_context in + * rclc/executor.c](https://github.com/ros2/rclc/blob/243ee63ca369f0fb90397ba9ae0ca1283ab16ad3/rclc/src/rclc/executor.c#L207) + */ + UFUNCTION() + void InvalidateWaitSet(); +}; diff --git a/Source/rclUE/Public/ROS2Publisher.h b/Source/rclUE/Public/ROS2Publisher.h index 0300b464c..bb5230bac 100644 --- a/Source/rclUE/Public/ROS2Publisher.h +++ b/Source/rclUE/Public/ROS2Publisher.h @@ -13,83 +13,100 @@ // rclUE #include "Msgs/ROS2GenericMsg.h" -#include "ROS2Node.h" +#include "ROS2NodeComponent.h" +#include "ROS2Topic.h" #include "ROS2Publisher.generated.h" -//! BP requires a custom-made callback thus it must be Dynamic -DECLARE_DYNAMIC_DELEGATE_OneParam(FPublisherUpdateCallback, UROS2GenericMsg*, InTopicMessage); - /** * @brief ROS2 Publisher class. * */ -UCLASS(ClassGroup = (Custom), Blueprintable, meta = (BlueprintSpawnableComponent)) -class RCLUE_API UROS2Publisher : public UActorComponent +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2Publisher : public UROS2Topic { GENERATED_BODY() public: /** - * @brief Create a new UROS2Publisher of custom type - * + * @brief Create a new UROS2Publisher of custom publisher class and andd to Node. + * Custom Publisher class is expected to override #UROS2Publisher::Update which in loop with frequency. + * @param InOwner * @param InTopicName Topic name * @param InPublisherClass Custom output publisher type class - * @param InMsgClass Custom message type class * @param InPubFrequency Publishing frequency */ - static UROS2Publisher* CreatePublisher(UObject* InOwner, - const FString& InTopicName, - const TSubclassOf& InPublisherClass, - const TSubclassOf& InMsgClass, - int32 InPubFrequency); - - /** - * @brief Construct a new UROS2Publisher object - * - */ - UROS2Publisher(); + UFUNCTION(BlueprintCallable) + static UROS2Publisher* CreateLoopPublisherWithClass(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const float InPubFrequency); /** - * @brief Initialize Publisher + * @brief Create a Loop Publisher object * - * @param InROS2Node ROS2Node which this publisher belongs to + * @param InOwner + * @param InTopicName Topic name + * @param InPublisherClass Custom output publisher type class + * @param InMsgClass Custom message type class + * @param InPubFrequency Publishing frequency + * @param InUpdateDelegate + * @param InQoS + * @return UROS2Publisher* */ - virtual void InitializeWithROS2(AROS2Node* InROS2Node) - { - RegisterToROS2Node(InROS2Node); - } - + UFUNCTION(BlueprintCallable) + static UROS2Publisher* CreateLoopPublisher(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + float InPubFrequency, + const FTopicCallback& InUpdateDelegate, + const UROS2QoS InQoS = UROS2QoS::Default); /** - * @brief Register this publisher to input ROS2Node + * @brief Create a new UROS2Publisher and add to Node. * - * @param InROS2Node ROS2Node which this publisher belongs to + * @param InOwner + * @param InPublisherClass + * @param InTopicName + * @return UROS2Publisher* */ - UFUNCTION() - void RegisterToROS2Node(AROS2Node* InROS2Node); + UFUNCTION(BlueprintCallable) + static UROS2Publisher* CreatePublisherWithClass(UObject* InOwner, + const TSubclassOf& InPublisherClass, + const FString& InTopicName = TEXT("")); /** - * @brief Initialize publisher with rcl_publisher_init, initialize message and start timer and + * @brief Create a new UROS2Publisher of custom type * - * @param QoS - * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + * @param InOwner + * @param InTopicName Topic name + * @param InPublisherClass Custom output publisher type class + * @param InMsgClass Custom message type class + * @param InPubFrequency Publishing frequency + * @param InQoS + * @return UROS2Publisher* */ UFUNCTION(BlueprintCallable) - void Init(const TEnumAsByte QoS); + static UROS2Publisher* CreatePublisher(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InPublisherClass, + const TSubclassOf& InMsgClass, + float InPubFrequency, + const UROS2QoS InQoS = UROS2QoS::Default); /** - * @brief Create #UROS2GenericMsg instance and initialize it. + * @brief Update Msg with delegate and publish msg. * */ UFUNCTION(BlueprintCallable) - void InitializeMessage(); + void UpdateAndPublish(); /** - * @brief Update Msg with delegate and publish msg. + * @brief Publish msg * */ UFUNCTION(BlueprintCallable) - void UpdateAndPublishMessage(); + void Publish(); /** * @brief Publish a message @@ -98,9 +115,11 @@ class RCLUE_API UROS2Publisher : public UActorComponent * @param InMessage */ template - void PublishMessage(const TUEStruct& InMessageData) + void Publish(const TUEStruct& InMessageData) { - if (UROS2State::Initialized == State) + // can't use macro in here. + // if (IsValid(OwnerNode) && OwnerNode->State == UROS2State::Initialized && State == UROS2State::Initialized) + if (State == UROS2State::Initialized) { // Update [TopicMessage] with [InMessageData] CastChecked(TopicMessage)->SetMsg(InMessageData); @@ -110,7 +129,7 @@ class RCLUE_API UROS2Publisher : public UActorComponent } else { - UE_LOG(LogTemp, Log, TEXT("PublishMessage() [%s] Publisher not yet initialized"), *GetName()); + UE_LOG_WITH_INFO_NAMED(LogTemp, Log, TEXT("Publisher or node is not yet initialized")); } } @@ -118,58 +137,29 @@ class RCLUE_API UROS2Publisher : public UActorComponent * @brief Destroy publisher with rcl_publisher_fini * */ - UFUNCTION() virtual void Destroy(); /** * @brief Stope publishing timer * */ - UFUNCTION() + UFUNCTION(BlueprintCallable) void StopPublishTimer(); /** * @brief Start publishing topic with #PublicationFrequencyHz * */ - UFUNCTION() + UFUNCTION(BlueprintCallable) void StartPublishTimer(); - //! this information is redundant with Topic, but it's needed to initialize it - UPROPERTY(EditAnywhere, BlueprintReadWrite) - FString TopicName; - //! Publish frequency. if this value > 0, this will update and publish msg periodically. UPROPERTY(EditAnywhere, BlueprintReadWrite) - float PublicationFrequencyHz = 1000.f; - - //! this information is redundant with Topic, but it's needed to initialize it - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TSubclassOf MsgClass; + float PublicationFrequencyHz = 1.f; - //! Delegate which is Bound with #UpdateMessage by #SetupUpdateCallback + //! Delegate which is Bound with #UpdateMessage by #SetDefaultDelegates UPROPERTY(EditAnywhere, BlueprintReadWrite) - FPublisherUpdateCallback UpdateDelegate; - - /** - * @brief Bind #UpdateMessage with #UpdateDelegate - * - */ - UFUNCTION(BlueprintCallable) - void SetupUpdateCallback() - { - UpdateDelegate.BindDynamic(this, &UROS2Publisher::UpdateMessage); - } - - /** - * @brief Unbind #UpdateDelegate - * - */ - UFUNCTION(BlueprintCallable) - virtual void RevokeUpdateCallback() - { - UpdateDelegate.Unbind(); - } + FTopicCallback UpdateDelegate; /** * @brief Update msg. Should be implemented in child class. @@ -182,26 +172,22 @@ class RCLUE_API UROS2Publisher : public UActorComponent checkNoEntry(); } - //! ROS2Node which own this publisher. - UPROPERTY(VisibleAnywhere, BlueprintReadWrite) - AROS2Node* OwnerNode = nullptr; - - //! Publisher state - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - TEnumAsByte State = UROS2State::Created; - -protected: /** - * @brief Publish msg. + * @brief Bind #UpdateMessage with #UpdateDelegate * */ UFUNCTION(BlueprintCallable) - void Publish(); + void SetDefaultDelegates(); - //! Message Instance - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - UROS2GenericMsg* TopicMessage; + /** + * @brief Set the Delegates object. + * + * @param InUpdateDelegate + */ + UFUNCTION(BlueprintCallable) + void SetDelegates(const FTopicCallback& InUpdateDelegate); +protected: //! Timer handler for periodic publisher UPROPERTY(VisibleAnywhere, BlueprintReadOnly) FTimerHandle TimerHandle; @@ -211,4 +197,126 @@ class RCLUE_API UROS2Publisher : public UActorComponent //! ROS2 publisher rcl_publisher_t RclPublisher; + + //! Timer Manager + UPROPERTY() + URRTimerManager* TimerManager = nullptr; + + /** + * @brief Initialize Publisher and start timer. + * + */ + virtual void InitializeTopicComponent(); +}; + +/** + * @brief ROS2 Publisher Component. Wrapper of #UROS2Publisher for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2PublisherComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2Publisher* Publisher = nullptr; + + //! this is pass to #UROS2Publisher::TopicName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName = TEXT(""); + + //! this is pass to #UROS2Publisher::PublisherClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf PublisherClass = UROS2Publisher::StaticClass(); + + //! this is pass to #UROS2Publisher::MsgClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf MsgClass = UROS2GenericMsg::StaticClass(); + + //! this is pass to #UROS2Publisher::PublicationFrequencyHz in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float PublicationFrequencyHz = 1.f; + + //! this is pass to #UROS2Publisher::QoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Default; + + //! this is pass to #UROS2Publisher::UpdateDelegate in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FTopicCallback UpdateDelegate; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreatePublisher() + { + if (Publisher == nullptr) + { + Publisher = UROS2Publisher::CreateLoopPublisher( + this, TopicName, PublisherClass, MsgClass, PublicationFrequencyHz, UpdateDelegate, QoS); + } + } + + virtual void BeginPlay() override + { + DefaultCreatePublisher(); + Super::BeginPlay(); + }; + + /** + * @brief Pass this class's parameter #TopicName, #PublicationFrequencyHz, #QoS to #Publisher + */ + UFUNCTION(BlueprintCallable) + virtual void SetParams() + { + if (Publisher != nullptr) + { + Publisher->TopicName = TopicName; + Publisher->PublicationFrequencyHz = PublicationFrequencyHz; + Publisher->QoS = QoS; + } + else + { + UE_LOG_WITH_INFO(LogTemp, Warning, TEXT("Publisher is not created yet.")); + } + } +}; + +/** + * @brief ROS2 Custom Publisher Component. Wrapper of #UROS2Publisher for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2CustomPublisherComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2Publisher* Publisher = nullptr; + + //! this is pass to #UROS2Publisher::TopicName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName = TEXT(""); + + //! this is pass to #UROS2Publisher::PublisherClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf PublisherClass = UROS2Publisher::StaticClass(); + + //! this is pass to #UROS2Publisher::PublicationFrequencyHz in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float PublicationFrequencyHz = 1.f; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreatePublisher() + { + if (Publisher == nullptr) + { + Publisher = UROS2Publisher::CreateLoopPublisherWithClass(this, TopicName, PublisherClass, PublicationFrequencyHz); + } + } + virtual void BeginPlay() override + { + DefaultCreatePublisher(); + Super::BeginPlay(); + }; }; diff --git a/Source/rclUE/Public/ROS2Service.h b/Source/rclUE/Public/ROS2Service.h new file mode 100644 index 000000000..aac52d540 --- /dev/null +++ b/Source/rclUE/Public/ROS2Service.h @@ -0,0 +1,121 @@ +/** + * @file ROS2Service.h + * @brief Class implementing ROS2 service. + * Service type is defined by SrvClass + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + */ + +// Class implementing ROS2 service clients +// Service type is defined by SrvClass + +#pragma once + +// UE +#include "Components/ActorComponent.h" +#include "CoreMinimal.h" + +// rclUE +#include "ROS2NodeComponent.h" +#include "Srvs/ROS2GenericSrv.h" + +#include "ROS2Service.generated.h" + +DECLARE_LOG_CATEGORY_EXTERN(LogROS2Srv, Log, All); + +#define IS_SRV_INITED(InNode, InName, OutRes) \ + IS_ROS2NODE_INITED(InNode, InName, OutRes); \ + \ + if (State != UROS2State::Initialized) \ + { \ + UE_LOG_WITH_INFO( \ + LogROS2Srv, Warning, TEXT("[%s] Service Client/Server is not initialized yet. Please initialize Action."), *InName); \ + OutRes = false; \ + } + +/** + * @brief Class implementing ROS2 service clients. + * Service type is defined by SrvClass + * + */ +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2Service : public UObject +{ + GENERATED_BODY() + +public: + /** + * @brief Initialize Service with ROS2Node + * + * @param InROS2Node ROS2Node which this publisher belongs to + * @return true + * @return false + */ + virtual bool InitializeWithROS2(UROS2NodeComponent* InROS2Node); + + /** + * @brief Initialize ROS2 service client with rcl_client_init, set QoS, #InitializeService and #InitializeServiceComponent . + * + * @return true + * @return false + */ + UFUNCTION(BlueprintCallable) + virtual bool Init(); + + /** + * @brief Create #Service instance and initialize it. + * + * @return true + * @return false + */ + UFUNCTION(BlueprintCallable) + virtual bool InitializeService(); + + /** + * @brief Destroy service with rcl_client_fini + * + */ + UFUNCTION() + virtual void Destroy(); + + /** + * @brief Determine the relevant service functions to call. + * Should be implemented in #UROS2ServiceServer and #UROS2ServiceClient + */ + virtual void ProcessReady(); + + //! this information is redundant with Topic, but it's used to initialize it + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ServiceName; + + //! type of Srv class + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf SrvClass; + + //! ROS2Node which own this service client. + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + UROS2NodeComponent* OwnerNode; + + //! Service client state + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + TEnumAsByte State = UROS2State::Created; + + //! Service Instance + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + UROS2GenericSrv* Service; + + //! Quality of service + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Services; + +protected: + //! Service is ready or not + bool Ready; + + /** + * @brief Initialize ROS2 Action. Should be implemented in #UROS2ServiceServer and #UROS2ServiceClient + * + */ + UFUNCTION() + virtual void InitializeServiceComponent(); +}; diff --git a/Source/rclUE/Public/ROS2ServiceClient.h b/Source/rclUE/Public/ROS2ServiceClient.h index a1128a758..363ab63ad 100644 --- a/Source/rclUE/Public/ROS2ServiceClient.h +++ b/Source/rclUE/Public/ROS2ServiceClient.h @@ -15,115 +15,95 @@ #include "CoreMinimal.h" // rclUE -#include "Msgs/ROS2GenericMsg.h" -#include "ROS2Node.h" +#include "ROS2NodeComponent.h" +#include "ROS2Service.h" #include "Srvs/ROS2GenericSrv.h" #include "ROS2ServiceClient.generated.h" -//! Servoce call back delegate. BP requires a custom-made callback thus it must be Dynamic -DECLARE_DYNAMIC_DELEGATE_OneParam(FServiceClientCallback, UROS2GenericSrv*, InService); /** * @brief Class implementing ROS2 service clients. * Service type is defined by SrvClass * */ -UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) -class RCLUE_API UROS2ServiceClient : public UActorComponent +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ServiceClient : public UROS2Service { GENERATED_BODY() public: /** - * @brief Construct a new UROS2ServiceClient object + * @brief Create a Service Client object * + * @param InOwner + * @param InServiceName + * @param InSrvClass + * @param InResponseDelegate + * @return UROS2ServiceClient* */ - UROS2ServiceClient(); - -public: - /** - * @brief Initialize ROS2 service client with rcl_client_init, set QoS, etc. - * - * @param QoS Quality of Service - * @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) - */ - UFUNCTION(BlueprintCallable) - void Init(TEnumAsByte QoS); - - /** - * @brief Create #UROS2GenericSrv instance and initialize it. - * - */ - UFUNCTION(BlueprintCallable) - void InitializeService(); + static UROS2ServiceClient* CreateServiceClient(UObject* InOwner, + const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InResponseDelegate, + const UROS2QoS InQoS = UROS2QoS::Services); /** - * @brief Update Srv with delegate and send request. + * @brief Destroy service with rcl_client_fini * */ - UFUNCTION(BlueprintCallable) - void UpdateAndSendRequest(); + virtual void Destroy(); /** - * @brief Destroy publisher with rcl_client_fini + * @brief Determine the relevant service client functions to call. * */ - UFUNCTION() - virtual void Destroy(); - - //! this information is redundant with Topic, but it's used to initialize it - UPROPERTY(EditAnywhere, BlueprintReadWrite) - FString ServiceName; - - //! type of Srv class - UPROPERTY(EditAnywhere, BlueprintReadWrite) - TSubclassOf SrvClass; - - //! used to pass data for the request - UPROPERTY(EditAnywhere, BlueprintReadWrite) - FServiceClientCallback RequestDelegate; + virtual void ProcessReady() override; //! used to receive the answer UPROPERTY(EditAnywhere, BlueprintReadWrite) - FServiceClientCallback ResponseDelegate; - - //! ROS2Node which own this service client. - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - AROS2Node* OwnerNode; - - //! Service client state - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - TEnumAsByte State = UROS2State::Created; + FServiceCallback ResponseDelegate; //! ROS2 Service client rcl_client_t client; - //! Service Instance - UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - UROS2GenericSrv* Service; - //! Service is ready or not - bool Ready; - template - void SendRequest(TService* InService, const TServiceRequest& InServiceRequest) - { - check(State == UROS2State::Initialized); - check(OwnerNode != nullptr); - - InService->SetRequest(InServiceRequest); - int64_t Seq; - RCSOFTCHECK(rcl_send_request(&client, InService->GetRequest(), &Seq)); - } + bool Ready = false; /** - * @brief Unbind #RequestDelegate & #ResponseDelegate + * @brief Send service request * */ UFUNCTION(BlueprintCallable) - virtual void RevokeRequestResponseCallbacks() + void SendRequest(); + + /** + * @brief Send service request + * + * @tparam TService + * @tparam TServiceRequest + * @param InService + * @param InServiceRequest + */ + template + void SendRequest(TService* InService, const TServiceRequest& InServiceRequest) { - RequestDelegate.Unbind(); - ResponseDelegate.Unbind(); + if (IsValid(OwnerNode) && OwnerNode->State == UROS2State::Initialized && State == UROS2State::Initialized) + { + if (!IsServiceReady()) + { + UE_LOG_WITH_INFO(LogROS2Srv, Error, TEXT("Service named %s is not ready yet"), *ServiceName); + return; + } + + InService->SetRequest(InServiceRequest); + + int64_t Seq; + RCSOFTCHECK(rcl_send_request(&client, InService->GetRequest(), &Seq)); + } + else + { + UE_LOG_WITH_INFO_NAMED(LogTemp, Log, TEXT("Service Client or node is not yet initialized")); + } } /** @@ -133,13 +113,66 @@ class RCLUE_API UROS2ServiceClient : public UActorComponent UFUNCTION(BlueprintCallable) bool IsServiceReady(); -protected: /** - * @brief Send service request + * @brief Set #ResponseDelegate * + * @param InResponseCallback */ - UFUNCTION() - void SendRequest(); + UFUNCTION(BlueprintCallable) + void SetDelegates(const FServiceCallback& InResponseCallback); + +protected: const void* req; const void* res; + + /** + * @brief Initialize ROS2 service client with rcl_client_init. + * Set QOS for all goal, result, cancel, feedback and status + * + */ + virtual void InitializeServiceComponent() override; +}; + +/** + * @brief ROS2 ServiceClient Component. Wrapper of #UROS2ServiceClient for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ServiceClientComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ServiceClient* ServiceClient = nullptr; + + //! this is pass to #UROS2ServiceClient::ServiceName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ServiceName = TEXT(""); + + //! this is pass to #UROS2ServiceClient::SrvClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf SrvClass = UROS2GenericSrv::StaticClass(); + + //! this is pass to #UROS2ServiceClient::QoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Services; + + //! this is pass to #UROS2ServiceClient::ResponseDelegate in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FServiceCallback ResponseDelegate; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreateServiceClient() + { + if (ServiceClient == nullptr) + { + ServiceClient = UROS2ServiceClient::CreateServiceClient(this, ServiceName, SrvClass, ResponseDelegate, QoS); + } + } + virtual void BeginPlay() override + { + DefaultCreateServiceClient(); + Super::BeginPlay(); + }; }; diff --git a/Source/rclUE/Public/ROS2ServiceServer.h b/Source/rclUE/Public/ROS2ServiceServer.h new file mode 100644 index 000000000..ad7cd7fe8 --- /dev/null +++ b/Source/rclUE/Public/ROS2ServiceServer.h @@ -0,0 +1,135 @@ +/** + * @file ROS2ServiceServer.h + * @brief Class implementing ROS2 service clients. + * Service type is defined by SrvClass + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + */ + +// Class implementing ROS2 service clients +// Service type is defined by SrvClass + +#pragma once + +// UE +#include "Components/ActorComponent.h" +#include "CoreMinimal.h" + +// rclUE +#include "ROS2NodeComponent.h" +#include "ROS2Service.h" +#include "Srvs/ROS2GenericSrv.h" + +#include "ROS2ServiceServer.generated.h" + +/** + * @brief Class implementing ROS2 service server. + * Service type is defined by SrvClass + * + */ +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ServiceServer : public UROS2Service +{ + GENERATED_BODY() + +public: + /** + * @brief Create a new UROS2ServiceServer of custom type + * + * @param InTopicName Topic name + * @param InSrvClass Custom message type class + * @param InCallback Callback function + */ + static UROS2ServiceServer* CreateServiceServer(UObject* InOwner, + const FString& InServiceName, + const TSubclassOf& InSrvClass, + const FServiceCallback& InCallback, + const UROS2QoS InQoS = UROS2QoS::Services); + + /** + * @brief Destroy publisher with rcl_client_fini + * + */ + virtual void Destroy(); + + /** + * @brief Determine the relevant action client functions to call. + * + */ + virtual void ProcessReady() override; + + //! used to receive the answer + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FServiceCallback SrvCallback; + + //! ROS2 Service server + rcl_service_t rcl_service; + + //! Service is ready or not + bool Ready; + + /** + * @brief Set #SrvCallback + * + * @param InSrvCallback + */ + UFUNCTION(BlueprintCallable) + void SetDelegates(const FServiceCallback& InSrvCallback); + +protected: + /** + * @brief Initialize ROS2 service server with rcl_service_init. + * Set QOS for all goal, result, cancel, feedback and status + * + */ + virtual void InitializeServiceComponent() override; + + rmw_service_info_t LastReqInfo; + + //! Rejct consecutive identical requests + UPROPERTY(EditAnywhere, BlueprintReadWrite) + bool bRejectConsecutiveIdenticalRequest = true; +}; + +/** + * @brief ROS2 ServiceServer Component. Wrapper of #UROS2ServiceServer for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2ServiceServerComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ServiceServer* ServiceServer = nullptr; + + //! this is pass to #UROS2ServiceServer::ServiceName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ServiceName = TEXT(""); + + //! this is pass to #UROS2ServiceServer::SrvClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf SrvClass = UROS2GenericSrv::StaticClass(); + + //! this is pass to #UROS2ServiceServer::QoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Services; + + //! this is pass to #UROS2ServiceServer::ResponseDelegate in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FServiceCallback SrvCallback; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreateServiceServer() + { + if (ServiceServer == nullptr) + { + ServiceServer = UROS2ServiceServer::CreateServiceServer(this, ServiceName, SrvClass, SrvCallback, QoS); + } + } + virtual void BeginPlay() override + { + DefaultCreateServiceServer(); + Super::BeginPlay(); + }; +}; diff --git a/Source/rclUE/Public/ROS2Subscriber.h b/Source/rclUE/Public/ROS2Subscriber.h new file mode 100644 index 000000000..cc4785bdf --- /dev/null +++ b/Source/rclUE/Public/ROS2Subscriber.h @@ -0,0 +1,118 @@ +/** + * @file ROS2Subscriber.h + * @brief Class implementing ROS2 subscribers + * Message type is defined by MsgClass + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + * + */ + +#pragma once + +#include +#include + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "ROS2NodeComponent.h" +#include "ROS2Topic.h" + +#include "ROS2Subscriber.generated.h" + +/** + * @brief ROS2 Subscriber class. + * + */ +UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2Subscriber : public UROS2Topic +{ + GENERATED_BODY() + +public: + /** + * @brief Create a new UROS2Subscriber of custom type + * + * @param InTopicName Topic name + * @param InMsgClass Custom message type class + * @param InCallback Callback function + */ + static UROS2Subscriber* CreateSubscriber(UObject* InOwner, + const FString& InTopicName, + const TSubclassOf& InMsgClass, + const FSubscriptionCallback& InCallback, + const UROS2QoS InQoS = UROS2QoS::Default); + + /** + * @brief Destroy subscriber with rcl_subscriber_fini + * + */ + virtual void Destroy() override; + + //! Delegate which is Bound with #UpdateMessage by #SetDelegates + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FSubscriptionCallback Callback; + + /** + * @brief Determine the relevant subscriber functions to call. + */ + virtual void ProcessReady(); + + UFUNCTION(BlueprintCallable) + void SetDelegates(const FSubscriptionCallback& InCallback); + + bool Ready = false; + + //! ROS2 subscriber + rcl_subscription_t rcl_subscription; + +protected: + /** + * @brief Initialize ROS2 Subscriber. + * + */ + virtual void InitializeTopicComponent(); +}; + +/** + * @brief ROS2 Subscriber Component. Wrapper of #UROS2Subscriber for BP. + * + */ +UCLASS(Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2SubscriberComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2Subscriber* Subscriber = nullptr; + + //! this is pass to #UROS2Subscriber::TopicName in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName = TEXT(""); + + //! this is pass to #UROS2Subscriber::MsgClass in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf MsgClass = UROS2GenericMsg::StaticClass(); + + //! this is pass to #UROS2Subscriber::QoS in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Default; + + //! this is pass to #UROS2Subscriber::Callback in #BeginPlay + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FSubscriptionCallback Callback; + + UFUNCTION(BlueprintCallable) + virtual void DefaultCreateSubscriber() + { + if (Subscriber == nullptr) + { + Subscriber = UROS2Subscriber::CreateSubscriber(this, TopicName, MsgClass, Callback, QoS); + } + } + + virtual void BeginPlay() override + { + DefaultCreateSubscriber(); + Super::BeginPlay(); + }; +}; diff --git a/Source/rclUE/Public/ROS2Subsystem.h b/Source/rclUE/Public/ROS2Subsystem.h index 3ee6a9e7d..f622c5827 100644 --- a/Source/rclUE/Public/ROS2Subsystem.h +++ b/Source/rclUE/Public/ROS2Subsystem.h @@ -4,7 +4,7 @@ * This class is automatically instanced. * @sa [Unreal Engine Subsystems](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Subsystems/) * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. - * + * */ #pragma once @@ -21,7 +21,7 @@ /** * @brief Game Instance Subsystem class used to maintain the rcl support object * This class is automatically instanced. - * @sa [Unreal Engine Subsystems](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Subsystems/) + * @sa [Unreal Engine Subsystems](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Subsystems/) */ UCLASS(Blueprintable) class RCLUE_API UROS2Subsystem : public UGameInstanceSubsystem, public FTickableGameObject @@ -33,62 +33,67 @@ class RCLUE_API UROS2Subsystem : public UGameInstanceSubsystem, public FTickable UROS2Support* GetSupport() const; /** - * @brief + * @brief * @todo If client/server, this should only be created on the server. - * @param Outer - * @return true - * @return false + * @param Outer + * @return true + * @return false */ virtual bool ShouldCreateSubsystem(UObject* Outer) const override; /** - * @brief Create #UROS2Suppoort instance and initialize it. - * - * @param Collection [Unreal Engine FSubsystemCollectionBase](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/Subsystems/FSubsystemCollectionBase/) - */ + * @brief Create #UROS2Suppoort instance and initialize it. + * + * @param Collection [Unreal Engine + * FSubsystemCollectionBase](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/Subsystems/FSubsystemCollectionBase/) + */ virtual void Initialize(FSubsystemCollectionBase& Collection) override; /** - * @brief DeInitialize this and #Support - * - */ + * @brief DeInitialize this and #Support + * + */ virtual void Deinitialize() override; /** - * @brief [FTickableObjectBase::Tick](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/FTickableObjectBase/Tick/) - * - * @param DeltaTime + * @brief [FTickableObjectBase::Tick](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTickableObjectBase/Tick/) + * + * @param DeltaTime */ virtual void Tick(float DeltaTime) override; /** - * @brief [FTickableObjectBase::IsTickable](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/FTickableObjectBase/IsTickable/) - * - * @return true - * @return false + * @brief + * [FTickableObjectBase::IsTickable](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTickableObjectBase/IsTickable/) + * + * @return true + * @return false */ virtual bool IsTickable() const override; /** - * @brief [FTickableGameObject::IsTickableWhenPaused](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/FTickableGameObject/IsTickableWhenPaused/) - * - * @return true - * @return false + * @brief + * [FTickableGameObject::IsTickableWhenPaused](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTickableGameObject/IsTickableWhenPaused/) + * + * @return true + * @return false */ virtual bool IsTickableWhenPaused() const override; /** - * @brief [FTickableGameObject::IsTickableInEditor](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/FTickableGameObject/IsTickableInEditor/) - * - * @return true - * @return false + * @brief + * [FTickableGameObject::IsTickableInEditor](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTickableGameObject/IsTickableInEditor/) + * + * @return true + * @return false */ virtual bool IsTickableInEditor() const override; /** - * @brief [FTickableObjectBase::GetStatId](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/FTickableObjectBase/GetStatId/) - * - * @return TStatId + * @brief + * [FTickableObjectBase::GetStatId](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/FTickableObjectBase/GetStatId/) + * + * @return TStatId */ virtual TStatId GetStatId() const override; diff --git a/Source/rclUE/Public/ROS2Topic.h b/Source/rclUE/Public/ROS2Topic.h new file mode 100644 index 000000000..b462997d6 --- /dev/null +++ b/Source/rclUE/Public/ROS2Topic.h @@ -0,0 +1,109 @@ +/** + * @file ROS2Topic.h + * @brief Class implementing ROS2 topic + * Message type is defined by MsgClass + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + * + */ + +#pragma once + +#include +#include + +// rclUE +#include "Msgs/ROS2GenericMsg.h" +#include "ROS2NodeComponent.h" + +#include "ROS2Topic.generated.h" + +DECLARE_LOG_CATEGORY_EXTERN(LogROS2Topic, Log, All); + +/** + * @brief Check if Topic is initialized + * @param InNode ROS2Node which this publisher/subscriber belongs to + * @param InName Name of this publisher/subscriber. Only used for logging. + * @param OutRes Result of the check true if initialized, false otherwise + */ +#define IS_TOPIC_INITED(InNode, InName, OutRes) \ + IS_ROS2NODE_INITED(InNode, InName, OutRes); \ + if (State != UROS2State::Initialized) \ + { \ + UE_LOG_WITH_INFO( \ + LogROS2Topic, Warning, TEXT("[%s] Publisher/Subscriber is not initialized yet. Please initialize Action."), *InName); \ + OutRes = false; \ + } + +/** + * @brief ROS2 topic class. Parent class of #UROS2Publisher and #UROS2Subscriber + * + */ +UCLASS(ClassGroup = (Custom), Blueprintable, meta = (BlueprintSpawnableComponent)) +class RCLUE_API UROS2Topic : public UObject +{ + GENERATED_BODY() + +public: + /** + * @brief Initialize Topic with ROS2Node + * + * @param InROS2Node ROS2Node which this publisher/subscriber belongs to + */ + virtual bool InitializeWithROS2(UROS2NodeComponent* InROS2Node); + + /** + * @brief Initialize topic, #InitializeMessage and #InitializeTopicComponent + * + * @return true + * @return false + */ + UFUNCTION(BlueprintCallable) + virtual bool Init(); + + /** + * @brief Create #TopicMessage instance and initialize it. + * + */ + UFUNCTION(BlueprintCallable) + virtual bool InitializeMessage(); + + /** + * @brief Destroy topic and #TopicMessage + * + */ + UFUNCTION() + virtual void Destroy(); + + //! this information is redundant with Topic, but it's needed to initialize it + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName; + + //! this information is redundant with Topic, but it's needed to initialize it + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf MsgClass; + + //! ROS2Node which own this topic. + UPROPERTY(VisibleAnywhere, BlueprintReadWrite) + UROS2NodeComponent* OwnerNode = nullptr; + + //! State + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + TEnumAsByte State = UROS2State::Created; + + //! Quality of service + //! @sa [ROS2 QoS](https://docs.ros.org/en/rolling/Concepts/About-Quality-of-Service-Settings.html) + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2QoS QoS = UROS2QoS::Default; + + //! Message Instance + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + UROS2GenericMsg* TopicMessage; + +protected: + /** + * @brief Initialize ROS2 Topic. Should be implemented in #UROS2Publisher and #UROS2Subscriber + * + */ + UFUNCTION() + virtual void InitializeTopicComponent(); +}; diff --git a/Source/rclUE/Public/Srvs/ROS2AddDiag.h b/Source/rclUE/Public/Srvs/ROS2AddDiag.h index 2793e23fe..e1fe9fb83 100644 --- a/Source/rclUE/Public/Srvs/ROS2AddDiag.h +++ b/Source/rclUE/Public/Srvs/ROS2AddDiag.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/srv/AddDiagnostics.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2AddTwoInts.h b/Source/rclUE/Public/Srvs/ROS2AddTwoInts.h index d1bb01771..24d60dc48 100644 --- a/Source/rclUE/Public/Srvs/ROS2AddTwoInts.h +++ b/Source/rclUE/Public/Srvs/ROS2AddTwoInts.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/AddTwoInts.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2Attach.h b/Source/rclUE/Public/Srvs/ROS2Attach.h index c8b1f35ef..73862646a 100644 --- a/Source/rclUE/Public/Srvs/ROS2Attach.h +++ b/Source/rclUE/Public/Srvs/ROS2Attach.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/Attach.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2CancelGoal.h b/Source/rclUE/Public/Srvs/ROS2CancelGoal.h index 35f2b51f3..797f95a63 100644 --- a/Source/rclUE/Public/Srvs/ROS2CancelGoal.h +++ b/Source/rclUE/Public/Srvs/ROS2CancelGoal.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from action_msgs/srv/CancelGoal.srv - do not modify #pragma once @@ -84,7 +84,7 @@ struct RCLUE_API FROSCancelGoalRes } if (!action_msgs__msg__GoalInfo__Sequence__init(&out_ros_data.goals_canceling, GoalsCanceling.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.goals_canceling ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.goals_canceling ")); } UROS2Utils::ArrayUEToROSSequence( GoalsCanceling, out_ros_data.goals_canceling.data, GoalsCanceling.Num()); diff --git a/Source/rclUE/Public/Srvs/ROS2DeleteEntity.h b/Source/rclUE/Public/Srvs/ROS2DeleteEntity.h index 14b68e0a1..99da7d442 100644 --- a/Source/rclUE/Public/Srvs/ROS2DeleteEntity.h +++ b/Source/rclUE/Public/Srvs/ROS2DeleteEntity.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/DeleteEntity.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2FrameGraph.h b/Source/rclUE/Public/Srvs/ROS2FrameGraph.h index 4a831b7a1..9ee4f50e8 100644 --- a/Source/rclUE/Public/Srvs/ROS2FrameGraph.h +++ b/Source/rclUE/Public/Srvs/ROS2FrameGraph.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from tf2_msgs/srv/FrameGraph.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2GenericSrv.h b/Source/rclUE/Public/Srvs/ROS2GenericSrv.h index aeff98a92..4505cab63 100644 --- a/Source/rclUE/Public/Srvs/ROS2GenericSrv.h +++ b/Source/rclUE/Public/Srvs/ROS2GenericSrv.h @@ -1,42 +1,43 @@ /** * @file ROS2GenericSrv.h * @brief This should be refactored with other generic ROS2 types (Msgs, Sensors, Actions). - * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not bottlenecks and control flow inside them should be fine) + * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not + * bottlenecks and control flow inside them should be fine) * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. - * + * */ #pragma once -#include #include "rclcUtilities.h" -#include "ROS2GenericSrv.generated.h" +#include -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Srv, Log, All); +#include "ROS2GenericSrv.generated.h" /** * @brief This should be refactored with other generic ROS2 types (Msgs, Sensors, Actions). - * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not bottlenecks and control flow inside them should be fine) + * @todo Get/Print/ToString methods should be merged into a single of each with a parameter to switch versions (these are not + * bottlenecks and control flow inside them should be fine) */ UCLASS(Blueprintable) class RCLUE_API UROS2GenericSrv : public UObject { - GENERATED_BODY() + GENERATED_BODY() - // Add interface functions to this class. This is the class that will be inherited to implement this interface. + // Add interface functions to this class. This is the class that will be inherited to implement this interface. public: - virtual void Init(); - virtual void Fini(); - - virtual void* GetRequest(); - virtual void* GetResponse(); - - virtual const rosidl_service_type_support_t* GetTypeSupport() const; - - UFUNCTION(BlueprintCallable) - virtual FString SrvRequestToString() const; - - UFUNCTION(BlueprintCallable) - virtual FString SrvResponseToString() const; + virtual void Init(); + virtual void Fini(); + + virtual void* GetRequest(); + virtual void* GetResponse(); + + virtual const rosidl_service_type_support_t* GetTypeSupport() const; + + UFUNCTION(BlueprintCallable) + virtual FString SrvRequestToString() const; + + UFUNCTION(BlueprintCallable) + virtual FString SrvResponseToString() const; }; diff --git a/Source/rclUE/Public/Srvs/ROS2GetBoolFromId.h b/Source/rclUE/Public/Srvs/ROS2GetBoolFromId.h index 025dfbd6a..95845f959 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetBoolFromId.h +++ b/Source/rclUE/Public/Srvs/ROS2GetBoolFromId.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetBoolFromId.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2GetEntityState.h b/Source/rclUE/Public/Srvs/ROS2GetEntityState.h index 487a62834..9571f15c8 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetEntityState.h +++ b/Source/rclUE/Public/Srvs/ROS2GetEntityState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetEntityState.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2GetIMs.h b/Source/rclUE/Public/Srvs/ROS2GetIMs.h index 9d23c302a..d69046723 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetIMs.h +++ b/Source/rclUE/Public/Srvs/ROS2GetIMs.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from visualization_msgs/srv/GetInteractiveMarkers.srv - do not modify #pragma once @@ -75,7 +75,7 @@ struct RCLUE_API FROSGetIMsRes } if (!visualization_msgs__msg__InteractiveMarker__Sequence__init(&out_ros_data.markers, Markers.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.markers ")); } UROS2Utils::ArrayUEToROSSequence( Markers, out_ros_data.markers.data, Markers.Num()); diff --git a/Source/rclUE/Public/Srvs/ROS2GetInt32FromId.h b/Source/rclUE/Public/Srvs/ROS2GetInt32FromId.h index ead2f2876..add6735ea 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetInt32FromId.h +++ b/Source/rclUE/Public/Srvs/ROS2GetInt32FromId.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/GetInt32FromId.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2GetMap.h b/Source/rclUE/Public/Srvs/ROS2GetMap.h index 85a9115f3..77cf2755b 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetMap.h +++ b/Source/rclUE/Public/Srvs/ROS2GetMap.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/GetMap.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2GetPlan.h b/Source/rclUE/Public/Srvs/ROS2GetPlan.h index 40c7d996a..ae4c4706c 100644 --- a/Source/rclUE/Public/Srvs/ROS2GetPlan.h +++ b/Source/rclUE/Public/Srvs/ROS2GetPlan.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/GetPlan.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2LoadMap.h b/Source/rclUE/Public/Srvs/ROS2LoadMap.h new file mode 100644 index 000000000..102af5fe3 --- /dev/null +++ b/Source/rclUE/Public/Srvs/ROS2LoadMap.h @@ -0,0 +1,150 @@ +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. +// This code has been autogenerated from nav_msgs/srv/LoadMap.srv - do not modify + +#pragma once + +// UE +#include "CoreMinimal.h" + +// ROS +#include "nav_msgs/srv/load_map.h" + +// rclUE +#include "Srvs/ROS2GenericSrv.h" +#include "rclcUtilities.h" + +// Generated Msg/Srv/Action(can be empty) + +#include "Msgs/ROS2OccupancyGrid.h" + +// Generated +#include "ROS2LoadMap.generated.h" + +// potential problem: if this struct is defined multiple times! +USTRUCT(Blueprintable) +struct RCLUE_API FROSLoadMapReq +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString MapUrl; + + FROSLoadMapReq() + { + } + + void SetFromROS2(const nav_msgs__srv__LoadMap_Request& in_ros_data) + { + MapUrl = UROS2Utils::StringROSToUE(in_ros_data.map_url); + } + + void SetROS2(nav_msgs__srv__LoadMap_Request& out_ros_data) const + { + UROS2Utils::StringUEToROS(MapUrl, out_ros_data.map_url); + } +}; + +USTRUCT(Blueprintable) +struct RCLUE_API FROSLoadMapRes +{ + GENERATED_BODY() + +public: + static constexpr uint8 RESULT_SUCCESS = 0; + static constexpr uint8 RESULT_MAP_DOES_NOT_EXIST = 1; + static constexpr uint8 RESULT_INVALID_MAP_DATA = 2; + static constexpr uint8 RESULT_INVALID_MAP_METADATA = 3; + static constexpr uint8 RESULT_UNDEFINED_FAILURE = 255; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FROSOccupancyGrid Map; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + uint8 Result = 0; + + FROSLoadMapRes() + { + } + + void SetFromROS2(const nav_msgs__srv__LoadMap_Response& in_ros_data) + { + Map.SetFromROS2(in_ros_data.map); + + Result = in_ros_data.result; + } + + void SetROS2(nav_msgs__srv__LoadMap_Response& out_ros_data) const + { + Map.SetROS2(out_ros_data.map); + + out_ros_data.result = Result; + } +}; + +UCLASS() +class RCLUE_API UROS2LoadMapSrv : public UROS2GenericSrv +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable) + virtual void Init() override; + + UFUNCTION(BlueprintCallable) + virtual void Fini() override; + + virtual const rosidl_service_type_support_t* GetTypeSupport() const override; + + // used by client + UFUNCTION(BlueprintCallable) + void SetRequest(const FROSLoadMapReq& Request); + + // used by service + UFUNCTION(BlueprintCallable) + void GetRequest(FROSLoadMapReq& Request) const; + + // used by service + UFUNCTION(BlueprintCallable) + void SetResponse(const FROSLoadMapRes& Response); + + // used by client + UFUNCTION(BlueprintCallable) + void GetResponse(FROSLoadMapRes& Response) const; + + virtual void* GetRequest() override; + virtual void* GetResponse() override; + + UFUNCTION(BlueprintCallable) + static uint8 CONST_RESULT_SUCCESS() + { + return FROSLoadMapRes::RESULT_SUCCESS; + } + UFUNCTION(BlueprintCallable) + static uint8 CONST_RESULT_MAP_DOES_NOT_EXIST() + { + return FROSLoadMapRes::RESULT_MAP_DOES_NOT_EXIST; + } + UFUNCTION(BlueprintCallable) + static uint8 CONST_RESULT_INVALID_MAP_DATA() + { + return FROSLoadMapRes::RESULT_INVALID_MAP_DATA; + } + UFUNCTION(BlueprintCallable) + static uint8 CONST_RESULT_INVALID_MAP_METADATA() + { + return FROSLoadMapRes::RESULT_INVALID_MAP_METADATA; + } + UFUNCTION(BlueprintCallable) + static uint8 CONST_RESULT_UNDEFINED_FAILURE() + { + return FROSLoadMapRes::RESULT_UNDEFINED_FAILURE; + } + +private: + virtual FString SrvRequestToString() const override; + virtual FString SrvResponseToString() const override; + + nav_msgs__srv__LoadMap_Request LoadMap_req; + nav_msgs__srv__LoadMap_Response LoadMap_res; +}; diff --git a/Source/rclUE/Public/Srvs/ROS2SelfTest.h b/Source/rclUE/Public/Srvs/ROS2SelfTest.h index 43a8b9c62..ae55e0f06 100644 --- a/Source/rclUE/Public/Srvs/ROS2SelfTest.h +++ b/Source/rclUE/Public/Srvs/ROS2SelfTest.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from diagnostic_msgs/srv/SelfTest.srv - do not modify #pragma once @@ -82,7 +82,7 @@ struct RCLUE_API FROSSelfTestRes } if (!diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(&out_ros_data.status, Status.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.status ")); } UROS2Utils::ArrayUEToROSSequence( Status, out_ros_data.status.data, Status.Num()); diff --git a/Source/rclUE/Public/Srvs/ROS2SetBool.h b/Source/rclUE/Public/Srvs/ROS2SetBool.h index 2cc3f3aee..81dc9b10e 100644 --- a/Source/rclUE/Public/Srvs/ROS2SetBool.h +++ b/Source/rclUE/Public/Srvs/ROS2SetBool.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/SetBool.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2SetCameraInfo.h b/Source/rclUE/Public/Srvs/ROS2SetCameraInfo.h index 3489cef89..3ecb11cd5 100644 --- a/Source/rclUE/Public/Srvs/ROS2SetCameraInfo.h +++ b/Source/rclUE/Public/Srvs/ROS2SetCameraInfo.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from sensor_msgs/srv/SetCameraInfo.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2SetEntityState.h b/Source/rclUE/Public/Srvs/ROS2SetEntityState.h index a6c9571a7..5af861dd2 100644 --- a/Source/rclUE/Public/Srvs/ROS2SetEntityState.h +++ b/Source/rclUE/Public/Srvs/ROS2SetEntityState.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SetEntityState.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2SetInt32.h b/Source/rclUE/Public/Srvs/ROS2SetInt32.h index 802cd045a..d9aadffb1 100644 --- a/Source/rclUE/Public/Srvs/ROS2SetInt32.h +++ b/Source/rclUE/Public/Srvs/ROS2SetInt32.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SetInt32.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2SetMap.h b/Source/rclUE/Public/Srvs/ROS2SetMap.h index baeeeffb5..0509e98aa 100644 --- a/Source/rclUE/Public/Srvs/ROS2SetMap.h +++ b/Source/rclUE/Public/Srvs/ROS2SetMap.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from nav_msgs/srv/SetMap.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2SpawnEntities.h b/Source/rclUE/Public/Srvs/ROS2SpawnEntities.h index 0fe0512e5..0b584baad 100644 --- a/Source/rclUE/Public/Srvs/ROS2SpawnEntities.h +++ b/Source/rclUE/Public/Srvs/ROS2SpawnEntities.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnEntities.srv - do not modify #pragma once @@ -65,7 +65,7 @@ struct RCLUE_API FROSSpawnEntitiesReq } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.type, Type.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.type ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.type ")); } UROS2Utils::StringArrayUEToROSSequence(Type, out_ros_data.type.data, Type.Num()); @@ -75,7 +75,7 @@ struct RCLUE_API FROSSpawnEntitiesReq } if (!ue_msgs__msg__EntityState__Sequence__init(&out_ros_data.state, State.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.state ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.state ")); } UROS2Utils::ArrayUEToROSSequence(State, out_ros_data.state.data, State.Num()); @@ -85,7 +85,7 @@ struct RCLUE_API FROSSpawnEntitiesReq } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.tags, Tags.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.tags ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.tags ")); } UROS2Utils::StringArrayUEToROSSequence(Tags, out_ros_data.tags.data, Tags.Num()); @@ -95,7 +95,7 @@ struct RCLUE_API FROSSpawnEntitiesReq } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.json_parameters, JsonParameters.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.json_parameters ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.json_parameters ")); } UROS2Utils::StringArrayUEToROSSequence(JsonParameters, out_ros_data.json_parameters.data, JsonParameters.Num()); } diff --git a/Source/rclUE/Public/Srvs/ROS2SpawnEntity.h b/Source/rclUE/Public/Srvs/ROS2SpawnEntity.h index 0075c826c..22e6d2f22 100644 --- a/Source/rclUE/Public/Srvs/ROS2SpawnEntity.h +++ b/Source/rclUE/Public/Srvs/ROS2SpawnEntity.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnEntity.srv - do not modify #pragma once @@ -73,7 +73,7 @@ struct RCLUE_API FROSSpawnEntityReq } if (!rosidl_runtime_c__String__Sequence__init(&out_ros_data.tags, Tags.Num())) { - UE_LOG(LogTemp, Error, TEXT("failed to create array for field out_ros_data.tags ")); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to create array for field out_ros_data.tags ")); } UROS2Utils::StringArrayUEToROSSequence(Tags, out_ros_data.tags.data, Tags.Num()); diff --git a/Source/rclUE/Public/Srvs/ROS2SpawnWorld.h b/Source/rclUE/Public/Srvs/ROS2SpawnWorld.h index b5d233e58..64de4448e 100644 --- a/Source/rclUE/Public/Srvs/ROS2SpawnWorld.h +++ b/Source/rclUE/Public/Srvs/ROS2SpawnWorld.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from ue_msgs/srv/SpawnWorld.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2StdSrvEmpty.h b/Source/rclUE/Public/Srvs/ROS2StdSrvEmpty.h index a3eef5469..d846c0278 100644 --- a/Source/rclUE/Public/Srvs/ROS2StdSrvEmpty.h +++ b/Source/rclUE/Public/Srvs/ROS2StdSrvEmpty.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/Empty.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2StdSrvSetBool.h b/Source/rclUE/Public/Srvs/ROS2StdSrvSetBool.h index ad45f007a..8f491dd01 100644 --- a/Source/rclUE/Public/Srvs/ROS2StdSrvSetBool.h +++ b/Source/rclUE/Public/Srvs/ROS2StdSrvSetBool.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/SetBool.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2StdSrvTrigger.h b/Source/rclUE/Public/Srvs/ROS2StdSrvTrigger.h index 8225133e8..b5e2107f7 100644 --- a/Source/rclUE/Public/Srvs/ROS2StdSrvTrigger.h +++ b/Source/rclUE/Public/Srvs/ROS2StdSrvTrigger.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from std_srvs/srv/Trigger.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2Trigger.h b/Source/rclUE/Public/Srvs/ROS2Trigger.h index 32d04866a..743c5e544 100644 --- a/Source/rclUE/Public/Srvs/ROS2Trigger.h +++ b/Source/rclUE/Public/Srvs/ROS2Trigger.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from example_interfaces/srv/Trigger.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/Srvs/ROS2UpdateFilename.h b/Source/rclUE/Public/Srvs/ROS2UpdateFilename.h index 3eb014385..1eb384d01 100644 --- a/Source/rclUE/Public/Srvs/ROS2UpdateFilename.h +++ b/Source/rclUE/Public/Srvs/ROS2UpdateFilename.h @@ -1,4 +1,4 @@ -// Copyright 2021 Rapyuta Robotics Co., Ltd. +// Copyright 2021-2025 Rapyuta Robotics Co., Ltd. // This code has been autogenerated from pcl_msgs/srv/UpdateFilename.srv - do not modify #pragma once diff --git a/Source/rclUE/Public/logUtilities.h b/Source/rclUE/Public/logUtilities.h new file mode 100644 index 000000000..32cd48854 --- /dev/null +++ b/Source/rclUE/Public/logUtilities.h @@ -0,0 +1,164 @@ +/** + * @file logUtilities.h + * @brief Header containing utilities for logging + * @todo should be in different Plugin since this is not directly related rclUE + * @copyright Copyright 2020-2022 Rapyuta Robotics Co., Ltd. + * + */ + +#pragma once + +// UE +#include "HAL/UnrealMemory.h" +#include "Kismet/GameplayStatics.h" +#include "Kismet/KismetSystemLibrary.h" +#include "Misc/EngineVersionComparison.h" + +#if UE_VERSION_NEWER_THAN(5, 5, 0) +#include "Engine/World.h" +#endif + +// Ref "Misc/GeneratedTypeName.h" +#if defined(_MSC_VER) && !defined(__clang__) +#define RCLUE_FUNC_LOG __FUNCSIG__ +#else +#define RCLUE_FUNC_LOG __PRETTY_FUNCTION__ +#endif + +//! Output Filename +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + +// clang-format off +// to avoid change line by clang-format. Doxygen can't handle constant macro with multiple lines. +/** + * @brief Log info joint with `, ` + * SIG is defined at GeneratedTypeName.h + * + */ +#define __LOG_INFO__ FString(__FILENAME__).Append(TEXT("@")).Append(FString::FromInt(__LINE__)).Append(TEXT(", ")).Append(RCLUE_FUNC_LOG) +// clang-format on + +/** + * UE_LOG with function info with __FUNCTION__ and __LINE__ . + * @param CategoryName name of the logging category + * @param Verbosity, verbosity level to test against + * @param Format, format text +*/ +#define UE_LOG_WITH_INFO(CategoryName, Verbosity, ...) \ + { \ + UE_LOG(CategoryName, Verbosity, TEXT("[%s] %s"), *__LOG_INFO__, *FString::Printf(__VA_ARGS__)); \ + } + +/** + * UE_LOG with function info with ::@ . + * @param CategoryName name of the logging category + * @param Verbosity, verbosity level to test against + * @param Format, format text +*/ +#define UE_LOG_WITH_INFO_SHORT(CategoryName, Verbosity, ...) \ + { \ + FString UE_LOG_WITH_INFO_Temp1, UE_LOG_WITH_INFO_Temp2; \ + FString(RCLUE_FUNC_LOG) \ + .Split( \ + TEXT("("), &UE_LOG_WITH_INFO_Temp1, &UE_LOG_WITH_INFO_Temp2, ESearchCase::CaseSensitive, ESearchDir::FromStart); \ + UE_LOG_WITH_INFO_Temp1.Split( \ + TEXT(" "), &UE_LOG_WITH_INFO_Temp1, &UE_LOG_WITH_INFO_Temp2, ESearchCase::CaseSensitive, ESearchDir::FromEnd); \ + UE_LOG(CategoryName, Verbosity, TEXT("[%s@%d] %s"), *UE_LOG_WITH_INFO_Temp2, __LINE__, *FString::Printf(__VA_ARGS__)); \ + } + +/** + * UE_LOG_WITH_INFO with GetName() + * @param CategoryName name of the logging category + * @param Verbosity, verbosity level to test against + * @param Format, format text +*/ +#define UE_LOG_WITH_INFO_NAMED(CategoryName, Verbosity, ...) \ + { \ + UE_LOG_WITH_INFO(CategoryName, Verbosity, TEXT("[%s] %s"), *GetName(), *FString::Printf(__VA_ARGS__)); \ + } + +/** + * UE_LOG_WITH_INFO_SHORT with GetName() + * @param CategoryName name of the logging category + * @param Verbosity, verbosity level to test against + * @param Format, format text +*/ +#define UE_LOG_WITH_INFO_SHORT_NAMED(CategoryName, Verbosity, ...) \ + { \ + UE_LOG_WITH_INFO_SHORT(CategoryName, Verbosity, TEXT("[%s] %s"), *GetName(), *FString::Printf(__VA_ARGS__)); \ + } + +/** + * @brief UE_LOG_THROTTLE will print a message at most once per InRate. + * @param InRate, time interval to print a message + * @param InLastHit, last time a message was printed + */ +#define UE_LOG_THROTTLE(InRate, InLastHit, ...) \ + { \ + float UE_LOG_THROTTLE_Now = UGameplayStatics::GetTimeSeconds(GetWorld()); \ + if (InLastHit + InRate <= UE_LOG_THROTTLE_Now) \ + { \ + InLastHit = UE_LOG_THROTTLE_Now; \ + UE_LOG(__VA_ARGS__); \ + } \ + } + +/** + * @brief UE_LOG_WITH_INFO_THROTTLE will print a message at most once per InRate. + * @param InRate, time interval to print a message + * @param InLastHit, last time a message was printed + */ +#define UE_LOG_WITH_INFO_THROTTLE(InRate, InLastHit, ...) \ + { \ + float UE_LOG_WITH_INFO_THROTTLE_Now = UGameplayStatics::GetTimeSeconds(GetWorld()); \ + if (InLastHit + InRate <= UE_LOG_WITH_INFO_THROTTLE_Now) \ + { \ + InLastHit = UE_LOG_WITH_INFO_THROTTLE_Now; \ + UE_LOG_WITH_INFO(__VA_ARGS__); \ + } \ + } + +/** + * @brief UE_LOG_WITH_INFO_SHORT_THROTTLE will print a message at most once per InRate. + * @param InRate, time interval to print a message + * @param InLastHit, last time a message was printed + */ +#define UE_LOG_WITH_INFO_SHORT_THROTTLE(InRate, InLastHit, ...) \ + { \ + float UE_LOG_WITH_INFO_THROTTLE_Now = UGameplayStatics::GetTimeSeconds(GetWorld()); \ + if (InLastHit + InRate <= UE_LOG_WITH_INFO_THROTTLE_Now) \ + { \ + InLastHit = UE_LOG_WITH_INFO_THROTTLE_Now; \ + UE_LOG_WITH_INFO_SHORT(__VA_ARGS__); \ + } \ + } + +/** + * @brief UE_LOG_WITH_INFO_NAMED_THROTTLE will print a message at most once per InRate. + * @param InRate, time interval to print a message + * @param InLastHit, last time a message was printed + */ +#define UE_LOG_WITH_INFO_NAMED_THROTTLE(InRate, InLastHit, ...) \ + { \ + float UE_LOG_WITH_INFO_NAMED_THROTTLE_Now = UGameplayStatics::GetTimeSeconds(GetWorld()); \ + if (InLastHit + InRate <= UE_LOG_WITH_INFO_NAMED_THROTTLE_Now) \ + { \ + InLastHit = UE_LOG_WITH_INFO_NAMED_THROTTLE_Now; \ + UE_LOG_WITH_INFO_NAMED(__VA_ARGS__); \ + } \ + } + +/** + * @brief UE_LOG_WITH_INFO_SHORT_NAMED_THROTTLE will print a message at most once per InRate. + * @param InRate, time interval to print a message + * @param InLastHit, last time a message was printed + */ +#define UE_LOG_WITH_INFO_SHORT_NAMED_THROTTLE(InRate, InLastHit, ...) \ + { \ + float UE_LOG_WITH_INFO_NAMED_THROTTLE_Now = UGameplayStatics::GetTimeSeconds(GetWorld()); \ + if (InLastHit + InRate <= UE_LOG_WITH_INFO_NAMED_THROTTLE_Now) \ + { \ + InLastHit = UE_LOG_WITH_INFO_NAMED_THROTTLE_Now; \ + UE_LOG_WITH_INFO_SHORT_NAMED(__VA_ARGS__); \ + } \ + } diff --git a/Source/rclUE/Public/rclcUtilities.h b/Source/rclUE/Public/rclcUtilities.h index 97d3f0603..0514758e6 100644 --- a/Source/rclUE/Public/rclcUtilities.h +++ b/Source/rclUE/Public/rclcUtilities.h @@ -17,6 +17,12 @@ #include "Kismet/GameplayStatics.h" #include "Kismet/KismetSystemLibrary.h" #include "UObject/Object.h" +#include "Misc/EngineVersionComparison.h" + +#if UE_VERSION_NEWER_THAN(5, 5, 0) +#include "Misc/App.h" +#include "TimerManager.h" +#endif // rclUE msgs #include "builtin_interfaces/msg/detail/time__struct.h" @@ -29,6 +35,7 @@ #include "std_msgs/msg/string.h" // rclUE others +#include "logUtilities.h" #include "rcl/graph.h" #include "rcl/wait.h" #include "rcl_action/wait.h" @@ -36,33 +43,34 @@ #include "rclcUtilities.generated.h" -/// Output Filename -#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) - -/// Log info joint with `::` -#define __LOG_INFO__ \ - FString(__FILENAME__).Append(TEXT("::")).Append(__FUNCTION__).Append(TEXT("::")).Append(FString::FromInt(__LINE__)) - DECLARE_LOG_CATEGORY_EXTERN(LogROS2, Log, All); -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Node, Log, All); -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Publisher, Log, All); -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Service, Log, All); -DECLARE_LOG_CATEGORY_EXTERN(LogROS2Action, Log, All); - -/// this macro can be used on rcl functions that return an error code -#define RCSOFTCHECK(fn) \ - { \ - rcl_ret_t temp_rc = fn; \ - if ((temp_rc != RCL_RET_OK)) \ - { \ - UE_LOG(LogTemp, \ - Error, \ - TEXT("Failed status on line %d (function %s): %d. Continuing."), \ - __LINE__, \ - *FString(__FUNCTION__), \ - (int)temp_rc); \ - check(temp_rc == 0) \ - } \ + +static TAutoConsoleVariable CVarRclUERcsSoftCheck( + TEXT("RCLUE.RCSOFTCHECK"), + 0, + TEXT("Exit UE with rcl function error or not.\n") + TEXT("<=0: Continue without exiting UE even with rcl functions return error code.") + TEXT(" 1: Exit UE with rcl functions error code.)\n"), + ECVF_Scalability | ECVF_RenderThreadSafe); + +//! this macro can be used on rcl functions that return an error code +#define RCSOFTCHECK(fn) \ + { \ + rcl_ret_t temp_rc = fn; \ + if ((temp_rc != RCL_RET_OK)) \ + { \ + UE_LOG_WITH_INFO(LogTemp, \ + Error, \ + TEXT("Failed status on line %d (function %s): %d. Continuing."), \ + __LINE__, \ + *FString(__FUNCTION__), \ + (int)temp_rc); \ + static const auto CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("RCLUE.RCSOFTCHECK")); \ + if (CVar->GetInt()) \ + { \ + check(temp_rc == 0); \ + } \ + } \ } /** @@ -81,7 +89,7 @@ enum UROS2State * also check rmw/types.h for details */ UENUM() -enum UROS2QoS +enum class UROS2QoS : uint8 { Default UMETA(DisplayName = "Default"), SensorData UMETA(DisplayName = "SensorData"), @@ -96,7 +104,7 @@ enum UROS2QoS UnknownQoS UMETA(DisplayName = "UnknownQoS"), }; -// profiles provided by rclUE +//! profiles provided by rclUE static const rmw_qos_profile_t rclUE_qos_profile_keep_last = {RMW_QOS_POLICY_HISTORY_KEEP_LAST, 1, RMW_QOS_POLICY_RELIABILITY_RELIABLE, @@ -107,9 +115,10 @@ static const rmw_qos_profile_t rclUE_qos_profile_keep_last = {RMW_QOS_POLICY_HIS RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, false}; +//! profiles provided by rclUE static const rmw_qos_profile_t rclUE_qos_profile_sensor_data = {RMW_QOS_POLICY_HISTORY_KEEP_LAST, 5, - RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT, RMW_QOS_POLICY_DURABILITY_VOLATILE, RMW_QOS_DEADLINE_DEFAULT, RMW_QOS_LIFESPAN_DEFAULT, @@ -117,6 +126,7 @@ static const rmw_qos_profile_t rclUE_qos_profile_sensor_data = {RMW_QOS_POLICY_H RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, false}; +//! profiles provided by rclUE static const rmw_qos_profile_t rclUE_qos_profile_clock_pub = {RMW_QOS_POLICY_HISTORY_KEEP_LAST, 10, RMW_QOS_POLICY_RELIABILITY_RELIABLE, @@ -127,6 +137,7 @@ static const rmw_qos_profile_t rclUE_qos_profile_clock_pub = {RMW_QOS_POLICY_HIS RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, false}; +//! profiles provided by rclUE static const rmw_qos_profile_t rclUE_qos_profile_dynamic_broadcaster = {RMW_QOS_POLICY_HISTORY_KEEP_LAST, 100, RMW_QOS_POLICY_RELIABILITY_RELIABLE, @@ -137,6 +148,7 @@ static const rmw_qos_profile_t rclUE_qos_profile_dynamic_broadcaster = {RMW_QOS_ RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, false}; +//! profiles provided by rclUE static const rmw_qos_profile_t rclUE_qos_profile_static_broadcaster = {RMW_QOS_POLICY_HISTORY_KEEP_LAST, 1, RMW_QOS_POLICY_RELIABILITY_RELIABLE, @@ -147,19 +159,117 @@ static const rmw_qos_profile_t rclUE_qos_profile_static_broadcaster = {RMW_QOS_P RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, false}; -// Look-Up Table matching enum with rcl profiles -static const TMap, rmw_qos_profile_t> QoS_LUT = { - {UROS2QoS::Default, rmw_qos_profile_default}, - {UROS2QoS::SensorData, rclUE_qos_profile_sensor_data}, - {UROS2QoS::DynamicBroadcaster, rclUE_qos_profile_dynamic_broadcaster}, - {UROS2QoS::StaticBroadcaster, rclUE_qos_profile_static_broadcaster}, - {UROS2QoS::ClockPub, rclUE_qos_profile_clock_pub}, - {UROS2QoS::KeepLast, rclUE_qos_profile_keep_last}, - {UROS2QoS::Parameters, rmw_qos_profile_parameters}, - {UROS2QoS::Services, rmw_qos_profile_services_default}, - {UROS2QoS::ParameterEvents, rmw_qos_profile_parameter_events}, - {UROS2QoS::System, rmw_qos_profile_system_default}, - {UROS2QoS::UnknownQoS, rmw_qos_profile_unknown}}; +//! Look-Up Table matching enum with rcl profiles +static const TMap QoS_LUT = {{UROS2QoS::Default, rmw_qos_profile_default}, + {UROS2QoS::SensorData, rclUE_qos_profile_sensor_data}, + {UROS2QoS::DynamicBroadcaster, rclUE_qos_profile_dynamic_broadcaster}, + {UROS2QoS::StaticBroadcaster, rclUE_qos_profile_static_broadcaster}, + {UROS2QoS::ClockPub, rclUE_qos_profile_clock_pub}, + {UROS2QoS::KeepLast, rclUE_qos_profile_keep_last}, + {UROS2QoS::Parameters, rmw_qos_profile_parameters}, + {UROS2QoS::Services, rmw_qos_profile_services_default}, + {UROS2QoS::ParameterEvents, rmw_qos_profile_parameter_events}, + {UROS2QoS::System, rmw_qos_profile_system_default}, + {UROS2QoS::UnknownQoS, rmw_qos_profile_unknown}}; + +/** + * @brief Custom timer manager. This try to execute delegate at a given fixed rate. + * Default timer wait given rate from last execution, this timer wait given rate from desired execution time. + */ +UCLASS() +class URRTimerManager : public UObject +{ + GENERATED_BODY() +public: + FString LogInfo; + +protected: + UPROPERTY() + bool bEnabled = true; + + UPROPERTY() + float Rate = 0.f; + + UPROPERTY() + float DesiredTime = 0.f; + + //! Timer handler for periodic publisher + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + FTimerHandle TimerHandle; + + FTimerDelegate Delegate; + + FTimerDelegate TimerDelegate; + + //! internal property used to log throttle. + UPROPERTY() + float LogLastHit = 0.f; + +public: + void StopTimer() + { + bEnabled = false; + GetWorld()->GetTimerManager().ClearTimer(TimerHandle); + UE_LOG_WITH_INFO(LogTemp, Log, TEXT("[%s] Timer stopped"), *LogInfo); + } + + void SetTimer(FTimerDelegate const& InDelegate, float InRate) + { + StopTimer(); + Rate = InRate; + Delegate = InDelegate; + bEnabled = true; + DesiredTime = UGameplayStatics::GetTimeSeconds(GetWorld()) + Rate; + + TimerDelegate = FTimerDelegate::CreateUObject(this, &URRTimerManager::SetTimerImple); + GetWorld()->GetTimerManager().SetTimer(TimerHandle, TimerDelegate, Rate, false); + UE_LOG_WITH_INFO(LogTemp, Log, TEXT("[%s] Timer started"), *LogInfo); + } + + void SetTimerImple() + { + if (!bEnabled) + { + bEnabled = true; + return; + } + + // function call. Make sure delegate is bound. + if (Delegate.IsBound()) + { + Delegate.ExecuteIfBound(); + } + else + { + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("[%s] Delegate is not bound"), *LogInfo); + } + + float now = UGameplayStatics::GetTimeSeconds(GetWorld()); + + // update DesiredTime + DesiredTime += Rate; + + float wt = DesiredTime - now; + if (wt <= 0) + { + UE_LOG_WITH_INFO_THROTTLE(5, + LogLastHit, + LogTemp, + Warning, + TEXT("[%s] Delegate function call take longer than Rate or StepSize is not " + "small enough to meet target Rate=%f, " + "StepSize=%f."), + *LogInfo, + Rate, + FApp::GetFixedDeltaTime()); + // Make sure that function call happens at next tick. + wt = FApp::GetFixedDeltaTime() * 0.5; + DesiredTime = now + wt; + } + // define lambda + GetWorld()->GetTimerManager().SetTimer(TimerHandle, TimerDelegate, wt, false); + } +}; UCLASS() class UROS2Utils : public UBlueprintFunctionLibrary @@ -167,6 +277,39 @@ class UROS2Utils : public UBlueprintFunctionLibrary GENERATED_BODY() public: + static bool IsEqualRWMRequestId(rmw_request_id_t service1, rmw_request_id_t service2) + { + if (service1.sequence_number != service2.sequence_number) + { + return false; + } + for (int i = 0; i < 16; i++) + { + if (service1.writer_guid[i] != service2.writer_guid[i]) + { + return false; + } + } + return true; + } + + static bool IsEqualWMSrvInfo(rmw_service_info_t service1, rmw_service_info_t service2, bool check_received_timestamp = true) + { + if (!UROS2Utils::IsEqualRWMRequestId(service1.request_id, service2.request_id)) + { + return false; + } + if (service1.source_timestamp != service2.source_timestamp) + { + return false; + } + if (check_received_timestamp && service1.received_timestamp != service2.received_timestamp) + { + return false; + } + return true; + } + static builtin_interfaces__msg__Time FloatToROSStamp(const float InTimeSec) { builtin_interfaces__msg__Time stamp; @@ -185,7 +328,7 @@ class UROS2Utils : public UBlueprintFunctionLibrary return InTimeStamp.sec + InTimeStamp.nanosec * 1e-09f; } - static void GenerateRandomUUID16(TArray>& OutUUID) + static void GenerateRandomUUID16(TArray>& OutUUID) { OutUUID.Reset(); for (int8 i = 0; i < 16; i++) @@ -351,7 +494,7 @@ class UROS2Utils : public UBlueprintFunctionLibrary bool succeeded = rosidl_runtime_c__String__assign(&OutStr, TCHAR_TO_ANSI(*InStr)); if (!succeeded) { - UE_LOG(LogTemp, Error, TEXT("failed to assign string : %s"), *InStr); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to assign string : %s"), *InStr); return false; } @@ -375,7 +518,7 @@ class UROS2Utils : public UBlueprintFunctionLibrary bool succeeded = rosidl_runtime_c__U16String__assignn_from_char(&OutStr, TCHAR_TO_ANSI(*InStr), InStr.Len()); if (!succeeded) { - UE_LOG(LogTemp, Error, TEXT("failed to assign u16string : %s"), *InStr); + UE_LOG_WITH_INFO(LogTemp, Error, TEXT("failed to assign u16string : %s"), *InStr); return false; } diff --git a/Source/rclUE/rclUE.Build.cs b/Source/rclUE/rclUE.Build.cs index 4464f0f2b..dbf0ef60a 100644 --- a/Source/rclUE/rclUE.Build.cs +++ b/Source/rclUE/rclUE.Build.cs @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Rapyuta Robotics Co., Ltd. +// Copyright 2020-2023 Rapyuta Robotics Co., Ltd. using System; using System.IO; @@ -16,12 +16,21 @@ private string RosPath private void AddModule(string InModulePath, bool bInCopySharedLibsToOutputDir = false) { string includePath = Path.Combine(InModulePath, "include"); - + + // since ros2 humble has include path like ue_msgs/ue_msgs/msgs instead of ue_msgs/msgs if(Directory.Exists(includePath)) { PublicIncludePaths.Add(includePath); + Console.WriteLine("== Add [rclUE] include:"); + var includes = Directory.EnumerateDirectories(includePath); + foreach (var include in includes) + { + Console.WriteLine(include); + PublicIncludePaths.Add(include); + } + } - + string libPath = Path.Combine(InModulePath, "lib"); if(Directory.Exists(libPath)) @@ -30,7 +39,7 @@ private void AddModule(string InModulePath, bool bInCopySharedLibsToOutputDir = PublicRuntimeLibraryPaths.Add(libPath); PrivateRuntimeLibraryPaths.Add(libPath); var libs = Directory.EnumerateFiles(libPath, "*.so", SearchOption.TopDirectoryOnly); //.Union(Directory.EnumerateFiles(libPath, "*.so.*", searchOption)); - + Console.WriteLine("== Add [rclUE] libs:"); foreach (var lib in libs) { @@ -58,7 +67,7 @@ public rclUE(ReadOnlyTargetRules Target) : base(Target) { Console.WriteLine(string.Format("[rclUE] LD_LIBRARY_PATH: {0}", envVars[ldLibraryPathKey])); } - + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; CppStandard = CppStandardVersion.Cpp17; if (Target.Platform == UnrealTargetPlatform.Linux) @@ -70,7 +79,7 @@ public rclUE(ReadOnlyTargetRules Target) : base(Target) PublicIncludePaths.Add(Path.Combine(ModuleDirectory,"Public")); PrivateIncludePaths.Add(Path.Combine(ModuleDirectory,"Private")); - + PublicDependencyModuleNames.AddRange( new string[] { @@ -81,4 +90,4 @@ public rclUE(ReadOnlyTargetRules Target) : base(Target) } ); } -} \ No newline at end of file +} diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__builder.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__builder.hpp similarity index 96% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__builder.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__builder.hpp index 59d42fc49..a54a35318 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__builder.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__builder.hpp @@ -5,11 +5,12 @@ #ifndef ACTION_MSGS__MSG__DETAIL__GOAL_INFO__BUILDER_HPP_ #define ACTION_MSGS__MSG__DETAIL__GOAL_INFO__BUILDER_HPP_ -#include "action_msgs/msg/detail/goal_info__struct.hpp" -#include #include #include +#include "action_msgs/msg/detail/goal_info__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace action_msgs { diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__functions.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__functions.c similarity index 91% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__functions.c rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__functions.c index 9bacc0d47..30930cd78 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__functions.c +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__functions.c @@ -237,22 +237,27 @@ action_msgs__msg__GoalInfo__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(action_msgs__msg__GoalInfo); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); action_msgs__msg__GoalInfo * data = - (action_msgs__msg__GoalInfo *)realloc(output->data, allocation_size); + (action_msgs__msg__GoalInfo *)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 (!action_msgs__msg__GoalInfo__init(&data[i])) { - /* free currently allocated and return false */ + if (!action_msgs__msg__GoalInfo__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; ) { - action_msgs__msg__GoalInfo__fini(&data[i]); + action_msgs__msg__GoalInfo__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__functions.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__functions.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__functions.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__functions.h diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h index d63f934bc..4ab36316d 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_action_msgs__msg__GoalInfo( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs size_t max_serialized_size_action_msgs__msg__GoalInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp index 0ffe7de00..9526d63b0 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs max_serialized_size_GoalInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.h similarity index 90% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.h index c539f7bc0..a2735d27f 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.h +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.h @@ -23,10 +23,14 @@ extern "C" // Member 'stamp' #include "builtin_interfaces/msg/detail/time__struct.h" -// Struct defined in msg/GoalInfo in the package action_msgs. +/// Struct defined in msg/GoalInfo in the package action_msgs. +/** + * Goal ID + */ typedef struct action_msgs__msg__GoalInfo { unique_identifier_msgs__msg__UUID goal_id; + /// Time when the goal was accepted builtin_interfaces__msg__Time stamp; } action_msgs__msg__GoalInfo; diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.hpp similarity index 97% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.hpp index b68c67654..05faa599d 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__struct.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__struct.hpp @@ -5,14 +5,15 @@ #ifndef ACTION_MSGS__MSG__DETAIL__GOAL_INFO__STRUCT_HPP_ #define ACTION_MSGS__MSG__DETAIL__GOAL_INFO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'goal_id' diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__traits.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__traits.hpp new file mode 100644 index 000000000..b67a1ca47 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from action_msgs:msg/GoalInfo.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "action_msgs/msg/detail/goal_info__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'goal_id' +#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace action_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalInfo & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalInfo & 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 action_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use action_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const action_msgs::msg::GoalInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + action_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use action_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const action_msgs::msg::GoalInfo & msg) +{ + return action_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "action_msgs::msg::GoalInfo"; +} + +template<> +inline const char * name() +{ + return "action_msgs/msg/GoalInfo"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.c new file mode 100644 index 000000000..6ec368c60 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from action_msgs:msg/GoalInfo.idl +// generated code does not contain a copyright notice + +#include +#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" +#include "action_msgs/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 "action_msgs/msg/detail/goal_info__functions.h" +#include "action_msgs/msg/detail/goal_info__struct.h" + + +// Include directives for member types +// Member `goal_id` +#include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_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; + action_msgs__msg__GoalInfo__init(message_memory); +} + +void action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_fini_function(void * message_memory) +{ + action_msgs__msg__GoalInfo__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[2] = { + { + "goal_id", // 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(action_msgs__msg__GoalInfo, goal_id), // 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 + }, + { + "stamp", // 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(action_msgs__msg__GoalInfo, stamp), // 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 action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_members = { + "action_msgs__msg", // message namespace + "GoalInfo", // message name + 2, // number of fields + sizeof(action_msgs__msg__GoalInfo), + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array, // message members + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_init_function, // function to initialize message memory (memory has to be allocated) + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_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 action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle = { + 0, + &action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)() { + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle.typesupport_identifier) { + action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &action_msgs__msg__GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.cpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.cpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.cpp index 3106b8bd5..e2c3b11bc 100644 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.cpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalInfo_mess 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalInfo_mess 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 } }; diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.hpp new file mode 100644 index 000000000..11ff96f0e --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_info__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from action_msgs:msg/GoalInfo.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TYPE_SUPPORT_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "action_msgs/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_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + msg, + GoalInfo +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__builder.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__builder.hpp new file mode 100644 index 000000000..d686acac0 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ + +#include +#include + +#include "action_msgs/msg/detail/goal_status__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace action_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_GoalStatus_status +{ +public: + explicit Init_GoalStatus_status(::action_msgs::msg::GoalStatus & msg) + : msg_(msg) + {} + ::action_msgs::msg::GoalStatus status(::action_msgs::msg::GoalStatus::_status_type arg) + { + msg_.status = std::move(arg); + return std::move(msg_); + } + +private: + ::action_msgs::msg::GoalStatus msg_; +}; + +class Init_GoalStatus_goal_info +{ +public: + Init_GoalStatus_goal_info() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_GoalStatus_status goal_info(::action_msgs::msg::GoalStatus::_goal_info_type arg) + { + msg_.goal_info = std::move(arg); + return Init_GoalStatus_status(msg_); + } + +private: + ::action_msgs::msg::GoalStatus msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::action_msgs::msg::GoalStatus>() +{ + return action_msgs::msg::builder::Init_GoalStatus_goal_info(); +} + +} // namespace action_msgs + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__functions.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__functions.c new file mode 100644 index 000000000..adb1400df --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__functions.c @@ -0,0 +1,259 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice +#include "action_msgs/msg/detail/goal_status__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `goal_info` +#include "action_msgs/msg/detail/goal_info__functions.h" + +bool +action_msgs__msg__GoalStatus__init(action_msgs__msg__GoalStatus * msg) +{ + if (!msg) { + return false; + } + // goal_info + if (!action_msgs__msg__GoalInfo__init(&msg->goal_info)) { + action_msgs__msg__GoalStatus__fini(msg); + return false; + } + // status + return true; +} + +void +action_msgs__msg__GoalStatus__fini(action_msgs__msg__GoalStatus * msg) +{ + if (!msg) { + return; + } + // goal_info + action_msgs__msg__GoalInfo__fini(&msg->goal_info); + // status +} + +bool +action_msgs__msg__GoalStatus__are_equal(const action_msgs__msg__GoalStatus * lhs, const action_msgs__msg__GoalStatus * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // goal_info + if (!action_msgs__msg__GoalInfo__are_equal( + &(lhs->goal_info), &(rhs->goal_info))) + { + return false; + } + // status + if (lhs->status != rhs->status) { + return false; + } + return true; +} + +bool +action_msgs__msg__GoalStatus__copy( + const action_msgs__msg__GoalStatus * input, + action_msgs__msg__GoalStatus * output) +{ + if (!input || !output) { + return false; + } + // goal_info + if (!action_msgs__msg__GoalInfo__copy( + &(input->goal_info), &(output->goal_info))) + { + return false; + } + // status + output->status = input->status; + return true; +} + +action_msgs__msg__GoalStatus * +action_msgs__msg__GoalStatus__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatus * msg = (action_msgs__msg__GoalStatus *)allocator.allocate(sizeof(action_msgs__msg__GoalStatus), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(action_msgs__msg__GoalStatus)); + bool success = action_msgs__msg__GoalStatus__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +action_msgs__msg__GoalStatus__destroy(action_msgs__msg__GoalStatus * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + action_msgs__msg__GoalStatus__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +action_msgs__msg__GoalStatus__Sequence__init(action_msgs__msg__GoalStatus__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatus * data = NULL; + + if (size) { + data = (action_msgs__msg__GoalStatus *)allocator.zero_allocate(size, sizeof(action_msgs__msg__GoalStatus), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = action_msgs__msg__GoalStatus__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + action_msgs__msg__GoalStatus__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +action_msgs__msg__GoalStatus__Sequence__fini(action_msgs__msg__GoalStatus__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) { + action_msgs__msg__GoalStatus__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); + } +} + +action_msgs__msg__GoalStatus__Sequence * +action_msgs__msg__GoalStatus__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatus__Sequence * array = (action_msgs__msg__GoalStatus__Sequence *)allocator.allocate(sizeof(action_msgs__msg__GoalStatus__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = action_msgs__msg__GoalStatus__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +action_msgs__msg__GoalStatus__Sequence__destroy(action_msgs__msg__GoalStatus__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + action_msgs__msg__GoalStatus__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +action_msgs__msg__GoalStatus__Sequence__are_equal(const action_msgs__msg__GoalStatus__Sequence * lhs, const action_msgs__msg__GoalStatus__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!action_msgs__msg__GoalStatus__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +action_msgs__msg__GoalStatus__Sequence__copy( + const action_msgs__msg__GoalStatus__Sequence * input, + action_msgs__msg__GoalStatus__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(action_msgs__msg__GoalStatus); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatus * data = + (action_msgs__msg__GoalStatus *)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 (!action_msgs__msg__GoalStatus__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; ) { + action_msgs__msg__GoalStatus__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!action_msgs__msg__GoalStatus__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__functions.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__functions.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status__functions.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__functions.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..8e302925c --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +size_t get_serialized_size_action_msgs__msg__GoalStatus( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +size_t max_serialized_size_action_msgs__msg__GoalStatus( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, action_msgs, msg, GoalStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ed142184a --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "action_msgs/msg/detail/goal_status__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 action_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +cdr_serialize( + const action_msgs::msg::GoalStatus & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + action_msgs::msg::GoalStatus & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +get_serialized_size( + const action_msgs::msg::GoalStatus & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +max_serialized_size_GoalStatus( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace action_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, action_msgs, msg, GoalStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.h new file mode 100644 index 000000000..4d7b9c979 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.h @@ -0,0 +1,117 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'STATUS_UNKNOWN'. +/** + * Indicates status has not been properly set. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_UNKNOWN = 0 +}; + +/// Constant 'STATUS_ACCEPTED'. +/** + * The goal has been accepted and is awaiting execution. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_ACCEPTED = 1 +}; + +/// Constant 'STATUS_EXECUTING'. +/** + * The goal is currently being executed by the action server. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_EXECUTING = 2 +}; + +/// Constant 'STATUS_CANCELING'. +/** + * The client has requested that the goal be canceled and the action server has + * accepted the cancel request. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_CANCELING = 3 +}; + +/// Constant 'STATUS_SUCCEEDED'. +/** + * The goal was achieved successfully by the action server. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_SUCCEEDED = 4 +}; + +/// Constant 'STATUS_CANCELED'. +/** + * The goal was canceled after an external request from an action client. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_CANCELED = 5 +}; + +/// Constant 'STATUS_ABORTED'. +/** + * The goal was terminated by the action server without an external request. + */ +enum +{ + action_msgs__msg__GoalStatus__STATUS_ABORTED = 6 +}; + +// Include directives for member types +// Member 'goal_info' +#include "action_msgs/msg/detail/goal_info__struct.h" + +/// Struct defined in msg/GoalStatus in the package action_msgs. +/** + * An action goal can be in one of these states after it is accepted by an action + * server. + * + * For more information, see http://design.ros2.org/articles/actions.html + */ +typedef struct action_msgs__msg__GoalStatus +{ + /// Goal info (contains ID and timestamp). + action_msgs__msg__GoalInfo goal_info; + /// Action goal state-machine status. + int8_t status; +} action_msgs__msg__GoalStatus; + +// Struct for a sequence of action_msgs__msg__GoalStatus. +typedef struct action_msgs__msg__GoalStatus__Sequence +{ + action_msgs__msg__GoalStatus * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} action_msgs__msg__GoalStatus__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.hpp new file mode 100644 index 000000000..ffd3d0d90 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__struct.hpp @@ -0,0 +1,197 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'goal_info' +#include "action_msgs/msg/detail/goal_info__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__action_msgs__msg__GoalStatus __attribute__((deprecated)) +#else +# define DEPRECATED__action_msgs__msg__GoalStatus __declspec(deprecated) +#endif + +namespace action_msgs +{ + +namespace msg +{ + +// message struct +template +struct GoalStatus_ +{ + using Type = GoalStatus_; + + explicit GoalStatus_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : goal_info(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->status = 0; + } + } + + explicit GoalStatus_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : goal_info(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->status = 0; + } + } + + // field types and members + using _goal_info_type = + action_msgs::msg::GoalInfo_; + _goal_info_type goal_info; + using _status_type = + int8_t; + _status_type status; + + // setters for named parameter idiom + Type & set__goal_info( + const action_msgs::msg::GoalInfo_ & _arg) + { + this->goal_info = _arg; + return *this; + } + Type & set__status( + const int8_t & _arg) + { + this->status = _arg; + return *this; + } + + // constant declarations + static constexpr int8_t STATUS_UNKNOWN = + 0; + static constexpr int8_t STATUS_ACCEPTED = + 1; + static constexpr int8_t STATUS_EXECUTING = + 2; + static constexpr int8_t STATUS_CANCELING = + 3; + static constexpr int8_t STATUS_SUCCEEDED = + 4; + static constexpr int8_t STATUS_CANCELED = + 5; + static constexpr int8_t STATUS_ABORTED = + 6; + + // pointer types + using RawPtr = + action_msgs::msg::GoalStatus_ *; + using ConstRawPtr = + const action_msgs::msg::GoalStatus_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__action_msgs__msg__GoalStatus + std::shared_ptr> + Ptr; + typedef DEPRECATED__action_msgs__msg__GoalStatus + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const GoalStatus_ & other) const + { + if (this->goal_info != other.goal_info) { + return false; + } + if (this->status != other.status) { + return false; + } + return true; + } + bool operator!=(const GoalStatus_ & other) const + { + return !this->operator==(other); + } +}; // struct GoalStatus_ + +// alias to use template instance with default allocator +using GoalStatus = + action_msgs::msg::GoalStatus_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_UNKNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_ACCEPTED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_EXECUTING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_CANCELING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_SUCCEEDED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_CANCELED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int8_t GoalStatus_::STATUS_ABORTED; +#endif // __cplusplus < 201703L + +} // namespace msg + +} // namespace action_msgs + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__traits.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__traits.hpp new file mode 100644 index 000000000..10d458da7 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "action_msgs/msg/detail/goal_status__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'goal_info' +#include "action_msgs/msg/detail/goal_info__traits.hpp" + +namespace action_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalStatus & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_info + { + out << "goal_info: "; + to_flow_style_yaml(msg.goal_info, out); + out << ", "; + } + + // member: status + { + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_info + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_info:\n"; + to_block_style_yaml(msg.goal_info, out, indentation + 2); + } + + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalStatus & 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 action_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use action_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const action_msgs::msg::GoalStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + action_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use action_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const action_msgs::msg::GoalStatus & msg) +{ + return action_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "action_msgs::msg::GoalStatus"; +} + +template<> +inline const char * name() +{ + return "action_msgs/msg/GoalStatus"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.c new file mode 100644 index 000000000..5af5e27ac --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.c @@ -0,0 +1,108 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#include +#include "action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" +#include "action_msgs/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 "action_msgs/msg/detail/goal_status__functions.h" +#include "action_msgs/msg/detail/goal_status__struct.h" + + +// Include directives for member types +// Member `goal_info` +#include "action_msgs/msg/goal_info.h" +// Member `goal_info` +#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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; + action_msgs__msg__GoalStatus__init(message_memory); +} + +void action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_fini_function(void * message_memory) +{ + action_msgs__msg__GoalStatus__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[2] = { + { + "goal_info", // 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(action_msgs__msg__GoalStatus, goal_info), // 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 + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs__msg__GoalStatus, status), // 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 action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members = { + "action_msgs__msg", // message namespace + "GoalStatus", // message name + 2, // number of fields + sizeof(action_msgs__msg__GoalStatus), + action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array, // message members + action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) + action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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 action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle = { + 0, + &action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatus)() { + action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); + if (!action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier) { + action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &action_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.cpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.cpp new file mode 100644 index 000000000..687a56aaa --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.cpp @@ -0,0 +1,126 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from action_msgs:msg/GoalStatus.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 "action_msgs/msg/detail/goal_status__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 action_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void GoalStatus_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) action_msgs::msg::GoalStatus(_init); +} + +void GoalStatus_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~GoalStatus(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatus_message_member_array[2] = { + { + "goal_info", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs::msg::GoalStatus, goal_info), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr, // fetch(index, &value) function pointer + nullptr, // assign(index, value) function pointer + nullptr // resize(index) function pointer + }, + { + "status", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs::msg::GoalStatus, status), // 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 GoalStatus_message_members = { + "action_msgs::msg", // message namespace + "GoalStatus", // message name + 2, // number of fields + sizeof(action_msgs::msg::GoalStatus), + GoalStatus_message_member_array, // message members + GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) + GoalStatus_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t GoalStatus_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &GoalStatus_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace action_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_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, action_msgs, msg, GoalStatus)() { + return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.hpp new file mode 100644 index 000000000..9231d9ed0 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from action_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "action_msgs/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_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + msg, + GoalStatus +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__builder.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__builder.hpp new file mode 100644 index 000000000..d09ebfcf3 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "action_msgs/msg/detail/goal_status_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace action_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_GoalStatusArray_status_list +{ +public: + Init_GoalStatusArray_status_list() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::action_msgs::msg::GoalStatusArray status_list(::action_msgs::msg::GoalStatusArray::_status_list_type arg) + { + msg_.status_list = std::move(arg); + return std::move(msg_); + } + +private: + ::action_msgs::msg::GoalStatusArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::action_msgs::msg::GoalStatusArray>() +{ + return action_msgs::msg::builder::Init_GoalStatusArray_status_list(); +} + +} // namespace action_msgs + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__functions.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__functions.c new file mode 100644 index 000000000..42296edfc --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__functions.c @@ -0,0 +1,251 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice +#include "action_msgs/msg/detail/goal_status_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `status_list` +#include "action_msgs/msg/detail/goal_status__functions.h" + +bool +action_msgs__msg__GoalStatusArray__init(action_msgs__msg__GoalStatusArray * msg) +{ + if (!msg) { + return false; + } + // status_list + if (!action_msgs__msg__GoalStatus__Sequence__init(&msg->status_list, 0)) { + action_msgs__msg__GoalStatusArray__fini(msg); + return false; + } + return true; +} + +void +action_msgs__msg__GoalStatusArray__fini(action_msgs__msg__GoalStatusArray * msg) +{ + if (!msg) { + return; + } + // status_list + action_msgs__msg__GoalStatus__Sequence__fini(&msg->status_list); +} + +bool +action_msgs__msg__GoalStatusArray__are_equal(const action_msgs__msg__GoalStatusArray * lhs, const action_msgs__msg__GoalStatusArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // status_list + if (!action_msgs__msg__GoalStatus__Sequence__are_equal( + &(lhs->status_list), &(rhs->status_list))) + { + return false; + } + return true; +} + +bool +action_msgs__msg__GoalStatusArray__copy( + const action_msgs__msg__GoalStatusArray * input, + action_msgs__msg__GoalStatusArray * output) +{ + if (!input || !output) { + return false; + } + // status_list + if (!action_msgs__msg__GoalStatus__Sequence__copy( + &(input->status_list), &(output->status_list))) + { + return false; + } + return true; +} + +action_msgs__msg__GoalStatusArray * +action_msgs__msg__GoalStatusArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatusArray * msg = (action_msgs__msg__GoalStatusArray *)allocator.allocate(sizeof(action_msgs__msg__GoalStatusArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(action_msgs__msg__GoalStatusArray)); + bool success = action_msgs__msg__GoalStatusArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +action_msgs__msg__GoalStatusArray__destroy(action_msgs__msg__GoalStatusArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + action_msgs__msg__GoalStatusArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +action_msgs__msg__GoalStatusArray__Sequence__init(action_msgs__msg__GoalStatusArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatusArray * data = NULL; + + if (size) { + data = (action_msgs__msg__GoalStatusArray *)allocator.zero_allocate(size, sizeof(action_msgs__msg__GoalStatusArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = action_msgs__msg__GoalStatusArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + action_msgs__msg__GoalStatusArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +action_msgs__msg__GoalStatusArray__Sequence__fini(action_msgs__msg__GoalStatusArray__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) { + action_msgs__msg__GoalStatusArray__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); + } +} + +action_msgs__msg__GoalStatusArray__Sequence * +action_msgs__msg__GoalStatusArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatusArray__Sequence * array = (action_msgs__msg__GoalStatusArray__Sequence *)allocator.allocate(sizeof(action_msgs__msg__GoalStatusArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = action_msgs__msg__GoalStatusArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +action_msgs__msg__GoalStatusArray__Sequence__destroy(action_msgs__msg__GoalStatusArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + action_msgs__msg__GoalStatusArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +action_msgs__msg__GoalStatusArray__Sequence__are_equal(const action_msgs__msg__GoalStatusArray__Sequence * lhs, const action_msgs__msg__GoalStatusArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!action_msgs__msg__GoalStatusArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +action_msgs__msg__GoalStatusArray__Sequence__copy( + const action_msgs__msg__GoalStatusArray__Sequence * input, + action_msgs__msg__GoalStatusArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(action_msgs__msg__GoalStatusArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + action_msgs__msg__GoalStatusArray * data = + (action_msgs__msg__GoalStatusArray *)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 (!action_msgs__msg__GoalStatusArray__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; ) { + action_msgs__msg__GoalStatusArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!action_msgs__msg__GoalStatusArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__functions.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__functions.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__functions.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__functions.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2efd033a1 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +size_t get_serialized_size_action_msgs__msg__GoalStatusArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +size_t max_serialized_size_action_msgs__msg__GoalStatusArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, action_msgs, msg, GoalStatusArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..1558ddafd --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "action_msgs/msg/detail/goal_status_array__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 action_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +cdr_serialize( + const action_msgs::msg::GoalStatusArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + action_msgs::msg::GoalStatusArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +get_serialized_size( + const action_msgs::msg::GoalStatusArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +max_serialized_size_GoalStatusArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace action_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, action_msgs, msg, GoalStatusArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.h new file mode 100644 index 000000000..314ec50a8 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.h @@ -0,0 +1,47 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'status_list' +#include "action_msgs/msg/detail/goal_status__struct.h" + +/// Struct defined in msg/GoalStatusArray in the package action_msgs. +/** + * An array of goal statuses. + */ +typedef struct action_msgs__msg__GoalStatusArray +{ + action_msgs__msg__GoalStatus__Sequence status_list; +} action_msgs__msg__GoalStatusArray; + +// Struct for a sequence of action_msgs__msg__GoalStatusArray. +typedef struct action_msgs__msg__GoalStatusArray__Sequence +{ + action_msgs__msg__GoalStatusArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} action_msgs__msg__GoalStatusArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.hpp new file mode 100644 index 000000000..95e55298e --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__struct.hpp @@ -0,0 +1,127 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'status_list' +#include "action_msgs/msg/detail/goal_status__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__action_msgs__msg__GoalStatusArray __attribute__((deprecated)) +#else +# define DEPRECATED__action_msgs__msg__GoalStatusArray __declspec(deprecated) +#endif + +namespace action_msgs +{ + +namespace msg +{ + +// message struct +template +struct GoalStatusArray_ +{ + using Type = GoalStatusArray_; + + explicit GoalStatusArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + } + + explicit GoalStatusArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + (void)_alloc; + } + + // field types and members + using _status_list_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _status_list_type status_list; + + // setters for named parameter idiom + Type & set__status_list( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->status_list = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + action_msgs::msg::GoalStatusArray_ *; + using ConstRawPtr = + const action_msgs::msg::GoalStatusArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__action_msgs__msg__GoalStatusArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__action_msgs__msg__GoalStatusArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const GoalStatusArray_ & other) const + { + if (this->status_list != other.status_list) { + return false; + } + return true; + } + bool operator!=(const GoalStatusArray_ & other) const + { + return !this->operator==(other); + } +}; // struct GoalStatusArray_ + +// alias to use template instance with default allocator +using GoalStatusArray = + action_msgs::msg::GoalStatusArray_>; + +// constant definitions + +} // namespace msg + +} // namespace action_msgs + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__traits.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__traits.hpp new file mode 100644 index 000000000..1ca556032 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__traits.hpp @@ -0,0 +1,133 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "action_msgs/msg/detail/goal_status_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'status_list' +#include "action_msgs/msg/detail/goal_status__traits.hpp" + +namespace action_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalStatusArray & msg, + std::ostream & out) +{ + out << "{"; + // member: status_list + { + if (msg.status_list.size() == 0) { + out << "status_list: []"; + } else { + out << "status_list: ["; + size_t pending_items = msg.status_list.size(); + for (auto item : msg.status_list) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalStatusArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: status_list + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.status_list.size() == 0) { + out << "status_list: []\n"; + } else { + out << "status_list:\n"; + for (auto item : msg.status_list) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalStatusArray & 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 action_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use action_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const action_msgs::msg::GoalStatusArray & msg, + std::ostream & out, size_t indentation = 0) +{ + action_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use action_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const action_msgs::msg::GoalStatusArray & msg) +{ + return action_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "action_msgs::msg::GoalStatusArray"; +} + +template<> +inline const char * name() +{ + return "action_msgs/msg/GoalStatusArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.c b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.c new file mode 100644 index 000000000..23159a991 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.c @@ -0,0 +1,146 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#include +#include "action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h" +#include "action_msgs/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 "action_msgs/msg/detail/goal_status_array__functions.h" +#include "action_msgs/msg/detail/goal_status_array__struct.h" + + +// Include directives for member types +// Member `status_list` +#include "action_msgs/msg/goal_status.h" +// Member `status_list` +#include "action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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; + action_msgs__msg__GoalStatusArray__init(message_memory); +} + +void action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_fini_function(void * message_memory) +{ + action_msgs__msg__GoalStatusArray__fini(message_memory); +} + +size_t action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatusArray__status_list( + const void * untyped_member) +{ + const action_msgs__msg__GoalStatus__Sequence * member = + (const action_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return member->size; +} + +const void * action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index) +{ + const action_msgs__msg__GoalStatus__Sequence * member = + (const action_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list( + void * untyped_member, size_t index) +{ + action_msgs__msg__GoalStatus__Sequence * member = + (action_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__fetch_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index, void * untyped_value) +{ + const action_msgs__msg__GoalStatus * item = + ((const action_msgs__msg__GoalStatus *) + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list(untyped_member, index)); + action_msgs__msg__GoalStatus * value = + (action_msgs__msg__GoalStatus *)(untyped_value); + *value = *item; +} + +void action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__assign_function__GoalStatusArray__status_list( + void * untyped_member, size_t index, const void * untyped_value) +{ + action_msgs__msg__GoalStatus * item = + ((action_msgs__msg__GoalStatus *) + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list(untyped_member, index)); + const action_msgs__msg__GoalStatus * value = + (const action_msgs__msg__GoalStatus *)(untyped_value); + *item = *value; +} + +bool action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatusArray__status_list( + void * untyped_member, size_t size) +{ + action_msgs__msg__GoalStatus__Sequence * member = + (action_msgs__msg__GoalStatus__Sequence *)(untyped_member); + action_msgs__msg__GoalStatus__Sequence__fini(member); + return action_msgs__msg__GoalStatus__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[1] = { + { + "status_list", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs__msg__GoalStatusArray, status_list), // bytes offset in struct + NULL, // default value + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatusArray__status_list, // size() function pointer + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list, // get(index) function pointer + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__fetch_function__GoalStatusArray__status_list, // fetch(index, &value) function pointer + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__assign_function__GoalStatusArray__status_list, // assign(index, value) function pointer + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatusArray__status_list // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members = { + "action_msgs__msg", // message namespace + "GoalStatusArray", // message name + 1, // number of fields + sizeof(action_msgs__msg__GoalStatusArray), + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array, // message members + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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 action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle = { + 0, + &action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatusArray)() { + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatus)(); + if (!action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier) { + action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &action_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.cpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.cpp new file mode 100644 index 000000000..85661b2d1 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.cpp @@ -0,0 +1,154 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from action_msgs:msg/GoalStatusArray.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 "action_msgs/msg/detail/goal_status_array__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 action_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void GoalStatusArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) action_msgs::msg::GoalStatusArray(_init); +} + +void GoalStatusArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~GoalStatusArray(); +} + +size_t size_function__GoalStatusArray__status_list(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__GoalStatusArray__status_list(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__GoalStatusArray__status_list(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GoalStatusArray__status_list(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GoalStatusArray__status_list( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GoalStatusArray__status_list(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__GoalStatusArray__status_list(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatusArray_message_member_array[1] = { + { + "status_list", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs::msg::GoalStatusArray, status_list), // bytes offset in struct + nullptr, // default value + size_function__GoalStatusArray__status_list, // size() function pointer + get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer + get_function__GoalStatusArray__status_list, // get(index) function pointer + fetch_function__GoalStatusArray__status_list, // fetch(index, &value) function pointer + assign_function__GoalStatusArray__status_list, // assign(index, value) function pointer + resize_function__GoalStatusArray__status_list // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatusArray_message_members = { + "action_msgs::msg", // message namespace + "GoalStatusArray", // message name + 1, // number of fields + sizeof(action_msgs::msg::GoalStatusArray), + GoalStatusArray_message_member_array, // message members + GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) + GoalStatusArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t GoalStatusArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &GoalStatusArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace action_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_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, action_msgs, msg, GoalStatusArray)() { + return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.hpp new file mode 100644 index 000000000..ee3e0598f --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/detail/goal_status_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from action_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ +#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "action_msgs/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_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + msg, + GoalStatusArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_info.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_info.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/goal_info.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_info.h diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_info.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_info.hpp similarity index 86% rename from ThirdParty/ros/include/action_msgs/msg/goal_info.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_info.hpp index 6193d6b01..5dc0aaf4f 100644 --- a/ThirdParty/ros/include/action_msgs/msg/goal_info.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_info.hpp @@ -7,5 +7,6 @@ #include "action_msgs/msg/detail/goal_info__struct.hpp" #include "action_msgs/msg/detail/goal_info__builder.hpp" #include "action_msgs/msg/detail/goal_info__traits.hpp" +#include "action_msgs/msg/detail/goal_info__type_support.hpp" #endif // ACTION_MSGS__MSG__GOAL_INFO_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_status.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/goal_status.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status.hpp new file mode 100644 index 000000000..a5819a467 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__GOAL_STATUS_HPP_ +#define ACTION_MSGS__MSG__GOAL_STATUS_HPP_ + +#include "action_msgs/msg/detail/goal_status__struct.hpp" +#include "action_msgs/msg/detail/goal_status__builder.hpp" +#include "action_msgs/msg/detail/goal_status__traits.hpp" +#include "action_msgs/msg/detail/goal_status__type_support.hpp" + +#endif // ACTION_MSGS__MSG__GOAL_STATUS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_status_array.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status_array.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/goal_status_array.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status_array.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status_array.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status_array.hpp new file mode 100644 index 000000000..d98d19088 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/goal_status_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ +#define ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ + +#include "action_msgs/msg/detail/goal_status_array__struct.hpp" +#include "action_msgs/msg/detail/goal_status_array__builder.hpp" +#include "action_msgs/msg/detail/goal_status_array__traits.hpp" +#include "action_msgs/msg/detail/goal_status_array__type_support.hpp" + +#endif // ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..8e3eafba0 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 ACTION_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define ACTION_MSGS__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_action_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_action_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_action_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_action_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_action_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_action_msgs ROSIDL_GENERATOR_CPP_EXPORT_action_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_action_msgs ROSIDL_GENERATOR_CPP_IMPORT_action_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_action_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_action_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_action_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_action_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/action_msgs/action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/action_msgs/srv/cancel_goal.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/cancel_goal.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/srv/cancel_goal.h rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/cancel_goal.h diff --git a/ThirdParty/ros/include/action_msgs/srv/cancel_goal.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/cancel_goal.hpp similarity index 86% rename from ThirdParty/ros/include/action_msgs/srv/cancel_goal.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/cancel_goal.hpp index f295009d0..9e759e413 100644 --- a/ThirdParty/ros/include/action_msgs/srv/cancel_goal.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/cancel_goal.hpp @@ -7,5 +7,6 @@ #include "action_msgs/srv/detail/cancel_goal__struct.hpp" #include "action_msgs/srv/detail/cancel_goal__builder.hpp" #include "action_msgs/srv/detail/cancel_goal__traits.hpp" +#include "action_msgs/srv/detail/cancel_goal__type_support.hpp" #endif // ACTION_MSGS__SRV__CANCEL_GOAL_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__builder.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__builder.hpp similarity index 97% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__builder.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__builder.hpp index 3953da407..da854d1fd 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__builder.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__builder.hpp @@ -5,11 +5,12 @@ #ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__BUILDER_HPP_ #define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__BUILDER_HPP_ -#include "action_msgs/srv/detail/cancel_goal__struct.hpp" -#include #include #include +#include "action_msgs/srv/detail/cancel_goal__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace action_msgs { diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__functions.c b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__functions.c similarity index 91% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__functions.c rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__functions.c index eb6998128..eba3feae2 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__functions.c +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__functions.c @@ -215,22 +215,27 @@ action_msgs__srv__CancelGoal_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(action_msgs__srv__CancelGoal_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); action_msgs__srv__CancelGoal_Request * data = - (action_msgs__srv__CancelGoal_Request *)realloc(output->data, allocation_size); + (action_msgs__srv__CancelGoal_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 (!action_msgs__srv__CancelGoal_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!action_msgs__srv__CancelGoal_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; ) { - action_msgs__srv__CancelGoal_Request__fini(&data[i]); + action_msgs__srv__CancelGoal_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -459,22 +464,27 @@ action_msgs__srv__CancelGoal_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(action_msgs__srv__CancelGoal_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); action_msgs__srv__CancelGoal_Response * data = - (action_msgs__srv__CancelGoal_Response *)realloc(output->data, allocation_size); + (action_msgs__srv__CancelGoal_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 (!action_msgs__srv__CancelGoal_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!action_msgs__srv__CancelGoal_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; ) { - action_msgs__srv__CancelGoal_Response__fini(&data[i]); + action_msgs__srv__CancelGoal_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__functions.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__functions.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__functions.h rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__functions.h diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h index f0cfeeed3..1840084a5 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_action_msgs__srv__CancelGoal_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs size_t max_serialized_size_action_msgs__srv__CancelGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_action_msgs__srv__CancelGoal_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs size_t max_serialized_size_action_msgs__srv__CancelGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp index b577ff59a..40a33b1e5 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs max_serialized_size_CancelGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs max_serialized_size_CancelGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.h new file mode 100644 index 000000000..a66b48b4f --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.h @@ -0,0 +1,120 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from action_msgs:srv/CancelGoal.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ +#define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'goal_info' +#include "action_msgs/msg/detail/goal_info__struct.h" + +/// Struct defined in srv/CancelGoal in the package action_msgs. +typedef struct action_msgs__srv__CancelGoal_Request +{ + /// Goal info describing the goals to cancel, see above. + action_msgs__msg__GoalInfo goal_info; +} action_msgs__srv__CancelGoal_Request; + +// Struct for a sequence of action_msgs__srv__CancelGoal_Request. +typedef struct action_msgs__srv__CancelGoal_Request__Sequence +{ + action_msgs__srv__CancelGoal_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} action_msgs__srv__CancelGoal_Request__Sequence; + + +// Constants defined in the message + +/// Constant 'ERROR_NONE'. +/** + * Indicates the request was accepted without any errors. + * + * One or more goals have transitioned to the CANCELING state. The + * goals_canceling list is not empty. + */ +enum +{ + action_msgs__srv__CancelGoal_Response__ERROR_NONE = 0 +}; + +/// Constant 'ERROR_REJECTED'. +/** + * Indicates the request was rejected. + * + * No goals have transitioned to the CANCELING state. The goals_canceling list is + * empty. + */ +enum +{ + action_msgs__srv__CancelGoal_Response__ERROR_REJECTED = 1 +}; + +/// Constant 'ERROR_UNKNOWN_GOAL_ID'. +/** + * Indicates the requested goal ID does not exist. + * + * No goals have transitioned to the CANCELING state. The goals_canceling list is + * empty. + */ +enum +{ + action_msgs__srv__CancelGoal_Response__ERROR_UNKNOWN_GOAL_ID = 2 +}; + +/// Constant 'ERROR_GOAL_TERMINATED'. +/** + * Indicates the goal is not cancelable because it is already in a terminal state. + * + * No goals have transitioned to the CANCELING state. The goals_canceling list is + * empty. + */ +enum +{ + action_msgs__srv__CancelGoal_Response__ERROR_GOAL_TERMINATED = 3 +}; + +// Include directives for member types +// Member 'goals_canceling' +// already included above +// #include "action_msgs/msg/detail/goal_info__struct.h" + +/// Struct defined in srv/CancelGoal in the package action_msgs. +typedef struct action_msgs__srv__CancelGoal_Response +{ + /// Return code, see above definitions. + int8_t return_code; + /// Goals that accepted the cancel request. + action_msgs__msg__GoalInfo__Sequence goals_canceling; +} action_msgs__srv__CancelGoal_Response; + +// Struct for a sequence of action_msgs__srv__CancelGoal_Response. +typedef struct action_msgs__srv__CancelGoal_Response__Sequence +{ + action_msgs__srv__CancelGoal_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} action_msgs__srv__CancelGoal_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.hpp similarity index 89% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.hpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.hpp index 5bad280e5..a4fd0d626 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.hpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__struct.hpp @@ -5,14 +5,15 @@ #ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_HPP_ #define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'goal_info' @@ -172,7 +173,7 @@ struct CancelGoal_Response_ int8_t; _return_code_type return_code; using _goals_canceling_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _goals_canceling_type goals_canceling; // setters for named parameter idiom @@ -183,7 +184,7 @@ struct CancelGoal_Response_ return *this; } Type & set__goals_canceling( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->goals_canceling = _arg; return *this; @@ -258,14 +259,26 @@ using CancelGoal_Response = action_msgs::srv::CancelGoal_Response_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t CancelGoal_Response_::ERROR_NONE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t CancelGoal_Response_::ERROR_REJECTED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t CancelGoal_Response_::ERROR_UNKNOWN_GOAL_ID; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t CancelGoal_Response_::ERROR_GOAL_TERMINATED; +#endif // __cplusplus < 201703L } // namespace srv diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__traits.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__traits.hpp new file mode 100644 index 000000000..1670f7266 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__traits.hpp @@ -0,0 +1,301 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from action_msgs:srv/CancelGoal.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ +#define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "action_msgs/srv/detail/cancel_goal__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'goal_info' +#include "action_msgs/msg/detail/goal_info__traits.hpp" + +namespace action_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const CancelGoal_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_info + { + out << "goal_info: "; + to_flow_style_yaml(msg.goal_info, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const CancelGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_info + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_info:\n"; + to_block_style_yaml(msg.goal_info, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const CancelGoal_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 action_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use action_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const action_msgs::srv::CancelGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + action_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use action_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const action_msgs::srv::CancelGoal_Request & msg) +{ + return action_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "action_msgs::srv::CancelGoal_Request"; +} + +template<> +inline const char * name() +{ + return "action_msgs/srv/CancelGoal_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goals_canceling' +// already included above +// #include "action_msgs/msg/detail/goal_info__traits.hpp" + +namespace action_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const CancelGoal_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: return_code + { + out << "return_code: "; + rosidl_generator_traits::value_to_yaml(msg.return_code, out); + out << ", "; + } + + // member: goals_canceling + { + if (msg.goals_canceling.size() == 0) { + out << "goals_canceling: []"; + } else { + out << "goals_canceling: ["; + size_t pending_items = msg.goals_canceling.size(); + for (auto item : msg.goals_canceling) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const CancelGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: return_code + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "return_code: "; + rosidl_generator_traits::value_to_yaml(msg.return_code, out); + out << "\n"; + } + + // member: goals_canceling + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.goals_canceling.size() == 0) { + out << "goals_canceling: []\n"; + } else { + out << "goals_canceling:\n"; + for (auto item : msg.goals_canceling) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const CancelGoal_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 action_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use action_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const action_msgs::srv::CancelGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + action_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use action_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const action_msgs::srv::CancelGoal_Response & msg) +{ + return action_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "action_msgs::srv::CancelGoal_Response"; +} + +template<> +inline const char * name() +{ + return "action_msgs/srv/CancelGoal_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "action_msgs::srv::CancelGoal"; +} + +template<> +inline const char * name() +{ + return "action_msgs/srv/CancelGoal"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.c b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.c new file mode 100644 index 000000000..2915340b5 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.c @@ -0,0 +1,318 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from action_msgs:srv/CancelGoal.idl +// generated code does not contain a copyright notice + +#include +#include "action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h" +#include "action_msgs/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 "action_msgs/srv/detail/cancel_goal__functions.h" +#include "action_msgs/srv/detail/cancel_goal__struct.h" + + +// Include directives for member types +// Member `goal_info` +#include "action_msgs/msg/goal_info.h" +// Member `goal_info` +#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_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; + action_msgs__srv__CancelGoal_Request__init(message_memory); +} + +void action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_fini_function(void * message_memory) +{ + action_msgs__srv__CancelGoal_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array[1] = { + { + "goal_info", // 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(action_msgs__srv__CancelGoal_Request, goal_info), // 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 action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_members = { + "action_msgs__srv", // message namespace + "CancelGoal_Request", // message name + 1, // number of fields + sizeof(action_msgs__srv__CancelGoal_Request), + action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array, // message members + action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) + action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_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 action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle = { + 0, + &action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Request)() { + action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); + if (!action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle.typesupport_identifier) { + action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &action_msgs__srv__CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h" +// already included above +// #include "action_msgs/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 "action_msgs/srv/detail/cancel_goal__functions.h" +// already included above +// #include "action_msgs/srv/detail/cancel_goal__struct.h" + + +// Include directives for member types +// Member `goals_canceling` +// already included above +// #include "action_msgs/msg/goal_info.h" +// Member `goals_canceling` +// already included above +// #include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_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; + action_msgs__srv__CancelGoal_Response__init(message_memory); +} + +void action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_fini_function(void * message_memory) +{ + action_msgs__srv__CancelGoal_Response__fini(message_memory); +} + +size_t action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__size_function__CancelGoal_Response__goals_canceling( + const void * untyped_member) +{ + const action_msgs__msg__GoalInfo__Sequence * member = + (const action_msgs__msg__GoalInfo__Sequence *)(untyped_member); + return member->size; +} + +const void * action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_const_function__CancelGoal_Response__goals_canceling( + const void * untyped_member, size_t index) +{ + const action_msgs__msg__GoalInfo__Sequence * member = + (const action_msgs__msg__GoalInfo__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_function__CancelGoal_Response__goals_canceling( + void * untyped_member, size_t index) +{ + action_msgs__msg__GoalInfo__Sequence * member = + (action_msgs__msg__GoalInfo__Sequence *)(untyped_member); + return &member->data[index]; +} + +void action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__fetch_function__CancelGoal_Response__goals_canceling( + const void * untyped_member, size_t index, void * untyped_value) +{ + const action_msgs__msg__GoalInfo * item = + ((const action_msgs__msg__GoalInfo *) + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_const_function__CancelGoal_Response__goals_canceling(untyped_member, index)); + action_msgs__msg__GoalInfo * value = + (action_msgs__msg__GoalInfo *)(untyped_value); + *value = *item; +} + +void action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__assign_function__CancelGoal_Response__goals_canceling( + void * untyped_member, size_t index, const void * untyped_value) +{ + action_msgs__msg__GoalInfo * item = + ((action_msgs__msg__GoalInfo *) + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_function__CancelGoal_Response__goals_canceling(untyped_member, index)); + const action_msgs__msg__GoalInfo * value = + (const action_msgs__msg__GoalInfo *)(untyped_value); + *item = *value; +} + +bool action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__resize_function__CancelGoal_Response__goals_canceling( + void * untyped_member, size_t size) +{ + action_msgs__msg__GoalInfo__Sequence * member = + (action_msgs__msg__GoalInfo__Sequence *)(untyped_member); + action_msgs__msg__GoalInfo__Sequence__fini(member); + return action_msgs__msg__GoalInfo__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array[2] = { + { + "return_code", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs__srv__CancelGoal_Response, return_code), // 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 + }, + { + "goals_canceling", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(action_msgs__srv__CancelGoal_Response, goals_canceling), // bytes offset in struct + NULL, // default value + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__size_function__CancelGoal_Response__goals_canceling, // size() function pointer + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_const_function__CancelGoal_Response__goals_canceling, // get_const(index) function pointer + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__get_function__CancelGoal_Response__goals_canceling, // get(index) function pointer + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__fetch_function__CancelGoal_Response__goals_canceling, // fetch(index, &value) function pointer + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__assign_function__CancelGoal_Response__goals_canceling, // assign(index, value) function pointer + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__resize_function__CancelGoal_Response__goals_canceling // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_members = { + "action_msgs__srv", // message namespace + "CancelGoal_Response", // message name + 2, // number of fields + sizeof(action_msgs__srv__CancelGoal_Response), + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array, // message members + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_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 action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle = { + 0, + &action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Response)() { + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); + if (!action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle.typesupport_identifier) { + action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &action_msgs__srv__CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "action_msgs/srv/detail/cancel_goal__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 action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_members = { + "action_msgs__srv", // service namespace + "CancelGoal", // service name + // these two fields are initialized below on the first access + NULL, // request message + // action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle, + NULL // response message + // action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle = { + 0, + &action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_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, action_msgs, srv, CancelGoal_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal)() { + if (!action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle.typesupport_identifier) { + action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_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, action_msgs, srv, CancelGoal_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, action_msgs, srv, CancelGoal_Response)()->data; + } + + return &action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.cpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.cpp rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.cpp index b0d9fe562..ce0aebb78 100644 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.cpp +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CancelGoal_Re 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 } }; @@ -174,6 +176,24 @@ void * get_function__CancelGoal_Response__goals_canceling(void * untyped_member, return &member[index]; } +void fetch_function__CancelGoal_Response__goals_canceling( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CancelGoal_Response__goals_canceling(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CancelGoal_Response__goals_canceling( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CancelGoal_Response__goals_canceling(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__CancelGoal_Response__goals_canceling(void * untyped_member, size_t size) { auto * member = @@ -195,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CancelGoal_Re 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 }, { @@ -210,6 +232,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CancelGoal_Re size_function__CancelGoal_Response__goals_canceling, // size() function pointer get_const_function__CancelGoal_Response__goals_canceling, // get_const(index) function pointer get_function__CancelGoal_Response__goals_canceling, // get(index) function pointer + fetch_function__CancelGoal_Response__goals_canceling, // fetch(index, &value) function pointer + assign_function__CancelGoal_Response__goals_canceling, // assign(index, value) function pointer resize_function__CancelGoal_Response__goals_canceling // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.h b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.h similarity index 100% rename from ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.h rename to ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.h diff --git a/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.hpp b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.hpp new file mode 100644 index 000000000..65f9c85a5 --- /dev/null +++ b/ThirdParty/ros/include/action_msgs/action_msgs/srv/detail/cancel_goal__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from action_msgs:srv/CancelGoal.idl +// generated code does not contain a copyright notice + +#ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TYPE_SUPPORT_HPP_ +#define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "action_msgs/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_action_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + srv, + CancelGoal +)(); +#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_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + srv, + CancelGoal_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_action_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + action_msgs, + srv, + CancelGoal_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__traits.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__traits.hpp deleted file mode 100644 index 3b3e1034f..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from action_msgs:msg/GoalInfo.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ - -#include "action_msgs/msg/detail/goal_info__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'goal_id' -#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::msg::GoalInfo"; -} - -template<> -inline const char * name() -{ - return "action_msgs/msg/GoalInfo"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.c b/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.c deleted file mode 100644 index ac62fe3a3..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_info__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from action_msgs:msg/GoalInfo.idl -// generated code does not contain a copyright notice - -#include -#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" -#include "action_msgs/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 "action_msgs/msg/detail/goal_info__functions.h" -#include "action_msgs/msg/detail/goal_info__struct.h" - - -// Include directives for member types -// Member `goal_id` -#include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_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; - action_msgs__msg__GoalInfo__init(message_memory); -} - -void GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_fini_function(void * message_memory) -{ - action_msgs__msg__GoalInfo__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[2] = { - { - "goal_id", // 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(action_msgs__msg__GoalInfo, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "stamp", // 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(action_msgs__msg__GoalInfo, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_members = { - "action_msgs__msg", // message namespace - "GoalInfo", // message name - 2, // number of fields - sizeof(action_msgs__msg__GoalInfo), - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array, // message members - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_init_function, // function to initialize message memory (memory has to be allocated) - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_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 GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle = { - 0, - &GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)() { - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle.typesupport_identifier) { - GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalInfo__rosidl_typesupport_introspection_c__GoalInfo_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__builder.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__builder.hpp deleted file mode 100644 index 9b5d92ece..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ - -#include "action_msgs/msg/detail/goal_status__struct.hpp" -#include -#include -#include - - -namespace action_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_GoalStatus_status -{ -public: - explicit Init_GoalStatus_status(::action_msgs::msg::GoalStatus & msg) - : msg_(msg) - {} - ::action_msgs::msg::GoalStatus status(::action_msgs::msg::GoalStatus::_status_type arg) - { - msg_.status = std::move(arg); - return std::move(msg_); - } - -private: - ::action_msgs::msg::GoalStatus msg_; -}; - -class Init_GoalStatus_goal_info -{ -public: - Init_GoalStatus_goal_info() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_GoalStatus_status goal_info(::action_msgs::msg::GoalStatus::_goal_info_type arg) - { - msg_.goal_info = std::move(arg); - return Init_GoalStatus_status(msg_); - } - -private: - ::action_msgs::msg::GoalStatus msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::action_msgs::msg::GoalStatus>() -{ - return action_msgs::msg::builder::Init_GoalStatus_goal_info(); -} - -} // namespace action_msgs - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__functions.c b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__functions.c deleted file mode 100644 index d05190e58..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__functions.c +++ /dev/null @@ -1,254 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice -#include "action_msgs/msg/detail/goal_status__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `goal_info` -#include "action_msgs/msg/detail/goal_info__functions.h" - -bool -action_msgs__msg__GoalStatus__init(action_msgs__msg__GoalStatus * msg) -{ - if (!msg) { - return false; - } - // goal_info - if (!action_msgs__msg__GoalInfo__init(&msg->goal_info)) { - action_msgs__msg__GoalStatus__fini(msg); - return false; - } - // status - return true; -} - -void -action_msgs__msg__GoalStatus__fini(action_msgs__msg__GoalStatus * msg) -{ - if (!msg) { - return; - } - // goal_info - action_msgs__msg__GoalInfo__fini(&msg->goal_info); - // status -} - -bool -action_msgs__msg__GoalStatus__are_equal(const action_msgs__msg__GoalStatus * lhs, const action_msgs__msg__GoalStatus * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // goal_info - if (!action_msgs__msg__GoalInfo__are_equal( - &(lhs->goal_info), &(rhs->goal_info))) - { - return false; - } - // status - if (lhs->status != rhs->status) { - return false; - } - return true; -} - -bool -action_msgs__msg__GoalStatus__copy( - const action_msgs__msg__GoalStatus * input, - action_msgs__msg__GoalStatus * output) -{ - if (!input || !output) { - return false; - } - // goal_info - if (!action_msgs__msg__GoalInfo__copy( - &(input->goal_info), &(output->goal_info))) - { - return false; - } - // status - output->status = input->status; - return true; -} - -action_msgs__msg__GoalStatus * -action_msgs__msg__GoalStatus__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatus * msg = (action_msgs__msg__GoalStatus *)allocator.allocate(sizeof(action_msgs__msg__GoalStatus), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(action_msgs__msg__GoalStatus)); - bool success = action_msgs__msg__GoalStatus__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -action_msgs__msg__GoalStatus__destroy(action_msgs__msg__GoalStatus * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - action_msgs__msg__GoalStatus__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -action_msgs__msg__GoalStatus__Sequence__init(action_msgs__msg__GoalStatus__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatus * data = NULL; - - if (size) { - data = (action_msgs__msg__GoalStatus *)allocator.zero_allocate(size, sizeof(action_msgs__msg__GoalStatus), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = action_msgs__msg__GoalStatus__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - action_msgs__msg__GoalStatus__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -action_msgs__msg__GoalStatus__Sequence__fini(action_msgs__msg__GoalStatus__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) { - action_msgs__msg__GoalStatus__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); - } -} - -action_msgs__msg__GoalStatus__Sequence * -action_msgs__msg__GoalStatus__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatus__Sequence * array = (action_msgs__msg__GoalStatus__Sequence *)allocator.allocate(sizeof(action_msgs__msg__GoalStatus__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = action_msgs__msg__GoalStatus__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -action_msgs__msg__GoalStatus__Sequence__destroy(action_msgs__msg__GoalStatus__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - action_msgs__msg__GoalStatus__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -action_msgs__msg__GoalStatus__Sequence__are_equal(const action_msgs__msg__GoalStatus__Sequence * lhs, const action_msgs__msg__GoalStatus__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!action_msgs__msg__GoalStatus__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -action_msgs__msg__GoalStatus__Sequence__copy( - const action_msgs__msg__GoalStatus__Sequence * input, - action_msgs__msg__GoalStatus__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(action_msgs__msg__GoalStatus); - action_msgs__msg__GoalStatus * data = - (action_msgs__msg__GoalStatus *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!action_msgs__msg__GoalStatus__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - action_msgs__msg__GoalStatus__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!action_msgs__msg__GoalStatus__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index e20249cc9..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -size_t get_serialized_size_action_msgs__msg__GoalStatus( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -size_t max_serialized_size_action_msgs__msg__GoalStatus( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, action_msgs, msg, GoalStatus)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 0472fcc7b..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "action_msgs/msg/detail/goal_status__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 action_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -cdr_serialize( - const action_msgs::msg::GoalStatus & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - action_msgs::msg::GoalStatus & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -get_serialized_size( - const action_msgs::msg::GoalStatus & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -max_serialized_size_GoalStatus( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace action_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, action_msgs, msg, GoalStatus)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.h b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.h deleted file mode 100644 index ac7b44e56..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'STATUS_UNKNOWN'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_UNKNOWN = 0 -}; - -/// Constant 'STATUS_ACCEPTED'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_ACCEPTED = 1 -}; - -/// Constant 'STATUS_EXECUTING'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_EXECUTING = 2 -}; - -/// Constant 'STATUS_CANCELING'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_CANCELING = 3 -}; - -/// Constant 'STATUS_SUCCEEDED'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_SUCCEEDED = 4 -}; - -/// Constant 'STATUS_CANCELED'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_CANCELED = 5 -}; - -/// Constant 'STATUS_ABORTED'. -enum -{ - action_msgs__msg__GoalStatus__STATUS_ABORTED = 6 -}; - -// Include directives for member types -// Member 'goal_info' -#include "action_msgs/msg/detail/goal_info__struct.h" - -// Struct defined in msg/GoalStatus in the package action_msgs. -typedef struct action_msgs__msg__GoalStatus -{ - action_msgs__msg__GoalInfo goal_info; - int8_t status; -} action_msgs__msg__GoalStatus; - -// Struct for a sequence of action_msgs__msg__GoalStatus. -typedef struct action_msgs__msg__GoalStatus__Sequence -{ - action_msgs__msg__GoalStatus * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} action_msgs__msg__GoalStatus__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.hpp deleted file mode 100644 index e5d6201f4..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__struct.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'goal_info' -#include "action_msgs/msg/detail/goal_info__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__action_msgs__msg__GoalStatus __attribute__((deprecated)) -#else -# define DEPRECATED__action_msgs__msg__GoalStatus __declspec(deprecated) -#endif - -namespace action_msgs -{ - -namespace msg -{ - -// message struct -template -struct GoalStatus_ -{ - using Type = GoalStatus_; - - explicit GoalStatus_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : goal_info(_init) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->status = 0; - } - } - - explicit GoalStatus_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : goal_info(_alloc, _init) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->status = 0; - } - } - - // field types and members - using _goal_info_type = - action_msgs::msg::GoalInfo_; - _goal_info_type goal_info; - using _status_type = - int8_t; - _status_type status; - - // setters for named parameter idiom - Type & set__goal_info( - const action_msgs::msg::GoalInfo_ & _arg) - { - this->goal_info = _arg; - return *this; - } - Type & set__status( - const int8_t & _arg) - { - this->status = _arg; - return *this; - } - - // constant declarations - static constexpr int8_t STATUS_UNKNOWN = - 0; - static constexpr int8_t STATUS_ACCEPTED = - 1; - static constexpr int8_t STATUS_EXECUTING = - 2; - static constexpr int8_t STATUS_CANCELING = - 3; - static constexpr int8_t STATUS_SUCCEEDED = - 4; - static constexpr int8_t STATUS_CANCELED = - 5; - static constexpr int8_t STATUS_ABORTED = - 6; - - // pointer types - using RawPtr = - action_msgs::msg::GoalStatus_ *; - using ConstRawPtr = - const action_msgs::msg::GoalStatus_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__action_msgs__msg__GoalStatus - std::shared_ptr> - Ptr; - typedef DEPRECATED__action_msgs__msg__GoalStatus - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const GoalStatus_ & other) const - { - if (this->goal_info != other.goal_info) { - return false; - } - if (this->status != other.status) { - return false; - } - return true; - } - bool operator!=(const GoalStatus_ & other) const - { - return !this->operator==(other); - } -}; // struct GoalStatus_ - -// alias to use template instance with default allocator -using GoalStatus = - action_msgs::msg::GoalStatus_>; - -// constant definitions -template -constexpr int8_t GoalStatus_::STATUS_UNKNOWN; -template -constexpr int8_t GoalStatus_::STATUS_ACCEPTED; -template -constexpr int8_t GoalStatus_::STATUS_EXECUTING; -template -constexpr int8_t GoalStatus_::STATUS_CANCELING; -template -constexpr int8_t GoalStatus_::STATUS_SUCCEEDED; -template -constexpr int8_t GoalStatus_::STATUS_CANCELED; -template -constexpr int8_t GoalStatus_::STATUS_ABORTED; - -} // namespace msg - -} // namespace action_msgs - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__traits.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__traits.hpp deleted file mode 100644 index 6cc269169..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ - -#include "action_msgs/msg/detail/goal_status__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'goal_info' -#include "action_msgs/msg/detail/goal_info__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::msg::GoalStatus"; -} - -template<> -inline const char * name() -{ - return "action_msgs/msg/GoalStatus"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.c b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.c deleted file mode 100644 index 8aa6a85aa..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.c +++ /dev/null @@ -1,104 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from action_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#include -#include "action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" -#include "action_msgs/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 "action_msgs/msg/detail/goal_status__functions.h" -#include "action_msgs/msg/detail/goal_status__struct.h" - - -// Include directives for member types -// Member `goal_info` -#include "action_msgs/msg/goal_info.h" -// Member `goal_info` -#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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; - action_msgs__msg__GoalStatus__init(message_memory); -} - -void GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_fini_function(void * message_memory) -{ - action_msgs__msg__GoalStatus__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[2] = { - { - "goal_info", // 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(action_msgs__msg__GoalStatus, goal_info), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs__msg__GoalStatus, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members = { - "action_msgs__msg", // message namespace - "GoalStatus", // message name - 2, // number of fields - sizeof(action_msgs__msg__GoalStatus), - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array, // message members - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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 GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle = { - 0, - &GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatus)() { - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); - if (!GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier) { - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.cpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.cpp deleted file mode 100644 index d8ae2102d..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status__type_support.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from action_msgs:msg/GoalStatus.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 "action_msgs/msg/detail/goal_status__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 action_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void GoalStatus_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) action_msgs::msg::GoalStatus(_init); -} - -void GoalStatus_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~GoalStatus(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatus_message_member_array[2] = { - { - "goal_info", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs::msg::GoalStatus, goal_info), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "status", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs::msg::GoalStatus, status), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatus_message_members = { - "action_msgs::msg", // message namespace - "GoalStatus", // message name - 2, // number of fields - sizeof(action_msgs::msg::GoalStatus), - GoalStatus_message_member_array, // message members - GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatus_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t GoalStatus_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &GoalStatus_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace action_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_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, action_msgs, msg, GoalStatus)() { - return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__builder.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__builder.hpp deleted file mode 100644 index fc5cc8aa0..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ - -#include "action_msgs/msg/detail/goal_status_array__struct.hpp" -#include -#include -#include - - -namespace action_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_GoalStatusArray_status_list -{ -public: - Init_GoalStatusArray_status_list() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::action_msgs::msg::GoalStatusArray status_list(::action_msgs::msg::GoalStatusArray::_status_list_type arg) - { - msg_.status_list = std::move(arg); - return std::move(msg_); - } - -private: - ::action_msgs::msg::GoalStatusArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::action_msgs::msg::GoalStatusArray>() -{ - return action_msgs::msg::builder::Init_GoalStatusArray_status_list(); -} - -} // namespace action_msgs - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__functions.c b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__functions.c deleted file mode 100644 index 5a67bbea6..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__functions.c +++ /dev/null @@ -1,246 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice -#include "action_msgs/msg/detail/goal_status_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `status_list` -#include "action_msgs/msg/detail/goal_status__functions.h" - -bool -action_msgs__msg__GoalStatusArray__init(action_msgs__msg__GoalStatusArray * msg) -{ - if (!msg) { - return false; - } - // status_list - if (!action_msgs__msg__GoalStatus__Sequence__init(&msg->status_list, 0)) { - action_msgs__msg__GoalStatusArray__fini(msg); - return false; - } - return true; -} - -void -action_msgs__msg__GoalStatusArray__fini(action_msgs__msg__GoalStatusArray * msg) -{ - if (!msg) { - return; - } - // status_list - action_msgs__msg__GoalStatus__Sequence__fini(&msg->status_list); -} - -bool -action_msgs__msg__GoalStatusArray__are_equal(const action_msgs__msg__GoalStatusArray * lhs, const action_msgs__msg__GoalStatusArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // status_list - if (!action_msgs__msg__GoalStatus__Sequence__are_equal( - &(lhs->status_list), &(rhs->status_list))) - { - return false; - } - return true; -} - -bool -action_msgs__msg__GoalStatusArray__copy( - const action_msgs__msg__GoalStatusArray * input, - action_msgs__msg__GoalStatusArray * output) -{ - if (!input || !output) { - return false; - } - // status_list - if (!action_msgs__msg__GoalStatus__Sequence__copy( - &(input->status_list), &(output->status_list))) - { - return false; - } - return true; -} - -action_msgs__msg__GoalStatusArray * -action_msgs__msg__GoalStatusArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatusArray * msg = (action_msgs__msg__GoalStatusArray *)allocator.allocate(sizeof(action_msgs__msg__GoalStatusArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(action_msgs__msg__GoalStatusArray)); - bool success = action_msgs__msg__GoalStatusArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -action_msgs__msg__GoalStatusArray__destroy(action_msgs__msg__GoalStatusArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - action_msgs__msg__GoalStatusArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -action_msgs__msg__GoalStatusArray__Sequence__init(action_msgs__msg__GoalStatusArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatusArray * data = NULL; - - if (size) { - data = (action_msgs__msg__GoalStatusArray *)allocator.zero_allocate(size, sizeof(action_msgs__msg__GoalStatusArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = action_msgs__msg__GoalStatusArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - action_msgs__msg__GoalStatusArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -action_msgs__msg__GoalStatusArray__Sequence__fini(action_msgs__msg__GoalStatusArray__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) { - action_msgs__msg__GoalStatusArray__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); - } -} - -action_msgs__msg__GoalStatusArray__Sequence * -action_msgs__msg__GoalStatusArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - action_msgs__msg__GoalStatusArray__Sequence * array = (action_msgs__msg__GoalStatusArray__Sequence *)allocator.allocate(sizeof(action_msgs__msg__GoalStatusArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = action_msgs__msg__GoalStatusArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -action_msgs__msg__GoalStatusArray__Sequence__destroy(action_msgs__msg__GoalStatusArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - action_msgs__msg__GoalStatusArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -action_msgs__msg__GoalStatusArray__Sequence__are_equal(const action_msgs__msg__GoalStatusArray__Sequence * lhs, const action_msgs__msg__GoalStatusArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!action_msgs__msg__GoalStatusArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -action_msgs__msg__GoalStatusArray__Sequence__copy( - const action_msgs__msg__GoalStatusArray__Sequence * input, - action_msgs__msg__GoalStatusArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(action_msgs__msg__GoalStatusArray); - action_msgs__msg__GoalStatusArray * data = - (action_msgs__msg__GoalStatusArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!action_msgs__msg__GoalStatusArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - action_msgs__msg__GoalStatusArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!action_msgs__msg__GoalStatusArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index cf54c287b..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "action_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -size_t get_serialized_size_action_msgs__msg__GoalStatusArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -size_t max_serialized_size_action_msgs__msg__GoalStatusArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, action_msgs, msg, GoalStatusArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 19a8c4b6a..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "action_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "action_msgs/msg/detail/goal_status_array__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 action_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -cdr_serialize( - const action_msgs::msg::GoalStatusArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - action_msgs::msg::GoalStatusArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -get_serialized_size( - const action_msgs::msg::GoalStatusArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -max_serialized_size_GoalStatusArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace action_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_action_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, action_msgs, msg, GoalStatusArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.h b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.h deleted file mode 100644 index 80399b46a..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.h +++ /dev/null @@ -1,44 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'status_list' -#include "action_msgs/msg/detail/goal_status__struct.h" - -// Struct defined in msg/GoalStatusArray in the package action_msgs. -typedef struct action_msgs__msg__GoalStatusArray -{ - action_msgs__msg__GoalStatus__Sequence status_list; -} action_msgs__msg__GoalStatusArray; - -// Struct for a sequence of action_msgs__msg__GoalStatusArray. -typedef struct action_msgs__msg__GoalStatusArray__Sequence -{ - action_msgs__msg__GoalStatusArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} action_msgs__msg__GoalStatusArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.hpp deleted file mode 100644 index bab30bb76..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__struct.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'status_list' -#include "action_msgs/msg/detail/goal_status__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__action_msgs__msg__GoalStatusArray __attribute__((deprecated)) -#else -# define DEPRECATED__action_msgs__msg__GoalStatusArray __declspec(deprecated) -#endif - -namespace action_msgs -{ - -namespace msg -{ - -// message struct -template -struct GoalStatusArray_ -{ - using Type = GoalStatusArray_; - - explicit GoalStatusArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - (void)_init; - } - - explicit GoalStatusArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - (void)_init; - (void)_alloc; - } - - // field types and members - using _status_list_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _status_list_type status_list; - - // setters for named parameter idiom - Type & set__status_list( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->status_list = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - action_msgs::msg::GoalStatusArray_ *; - using ConstRawPtr = - const action_msgs::msg::GoalStatusArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__action_msgs__msg__GoalStatusArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__action_msgs__msg__GoalStatusArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const GoalStatusArray_ & other) const - { - if (this->status_list != other.status_list) { - return false; - } - return true; - } - bool operator!=(const GoalStatusArray_ & other) const - { - return !this->operator==(other); - } -}; // struct GoalStatusArray_ - -// alias to use template instance with default allocator -using GoalStatusArray = - action_msgs::msg::GoalStatusArray_>; - -// constant definitions - -} // namespace msg - -} // namespace action_msgs - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__traits.hpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__traits.hpp deleted file mode 100644 index fafb4e158..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ -#define ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ - -#include "action_msgs/msg/detail/goal_status_array__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::msg::GoalStatusArray"; -} - -template<> -inline const char * name() -{ - return "action_msgs/msg/GoalStatusArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTION_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.c b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.c deleted file mode 100644 index c740d4cca..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from action_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#include -#include "action_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h" -#include "action_msgs/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 "action_msgs/msg/detail/goal_status_array__functions.h" -#include "action_msgs/msg/detail/goal_status_array__struct.h" - - -// Include directives for member types -// Member `status_list` -#include "action_msgs/msg/goal_status.h" -// Member `status_list` -#include "action_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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; - action_msgs__msg__GoalStatusArray__init(message_memory); -} - -void GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_fini_function(void * message_memory) -{ - action_msgs__msg__GoalStatusArray__fini(message_memory); -} - -size_t GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatus__status_list( - const void * untyped_member) -{ - const action_msgs__msg__GoalStatus__Sequence * member = - (const action_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return member->size; -} - -const void * GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatus__status_list( - const void * untyped_member, size_t index) -{ - const action_msgs__msg__GoalStatus__Sequence * member = - (const action_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatus__status_list( - void * untyped_member, size_t index) -{ - action_msgs__msg__GoalStatus__Sequence * member = - (action_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatus__status_list( - void * untyped_member, size_t size) -{ - action_msgs__msg__GoalStatus__Sequence * member = - (action_msgs__msg__GoalStatus__Sequence *)(untyped_member); - action_msgs__msg__GoalStatus__Sequence__fini(member); - return action_msgs__msg__GoalStatus__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[1] = { - { - "status_list", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs__msg__GoalStatusArray, status_list), // bytes offset in struct - NULL, // default value - GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatus__status_list, // size() function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatus__status_list, // get_const(index) function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatus__status_list, // get(index) function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatus__status_list // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members = { - "action_msgs__msg", // message namespace - "GoalStatusArray", // message name - 1, // number of fields - sizeof(action_msgs__msg__GoalStatusArray), - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array, // message members - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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 GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle = { - 0, - &GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatusArray)() { - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalStatus)(); - if (!GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier) { - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.cpp b/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.cpp deleted file mode 100644 index 6f7cf3f89..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/detail/goal_status_array__type_support.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from action_msgs:msg/GoalStatusArray.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 "action_msgs/msg/detail/goal_status_array__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 action_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void GoalStatusArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) action_msgs::msg::GoalStatusArray(_init); -} - -void GoalStatusArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~GoalStatusArray(); -} - -size_t size_function__GoalStatusArray__status_list(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__GoalStatusArray__status_list(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__GoalStatusArray__status_list(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__GoalStatusArray__status_list(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatusArray_message_member_array[1] = { - { - "status_list", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs::msg::GoalStatusArray, status_list), // bytes offset in struct - nullptr, // default value - size_function__GoalStatusArray__status_list, // size() function pointer - get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer - get_function__GoalStatusArray__status_list, // get(index) function pointer - resize_function__GoalStatusArray__status_list // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatusArray_message_members = { - "action_msgs::msg", // message namespace - "GoalStatusArray", // message name - 1, // number of fields - sizeof(action_msgs::msg::GoalStatusArray), - GoalStatusArray_message_member_array, // message members - GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatusArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t GoalStatusArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &GoalStatusArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace action_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_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, action_msgs, msg, GoalStatusArray)() { - return &::action_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_status.hpp b/ThirdParty/ros/include/action_msgs/msg/goal_status.hpp deleted file mode 100644 index 4382e581a..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/goal_status.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__GOAL_STATUS_HPP_ -#define ACTION_MSGS__MSG__GOAL_STATUS_HPP_ - -#include "action_msgs/msg/detail/goal_status__struct.hpp" -#include "action_msgs/msg/detail/goal_status__builder.hpp" -#include "action_msgs/msg/detail/goal_status__traits.hpp" - -#endif // ACTION_MSGS__MSG__GOAL_STATUS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/msg/goal_status_array.hpp b/ThirdParty/ros/include/action_msgs/msg/goal_status_array.hpp deleted file mode 100644 index 1be0c386c..000000000 --- a/ThirdParty/ros/include/action_msgs/msg/goal_status_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ -#define ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ - -#include "action_msgs/msg/detail/goal_status_array__struct.hpp" -#include "action_msgs/msg/detail/goal_status_array__builder.hpp" -#include "action_msgs/msg/detail/goal_status_array__traits.hpp" - -#endif // ACTION_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.h b/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.h deleted file mode 100644 index 6f12d24e6..000000000 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__struct.h +++ /dev/null @@ -1,93 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from action_msgs:srv/CancelGoal.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ -#define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'goal_info' -#include "action_msgs/msg/detail/goal_info__struct.h" - -// Struct defined in srv/CancelGoal in the package action_msgs. -typedef struct action_msgs__srv__CancelGoal_Request -{ - action_msgs__msg__GoalInfo goal_info; -} action_msgs__srv__CancelGoal_Request; - -// Struct for a sequence of action_msgs__srv__CancelGoal_Request. -typedef struct action_msgs__srv__CancelGoal_Request__Sequence -{ - action_msgs__srv__CancelGoal_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} action_msgs__srv__CancelGoal_Request__Sequence; - - -// Constants defined in the message - -/// Constant 'ERROR_NONE'. -enum -{ - action_msgs__srv__CancelGoal_Response__ERROR_NONE = 0 -}; - -/// Constant 'ERROR_REJECTED'. -enum -{ - action_msgs__srv__CancelGoal_Response__ERROR_REJECTED = 1 -}; - -/// Constant 'ERROR_UNKNOWN_GOAL_ID'. -enum -{ - action_msgs__srv__CancelGoal_Response__ERROR_UNKNOWN_GOAL_ID = 2 -}; - -/// Constant 'ERROR_GOAL_TERMINATED'. -enum -{ - action_msgs__srv__CancelGoal_Response__ERROR_GOAL_TERMINATED = 3 -}; - -// Include directives for member types -// Member 'goals_canceling' -// already included above -// #include "action_msgs/msg/detail/goal_info__struct.h" - -// Struct defined in srv/CancelGoal in the package action_msgs. -typedef struct action_msgs__srv__CancelGoal_Response -{ - int8_t return_code; - action_msgs__msg__GoalInfo__Sequence goals_canceling; -} action_msgs__srv__CancelGoal_Response; - -// Struct for a sequence of action_msgs__srv__CancelGoal_Response. -typedef struct action_msgs__srv__CancelGoal_Response__Sequence -{ - action_msgs__srv__CancelGoal_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} action_msgs__srv__CancelGoal_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__STRUCT_H_ diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__traits.hpp b/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__traits.hpp deleted file mode 100644 index c2b295a55..000000000 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from action_msgs:srv/CancelGoal.idl -// generated code does not contain a copyright notice - -#ifndef ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ -#define ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ - -#include "action_msgs/srv/detail/cancel_goal__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'goal_info' -#include "action_msgs/msg/detail/goal_info__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::srv::CancelGoal_Request"; -} - -template<> -inline const char * name() -{ - return "action_msgs/srv/CancelGoal_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::srv::CancelGoal_Response"; -} - -template<> -inline const char * name() -{ - return "action_msgs/srv/CancelGoal_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "action_msgs::srv::CancelGoal"; -} - -template<> -inline const char * name() -{ - return "action_msgs/srv/CancelGoal"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // ACTION_MSGS__SRV__DETAIL__CANCEL_GOAL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.c b/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.c deleted file mode 100644 index f5dedc43d..000000000 --- a/ThirdParty/ros/include/action_msgs/srv/detail/cancel_goal__type_support.c +++ /dev/null @@ -1,290 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from action_msgs:srv/CancelGoal.idl -// generated code does not contain a copyright notice - -#include -#include "action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h" -#include "action_msgs/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 "action_msgs/srv/detail/cancel_goal__functions.h" -#include "action_msgs/srv/detail/cancel_goal__struct.h" - - -// Include directives for member types -// Member `goal_info` -#include "action_msgs/msg/goal_info.h" -// Member `goal_info` -#include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_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; - action_msgs__srv__CancelGoal_Request__init(message_memory); -} - -void CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_fini_function(void * message_memory) -{ - action_msgs__srv__CancelGoal_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array[1] = { - { - "goal_info", // 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(action_msgs__srv__CancelGoal_Request, goal_info), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_members = { - "action_msgs__srv", // message namespace - "CancelGoal_Request", // message name - 1, // number of fields - sizeof(action_msgs__srv__CancelGoal_Request), - CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array, // message members - CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) - CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_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 CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle = { - 0, - &CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Request)() { - CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); - if (!CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle.typesupport_identifier) { - CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &CancelGoal_Request__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "action_msgs/srv/detail/cancel_goal__rosidl_typesupport_introspection_c.h" -// already included above -// #include "action_msgs/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 "action_msgs/srv/detail/cancel_goal__functions.h" -// already included above -// #include "action_msgs/srv/detail/cancel_goal__struct.h" - - -// Include directives for member types -// Member `goals_canceling` -// already included above -// #include "action_msgs/msg/goal_info.h" -// Member `goals_canceling` -// already included above -// #include "action_msgs/msg/detail/goal_info__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_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; - action_msgs__srv__CancelGoal_Response__init(message_memory); -} - -void CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_fini_function(void * message_memory) -{ - action_msgs__srv__CancelGoal_Response__fini(message_memory); -} - -size_t CancelGoal_Response__rosidl_typesupport_introspection_c__size_function__GoalInfo__goals_canceling( - const void * untyped_member) -{ - const action_msgs__msg__GoalInfo__Sequence * member = - (const action_msgs__msg__GoalInfo__Sequence *)(untyped_member); - return member->size; -} - -const void * CancelGoal_Response__rosidl_typesupport_introspection_c__get_const_function__GoalInfo__goals_canceling( - const void * untyped_member, size_t index) -{ - const action_msgs__msg__GoalInfo__Sequence * member = - (const action_msgs__msg__GoalInfo__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * CancelGoal_Response__rosidl_typesupport_introspection_c__get_function__GoalInfo__goals_canceling( - void * untyped_member, size_t index) -{ - action_msgs__msg__GoalInfo__Sequence * member = - (action_msgs__msg__GoalInfo__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool CancelGoal_Response__rosidl_typesupport_introspection_c__resize_function__GoalInfo__goals_canceling( - void * untyped_member, size_t size) -{ - action_msgs__msg__GoalInfo__Sequence * member = - (action_msgs__msg__GoalInfo__Sequence *)(untyped_member); - action_msgs__msg__GoalInfo__Sequence__fini(member); - return action_msgs__msg__GoalInfo__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array[2] = { - { - "return_code", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs__srv__CancelGoal_Response, return_code), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "goals_canceling", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(action_msgs__srv__CancelGoal_Response, goals_canceling), // bytes offset in struct - NULL, // default value - CancelGoal_Response__rosidl_typesupport_introspection_c__size_function__GoalInfo__goals_canceling, // size() function pointer - CancelGoal_Response__rosidl_typesupport_introspection_c__get_const_function__GoalInfo__goals_canceling, // get_const(index) function pointer - CancelGoal_Response__rosidl_typesupport_introspection_c__get_function__GoalInfo__goals_canceling, // get(index) function pointer - CancelGoal_Response__rosidl_typesupport_introspection_c__resize_function__GoalInfo__goals_canceling // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_members = { - "action_msgs__srv", // message namespace - "CancelGoal_Response", // message name - 2, // number of fields - sizeof(action_msgs__srv__CancelGoal_Response), - CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array, // message members - CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) - CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_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 CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle = { - 0, - &CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Response)() { - CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, msg, GoalInfo)(); - if (!CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle.typesupport_identifier) { - CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &CancelGoal_Response__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "action_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "action_msgs/srv/detail/cancel_goal__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 action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_members = { - "action_msgs__srv", // service namespace - "CancelGoal", // service name - // these two fields are initialized below on the first access - NULL, // request message - // action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_Request_message_type_support_handle, - NULL // response message - // action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle = { - 0, - &action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_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, action_msgs, srv, CancelGoal_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_action_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, action_msgs, srv, CancelGoal)() { - if (!action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle.typesupport_identifier) { - action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_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, action_msgs, srv, CancelGoal_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, action_msgs, srv, CancelGoal_Response)()->data; - } - - return &action_msgs__srv__detail__cancel_goal__rosidl_typesupport_introspection_c__CancelGoal_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__builder.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__builder.hpp similarity index 96% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__builder.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__builder.hpp index f4fedb707..741ee1171 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__builder.hpp +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__builder.hpp @@ -5,11 +5,12 @@ #ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__BUILDER_HPP_ #define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__BUILDER_HPP_ -#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" -#include #include #include +#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace actionlib_msgs { diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__functions.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__functions.c similarity index 91% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__functions.c rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__functions.c index 2e1fea70d..b0c4d6f8d 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__functions.c +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__functions.c @@ -237,22 +237,27 @@ actionlib_msgs__msg__GoalID__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(actionlib_msgs__msg__GoalID); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); actionlib_msgs__msg__GoalID * data = - (actionlib_msgs__msg__GoalID *)realloc(output->data, allocation_size); + (actionlib_msgs__msg__GoalID *)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 (!actionlib_msgs__msg__GoalID__init(&data[i])) { - /* free currently allocated and return false */ + if (!actionlib_msgs__msg__GoalID__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; ) { - actionlib_msgs__msg__GoalID__fini(&data[i]); + actionlib_msgs__msg__GoalID__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__functions.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__functions.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__functions.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__functions.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h index 482426cf4..14462d9e2 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_actionlib_msgs__msg__GoalID( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs size_t max_serialized_size_actionlib_msgs__msg__GoalID( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp index a27572d78..b8aa8cd04 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs max_serialized_size_GoalID( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.h new file mode 100644 index 000000000..ceaed1bfa --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.h @@ -0,0 +1,53 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from actionlib_msgs:msg/GoalID.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__struct.h" +// Member 'id' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/GoalID in the package actionlib_msgs. +typedef struct actionlib_msgs__msg__GoalID +{ + /// The stamp should store the time at which this goal was requested. + /// It is used by an action server when it tries to preempt all + /// goals that were requested before a certain time + builtin_interfaces__msg__Time stamp; + /// The id provides a way to associate feedback and + /// result message with specific goal requests. The id + /// specified must be unique. + rosidl_runtime_c__String id; +} actionlib_msgs__msg__GoalID; + +// Struct for a sequence of actionlib_msgs__msg__GoalID. +typedef struct actionlib_msgs__msg__GoalID__Sequence +{ + actionlib_msgs__msg__GoalID * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} actionlib_msgs__msg__GoalID__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.hpp similarity index 92% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.hpp index 16422d5d2..b4f72be3e 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.hpp +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__struct.hpp @@ -5,14 +5,15 @@ #ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_HPP_ #define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'stamp' @@ -62,7 +63,7 @@ struct GoalID_ builtin_interfaces::msg::Time_; _stamp_type stamp; using _id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _id_type id; // setters for named parameter idiom @@ -73,7 +74,7 @@ struct GoalID_ return *this; } Type & set__id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->id = _arg; return *this; diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__traits.hpp new file mode 100644 index 000000000..f6978e750 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from actionlib_msgs:msg/GoalID.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace actionlib_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalID & msg, + std::ostream & out) +{ + out << "{"; + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + out << ", "; + } + + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalID & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } + + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalID & 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 actionlib_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use actionlib_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const actionlib_msgs::msg::GoalID & msg, + std::ostream & out, size_t indentation = 0) +{ + actionlib_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use actionlib_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const actionlib_msgs::msg::GoalID & msg) +{ + return actionlib_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "actionlib_msgs::msg::GoalID"; +} + +template<> +inline const char * name() +{ + return "actionlib_msgs/msg/GoalID"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.c new file mode 100644 index 000000000..e1a0b56a6 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.c @@ -0,0 +1,110 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from actionlib_msgs:msg/GoalID.idl +// generated code does not contain a copyright notice + +#include +#include "actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h" +#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_id__functions.h" +#include "actionlib_msgs/msg/detail/goal_id__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `id` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_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; + actionlib_msgs__msg__GoalID__init(message_memory); +} + +void actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_fini_function(void * message_memory) +{ + actionlib_msgs__msg__GoalID__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array[2] = { + { + "stamp", // 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(actionlib_msgs__msg__GoalID, stamp), // 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 + }, + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs__msg__GoalID, id), // 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 actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_members = { + "actionlib_msgs__msg", // message namespace + "GoalID", // message name + 2, // number of fields + sizeof(actionlib_msgs__msg__GoalID), + actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array, // message members + actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_init_function, // function to initialize message memory (memory has to be allocated) + actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_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 actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle = { + 0, + &actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalID)() { + actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle.typesupport_identifier) { + actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &actionlib_msgs__msg__GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.cpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.cpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.cpp index 430d92ffc..e9e7ad786 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.cpp +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalID_messag 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalID_messag 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 } }; diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.hpp new file mode 100644 index 000000000..68957651a --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_id__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from actionlib_msgs:msg/GoalID.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TYPE_SUPPORT_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "actionlib_msgs/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_actionlib_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + actionlib_msgs, + msg, + GoalID +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__builder.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__builder.hpp new file mode 100644 index 000000000..b084be4d3 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__builder.hpp @@ -0,0 +1,88 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ + +#include +#include + +#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace actionlib_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_GoalStatus_text +{ +public: + explicit Init_GoalStatus_text(::actionlib_msgs::msg::GoalStatus & msg) + : msg_(msg) + {} + ::actionlib_msgs::msg::GoalStatus text(::actionlib_msgs::msg::GoalStatus::_text_type arg) + { + msg_.text = std::move(arg); + return std::move(msg_); + } + +private: + ::actionlib_msgs::msg::GoalStatus msg_; +}; + +class Init_GoalStatus_status +{ +public: + explicit Init_GoalStatus_status(::actionlib_msgs::msg::GoalStatus & msg) + : msg_(msg) + {} + Init_GoalStatus_text status(::actionlib_msgs::msg::GoalStatus::_status_type arg) + { + msg_.status = std::move(arg); + return Init_GoalStatus_text(msg_); + } + +private: + ::actionlib_msgs::msg::GoalStatus msg_; +}; + +class Init_GoalStatus_goal_id +{ +public: + Init_GoalStatus_goal_id() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_GoalStatus_status goal_id(::actionlib_msgs::msg::GoalStatus::_goal_id_type arg) + { + msg_.goal_id = std::move(arg); + return Init_GoalStatus_status(msg_); + } + +private: + ::actionlib_msgs::msg::GoalStatus msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::actionlib_msgs::msg::GoalStatus>() +{ + return actionlib_msgs::msg::builder::Init_GoalStatus_goal_id(); +} + +} // namespace actionlib_msgs + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__functions.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__functions.c new file mode 100644 index 000000000..ad1add929 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__functions.c @@ -0,0 +1,280 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice +#include "actionlib_msgs/msg/detail/goal_status__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `goal_id` +#include "actionlib_msgs/msg/detail/goal_id__functions.h" +// Member `text` +#include "rosidl_runtime_c/string_functions.h" + +bool +actionlib_msgs__msg__GoalStatus__init(actionlib_msgs__msg__GoalStatus * msg) +{ + if (!msg) { + return false; + } + // goal_id + if (!actionlib_msgs__msg__GoalID__init(&msg->goal_id)) { + actionlib_msgs__msg__GoalStatus__fini(msg); + return false; + } + // status + // text + if (!rosidl_runtime_c__String__init(&msg->text)) { + actionlib_msgs__msg__GoalStatus__fini(msg); + return false; + } + return true; +} + +void +actionlib_msgs__msg__GoalStatus__fini(actionlib_msgs__msg__GoalStatus * msg) +{ + if (!msg) { + return; + } + // goal_id + actionlib_msgs__msg__GoalID__fini(&msg->goal_id); + // status + // text + rosidl_runtime_c__String__fini(&msg->text); +} + +bool +actionlib_msgs__msg__GoalStatus__are_equal(const actionlib_msgs__msg__GoalStatus * lhs, const actionlib_msgs__msg__GoalStatus * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // goal_id + if (!actionlib_msgs__msg__GoalID__are_equal( + &(lhs->goal_id), &(rhs->goal_id))) + { + return false; + } + // status + if (lhs->status != rhs->status) { + return false; + } + // text + if (!rosidl_runtime_c__String__are_equal( + &(lhs->text), &(rhs->text))) + { + return false; + } + return true; +} + +bool +actionlib_msgs__msg__GoalStatus__copy( + const actionlib_msgs__msg__GoalStatus * input, + actionlib_msgs__msg__GoalStatus * output) +{ + if (!input || !output) { + return false; + } + // goal_id + if (!actionlib_msgs__msg__GoalID__copy( + &(input->goal_id), &(output->goal_id))) + { + return false; + } + // status + output->status = input->status; + // text + if (!rosidl_runtime_c__String__copy( + &(input->text), &(output->text))) + { + return false; + } + return true; +} + +actionlib_msgs__msg__GoalStatus * +actionlib_msgs__msg__GoalStatus__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatus * msg = (actionlib_msgs__msg__GoalStatus *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatus), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(actionlib_msgs__msg__GoalStatus)); + bool success = actionlib_msgs__msg__GoalStatus__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +actionlib_msgs__msg__GoalStatus__destroy(actionlib_msgs__msg__GoalStatus * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + actionlib_msgs__msg__GoalStatus__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +actionlib_msgs__msg__GoalStatus__Sequence__init(actionlib_msgs__msg__GoalStatus__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatus * data = NULL; + + if (size) { + data = (actionlib_msgs__msg__GoalStatus *)allocator.zero_allocate(size, sizeof(actionlib_msgs__msg__GoalStatus), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = actionlib_msgs__msg__GoalStatus__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + actionlib_msgs__msg__GoalStatus__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +actionlib_msgs__msg__GoalStatus__Sequence__fini(actionlib_msgs__msg__GoalStatus__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) { + actionlib_msgs__msg__GoalStatus__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); + } +} + +actionlib_msgs__msg__GoalStatus__Sequence * +actionlib_msgs__msg__GoalStatus__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatus__Sequence * array = (actionlib_msgs__msg__GoalStatus__Sequence *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatus__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = actionlib_msgs__msg__GoalStatus__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +actionlib_msgs__msg__GoalStatus__Sequence__destroy(actionlib_msgs__msg__GoalStatus__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + actionlib_msgs__msg__GoalStatus__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +actionlib_msgs__msg__GoalStatus__Sequence__are_equal(const actionlib_msgs__msg__GoalStatus__Sequence * lhs, const actionlib_msgs__msg__GoalStatus__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!actionlib_msgs__msg__GoalStatus__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +actionlib_msgs__msg__GoalStatus__Sequence__copy( + const actionlib_msgs__msg__GoalStatus__Sequence * input, + actionlib_msgs__msg__GoalStatus__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(actionlib_msgs__msg__GoalStatus); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatus * data = + (actionlib_msgs__msg__GoalStatus *)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 (!actionlib_msgs__msg__GoalStatus__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; ) { + actionlib_msgs__msg__GoalStatus__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!actionlib_msgs__msg__GoalStatus__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__functions.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__functions.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__functions.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__functions.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b0f6de0fe --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +size_t get_serialized_size_actionlib_msgs__msg__GoalStatus( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +size_t max_serialized_size_actionlib_msgs__msg__GoalStatus( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, actionlib_msgs, msg, GoalStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..75bd3b398 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "actionlib_msgs/msg/detail/goal_status__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 actionlib_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +cdr_serialize( + const actionlib_msgs::msg::GoalStatus & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + actionlib_msgs::msg::GoalStatus & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +get_serialized_size( + const actionlib_msgs::msg::GoalStatus & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +max_serialized_size_GoalStatus( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace actionlib_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, actionlib_msgs, msg, GoalStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.h new file mode 100644 index 000000000..97c05bb94 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.h @@ -0,0 +1,147 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'PENDING'. +/** + * The goal has yet to be processed by the action server. + */ +enum +{ + actionlib_msgs__msg__GoalStatus__PENDING = 0 +}; + +/// Constant 'ACTIVE'. +/** + * The goal is currently being processed by the action server. + */ +enum +{ + actionlib_msgs__msg__GoalStatus__ACTIVE = 1 +}; + +/// Constant 'PREEMPTED'. +/** + * The goal received a cancel request after it started executing + * and has since completed its execution (Terminal State). + */ +enum +{ + actionlib_msgs__msg__GoalStatus__PREEMPTED = 2 +}; + +/// Constant 'SUCCEEDED'. +/** + * The goal was achieved successfully by the action server + * (Terminal State). + */ +enum +{ + actionlib_msgs__msg__GoalStatus__SUCCEEDED = 3 +}; + +/// Constant 'ABORTED'. +/** + * The goal was aborted during execution by the action server due + * to some failure (Terminal State). + */ +enum +{ + actionlib_msgs__msg__GoalStatus__ABORTED = 4 +}; + +/// Constant 'REJECTED'. +/** + * The goal was rejected by the action server without being processed, + * because the goal was unattainable or invalid (Terminal State). + */ +enum +{ + actionlib_msgs__msg__GoalStatus__REJECTED = 5 +}; + +/// Constant 'PREEMPTING'. +/** + * The goal received a cancel request after it started executing + * and has not yet completed execution. + */ +enum +{ + actionlib_msgs__msg__GoalStatus__PREEMPTING = 6 +}; + +/// Constant 'RECALLING'. +/** + * The goal received a cancel request before it started executing, but + * the action server has not yet confirmed that the goal is canceled. + */ +enum +{ + actionlib_msgs__msg__GoalStatus__RECALLING = 7 +}; + +/// Constant 'RECALLED'. +/** + * The goal received a cancel request before it started executing + * and was successfully cancelled (Terminal State). + */ +enum +{ + actionlib_msgs__msg__GoalStatus__RECALLED = 8 +}; + +/// Constant 'LOST'. +/** + * An action client can determine that a goal is LOST. This should not + * be sent over the wire by an action server. + */ +enum +{ + actionlib_msgs__msg__GoalStatus__LOST = 9 +}; + +// Include directives for member types +// Member 'goal_id' +#include "actionlib_msgs/msg/detail/goal_id__struct.h" +// Member 'text' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/GoalStatus in the package actionlib_msgs. +typedef struct actionlib_msgs__msg__GoalStatus +{ + actionlib_msgs__msg__GoalID goal_id; + uint8_t status; + /// Allow for the user to associate a string with GoalStatus for debugging. + rosidl_runtime_c__String text; +} actionlib_msgs__msg__GoalStatus; + +// Struct for a sequence of actionlib_msgs__msg__GoalStatus. +typedef struct actionlib_msgs__msg__GoalStatus__Sequence +{ + actionlib_msgs__msg__GoalStatus * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} actionlib_msgs__msg__GoalStatus__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.hpp new file mode 100644 index 000000000..54f582135 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__struct.hpp @@ -0,0 +1,233 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'goal_id' +#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__actionlib_msgs__msg__GoalStatus __attribute__((deprecated)) +#else +# define DEPRECATED__actionlib_msgs__msg__GoalStatus __declspec(deprecated) +#endif + +namespace actionlib_msgs +{ + +namespace msg +{ + +// message struct +template +struct GoalStatus_ +{ + using Type = GoalStatus_; + + explicit GoalStatus_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : goal_id(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->status = 0; + this->text = ""; + } + } + + explicit GoalStatus_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : goal_id(_alloc, _init), + text(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->status = 0; + this->text = ""; + } + } + + // field types and members + using _goal_id_type = + actionlib_msgs::msg::GoalID_; + _goal_id_type goal_id; + using _status_type = + uint8_t; + _status_type status; + using _text_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _text_type text; + + // setters for named parameter idiom + Type & set__goal_id( + const actionlib_msgs::msg::GoalID_ & _arg) + { + this->goal_id = _arg; + return *this; + } + Type & set__status( + const uint8_t & _arg) + { + this->status = _arg; + return *this; + } + Type & set__text( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->text = _arg; + return *this; + } + + // constant declarations + static constexpr uint8_t PENDING = + 0u; + static constexpr uint8_t ACTIVE = + 1u; + static constexpr uint8_t PREEMPTED = + 2u; + static constexpr uint8_t SUCCEEDED = + 3u; + static constexpr uint8_t ABORTED = + 4u; + static constexpr uint8_t REJECTED = + 5u; + static constexpr uint8_t PREEMPTING = + 6u; + static constexpr uint8_t RECALLING = + 7u; + static constexpr uint8_t RECALLED = + 8u; + static constexpr uint8_t LOST = + 9u; + + // pointer types + using RawPtr = + actionlib_msgs::msg::GoalStatus_ *; + using ConstRawPtr = + const actionlib_msgs::msg::GoalStatus_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__actionlib_msgs__msg__GoalStatus + std::shared_ptr> + Ptr; + typedef DEPRECATED__actionlib_msgs__msg__GoalStatus + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const GoalStatus_ & other) const + { + if (this->goal_id != other.goal_id) { + return false; + } + if (this->status != other.status) { + return false; + } + if (this->text != other.text) { + return false; + } + return true; + } + bool operator!=(const GoalStatus_ & other) const + { + return !this->operator==(other); + } +}; // struct GoalStatus_ + +// alias to use template instance with default allocator +using GoalStatus = + actionlib_msgs::msg::GoalStatus_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::PENDING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::ACTIVE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::PREEMPTED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::SUCCEEDED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::ABORTED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::REJECTED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::PREEMPTING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::RECALLING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::RECALLED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t GoalStatus_::LOST; +#endif // __cplusplus < 201703L + +} // namespace msg + +} // namespace actionlib_msgs + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__traits.hpp new file mode 100644 index 000000000..4dec93505 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__traits.hpp @@ -0,0 +1,146 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'goal_id' +#include "actionlib_msgs/msg/detail/goal_id__traits.hpp" + +namespace actionlib_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalStatus & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: status + { + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << ", "; + } + + // member: text + { + out << "text: "; + rosidl_generator_traits::value_to_yaml(msg.text, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << "\n"; + } + + // member: text + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "text: "; + rosidl_generator_traits::value_to_yaml(msg.text, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalStatus & 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 actionlib_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use actionlib_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const actionlib_msgs::msg::GoalStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + actionlib_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use actionlib_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const actionlib_msgs::msg::GoalStatus & msg) +{ + return actionlib_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "actionlib_msgs::msg::GoalStatus"; +} + +template<> +inline const char * name() +{ + return "actionlib_msgs/msg/GoalStatus"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.c new file mode 100644 index 000000000..883d5964e --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.c @@ -0,0 +1,127 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#include +#include "actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" +#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_status__functions.h" +#include "actionlib_msgs/msg/detail/goal_status__struct.h" + + +// Include directives for member types +// Member `goal_id` +#include "actionlib_msgs/msg/goal_id.h" +// Member `goal_id` +#include "actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h" +// Member `text` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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; + actionlib_msgs__msg__GoalStatus__init(message_memory); +} + +void actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_fini_function(void * message_memory) +{ + actionlib_msgs__msg__GoalStatus__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[3] = { + { + "goal_id", // 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(actionlib_msgs__msg__GoalStatus, goal_id), // 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 + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs__msg__GoalStatus, status), // 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 + }, + { + "text", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs__msg__GoalStatus, text), // 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 actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members = { + "actionlib_msgs__msg", // message namespace + "GoalStatus", // message name + 3, // number of fields + sizeof(actionlib_msgs__msg__GoalStatus), + actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array, // message members + actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) + actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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 actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle = { + 0, + &actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatus)() { + actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalID)(); + if (!actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier) { + actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &actionlib_msgs__msg__GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.cpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.cpp new file mode 100644 index 000000000..f0633c38e --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.cpp @@ -0,0 +1,143 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from actionlib_msgs:msg/GoalStatus.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 "actionlib_msgs/msg/detail/goal_status__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 actionlib_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void GoalStatus_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) actionlib_msgs::msg::GoalStatus(_init); +} + +void GoalStatus_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~GoalStatus(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatus_message_member_array[3] = { + { + "goal_id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs::msg::GoalStatus, goal_id), // 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 + }, + { + "status", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs::msg::GoalStatus, status), // 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 + }, + { + "text", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs::msg::GoalStatus, text), // 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 GoalStatus_message_members = { + "actionlib_msgs::msg", // message namespace + "GoalStatus", // message name + 3, // number of fields + sizeof(actionlib_msgs::msg::GoalStatus), + GoalStatus_message_member_array, // message members + GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) + GoalStatus_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t GoalStatus_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &GoalStatus_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace actionlib_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_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, actionlib_msgs, msg, GoalStatus)() { + return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.hpp new file mode 100644 index 000000000..9242a99f1 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from actionlib_msgs:msg/GoalStatus.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "actionlib_msgs/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_actionlib_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + actionlib_msgs, + msg, + GoalStatus +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__builder.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__builder.hpp new file mode 100644 index 000000000..120a8ec1a --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace actionlib_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_GoalStatusArray_status_list +{ +public: + explicit Init_GoalStatusArray_status_list(::actionlib_msgs::msg::GoalStatusArray & msg) + : msg_(msg) + {} + ::actionlib_msgs::msg::GoalStatusArray status_list(::actionlib_msgs::msg::GoalStatusArray::_status_list_type arg) + { + msg_.status_list = std::move(arg); + return std::move(msg_); + } + +private: + ::actionlib_msgs::msg::GoalStatusArray msg_; +}; + +class Init_GoalStatusArray_header +{ +public: + Init_GoalStatusArray_header() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_GoalStatusArray_status_list header(::actionlib_msgs::msg::GoalStatusArray::_header_type arg) + { + msg_.header = std::move(arg); + return Init_GoalStatusArray_status_list(msg_); + } + +private: + ::actionlib_msgs::msg::GoalStatusArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::actionlib_msgs::msg::GoalStatusArray>() +{ + return actionlib_msgs::msg::builder::Init_GoalStatusArray_header(); +} + +} // namespace actionlib_msgs + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__functions.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__functions.c new file mode 100644 index 000000000..bfa77342b --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice +#include "actionlib_msgs/msg/detail/goal_status_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/detail/header__functions.h" +// Member `status_list` +#include "actionlib_msgs/msg/detail/goal_status__functions.h" + +bool +actionlib_msgs__msg__GoalStatusArray__init(actionlib_msgs__msg__GoalStatusArray * msg) +{ + if (!msg) { + return false; + } + // header + if (!std_msgs__msg__Header__init(&msg->header)) { + actionlib_msgs__msg__GoalStatusArray__fini(msg); + return false; + } + // status_list + if (!actionlib_msgs__msg__GoalStatus__Sequence__init(&msg->status_list, 0)) { + actionlib_msgs__msg__GoalStatusArray__fini(msg); + return false; + } + return true; +} + +void +actionlib_msgs__msg__GoalStatusArray__fini(actionlib_msgs__msg__GoalStatusArray * msg) +{ + if (!msg) { + return; + } + // header + std_msgs__msg__Header__fini(&msg->header); + // status_list + actionlib_msgs__msg__GoalStatus__Sequence__fini(&msg->status_list); +} + +bool +actionlib_msgs__msg__GoalStatusArray__are_equal(const actionlib_msgs__msg__GoalStatusArray * lhs, const actionlib_msgs__msg__GoalStatusArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // header + if (!std_msgs__msg__Header__are_equal( + &(lhs->header), &(rhs->header))) + { + return false; + } + // status_list + if (!actionlib_msgs__msg__GoalStatus__Sequence__are_equal( + &(lhs->status_list), &(rhs->status_list))) + { + return false; + } + return true; +} + +bool +actionlib_msgs__msg__GoalStatusArray__copy( + const actionlib_msgs__msg__GoalStatusArray * input, + actionlib_msgs__msg__GoalStatusArray * output) +{ + if (!input || !output) { + return false; + } + // header + if (!std_msgs__msg__Header__copy( + &(input->header), &(output->header))) + { + return false; + } + // status_list + if (!actionlib_msgs__msg__GoalStatus__Sequence__copy( + &(input->status_list), &(output->status_list))) + { + return false; + } + return true; +} + +actionlib_msgs__msg__GoalStatusArray * +actionlib_msgs__msg__GoalStatusArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatusArray * msg = (actionlib_msgs__msg__GoalStatusArray *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatusArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(actionlib_msgs__msg__GoalStatusArray)); + bool success = actionlib_msgs__msg__GoalStatusArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +actionlib_msgs__msg__GoalStatusArray__destroy(actionlib_msgs__msg__GoalStatusArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + actionlib_msgs__msg__GoalStatusArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +actionlib_msgs__msg__GoalStatusArray__Sequence__init(actionlib_msgs__msg__GoalStatusArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatusArray * data = NULL; + + if (size) { + data = (actionlib_msgs__msg__GoalStatusArray *)allocator.zero_allocate(size, sizeof(actionlib_msgs__msg__GoalStatusArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = actionlib_msgs__msg__GoalStatusArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + actionlib_msgs__msg__GoalStatusArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +actionlib_msgs__msg__GoalStatusArray__Sequence__fini(actionlib_msgs__msg__GoalStatusArray__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) { + actionlib_msgs__msg__GoalStatusArray__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); + } +} + +actionlib_msgs__msg__GoalStatusArray__Sequence * +actionlib_msgs__msg__GoalStatusArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatusArray__Sequence * array = (actionlib_msgs__msg__GoalStatusArray__Sequence *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatusArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = actionlib_msgs__msg__GoalStatusArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +actionlib_msgs__msg__GoalStatusArray__Sequence__destroy(actionlib_msgs__msg__GoalStatusArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + actionlib_msgs__msg__GoalStatusArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +actionlib_msgs__msg__GoalStatusArray__Sequence__are_equal(const actionlib_msgs__msg__GoalStatusArray__Sequence * lhs, const actionlib_msgs__msg__GoalStatusArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!actionlib_msgs__msg__GoalStatusArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +actionlib_msgs__msg__GoalStatusArray__Sequence__copy( + const actionlib_msgs__msg__GoalStatusArray__Sequence * input, + actionlib_msgs__msg__GoalStatusArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(actionlib_msgs__msg__GoalStatusArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + actionlib_msgs__msg__GoalStatusArray * data = + (actionlib_msgs__msg__GoalStatusArray *)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 (!actionlib_msgs__msg__GoalStatusArray__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; ) { + actionlib_msgs__msg__GoalStatusArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!actionlib_msgs__msg__GoalStatusArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__functions.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__functions.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__functions.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__functions.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..c45187878 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +size_t get_serialized_size_actionlib_msgs__msg__GoalStatusArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +size_t max_serialized_size_actionlib_msgs__msg__GoalStatusArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, actionlib_msgs, msg, GoalStatusArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..53188f5eb --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "actionlib_msgs/msg/detail/goal_status_array__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 actionlib_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +cdr_serialize( + const actionlib_msgs::msg::GoalStatusArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + actionlib_msgs::msg::GoalStatusArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +get_serialized_size( + const actionlib_msgs::msg::GoalStatusArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +max_serialized_size_GoalStatusArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace actionlib_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, actionlib_msgs, msg, GoalStatusArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.h new file mode 100644 index 000000000..f9228a4e9 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.h @@ -0,0 +1,51 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'status_list' +#include "actionlib_msgs/msg/detail/goal_status__struct.h" + +/// Struct defined in msg/GoalStatusArray in the package actionlib_msgs. +/** + * Stores the statuses for goals that are currently being tracked + * by an action server + */ +typedef struct actionlib_msgs__msg__GoalStatusArray +{ + std_msgs__msg__Header header; + actionlib_msgs__msg__GoalStatus__Sequence status_list; +} actionlib_msgs__msg__GoalStatusArray; + +// Struct for a sequence of actionlib_msgs__msg__GoalStatusArray. +typedef struct actionlib_msgs__msg__GoalStatusArray__Sequence +{ + actionlib_msgs__msg__GoalStatusArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} actionlib_msgs__msg__GoalStatusArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.hpp new file mode 100644 index 000000000..ceca74cc4 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__struct.hpp @@ -0,0 +1,142 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.hpp" +// Member 'status_list' +#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__actionlib_msgs__msg__GoalStatusArray __attribute__((deprecated)) +#else +# define DEPRECATED__actionlib_msgs__msg__GoalStatusArray __declspec(deprecated) +#endif + +namespace actionlib_msgs +{ + +namespace msg +{ + +// message struct +template +struct GoalStatusArray_ +{ + using Type = GoalStatusArray_; + + explicit GoalStatusArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init) + { + (void)_init; + } + + explicit GoalStatusArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _header_type = + std_msgs::msg::Header_; + _header_type header; + using _status_list_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _status_list_type status_list; + + // setters for named parameter idiom + Type & set__header( + const std_msgs::msg::Header_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__status_list( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->status_list = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + actionlib_msgs::msg::GoalStatusArray_ *; + using ConstRawPtr = + const actionlib_msgs::msg::GoalStatusArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__actionlib_msgs__msg__GoalStatusArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__actionlib_msgs__msg__GoalStatusArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const GoalStatusArray_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->status_list != other.status_list) { + return false; + } + return true; + } + bool operator!=(const GoalStatusArray_ & other) const + { + return !this->operator==(other); + } +}; // struct GoalStatusArray_ + +// alias to use template instance with default allocator +using GoalStatusArray = + actionlib_msgs::msg::GoalStatusArray_>; + +// constant definitions + +} // namespace msg + +} // namespace actionlib_msgs + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__traits.hpp new file mode 100644 index 000000000..7ac600f96 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__traits.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'status_list' +#include "actionlib_msgs/msg/detail/goal_status__traits.hpp" + +namespace actionlib_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GoalStatusArray & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: status_list + { + if (msg.status_list.size() == 0) { + out << "status_list: []"; + } else { + out << "status_list: ["; + size_t pending_items = msg.status_list.size(); + for (auto item : msg.status_list) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GoalStatusArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: status_list + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.status_list.size() == 0) { + out << "status_list: []\n"; + } else { + out << "status_list:\n"; + for (auto item : msg.status_list) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GoalStatusArray & 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 actionlib_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use actionlib_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const actionlib_msgs::msg::GoalStatusArray & msg, + std::ostream & out, size_t indentation = 0) +{ + actionlib_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use actionlib_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const actionlib_msgs::msg::GoalStatusArray & msg) +{ + return actionlib_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "actionlib_msgs::msg::GoalStatusArray"; +} + +template<> +inline const char * name() +{ + return "actionlib_msgs/msg/GoalStatusArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.c b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.c new file mode 100644 index 000000000..b72d40ae0 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#include +#include "actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h" +#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_status_array__functions.h" +#include "actionlib_msgs/msg/detail/goal_status_array__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `status_list` +#include "actionlib_msgs/msg/goal_status.h" +// Member `status_list` +#include "actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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; + actionlib_msgs__msg__GoalStatusArray__init(message_memory); +} + +void actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_fini_function(void * message_memory) +{ + actionlib_msgs__msg__GoalStatusArray__fini(message_memory); +} + +size_t actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatusArray__status_list( + const void * untyped_member) +{ + const actionlib_msgs__msg__GoalStatus__Sequence * member = + (const actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return member->size; +} + +const void * actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index) +{ + const actionlib_msgs__msg__GoalStatus__Sequence * member = + (const actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list( + void * untyped_member, size_t index) +{ + actionlib_msgs__msg__GoalStatus__Sequence * member = + (actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__fetch_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index, void * untyped_value) +{ + const actionlib_msgs__msg__GoalStatus * item = + ((const actionlib_msgs__msg__GoalStatus *) + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list(untyped_member, index)); + actionlib_msgs__msg__GoalStatus * value = + (actionlib_msgs__msg__GoalStatus *)(untyped_value); + *value = *item; +} + +void actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__assign_function__GoalStatusArray__status_list( + void * untyped_member, size_t index, const void * untyped_value) +{ + actionlib_msgs__msg__GoalStatus * item = + ((actionlib_msgs__msg__GoalStatus *) + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list(untyped_member, index)); + const actionlib_msgs__msg__GoalStatus * value = + (const actionlib_msgs__msg__GoalStatus *)(untyped_value); + *item = *value; +} + +bool actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatusArray__status_list( + void * untyped_member, size_t size) +{ + actionlib_msgs__msg__GoalStatus__Sequence * member = + (actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); + actionlib_msgs__msg__GoalStatus__Sequence__fini(member); + return actionlib_msgs__msg__GoalStatus__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[2] = { + { + "header", // 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(actionlib_msgs__msg__GoalStatusArray, header), // 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 + }, + { + "status_list", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs__msg__GoalStatusArray, status_list), // bytes offset in struct + NULL, // default value + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatusArray__status_list, // size() function pointer + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatusArray__status_list, // get(index) function pointer + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__fetch_function__GoalStatusArray__status_list, // fetch(index, &value) function pointer + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__assign_function__GoalStatusArray__status_list, // assign(index, value) function pointer + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatusArray__status_list // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members = { + "actionlib_msgs__msg", // message namespace + "GoalStatusArray", // message name + 2, // number of fields + sizeof(actionlib_msgs__msg__GoalStatusArray), + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array, // message members + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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 actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle = { + 0, + &actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatusArray)() { + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatus)(); + if (!actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier) { + actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &actionlib_msgs__msg__GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp new file mode 100644 index 000000000..40628dfbe --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.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 "actionlib_msgs/msg/detail/goal_status_array__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 actionlib_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void GoalStatusArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) actionlib_msgs::msg::GoalStatusArray(_init); +} + +void GoalStatusArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~GoalStatusArray(); +} + +size_t size_function__GoalStatusArray__status_list(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__GoalStatusArray__status_list(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__GoalStatusArray__status_list(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__GoalStatusArray__status_list( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GoalStatusArray__status_list(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GoalStatusArray__status_list( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GoalStatusArray__status_list(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__GoalStatusArray__status_list(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatusArray_message_member_array[2] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs::msg::GoalStatusArray, header), // 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 + }, + { + "status_list", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(actionlib_msgs::msg::GoalStatusArray, status_list), // bytes offset in struct + nullptr, // default value + size_function__GoalStatusArray__status_list, // size() function pointer + get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer + get_function__GoalStatusArray__status_list, // get(index) function pointer + fetch_function__GoalStatusArray__status_list, // fetch(index, &value) function pointer + assign_function__GoalStatusArray__status_list, // assign(index, value) function pointer + resize_function__GoalStatusArray__status_list // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatusArray_message_members = { + "actionlib_msgs::msg", // message namespace + "GoalStatusArray", // message name + 2, // number of fields + sizeof(actionlib_msgs::msg::GoalStatusArray), + GoalStatusArray_message_member_array, // message members + GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) + GoalStatusArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t GoalStatusArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &GoalStatusArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace actionlib_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_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, actionlib_msgs, msg, GoalStatusArray)() { + return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.hpp new file mode 100644 index 000000000..5a3270821 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/detail/goal_status_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from actionlib_msgs:msg/GoalStatusArray.idl +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ +#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "actionlib_msgs/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_actionlib_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + actionlib_msgs, + msg, + GoalStatusArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_id.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_id.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/goal_id.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_id.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_id.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_id.hpp similarity index 86% rename from ThirdParty/ros/include/actionlib_msgs/msg/goal_id.hpp rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_id.hpp index 58c706dc1..e2b36db9c 100644 --- a/ThirdParty/ros/include/actionlib_msgs/msg/goal_id.hpp +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_id.hpp @@ -7,5 +7,6 @@ #include "actionlib_msgs/msg/detail/goal_id__struct.hpp" #include "actionlib_msgs/msg/detail/goal_id__builder.hpp" #include "actionlib_msgs/msg/detail/goal_id__traits.hpp" +#include "actionlib_msgs/msg/detail/goal_id__type_support.hpp" #endif // ACTIONLIB_MSGS__MSG__GOAL_ID_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/goal_status.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status.hpp new file mode 100644 index 000000000..12831b248 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ +#define ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ + +#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" +#include "actionlib_msgs/msg/detail/goal_status__builder.hpp" +#include "actionlib_msgs/msg/detail/goal_status__traits.hpp" +#include "actionlib_msgs/msg/detail/goal_status__type_support.hpp" + +#endif // ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status_array.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status_array.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/goal_status_array.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status_array.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status_array.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status_array.hpp new file mode 100644 index 000000000..c02e5034a --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/goal_status_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ +#define ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ + +#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" +#include "actionlib_msgs/msg/detail/goal_status_array__builder.hpp" +#include "actionlib_msgs/msg/detail/goal_status_array__traits.hpp" +#include "actionlib_msgs/msg/detail/goal_status_array__type_support.hpp" + +#endif // ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..68b0fc598 --- /dev/null +++ b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 ACTIONLIB_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define ACTIONLIB_MSGS__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_actionlib_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_actionlib_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_actionlib_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_actionlib_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_actionlib_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_actionlib_msgs ROSIDL_GENERATOR_CPP_EXPORT_actionlib_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_actionlib_msgs ROSIDL_GENERATOR_CPP_IMPORT_actionlib_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_actionlib_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_actionlib_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_actionlib_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_actionlib_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // ACTIONLIB_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/actionlib_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/actionlib_msgs/actionlib_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.h b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.h deleted file mode 100644 index 325b2901b..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from actionlib_msgs:msg/GoalID.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__struct.h" -// Member 'id' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/GoalID in the package actionlib_msgs. -typedef struct actionlib_msgs__msg__GoalID -{ - builtin_interfaces__msg__Time stamp; - rosidl_runtime_c__String id; -} actionlib_msgs__msg__GoalID; - -// Struct for a sequence of actionlib_msgs__msg__GoalID. -typedef struct actionlib_msgs__msg__GoalID__Sequence -{ - actionlib_msgs__msg__GoalID * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} actionlib_msgs__msg__GoalID__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__traits.hpp deleted file mode 100644 index a6e1d2c1a..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from actionlib_msgs:msg/GoalID.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ - -#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "actionlib_msgs::msg::GoalID"; -} - -template<> -inline const char * name() -{ - return "actionlib_msgs/msg/GoalID"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.c b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.c deleted file mode 100644 index 94b899239..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_id__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from actionlib_msgs:msg/GoalID.idl -// generated code does not contain a copyright notice - -#include -#include "actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h" -#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_id__functions.h" -#include "actionlib_msgs/msg/detail/goal_id__struct.h" - - -// Include directives for member types -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `id` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalID__rosidl_typesupport_introspection_c__GoalID_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; - actionlib_msgs__msg__GoalID__init(message_memory); -} - -void GoalID__rosidl_typesupport_introspection_c__GoalID_fini_function(void * message_memory) -{ - actionlib_msgs__msg__GoalID__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array[2] = { - { - "stamp", // 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(actionlib_msgs__msg__GoalID, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs__msg__GoalID, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalID__rosidl_typesupport_introspection_c__GoalID_message_members = { - "actionlib_msgs__msg", // message namespace - "GoalID", // message name - 2, // number of fields - sizeof(actionlib_msgs__msg__GoalID), - GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array, // message members - GoalID__rosidl_typesupport_introspection_c__GoalID_init_function, // function to initialize message memory (memory has to be allocated) - GoalID__rosidl_typesupport_introspection_c__GoalID_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 GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle = { - 0, - &GoalID__rosidl_typesupport_introspection_c__GoalID_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalID)() { - GoalID__rosidl_typesupport_introspection_c__GoalID_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle.typesupport_identifier) { - GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalID__rosidl_typesupport_introspection_c__GoalID_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__builder.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__builder.hpp deleted file mode 100644 index d7c519aef..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__builder.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" -#include -#include -#include - - -namespace actionlib_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_GoalStatus_text -{ -public: - explicit Init_GoalStatus_text(::actionlib_msgs::msg::GoalStatus & msg) - : msg_(msg) - {} - ::actionlib_msgs::msg::GoalStatus text(::actionlib_msgs::msg::GoalStatus::_text_type arg) - { - msg_.text = std::move(arg); - return std::move(msg_); - } - -private: - ::actionlib_msgs::msg::GoalStatus msg_; -}; - -class Init_GoalStatus_status -{ -public: - explicit Init_GoalStatus_status(::actionlib_msgs::msg::GoalStatus & msg) - : msg_(msg) - {} - Init_GoalStatus_text status(::actionlib_msgs::msg::GoalStatus::_status_type arg) - { - msg_.status = std::move(arg); - return Init_GoalStatus_text(msg_); - } - -private: - ::actionlib_msgs::msg::GoalStatus msg_; -}; - -class Init_GoalStatus_goal_id -{ -public: - Init_GoalStatus_goal_id() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_GoalStatus_status goal_id(::actionlib_msgs::msg::GoalStatus::_goal_id_type arg) - { - msg_.goal_id = std::move(arg); - return Init_GoalStatus_status(msg_); - } - -private: - ::actionlib_msgs::msg::GoalStatus msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::actionlib_msgs::msg::GoalStatus>() -{ - return actionlib_msgs::msg::builder::Init_GoalStatus_goal_id(); -} - -} // namespace actionlib_msgs - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__functions.c b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__functions.c deleted file mode 100644 index e8090cb98..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__functions.c +++ /dev/null @@ -1,275 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice -#include "actionlib_msgs/msg/detail/goal_status__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `goal_id` -#include "actionlib_msgs/msg/detail/goal_id__functions.h" -// Member `text` -#include "rosidl_runtime_c/string_functions.h" - -bool -actionlib_msgs__msg__GoalStatus__init(actionlib_msgs__msg__GoalStatus * msg) -{ - if (!msg) { - return false; - } - // goal_id - if (!actionlib_msgs__msg__GoalID__init(&msg->goal_id)) { - actionlib_msgs__msg__GoalStatus__fini(msg); - return false; - } - // status - // text - if (!rosidl_runtime_c__String__init(&msg->text)) { - actionlib_msgs__msg__GoalStatus__fini(msg); - return false; - } - return true; -} - -void -actionlib_msgs__msg__GoalStatus__fini(actionlib_msgs__msg__GoalStatus * msg) -{ - if (!msg) { - return; - } - // goal_id - actionlib_msgs__msg__GoalID__fini(&msg->goal_id); - // status - // text - rosidl_runtime_c__String__fini(&msg->text); -} - -bool -actionlib_msgs__msg__GoalStatus__are_equal(const actionlib_msgs__msg__GoalStatus * lhs, const actionlib_msgs__msg__GoalStatus * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // goal_id - if (!actionlib_msgs__msg__GoalID__are_equal( - &(lhs->goal_id), &(rhs->goal_id))) - { - return false; - } - // status - if (lhs->status != rhs->status) { - return false; - } - // text - if (!rosidl_runtime_c__String__are_equal( - &(lhs->text), &(rhs->text))) - { - return false; - } - return true; -} - -bool -actionlib_msgs__msg__GoalStatus__copy( - const actionlib_msgs__msg__GoalStatus * input, - actionlib_msgs__msg__GoalStatus * output) -{ - if (!input || !output) { - return false; - } - // goal_id - if (!actionlib_msgs__msg__GoalID__copy( - &(input->goal_id), &(output->goal_id))) - { - return false; - } - // status - output->status = input->status; - // text - if (!rosidl_runtime_c__String__copy( - &(input->text), &(output->text))) - { - return false; - } - return true; -} - -actionlib_msgs__msg__GoalStatus * -actionlib_msgs__msg__GoalStatus__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatus * msg = (actionlib_msgs__msg__GoalStatus *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatus), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(actionlib_msgs__msg__GoalStatus)); - bool success = actionlib_msgs__msg__GoalStatus__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -actionlib_msgs__msg__GoalStatus__destroy(actionlib_msgs__msg__GoalStatus * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - actionlib_msgs__msg__GoalStatus__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -actionlib_msgs__msg__GoalStatus__Sequence__init(actionlib_msgs__msg__GoalStatus__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatus * data = NULL; - - if (size) { - data = (actionlib_msgs__msg__GoalStatus *)allocator.zero_allocate(size, sizeof(actionlib_msgs__msg__GoalStatus), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = actionlib_msgs__msg__GoalStatus__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - actionlib_msgs__msg__GoalStatus__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -actionlib_msgs__msg__GoalStatus__Sequence__fini(actionlib_msgs__msg__GoalStatus__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) { - actionlib_msgs__msg__GoalStatus__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); - } -} - -actionlib_msgs__msg__GoalStatus__Sequence * -actionlib_msgs__msg__GoalStatus__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatus__Sequence * array = (actionlib_msgs__msg__GoalStatus__Sequence *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatus__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = actionlib_msgs__msg__GoalStatus__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -actionlib_msgs__msg__GoalStatus__Sequence__destroy(actionlib_msgs__msg__GoalStatus__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - actionlib_msgs__msg__GoalStatus__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -actionlib_msgs__msg__GoalStatus__Sequence__are_equal(const actionlib_msgs__msg__GoalStatus__Sequence * lhs, const actionlib_msgs__msg__GoalStatus__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!actionlib_msgs__msg__GoalStatus__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -actionlib_msgs__msg__GoalStatus__Sequence__copy( - const actionlib_msgs__msg__GoalStatus__Sequence * input, - actionlib_msgs__msg__GoalStatus__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(actionlib_msgs__msg__GoalStatus); - actionlib_msgs__msg__GoalStatus * data = - (actionlib_msgs__msg__GoalStatus *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!actionlib_msgs__msg__GoalStatus__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - actionlib_msgs__msg__GoalStatus__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!actionlib_msgs__msg__GoalStatus__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 695bd3c05..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -size_t get_serialized_size_actionlib_msgs__msg__GoalStatus( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -size_t max_serialized_size_actionlib_msgs__msg__GoalStatus( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, actionlib_msgs, msg, GoalStatus)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index b6d220ab0..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "actionlib_msgs/msg/detail/goal_status__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 actionlib_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -cdr_serialize( - const actionlib_msgs::msg::GoalStatus & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - actionlib_msgs::msg::GoalStatus & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -get_serialized_size( - const actionlib_msgs::msg::GoalStatus & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -max_serialized_size_GoalStatus( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace actionlib_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, actionlib_msgs, msg, GoalStatus)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.h b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.h deleted file mode 100644 index c4a084414..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.h +++ /dev/null @@ -1,108 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'PENDING'. -enum -{ - actionlib_msgs__msg__GoalStatus__PENDING = 0 -}; - -/// Constant 'ACTIVE'. -enum -{ - actionlib_msgs__msg__GoalStatus__ACTIVE = 1 -}; - -/// Constant 'PREEMPTED'. -enum -{ - actionlib_msgs__msg__GoalStatus__PREEMPTED = 2 -}; - -/// Constant 'SUCCEEDED'. -enum -{ - actionlib_msgs__msg__GoalStatus__SUCCEEDED = 3 -}; - -/// Constant 'ABORTED'. -enum -{ - actionlib_msgs__msg__GoalStatus__ABORTED = 4 -}; - -/// Constant 'REJECTED'. -enum -{ - actionlib_msgs__msg__GoalStatus__REJECTED = 5 -}; - -/// Constant 'PREEMPTING'. -enum -{ - actionlib_msgs__msg__GoalStatus__PREEMPTING = 6 -}; - -/// Constant 'RECALLING'. -enum -{ - actionlib_msgs__msg__GoalStatus__RECALLING = 7 -}; - -/// Constant 'RECALLED'. -enum -{ - actionlib_msgs__msg__GoalStatus__RECALLED = 8 -}; - -/// Constant 'LOST'. -enum -{ - actionlib_msgs__msg__GoalStatus__LOST = 9 -}; - -// Include directives for member types -// Member 'goal_id' -#include "actionlib_msgs/msg/detail/goal_id__struct.h" -// Member 'text' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/GoalStatus in the package actionlib_msgs. -typedef struct actionlib_msgs__msg__GoalStatus -{ - actionlib_msgs__msg__GoalID goal_id; - uint8_t status; - rosidl_runtime_c__String text; -} actionlib_msgs__msg__GoalStatus; - -// Struct for a sequence of actionlib_msgs__msg__GoalStatus. -typedef struct actionlib_msgs__msg__GoalStatus__Sequence -{ - actionlib_msgs__msg__GoalStatus * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} actionlib_msgs__msg__GoalStatus__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.hpp deleted file mode 100644 index 8f1fc74cf..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__struct.hpp +++ /dev/null @@ -1,202 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'goal_id' -#include "actionlib_msgs/msg/detail/goal_id__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__actionlib_msgs__msg__GoalStatus __attribute__((deprecated)) -#else -# define DEPRECATED__actionlib_msgs__msg__GoalStatus __declspec(deprecated) -#endif - -namespace actionlib_msgs -{ - -namespace msg -{ - -// message struct -template -struct GoalStatus_ -{ - using Type = GoalStatus_; - - explicit GoalStatus_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : goal_id(_init) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->status = 0; - this->text = ""; - } - } - - explicit GoalStatus_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : goal_id(_alloc, _init), - text(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->status = 0; - this->text = ""; - } - } - - // field types and members - using _goal_id_type = - actionlib_msgs::msg::GoalID_; - _goal_id_type goal_id; - using _status_type = - uint8_t; - _status_type status; - using _text_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _text_type text; - - // setters for named parameter idiom - Type & set__goal_id( - const actionlib_msgs::msg::GoalID_ & _arg) - { - this->goal_id = _arg; - return *this; - } - Type & set__status( - const uint8_t & _arg) - { - this->status = _arg; - return *this; - } - Type & set__text( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->text = _arg; - return *this; - } - - // constant declarations - static constexpr uint8_t PENDING = - 0u; - static constexpr uint8_t ACTIVE = - 1u; - static constexpr uint8_t PREEMPTED = - 2u; - static constexpr uint8_t SUCCEEDED = - 3u; - static constexpr uint8_t ABORTED = - 4u; - static constexpr uint8_t REJECTED = - 5u; - static constexpr uint8_t PREEMPTING = - 6u; - static constexpr uint8_t RECALLING = - 7u; - static constexpr uint8_t RECALLED = - 8u; - static constexpr uint8_t LOST = - 9u; - - // pointer types - using RawPtr = - actionlib_msgs::msg::GoalStatus_ *; - using ConstRawPtr = - const actionlib_msgs::msg::GoalStatus_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__actionlib_msgs__msg__GoalStatus - std::shared_ptr> - Ptr; - typedef DEPRECATED__actionlib_msgs__msg__GoalStatus - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const GoalStatus_ & other) const - { - if (this->goal_id != other.goal_id) { - return false; - } - if (this->status != other.status) { - return false; - } - if (this->text != other.text) { - return false; - } - return true; - } - bool operator!=(const GoalStatus_ & other) const - { - return !this->operator==(other); - } -}; // struct GoalStatus_ - -// alias to use template instance with default allocator -using GoalStatus = - actionlib_msgs::msg::GoalStatus_>; - -// constant definitions -template -constexpr uint8_t GoalStatus_::PENDING; -template -constexpr uint8_t GoalStatus_::ACTIVE; -template -constexpr uint8_t GoalStatus_::PREEMPTED; -template -constexpr uint8_t GoalStatus_::SUCCEEDED; -template -constexpr uint8_t GoalStatus_::ABORTED; -template -constexpr uint8_t GoalStatus_::REJECTED; -template -constexpr uint8_t GoalStatus_::PREEMPTING; -template -constexpr uint8_t GoalStatus_::RECALLING; -template -constexpr uint8_t GoalStatus_::RECALLED; -template -constexpr uint8_t GoalStatus_::LOST; - -} // namespace msg - -} // namespace actionlib_msgs - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__traits.hpp deleted file mode 100644 index 0baa2f8b4..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'goal_id' -#include "actionlib_msgs/msg/detail/goal_id__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "actionlib_msgs::msg::GoalStatus"; -} - -template<> -inline const char * name() -{ - return "actionlib_msgs/msg/GoalStatus"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.c b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.c deleted file mode 100644 index 1847d2bdb..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.c +++ /dev/null @@ -1,121 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from actionlib_msgs:msg/GoalStatus.idl -// generated code does not contain a copyright notice - -#include -#include "actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" -#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_status__functions.h" -#include "actionlib_msgs/msg/detail/goal_status__struct.h" - - -// Include directives for member types -// Member `goal_id` -#include "actionlib_msgs/msg/goal_id.h" -// Member `goal_id` -#include "actionlib_msgs/msg/detail/goal_id__rosidl_typesupport_introspection_c.h" -// Member `text` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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; - actionlib_msgs__msg__GoalStatus__init(message_memory); -} - -void GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_fini_function(void * message_memory) -{ - actionlib_msgs__msg__GoalStatus__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[3] = { - { - "goal_id", // 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(actionlib_msgs__msg__GoalStatus, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs__msg__GoalStatus, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "text", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs__msg__GoalStatus, text), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members = { - "actionlib_msgs__msg", // message namespace - "GoalStatus", // message name - 3, // number of fields - sizeof(actionlib_msgs__msg__GoalStatus), - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array, // message members - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_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 GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle = { - 0, - &GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatus)() { - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalID)(); - if (!GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier) { - GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalStatus__rosidl_typesupport_introspection_c__GoalStatus_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.cpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.cpp deleted file mode 100644 index 9faa07ea6..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status__type_support.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from actionlib_msgs:msg/GoalStatus.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 "actionlib_msgs/msg/detail/goal_status__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 actionlib_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void GoalStatus_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) actionlib_msgs::msg::GoalStatus(_init); -} - -void GoalStatus_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~GoalStatus(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatus_message_member_array[3] = { - { - "goal_id", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs::msg::GoalStatus, goal_id), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "status", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs::msg::GoalStatus, status), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "text", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs::msg::GoalStatus, text), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatus_message_members = { - "actionlib_msgs::msg", // message namespace - "GoalStatus", // message name - 3, // number of fields - sizeof(actionlib_msgs::msg::GoalStatus), - GoalStatus_message_member_array, // message members - GoalStatus_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatus_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t GoalStatus_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &GoalStatus_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace actionlib_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_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, actionlib_msgs, msg, GoalStatus)() { - return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatus_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__builder.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__builder.hpp deleted file mode 100644 index bbbea8409..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" -#include -#include -#include - - -namespace actionlib_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_GoalStatusArray_status_list -{ -public: - explicit Init_GoalStatusArray_status_list(::actionlib_msgs::msg::GoalStatusArray & msg) - : msg_(msg) - {} - ::actionlib_msgs::msg::GoalStatusArray status_list(::actionlib_msgs::msg::GoalStatusArray::_status_list_type arg) - { - msg_.status_list = std::move(arg); - return std::move(msg_); - } - -private: - ::actionlib_msgs::msg::GoalStatusArray msg_; -}; - -class Init_GoalStatusArray_header -{ -public: - Init_GoalStatusArray_header() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_GoalStatusArray_status_list header(::actionlib_msgs::msg::GoalStatusArray::_header_type arg) - { - msg_.header = std::move(arg); - return Init_GoalStatusArray_status_list(msg_); - } - -private: - ::actionlib_msgs::msg::GoalStatusArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::actionlib_msgs::msg::GoalStatusArray>() -{ - return actionlib_msgs::msg::builder::Init_GoalStatusArray_header(); -} - -} // namespace actionlib_msgs - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__functions.c b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__functions.c deleted file mode 100644 index e1bf1aa1e..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice -#include "actionlib_msgs/msg/detail/goal_status_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/detail/header__functions.h" -// Member `status_list` -#include "actionlib_msgs/msg/detail/goal_status__functions.h" - -bool -actionlib_msgs__msg__GoalStatusArray__init(actionlib_msgs__msg__GoalStatusArray * msg) -{ - if (!msg) { - return false; - } - // header - if (!std_msgs__msg__Header__init(&msg->header)) { - actionlib_msgs__msg__GoalStatusArray__fini(msg); - return false; - } - // status_list - if (!actionlib_msgs__msg__GoalStatus__Sequence__init(&msg->status_list, 0)) { - actionlib_msgs__msg__GoalStatusArray__fini(msg); - return false; - } - return true; -} - -void -actionlib_msgs__msg__GoalStatusArray__fini(actionlib_msgs__msg__GoalStatusArray * msg) -{ - if (!msg) { - return; - } - // header - std_msgs__msg__Header__fini(&msg->header); - // status_list - actionlib_msgs__msg__GoalStatus__Sequence__fini(&msg->status_list); -} - -bool -actionlib_msgs__msg__GoalStatusArray__are_equal(const actionlib_msgs__msg__GoalStatusArray * lhs, const actionlib_msgs__msg__GoalStatusArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // header - if (!std_msgs__msg__Header__are_equal( - &(lhs->header), &(rhs->header))) - { - return false; - } - // status_list - if (!actionlib_msgs__msg__GoalStatus__Sequence__are_equal( - &(lhs->status_list), &(rhs->status_list))) - { - return false; - } - return true; -} - -bool -actionlib_msgs__msg__GoalStatusArray__copy( - const actionlib_msgs__msg__GoalStatusArray * input, - actionlib_msgs__msg__GoalStatusArray * output) -{ - if (!input || !output) { - return false; - } - // header - if (!std_msgs__msg__Header__copy( - &(input->header), &(output->header))) - { - return false; - } - // status_list - if (!actionlib_msgs__msg__GoalStatus__Sequence__copy( - &(input->status_list), &(output->status_list))) - { - return false; - } - return true; -} - -actionlib_msgs__msg__GoalStatusArray * -actionlib_msgs__msg__GoalStatusArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatusArray * msg = (actionlib_msgs__msg__GoalStatusArray *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatusArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(actionlib_msgs__msg__GoalStatusArray)); - bool success = actionlib_msgs__msg__GoalStatusArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -actionlib_msgs__msg__GoalStatusArray__destroy(actionlib_msgs__msg__GoalStatusArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - actionlib_msgs__msg__GoalStatusArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -actionlib_msgs__msg__GoalStatusArray__Sequence__init(actionlib_msgs__msg__GoalStatusArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatusArray * data = NULL; - - if (size) { - data = (actionlib_msgs__msg__GoalStatusArray *)allocator.zero_allocate(size, sizeof(actionlib_msgs__msg__GoalStatusArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = actionlib_msgs__msg__GoalStatusArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - actionlib_msgs__msg__GoalStatusArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -actionlib_msgs__msg__GoalStatusArray__Sequence__fini(actionlib_msgs__msg__GoalStatusArray__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) { - actionlib_msgs__msg__GoalStatusArray__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); - } -} - -actionlib_msgs__msg__GoalStatusArray__Sequence * -actionlib_msgs__msg__GoalStatusArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - actionlib_msgs__msg__GoalStatusArray__Sequence * array = (actionlib_msgs__msg__GoalStatusArray__Sequence *)allocator.allocate(sizeof(actionlib_msgs__msg__GoalStatusArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = actionlib_msgs__msg__GoalStatusArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -actionlib_msgs__msg__GoalStatusArray__Sequence__destroy(actionlib_msgs__msg__GoalStatusArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - actionlib_msgs__msg__GoalStatusArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -actionlib_msgs__msg__GoalStatusArray__Sequence__are_equal(const actionlib_msgs__msg__GoalStatusArray__Sequence * lhs, const actionlib_msgs__msg__GoalStatusArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!actionlib_msgs__msg__GoalStatusArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -actionlib_msgs__msg__GoalStatusArray__Sequence__copy( - const actionlib_msgs__msg__GoalStatusArray__Sequence * input, - actionlib_msgs__msg__GoalStatusArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(actionlib_msgs__msg__GoalStatusArray); - actionlib_msgs__msg__GoalStatusArray * data = - (actionlib_msgs__msg__GoalStatusArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!actionlib_msgs__msg__GoalStatusArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - actionlib_msgs__msg__GoalStatusArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!actionlib_msgs__msg__GoalStatusArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index e5f6af102..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -size_t get_serialized_size_actionlib_msgs__msg__GoalStatusArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -size_t max_serialized_size_actionlib_msgs__msg__GoalStatusArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_actionlib_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, actionlib_msgs, msg, GoalStatusArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 82a7aa631..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "actionlib_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "actionlib_msgs/msg/detail/goal_status_array__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 actionlib_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -cdr_serialize( - const actionlib_msgs::msg::GoalStatusArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - actionlib_msgs::msg::GoalStatusArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -get_serialized_size( - const actionlib_msgs::msg::GoalStatusArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -max_serialized_size_GoalStatusArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace actionlib_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_actionlib_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, actionlib_msgs, msg, GoalStatusArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.h b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.h deleted file mode 100644 index b20829b6f..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'status_list' -#include "actionlib_msgs/msg/detail/goal_status__struct.h" - -// Struct defined in msg/GoalStatusArray in the package actionlib_msgs. -typedef struct actionlib_msgs__msg__GoalStatusArray -{ - std_msgs__msg__Header header; - actionlib_msgs__msg__GoalStatus__Sequence status_list; -} actionlib_msgs__msg__GoalStatusArray; - -// Struct for a sequence of actionlib_msgs__msg__GoalStatusArray. -typedef struct actionlib_msgs__msg__GoalStatusArray__Sequence -{ - actionlib_msgs__msg__GoalStatusArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} actionlib_msgs__msg__GoalStatusArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.hpp deleted file mode 100644 index 6c4497170..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__struct.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.hpp" -// Member 'status_list' -#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__actionlib_msgs__msg__GoalStatusArray __attribute__((deprecated)) -#else -# define DEPRECATED__actionlib_msgs__msg__GoalStatusArray __declspec(deprecated) -#endif - -namespace actionlib_msgs -{ - -namespace msg -{ - -// message struct -template -struct GoalStatusArray_ -{ - using Type = GoalStatusArray_; - - explicit GoalStatusArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_init) - { - (void)_init; - } - - explicit GoalStatusArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _header_type = - std_msgs::msg::Header_; - _header_type header; - using _status_list_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _status_list_type status_list; - - // setters for named parameter idiom - Type & set__header( - const std_msgs::msg::Header_ & _arg) - { - this->header = _arg; - return *this; - } - Type & set__status_list( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->status_list = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - actionlib_msgs::msg::GoalStatusArray_ *; - using ConstRawPtr = - const actionlib_msgs::msg::GoalStatusArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__actionlib_msgs__msg__GoalStatusArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__actionlib_msgs__msg__GoalStatusArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const GoalStatusArray_ & other) const - { - if (this->header != other.header) { - return false; - } - if (this->status_list != other.status_list) { - return false; - } - return true; - } - bool operator!=(const GoalStatusArray_ & other) const - { - return !this->operator==(other); - } -}; // struct GoalStatusArray_ - -// alias to use template instance with default allocator -using GoalStatusArray = - actionlib_msgs::msg::GoalStatusArray_>; - -// constant definitions - -} // namespace msg - -} // namespace actionlib_msgs - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__traits.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__traits.hpp deleted file mode 100644 index 7b87ac786..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ -#define ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "actionlib_msgs::msg::GoalStatusArray"; -} - -template<> -inline const char * name() -{ - return "actionlib_msgs/msg/GoalStatusArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ACTIONLIB_MSGS__MSG__DETAIL__GOAL_STATUS_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.c b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.c deleted file mode 100644 index f02b9c91c..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from actionlib_msgs:msg/GoalStatusArray.idl -// generated code does not contain a copyright notice - -#include -#include "actionlib_msgs/msg/detail/goal_status_array__rosidl_typesupport_introspection_c.h" -#include "actionlib_msgs/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 "actionlib_msgs/msg/detail/goal_status_array__functions.h" -#include "actionlib_msgs/msg/detail/goal_status_array__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `status_list` -#include "actionlib_msgs/msg/goal_status.h" -// Member `status_list` -#include "actionlib_msgs/msg/detail/goal_status__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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; - actionlib_msgs__msg__GoalStatusArray__init(message_memory); -} - -void GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_fini_function(void * message_memory) -{ - actionlib_msgs__msg__GoalStatusArray__fini(message_memory); -} - -size_t GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatus__status_list( - const void * untyped_member) -{ - const actionlib_msgs__msg__GoalStatus__Sequence * member = - (const actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return member->size; -} - -const void * GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatus__status_list( - const void * untyped_member, size_t index) -{ - const actionlib_msgs__msg__GoalStatus__Sequence * member = - (const actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatus__status_list( - void * untyped_member, size_t index) -{ - actionlib_msgs__msg__GoalStatus__Sequence * member = - (actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatus__status_list( - void * untyped_member, size_t size) -{ - actionlib_msgs__msg__GoalStatus__Sequence * member = - (actionlib_msgs__msg__GoalStatus__Sequence *)(untyped_member); - actionlib_msgs__msg__GoalStatus__Sequence__fini(member); - return actionlib_msgs__msg__GoalStatus__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[2] = { - { - "header", // 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(actionlib_msgs__msg__GoalStatusArray, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_list", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs__msg__GoalStatusArray, status_list), // bytes offset in struct - NULL, // default value - GoalStatusArray__rosidl_typesupport_introspection_c__size_function__GoalStatus__status_list, // size() function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__get_const_function__GoalStatus__status_list, // get_const(index) function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__get_function__GoalStatus__status_list, // get(index) function pointer - GoalStatusArray__rosidl_typesupport_introspection_c__resize_function__GoalStatus__status_list // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members = { - "actionlib_msgs__msg", // message namespace - "GoalStatusArray", // message name - 2, // number of fields - sizeof(actionlib_msgs__msg__GoalStatusArray), - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array, // message members - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_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 GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle = { - 0, - &GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_actionlib_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatusArray)() { - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, actionlib_msgs, msg, GoalStatus)(); - if (!GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier) { - GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GoalStatusArray__rosidl_typesupport_introspection_c__GoalStatusArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp b/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp deleted file mode 100644 index 7fb605ff7..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/detail/goal_status_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from actionlib_msgs:msg/GoalStatusArray.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 "actionlib_msgs/msg/detail/goal_status_array__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 actionlib_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void GoalStatusArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) actionlib_msgs::msg::GoalStatusArray(_init); -} - -void GoalStatusArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~GoalStatusArray(); -} - -size_t size_function__GoalStatusArray__status_list(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__GoalStatusArray__status_list(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__GoalStatusArray__status_list(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__GoalStatusArray__status_list(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember GoalStatusArray_message_member_array[2] = { - { - "header", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs::msg::GoalStatusArray, header), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "status_list", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(actionlib_msgs::msg::GoalStatusArray, status_list), // bytes offset in struct - nullptr, // default value - size_function__GoalStatusArray__status_list, // size() function pointer - get_const_function__GoalStatusArray__status_list, // get_const(index) function pointer - get_function__GoalStatusArray__status_list, // get(index) function pointer - resize_function__GoalStatusArray__status_list // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers GoalStatusArray_message_members = { - "actionlib_msgs::msg", // message namespace - "GoalStatusArray", // message name - 2, // number of fields - sizeof(actionlib_msgs::msg::GoalStatusArray), - GoalStatusArray_message_member_array, // message members - GoalStatusArray_init_function, // function to initialize message memory (memory has to be allocated) - GoalStatusArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t GoalStatusArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &GoalStatusArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace actionlib_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_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, actionlib_msgs, msg, GoalStatusArray)() { - return &::actionlib_msgs::msg::rosidl_typesupport_introspection_cpp::GoalStatusArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/goal_status.hpp deleted file mode 100644 index 07763e004..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ -#define ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status__struct.hpp" -#include "actionlib_msgs/msg/detail/goal_status__builder.hpp" -#include "actionlib_msgs/msg/detail/goal_status__traits.hpp" - -#endif // ACTIONLIB_MSGS__MSG__GOAL_STATUS_HPP_ diff --git a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status_array.hpp b/ThirdParty/ros/include/actionlib_msgs/msg/goal_status_array.hpp deleted file mode 100644 index 1702dce96..000000000 --- a/ThirdParty/ros/include/actionlib_msgs/msg/goal_status_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ -#define ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ - -#include "actionlib_msgs/msg/detail/goal_status_array__struct.hpp" -#include "actionlib_msgs/msg/detail/goal_status_array__builder.hpp" -#include "actionlib_msgs/msg/detail/goal_status_array__traits.hpp" - -#endif // ACTIONLIB_MSGS__MSG__GOAL_STATUS_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_prefix.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_prefix.hpp new file mode 100644 index 000000000..199c68c1a --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_prefix.hpp @@ -0,0 +1,56 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_PACKAGE_PREFIX_HPP_ +#define AMENT_INDEX_CPP__GET_PACKAGE_PREFIX_HPP_ + +#include +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Thrown when a package is not found. +class PackageNotFoundError : public std::out_of_range +{ +public: + /// Constuctor of an exception class to notify that a pacakge is not found + /* + * \param[in] package_name used in the exception message + */ + AMENT_INDEX_CPP_PUBLIC + explicit PackageNotFoundError(const std::string & package_name); + + AMENT_INDEX_CPP_PUBLIC + virtual ~PackageNotFoundError(); + + /// package name used in the exception message + const std::string package_name; +}; + +/// Return the installation prefix of the given package if found. +/** + * \param[in] package_name the name of the package to locate. + * \return installation prefix path in which the package was found. + * \throws PackageNotFoundError when the given package is not found. + */ +AMENT_INDEX_CPP_PUBLIC +std::string +get_package_prefix(const std::string & package_name); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_PACKAGE_PREFIX_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_share_directory.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_share_directory.hpp new file mode 100644 index 000000000..c78cfd8a6 --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_package_share_directory.hpp @@ -0,0 +1,37 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ +#define AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ + +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Return the share directory of the given package if found. +/** + * \param[in] package_name the name of the package to locate. + * \return share path of the package. + * \throws PackageNotFoundError when the given package is not found. + */ +AMENT_INDEX_CPP_PUBLIC +std::string +get_package_share_directory(const std::string & package_name); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_PACKAGE_SHARE_DIRECTORY_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_packages_with_prefixes.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_packages_with_prefixes.hpp new file mode 100644 index 000000000..56919b2e8 --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_packages_with_prefixes.hpp @@ -0,0 +1,33 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_PACKAGES_WITH_PREFIXES_HPP_ +#define AMENT_INDEX_CPP__GET_PACKAGES_WITH_PREFIXES_HPP_ + +#include +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Return a map of package names to their installation prefix. +AMENT_INDEX_CPP_PUBLIC +std::map +get_packages_with_prefixes(); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_PACKAGES_WITH_PREFIXES_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resource.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resource.hpp new file mode 100644 index 000000000..96e5c8059 --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resource.hpp @@ -0,0 +1,69 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** \mainpage ament_index_cpp: C++ API to access the ament resource index. + * + * This package contains functions to operate with the resource index + * + * - Get installation prefix of an installed package + * - get_package_prefix() + * - ament_index_cpp/get_package_prefix.hpp + * - Get share directory of an installed package + * - get_package_share_directory() + * - ament_index_cpp/get_package_share_directory.hpp + * - Get a map of package names to their installation prefix + * - get_packages_with_prefixes() + * - ament_index_cpp/get_packages_with_prefixes.hpp + * - Get the content and path of a resource + * - get_resource() + * - ament_index_cpp/get_resource.hpp + * - Get a map of resources based on a resource type + * - get_resources() + * - ament_index_cpp/get_resources.hpp + * - Check if resource exists and get its path + * - has_resource() + * - ament_index_cpp/has_resource.hpp + * - Macros for controlling symbol visibility on the library + * - ament_index_cpp/visibility_control.h + */ + +#ifndef AMENT_INDEX_CPP__GET_RESOURCE_HPP_ +#define AMENT_INDEX_CPP__GET_RESOURCE_HPP_ + +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ +/// Get a the content and path of a resource +/** + * \param[in] resource_type type of the resource + * \param[in] resource_name name of the resource + * \param[out] content content of the resource + * \param[out] prefix_path the installation prefix of the given resource if found. + * \return `true` is the resource exists, `false` otherwise. + * \throws std::runtime_error if resource_type or resource_name are empty. + */ +AMENT_INDEX_CPP_PUBLIC +bool +get_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string & content, + std::string * prefix_path = nullptr); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_RESOURCE_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resources.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resources.hpp new file mode 100644 index 000000000..7cb762980 --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_resources.hpp @@ -0,0 +1,38 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_RESOURCES_HPP_ +#define AMENT_INDEX_CPP__GET_RESOURCES_HPP_ + +#include +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Get a map of resources names to their installation prefix. +/** + * \param resource_type type of the resource. + * \return a map of resources names to their installation prefix. + * \throws std::runtime_error if resource_type is empty. + */ +AMENT_INDEX_CPP_PUBLIC +std::map +get_resources(const std::string & resource_type); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_RESOURCES_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_search_paths.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_search_paths.hpp new file mode 100644 index 000000000..017b41790 --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/get_search_paths.hpp @@ -0,0 +1,36 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__GET_SEARCH_PATHS_HPP_ +#define AMENT_INDEX_CPP__GET_SEARCH_PATHS_HPP_ + +#include +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ +/// Get the searcheable paths in the environment variable AMENT_PREFIX_PATH. +/** + * \return a list with the searcheable paths + * \throws runtime_error if the environment variable AMENT_PREFIX_PATH is not set + */ +AMENT_INDEX_CPP_PUBLIC +std::list +get_search_paths(); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__GET_SEARCH_PATHS_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/has_resource.hpp b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/has_resource.hpp new file mode 100644 index 000000000..b7b69633e --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/has_resource.hpp @@ -0,0 +1,42 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__HAS_RESOURCE_HPP_ +#define AMENT_INDEX_CPP__HAS_RESOURCE_HPP_ + +#include + +#include "ament_index_cpp/visibility_control.h" + +namespace ament_index_cpp +{ + +/// Check if resource exists and get its path +/** + * \param[in] resource_type type of the resource + * \param[in] resource_name name of the resource + * \param[out] prefix_path the installation prefix of the given resource if found. + * \return `true` if resource exists,`false` otherwise + * \throws std::runtime_error if resource_type or resource_name are empty + */ +AMENT_INDEX_CPP_PUBLIC +bool +has_resource( + const std::string & resource_type, + const std::string & resource_name, + std::string * prefix_path = nullptr); + +} // namespace ament_index_cpp + +#endif // AMENT_INDEX_CPP__HAS_RESOURCE_HPP_ diff --git a/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/visibility_control.h b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/visibility_control.h new file mode 100644 index 000000000..49a77fceb --- /dev/null +++ b/ThirdParty/ros/include/ament_index_cpp/ament_index_cpp/visibility_control.h @@ -0,0 +1,56 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef AMENT_INDEX_CPP__VISIBILITY_CONTROL_H_ +#define AMENT_INDEX_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 AMENT_INDEX_CPP_EXPORT __attribute__ ((dllexport)) + #define AMENT_INDEX_CPP_IMPORT __attribute__ ((dllimport)) + #else + #define AMENT_INDEX_CPP_EXPORT __declspec(dllexport) + #define AMENT_INDEX_CPP_IMPORT __declspec(dllimport) + #endif + #ifdef AMENT_INDEX_CPP_BUILDING_DLL + #define AMENT_INDEX_CPP_PUBLIC AMENT_INDEX_CPP_EXPORT + #else + #define AMENT_INDEX_CPP_PUBLIC AMENT_INDEX_CPP_IMPORT + #endif + #define AMENT_INDEX_CPP_LOCAL +#else + #define AMENT_INDEX_CPP_EXPORT __attribute__ ((visibility("default"))) + #define AMENT_INDEX_CPP_IMPORT + #if __GNUC__ >= 4 + #define AMENT_INDEX_CPP_PUBLIC __attribute__ ((visibility("default"))) + #define AMENT_INDEX_CPP_LOCAL __attribute__ ((visibility("hidden"))) + #else + #define AMENT_INDEX_CPP_PUBLIC + #define AMENT_INDEX_CPP_LOCAL + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // AMENT_INDEX_CPP__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__builder.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp similarity index 96% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__builder.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp index cc5b337f0..ca4488f0a 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__builder.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp @@ -5,11 +5,12 @@ #ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__BUILDER_HPP_ #define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__BUILDER_HPP_ -#include "builtin_interfaces/msg/detail/duration__struct.hpp" -#include #include #include +#include "builtin_interfaces/msg/detail/duration__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace builtin_interfaces { diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__functions.c b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__functions.c similarity index 90% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__functions.c rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__functions.c index 9f73ba081..55cd42c15 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__functions.c +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__functions.c @@ -209,22 +209,27 @@ builtin_interfaces__msg__Duration__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(builtin_interfaces__msg__Duration); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); builtin_interfaces__msg__Duration * data = - (builtin_interfaces__msg__Duration *)realloc(output->data, allocation_size); + (builtin_interfaces__msg__Duration *)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 (!builtin_interfaces__msg__Duration__init(&data[i])) { - /* free currently allocated and return false */ + if (!builtin_interfaces__msg__Duration__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; ) { - builtin_interfaces__msg__Duration__fini(&data[i]); + builtin_interfaces__msg__Duration__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__functions.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__functions.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__functions.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__functions.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h index 43ff4c95b..cd6196618 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_builtin_interfaces__msg__Duration( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_builtin_interfaces size_t max_serialized_size_builtin_interfaces__msg__Duration( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_builtin_interfaces diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp index a3a0f61d3..684671d51 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_builtin_interfaces max_serialized_size_Duration( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.h new file mode 100644 index 000000000..f0e79ee66 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.h @@ -0,0 +1,48 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from builtin_interfaces:msg/Duration.idl +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ +#define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Duration in the package builtin_interfaces. +/** + * Duration defines a period between two time points. + * Messages of this datatype are of ROS Time following this design: + * https://design.ros2.org/articles/clock_and_time.html + */ +typedef struct builtin_interfaces__msg__Duration +{ + /// Seconds component, range is valid over any possible int32 value. + int32_t sec; + /// Nanoseconds component in the range of [0, 10e9). + uint32_t nanosec; +} builtin_interfaces__msg__Duration; + +// Struct for a sequence of builtin_interfaces__msg__Duration. +typedef struct builtin_interfaces__msg__Duration__Sequence +{ + builtin_interfaces__msg__Duration * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} builtin_interfaces__msg__Duration__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp similarity index 97% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp index cd03af731..c410b3a31 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp @@ -5,14 +5,15 @@ #ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_HPP_ #define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__builtin_interfaces__msg__Duration __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp new file mode 100644 index 000000000..e64aeaa61 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from builtin_interfaces:msg/Duration.idl +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ +#define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "builtin_interfaces/msg/detail/duration__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace builtin_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Duration & msg, + std::ostream & out) +{ + out << "{"; + // member: sec + { + out << "sec: "; + rosidl_generator_traits::value_to_yaml(msg.sec, out); + out << ", "; + } + + // member: nanosec + { + out << "nanosec: "; + rosidl_generator_traits::value_to_yaml(msg.nanosec, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Duration & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: sec + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "sec: "; + rosidl_generator_traits::value_to_yaml(msg.sec, out); + out << "\n"; + } + + // member: nanosec + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "nanosec: "; + rosidl_generator_traits::value_to_yaml(msg.nanosec, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Duration & 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 builtin_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use builtin_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const builtin_interfaces::msg::Duration & msg, + std::ostream & out, size_t indentation = 0) +{ + builtin_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use builtin_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const builtin_interfaces::msg::Duration & msg) +{ + return builtin_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "builtin_interfaces::msg::Duration"; +} + +template<> +inline const char * name() +{ + return "builtin_interfaces/msg/Duration"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.c b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.c new file mode 100644 index 000000000..58f3186c7 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.c @@ -0,0 +1,100 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from builtin_interfaces:msg/Duration.idl +// generated code does not contain a copyright notice + +#include +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" +#include "builtin_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 "builtin_interfaces/msg/detail/duration__functions.h" +#include "builtin_interfaces/msg/detail/duration__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_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; + builtin_interfaces__msg__Duration__init(message_memory); +} + +void builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_fini_function(void * message_memory) +{ + builtin_interfaces__msg__Duration__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_member_array[2] = { + { + "sec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(builtin_interfaces__msg__Duration, sec), // 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 + }, + { + "nanosec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(builtin_interfaces__msg__Duration, nanosec), // 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 builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_members = { + "builtin_interfaces__msg", // message namespace + "Duration", // message name + 2, // number of fields + sizeof(builtin_interfaces__msg__Duration), + builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_member_array, // message members + builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_init_function, // function to initialize message memory (memory has to be allocated) + builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_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 builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle = { + 0, + &builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_builtin_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)() { + if (!builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle.typesupport_identifier) { + builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &builtin_interfaces__msg__Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.cpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.cpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.cpp index c36e2656d..0c9c3c91d 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.cpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Duration_mess 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Duration_mess 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 } }; diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.h diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp new file mode 100644 index 000000000..d9788ef05 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from builtin_interfaces:msg/Duration.idl +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TYPE_SUPPORT_HPP_ +#define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "builtin_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_builtin_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + builtin_interfaces, + msg, + Duration +)(); +#ifdef __cplusplus +} +#endif + +#endif // BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__builder.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp similarity index 96% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__builder.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp index e95865ccc..23507dbec 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__builder.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp @@ -5,11 +5,12 @@ #ifndef BUILTIN_INTERFACES__MSG__DETAIL__TIME__BUILDER_HPP_ #define BUILTIN_INTERFACES__MSG__DETAIL__TIME__BUILDER_HPP_ -#include "builtin_interfaces/msg/detail/time__struct.hpp" -#include #include #include +#include "builtin_interfaces/msg/detail/time__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace builtin_interfaces { diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__functions.c b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__functions.c similarity index 90% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__functions.c rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__functions.c index c8682f479..9933e4eaa 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__functions.c +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__functions.c @@ -209,22 +209,27 @@ builtin_interfaces__msg__Time__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(builtin_interfaces__msg__Time); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); builtin_interfaces__msg__Time * data = - (builtin_interfaces__msg__Time *)realloc(output->data, allocation_size); + (builtin_interfaces__msg__Time *)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 (!builtin_interfaces__msg__Time__init(&data[i])) { - /* free currently allocated and return false */ + if (!builtin_interfaces__msg__Time__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; ) { - builtin_interfaces__msg__Time__fini(&data[i]); + builtin_interfaces__msg__Time__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__functions.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__functions.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__functions.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__functions.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h index e97a77dca..d242331bf 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_builtin_interfaces__msg__Time( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_builtin_interfaces size_t max_serialized_size_builtin_interfaces__msg__Time( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_builtin_interfaces diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp index 6a66418f3..85ccce605 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_builtin_interfaces max_serialized_size_Time( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.h similarity index 75% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.h index 713246808..8f93090fc 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.h +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.h @@ -17,10 +17,16 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Time in the package builtin_interfaces. +/// Struct defined in msg/Time in the package builtin_interfaces. +/** + * This message communicates ROS Time defined here: + * https://design.ros2.org/articles/clock_and_time.html + */ typedef struct builtin_interfaces__msg__Time { + /// The seconds component, valid over all int32 values. int32_t sec; + /// The nanoseconds component, valid in the range [0, 10e9). uint32_t nanosec; } builtin_interfaces__msg__Time; diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp similarity index 97% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp index a96f83073..6e112b151 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__struct.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp @@ -5,14 +5,15 @@ #ifndef BUILTIN_INTERFACES__MSG__DETAIL__TIME__STRUCT_HPP_ #define BUILTIN_INTERFACES__MSG__DETAIL__TIME__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__builtin_interfaces__msg__Time __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp new file mode 100644 index 000000000..10f9f6b45 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from builtin_interfaces:msg/Time.idl +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ +#define BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "builtin_interfaces/msg/detail/time__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace builtin_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Time & msg, + std::ostream & out) +{ + out << "{"; + // member: sec + { + out << "sec: "; + rosidl_generator_traits::value_to_yaml(msg.sec, out); + out << ", "; + } + + // member: nanosec + { + out << "nanosec: "; + rosidl_generator_traits::value_to_yaml(msg.nanosec, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Time & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: sec + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "sec: "; + rosidl_generator_traits::value_to_yaml(msg.sec, out); + out << "\n"; + } + + // member: nanosec + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "nanosec: "; + rosidl_generator_traits::value_to_yaml(msg.nanosec, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Time & 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 builtin_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use builtin_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const builtin_interfaces::msg::Time & msg, + std::ostream & out, size_t indentation = 0) +{ + builtin_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use builtin_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const builtin_interfaces::msg::Time & msg) +{ + return builtin_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "builtin_interfaces::msg::Time"; +} + +template<> +inline const char * name() +{ + return "builtin_interfaces/msg/Time"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.c b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.c new file mode 100644 index 000000000..848c409d5 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.c @@ -0,0 +1,100 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from builtin_interfaces:msg/Time.idl +// generated code does not contain a copyright notice + +#include +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +#include "builtin_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 "builtin_interfaces/msg/detail/time__functions.h" +#include "builtin_interfaces/msg/detail/time__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_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; + builtin_interfaces__msg__Time__init(message_memory); +} + +void builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_fini_function(void * message_memory) +{ + builtin_interfaces__msg__Time__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_member_array[2] = { + { + "sec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(builtin_interfaces__msg__Time, sec), // 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 + }, + { + "nanosec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(builtin_interfaces__msg__Time, nanosec), // 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 builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_members = { + "builtin_interfaces__msg", // message namespace + "Time", // message name + 2, // number of fields + sizeof(builtin_interfaces__msg__Time), + builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_member_array, // message members + builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_init_function, // function to initialize message memory (memory has to be allocated) + builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_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 builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle = { + 0, + &builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_builtin_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)() { + if (!builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle.typesupport_identifier) { + builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &builtin_interfaces__msg__Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.cpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.cpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.cpp index f72d20c38..7197c6712 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.cpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Time_message_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Time_message_ 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 } }; diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.h diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp new file mode 100644 index 000000000..181d4c1f7 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from builtin_interfaces:msg/Time.idl +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__DETAIL__TIME__TYPE_SUPPORT_HPP_ +#define BUILTIN_INTERFACES__MSG__DETAIL__TIME__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "builtin_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_builtin_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + builtin_interfaces, + msg, + Time +)(); +#ifdef __cplusplus +} +#endif + +#endif // BUILTIN_INTERFACES__MSG__DETAIL__TIME__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/duration.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/duration.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/duration.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/duration.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/duration.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp similarity index 86% rename from ThirdParty/ros/include/builtin_interfaces/msg/duration.hpp rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp index 4ebbf0102..a123e54c5 100644 --- a/ThirdParty/ros/include/builtin_interfaces/msg/duration.hpp +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp @@ -7,5 +7,6 @@ #include "builtin_interfaces/msg/detail/duration__struct.hpp" #include "builtin_interfaces/msg/detail/duration__builder.hpp" #include "builtin_interfaces/msg/detail/duration__traits.hpp" +#include "builtin_interfaces/msg/detail/duration__type_support.hpp" #endif // BUILTIN_INTERFACES__MSG__DURATION_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..b62847ba7 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 BUILTIN_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define BUILTIN_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_builtin_interfaces __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_builtin_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_builtin_interfaces __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_builtin_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_builtin_interfaces + #define ROSIDL_GENERATOR_CPP_PUBLIC_builtin_interfaces ROSIDL_GENERATOR_CPP_EXPORT_builtin_interfaces + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_builtin_interfaces ROSIDL_GENERATOR_CPP_IMPORT_builtin_interfaces + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_builtin_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_builtin_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_builtin_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_builtin_interfaces + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // BUILTIN_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/time.h b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/time.h similarity index 100% rename from ThirdParty/ros/include/builtin_interfaces/msg/time.h rename to ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/time.h diff --git a/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/time.hpp b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/time.hpp new file mode 100644 index 000000000..bb5768585 --- /dev/null +++ b/ThirdParty/ros/include/builtin_interfaces/builtin_interfaces/msg/time.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef BUILTIN_INTERFACES__MSG__TIME_HPP_ +#define BUILTIN_INTERFACES__MSG__TIME_HPP_ + +#include "builtin_interfaces/msg/detail/time__struct.hpp" +#include "builtin_interfaces/msg/detail/time__builder.hpp" +#include "builtin_interfaces/msg/detail/time__traits.hpp" +#include "builtin_interfaces/msg/detail/time__type_support.hpp" + +#endif // BUILTIN_INTERFACES__MSG__TIME_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.h b/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.h deleted file mode 100644 index cecc8270f..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__struct.h +++ /dev/null @@ -1,41 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from builtin_interfaces:msg/Duration.idl -// generated code does not contain a copyright notice - -#ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ -#define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Duration in the package builtin_interfaces. -typedef struct builtin_interfaces__msg__Duration -{ - int32_t sec; - uint32_t nanosec; -} builtin_interfaces__msg__Duration; - -// Struct for a sequence of builtin_interfaces__msg__Duration. -typedef struct builtin_interfaces__msg__Duration__Sequence -{ - builtin_interfaces__msg__Duration * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} builtin_interfaces__msg__Duration__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // BUILTIN_INTERFACES__MSG__DETAIL__DURATION__STRUCT_H_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__traits.hpp b/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__traits.hpp deleted file mode 100644 index b0f99dcd4..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from builtin_interfaces:msg/Duration.idl -// generated code does not contain a copyright notice - -#ifndef BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ -#define BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ - -#include "builtin_interfaces/msg/detail/duration__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "builtin_interfaces::msg::Duration"; -} - -template<> -inline const char * name() -{ - return "builtin_interfaces/msg/Duration"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // BUILTIN_INTERFACES__MSG__DETAIL__DURATION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.c b/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.c deleted file mode 100644 index 317d242be..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/duration__type_support.c +++ /dev/null @@ -1,96 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from builtin_interfaces:msg/Duration.idl -// generated code does not contain a copyright notice - -#include -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" -#include "builtin_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 "builtin_interfaces/msg/detail/duration__functions.h" -#include "builtin_interfaces/msg/detail/duration__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Duration__rosidl_typesupport_introspection_c__Duration_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; - builtin_interfaces__msg__Duration__init(message_memory); -} - -void Duration__rosidl_typesupport_introspection_c__Duration_fini_function(void * message_memory) -{ - builtin_interfaces__msg__Duration__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Duration__rosidl_typesupport_introspection_c__Duration_message_member_array[2] = { - { - "sec", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(builtin_interfaces__msg__Duration, sec), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "nanosec", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(builtin_interfaces__msg__Duration, nanosec), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Duration__rosidl_typesupport_introspection_c__Duration_message_members = { - "builtin_interfaces__msg", // message namespace - "Duration", // message name - 2, // number of fields - sizeof(builtin_interfaces__msg__Duration), - Duration__rosidl_typesupport_introspection_c__Duration_message_member_array, // message members - Duration__rosidl_typesupport_introspection_c__Duration_init_function, // function to initialize message memory (memory has to be allocated) - Duration__rosidl_typesupport_introspection_c__Duration_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 Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle = { - 0, - &Duration__rosidl_typesupport_introspection_c__Duration_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_builtin_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)() { - if (!Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle.typesupport_identifier) { - Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Duration__rosidl_typesupport_introspection_c__Duration_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__traits.hpp b/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__traits.hpp deleted file mode 100644 index 7c3a4f31e..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from builtin_interfaces:msg/Time.idl -// generated code does not contain a copyright notice - -#ifndef BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ -#define BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ - -#include "builtin_interfaces/msg/detail/time__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "builtin_interfaces::msg::Time"; -} - -template<> -inline const char * name() -{ - return "builtin_interfaces/msg/Time"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // BUILTIN_INTERFACES__MSG__DETAIL__TIME__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.c b/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.c deleted file mode 100644 index 7a16c4733..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/detail/time__type_support.c +++ /dev/null @@ -1,96 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from builtin_interfaces:msg/Time.idl -// generated code does not contain a copyright notice - -#include -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -#include "builtin_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 "builtin_interfaces/msg/detail/time__functions.h" -#include "builtin_interfaces/msg/detail/time__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Time__rosidl_typesupport_introspection_c__Time_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; - builtin_interfaces__msg__Time__init(message_memory); -} - -void Time__rosidl_typesupport_introspection_c__Time_fini_function(void * message_memory) -{ - builtin_interfaces__msg__Time__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Time__rosidl_typesupport_introspection_c__Time_message_member_array[2] = { - { - "sec", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(builtin_interfaces__msg__Time, sec), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "nanosec", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(builtin_interfaces__msg__Time, nanosec), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Time__rosidl_typesupport_introspection_c__Time_message_members = { - "builtin_interfaces__msg", // message namespace - "Time", // message name - 2, // number of fields - sizeof(builtin_interfaces__msg__Time), - Time__rosidl_typesupport_introspection_c__Time_message_member_array, // message members - Time__rosidl_typesupport_introspection_c__Time_init_function, // function to initialize message memory (memory has to be allocated) - Time__rosidl_typesupport_introspection_c__Time_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 Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle = { - 0, - &Time__rosidl_typesupport_introspection_c__Time_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_builtin_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)() { - if (!Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle.typesupport_identifier) { - Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Time__rosidl_typesupport_introspection_c__Time_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/builtin_interfaces/msg/time.hpp b/ThirdParty/ros/include/builtin_interfaces/msg/time.hpp deleted file mode 100644 index a06e40217..000000000 --- a/ThirdParty/ros/include/builtin_interfaces/msg/time.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef BUILTIN_INTERFACES__MSG__TIME_HPP_ -#define BUILTIN_INTERFACES__MSG__TIME_HPP_ - -#include "builtin_interfaces/msg/detail/time__struct.hpp" -#include "builtin_interfaces/msg/detail/time__builder.hpp" -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -#endif // BUILTIN_INTERFACES__MSG__TIME_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp similarity index 96% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp index 27fd913bb..926405a1e 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp @@ -5,11 +5,12 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__BUILDER_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__BUILDER_HPP_ -#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp" -#include #include #include +#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace diagnostic_msgs { diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__functions.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__functions.c similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__functions.c rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__functions.c index 79a309473..0593d07af 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__functions.c +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__functions.c @@ -237,22 +237,27 @@ diagnostic_msgs__msg__DiagnosticArray__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__msg__DiagnosticArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__msg__DiagnosticArray * data = - (diagnostic_msgs__msg__DiagnosticArray *)realloc(output->data, allocation_size); + (diagnostic_msgs__msg__DiagnosticArray *)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 (!diagnostic_msgs__msg__DiagnosticArray__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__msg__DiagnosticArray__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; ) { - diagnostic_msgs__msg__DiagnosticArray__fini(&data[i]); + diagnostic_msgs__msg__DiagnosticArray__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__functions.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__functions.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__functions.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__functions.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h index 68047b66d..25e356209 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_diagnostic_msgs__msg__DiagnosticArray( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__msg__DiagnosticArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp index 348bfd2f3..d6b77d9ae 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_DiagnosticArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.h similarity index 84% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.h index cf1693529..ea990153c 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.h @@ -23,10 +23,15 @@ extern "C" // Member 'status' #include "diagnostic_msgs/msg/detail/diagnostic_status__struct.h" -// Struct defined in msg/DiagnosticArray in the package diagnostic_msgs. +/// Struct defined in msg/DiagnosticArray in the package diagnostic_msgs. +/** + * This message is used to send diagnostic information about the state of the robot. + */ typedef struct diagnostic_msgs__msg__DiagnosticArray { + /// for timestamp std_msgs__msg__Header header; + /// an array of components being reported on diagnostic_msgs__msg__DiagnosticStatus__Sequence status; } diagnostic_msgs__msg__DiagnosticArray; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp index 0e2840f5b..2ce1b8f9a 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp @@ -5,14 +5,15 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__STRUCT_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -55,7 +56,7 @@ struct DiagnosticArray_ std_msgs::msg::Header_; _header_type header; using _status_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _status_type status; // setters for named parameter idiom @@ -66,7 +67,7 @@ struct DiagnosticArray_ return *this; } Type & set__status( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->status = _arg; return *this; diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp new file mode 100644 index 000000000..e206cf59b --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from diagnostic_msgs:msg/DiagnosticArray.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'status' +#include "diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp" + +namespace diagnostic_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const DiagnosticArray & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: status + { + if (msg.status.size() == 0) { + out << "status: []"; + } else { + out << "status: ["; + size_t pending_items = msg.status.size(); + for (auto item : msg.status) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DiagnosticArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.status.size() == 0) { + out << "status: []\n"; + } else { + out << "status:\n"; + for (auto item : msg.status) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DiagnosticArray & 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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::msg::DiagnosticArray & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::msg::DiagnosticArray & msg) +{ + return diagnostic_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::msg::DiagnosticArray"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/msg/DiagnosticArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c new file mode 100644 index 000000000..7a7b6b5c2 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from diagnostic_msgs:msg/DiagnosticArray.idl +// generated code does not contain a copyright notice + +#include +#include "diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h" +#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/diagnostic_array__functions.h" +#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `status` +#include "diagnostic_msgs/msg/diagnostic_status.h" +// Member `status` +#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_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; + diagnostic_msgs__msg__DiagnosticArray__init(message_memory); +} + +void diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_fini_function(void * message_memory) +{ + diagnostic_msgs__msg__DiagnosticArray__fini(message_memory); +} + +size_t diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__size_function__DiagnosticArray__status( + const void * untyped_member) +{ + const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return member->size; +} + +const void * diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_const_function__DiagnosticArray__status( + const void * untyped_member, size_t index) +{ + const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_function__DiagnosticArray__status( + void * untyped_member, size_t index) +{ + diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__fetch_function__DiagnosticArray__status( + const void * untyped_member, size_t index, void * untyped_value) +{ + const diagnostic_msgs__msg__DiagnosticStatus * item = + ((const diagnostic_msgs__msg__DiagnosticStatus *) + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_const_function__DiagnosticArray__status(untyped_member, index)); + diagnostic_msgs__msg__DiagnosticStatus * value = + (diagnostic_msgs__msg__DiagnosticStatus *)(untyped_value); + *value = *item; +} + +void diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__assign_function__DiagnosticArray__status( + void * untyped_member, size_t index, const void * untyped_value) +{ + diagnostic_msgs__msg__DiagnosticStatus * item = + ((diagnostic_msgs__msg__DiagnosticStatus *) + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_function__DiagnosticArray__status(untyped_member, index)); + const diagnostic_msgs__msg__DiagnosticStatus * value = + (const diagnostic_msgs__msg__DiagnosticStatus *)(untyped_value); + *item = *value; +} + +bool diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__resize_function__DiagnosticArray__status( + void * untyped_member, size_t size) +{ + diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + diagnostic_msgs__msg__DiagnosticStatus__Sequence__fini(member); + return diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[2] = { + { + "header", // 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(diagnostic_msgs__msg__DiagnosticArray, header), // 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 + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticArray, status), // bytes offset in struct + NULL, // default value + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__size_function__DiagnosticArray__status, // size() function pointer + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_const_function__DiagnosticArray__status, // get_const(index) function pointer + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__get_function__DiagnosticArray__status, // get(index) function pointer + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__fetch_function__DiagnosticArray__status, // fetch(index, &value) function pointer + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__assign_function__DiagnosticArray__status, // assign(index, value) function pointer + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__resize_function__DiagnosticArray__status // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_members = { + "diagnostic_msgs__msg", // message namespace + "DiagnosticArray", // message name + 2, // number of fields + sizeof(diagnostic_msgs__msg__DiagnosticArray), + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array, // message members + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_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 diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle = { + 0, + &diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticArray)() { + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)(); + if (!diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__msg__DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp index 0c32c54cb..eec315678 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__DiagnosticArray__status(void * untyped_member, size_t index return &member[index]; } +void fetch_function__DiagnosticArray__status( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__DiagnosticArray__status(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__DiagnosticArray__status( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__DiagnosticArray__status(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__DiagnosticArray__status(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticArr 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticArr size_function__DiagnosticArray__status, // size() function pointer get_const_function__DiagnosticArray__status, // get_const(index) function pointer get_function__DiagnosticArray__status, // get(index) function pointer + fetch_function__DiagnosticArray__status, // fetch(index, &value) function pointer + assign_function__DiagnosticArray__status, // assign(index, value) function pointer resize_function__DiagnosticArray__status // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.hpp new file mode 100644 index 000000000..9895a8849 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from diagnostic_msgs:msg/DiagnosticArray.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TYPE_SUPPORT_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "diagnostic_msgs/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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + msg, + DiagnosticArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp index 1c45328e4..c8a1c9d21 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp @@ -5,11 +5,12 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__BUILDER_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__BUILDER_HPP_ -#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp" -#include #include #include +#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace diagnostic_msgs { diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__functions.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__functions.c similarity index 92% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__functions.c rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__functions.c index 66f354297..b0fbe2d6e 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__functions.c +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__functions.c @@ -285,22 +285,27 @@ diagnostic_msgs__msg__DiagnosticStatus__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__msg__DiagnosticStatus); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__msg__DiagnosticStatus * data = - (diagnostic_msgs__msg__DiagnosticStatus *)realloc(output->data, allocation_size); + (diagnostic_msgs__msg__DiagnosticStatus *)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 (!diagnostic_msgs__msg__DiagnosticStatus__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__msg__DiagnosticStatus__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; ) { - diagnostic_msgs__msg__DiagnosticStatus__fini(&data[i]); + diagnostic_msgs__msg__DiagnosticStatus__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__functions.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__functions.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__functions.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__functions.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h index 69a4f73f7..9f5fbaf62 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_diagnostic_msgs__msg__DiagnosticStatus( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__msg__DiagnosticStatus( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp index fc94d73c9..ac69848df 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_DiagnosticStatus( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.h similarity index 80% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.h index 5fe3a5dc1..373a4e5ef 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.h @@ -18,6 +18,9 @@ extern "C" // Constants defined in the message /// Constant 'OK'. +/** + * Possible levels of operations. + */ enum { diagnostic_msgs__msg__DiagnosticStatus__OK = 0 @@ -49,13 +52,21 @@ enum // Member 'values' #include "diagnostic_msgs/msg/detail/key_value__struct.h" -// Struct defined in msg/DiagnosticStatus in the package diagnostic_msgs. +/// Struct defined in msg/DiagnosticStatus in the package diagnostic_msgs. +/** + * This message holds the status of an individual component of the robot. + */ typedef struct diagnostic_msgs__msg__DiagnosticStatus { + /// Level of operation enumerated above. uint8_t level; + /// A description of the test/component reporting. rosidl_runtime_c__String name; + /// A description of the status. rosidl_runtime_c__String message; + /// A hardware unique string. rosidl_runtime_c__String hardware_id; + /// An array of values associated with the status. diagnostic_msgs__msg__KeyValue__Sequence values; } diagnostic_msgs__msg__DiagnosticStatus; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp similarity index 79% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp index dd4d467cd..19bf8117b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp @@ -5,14 +5,15 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__STRUCT_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'values' @@ -68,16 +69,16 @@ struct DiagnosticStatus_ unsigned char; _level_type level; using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _message_type message; using _hardware_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _hardware_id_type hardware_id; using _values_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _values_type values; // setters for named parameter idiom @@ -88,25 +89,25 @@ struct DiagnosticStatus_ return *this; } Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; } Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->message = _arg; return *this; } Type & set__hardware_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->hardware_id = _arg; return *this; } Type & set__values( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->values = _arg; return *this; @@ -201,10 +202,16 @@ using DiagnosticStatus = diagnostic_msgs::msg::DiagnosticStatus_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr unsigned char DiagnosticStatus_::OK; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr unsigned char DiagnosticStatus_::WARN; +#endif // __cplusplus < 201703L // guard against 'ERROR' being predefined by MSVC by temporarily undefining it #if defined(_WIN32) # if defined(ERROR) @@ -212,14 +219,20 @@ constexpr unsigned char DiagnosticStatus_::WARN; # undef ERROR # endif #endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr unsigned char DiagnosticStatus_::ERROR; +#endif // __cplusplus < 201703L #if defined(_WIN32) # pragma warning(suppress : 4602) # pragma pop_macro("ERROR") #endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr unsigned char DiagnosticStatus_::STALE; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp new file mode 100644 index 000000000..4956d7a37 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp @@ -0,0 +1,201 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from diagnostic_msgs:msg/DiagnosticStatus.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'values' +#include "diagnostic_msgs/msg/detail/key_value__traits.hpp" + +namespace diagnostic_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const DiagnosticStatus & msg, + std::ostream & out) +{ + out << "{"; + // member: level + { + out << "level: "; + rosidl_generator_traits::character_value_to_yaml(msg.level, out); + out << ", "; + } + + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << ", "; + } + + // member: hardware_id + { + out << "hardware_id: "; + rosidl_generator_traits::value_to_yaml(msg.hardware_id, out); + out << ", "; + } + + // member: values + { + if (msg.values.size() == 0) { + out << "values: []"; + } else { + out << "values: ["; + size_t pending_items = msg.values.size(); + for (auto item : msg.values) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DiagnosticStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: level + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "level: "; + rosidl_generator_traits::character_value_to_yaml(msg.level, out); + out << "\n"; + } + + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } + + // member: hardware_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "hardware_id: "; + rosidl_generator_traits::value_to_yaml(msg.hardware_id, out); + out << "\n"; + } + + // member: values + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.values.size() == 0) { + out << "values: []\n"; + } else { + out << "values:\n"; + for (auto item : msg.values) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DiagnosticStatus & 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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::msg::DiagnosticStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::msg::DiagnosticStatus & msg) +{ + return diagnostic_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::msg::DiagnosticStatus"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/msg/DiagnosticStatus"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c new file mode 100644 index 000000000..7471d01d6 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c @@ -0,0 +1,218 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from diagnostic_msgs:msg/DiagnosticStatus.idl +// generated code does not contain a copyright notice + +#include +#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" +#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/diagnostic_status__functions.h" +#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.h" + + +// Include directives for member types +// Member `name` +// Member `message` +// Member `hardware_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `values` +#include "diagnostic_msgs/msg/key_value.h" +// Member `values` +#include "diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_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; + diagnostic_msgs__msg__DiagnosticStatus__init(message_memory); +} + +void diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_fini_function(void * message_memory) +{ + diagnostic_msgs__msg__DiagnosticStatus__fini(message_memory); +} + +size_t diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__values( + const void * untyped_member) +{ + const diagnostic_msgs__msg__KeyValue__Sequence * member = + (const diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); + return member->size; +} + +const void * diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__values( + const void * untyped_member, size_t index) +{ + const diagnostic_msgs__msg__KeyValue__Sequence * member = + (const diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__values( + void * untyped_member, size_t index) +{ + diagnostic_msgs__msg__KeyValue__Sequence * member = + (diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); + return &member->data[index]; +} + +void diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__fetch_function__DiagnosticStatus__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const diagnostic_msgs__msg__KeyValue * item = + ((const diagnostic_msgs__msg__KeyValue *) + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__values(untyped_member, index)); + diagnostic_msgs__msg__KeyValue * value = + (diagnostic_msgs__msg__KeyValue *)(untyped_value); + *value = *item; +} + +void diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__assign_function__DiagnosticStatus__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + diagnostic_msgs__msg__KeyValue * item = + ((diagnostic_msgs__msg__KeyValue *) + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__values(untyped_member, index)); + const diagnostic_msgs__msg__KeyValue * value = + (const diagnostic_msgs__msg__KeyValue *)(untyped_value); + *item = *value; +} + +bool diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__values( + void * untyped_member, size_t size) +{ + diagnostic_msgs__msg__KeyValue__Sequence * member = + (diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); + diagnostic_msgs__msg__KeyValue__Sequence__fini(member); + return diagnostic_msgs__msg__KeyValue__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array[5] = { + { + "level", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticStatus, level), // 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 + }, + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticStatus, name), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticStatus, message), // 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 + }, + { + "hardware_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticStatus, hardware_id), // 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 + }, + { + "values", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__DiagnosticStatus, values), // bytes offset in struct + NULL, // default value + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__values, // size() function pointer + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__values, // get_const(index) function pointer + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__values, // get(index) function pointer + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__fetch_function__DiagnosticStatus__values, // fetch(index, &value) function pointer + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__assign_function__DiagnosticStatus__values, // assign(index, value) function pointer + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__values // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_members = { + "diagnostic_msgs__msg", // message namespace + "DiagnosticStatus", // message name + 5, // number of fields + sizeof(diagnostic_msgs__msg__DiagnosticStatus), + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array, // message members + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_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 diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle = { + 0, + &diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)() { + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, KeyValue)(); + if (!diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__msg__DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp index 5b75429ca..97f715ed6 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__DiagnosticStatus__values(void * untyped_member, size_t inde return &member[index]; } +void fetch_function__DiagnosticStatus__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__DiagnosticStatus__values(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__DiagnosticStatus__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__DiagnosticStatus__values(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__DiagnosticStatus__values(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticSta 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticSta 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticSta 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 }, { @@ -123,6 +147,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticSta 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 }, { @@ -138,6 +164,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DiagnosticSta size_function__DiagnosticStatus__values, // size() function pointer get_const_function__DiagnosticStatus__values, // get_const(index) function pointer get_function__DiagnosticStatus__values, // get(index) function pointer + fetch_function__DiagnosticStatus__values, // fetch(index, &value) function pointer + assign_function__DiagnosticStatus__values, // assign(index, value) function pointer resize_function__DiagnosticStatus__values // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.hpp new file mode 100644 index 000000000..d06f37a62 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/diagnostic_status__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from diagnostic_msgs:msg/DiagnosticStatus.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TYPE_SUPPORT_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "diagnostic_msgs/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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + msg, + DiagnosticStatus +)(); +#ifdef __cplusplus +} +#endif + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__builder.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__builder.hpp similarity index 96% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__builder.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__builder.hpp index 95d5f4133..3ba97a2e8 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__builder.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__builder.hpp @@ -5,11 +5,12 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__BUILDER_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__BUILDER_HPP_ -#include "diagnostic_msgs/msg/detail/key_value__struct.hpp" -#include #include #include +#include "diagnostic_msgs/msg/detail/key_value__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace diagnostic_msgs { diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__functions.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__functions.c similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__functions.c rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__functions.c index 9d6df59d4..327dce893 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__functions.c +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__functions.c @@ -236,22 +236,27 @@ diagnostic_msgs__msg__KeyValue__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__msg__KeyValue); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__msg__KeyValue * data = - (diagnostic_msgs__msg__KeyValue *)realloc(output->data, allocation_size); + (diagnostic_msgs__msg__KeyValue *)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 (!diagnostic_msgs__msg__KeyValue__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__msg__KeyValue__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; ) { - diagnostic_msgs__msg__KeyValue__fini(&data[i]); + diagnostic_msgs__msg__KeyValue__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__functions.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__functions.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__functions.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__functions.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h index 759d73121..988aaf0bb 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_diagnostic_msgs__msg__KeyValue( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__msg__KeyValue( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp index 70eb71b6b..2ada8453f 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_KeyValue( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.h similarity index 87% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.h index 4c2d5eed5..58d59bdaf 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.h @@ -22,10 +22,14 @@ extern "C" // Member 'value' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/KeyValue in the package diagnostic_msgs. +/// Struct defined in msg/KeyValue in the package diagnostic_msgs. +/** + * What to label this value when viewing. + */ typedef struct diagnostic_msgs__msg__KeyValue { rosidl_runtime_c__String key; + /// A value to track over time. rosidl_runtime_c__String value; } diagnostic_msgs__msg__KeyValue; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.hpp similarity index 88% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.hpp index 2d393f88d..425795538 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__struct.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__struct.hpp @@ -5,14 +5,15 @@ #ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__STRUCT_HPP_ #define DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__diagnostic_msgs__msg__KeyValue __attribute__((deprecated)) @@ -56,21 +57,21 @@ struct KeyValue_ // field types and members using _key_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _key_type key; using _value_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _value_type value; // setters for named parameter idiom Type & set__key( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->key = _arg; return *this; } Type & set__value( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->value = _arg; return *this; diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__traits.hpp new file mode 100644 index 000000000..885e6183e --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from diagnostic_msgs:msg/KeyValue.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "diagnostic_msgs/msg/detail/key_value__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace diagnostic_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const KeyValue & msg, + std::ostream & out) +{ + out << "{"; + // member: key + { + out << "key: "; + rosidl_generator_traits::value_to_yaml(msg.key, out); + out << ", "; + } + + // member: value + { + out << "value: "; + rosidl_generator_traits::value_to_yaml(msg.value, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const KeyValue & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: key + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "key: "; + rosidl_generator_traits::value_to_yaml(msg.key, out); + out << "\n"; + } + + // member: value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "value: "; + rosidl_generator_traits::value_to_yaml(msg.value, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const KeyValue & 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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::msg::KeyValue & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::msg::KeyValue & msg) +{ + return diagnostic_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::msg::KeyValue"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/msg/KeyValue"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.c new file mode 100644 index 000000000..ddf1d27ce --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.c @@ -0,0 +1,105 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from diagnostic_msgs:msg/KeyValue.idl +// generated code does not contain a copyright notice + +#include +#include "diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h" +#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/key_value__functions.h" +#include "diagnostic_msgs/msg/detail/key_value__struct.h" + + +// Include directives for member types +// Member `key` +// Member `value` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_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; + diagnostic_msgs__msg__KeyValue__init(message_memory); +} + +void diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_fini_function(void * message_memory) +{ + diagnostic_msgs__msg__KeyValue__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_member_array[2] = { + { + "key", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__KeyValue, key), // 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 + }, + { + "value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__msg__KeyValue, value), // 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 diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_members = { + "diagnostic_msgs__msg", // message namespace + "KeyValue", // message name + 2, // number of fields + sizeof(diagnostic_msgs__msg__KeyValue), + diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_member_array, // message members + diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_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 diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle = { + 0, + &diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, KeyValue)() { + if (!diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__msg__KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.cpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.cpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.cpp index 60fa45733..071571429 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.cpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember KeyValue_mess 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember KeyValue_mess 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 } }; diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.hpp new file mode 100644 index 000000000..b306a05da --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/detail/key_value__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from diagnostic_msgs:msg/KeyValue.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TYPE_SUPPORT_HPP_ +#define DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "diagnostic_msgs/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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + msg, + KeyValue +)(); +#ifdef __cplusplus +} +#endif + +#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_array.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_array.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_array.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_array.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_array.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_array.hpp similarity index 86% rename from ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_array.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_array.hpp index 0e2f0662f..7cc920e0d 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_array.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_array.hpp @@ -7,5 +7,6 @@ #include "diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp" #include "diagnostic_msgs/msg/detail/diagnostic_array__builder.hpp" #include "diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp" +#include "diagnostic_msgs/msg/detail/diagnostic_array__type_support.hpp" #endif // DIAGNOSTIC_MSGS__MSG__DIAGNOSTIC_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_status.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_status.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_status.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_status.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_status.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_status.hpp similarity index 86% rename from ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_status.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_status.hpp index 770e4f77c..6f67f466a 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/diagnostic_status.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/diagnostic_status.hpp @@ -7,5 +7,6 @@ #include "diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp" #include "diagnostic_msgs/msg/detail/diagnostic_status__builder.hpp" #include "diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp" +#include "diagnostic_msgs/msg/detail/diagnostic_status__type_support.hpp" #endif // DIAGNOSTIC_MSGS__MSG__DIAGNOSTIC_STATUS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/key_value.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/key_value.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/key_value.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/key_value.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/key_value.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/key_value.hpp similarity index 86% rename from ThirdParty/ros/include/diagnostic_msgs/msg/key_value.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/key_value.hpp index 0ab1cef11..c9e6f9cb5 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/key_value.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/key_value.hpp @@ -7,5 +7,6 @@ #include "diagnostic_msgs/msg/detail/key_value__struct.hpp" #include "diagnostic_msgs/msg/detail/key_value__builder.hpp" #include "diagnostic_msgs/msg/detail/key_value__traits.hpp" +#include "diagnostic_msgs/msg/detail/key_value__type_support.hpp" #endif // DIAGNOSTIC_MSGS__MSG__KEY_VALUE_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..bb878694f --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 DIAGNOSTIC_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define DIAGNOSTIC_MSGS__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_diagnostic_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_diagnostic_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_diagnostic_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_diagnostic_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_diagnostic_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_diagnostic_msgs ROSIDL_GENERATOR_CPP_EXPORT_diagnostic_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_diagnostic_msgs ROSIDL_GENERATOR_CPP_IMPORT_diagnostic_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_diagnostic_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_diagnostic_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_diagnostic_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_diagnostic_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // DIAGNOSTIC_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/add_diagnostics.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/add_diagnostics.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/add_diagnostics.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/add_diagnostics.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/add_diagnostics.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/add_diagnostics.hpp similarity index 86% rename from ThirdParty/ros/include/diagnostic_msgs/srv/add_diagnostics.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/add_diagnostics.hpp index 18b421345..e4e33e22b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/add_diagnostics.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/add_diagnostics.hpp @@ -7,5 +7,6 @@ #include "diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp" #include "diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp" #include "diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp" +#include "diagnostic_msgs/srv/detail/add_diagnostics__type_support.hpp" #endif // DIAGNOSTIC_MSGS__SRV__ADD_DIAGNOSTICS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp similarity index 97% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp index 6b6085dbe..43ba2e977 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__builder.hpp @@ -5,11 +5,12 @@ #ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__BUILDER_HPP_ #define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__BUILDER_HPP_ -#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp" -#include #include #include +#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace diagnostic_msgs { diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__functions.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__functions.c similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__functions.c rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__functions.c index 46c0ccc14..f2059ae78 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__functions.c +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__functions.c @@ -215,22 +215,27 @@ diagnostic_msgs__srv__AddDiagnostics_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__srv__AddDiagnostics_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__srv__AddDiagnostics_Request * data = - (diagnostic_msgs__srv__AddDiagnostics_Request *)realloc(output->data, allocation_size); + (diagnostic_msgs__srv__AddDiagnostics_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 (!diagnostic_msgs__srv__AddDiagnostics_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__srv__AddDiagnostics_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; ) { - diagnostic_msgs__srv__AddDiagnostics_Request__fini(&data[i]); + diagnostic_msgs__srv__AddDiagnostics_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -459,22 +464,27 @@ diagnostic_msgs__srv__AddDiagnostics_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__srv__AddDiagnostics_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__srv__AddDiagnostics_Response * data = - (diagnostic_msgs__srv__AddDiagnostics_Response *)realloc(output->data, allocation_size); + (diagnostic_msgs__srv__AddDiagnostics_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 (!diagnostic_msgs__srv__AddDiagnostics_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__srv__AddDiagnostics_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; ) { - diagnostic_msgs__srv__AddDiagnostics_Response__fini(&data[i]); + diagnostic_msgs__srv__AddDiagnostics_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__functions.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__functions.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__functions.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__functions.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h index 1954ac02f..05ee5f92b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_diagnostic_msgs__srv__AddDiagnostics_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__srv__AddDiagnostics_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_diagnostic_msgs__srv__AddDiagnostics_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__srv__AddDiagnostics_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp index 8572a5923..23d3efd2b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_AddDiagnostics_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_AddDiagnostics_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.h new file mode 100644 index 000000000..22c9c2f60 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.h @@ -0,0 +1,85 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from diagnostic_msgs:srv/AddDiagnostics.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ +#define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'load_namespace' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/AddDiagnostics in the package diagnostic_msgs. +typedef struct diagnostic_msgs__srv__AddDiagnostics_Request +{ + /// The load_namespace parameter defines the namespace where parameters for the + /// initialization of analyzers in the diagnostic aggregator have been loaded. The + /// value should be a global name (i.e. /my/name/space), not a relative + /// (my/name/space) or private (~my/name/space) name. Analyzers will not be added + /// if a non-global name is used. The call will also fail if the namespace + /// contains parameters that follow a namespace structure that does not conform to + /// that expected by the analyzer definitions. See + /// http://wiki.ros.org/diagnostics/Tutorials/Configuring%20Diagnostic%20Aggregators + /// and http://wiki.ros.org/diagnostics/Tutorials/Using%20the%20GenericAnalyzer + /// for examples of the structure of yaml files which are expected to have been + /// loaded into the namespace. + rosidl_runtime_c__String load_namespace; +} diagnostic_msgs__srv__AddDiagnostics_Request; + +// Struct for a sequence of diagnostic_msgs__srv__AddDiagnostics_Request. +typedef struct diagnostic_msgs__srv__AddDiagnostics_Request__Sequence +{ + diagnostic_msgs__srv__AddDiagnostics_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} diagnostic_msgs__srv__AddDiagnostics_Request__Sequence; + + +// Constants defined in the message + +// Include directives for member types +// Member 'message' +// already included above +// #include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/AddDiagnostics in the package diagnostic_msgs. +typedef struct diagnostic_msgs__srv__AddDiagnostics_Response +{ + /// True if diagnostic aggregator was updated with new diagnostics, False + /// otherwise. A false return value means that either there is a bond in the + /// aggregator which already used the requested namespace, or the initialization + /// of analyzers failed. + bool success; + /// Message with additional information about the success or failure + rosidl_runtime_c__String message; +} diagnostic_msgs__srv__AddDiagnostics_Response; + +// Struct for a sequence of diagnostic_msgs__srv__AddDiagnostics_Response. +typedef struct diagnostic_msgs__srv__AddDiagnostics_Response__Sequence +{ + diagnostic_msgs__srv__AddDiagnostics_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} diagnostic_msgs__srv__AddDiagnostics_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp similarity index 94% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp index 67296a857..bbd1b3b10 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp @@ -5,14 +5,15 @@ #ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_HPP_ #define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__diagnostic_msgs__srv__AddDiagnostics_Request __attribute__((deprecated)) @@ -53,12 +54,12 @@ struct AddDiagnostics_Request_ // field types and members using _load_namespace_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _load_namespace_type load_namespace; // setters for named parameter idiom Type & set__load_namespace( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->load_namespace = _arg; return *this; @@ -172,7 +173,7 @@ struct AddDiagnostics_Response_ bool; _success_type success; using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _message_type message; // setters for named parameter idiom @@ -183,7 +184,7 @@ struct AddDiagnostics_Response_ return *this; } Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->message = _arg; return *this; diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp new file mode 100644 index 000000000..e01487242 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from diagnostic_msgs:srv/AddDiagnostics.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ +#define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace diagnostic_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const AddDiagnostics_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: load_namespace + { + out << "load_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.load_namespace, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AddDiagnostics_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: load_namespace + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "load_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.load_namespace, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AddDiagnostics_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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::srv::AddDiagnostics_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::srv::AddDiagnostics_Request & msg) +{ + return diagnostic_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::AddDiagnostics_Request"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/AddDiagnostics_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace diagnostic_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const AddDiagnostics_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AddDiagnostics_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AddDiagnostics_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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::srv::AddDiagnostics_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::srv::AddDiagnostics_Response & msg) +{ + return diagnostic_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::AddDiagnostics_Response"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/AddDiagnostics_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::AddDiagnostics"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/AddDiagnostics"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c new file mode 100644 index 000000000..e29ac4262 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c @@ -0,0 +1,254 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from diagnostic_msgs:srv/AddDiagnostics.idl +// generated code does not contain a copyright notice + +#include +#include "diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h" +#include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/add_diagnostics__functions.h" +#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.h" + + +// Include directives for member types +// Member `load_namespace` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_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; + diagnostic_msgs__srv__AddDiagnostics_Request__init(message_memory); +} + +void diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_fini_function(void * message_memory) +{ + diagnostic_msgs__srv__AddDiagnostics_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_member_array[1] = { + { + "load_namespace", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__AddDiagnostics_Request, load_namespace), // 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 diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_members = { + "diagnostic_msgs__srv", // message namespace + "AddDiagnostics_Request", // message name + 1, // number of fields + sizeof(diagnostic_msgs__srv__AddDiagnostics_Request), + diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_member_array, // message members + diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_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 diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle = { + 0, + &diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Request)() { + if (!diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__srv__AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h" +// already included above +// #include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/add_diagnostics__functions.h" +// already included above +// #include "diagnostic_msgs/srv/detail/add_diagnostics__struct.h" + + +// Include directives for member types +// Member `message` +// already included above +// #include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_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; + diagnostic_msgs__srv__AddDiagnostics_Response__init(message_memory); +} + +void diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_fini_function(void * message_memory) +{ + diagnostic_msgs__srv__AddDiagnostics_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__AddDiagnostics_Response, success), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__AddDiagnostics_Response, message), // 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 diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_members = { + "diagnostic_msgs__srv", // message namespace + "AddDiagnostics_Response", // message name + 2, // number of fields + sizeof(diagnostic_msgs__srv__AddDiagnostics_Response), + diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_member_array, // message members + diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_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 diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle = { + 0, + &diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Response)() { + if (!diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__srv__AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "diagnostic_msgs/srv/detail/add_diagnostics__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 diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_members = { + "diagnostic_msgs__srv", // service namespace + "AddDiagnostics", // service name + // these two fields are initialized below on the first access + NULL, // request message + // diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle, + NULL // response message + // diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle = { + 0, + &diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics)() { + if (!diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_Response)()->data; + } + + return &diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp index 994c49742..2ce9d482b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddDiagnostic 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddDiagnostic 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddDiagnostic 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 } }; diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.hpp new file mode 100644 index 000000000..6e4f0d8dd --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/add_diagnostics__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from diagnostic_msgs:srv/AddDiagnostics.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TYPE_SUPPORT_HPP_ +#define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "diagnostic_msgs/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_diagnostic_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + AddDiagnostics +)(); +#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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + AddDiagnostics_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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + AddDiagnostics_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__builder.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__builder.hpp similarity index 97% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__builder.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__builder.hpp index f80870830..4cdf4e881 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__builder.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__builder.hpp @@ -5,11 +5,12 @@ #ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__BUILDER_HPP_ #define DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__BUILDER_HPP_ -#include "diagnostic_msgs/srv/detail/self_test__struct.hpp" -#include #include #include +#include "diagnostic_msgs/srv/detail/self_test__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace diagnostic_msgs { diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__functions.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__functions.c similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__functions.c rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__functions.c index 4bf4aa9e1..e5b555dd9 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__functions.c +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__functions.c @@ -200,22 +200,27 @@ diagnostic_msgs__srv__SelfTest_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__srv__SelfTest_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__srv__SelfTest_Request * data = - (diagnostic_msgs__srv__SelfTest_Request *)realloc(output->data, allocation_size); + (diagnostic_msgs__srv__SelfTest_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 (!diagnostic_msgs__srv__SelfTest_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__srv__SelfTest_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; ) { - diagnostic_msgs__srv__SelfTest_Request__fini(&data[i]); + diagnostic_msgs__srv__SelfTest_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -464,22 +469,27 @@ diagnostic_msgs__srv__SelfTest_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(diagnostic_msgs__srv__SelfTest_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); diagnostic_msgs__srv__SelfTest_Response * data = - (diagnostic_msgs__srv__SelfTest_Response *)realloc(output->data, allocation_size); + (diagnostic_msgs__srv__SelfTest_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 (!diagnostic_msgs__srv__SelfTest_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!diagnostic_msgs__srv__SelfTest_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; ) { - diagnostic_msgs__srv__SelfTest_Response__fini(&data[i]); + diagnostic_msgs__srv__SelfTest_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__functions.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__functions.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__functions.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__functions.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h index 2ee6c8d42..a43a64f77 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_diagnostic_msgs__srv__SelfTest_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__srv__SelfTest_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_diagnostic_msgs__srv__SelfTest_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs size_t max_serialized_size_diagnostic_msgs__srv__SelfTest_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_diagnostic_msgs diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp index 3d3e4bf1e..bfe042e47 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_SelfTest_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_diagnostic_msgs max_serialized_size_SelfTest_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.h similarity index 93% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.h index 4d450e211..2a7bf664b 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.h +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/SelfTest in the package diagnostic_msgs. +/// Struct defined in srv/SelfTest in the package diagnostic_msgs. typedef struct diagnostic_msgs__srv__SelfTest_Request { uint8_t structure_needs_at_least_one_member; @@ -42,7 +42,7 @@ typedef struct diagnostic_msgs__srv__SelfTest_Request__Sequence // Member 'status' #include "diagnostic_msgs/msg/detail/diagnostic_status__struct.h" -// Struct defined in srv/SelfTest in the package diagnostic_msgs. +/// Struct defined in srv/SelfTest in the package diagnostic_msgs. typedef struct diagnostic_msgs__srv__SelfTest_Response { rosidl_runtime_c__String id; diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.hpp similarity index 93% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.hpp index 63f746d2d..2d11c07ad 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__struct.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__struct.hpp @@ -5,14 +5,15 @@ #ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__STRUCT_HPP_ #define DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__diagnostic_msgs__srv__SelfTest_Request __attribute__((deprecated)) @@ -166,18 +167,18 @@ struct SelfTest_Response_ // field types and members using _id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _id_type id; using _passed_type = unsigned char; _passed_type passed; using _status_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _status_type status; // setters for named parameter idiom Type & set__id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->id = _arg; return *this; @@ -189,7 +190,7 @@ struct SelfTest_Response_ return *this; } Type & set__status( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->status = _arg; return *this; diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__traits.hpp new file mode 100644 index 000000000..b17ffe14b --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__traits.hpp @@ -0,0 +1,303 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from diagnostic_msgs:srv/SelfTest.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ +#define DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "diagnostic_msgs/srv/detail/self_test__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace diagnostic_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SelfTest_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SelfTest_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SelfTest_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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::srv::SelfTest_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::srv::SelfTest_Request & msg) +{ + return diagnostic_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::SelfTest_Request"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/SelfTest_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'status' +#include "diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp" + +namespace diagnostic_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SelfTest_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: passed + { + out << "passed: "; + rosidl_generator_traits::character_value_to_yaml(msg.passed, out); + out << ", "; + } + + // member: status + { + if (msg.status.size() == 0) { + out << "status: []"; + } else { + out << "status: ["; + size_t pending_items = msg.status.size(); + for (auto item : msg.status) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SelfTest_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: passed + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "passed: "; + rosidl_generator_traits::character_value_to_yaml(msg.passed, out); + out << "\n"; + } + + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.status.size() == 0) { + out << "status: []\n"; + } else { + out << "status:\n"; + for (auto item : msg.status) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SelfTest_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 diagnostic_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use diagnostic_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const diagnostic_msgs::srv::SelfTest_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + diagnostic_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use diagnostic_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const diagnostic_msgs::srv::SelfTest_Response & msg) +{ + return diagnostic_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::SelfTest_Response"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/SelfTest_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "diagnostic_msgs::srv::SelfTest"; +} + +template<> +inline const char * name() +{ + return "diagnostic_msgs/srv/SelfTest"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.c new file mode 100644 index 000000000..11ce7178e --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.c @@ -0,0 +1,327 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from diagnostic_msgs:srv/SelfTest.idl +// generated code does not contain a copyright notice + +#include +#include "diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h" +#include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/self_test__functions.h" +#include "diagnostic_msgs/srv/detail/self_test__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_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; + diagnostic_msgs__srv__SelfTest_Request__init(message_memory); +} + +void diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_fini_function(void * message_memory) +{ + diagnostic_msgs__srv__SelfTest_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__SelfTest_Request, structure_needs_at_least_one_member), // 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 diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_members = { + "diagnostic_msgs__srv", // message namespace + "SelfTest_Request", // message name + 1, // number of fields + sizeof(diagnostic_msgs__srv__SelfTest_Request), + diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_member_array, // message members + diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_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 diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle = { + 0, + &diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Request)() { + if (!diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__srv__SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h" +// already included above +// #include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/self_test__functions.h" +// already included above +// #include "diagnostic_msgs/srv/detail/self_test__struct.h" + + +// Include directives for member types +// Member `id` +#include "rosidl_runtime_c/string_functions.h" +// Member `status` +#include "diagnostic_msgs/msg/diagnostic_status.h" +// Member `status` +#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_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; + diagnostic_msgs__srv__SelfTest_Response__init(message_memory); +} + +void diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_fini_function(void * message_memory) +{ + diagnostic_msgs__srv__SelfTest_Response__fini(message_memory); +} + +size_t diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__size_function__SelfTest_Response__status( + const void * untyped_member) +{ + const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return member->size; +} + +const void * diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_const_function__SelfTest_Response__status( + const void * untyped_member, size_t index) +{ + const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_function__SelfTest_Response__status( + void * untyped_member, size_t index) +{ + diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + return &member->data[index]; +} + +void diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__fetch_function__SelfTest_Response__status( + const void * untyped_member, size_t index, void * untyped_value) +{ + const diagnostic_msgs__msg__DiagnosticStatus * item = + ((const diagnostic_msgs__msg__DiagnosticStatus *) + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_const_function__SelfTest_Response__status(untyped_member, index)); + diagnostic_msgs__msg__DiagnosticStatus * value = + (diagnostic_msgs__msg__DiagnosticStatus *)(untyped_value); + *value = *item; +} + +void diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__assign_function__SelfTest_Response__status( + void * untyped_member, size_t index, const void * untyped_value) +{ + diagnostic_msgs__msg__DiagnosticStatus * item = + ((diagnostic_msgs__msg__DiagnosticStatus *) + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_function__SelfTest_Response__status(untyped_member, index)); + const diagnostic_msgs__msg__DiagnosticStatus * value = + (const diagnostic_msgs__msg__DiagnosticStatus *)(untyped_value); + *item = *value; +} + +bool diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__resize_function__SelfTest_Response__status( + void * untyped_member, size_t size) +{ + diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = + (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); + diagnostic_msgs__msg__DiagnosticStatus__Sequence__fini(member); + return diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array[3] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__SelfTest_Response, id), // 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 + }, + { + "passed", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__SelfTest_Response, passed), // 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 + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(diagnostic_msgs__srv__SelfTest_Response, status), // bytes offset in struct + NULL, // default value + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__size_function__SelfTest_Response__status, // size() function pointer + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_const_function__SelfTest_Response__status, // get_const(index) function pointer + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__get_function__SelfTest_Response__status, // get(index) function pointer + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__fetch_function__SelfTest_Response__status, // fetch(index, &value) function pointer + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__assign_function__SelfTest_Response__status, // assign(index, value) function pointer + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__resize_function__SelfTest_Response__status // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_members = { + "diagnostic_msgs__srv", // message namespace + "SelfTest_Response", // message name + 3, // number of fields + sizeof(diagnostic_msgs__srv__SelfTest_Response), + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array, // message members + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_init_function, // function to initialize message memory (memory has to be allocated) + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_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 diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle = { + 0, + &diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Response)() { + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)(); + if (!diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &diagnostic_msgs__srv__SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "diagnostic_msgs/srv/detail/self_test__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 diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_members = { + "diagnostic_msgs__srv", // service namespace + "SelfTest", // service name + // these two fields are initialized below on the first access + NULL, // request message + // diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle, + NULL // response message + // diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle = { + 0, + &diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_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, diagnostic_msgs, srv, SelfTest_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest)() { + if (!diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle.typesupport_identifier) { + diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_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, diagnostic_msgs, srv, SelfTest_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, diagnostic_msgs, srv, SelfTest_Response)()->data; + } + + return &diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.cpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.cpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.cpp index 1335a33d8..381df4932 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.cpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SelfTest_Requ 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 } }; @@ -174,6 +176,24 @@ void * get_function__SelfTest_Response__status(void * untyped_member, size_t ind return &member[index]; } +void fetch_function__SelfTest_Response__status( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SelfTest_Response__status(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SelfTest_Response__status( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SelfTest_Response__status(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SelfTest_Response__status(void * untyped_member, size_t size) { auto * member = @@ -195,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SelfTest_Resp 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 }, { @@ -210,6 +232,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SelfTest_Resp 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 }, { @@ -225,6 +249,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SelfTest_Resp size_function__SelfTest_Response__status, // size() function pointer get_const_function__SelfTest_Response__status, // get_const(index) function pointer get_function__SelfTest_Response__status, // get(index) function pointer + fetch_function__SelfTest_Response__status, // fetch(index, &value) function pointer + assign_function__SelfTest_Response__status, // assign(index, value) function pointer resize_function__SelfTest_Response__status // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.hpp new file mode 100644 index 000000000..ae71b6b24 --- /dev/null +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/detail/self_test__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from diagnostic_msgs:srv/SelfTest.idl +// generated code does not contain a copyright notice + +#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TYPE_SUPPORT_HPP_ +#define DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "diagnostic_msgs/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_diagnostic_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + SelfTest +)(); +#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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + SelfTest_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_diagnostic_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + diagnostic_msgs, + srv, + SelfTest_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/self_test.h b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/self_test.h similarity index 100% rename from ThirdParty/ros/include/diagnostic_msgs/srv/self_test.h rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/self_test.h diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/self_test.hpp b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/self_test.hpp similarity index 86% rename from ThirdParty/ros/include/diagnostic_msgs/srv/self_test.hpp rename to ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/self_test.hpp index dbbfe7486..ac0f03f1d 100644 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/self_test.hpp +++ b/ThirdParty/ros/include/diagnostic_msgs/diagnostic_msgs/srv/self_test.hpp @@ -7,5 +7,6 @@ #include "diagnostic_msgs/srv/detail/self_test__struct.hpp" #include "diagnostic_msgs/srv/detail/self_test__builder.hpp" #include "diagnostic_msgs/srv/detail/self_test__traits.hpp" +#include "diagnostic_msgs/srv/detail/self_test__type_support.hpp" #endif // DIAGNOSTIC_MSGS__SRV__SELF_TEST_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp deleted file mode 100644 index fcb93c545..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from diagnostic_msgs:msg/DiagnosticArray.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ -#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ - -#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::msg::DiagnosticArray"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/msg/DiagnosticArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c deleted file mode 100644 index 7fa2402bd..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_array__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from diagnostic_msgs:msg/DiagnosticArray.idl -// generated code does not contain a copyright notice - -#include -#include "diagnostic_msgs/msg/detail/diagnostic_array__rosidl_typesupport_introspection_c.h" -#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/diagnostic_array__functions.h" -#include "diagnostic_msgs/msg/detail/diagnostic_array__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `status` -#include "diagnostic_msgs/msg/diagnostic_status.h" -// Member `status` -#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_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; - diagnostic_msgs__msg__DiagnosticArray__init(message_memory); -} - -void DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_fini_function(void * message_memory) -{ - diagnostic_msgs__msg__DiagnosticArray__fini(message_memory); -} - -size_t DiagnosticArray__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__status( - const void * untyped_member) -{ - const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return member->size; -} - -const void * DiagnosticArray__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__status( - const void * untyped_member, size_t index) -{ - const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * DiagnosticArray__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__status( - void * untyped_member, size_t index) -{ - diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool DiagnosticArray__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__status( - void * untyped_member, size_t size) -{ - diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - diagnostic_msgs__msg__DiagnosticStatus__Sequence__fini(member); - return diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[2] = { - { - "header", // 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(diagnostic_msgs__msg__DiagnosticArray, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticArray, status), // bytes offset in struct - NULL, // default value - DiagnosticArray__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__status, // size() function pointer - DiagnosticArray__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__status, // get_const(index) function pointer - DiagnosticArray__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__status, // get(index) function pointer - DiagnosticArray__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__status // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_members = { - "diagnostic_msgs__msg", // message namespace - "DiagnosticArray", // message name - 2, // number of fields - sizeof(diagnostic_msgs__msg__DiagnosticArray), - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array, // message members - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_init_function, // function to initialize message memory (memory has to be allocated) - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_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 DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle = { - 0, - &DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticArray)() { - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)(); - if (!DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle.typesupport_identifier) { - DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DiagnosticArray__rosidl_typesupport_introspection_c__DiagnosticArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp deleted file mode 100644 index 5530e4673..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from diagnostic_msgs:msg/DiagnosticStatus.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ -#define DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ - -#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::msg::DiagnosticStatus"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/msg/DiagnosticStatus"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__DIAGNOSTIC_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c deleted file mode 100644 index 553ec4347..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/diagnostic_status__type_support.c +++ /dev/null @@ -1,186 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from diagnostic_msgs:msg/DiagnosticStatus.idl -// generated code does not contain a copyright notice - -#include -#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" -#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/diagnostic_status__functions.h" -#include "diagnostic_msgs/msg/detail/diagnostic_status__struct.h" - - -// Include directives for member types -// Member `name` -// Member `message` -// Member `hardware_id` -#include "rosidl_runtime_c/string_functions.h" -// Member `values` -#include "diagnostic_msgs/msg/key_value.h" -// Member `values` -#include "diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_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; - diagnostic_msgs__msg__DiagnosticStatus__init(message_memory); -} - -void DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_fini_function(void * message_memory) -{ - diagnostic_msgs__msg__DiagnosticStatus__fini(message_memory); -} - -size_t DiagnosticStatus__rosidl_typesupport_introspection_c__size_function__KeyValue__values( - const void * untyped_member) -{ - const diagnostic_msgs__msg__KeyValue__Sequence * member = - (const diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); - return member->size; -} - -const void * DiagnosticStatus__rosidl_typesupport_introspection_c__get_const_function__KeyValue__values( - const void * untyped_member, size_t index) -{ - const diagnostic_msgs__msg__KeyValue__Sequence * member = - (const diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * DiagnosticStatus__rosidl_typesupport_introspection_c__get_function__KeyValue__values( - void * untyped_member, size_t index) -{ - diagnostic_msgs__msg__KeyValue__Sequence * member = - (diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool DiagnosticStatus__rosidl_typesupport_introspection_c__resize_function__KeyValue__values( - void * untyped_member, size_t size) -{ - diagnostic_msgs__msg__KeyValue__Sequence * member = - (diagnostic_msgs__msg__KeyValue__Sequence *)(untyped_member); - diagnostic_msgs__msg__KeyValue__Sequence__fini(member); - return diagnostic_msgs__msg__KeyValue__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array[5] = { - { - "level", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticStatus, level), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticStatus, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticStatus, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "hardware_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticStatus, hardware_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "values", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__DiagnosticStatus, values), // bytes offset in struct - NULL, // default value - DiagnosticStatus__rosidl_typesupport_introspection_c__size_function__KeyValue__values, // size() function pointer - DiagnosticStatus__rosidl_typesupport_introspection_c__get_const_function__KeyValue__values, // get_const(index) function pointer - DiagnosticStatus__rosidl_typesupport_introspection_c__get_function__KeyValue__values, // get(index) function pointer - DiagnosticStatus__rosidl_typesupport_introspection_c__resize_function__KeyValue__values // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_members = { - "diagnostic_msgs__msg", // message namespace - "DiagnosticStatus", // message name - 5, // number of fields - sizeof(diagnostic_msgs__msg__DiagnosticStatus), - DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array, // message members - DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_init_function, // function to initialize message memory (memory has to be allocated) - DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_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 DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle = { - 0, - &DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)() { - DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, KeyValue)(); - if (!DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle.typesupport_identifier) { - DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DiagnosticStatus__rosidl_typesupport_introspection_c__DiagnosticStatus_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__traits.hpp deleted file mode 100644 index ff932e8b0..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from diagnostic_msgs:msg/KeyValue.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ -#define DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ - -#include "diagnostic_msgs/msg/detail/key_value__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::msg::KeyValue"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/msg/KeyValue"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // DIAGNOSTIC_MSGS__MSG__DETAIL__KEY_VALUE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.c deleted file mode 100644 index 1ec3a9cc6..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/msg/detail/key_value__type_support.c +++ /dev/null @@ -1,101 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from diagnostic_msgs:msg/KeyValue.idl -// generated code does not contain a copyright notice - -#include -#include "diagnostic_msgs/msg/detail/key_value__rosidl_typesupport_introspection_c.h" -#include "diagnostic_msgs/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 "diagnostic_msgs/msg/detail/key_value__functions.h" -#include "diagnostic_msgs/msg/detail/key_value__struct.h" - - -// Include directives for member types -// Member `key` -// Member `value` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void KeyValue__rosidl_typesupport_introspection_c__KeyValue_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; - diagnostic_msgs__msg__KeyValue__init(message_memory); -} - -void KeyValue__rosidl_typesupport_introspection_c__KeyValue_fini_function(void * message_memory) -{ - diagnostic_msgs__msg__KeyValue__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_member_array[2] = { - { - "key", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__KeyValue, key), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__msg__KeyValue, value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_members = { - "diagnostic_msgs__msg", // message namespace - "KeyValue", // message name - 2, // number of fields - sizeof(diagnostic_msgs__msg__KeyValue), - KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_member_array, // message members - KeyValue__rosidl_typesupport_introspection_c__KeyValue_init_function, // function to initialize message memory (memory has to be allocated) - KeyValue__rosidl_typesupport_introspection_c__KeyValue_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 KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle = { - 0, - &KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, KeyValue)() { - if (!KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle.typesupport_identifier) { - KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &KeyValue__rosidl_typesupport_introspection_c__KeyValue_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.h b/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.h deleted file mode 100644 index db1749721..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__struct.h +++ /dev/null @@ -1,69 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from diagnostic_msgs:srv/AddDiagnostics.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ -#define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'load_namespace' -#include "rosidl_runtime_c/string.h" - -// Struct defined in srv/AddDiagnostics in the package diagnostic_msgs. -typedef struct diagnostic_msgs__srv__AddDiagnostics_Request -{ - rosidl_runtime_c__String load_namespace; -} diagnostic_msgs__srv__AddDiagnostics_Request; - -// Struct for a sequence of diagnostic_msgs__srv__AddDiagnostics_Request. -typedef struct diagnostic_msgs__srv__AddDiagnostics_Request__Sequence -{ - diagnostic_msgs__srv__AddDiagnostics_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} diagnostic_msgs__srv__AddDiagnostics_Request__Sequence; - - -// Constants defined in the message - -// Include directives for member types -// Member 'message' -// already included above -// #include "rosidl_runtime_c/string.h" - -// Struct defined in srv/AddDiagnostics in the package diagnostic_msgs. -typedef struct diagnostic_msgs__srv__AddDiagnostics_Response -{ - bool success; - rosidl_runtime_c__String message; -} diagnostic_msgs__srv__AddDiagnostics_Response; - -// Struct for a sequence of diagnostic_msgs__srv__AddDiagnostics_Response. -typedef struct diagnostic_msgs__srv__AddDiagnostics_Response__Sequence -{ - diagnostic_msgs__srv__AddDiagnostics_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} diagnostic_msgs__srv__AddDiagnostics_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__STRUCT_H_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp deleted file mode 100644 index aba00f74b..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from diagnostic_msgs:srv/AddDiagnostics.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ -#define DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ - -#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::AddDiagnostics_Request"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/AddDiagnostics_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::AddDiagnostics_Response"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/AddDiagnostics_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::AddDiagnostics"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/AddDiagnostics"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__ADD_DIAGNOSTICS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c deleted file mode 100644 index 389f0dd90..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/add_diagnostics__type_support.c +++ /dev/null @@ -1,248 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from diagnostic_msgs:srv/AddDiagnostics.idl -// generated code does not contain a copyright notice - -#include -#include "diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h" -#include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/add_diagnostics__functions.h" -#include "diagnostic_msgs/srv/detail/add_diagnostics__struct.h" - - -// Include directives for member types -// Member `load_namespace` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_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; - diagnostic_msgs__srv__AddDiagnostics_Request__init(message_memory); -} - -void AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_fini_function(void * message_memory) -{ - diagnostic_msgs__srv__AddDiagnostics_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_member_array[1] = { - { - "load_namespace", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__AddDiagnostics_Request, load_namespace), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_members = { - "diagnostic_msgs__srv", // message namespace - "AddDiagnostics_Request", // message name - 1, // number of fields - sizeof(diagnostic_msgs__srv__AddDiagnostics_Request), - AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_member_array, // message members - AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_init_function, // function to initialize message memory (memory has to be allocated) - AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_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 AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle = { - 0, - &AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Request)() { - if (!AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle.typesupport_identifier) { - AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AddDiagnostics_Request__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "diagnostic_msgs/srv/detail/add_diagnostics__rosidl_typesupport_introspection_c.h" -// already included above -// #include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/add_diagnostics__functions.h" -// already included above -// #include "diagnostic_msgs/srv/detail/add_diagnostics__struct.h" - - -// Include directives for member types -// Member `message` -// already included above -// #include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_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; - diagnostic_msgs__srv__AddDiagnostics_Response__init(message_memory); -} - -void AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_fini_function(void * message_memory) -{ - diagnostic_msgs__srv__AddDiagnostics_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__AddDiagnostics_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__AddDiagnostics_Response, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_members = { - "diagnostic_msgs__srv", // message namespace - "AddDiagnostics_Response", // message name - 2, // number of fields - sizeof(diagnostic_msgs__srv__AddDiagnostics_Response), - AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_member_array, // message members - AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_init_function, // function to initialize message memory (memory has to be allocated) - AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_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 AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle = { - 0, - &AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Response)() { - if (!AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle.typesupport_identifier) { - AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AddDiagnostics_Response__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "diagnostic_msgs/srv/detail/add_diagnostics__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 diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_members = { - "diagnostic_msgs__srv", // service namespace - "AddDiagnostics", // service name - // these two fields are initialized below on the first access - NULL, // request message - // diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_Request_message_type_support_handle, - NULL // response message - // diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle = { - 0, - &diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, AddDiagnostics)() { - if (!diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle.typesupport_identifier) { - diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_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, diagnostic_msgs, srv, AddDiagnostics_Response)()->data; - } - - return &diagnostic_msgs__srv__detail__add_diagnostics__rosidl_typesupport_introspection_c__AddDiagnostics_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__traits.hpp b/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__traits.hpp deleted file mode 100644 index e7a0eb557..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from diagnostic_msgs:srv/SelfTest.idl -// generated code does not contain a copyright notice - -#ifndef DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ -#define DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ - -#include "diagnostic_msgs/srv/detail/self_test__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::SelfTest_Request"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/SelfTest_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::SelfTest_Response"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/SelfTest_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "diagnostic_msgs::srv::SelfTest"; -} - -template<> -inline const char * name() -{ - return "diagnostic_msgs/srv/SelfTest"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // DIAGNOSTIC_MSGS__SRV__DETAIL__SELF_TEST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.c b/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.c deleted file mode 100644 index f343ac16f..000000000 --- a/ThirdParty/ros/include/diagnostic_msgs/srv/detail/self_test__type_support.c +++ /dev/null @@ -1,297 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from diagnostic_msgs:srv/SelfTest.idl -// generated code does not contain a copyright notice - -#include -#include "diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h" -#include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/self_test__functions.h" -#include "diagnostic_msgs/srv/detail/self_test__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_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; - diagnostic_msgs__srv__SelfTest_Request__init(message_memory); -} - -void SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_fini_function(void * message_memory) -{ - diagnostic_msgs__srv__SelfTest_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__SelfTest_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_members = { - "diagnostic_msgs__srv", // message namespace - "SelfTest_Request", // message name - 1, // number of fields - sizeof(diagnostic_msgs__srv__SelfTest_Request), - SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_member_array, // message members - SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_init_function, // function to initialize message memory (memory has to be allocated) - SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_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 SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle = { - 0, - &SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Request)() { - if (!SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle.typesupport_identifier) { - SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SelfTest_Request__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "diagnostic_msgs/srv/detail/self_test__rosidl_typesupport_introspection_c.h" -// already included above -// #include "diagnostic_msgs/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 "diagnostic_msgs/srv/detail/self_test__functions.h" -// already included above -// #include "diagnostic_msgs/srv/detail/self_test__struct.h" - - -// Include directives for member types -// Member `id` -#include "rosidl_runtime_c/string_functions.h" -// Member `status` -#include "diagnostic_msgs/msg/diagnostic_status.h" -// Member `status` -#include "diagnostic_msgs/msg/detail/diagnostic_status__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_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; - diagnostic_msgs__srv__SelfTest_Response__init(message_memory); -} - -void SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_fini_function(void * message_memory) -{ - diagnostic_msgs__srv__SelfTest_Response__fini(message_memory); -} - -size_t SelfTest_Response__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__status( - const void * untyped_member) -{ - const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return member->size; -} - -const void * SelfTest_Response__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__status( - const void * untyped_member, size_t index) -{ - const diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (const diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * SelfTest_Response__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__status( - void * untyped_member, size_t index) -{ - diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool SelfTest_Response__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__status( - void * untyped_member, size_t size) -{ - diagnostic_msgs__msg__DiagnosticStatus__Sequence * member = - (diagnostic_msgs__msg__DiagnosticStatus__Sequence *)(untyped_member); - diagnostic_msgs__msg__DiagnosticStatus__Sequence__fini(member); - return diagnostic_msgs__msg__DiagnosticStatus__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array[3] = { - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__SelfTest_Response, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "passed", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__SelfTest_Response, passed), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(diagnostic_msgs__srv__SelfTest_Response, status), // bytes offset in struct - NULL, // default value - SelfTest_Response__rosidl_typesupport_introspection_c__size_function__DiagnosticStatus__status, // size() function pointer - SelfTest_Response__rosidl_typesupport_introspection_c__get_const_function__DiagnosticStatus__status, // get_const(index) function pointer - SelfTest_Response__rosidl_typesupport_introspection_c__get_function__DiagnosticStatus__status, // get(index) function pointer - SelfTest_Response__rosidl_typesupport_introspection_c__resize_function__DiagnosticStatus__status // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_members = { - "diagnostic_msgs__srv", // message namespace - "SelfTest_Response", // message name - 3, // number of fields - sizeof(diagnostic_msgs__srv__SelfTest_Response), - SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array, // message members - SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_init_function, // function to initialize message memory (memory has to be allocated) - SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_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 SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle = { - 0, - &SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Response)() { - SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, msg, DiagnosticStatus)(); - if (!SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle.typesupport_identifier) { - SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SelfTest_Response__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "diagnostic_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "diagnostic_msgs/srv/detail/self_test__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 diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_members = { - "diagnostic_msgs__srv", // service namespace - "SelfTest", // service name - // these two fields are initialized below on the first access - NULL, // request message - // diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_Request_message_type_support_handle, - NULL // response message - // diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle = { - 0, - &diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_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, diagnostic_msgs, srv, SelfTest_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_diagnostic_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, diagnostic_msgs, srv, SelfTest)() { - if (!diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle.typesupport_identifier) { - diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_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, diagnostic_msgs, srv, SelfTest_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, diagnostic_msgs, srv, SelfTest_Response)()->data; - } - - return &diagnostic_msgs__srv__detail__self_test__rosidl_typesupport_introspection_c__SelfTest_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__traits.hpp b/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__traits.hpp deleted file mode 100644 index 4ea1fbe2c..000000000 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__traits.hpp +++ /dev/null @@ -1,414 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:action/Fibonacci.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ - -#include "example_interfaces/action/detail/fibonacci__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_Goal"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_Goal"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_Result"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_Result"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_Feedback"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_Feedback"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" -// Member 'goal' -#include "example_interfaces/action/detail/fibonacci__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_SendGoal_Request"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_SendGoal_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_SendGoal_Response"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_SendGoal_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_SendGoal"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_SendGoal"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_GetResult_Request"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_GetResult_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'result' -// already included above -// #include "example_interfaces/action/detail/fibonacci__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_GetResult_Response"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_GetResult_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_GetResult"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_GetResult"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" -// Member 'feedback' -// already included above -// #include "example_interfaces/action/detail/fibonacci__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::action::Fibonacci_FeedbackMessage"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/action/Fibonacci_FeedbackMessage"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - - -namespace rosidl_generator_traits -{ - -template<> -struct is_action - : std::true_type -{ -}; - -template<> -struct is_action_goal - : std::true_type -{ -}; - -template<> -struct is_action_result - : std::true_type -{ -}; - -template<> -struct is_action_feedback - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - - -#endif // EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.c b/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.c deleted file mode 100644 index cec39a175..000000000 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.c +++ /dev/null @@ -1,929 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:action/Fibonacci.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -#include "example_interfaces/action/detail/fibonacci__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_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; - example_interfaces__action__Fibonacci_Goal__init(message_memory); -} - -void Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_Goal__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_member_array[1] = { - { - "order", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__action__Fibonacci_Goal, order), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_Goal", // message name - 1, // number of fields - sizeof(example_interfaces__action__Fibonacci_Goal), - Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_member_array, // message members - Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_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 Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle = { - 0, - &Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Goal)() { - if (!Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle.typesupport_identifier) { - Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `sequence` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_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; - example_interfaces__action__Fibonacci_Result__init(message_memory); -} - -void Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_Result__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_member_array[1] = { - { - "sequence", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__action__Fibonacci_Result, sequence), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_Result", // message name - 1, // number of fields - sizeof(example_interfaces__action__Fibonacci_Result), - Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_member_array, // message members - Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_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 Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle = { - 0, - &Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Result)() { - if (!Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle.typesupport_identifier) { - Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `sequence` -// already included above -// #include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_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; - example_interfaces__action__Fibonacci_Feedback__init(message_memory); -} - -void Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_Feedback__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_member_array[1] = { - { - "sequence", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__action__Fibonacci_Feedback, sequence), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_Feedback", // message name - 1, // number of fields - sizeof(example_interfaces__action__Fibonacci_Feedback), - Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_member_array, // message members - Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_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 Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle = { - 0, - &Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Feedback)() { - if (!Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle.typesupport_identifier) { - Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `goal_id` -#include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -// Member `goal` -#include "example_interfaces/action/fibonacci.h" -// Member `goal` -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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; - example_interfaces__action__Fibonacci_SendGoal_Request__init(message_memory); -} - -void Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_SendGoal_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[2] = { - { - "goal_id", // 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(example_interfaces__action__Fibonacci_SendGoal_Request, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "goal", // 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(example_interfaces__action__Fibonacci_SendGoal_Request, goal), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_SendGoal_Request", // message name - 2, // number of fields - sizeof(example_interfaces__action__Fibonacci_SendGoal_Request), - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array, // message members - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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 Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle = { - 0, - &Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Request)() { - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Goal)(); - if (!Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle.typesupport_identifier) { - Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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; - example_interfaces__action__Fibonacci_SendGoal_Response__init(message_memory); -} - -void Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_SendGoal_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array[2] = { - { - "accepted", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__action__Fibonacci_SendGoal_Response, accepted), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "stamp", // 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(example_interfaces__action__Fibonacci_SendGoal_Response, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_SendGoal_Response", // message name - 2, // number of fields - sizeof(example_interfaces__action__Fibonacci_SendGoal_Response), - Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array, // message members - Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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 Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle = { - 0, - &Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Response)() { - Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle.typesupport_identifier) { - Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__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 example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_members = { - "example_interfaces__action", // service namespace - "Fibonacci_SendGoal", // service name - // these two fields are initialized below on the first access - NULL, // request message - // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle, - NULL // response message - // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle = { - 0, - &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal)() { - if (!example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle.typesupport_identifier) { - example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_Response)()->data; - } - - return &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle; -} - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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; - example_interfaces__action__Fibonacci_GetResult_Request__init(message_memory); -} - -void Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_GetResult_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array[1] = { - { - "goal_id", // 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(example_interfaces__action__Fibonacci_GetResult_Request, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_GetResult_Request", // message name - 1, // number of fields - sizeof(example_interfaces__action__Fibonacci_GetResult_Request), - Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array, // message members - Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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 Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle = { - 0, - &Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Request)() { - Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - if (!Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle.typesupport_identifier) { - Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `result` -// already included above -// #include "example_interfaces/action/fibonacci.h" -// Member `result` -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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; - example_interfaces__action__Fibonacci_GetResult_Response__init(message_memory); -} - -void Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_GetResult_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array[2] = { - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__action__Fibonacci_GetResult_Response, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "result", // 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(example_interfaces__action__Fibonacci_GetResult_Response, result), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_GetResult_Response", // message name - 2, // number of fields - sizeof(example_interfaces__action__Fibonacci_GetResult_Response), - Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array, // message members - Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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 Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle = { - 0, - &Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Response)() { - Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Result)(); - if (!Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle.typesupport_identifier) { - Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rosidl_typesupport_introspection_c/identifier.h" -// already included above -// #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 example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_members = { - "example_interfaces__action", // service namespace - "Fibonacci_GetResult", // service name - // these two fields are initialized below on the first access - NULL, // request message - // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle, - NULL // response message - // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle = { - 0, - &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult)() { - if (!example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle.typesupport_identifier) { - example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_Response)()->data; - } - - return &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle; -} - -// already included above -// #include -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" -// already included above -// #include "example_interfaces/action/detail/fibonacci__struct.h" - - -// Include directives for member types -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -// Member `feedback` -// already included above -// #include "example_interfaces/action/fibonacci.h" -// Member `feedback` -// already included above -// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_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; - example_interfaces__action__Fibonacci_FeedbackMessage__init(message_memory); -} - -void Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_fini_function(void * message_memory) -{ - example_interfaces__action__Fibonacci_FeedbackMessage__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[2] = { - { - "goal_id", // 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(example_interfaces__action__Fibonacci_FeedbackMessage, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "feedback", // 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(example_interfaces__action__Fibonacci_FeedbackMessage, feedback), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_members = { - "example_interfaces__action", // message namespace - "Fibonacci_FeedbackMessage", // message name - 2, // number of fields - sizeof(example_interfaces__action__Fibonacci_FeedbackMessage), - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array, // message members - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_init_function, // function to initialize message memory (memory has to be allocated) - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_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 Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle = { - 0, - &Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_FeedbackMessage)() { - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Feedback)(); - if (!Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle.typesupport_identifier) { - Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__builder.hpp similarity index 99% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__builder.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__builder.hpp index e8db42396..10ecf5f37 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__builder.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__builder.hpp @@ -5,11 +5,12 @@ #ifndef EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__BUILDER_HPP_ #define EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__BUILDER_HPP_ -#include "example_interfaces/action/detail/fibonacci__struct.hpp" -#include #include #include +#include "example_interfaces/action/detail/fibonacci__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace example_interfaces { diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__functions.c similarity index 92% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__functions.c rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__functions.c index b35e6948c..85a144fe8 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__functions.c +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__functions.c @@ -201,22 +201,27 @@ example_interfaces__action__Fibonacci_Goal__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_Goal); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_Goal * data = - (example_interfaces__action__Fibonacci_Goal *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_Goal *)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 (!example_interfaces__action__Fibonacci_Goal__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_Goal__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; ) { - example_interfaces__action__Fibonacci_Goal__fini(&data[i]); + example_interfaces__action__Fibonacci_Goal__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -436,22 +441,27 @@ example_interfaces__action__Fibonacci_Result__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_Result); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_Result * data = - (example_interfaces__action__Fibonacci_Result *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_Result *)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 (!example_interfaces__action__Fibonacci_Result__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_Result__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; ) { - example_interfaces__action__Fibonacci_Result__fini(&data[i]); + example_interfaces__action__Fibonacci_Result__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -672,22 +682,27 @@ example_interfaces__action__Fibonacci_Feedback__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_Feedback); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_Feedback * data = - (example_interfaces__action__Fibonacci_Feedback *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_Feedback *)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 (!example_interfaces__action__Fibonacci_Feedback__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_Feedback__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; ) { - example_interfaces__action__Fibonacci_Feedback__fini(&data[i]); + example_interfaces__action__Fibonacci_Feedback__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -929,22 +944,27 @@ example_interfaces__action__Fibonacci_SendGoal_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_SendGoal_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_SendGoal_Request * data = - (example_interfaces__action__Fibonacci_SendGoal_Request *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_SendGoal_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 (!example_interfaces__action__Fibonacci_SendGoal_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_SendGoal_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; ) { - example_interfaces__action__Fibonacci_SendGoal_Request__fini(&data[i]); + example_interfaces__action__Fibonacci_SendGoal_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1172,22 +1192,27 @@ example_interfaces__action__Fibonacci_SendGoal_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_SendGoal_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_SendGoal_Response * data = - (example_interfaces__action__Fibonacci_SendGoal_Response *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_SendGoal_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 (!example_interfaces__action__Fibonacci_SendGoal_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_SendGoal_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; ) { - example_interfaces__action__Fibonacci_SendGoal_Response__fini(&data[i]); + example_interfaces__action__Fibonacci_SendGoal_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1408,22 +1433,27 @@ example_interfaces__action__Fibonacci_GetResult_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_GetResult_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_GetResult_Request * data = - (example_interfaces__action__Fibonacci_GetResult_Request *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_GetResult_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 (!example_interfaces__action__Fibonacci_GetResult_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_GetResult_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; ) { - example_interfaces__action__Fibonacci_GetResult_Request__fini(&data[i]); + example_interfaces__action__Fibonacci_GetResult_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1652,22 +1682,27 @@ example_interfaces__action__Fibonacci_GetResult_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_GetResult_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_GetResult_Response * data = - (example_interfaces__action__Fibonacci_GetResult_Response *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_GetResult_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 (!example_interfaces__action__Fibonacci_GetResult_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_GetResult_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; ) { - example_interfaces__action__Fibonacci_GetResult_Response__fini(&data[i]); + example_interfaces__action__Fibonacci_GetResult_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1910,22 +1945,27 @@ example_interfaces__action__Fibonacci_FeedbackMessage__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__action__Fibonacci_FeedbackMessage); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__action__Fibonacci_FeedbackMessage * data = - (example_interfaces__action__Fibonacci_FeedbackMessage *)realloc(output->data, allocation_size); + (example_interfaces__action__Fibonacci_FeedbackMessage *)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 (!example_interfaces__action__Fibonacci_FeedbackMessage__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__action__Fibonacci_FeedbackMessage__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; ) { - example_interfaces__action__Fibonacci_FeedbackMessage__fini(&data[i]); + example_interfaces__action__Fibonacci_FeedbackMessage__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h index 5a7d6c053..b79c004c8 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_Goal( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_Goal( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_Result( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_Result( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -87,6 +89,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_Feedback( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_Feedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -119,6 +122,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_SendGoal_Reques ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_SendGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -151,6 +155,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_SendGoal_Respon ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_SendGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -202,6 +207,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_GetResult_Reque ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_GetResult_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -234,6 +240,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_GetResult_Respo ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_GetResult_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -286,6 +293,7 @@ size_t get_serialized_size_example_interfaces__action__Fibonacci_FeedbackMessage ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__action__Fibonacci_FeedbackMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp index bc511cac8..8ab71f591 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_Goal( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -130,6 +131,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_Result( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -205,6 +207,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_Feedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -280,6 +283,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_SendGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -356,6 +360,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_SendGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -451,6 +456,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_GetResult_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -527,6 +533,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_GetResult_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -624,6 +631,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_Fibonacci_FeedbackMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.h similarity index 91% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.h index 07a6b6661..d2eb24605 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.h +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_Goal { int32_t order; @@ -40,7 +40,7 @@ typedef struct example_interfaces__action__Fibonacci_Goal__Sequence // Member 'sequence' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_Result { rosidl_runtime_c__int32__Sequence sequence; @@ -64,7 +64,7 @@ typedef struct example_interfaces__action__Fibonacci_Result__Sequence // already included above // #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_Feedback { rosidl_runtime_c__int32__Sequence sequence; @@ -89,7 +89,7 @@ typedef struct example_interfaces__action__Fibonacci_Feedback__Sequence // Member 'goal' #include "example_interfaces/action/detail/fibonacci__struct.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_SendGoal_Request { unique_identifier_msgs__msg__UUID goal_id; @@ -113,7 +113,7 @@ typedef struct example_interfaces__action__Fibonacci_SendGoal_Request__Sequence // Member 'stamp' #include "builtin_interfaces/msg/detail/time__struct.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_SendGoal_Response { bool accepted; @@ -138,7 +138,7 @@ typedef struct example_interfaces__action__Fibonacci_SendGoal_Response__Sequence // already included above // #include "unique_identifier_msgs/msg/detail/uuid__struct.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_GetResult_Request { unique_identifier_msgs__msg__UUID goal_id; @@ -162,7 +162,7 @@ typedef struct example_interfaces__action__Fibonacci_GetResult_Request__Sequence // already included above // #include "example_interfaces/action/detail/fibonacci__struct.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_GetResult_Response { int8_t status; @@ -190,7 +190,7 @@ typedef struct example_interfaces__action__Fibonacci_GetResult_Response__Sequenc // already included above // #include "example_interfaces/action/detail/fibonacci__struct.h" -// Struct defined in action/Fibonacci in the package example_interfaces. +/// Struct defined in action/Fibonacci in the package example_interfaces. typedef struct example_interfaces__action__Fibonacci_FeedbackMessage { unique_identifier_msgs__msg__UUID goal_id; diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.hpp similarity index 98% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.hpp index bdf1b2b96..258551aa6 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__struct.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__struct.hpp @@ -5,14 +5,15 @@ #ifndef EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__STRUCT_HPP_ #define EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__example_interfaces__action__Fibonacci_Goal __attribute__((deprecated)) @@ -159,12 +160,12 @@ struct Fibonacci_Result_ // field types and members using _sequence_type = - std::vector::other>; + std::vector::template rebind_alloc>; _sequence_type sequence; // setters for named parameter idiom Type & set__sequence( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->sequence = _arg; return *this; @@ -265,12 +266,12 @@ struct Fibonacci_Feedback_ // field types and members using _sequence_type = - std::vector::other>; + std::vector::template rebind_alloc>; _sequence_type sequence; // setters for named parameter idiom Type & set__sequence( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->sequence = _arg; return *this; diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__traits.hpp new file mode 100644 index 000000000..ab0ea9950 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__traits.hpp @@ -0,0 +1,1025 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:action/Fibonacci.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/action/detail/fibonacci__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_Goal & msg, + std::ostream & out) +{ + out << "{"; + // member: order + { + out << "order: "; + rosidl_generator_traits::value_to_yaml(msg.order, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_Goal & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: order + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "order: "; + rosidl_generator_traits::value_to_yaml(msg.order, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_Goal & 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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_Goal & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_Goal & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_Goal"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_Goal"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_Result & msg, + std::ostream & out) +{ + out << "{"; + // member: sequence + { + if (msg.sequence.size() == 0) { + out << "sequence: []"; + } else { + out << "sequence: ["; + size_t pending_items = msg.sequence.size(); + for (auto item : msg.sequence) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_Result & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: sequence + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.sequence.size() == 0) { + out << "sequence: []\n"; + } else { + out << "sequence:\n"; + for (auto item : msg.sequence) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_Result & 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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_Result & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_Result & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_Result"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_Result"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_Feedback & msg, + std::ostream & out) +{ + out << "{"; + // member: sequence + { + if (msg.sequence.size() == 0) { + out << "sequence: []"; + } else { + out << "sequence: ["; + size_t pending_items = msg.sequence.size(); + for (auto item : msg.sequence) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_Feedback & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: sequence + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.sequence.size() == 0) { + out << "sequence: []\n"; + } else { + out << "sequence:\n"; + for (auto item : msg.sequence) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_Feedback & 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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_Feedback & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_Feedback & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_Feedback"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_Feedback"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +// Member 'goal' +#include "example_interfaces/action/detail/fibonacci__traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_SendGoal_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: goal + { + out << "goal: "; + to_flow_style_yaml(msg.goal, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_SendGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: goal + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal:\n"; + to_block_style_yaml(msg.goal, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_SendGoal_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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_SendGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_SendGoal_Request & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_SendGoal_Request"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_SendGoal_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_SendGoal_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: accepted + { + out << "accepted: "; + rosidl_generator_traits::value_to_yaml(msg.accepted, out); + out << ", "; + } + + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_SendGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: accepted + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "accepted: "; + rosidl_generator_traits::value_to_yaml(msg.accepted, out); + out << "\n"; + } + + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_SendGoal_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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_SendGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_SendGoal_Response & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_SendGoal_Response"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_SendGoal_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_SendGoal"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_SendGoal"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_GetResult_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_GetResult_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_GetResult_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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_GetResult_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_GetResult_Request & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_GetResult_Request"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_GetResult_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'result' +// already included above +// #include "example_interfaces/action/detail/fibonacci__traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_GetResult_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: status + { + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << ", "; + } + + // member: result + { + out << "result: "; + to_flow_style_yaml(msg.result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_GetResult_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << "\n"; + } + + // member: result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "result:\n"; + to_block_style_yaml(msg.result, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_GetResult_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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_GetResult_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_GetResult_Response & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_GetResult_Response"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_GetResult_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_GetResult"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_GetResult"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +// Member 'feedback' +// already included above +// #include "example_interfaces/action/detail/fibonacci__traits.hpp" + +namespace example_interfaces +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const Fibonacci_FeedbackMessage & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: feedback + { + out << "feedback: "; + to_flow_style_yaml(msg.feedback, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Fibonacci_FeedbackMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: feedback + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "feedback:\n"; + to_block_style_yaml(msg.feedback, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Fibonacci_FeedbackMessage & 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 action + +} // namespace example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::action::Fibonacci_FeedbackMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::action::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::action::Fibonacci_FeedbackMessage & msg) +{ + return example_interfaces::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::action::Fibonacci_FeedbackMessage"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/action/Fibonacci_FeedbackMessage"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + + +namespace rosidl_generator_traits +{ + +template<> +struct is_action + : std::true_type +{ +}; + +template<> +struct is_action_goal + : std::true_type +{ +}; + +template<> +struct is_action_result + : std::true_type +{ +}; + +template<> +struct is_action_feedback + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + + +#endif // EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.c new file mode 100644 index 000000000..24b75e426 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.c @@ -0,0 +1,1063 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:action/Fibonacci.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +#include "example_interfaces/action/detail/fibonacci__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_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; + example_interfaces__action__Fibonacci_Goal__init(message_memory); +} + +void example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_Goal__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_member_array[1] = { + { + "order", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__action__Fibonacci_Goal, order), // 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 example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_Goal", // message name + 1, // number of fields + sizeof(example_interfaces__action__Fibonacci_Goal), + example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_member_array, // message members + example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_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 example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Goal)() { + if (!example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_Goal__rosidl_typesupport_introspection_c__Fibonacci_Goal_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `sequence` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_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; + example_interfaces__action__Fibonacci_Result__init(message_memory); +} + +void example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_Result__fini(message_memory); +} + +size_t example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__size_function__Fibonacci_Result__sequence( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Result__sequence( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_function__Fibonacci_Result__sequence( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__fetch_function__Fibonacci_Result__sequence( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Result__sequence(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__assign_function__Fibonacci_Result__sequence( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_function__Fibonacci_Result__sequence(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__resize_function__Fibonacci_Result__sequence( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_member_array[1] = { + { + "sequence", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__action__Fibonacci_Result, sequence), // bytes offset in struct + NULL, // default value + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__size_function__Fibonacci_Result__sequence, // size() function pointer + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Result__sequence, // get_const(index) function pointer + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__get_function__Fibonacci_Result__sequence, // get(index) function pointer + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__fetch_function__Fibonacci_Result__sequence, // fetch(index, &value) function pointer + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__assign_function__Fibonacci_Result__sequence, // assign(index, value) function pointer + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__resize_function__Fibonacci_Result__sequence // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_Result", // message name + 1, // number of fields + sizeof(example_interfaces__action__Fibonacci_Result), + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_member_array, // message members + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_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 example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Result)() { + if (!example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_Result__rosidl_typesupport_introspection_c__Fibonacci_Result_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `sequence` +// already included above +// #include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_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; + example_interfaces__action__Fibonacci_Feedback__init(message_memory); +} + +void example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_Feedback__fini(message_memory); +} + +size_t example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__size_function__Fibonacci_Feedback__sequence( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Feedback__sequence( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_function__Fibonacci_Feedback__sequence( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__fetch_function__Fibonacci_Feedback__sequence( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Feedback__sequence(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__assign_function__Fibonacci_Feedback__sequence( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_function__Fibonacci_Feedback__sequence(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__resize_function__Fibonacci_Feedback__sequence( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_member_array[1] = { + { + "sequence", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__action__Fibonacci_Feedback, sequence), // bytes offset in struct + NULL, // default value + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__size_function__Fibonacci_Feedback__sequence, // size() function pointer + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_const_function__Fibonacci_Feedback__sequence, // get_const(index) function pointer + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__get_function__Fibonacci_Feedback__sequence, // get(index) function pointer + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__fetch_function__Fibonacci_Feedback__sequence, // fetch(index, &value) function pointer + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__assign_function__Fibonacci_Feedback__sequence, // assign(index, value) function pointer + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__resize_function__Fibonacci_Feedback__sequence // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_Feedback", // message name + 1, // number of fields + sizeof(example_interfaces__action__Fibonacci_Feedback), + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_member_array, // message members + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_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 example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Feedback)() { + if (!example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_Feedback__rosidl_typesupport_introspection_c__Fibonacci_Feedback_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `goal_id` +#include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +// Member `goal` +#include "example_interfaces/action/fibonacci.h" +// Member `goal` +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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; + example_interfaces__action__Fibonacci_SendGoal_Request__init(message_memory); +} + +void example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_SendGoal_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[2] = { + { + "goal_id", // 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(example_interfaces__action__Fibonacci_SendGoal_Request, goal_id), // 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 + }, + { + "goal", // 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(example_interfaces__action__Fibonacci_SendGoal_Request, goal), // 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 example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_SendGoal_Request", // message name + 2, // number of fields + sizeof(example_interfaces__action__Fibonacci_SendGoal_Request), + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array, // message members + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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 example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Request)() { + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Goal)(); + if (!example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_SendGoal_Request__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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; + example_interfaces__action__Fibonacci_SendGoal_Response__init(message_memory); +} + +void example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_SendGoal_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array[2] = { + { + "accepted", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__action__Fibonacci_SendGoal_Response, accepted), // 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 + }, + { + "stamp", // 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(example_interfaces__action__Fibonacci_SendGoal_Response, stamp), // 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 example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_SendGoal_Response", // message name + 2, // number of fields + sizeof(example_interfaces__action__Fibonacci_SendGoal_Response), + example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array, // message members + example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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 example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Response)() { + example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_SendGoal_Response__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__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 example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_members = { + "example_interfaces__action", // service namespace + "Fibonacci_SendGoal", // service name + // these two fields are initialized below on the first access + NULL, // request message + // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Request_message_type_support_handle, + NULL // response message + // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle = { + 0, + &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_SendGoal)() { + if (!example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle.typesupport_identifier) { + example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_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, example_interfaces, action, Fibonacci_SendGoal_Response)()->data; + } + + return &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_SendGoal_service_type_support_handle; +} + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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; + example_interfaces__action__Fibonacci_GetResult_Request__init(message_memory); +} + +void example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_GetResult_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array[1] = { + { + "goal_id", // 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(example_interfaces__action__Fibonacci_GetResult_Request, goal_id), // 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 example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_GetResult_Request", // message name + 1, // number of fields + sizeof(example_interfaces__action__Fibonacci_GetResult_Request), + example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array, // message members + example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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 example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Request)() { + example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + if (!example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_GetResult_Request__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `result` +// already included above +// #include "example_interfaces/action/fibonacci.h" +// Member `result` +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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; + example_interfaces__action__Fibonacci_GetResult_Response__init(message_memory); +} + +void example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_GetResult_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array[2] = { + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__action__Fibonacci_GetResult_Response, status), // 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 + }, + { + "result", // 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(example_interfaces__action__Fibonacci_GetResult_Response, result), // 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 example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_GetResult_Response", // message name + 2, // number of fields + sizeof(example_interfaces__action__Fibonacci_GetResult_Response), + example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array, // message members + example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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 example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Response)() { + example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Result)(); + if (!example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_GetResult_Response__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rosidl_typesupport_introspection_c/identifier.h" +// already included above +// #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 example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_members = { + "example_interfaces__action", // service namespace + "Fibonacci_GetResult", // service name + // these two fields are initialized below on the first access + NULL, // request message + // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Request_message_type_support_handle, + NULL // response message + // example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle = { + 0, + &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_GetResult)() { + if (!example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle.typesupport_identifier) { + example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_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, example_interfaces, action, Fibonacci_GetResult_Response)()->data; + } + + return &example_interfaces__action__detail__fibonacci__rosidl_typesupport_introspection_c__Fibonacci_GetResult_service_type_support_handle; +} + +// already included above +// #include +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/action/detail/fibonacci__functions.h" +// already included above +// #include "example_interfaces/action/detail/fibonacci__struct.h" + + +// Include directives for member types +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +// Member `feedback` +// already included above +// #include "example_interfaces/action/fibonacci.h" +// Member `feedback` +// already included above +// #include "example_interfaces/action/detail/fibonacci__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_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; + example_interfaces__action__Fibonacci_FeedbackMessage__init(message_memory); +} + +void example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_fini_function(void * message_memory) +{ + example_interfaces__action__Fibonacci_FeedbackMessage__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[2] = { + { + "goal_id", // 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(example_interfaces__action__Fibonacci_FeedbackMessage, goal_id), // 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 + }, + { + "feedback", // 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(example_interfaces__action__Fibonacci_FeedbackMessage, feedback), // 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 example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_members = { + "example_interfaces__action", // message namespace + "Fibonacci_FeedbackMessage", // message name + 2, // number of fields + sizeof(example_interfaces__action__Fibonacci_FeedbackMessage), + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array, // message members + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_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 example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle = { + 0, + &example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_FeedbackMessage)() { + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, action, Fibonacci_Feedback)(); + if (!example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle.typesupport_identifier) { + example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__action__Fibonacci_FeedbackMessage__rosidl_typesupport_introspection_c__Fibonacci_FeedbackMessage_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.cpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.cpp index 1967d4075..8440886a7 100644 --- a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.cpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Goa 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 } }; @@ -174,6 +176,24 @@ void * get_function__Fibonacci_Result__sequence(void * untyped_member, size_t in return &member[index]; } +void fetch_function__Fibonacci_Result__sequence( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Fibonacci_Result__sequence(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Fibonacci_Result__sequence( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Fibonacci_Result__sequence(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Fibonacci_Result__sequence(void * untyped_member, size_t size) { auto * member = @@ -195,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Res size_function__Fibonacci_Result__sequence, // size() function pointer get_const_function__Fibonacci_Result__sequence, // get_const(index) function pointer get_function__Fibonacci_Result__sequence, // get(index) function pointer + fetch_function__Fibonacci_Result__sequence, // fetch(index, &value) function pointer + assign_function__Fibonacci_Result__sequence, // assign(index, value) function pointer resize_function__Fibonacci_Result__sequence // resize(index) function pointer } }; @@ -318,6 +340,24 @@ void * get_function__Fibonacci_Feedback__sequence(void * untyped_member, size_t return &member[index]; } +void fetch_function__Fibonacci_Feedback__sequence( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Fibonacci_Feedback__sequence(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Fibonacci_Feedback__sequence( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Fibonacci_Feedback__sequence(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Fibonacci_Feedback__sequence(void * untyped_member, size_t size) { auto * member = @@ -339,6 +379,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Fee size_function__Fibonacci_Feedback__sequence, // size() function pointer get_const_function__Fibonacci_Feedback__sequence, // get_const(index) function pointer get_function__Fibonacci_Feedback__sequence, // get(index) function pointer + fetch_function__Fibonacci_Feedback__sequence, // fetch(index, &value) function pointer + assign_function__Fibonacci_Feedback__sequence, // assign(index, value) function pointer resize_function__Fibonacci_Feedback__sequence // resize(index) function pointer } }; @@ -456,6 +498,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Sen 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 }, { @@ -471,6 +515,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Sen 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 } }; @@ -588,6 +634,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Sen 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 }, { @@ -603,6 +651,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Sen 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 } }; @@ -828,6 +878,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Get 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 } }; @@ -945,6 +997,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Get 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 }, { @@ -960,6 +1014,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Get 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 } }; @@ -1189,6 +1245,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Fee 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 }, { @@ -1204,6 +1262,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Fibonacci_Fee 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 } }; diff --git a/ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/action/detail/fibonacci__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.hpp new file mode 100644 index 000000000..e89faed71 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/detail/fibonacci__type_support.hpp @@ -0,0 +1,231 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:action/Fibonacci.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/action_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_example_interfaces +const rosidl_action_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_Goal +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_Result +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_Feedback +)(); +#ifdef __cplusplus +} +#endif + +#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_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_SendGoal +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_SendGoal_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_SendGoal_Response +)(); +#ifdef __cplusplus +} +#endif + + +// already included above +// #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_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_GetResult +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_GetResult_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_GetResult_Response +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + action, + Fibonacci_FeedbackMessage +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/action/fibonacci.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/fibonacci.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/action/fibonacci.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/fibonacci.h diff --git a/ThirdParty/ros/include/example_interfaces/action/fibonacci.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/fibonacci.hpp similarity index 86% rename from ThirdParty/ros/include/example_interfaces/action/fibonacci.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/action/fibonacci.hpp index 215328d67..583e378d0 100644 --- a/ThirdParty/ros/include/example_interfaces/action/fibonacci.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/action/fibonacci.hpp @@ -7,5 +7,6 @@ #include "example_interfaces/action/detail/fibonacci__struct.hpp" #include "example_interfaces/action/detail/fibonacci__builder.hpp" #include "example_interfaces/action/detail/fibonacci__traits.hpp" +#include "example_interfaces/action/detail/fibonacci__type_support.hpp" #endif // EXAMPLE_INTERFACES__ACTION__FIBONACCI_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/bool.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/bool.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/bool.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/bool.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/bool.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/bool.hpp new file mode 100644 index 000000000..d6b63ca36 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/bool.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__BOOL_HPP_ +#define EXAMPLE_INTERFACES__MSG__BOOL_HPP_ + +#include "example_interfaces/msg/detail/bool__struct.hpp" +#include "example_interfaces/msg/detail/bool__builder.hpp" +#include "example_interfaces/msg/detail/bool__traits.hpp" +#include "example_interfaces/msg/detail/bool__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__BOOL_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/byte.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/byte.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte.hpp new file mode 100644 index 000000000..2d5b102a1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__BYTE_HPP_ +#define EXAMPLE_INTERFACES__MSG__BYTE_HPP_ + +#include "example_interfaces/msg/detail/byte__struct.hpp" +#include "example_interfaces/msg/detail/byte__builder.hpp" +#include "example_interfaces/msg/detail/byte__traits.hpp" +#include "example_interfaces/msg/detail/byte__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__BYTE_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/byte_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/byte_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte_multi_array.hpp new file mode 100644 index 000000000..0076f1963 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/byte_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/byte_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/byte_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/byte_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/char.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/char.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/char.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/char.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/char.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/char.hpp new file mode 100644 index 000000000..eb331187d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/char.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__CHAR_HPP_ +#define EXAMPLE_INTERFACES__MSG__CHAR_HPP_ + +#include "example_interfaces/msg/detail/char__struct.hpp" +#include "example_interfaces/msg/detail/char__builder.hpp" +#include "example_interfaces/msg/detail/char__traits.hpp" +#include "example_interfaces/msg/detail/char__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__CHAR_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__builder.hpp new file mode 100644 index 000000000..eeccb81fa --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/bool__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Bool_data +{ +public: + Init_Bool_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Bool data(::example_interfaces::msg::Bool::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Bool msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Bool>() +{ + return example_interfaces::msg::builder::Init_Bool_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__functions.c new file mode 100644 index 000000000..0ee6a017b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/bool__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Bool__init(example_interfaces__msg__Bool * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Bool__fini(example_interfaces__msg__Bool * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Bool__are_equal(const example_interfaces__msg__Bool * lhs, const example_interfaces__msg__Bool * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Bool__copy( + const example_interfaces__msg__Bool * input, + example_interfaces__msg__Bool * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Bool * +example_interfaces__msg__Bool__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Bool * msg = (example_interfaces__msg__Bool *)allocator.allocate(sizeof(example_interfaces__msg__Bool), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Bool)); + bool success = example_interfaces__msg__Bool__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Bool__destroy(example_interfaces__msg__Bool * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Bool__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Bool__Sequence__init(example_interfaces__msg__Bool__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Bool * data = NULL; + + if (size) { + data = (example_interfaces__msg__Bool *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Bool), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Bool__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Bool__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Bool__Sequence__fini(example_interfaces__msg__Bool__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) { + example_interfaces__msg__Bool__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); + } +} + +example_interfaces__msg__Bool__Sequence * +example_interfaces__msg__Bool__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Bool__Sequence * array = (example_interfaces__msg__Bool__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Bool__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Bool__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Bool__Sequence__destroy(example_interfaces__msg__Bool__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Bool__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Bool__Sequence__are_equal(const example_interfaces__msg__Bool__Sequence * lhs, const example_interfaces__msg__Bool__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Bool__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Bool__Sequence__copy( + const example_interfaces__msg__Bool__Sequence * input, + example_interfaces__msg__Bool__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Bool); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Bool * data = + (example_interfaces__msg__Bool *)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 (!example_interfaces__msg__Bool__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; ) { + example_interfaces__msg__Bool__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Bool__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/bool__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2ac164004 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Bool( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Bool( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Bool)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..09a9d654c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/bool__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Bool & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Bool & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Bool & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Bool( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Bool)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.h new file mode 100644 index 000000000..093859f02 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Bool in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, bool. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Bool +{ + bool data; +} example_interfaces__msg__Bool; + +// Struct for a sequence of example_interfaces__msg__Bool. +typedef struct example_interfaces__msg__Bool__Sequence +{ + example_interfaces__msg__Bool * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Bool__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.hpp new file mode 100644 index 000000000..62691805d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Bool __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Bool __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Bool_ +{ + using Type = Bool_; + + explicit Bool_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = false; + } + } + + explicit Bool_(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->data = false; + } + } + + // field types and members + using _data_type = + bool; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const bool & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Bool_ *; + using ConstRawPtr = + const example_interfaces::msg::Bool_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Bool + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Bool + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Bool_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Bool_ & other) const + { + return !this->operator==(other); + } +}; // struct Bool_ + +// alias to use template instance with default allocator +using Bool = + example_interfaces::msg::Bool_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__traits.hpp new file mode 100644 index 000000000..128bf37fd --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/bool__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Bool & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Bool & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Bool & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Bool & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Bool & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Bool"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Bool"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.c new file mode 100644 index 000000000..e275f6ea1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/bool__functions.h" +#include "example_interfaces/msg/detail/bool__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_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; + example_interfaces__msg__Bool__init(message_memory); +} + +void example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_fini_function(void * message_memory) +{ + example_interfaces__msg__Bool__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Bool, data), // 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 example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_members = { + "example_interfaces__msg", // message namespace + "Bool", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Bool), + example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_member_array, // message members + example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_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 example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle = { + 0, + &example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Bool)() { + if (!example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.cpp new file mode 100644 index 000000000..d27bf8e16 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Bool.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 "example_interfaces/msg/detail/bool__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Bool_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Bool(_init); +} + +void Bool_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Bool(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Bool_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Bool, data), // 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 Bool_message_members = { + "example_interfaces::msg", // message namespace + "Bool", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Bool), + Bool_message_member_array, // message members + Bool_init_function, // function to initialize message memory (memory has to be allocated) + Bool_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Bool_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Bool_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Bool_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, example_interfaces, msg, Bool)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Bool_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.hpp new file mode 100644 index 000000000..caba1eae6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/bool__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Bool +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__builder.hpp new file mode 100644 index 000000000..533b96169 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/byte__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Byte_data +{ +public: + Init_Byte_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Byte data(::example_interfaces::msg::Byte::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Byte msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Byte>() +{ + return example_interfaces::msg::builder::Init_Byte_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__functions.c new file mode 100644 index 000000000..28c5716a1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/byte__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Byte__init(example_interfaces__msg__Byte * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Byte__fini(example_interfaces__msg__Byte * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Byte__are_equal(const example_interfaces__msg__Byte * lhs, const example_interfaces__msg__Byte * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Byte__copy( + const example_interfaces__msg__Byte * input, + example_interfaces__msg__Byte * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Byte * +example_interfaces__msg__Byte__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Byte * msg = (example_interfaces__msg__Byte *)allocator.allocate(sizeof(example_interfaces__msg__Byte), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Byte)); + bool success = example_interfaces__msg__Byte__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Byte__destroy(example_interfaces__msg__Byte * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Byte__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Byte__Sequence__init(example_interfaces__msg__Byte__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Byte * data = NULL; + + if (size) { + data = (example_interfaces__msg__Byte *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Byte), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Byte__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Byte__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Byte__Sequence__fini(example_interfaces__msg__Byte__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) { + example_interfaces__msg__Byte__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); + } +} + +example_interfaces__msg__Byte__Sequence * +example_interfaces__msg__Byte__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Byte__Sequence * array = (example_interfaces__msg__Byte__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Byte__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Byte__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Byte__Sequence__destroy(example_interfaces__msg__Byte__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Byte__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Byte__Sequence__are_equal(const example_interfaces__msg__Byte__Sequence * lhs, const example_interfaces__msg__Byte__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Byte__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Byte__Sequence__copy( + const example_interfaces__msg__Byte__Sequence * input, + example_interfaces__msg__Byte__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Byte); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Byte * data = + (example_interfaces__msg__Byte *)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 (!example_interfaces__msg__Byte__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; ) { + example_interfaces__msg__Byte__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Byte__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b56dfa6be --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Byte( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Byte( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Byte)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..11dad8eae --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/byte__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Byte & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Byte & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Byte & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Byte( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Byte)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.h new file mode 100644 index 000000000..f0e8678d1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Byte in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, byte. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Byte +{ + uint8_t data; +} example_interfaces__msg__Byte; + +// Struct for a sequence of example_interfaces__msg__Byte. +typedef struct example_interfaces__msg__Byte__Sequence +{ + example_interfaces__msg__Byte * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Byte__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.hpp new file mode 100644 index 000000000..6bfee0bc3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Byte __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Byte __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Byte_ +{ + using Type = Byte_; + + explicit Byte_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Byte_(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->data = 0; + } + } + + // field types and members + using _data_type = + unsigned char; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const unsigned char & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Byte_ *; + using ConstRawPtr = + const example_interfaces::msg::Byte_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Byte + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Byte + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Byte_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Byte_ & other) const + { + return !this->operator==(other); + } +}; // struct Byte_ + +// alias to use template instance with default allocator +using Byte = + example_interfaces::msg::Byte_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__traits.hpp new file mode 100644 index 000000000..8ff20ba68 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/byte__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Byte & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::character_value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Byte & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::character_value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Byte & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Byte & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Byte & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Byte"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Byte"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.c new file mode 100644 index 000000000..793bd976f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/byte__functions.h" +#include "example_interfaces/msg/detail/byte__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_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; + example_interfaces__msg__Byte__init(message_memory); +} + +void example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_fini_function(void * message_memory) +{ + example_interfaces__msg__Byte__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Byte, data), // 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 example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_members = { + "example_interfaces__msg", // message namespace + "Byte", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Byte), + example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_member_array, // message members + example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_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 example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle = { + 0, + &example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Byte)() { + if (!example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.cpp new file mode 100644 index 000000000..20db56ad9 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Byte.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 "example_interfaces/msg/detail/byte__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Byte_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Byte(_init); +} + +void Byte_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Byte(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Byte_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Byte, data), // 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 Byte_message_members = { + "example_interfaces::msg", // message namespace + "Byte", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Byte), + Byte_message_member_array, // message members + Byte_init_function, // function to initialize message memory (memory has to be allocated) + Byte_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Byte_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Byte_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Byte_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, example_interfaces, msg, Byte)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Byte_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.hpp new file mode 100644 index 000000000..96c873182 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Byte +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__builder.hpp new file mode 100644 index 000000000..119bf99f0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_ByteMultiArray_data +{ +public: + explicit Init_ByteMultiArray_data(::example_interfaces::msg::ByteMultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::ByteMultiArray data(::example_interfaces::msg::ByteMultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::ByteMultiArray msg_; +}; + +class Init_ByteMultiArray_layout +{ +public: + Init_ByteMultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_ByteMultiArray_data layout(::example_interfaces::msg::ByteMultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_ByteMultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::ByteMultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::ByteMultiArray>() +{ + return example_interfaces::msg::builder::Init_ByteMultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__functions.c new file mode 100644 index 000000000..17c9556c1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/byte_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__ByteMultiArray__init(example_interfaces__msg__ByteMultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__ByteMultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__ByteMultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__ByteMultiArray__fini(example_interfaces__msg__ByteMultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__octet__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__ByteMultiArray__are_equal(const example_interfaces__msg__ByteMultiArray * lhs, const example_interfaces__msg__ByteMultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__ByteMultiArray__copy( + const example_interfaces__msg__ByteMultiArray * input, + example_interfaces__msg__ByteMultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__ByteMultiArray * +example_interfaces__msg__ByteMultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__ByteMultiArray * msg = (example_interfaces__msg__ByteMultiArray *)allocator.allocate(sizeof(example_interfaces__msg__ByteMultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__ByteMultiArray)); + bool success = example_interfaces__msg__ByteMultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__ByteMultiArray__destroy(example_interfaces__msg__ByteMultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__ByteMultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__ByteMultiArray__Sequence__init(example_interfaces__msg__ByteMultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__ByteMultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__ByteMultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__ByteMultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__ByteMultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__ByteMultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__ByteMultiArray__Sequence__fini(example_interfaces__msg__ByteMultiArray__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) { + example_interfaces__msg__ByteMultiArray__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); + } +} + +example_interfaces__msg__ByteMultiArray__Sequence * +example_interfaces__msg__ByteMultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__ByteMultiArray__Sequence * array = (example_interfaces__msg__ByteMultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__ByteMultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__ByteMultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__ByteMultiArray__Sequence__destroy(example_interfaces__msg__ByteMultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__ByteMultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__ByteMultiArray__Sequence__are_equal(const example_interfaces__msg__ByteMultiArray__Sequence * lhs, const example_interfaces__msg__ByteMultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__ByteMultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__ByteMultiArray__Sequence__copy( + const example_interfaces__msg__ByteMultiArray__Sequence * input, + example_interfaces__msg__ByteMultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__ByteMultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__ByteMultiArray * data = + (example_interfaces__msg__ByteMultiArray *)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 (!example_interfaces__msg__ByteMultiArray__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; ) { + example_interfaces__msg__ByteMultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__ByteMultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..52433d8a3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__ByteMultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__ByteMultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, ByteMultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..0ba24b7d9 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/byte_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::ByteMultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::ByteMultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::ByteMultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_ByteMultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, ByteMultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.h new file mode 100644 index 000000000..173f15ab4 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/ByteMultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__ByteMultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__octet__Sequence data; +} example_interfaces__msg__ByteMultiArray; + +// Struct for a sequence of example_interfaces__msg__ByteMultiArray. +typedef struct example_interfaces__msg__ByteMultiArray__Sequence +{ + example_interfaces__msg__ByteMultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__ByteMultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.hpp new file mode 100644 index 000000000..a4608ba45 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__ByteMultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__ByteMultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct ByteMultiArray_ +{ + using Type = ByteMultiArray_; + + explicit ByteMultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit ByteMultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::ByteMultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::ByteMultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__ByteMultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__ByteMultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const ByteMultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const ByteMultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct ByteMultiArray_ + +// alias to use template instance with default allocator +using ByteMultiArray = + example_interfaces::msg::ByteMultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__traits.hpp new file mode 100644 index 000000000..c8547e1ed --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ByteMultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::character_value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ByteMultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::character_value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ByteMultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::ByteMultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::ByteMultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::ByteMultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/ByteMultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.c new file mode 100644 index 000000000..567a43add --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/byte_multi_array__functions.h" +#include "example_interfaces/msg/detail/byte_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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; + example_interfaces__msg__ByteMultiArray__init(message_memory); +} + +void example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__ByteMultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__size_function__ByteMultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__fetch_function__ByteMultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__assign_function__ByteMultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__resize_function__ByteMultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + rosidl_runtime_c__octet__Sequence__fini(member); + return rosidl_runtime_c__octet__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__ByteMultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__ByteMultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__size_function__ByteMultiArray__data, // size() function pointer + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data, // get_const(index) function pointer + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data, // get(index) function pointer + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__fetch_function__ByteMultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__assign_function__ByteMultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__resize_function__ByteMultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members = { + "example_interfaces__msg", // message namespace + "ByteMultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__ByteMultiArray), + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array, // message members + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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 example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, ByteMultiArray)() { + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.cpp new file mode 100644 index 000000000..761d1d16f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/ByteMultiArray.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 "example_interfaces/msg/detail/byte_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ByteMultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::ByteMultiArray(_init); +} + +void ByteMultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ByteMultiArray(); +} + +size_t size_function__ByteMultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ByteMultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ByteMultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ByteMultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ByteMultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ByteMultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ByteMultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ByteMultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ByteMultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::ByteMultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::ByteMultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__ByteMultiArray__data, // size() function pointer + get_const_function__ByteMultiArray__data, // get_const(index) function pointer + get_function__ByteMultiArray__data, // get(index) function pointer + fetch_function__ByteMultiArray__data, // fetch(index, &value) function pointer + assign_function__ByteMultiArray__data, // assign(index, value) function pointer + resize_function__ByteMultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ByteMultiArray_message_members = { + "example_interfaces::msg", // message namespace + "ByteMultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::ByteMultiArray), + ByteMultiArray_message_member_array, // message members + ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) + ByteMultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ByteMultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ByteMultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_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, example_interfaces, msg, ByteMultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.hpp new file mode 100644 index 000000000..15cb227a0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/byte_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + ByteMultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__builder.hpp new file mode 100644 index 000000000..a95787486 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/char__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Char_data +{ +public: + Init_Char_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Char data(::example_interfaces::msg::Char::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Char msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Char>() +{ + return example_interfaces::msg::builder::Init_Char_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__functions.c new file mode 100644 index 000000000..fe1732ce4 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/char__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Char__init(example_interfaces__msg__Char * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Char__fini(example_interfaces__msg__Char * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Char__are_equal(const example_interfaces__msg__Char * lhs, const example_interfaces__msg__Char * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Char__copy( + const example_interfaces__msg__Char * input, + example_interfaces__msg__Char * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Char * +example_interfaces__msg__Char__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Char * msg = (example_interfaces__msg__Char *)allocator.allocate(sizeof(example_interfaces__msg__Char), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Char)); + bool success = example_interfaces__msg__Char__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Char__destroy(example_interfaces__msg__Char * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Char__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Char__Sequence__init(example_interfaces__msg__Char__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Char * data = NULL; + + if (size) { + data = (example_interfaces__msg__Char *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Char), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Char__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Char__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Char__Sequence__fini(example_interfaces__msg__Char__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) { + example_interfaces__msg__Char__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); + } +} + +example_interfaces__msg__Char__Sequence * +example_interfaces__msg__Char__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Char__Sequence * array = (example_interfaces__msg__Char__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Char__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Char__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Char__Sequence__destroy(example_interfaces__msg__Char__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Char__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Char__Sequence__are_equal(const example_interfaces__msg__Char__Sequence * lhs, const example_interfaces__msg__Char__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Char__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Char__Sequence__copy( + const example_interfaces__msg__Char__Sequence * input, + example_interfaces__msg__Char__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Char); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Char * data = + (example_interfaces__msg__Char *)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 (!example_interfaces__msg__Char__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; ) { + example_interfaces__msg__Char__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Char__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/char__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..82940b85e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Char( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Char( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Char)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..889def125 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/char__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Char & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Char & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Char & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Char( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Char)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.h new file mode 100644 index 000000000..d1c3aaada --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Char in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, char. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Char +{ + uint8_t data; +} example_interfaces__msg__Char; + +// Struct for a sequence of example_interfaces__msg__Char. +typedef struct example_interfaces__msg__Char__Sequence +{ + example_interfaces__msg__Char * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Char__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.hpp new file mode 100644 index 000000000..6539c2ed5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Char __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Char __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Char_ +{ + using Type = Char_; + + explicit Char_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Char_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Char_ *; + using ConstRawPtr = + const example_interfaces::msg::Char_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Char + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Char + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Char_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Char_ & other) const + { + return !this->operator==(other); + } +}; // struct Char_ + +// alias to use template instance with default allocator +using Char = + example_interfaces::msg::Char_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__traits.hpp new file mode 100644 index 000000000..80d59f3d8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/char__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Char & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Char & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Char & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Char & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Char & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Char"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Char"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.c new file mode 100644 index 000000000..87a948d40 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/char__functions.h" +#include "example_interfaces/msg/detail/char__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_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; + example_interfaces__msg__Char__init(message_memory); +} + +void example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_fini_function(void * message_memory) +{ + example_interfaces__msg__Char__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Char, data), // 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 example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_members = { + "example_interfaces__msg", // message namespace + "Char", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Char), + example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_member_array, // message members + example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_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 example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle = { + 0, + &example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Char)() { + if (!example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.cpp new file mode 100644 index 000000000..a02c6c2a7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Char.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 "example_interfaces/msg/detail/char__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Char_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Char(_init); +} + +void Char_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Char(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Char_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Char, data), // 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 Char_message_members = { + "example_interfaces::msg", // message namespace + "Char", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Char), + Char_message_member_array, // message members + Char_init_function, // function to initialize message memory (memory has to be allocated) + Char_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Char_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Char_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Char_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, example_interfaces, msg, Char)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Char_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.hpp new file mode 100644 index 000000000..23d1c5a3f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/char__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Char +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__builder.hpp new file mode 100644 index 000000000..802528808 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__builder.hpp @@ -0,0 +1,36 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Empty>() +{ + return ::example_interfaces::msg::Empty(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__functions.c new file mode 100644 index 000000000..ca116aaad --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/empty__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Empty__init(example_interfaces__msg__Empty * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +example_interfaces__msg__Empty__fini(example_interfaces__msg__Empty * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +example_interfaces__msg__Empty__are_equal(const example_interfaces__msg__Empty * lhs, const example_interfaces__msg__Empty * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Empty__copy( + const example_interfaces__msg__Empty * input, + example_interfaces__msg__Empty * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +example_interfaces__msg__Empty * +example_interfaces__msg__Empty__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Empty * msg = (example_interfaces__msg__Empty *)allocator.allocate(sizeof(example_interfaces__msg__Empty), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Empty)); + bool success = example_interfaces__msg__Empty__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Empty__destroy(example_interfaces__msg__Empty * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Empty__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Empty__Sequence__init(example_interfaces__msg__Empty__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Empty * data = NULL; + + if (size) { + data = (example_interfaces__msg__Empty *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Empty), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Empty__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Empty__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Empty__Sequence__fini(example_interfaces__msg__Empty__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) { + example_interfaces__msg__Empty__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); + } +} + +example_interfaces__msg__Empty__Sequence * +example_interfaces__msg__Empty__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Empty__Sequence * array = (example_interfaces__msg__Empty__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Empty__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Empty__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Empty__Sequence__destroy(example_interfaces__msg__Empty__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Empty__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Empty__Sequence__are_equal(const example_interfaces__msg__Empty__Sequence * lhs, const example_interfaces__msg__Empty__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Empty__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Empty__Sequence__copy( + const example_interfaces__msg__Empty__Sequence * input, + example_interfaces__msg__Empty__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Empty); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Empty * data = + (example_interfaces__msg__Empty *)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 (!example_interfaces__msg__Empty__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; ) { + example_interfaces__msg__Empty__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Empty__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/empty__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..ac2013a17 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Empty( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Empty( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..b348daac2 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/empty__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Empty & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Empty & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Empty & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Empty( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.h new file mode 100644 index 000000000..f4fe360a0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.h @@ -0,0 +1,44 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Empty in the package example_interfaces. +/** + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + */ +typedef struct example_interfaces__msg__Empty +{ + uint8_t structure_needs_at_least_one_member; +} example_interfaces__msg__Empty; + +// Struct for a sequence of example_interfaces__msg__Empty. +typedef struct example_interfaces__msg__Empty__Sequence +{ + example_interfaces__msg__Empty * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Empty__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.hpp new file mode 100644 index 000000000..d093d399c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__struct.hpp @@ -0,0 +1,124 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Empty __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Empty __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Empty_ +{ + using Type = Empty_; + + explicit Empty_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->structure_needs_at_least_one_member = 0; + } + } + + explicit Empty_(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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Empty_ *; + using ConstRawPtr = + const example_interfaces::msg::Empty_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Empty + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Empty + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Empty_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Empty_ & other) const + { + return !this->operator==(other); + } +}; // struct Empty_ + +// alias to use template instance with default allocator +using Empty = + example_interfaces::msg::Empty_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__traits.hpp new file mode 100644 index 000000000..3c8816728 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__traits.hpp @@ -0,0 +1,98 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Empty & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Empty & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Empty & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Empty & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Empty & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Empty"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Empty"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.c new file mode 100644 index 000000000..7df788fe0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/empty__functions.h" +#include "example_interfaces/msg/detail/empty__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_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; + example_interfaces__msg__Empty__init(message_memory); +} + +void example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_fini_function(void * message_memory) +{ + example_interfaces__msg__Empty__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Empty, structure_needs_at_least_one_member), // 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 example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_members = { + "example_interfaces__msg", // message namespace + "Empty", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Empty), + example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_member_array, // message members + example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_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 example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle = { + 0, + &example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Empty)() { + if (!example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.cpp new file mode 100644 index 000000000..c307633eb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Empty.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 "example_interfaces/msg/detail/empty__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Empty_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Empty(_init); +} + +void Empty_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Empty(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Empty, structure_needs_at_least_one_member), // 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 Empty_message_members = { + "example_interfaces::msg", // message namespace + "Empty", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Empty), + Empty_message_member_array, // message members + Empty_init_function, // function to initialize message memory (memory has to be allocated) + Empty_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Empty_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Empty_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Empty_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, example_interfaces, msg, Empty)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Empty_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.hpp new file mode 100644 index 000000000..aa121ff28 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/empty__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Empty +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__builder.hpp new file mode 100644 index 000000000..1ad1359f5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/float32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float32_data +{ +public: + Init_Float32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Float32 data(::example_interfaces::msg::Float32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Float32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Float32>() +{ + return example_interfaces::msg::builder::Init_Float32_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__functions.c new file mode 100644 index 000000000..c25d11d1f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/float32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Float32__init(example_interfaces__msg__Float32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Float32__fini(example_interfaces__msg__Float32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Float32__are_equal(const example_interfaces__msg__Float32 * lhs, const example_interfaces__msg__Float32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Float32__copy( + const example_interfaces__msg__Float32 * input, + example_interfaces__msg__Float32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Float32 * +example_interfaces__msg__Float32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32 * msg = (example_interfaces__msg__Float32 *)allocator.allocate(sizeof(example_interfaces__msg__Float32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Float32)); + bool success = example_interfaces__msg__Float32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Float32__destroy(example_interfaces__msg__Float32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Float32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Float32__Sequence__init(example_interfaces__msg__Float32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Float32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Float32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Float32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Float32__Sequence__fini(example_interfaces__msg__Float32__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) { + example_interfaces__msg__Float32__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); + } +} + +example_interfaces__msg__Float32__Sequence * +example_interfaces__msg__Float32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32__Sequence * array = (example_interfaces__msg__Float32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Float32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Float32__Sequence__destroy(example_interfaces__msg__Float32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Float32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Float32__Sequence__are_equal(const example_interfaces__msg__Float32__Sequence * lhs, const example_interfaces__msg__Float32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Float32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Float32__Sequence__copy( + const example_interfaces__msg__Float32__Sequence * input, + example_interfaces__msg__Float32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Float32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32 * data = + (example_interfaces__msg__Float32 *)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 (!example_interfaces__msg__Float32__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; ) { + example_interfaces__msg__Float32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Float32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..f0456c49a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Float32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Float32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..415428177 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/float32__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Float32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Float32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Float32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Float32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.h new file mode 100644 index 000000000..7e78972d1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Float32 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, float32. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Float32 +{ + float data; +} example_interfaces__msg__Float32; + +// Struct for a sequence of example_interfaces__msg__Float32. +typedef struct example_interfaces__msg__Float32__Sequence +{ + example_interfaces__msg__Float32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Float32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.hpp new file mode 100644 index 000000000..0477992a8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Float32 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Float32 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Float32_ +{ + using Type = Float32_; + + explicit Float32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0.0f; + } + } + + explicit Float32_(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->data = 0.0f; + } + } + + // field types and members + using _data_type = + float; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const float & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Float32_ *; + using ConstRawPtr = + const example_interfaces::msg::Float32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Float32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Float32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float32_ & other) const + { + return !this->operator==(other); + } +}; // struct Float32_ + +// alias to use template instance with default allocator +using Float32 = + example_interfaces::msg::Float32_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__traits.hpp new file mode 100644 index 000000000..e40073217 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/float32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float32 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Float32 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Float32 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Float32"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Float32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.c new file mode 100644 index 000000000..d34fc6fae --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/float32__functions.h" +#include "example_interfaces/msg/detail/float32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_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; + example_interfaces__msg__Float32__init(message_memory); +} + +void example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_fini_function(void * message_memory) +{ + example_interfaces__msg__Float32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Float32, data), // 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 example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_members = { + "example_interfaces__msg", // message namespace + "Float32", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Float32), + example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_member_array, // message members + example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_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 example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle = { + 0, + &example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float32)() { + if (!example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.cpp new file mode 100644 index 000000000..eff5fb063 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Float32.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 "example_interfaces/msg/detail/float32__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Float32(_init); +} + +void Float32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Float32, data), // 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 Float32_message_members = { + "example_interfaces::msg", // message namespace + "Float32", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Float32), + Float32_message_member_array, // message members + Float32_init_function, // function to initialize message memory (memory has to be allocated) + Float32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32_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, example_interfaces, msg, Float32)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.hpp new file mode 100644 index 000000000..ac83f599b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Float32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__builder.hpp new file mode 100644 index 000000000..c59af7905 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float32MultiArray_data +{ +public: + explicit Init_Float32MultiArray_data(::example_interfaces::msg::Float32MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Float32MultiArray data(::example_interfaces::msg::Float32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Float32MultiArray msg_; +}; + +class Init_Float32MultiArray_layout +{ +public: + Init_Float32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Float32MultiArray_data layout(::example_interfaces::msg::Float32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Float32MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Float32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Float32MultiArray>() +{ + return example_interfaces::msg::builder::Init_Float32MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__functions.c new file mode 100644 index 000000000..504a1745c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/float32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Float32MultiArray__init(example_interfaces__msg__Float32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Float32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Float32MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Float32MultiArray__fini(example_interfaces__msg__Float32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__float__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Float32MultiArray__are_equal(const example_interfaces__msg__Float32MultiArray * lhs, const example_interfaces__msg__Float32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Float32MultiArray__copy( + const example_interfaces__msg__Float32MultiArray * input, + example_interfaces__msg__Float32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Float32MultiArray * +example_interfaces__msg__Float32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32MultiArray * msg = (example_interfaces__msg__Float32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Float32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Float32MultiArray)); + bool success = example_interfaces__msg__Float32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Float32MultiArray__destroy(example_interfaces__msg__Float32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Float32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Float32MultiArray__Sequence__init(example_interfaces__msg__Float32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Float32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Float32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Float32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Float32MultiArray__Sequence__fini(example_interfaces__msg__Float32MultiArray__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) { + example_interfaces__msg__Float32MultiArray__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); + } +} + +example_interfaces__msg__Float32MultiArray__Sequence * +example_interfaces__msg__Float32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32MultiArray__Sequence * array = (example_interfaces__msg__Float32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Float32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Float32MultiArray__Sequence__destroy(example_interfaces__msg__Float32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Float32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Float32MultiArray__Sequence__are_equal(const example_interfaces__msg__Float32MultiArray__Sequence * lhs, const example_interfaces__msg__Float32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Float32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Float32MultiArray__Sequence__copy( + const example_interfaces__msg__Float32MultiArray__Sequence * input, + example_interfaces__msg__Float32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Float32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float32MultiArray * data = + (example_interfaces__msg__Float32MultiArray *)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 (!example_interfaces__msg__Float32MultiArray__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; ) { + example_interfaces__msg__Float32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Float32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b9a808ae5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Float32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Float32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..de0638645 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/float32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Float32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Float32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Float32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Float32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.h new file mode 100644 index 000000000..dccaeb025 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Float32MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Float32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__float__Sequence data; +} example_interfaces__msg__Float32MultiArray; + +// Struct for a sequence of example_interfaces__msg__Float32MultiArray. +typedef struct example_interfaces__msg__Float32MultiArray__Sequence +{ + example_interfaces__msg__Float32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Float32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.hpp new file mode 100644 index 000000000..064e648e7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Float32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Float32MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Float32MultiArray_ +{ + using Type = Float32MultiArray_; + + explicit Float32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Float32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Float32MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Float32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Float32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Float32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Float32MultiArray_ + +// alias to use template instance with default allocator +using Float32MultiArray = + example_interfaces::msg::Float32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__traits.hpp new file mode 100644 index 000000000..1c49ecf8b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float32MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Float32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Float32MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Float32MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Float32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.c new file mode 100644 index 000000000..b47bbaa66 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/float32_multi_array__functions.h" +#include "example_interfaces/msg/detail/float32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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; + example_interfaces__msg__Float32MultiArray__init(message_memory); +} + +void example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Float32MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__size_function__Float32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__assign_function__Float32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__resize_function__Float32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Float32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Float32MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__size_function__Float32MultiArray__data, // size() function pointer + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data, // get(index) function pointer + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float32MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__assign_function__Float32MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__resize_function__Float32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Float32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Float32MultiArray), + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array, // message members + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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 example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float32MultiArray)() { + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.cpp new file mode 100644 index 000000000..c7f4ed2fb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Float32MultiArray.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 "example_interfaces/msg/detail/float32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Float32MultiArray(_init); +} + +void Float32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float32MultiArray(); +} + +size_t size_function__Float32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Float32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Float32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Float32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Float32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Float32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Float32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Float32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Float32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Float32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Float32MultiArray__data, // size() function pointer + get_const_function__Float32MultiArray__data, // get_const(index) function pointer + get_function__Float32MultiArray__data, // get(index) function pointer + fetch_function__Float32MultiArray__data, // fetch(index, &value) function pointer + assign_function__Float32MultiArray__data, // assign(index, value) function pointer + resize_function__Float32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Float32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Float32MultiArray), + Float32MultiArray_message_member_array, // message members + Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Float32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_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, example_interfaces, msg, Float32MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.hpp new file mode 100644 index 000000000..909091ecc --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Float32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__builder.hpp new file mode 100644 index 000000000..58e203537 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/float64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float64_data +{ +public: + Init_Float64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Float64 data(::example_interfaces::msg::Float64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Float64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Float64>() +{ + return example_interfaces::msg::builder::Init_Float64_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__functions.c new file mode 100644 index 000000000..54c902ec3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/float64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Float64__init(example_interfaces__msg__Float64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Float64__fini(example_interfaces__msg__Float64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Float64__are_equal(const example_interfaces__msg__Float64 * lhs, const example_interfaces__msg__Float64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Float64__copy( + const example_interfaces__msg__Float64 * input, + example_interfaces__msg__Float64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Float64 * +example_interfaces__msg__Float64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64 * msg = (example_interfaces__msg__Float64 *)allocator.allocate(sizeof(example_interfaces__msg__Float64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Float64)); + bool success = example_interfaces__msg__Float64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Float64__destroy(example_interfaces__msg__Float64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Float64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Float64__Sequence__init(example_interfaces__msg__Float64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Float64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Float64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Float64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Float64__Sequence__fini(example_interfaces__msg__Float64__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) { + example_interfaces__msg__Float64__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); + } +} + +example_interfaces__msg__Float64__Sequence * +example_interfaces__msg__Float64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64__Sequence * array = (example_interfaces__msg__Float64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Float64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Float64__Sequence__destroy(example_interfaces__msg__Float64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Float64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Float64__Sequence__are_equal(const example_interfaces__msg__Float64__Sequence * lhs, const example_interfaces__msg__Float64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Float64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Float64__Sequence__copy( + const example_interfaces__msg__Float64__Sequence * input, + example_interfaces__msg__Float64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Float64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64 * data = + (example_interfaces__msg__Float64 *)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 (!example_interfaces__msg__Float64__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; ) { + example_interfaces__msg__Float64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Float64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..6ae068ca5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Float64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Float64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..2719f2629 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/float64__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Float64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Float64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Float64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Float64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.h new file mode 100644 index 000000000..0857d8de1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Float64 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, float64. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Float64 +{ + double data; +} example_interfaces__msg__Float64; + +// Struct for a sequence of example_interfaces__msg__Float64. +typedef struct example_interfaces__msg__Float64__Sequence +{ + example_interfaces__msg__Float64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Float64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.hpp new file mode 100644 index 000000000..1911620d1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Float64 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Float64 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Float64_ +{ + using Type = Float64_; + + explicit Float64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0.0; + } + } + + explicit Float64_(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->data = 0.0; + } + } + + // field types and members + using _data_type = + double; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const double & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Float64_ *; + using ConstRawPtr = + const example_interfaces::msg::Float64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Float64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Float64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float64_ & other) const + { + return !this->operator==(other); + } +}; // struct Float64_ + +// alias to use template instance with default allocator +using Float64 = + example_interfaces::msg::Float64_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__traits.hpp new file mode 100644 index 000000000..6833bca25 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/float64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float64 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Float64 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Float64 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Float64"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Float64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.c new file mode 100644 index 000000000..be8ae4520 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/float64__functions.h" +#include "example_interfaces/msg/detail/float64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_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; + example_interfaces__msg__Float64__init(message_memory); +} + +void example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_fini_function(void * message_memory) +{ + example_interfaces__msg__Float64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_member_array[1] = { + { + "data", // 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(example_interfaces__msg__Float64, data), // 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 example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_members = { + "example_interfaces__msg", // message namespace + "Float64", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Float64), + example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_member_array, // message members + example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_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 example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle = { + 0, + &example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float64)() { + if (!example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.cpp new file mode 100644 index 000000000..99e20937e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Float64.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 "example_interfaces/msg/detail/float64__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Float64(_init); +} + +void Float64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64_message_member_array[1] = { + { + "data", // 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(example_interfaces::msg::Float64, data), // 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 Float64_message_members = { + "example_interfaces::msg", // message namespace + "Float64", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Float64), + Float64_message_member_array, // message members + Float64_init_function, // function to initialize message memory (memory has to be allocated) + Float64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64_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, example_interfaces, msg, Float64)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.hpp new file mode 100644 index 000000000..7c4d99cc7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Float64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__builder.hpp new file mode 100644 index 000000000..9674d5d9c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float64MultiArray_data +{ +public: + explicit Init_Float64MultiArray_data(::example_interfaces::msg::Float64MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Float64MultiArray data(::example_interfaces::msg::Float64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Float64MultiArray msg_; +}; + +class Init_Float64MultiArray_layout +{ +public: + Init_Float64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Float64MultiArray_data layout(::example_interfaces::msg::Float64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Float64MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Float64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Float64MultiArray>() +{ + return example_interfaces::msg::builder::Init_Float64MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__functions.c new file mode 100644 index 000000000..64b71e531 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/float64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Float64MultiArray__init(example_interfaces__msg__Float64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Float64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Float64MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Float64MultiArray__fini(example_interfaces__msg__Float64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__double__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Float64MultiArray__are_equal(const example_interfaces__msg__Float64MultiArray * lhs, const example_interfaces__msg__Float64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Float64MultiArray__copy( + const example_interfaces__msg__Float64MultiArray * input, + example_interfaces__msg__Float64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Float64MultiArray * +example_interfaces__msg__Float64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64MultiArray * msg = (example_interfaces__msg__Float64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Float64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Float64MultiArray)); + bool success = example_interfaces__msg__Float64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Float64MultiArray__destroy(example_interfaces__msg__Float64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Float64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Float64MultiArray__Sequence__init(example_interfaces__msg__Float64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Float64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Float64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Float64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Float64MultiArray__Sequence__fini(example_interfaces__msg__Float64MultiArray__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) { + example_interfaces__msg__Float64MultiArray__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); + } +} + +example_interfaces__msg__Float64MultiArray__Sequence * +example_interfaces__msg__Float64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64MultiArray__Sequence * array = (example_interfaces__msg__Float64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Float64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Float64MultiArray__Sequence__destroy(example_interfaces__msg__Float64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Float64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Float64MultiArray__Sequence__are_equal(const example_interfaces__msg__Float64MultiArray__Sequence * lhs, const example_interfaces__msg__Float64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Float64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Float64MultiArray__Sequence__copy( + const example_interfaces__msg__Float64MultiArray__Sequence * input, + example_interfaces__msg__Float64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Float64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Float64MultiArray * data = + (example_interfaces__msg__Float64MultiArray *)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 (!example_interfaces__msg__Float64MultiArray__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; ) { + example_interfaces__msg__Float64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Float64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..33f68e521 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Float64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Float64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..a399cbaeb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/float64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Float64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Float64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Float64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Float64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.h new file mode 100644 index 000000000..1c727ddeb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Float64MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Float64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__double__Sequence data; +} example_interfaces__msg__Float64MultiArray; + +// Struct for a sequence of example_interfaces__msg__Float64MultiArray. +typedef struct example_interfaces__msg__Float64MultiArray__Sequence +{ + example_interfaces__msg__Float64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Float64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.hpp new file mode 100644 index 000000000..b6cdc2e36 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Float64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Float64MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Float64MultiArray_ +{ + using Type = Float64MultiArray_; + + explicit Float64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Float64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Float64MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Float64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Float64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Float64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Float64MultiArray_ + +// alias to use template instance with default allocator +using Float64MultiArray = + example_interfaces::msg::Float64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__traits.hpp new file mode 100644 index 000000000..1cde0b928 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float64MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Float64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Float64MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Float64MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Float64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.c new file mode 100644 index 000000000..09d6a4754 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/float64_multi_array__functions.h" +#include "example_interfaces/msg/detail/float64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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; + example_interfaces__msg__Float64MultiArray__init(message_memory); +} + +void example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Float64MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__size_function__Float64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__assign_function__Float64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__resize_function__Float64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Float64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Float64MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__size_function__Float64MultiArray__data, // size() function pointer + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data, // get(index) function pointer + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float64MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__assign_function__Float64MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__resize_function__Float64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Float64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Float64MultiArray), + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array, // message members + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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 example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float64MultiArray)() { + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.cpp new file mode 100644 index 000000000..d04292399 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Float64MultiArray.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 "example_interfaces/msg/detail/float64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Float64MultiArray(_init); +} + +void Float64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float64MultiArray(); +} + +size_t size_function__Float64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Float64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Float64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Float64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Float64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Float64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Float64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Float64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Float64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Float64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Float64MultiArray__data, // size() function pointer + get_const_function__Float64MultiArray__data, // get_const(index) function pointer + get_function__Float64MultiArray__data, // get(index) function pointer + fetch_function__Float64MultiArray__data, // fetch(index, &value) function pointer + assign_function__Float64MultiArray__data, // assign(index, value) function pointer + resize_function__Float64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Float64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Float64MultiArray), + Float64MultiArray_message_member_array, // message members + Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Float64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_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, example_interfaces, msg, Float64MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.hpp new file mode 100644 index 000000000..19f1c9352 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/float64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Float64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__builder.hpp new file mode 100644 index 000000000..f71d69b1b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int16__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int16_data +{ +public: + Init_Int16_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Int16 data(::example_interfaces::msg::Int16::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int16 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int16>() +{ + return example_interfaces::msg::builder::Init_Int16_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__functions.c new file mode 100644 index 000000000..f158d21c5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int16__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Int16__init(example_interfaces__msg__Int16 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Int16__fini(example_interfaces__msg__Int16 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Int16__are_equal(const example_interfaces__msg__Int16 * lhs, const example_interfaces__msg__Int16 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int16__copy( + const example_interfaces__msg__Int16 * input, + example_interfaces__msg__Int16 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Int16 * +example_interfaces__msg__Int16__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16 * msg = (example_interfaces__msg__Int16 *)allocator.allocate(sizeof(example_interfaces__msg__Int16), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int16)); + bool success = example_interfaces__msg__Int16__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int16__destroy(example_interfaces__msg__Int16 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int16__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int16__Sequence__init(example_interfaces__msg__Int16__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int16 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int16), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int16__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int16__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int16__Sequence__fini(example_interfaces__msg__Int16__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) { + example_interfaces__msg__Int16__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); + } +} + +example_interfaces__msg__Int16__Sequence * +example_interfaces__msg__Int16__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16__Sequence * array = (example_interfaces__msg__Int16__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int16__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int16__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int16__Sequence__destroy(example_interfaces__msg__Int16__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int16__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int16__Sequence__are_equal(const example_interfaces__msg__Int16__Sequence * lhs, const example_interfaces__msg__Int16__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int16__Sequence__copy( + const example_interfaces__msg__Int16__Sequence * input, + example_interfaces__msg__Int16__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int16); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16 * data = + (example_interfaces__msg__Int16 *)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 (!example_interfaces__msg__Int16__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; ) { + example_interfaces__msg__Int16__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int16__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..4bafe2b63 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int16( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int16)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..236edb70a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int16__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int16 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int16 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int16 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int16)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.h new file mode 100644 index 000000000..83fb95044 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int16 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, int16. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Int16 +{ + int16_t data; +} example_interfaces__msg__Int16; + +// Struct for a sequence of example_interfaces__msg__Int16. +typedef struct example_interfaces__msg__Int16__Sequence +{ + example_interfaces__msg__Int16 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int16__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.hpp new file mode 100644 index 000000000..2ea5c56d8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int16 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int16 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int16_ +{ + using Type = Int16_; + + explicit Int16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Int16_(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->data = 0; + } + } + + // field types and members + using _data_type = + int16_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int16_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int16_ *; + using ConstRawPtr = + const example_interfaces::msg::Int16_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int16 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int16 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int16_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int16_ & other) const + { + return !this->operator==(other); + } +}; // struct Int16_ + +// alias to use template instance with default allocator +using Int16 = + example_interfaces::msg::Int16_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__traits.hpp new file mode 100644 index 000000000..49362e45a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int16__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int16 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int16 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int16 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int16 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int16 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int16"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int16"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.c new file mode 100644 index 000000000..5a7ea898b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int16__functions.h" +#include "example_interfaces/msg/detail/int16__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_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; + example_interfaces__msg__Int16__init(message_memory); +} + +void example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_fini_function(void * message_memory) +{ + example_interfaces__msg__Int16__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int16, data), // 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 example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_members = { + "example_interfaces__msg", // message namespace + "Int16", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Int16), + example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_member_array, // message members + example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_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 example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle = { + 0, + &example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int16)() { + if (!example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.cpp new file mode 100644 index 000000000..f8c6e2842 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int16.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 "example_interfaces/msg/detail/int16__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int16_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int16(_init); +} + +void Int16_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int16(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int16, data), // 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 Int16_message_members = { + "example_interfaces::msg", // message namespace + "Int16", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Int16), + Int16_message_member_array, // message members + Int16_init_function, // function to initialize message memory (memory has to be allocated) + Int16_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int16_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int16_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16_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, example_interfaces, msg, Int16)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.hpp new file mode 100644 index 000000000..8aee24004 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int16 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__builder.hpp new file mode 100644 index 000000000..dd61f5398 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int16MultiArray_data +{ +public: + explicit Init_Int16MultiArray_data(::example_interfaces::msg::Int16MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Int16MultiArray data(::example_interfaces::msg::Int16MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int16MultiArray msg_; +}; + +class Init_Int16MultiArray_layout +{ +public: + Init_Int16MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int16MultiArray_data layout(::example_interfaces::msg::Int16MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int16MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Int16MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int16MultiArray>() +{ + return example_interfaces::msg::builder::Init_Int16MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__functions.c new file mode 100644 index 000000000..049b5fc6f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int16_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Int16MultiArray__init(example_interfaces__msg__Int16MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Int16MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Int16MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Int16MultiArray__fini(example_interfaces__msg__Int16MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int16__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Int16MultiArray__are_equal(const example_interfaces__msg__Int16MultiArray * lhs, const example_interfaces__msg__Int16MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int16MultiArray__copy( + const example_interfaces__msg__Int16MultiArray * input, + example_interfaces__msg__Int16MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Int16MultiArray * +example_interfaces__msg__Int16MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16MultiArray * msg = (example_interfaces__msg__Int16MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int16MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int16MultiArray)); + bool success = example_interfaces__msg__Int16MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int16MultiArray__destroy(example_interfaces__msg__Int16MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int16MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int16MultiArray__Sequence__init(example_interfaces__msg__Int16MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int16MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int16MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int16MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int16MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int16MultiArray__Sequence__fini(example_interfaces__msg__Int16MultiArray__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) { + example_interfaces__msg__Int16MultiArray__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); + } +} + +example_interfaces__msg__Int16MultiArray__Sequence * +example_interfaces__msg__Int16MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16MultiArray__Sequence * array = (example_interfaces__msg__Int16MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int16MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int16MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int16MultiArray__Sequence__destroy(example_interfaces__msg__Int16MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int16MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int16MultiArray__Sequence__are_equal(const example_interfaces__msg__Int16MultiArray__Sequence * lhs, const example_interfaces__msg__Int16MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int16MultiArray__Sequence__copy( + const example_interfaces__msg__Int16MultiArray__Sequence * input, + example_interfaces__msg__Int16MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int16MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int16MultiArray * data = + (example_interfaces__msg__Int16MultiArray *)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 (!example_interfaces__msg__Int16MultiArray__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; ) { + example_interfaces__msg__Int16MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int16MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2b20c6a95 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int16MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..9bcd1461c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int16_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int16MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int16MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int16MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.h new file mode 100644 index 000000000..36d3794b7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int16MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Int16MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int16__Sequence data; +} example_interfaces__msg__Int16MultiArray; + +// Struct for a sequence of example_interfaces__msg__Int16MultiArray. +typedef struct example_interfaces__msg__Int16MultiArray__Sequence +{ + example_interfaces__msg__Int16MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int16MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.hpp new file mode 100644 index 000000000..59103c547 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int16MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int16MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int16MultiArray_ +{ + using Type = Int16MultiArray_; + + explicit Int16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int16MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Int16MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int16MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int16MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int16MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int16MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int16MultiArray_ + +// alias to use template instance with default allocator +using Int16MultiArray = + example_interfaces::msg::Int16MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__traits.hpp new file mode 100644 index 000000000..5cb00ef6e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int16MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int16MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int16MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int16MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int16MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.c new file mode 100644 index 000000000..ec1d61e91 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int16_multi_array__functions.h" +#include "example_interfaces/msg/detail/int16_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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; + example_interfaces__msg__Int16MultiArray__init(message_memory); +} + +void example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Int16MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__size_function__Int16MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int16__Sequence * member = + (const rosidl_runtime_c__int16__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int16__Sequence * member = + (const rosidl_runtime_c__int16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int16__Sequence * member = + (rosidl_runtime_c__int16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int16_t * item = + ((const int16_t *) + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data(untyped_member, index)); + int16_t * value = + (int16_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__assign_function__Int16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int16_t * item = + ((int16_t *) + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data(untyped_member, index)); + const int16_t * value = + (const int16_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__resize_function__Int16MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int16__Sequence * member = + (rosidl_runtime_c__int16__Sequence *)(untyped_member); + rosidl_runtime_c__int16__Sequence__fini(member); + return rosidl_runtime_c__int16__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Int16MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int16MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__size_function__Int16MultiArray__data, // size() function pointer + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data, // get(index) function pointer + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int16MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__assign_function__Int16MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__resize_function__Int16MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Int16MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Int16MultiArray), + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array, // message members + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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 example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int16MultiArray)() { + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.cpp new file mode 100644 index 000000000..4d42caa6b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int16MultiArray.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 "example_interfaces/msg/detail/int16_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int16MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int16MultiArray(_init); +} + +void Int16MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int16MultiArray(); +} + +size_t size_function__Int16MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int16MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int16MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int16MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int16MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int16MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int16MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int16MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int16MultiArray__data, // size() function pointer + get_const_function__Int16MultiArray__data, // get_const(index) function pointer + get_function__Int16MultiArray__data, // get(index) function pointer + fetch_function__Int16MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int16MultiArray__data, // assign(index, value) function pointer + resize_function__Int16MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Int16MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Int16MultiArray), + Int16MultiArray_message_member_array, // message members + Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int16MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int16MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_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, example_interfaces, msg, Int16MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.hpp new file mode 100644 index 000000000..e3dac4ae6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int16_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int16MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__builder.hpp new file mode 100644 index 000000000..0932b98e7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int32_data +{ +public: + Init_Int32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Int32 data(::example_interfaces::msg::Int32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int32>() +{ + return example_interfaces::msg::builder::Init_Int32_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__functions.c new file mode 100644 index 000000000..d6a1a7871 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Int32__init(example_interfaces__msg__Int32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Int32__fini(example_interfaces__msg__Int32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Int32__are_equal(const example_interfaces__msg__Int32 * lhs, const example_interfaces__msg__Int32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int32__copy( + const example_interfaces__msg__Int32 * input, + example_interfaces__msg__Int32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Int32 * +example_interfaces__msg__Int32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32 * msg = (example_interfaces__msg__Int32 *)allocator.allocate(sizeof(example_interfaces__msg__Int32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int32)); + bool success = example_interfaces__msg__Int32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int32__destroy(example_interfaces__msg__Int32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int32__Sequence__init(example_interfaces__msg__Int32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int32__Sequence__fini(example_interfaces__msg__Int32__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) { + example_interfaces__msg__Int32__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); + } +} + +example_interfaces__msg__Int32__Sequence * +example_interfaces__msg__Int32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32__Sequence * array = (example_interfaces__msg__Int32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int32__Sequence__destroy(example_interfaces__msg__Int32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int32__Sequence__are_equal(const example_interfaces__msg__Int32__Sequence * lhs, const example_interfaces__msg__Int32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int32__Sequence__copy( + const example_interfaces__msg__Int32__Sequence * input, + example_interfaces__msg__Int32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32 * data = + (example_interfaces__msg__Int32 *)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 (!example_interfaces__msg__Int32__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; ) { + example_interfaces__msg__Int32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..dd68bd79f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..0e09fed41 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int32__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.h new file mode 100644 index 000000000..c09ab0861 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int32 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, int32. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Int32 +{ + int32_t data; +} example_interfaces__msg__Int32; + +// Struct for a sequence of example_interfaces__msg__Int32. +typedef struct example_interfaces__msg__Int32__Sequence +{ + example_interfaces__msg__Int32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.hpp new file mode 100644 index 000000000..e183e1d21 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int32 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int32 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int32_ +{ + using Type = Int32_; + + explicit Int32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0l; + } + } + + explicit Int32_(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->data = 0l; + } + } + + // field types and members + using _data_type = + int32_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int32_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int32_ *; + using ConstRawPtr = + const example_interfaces::msg::Int32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int32_ & other) const + { + return !this->operator==(other); + } +}; // struct Int32_ + +// alias to use template instance with default allocator +using Int32 = + example_interfaces::msg::Int32_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__traits.hpp new file mode 100644 index 000000000..ecfbc64cd --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int32 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int32 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int32 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int32"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.c new file mode 100644 index 000000000..f783f0ece --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int32__functions.h" +#include "example_interfaces/msg/detail/int32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_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; + example_interfaces__msg__Int32__init(message_memory); +} + +void example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_fini_function(void * message_memory) +{ + example_interfaces__msg__Int32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int32, data), // 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 example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_members = { + "example_interfaces__msg", // message namespace + "Int32", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Int32), + example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_member_array, // message members + example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_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 example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle = { + 0, + &example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int32)() { + if (!example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.cpp new file mode 100644 index 000000000..e0a9b0b12 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int32.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 "example_interfaces/msg/detail/int32__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int32(_init); +} + +void Int32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int32, data), // 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 Int32_message_members = { + "example_interfaces::msg", // message namespace + "Int32", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Int32), + Int32_message_member_array, // message members + Int32_init_function, // function to initialize message memory (memory has to be allocated) + Int32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32_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, example_interfaces, msg, Int32)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.hpp new file mode 100644 index 000000000..e42481895 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__builder.hpp new file mode 100644 index 000000000..2fc04deb1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int32MultiArray_data +{ +public: + explicit Init_Int32MultiArray_data(::example_interfaces::msg::Int32MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Int32MultiArray data(::example_interfaces::msg::Int32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int32MultiArray msg_; +}; + +class Init_Int32MultiArray_layout +{ +public: + Init_Int32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int32MultiArray_data layout(::example_interfaces::msg::Int32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int32MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Int32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int32MultiArray>() +{ + return example_interfaces::msg::builder::Init_Int32MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__functions.c new file mode 100644 index 000000000..c03ed98a6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Int32MultiArray__init(example_interfaces__msg__Int32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Int32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Int32MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Int32MultiArray__fini(example_interfaces__msg__Int32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int32__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Int32MultiArray__are_equal(const example_interfaces__msg__Int32MultiArray * lhs, const example_interfaces__msg__Int32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int32MultiArray__copy( + const example_interfaces__msg__Int32MultiArray * input, + example_interfaces__msg__Int32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Int32MultiArray * +example_interfaces__msg__Int32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32MultiArray * msg = (example_interfaces__msg__Int32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int32MultiArray)); + bool success = example_interfaces__msg__Int32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int32MultiArray__destroy(example_interfaces__msg__Int32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int32MultiArray__Sequence__init(example_interfaces__msg__Int32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int32MultiArray__Sequence__fini(example_interfaces__msg__Int32MultiArray__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) { + example_interfaces__msg__Int32MultiArray__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); + } +} + +example_interfaces__msg__Int32MultiArray__Sequence * +example_interfaces__msg__Int32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32MultiArray__Sequence * array = (example_interfaces__msg__Int32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int32MultiArray__Sequence__destroy(example_interfaces__msg__Int32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int32MultiArray__Sequence__are_equal(const example_interfaces__msg__Int32MultiArray__Sequence * lhs, const example_interfaces__msg__Int32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int32MultiArray__Sequence__copy( + const example_interfaces__msg__Int32MultiArray__Sequence * input, + example_interfaces__msg__Int32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int32MultiArray * data = + (example_interfaces__msg__Int32MultiArray *)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 (!example_interfaces__msg__Int32MultiArray__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; ) { + example_interfaces__msg__Int32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b48749aa4 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..87afb0708 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.h new file mode 100644 index 000000000..8afee683b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int32MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Int32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int32__Sequence data; +} example_interfaces__msg__Int32MultiArray; + +// Struct for a sequence of example_interfaces__msg__Int32MultiArray. +typedef struct example_interfaces__msg__Int32MultiArray__Sequence +{ + example_interfaces__msg__Int32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.hpp new file mode 100644 index 000000000..76718ead8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int32MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int32MultiArray_ +{ + using Type = Int32MultiArray_; + + explicit Int32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int32MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Int32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int32MultiArray_ + +// alias to use template instance with default allocator +using Int32MultiArray = + example_interfaces::msg::Int32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__traits.hpp new file mode 100644 index 000000000..639f71f0e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int32MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int32MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int32MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.c new file mode 100644 index 000000000..ab771f0c0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int32_multi_array__functions.h" +#include "example_interfaces/msg/detail/int32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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; + example_interfaces__msg__Int32MultiArray__init(message_memory); +} + +void example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Int32MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__size_function__Int32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__assign_function__Int32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__resize_function__Int32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Int32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int32MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__size_function__Int32MultiArray__data, // size() function pointer + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data, // get(index) function pointer + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int32MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__assign_function__Int32MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__resize_function__Int32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Int32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Int32MultiArray), + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array, // message members + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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 example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int32MultiArray)() { + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.cpp new file mode 100644 index 000000000..9cdefcbbe --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int32MultiArray.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 "example_interfaces/msg/detail/int32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int32MultiArray(_init); +} + +void Int32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int32MultiArray(); +} + +size_t size_function__Int32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int32MultiArray__data, // size() function pointer + get_const_function__Int32MultiArray__data, // get_const(index) function pointer + get_function__Int32MultiArray__data, // get(index) function pointer + fetch_function__Int32MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int32MultiArray__data, // assign(index, value) function pointer + resize_function__Int32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Int32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Int32MultiArray), + Int32MultiArray_message_member_array, // message members + Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_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, example_interfaces, msg, Int32MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.hpp new file mode 100644 index 000000000..7842384c6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__builder.hpp new file mode 100644 index 000000000..778ea02fd --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int64_data +{ +public: + Init_Int64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Int64 data(::example_interfaces::msg::Int64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int64>() +{ + return example_interfaces::msg::builder::Init_Int64_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__functions.c new file mode 100644 index 000000000..e25d70369 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Int64__init(example_interfaces__msg__Int64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Int64__fini(example_interfaces__msg__Int64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Int64__are_equal(const example_interfaces__msg__Int64 * lhs, const example_interfaces__msg__Int64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int64__copy( + const example_interfaces__msg__Int64 * input, + example_interfaces__msg__Int64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Int64 * +example_interfaces__msg__Int64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64 * msg = (example_interfaces__msg__Int64 *)allocator.allocate(sizeof(example_interfaces__msg__Int64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int64)); + bool success = example_interfaces__msg__Int64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int64__destroy(example_interfaces__msg__Int64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int64__Sequence__init(example_interfaces__msg__Int64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int64__Sequence__fini(example_interfaces__msg__Int64__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) { + example_interfaces__msg__Int64__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); + } +} + +example_interfaces__msg__Int64__Sequence * +example_interfaces__msg__Int64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64__Sequence * array = (example_interfaces__msg__Int64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int64__Sequence__destroy(example_interfaces__msg__Int64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int64__Sequence__are_equal(const example_interfaces__msg__Int64__Sequence * lhs, const example_interfaces__msg__Int64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int64__Sequence__copy( + const example_interfaces__msg__Int64__Sequence * input, + example_interfaces__msg__Int64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64 * data = + (example_interfaces__msg__Int64 *)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 (!example_interfaces__msg__Int64__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; ) { + example_interfaces__msg__Int64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..371cc3bfd --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..0ac0aeebc --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int64__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.h new file mode 100644 index 000000000..ca8ee61c6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int64 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, int64. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Int64 +{ + int64_t data; +} example_interfaces__msg__Int64; + +// Struct for a sequence of example_interfaces__msg__Int64. +typedef struct example_interfaces__msg__Int64__Sequence +{ + example_interfaces__msg__Int64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.hpp new file mode 100644 index 000000000..4ef8b0c75 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int64 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int64 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int64_ +{ + using Type = Int64_; + + explicit Int64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ll; + } + } + + explicit Int64_(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->data = 0ll; + } + } + + // field types and members + using _data_type = + int64_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int64_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int64_ *; + using ConstRawPtr = + const example_interfaces::msg::Int64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int64_ & other) const + { + return !this->operator==(other); + } +}; // struct Int64_ + +// alias to use template instance with default allocator +using Int64 = + example_interfaces::msg::Int64_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__traits.hpp new file mode 100644 index 000000000..b51b4968d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int64 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int64 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int64 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int64"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.c new file mode 100644 index 000000000..ec297e64b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int64__functions.h" +#include "example_interfaces/msg/detail/int64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_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; + example_interfaces__msg__Int64__init(message_memory); +} + +void example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_fini_function(void * message_memory) +{ + example_interfaces__msg__Int64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_member_array[1] = { + { + "data", // 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(example_interfaces__msg__Int64, data), // 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 example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_members = { + "example_interfaces__msg", // message namespace + "Int64", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Int64), + example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_member_array, // message members + example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_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 example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle = { + 0, + &example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int64)() { + if (!example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.cpp new file mode 100644 index 000000000..a1bec14b0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int64.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 "example_interfaces/msg/detail/int64__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int64(_init); +} + +void Int64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64_message_member_array[1] = { + { + "data", // 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(example_interfaces::msg::Int64, data), // 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 Int64_message_members = { + "example_interfaces::msg", // message namespace + "Int64", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Int64), + Int64_message_member_array, // message members + Int64_init_function, // function to initialize message memory (memory has to be allocated) + Int64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64_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, example_interfaces, msg, Int64)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.hpp new file mode 100644 index 000000000..10b4bcf4d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__builder.hpp new file mode 100644 index 000000000..605c263d5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int64MultiArray_data +{ +public: + explicit Init_Int64MultiArray_data(::example_interfaces::msg::Int64MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Int64MultiArray data(::example_interfaces::msg::Int64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int64MultiArray msg_; +}; + +class Init_Int64MultiArray_layout +{ +public: + Init_Int64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int64MultiArray_data layout(::example_interfaces::msg::Int64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int64MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Int64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int64MultiArray>() +{ + return example_interfaces::msg::builder::Init_Int64MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__functions.c new file mode 100644 index 000000000..248c6dbcc --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Int64MultiArray__init(example_interfaces__msg__Int64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Int64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Int64MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Int64MultiArray__fini(example_interfaces__msg__Int64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int64__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Int64MultiArray__are_equal(const example_interfaces__msg__Int64MultiArray * lhs, const example_interfaces__msg__Int64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int64MultiArray__copy( + const example_interfaces__msg__Int64MultiArray * input, + example_interfaces__msg__Int64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Int64MultiArray * +example_interfaces__msg__Int64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64MultiArray * msg = (example_interfaces__msg__Int64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int64MultiArray)); + bool success = example_interfaces__msg__Int64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int64MultiArray__destroy(example_interfaces__msg__Int64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int64MultiArray__Sequence__init(example_interfaces__msg__Int64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int64MultiArray__Sequence__fini(example_interfaces__msg__Int64MultiArray__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) { + example_interfaces__msg__Int64MultiArray__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); + } +} + +example_interfaces__msg__Int64MultiArray__Sequence * +example_interfaces__msg__Int64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64MultiArray__Sequence * array = (example_interfaces__msg__Int64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int64MultiArray__Sequence__destroy(example_interfaces__msg__Int64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int64MultiArray__Sequence__are_equal(const example_interfaces__msg__Int64MultiArray__Sequence * lhs, const example_interfaces__msg__Int64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int64MultiArray__Sequence__copy( + const example_interfaces__msg__Int64MultiArray__Sequence * input, + example_interfaces__msg__Int64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int64MultiArray * data = + (example_interfaces__msg__Int64MultiArray *)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 (!example_interfaces__msg__Int64MultiArray__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; ) { + example_interfaces__msg__Int64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..620715cbe --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..1ec008adc --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.h new file mode 100644 index 000000000..409bb8a86 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int64MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Int64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int64__Sequence data; +} example_interfaces__msg__Int64MultiArray; + +// Struct for a sequence of example_interfaces__msg__Int64MultiArray. +typedef struct example_interfaces__msg__Int64MultiArray__Sequence +{ + example_interfaces__msg__Int64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.hpp new file mode 100644 index 000000000..39b9cdef1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int64MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int64MultiArray_ +{ + using Type = Int64MultiArray_; + + explicit Int64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int64MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Int64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int64MultiArray_ + +// alias to use template instance with default allocator +using Int64MultiArray = + example_interfaces::msg::Int64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__traits.hpp new file mode 100644 index 000000000..d7a02a519 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int64MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int64MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int64MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.c new file mode 100644 index 000000000..93fa17490 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int64_multi_array__functions.h" +#include "example_interfaces/msg/detail/int64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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; + example_interfaces__msg__Int64MultiArray__init(message_memory); +} + +void example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Int64MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__size_function__Int64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int64_t * item = + ((const int64_t *) + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data(untyped_member, index)); + int64_t * value = + (int64_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__assign_function__Int64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int64_t * item = + ((int64_t *) + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data(untyped_member, index)); + const int64_t * value = + (const int64_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__resize_function__Int64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + rosidl_runtime_c__int64__Sequence__fini(member); + return rosidl_runtime_c__int64__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Int64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int64MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__size_function__Int64MultiArray__data, // size() function pointer + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data, // get(index) function pointer + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int64MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__assign_function__Int64MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__resize_function__Int64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Int64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Int64MultiArray), + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array, // message members + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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 example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int64MultiArray)() { + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.cpp new file mode 100644 index 000000000..86e64235f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int64MultiArray.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 "example_interfaces/msg/detail/int64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int64MultiArray(_init); +} + +void Int64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int64MultiArray(); +} + +size_t size_function__Int64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int64MultiArray__data, // size() function pointer + get_const_function__Int64MultiArray__data, // get_const(index) function pointer + get_function__Int64MultiArray__data, // get(index) function pointer + fetch_function__Int64MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int64MultiArray__data, // assign(index, value) function pointer + resize_function__Int64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Int64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Int64MultiArray), + Int64MultiArray_message_member_array, // message members + Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_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, example_interfaces, msg, Int64MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.hpp new file mode 100644 index 000000000..fdf7bdc27 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__builder.hpp new file mode 100644 index 000000000..6490e3d8b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int8__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int8_data +{ +public: + Init_Int8_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::Int8 data(::example_interfaces::msg::Int8::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int8 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int8>() +{ + return example_interfaces::msg::builder::Init_Int8_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__functions.c new file mode 100644 index 000000000..ed77f8757 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int8__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__Int8__init(example_interfaces__msg__Int8 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__Int8__fini(example_interfaces__msg__Int8 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__Int8__are_equal(const example_interfaces__msg__Int8 * lhs, const example_interfaces__msg__Int8 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int8__copy( + const example_interfaces__msg__Int8 * input, + example_interfaces__msg__Int8 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__Int8 * +example_interfaces__msg__Int8__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8 * msg = (example_interfaces__msg__Int8 *)allocator.allocate(sizeof(example_interfaces__msg__Int8), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int8)); + bool success = example_interfaces__msg__Int8__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int8__destroy(example_interfaces__msg__Int8 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int8__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int8__Sequence__init(example_interfaces__msg__Int8__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8 * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int8 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int8), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int8__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int8__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int8__Sequence__fini(example_interfaces__msg__Int8__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) { + example_interfaces__msg__Int8__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); + } +} + +example_interfaces__msg__Int8__Sequence * +example_interfaces__msg__Int8__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8__Sequence * array = (example_interfaces__msg__Int8__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int8__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int8__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int8__Sequence__destroy(example_interfaces__msg__Int8__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int8__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int8__Sequence__are_equal(const example_interfaces__msg__Int8__Sequence * lhs, const example_interfaces__msg__Int8__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int8__Sequence__copy( + const example_interfaces__msg__Int8__Sequence * input, + example_interfaces__msg__Int8__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int8); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8 * data = + (example_interfaces__msg__Int8 *)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 (!example_interfaces__msg__Int8__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; ) { + example_interfaces__msg__Int8__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int8__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..1c618a256 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int8( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int8)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..fbdd0ca50 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int8__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int8 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int8 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int8 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int8)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.h new file mode 100644 index 000000000..a43e14a04 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int8 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, in8. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__Int8 +{ + int8_t data; +} example_interfaces__msg__Int8; + +// Struct for a sequence of example_interfaces__msg__Int8. +typedef struct example_interfaces__msg__Int8__Sequence +{ + example_interfaces__msg__Int8 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int8__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.hpp new file mode 100644 index 000000000..637fca6a3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int8 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int8 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int8_ +{ + using Type = Int8_; + + explicit Int8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Int8_(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->data = 0; + } + } + + // field types and members + using _data_type = + int8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int8_ *; + using ConstRawPtr = + const example_interfaces::msg::Int8_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int8 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int8 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int8_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int8_ & other) const + { + return !this->operator==(other); + } +}; // struct Int8_ + +// alias to use template instance with default allocator +using Int8 = + example_interfaces::msg::Int8_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__traits.hpp new file mode 100644 index 000000000..7f384e9e4 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int8__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int8 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int8 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int8 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int8 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int8 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int8"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int8"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.c new file mode 100644 index 000000000..c701421b1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int8__functions.h" +#include "example_interfaces/msg/detail/int8__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_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; + example_interfaces__msg__Int8__init(message_memory); +} + +void example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_fini_function(void * message_memory) +{ + example_interfaces__msg__Int8__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int8, data), // 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 example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_members = { + "example_interfaces__msg", // message namespace + "Int8", // message name + 1, // number of fields + sizeof(example_interfaces__msg__Int8), + example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_member_array, // message members + example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_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 example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle = { + 0, + &example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int8)() { + if (!example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.cpp new file mode 100644 index 000000000..d3cf49e46 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int8.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 "example_interfaces/msg/detail/int8__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int8_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int8(_init); +} + +void Int8_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int8(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int8, data), // 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 Int8_message_members = { + "example_interfaces::msg", // message namespace + "Int8", // message name + 1, // number of fields + sizeof(example_interfaces::msg::Int8), + Int8_message_member_array, // message members + Int8_init_function, // function to initialize message memory (memory has to be allocated) + Int8_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int8_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int8_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8_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, example_interfaces, msg, Int8)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.hpp new file mode 100644 index 000000000..1f50e7b8a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int8 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__builder.hpp new file mode 100644 index 000000000..4f50f28b0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int8MultiArray_data +{ +public: + explicit Init_Int8MultiArray_data(::example_interfaces::msg::Int8MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::Int8MultiArray data(::example_interfaces::msg::Int8MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::Int8MultiArray msg_; +}; + +class Init_Int8MultiArray_layout +{ +public: + Init_Int8MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int8MultiArray_data layout(::example_interfaces::msg::Int8MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int8MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::Int8MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::Int8MultiArray>() +{ + return example_interfaces::msg::builder::Init_Int8MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__functions.c new file mode 100644 index 000000000..41b5f25c7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/int8_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__Int8MultiArray__init(example_interfaces__msg__Int8MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__Int8MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__Int8MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__Int8MultiArray__fini(example_interfaces__msg__Int8MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int8__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__Int8MultiArray__are_equal(const example_interfaces__msg__Int8MultiArray * lhs, const example_interfaces__msg__Int8MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__Int8MultiArray__copy( + const example_interfaces__msg__Int8MultiArray * input, + example_interfaces__msg__Int8MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__Int8MultiArray * +example_interfaces__msg__Int8MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8MultiArray * msg = (example_interfaces__msg__Int8MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int8MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__Int8MultiArray)); + bool success = example_interfaces__msg__Int8MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__Int8MultiArray__destroy(example_interfaces__msg__Int8MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__Int8MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__Int8MultiArray__Sequence__init(example_interfaces__msg__Int8MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__Int8MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int8MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__Int8MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__Int8MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__Int8MultiArray__Sequence__fini(example_interfaces__msg__Int8MultiArray__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) { + example_interfaces__msg__Int8MultiArray__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); + } +} + +example_interfaces__msg__Int8MultiArray__Sequence * +example_interfaces__msg__Int8MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8MultiArray__Sequence * array = (example_interfaces__msg__Int8MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int8MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__Int8MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__Int8MultiArray__Sequence__destroy(example_interfaces__msg__Int8MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__Int8MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__Int8MultiArray__Sequence__are_equal(const example_interfaces__msg__Int8MultiArray__Sequence * lhs, const example_interfaces__msg__Int8MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__Int8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__Int8MultiArray__Sequence__copy( + const example_interfaces__msg__Int8MultiArray__Sequence * input, + example_interfaces__msg__Int8MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__Int8MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__Int8MultiArray * data = + (example_interfaces__msg__Int8MultiArray *)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 (!example_interfaces__msg__Int8MultiArray__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; ) { + example_interfaces__msg__Int8MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__Int8MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..029f31bbd --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__Int8MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__Int8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ea9d3ac47 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/int8_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::Int8MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::Int8MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::Int8MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Int8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.h new file mode 100644 index 000000000..7de5f97f6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int8MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__Int8MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int8__Sequence data; +} example_interfaces__msg__Int8MultiArray; + +// Struct for a sequence of example_interfaces__msg__Int8MultiArray. +typedef struct example_interfaces__msg__Int8MultiArray__Sequence +{ + example_interfaces__msg__Int8MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__Int8MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.hpp new file mode 100644 index 000000000..10c14dca2 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__Int8MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__Int8MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Int8MultiArray_ +{ + using Type = Int8MultiArray_; + + explicit Int8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::Int8MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::Int8MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__Int8MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__Int8MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int8MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int8MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int8MultiArray_ + +// alias to use template instance with default allocator +using Int8MultiArray = + example_interfaces::msg::Int8MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__traits.hpp new file mode 100644 index 000000000..0bd4b8271 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int8MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int8MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::Int8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::Int8MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::Int8MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/Int8MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.c new file mode 100644 index 000000000..fe0c2305f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/int8_multi_array__functions.h" +#include "example_interfaces/msg/detail/int8_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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; + example_interfaces__msg__Int8MultiArray__init(message_memory); +} + +void example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__Int8MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__size_function__Int8MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int8_t * item = + ((const int8_t *) + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data(untyped_member, index)); + int8_t * value = + (int8_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__assign_function__Int8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int8_t * item = + ((int8_t *) + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data(untyped_member, index)); + const int8_t * value = + (const int8_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__resize_function__Int8MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + rosidl_runtime_c__int8__Sequence__fini(member); + return rosidl_runtime_c__int8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__Int8MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__Int8MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__size_function__Int8MultiArray__data, // size() function pointer + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data, // get(index) function pointer + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int8MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__assign_function__Int8MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__resize_function__Int8MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "Int8MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__Int8MultiArray), + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array, // message members + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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 example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int8MultiArray)() { + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.cpp new file mode 100644 index 000000000..cf8341481 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/Int8MultiArray.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 "example_interfaces/msg/detail/int8_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int8MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::Int8MultiArray(_init); +} + +void Int8MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int8MultiArray(); +} + +size_t size_function__Int8MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int8MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int8MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int8MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int8MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int8MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int8MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::Int8MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int8MultiArray__data, // size() function pointer + get_const_function__Int8MultiArray__data, // get_const(index) function pointer + get_function__Int8MultiArray__data, // get(index) function pointer + fetch_function__Int8MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int8MultiArray__data, // assign(index, value) function pointer + resize_function__Int8MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "Int8MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::Int8MultiArray), + Int8MultiArray_message_member_array, // message members + Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int8MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int8MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_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, example_interfaces, msg, Int8MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.hpp new file mode 100644 index 000000000..42dac46e2 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/int8_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + Int8MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__builder.hpp new file mode 100644 index 000000000..b1a8f97e8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__builder.hpp @@ -0,0 +1,88 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MultiArrayDimension_stride +{ +public: + explicit Init_MultiArrayDimension_stride(::example_interfaces::msg::MultiArrayDimension & msg) + : msg_(msg) + {} + ::example_interfaces::msg::MultiArrayDimension stride(::example_interfaces::msg::MultiArrayDimension::_stride_type arg) + { + msg_.stride = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::MultiArrayDimension msg_; +}; + +class Init_MultiArrayDimension_size +{ +public: + explicit Init_MultiArrayDimension_size(::example_interfaces::msg::MultiArrayDimension & msg) + : msg_(msg) + {} + Init_MultiArrayDimension_stride size(::example_interfaces::msg::MultiArrayDimension::_size_type arg) + { + msg_.size = std::move(arg); + return Init_MultiArrayDimension_stride(msg_); + } + +private: + ::example_interfaces::msg::MultiArrayDimension msg_; +}; + +class Init_MultiArrayDimension_label +{ +public: + Init_MultiArrayDimension_label() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MultiArrayDimension_size label(::example_interfaces::msg::MultiArrayDimension::_label_type arg) + { + msg_.label = std::move(arg); + return Init_MultiArrayDimension_size(msg_); + } + +private: + ::example_interfaces::msg::MultiArrayDimension msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::MultiArrayDimension>() +{ + return example_interfaces::msg::builder::Init_MultiArrayDimension_label(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__functions.c new file mode 100644 index 000000000..82da1a84f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__functions.c @@ -0,0 +1,267 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/multi_array_dimension__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `label` +#include "rosidl_runtime_c/string_functions.h" + +bool +example_interfaces__msg__MultiArrayDimension__init(example_interfaces__msg__MultiArrayDimension * msg) +{ + if (!msg) { + return false; + } + // label + if (!rosidl_runtime_c__String__init(&msg->label)) { + example_interfaces__msg__MultiArrayDimension__fini(msg); + return false; + } + // size + // stride + return true; +} + +void +example_interfaces__msg__MultiArrayDimension__fini(example_interfaces__msg__MultiArrayDimension * msg) +{ + if (!msg) { + return; + } + // label + rosidl_runtime_c__String__fini(&msg->label); + // size + // stride +} + +bool +example_interfaces__msg__MultiArrayDimension__are_equal(const example_interfaces__msg__MultiArrayDimension * lhs, const example_interfaces__msg__MultiArrayDimension * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // label + if (!rosidl_runtime_c__String__are_equal( + &(lhs->label), &(rhs->label))) + { + return false; + } + // size + if (lhs->size != rhs->size) { + return false; + } + // stride + if (lhs->stride != rhs->stride) { + return false; + } + return true; +} + +bool +example_interfaces__msg__MultiArrayDimension__copy( + const example_interfaces__msg__MultiArrayDimension * input, + example_interfaces__msg__MultiArrayDimension * output) +{ + if (!input || !output) { + return false; + } + // label + if (!rosidl_runtime_c__String__copy( + &(input->label), &(output->label))) + { + return false; + } + // size + output->size = input->size; + // stride + output->stride = input->stride; + return true; +} + +example_interfaces__msg__MultiArrayDimension * +example_interfaces__msg__MultiArrayDimension__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayDimension * msg = (example_interfaces__msg__MultiArrayDimension *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayDimension), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__MultiArrayDimension)); + bool success = example_interfaces__msg__MultiArrayDimension__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__MultiArrayDimension__destroy(example_interfaces__msg__MultiArrayDimension * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__MultiArrayDimension__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__MultiArrayDimension__Sequence__init(example_interfaces__msg__MultiArrayDimension__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayDimension * data = NULL; + + if (size) { + data = (example_interfaces__msg__MultiArrayDimension *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__MultiArrayDimension), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__MultiArrayDimension__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__MultiArrayDimension__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__MultiArrayDimension__Sequence__fini(example_interfaces__msg__MultiArrayDimension__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) { + example_interfaces__msg__MultiArrayDimension__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); + } +} + +example_interfaces__msg__MultiArrayDimension__Sequence * +example_interfaces__msg__MultiArrayDimension__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayDimension__Sequence * array = (example_interfaces__msg__MultiArrayDimension__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayDimension__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__MultiArrayDimension__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__MultiArrayDimension__Sequence__destroy(example_interfaces__msg__MultiArrayDimension__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__MultiArrayDimension__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__MultiArrayDimension__Sequence__are_equal(const example_interfaces__msg__MultiArrayDimension__Sequence * lhs, const example_interfaces__msg__MultiArrayDimension__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__MultiArrayDimension__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__MultiArrayDimension__Sequence__copy( + const example_interfaces__msg__MultiArrayDimension__Sequence * input, + example_interfaces__msg__MultiArrayDimension__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__MultiArrayDimension); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayDimension * data = + (example_interfaces__msg__MultiArrayDimension *)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 (!example_interfaces__msg__MultiArrayDimension__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; ) { + example_interfaces__msg__MultiArrayDimension__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__MultiArrayDimension__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..39f2b0dfe --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__MultiArrayDimension( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__MultiArrayDimension( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, MultiArrayDimension)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..8b53a0338 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/multi_array_dimension__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::MultiArrayDimension & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::MultiArrayDimension & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::MultiArrayDimension & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_MultiArrayDimension( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, MultiArrayDimension)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.h new file mode 100644 index 000000000..91d26e469 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.h @@ -0,0 +1,54 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'label' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/MultiArrayDimension in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__MultiArrayDimension +{ + /// label of given dimension + rosidl_runtime_c__String label; + /// size of given dimension (in type units) + uint32_t size; + /// stride of given dimension + uint32_t stride; +} example_interfaces__msg__MultiArrayDimension; + +// Struct for a sequence of example_interfaces__msg__MultiArrayDimension. +typedef struct example_interfaces__msg__MultiArrayDimension__Sequence +{ + example_interfaces__msg__MultiArrayDimension * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__MultiArrayDimension__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.hpp new file mode 100644 index 000000000..46c58e4b5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__struct.hpp @@ -0,0 +1,159 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__MultiArrayDimension __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__MultiArrayDimension __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct MultiArrayDimension_ +{ + using Type = MultiArrayDimension_; + + explicit MultiArrayDimension_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->label = ""; + this->size = 0ul; + this->stride = 0ul; + } + } + + explicit MultiArrayDimension_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : label(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->label = ""; + this->size = 0ul; + this->stride = 0ul; + } + } + + // field types and members + using _label_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _label_type label; + using _size_type = + uint32_t; + _size_type size; + using _stride_type = + uint32_t; + _stride_type stride; + + // setters for named parameter idiom + Type & set__label( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->label = _arg; + return *this; + } + Type & set__size( + const uint32_t & _arg) + { + this->size = _arg; + return *this; + } + Type & set__stride( + const uint32_t & _arg) + { + this->stride = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::MultiArrayDimension_ *; + using ConstRawPtr = + const example_interfaces::msg::MultiArrayDimension_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__MultiArrayDimension + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__MultiArrayDimension + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MultiArrayDimension_ & other) const + { + if (this->label != other.label) { + return false; + } + if (this->size != other.size) { + return false; + } + if (this->stride != other.stride) { + return false; + } + return true; + } + bool operator!=(const MultiArrayDimension_ & other) const + { + return !this->operator==(other); + } +}; // struct MultiArrayDimension_ + +// alias to use template instance with default allocator +using MultiArrayDimension = + example_interfaces::msg::MultiArrayDimension_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__traits.hpp new file mode 100644 index 000000000..4a4c54f67 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiArrayDimension & msg, + std::ostream & out) +{ + out << "{"; + // member: label + { + out << "label: "; + rosidl_generator_traits::value_to_yaml(msg.label, out); + out << ", "; + } + + // member: size + { + out << "size: "; + rosidl_generator_traits::value_to_yaml(msg.size, out); + out << ", "; + } + + // member: stride + { + out << "stride: "; + rosidl_generator_traits::value_to_yaml(msg.stride, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiArrayDimension & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: label + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "label: "; + rosidl_generator_traits::value_to_yaml(msg.label, out); + out << "\n"; + } + + // member: size + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "size: "; + rosidl_generator_traits::value_to_yaml(msg.size, out); + out << "\n"; + } + + // member: stride + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stride: "; + rosidl_generator_traits::value_to_yaml(msg.stride, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiArrayDimension & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::MultiArrayDimension & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::MultiArrayDimension & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::MultiArrayDimension"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/MultiArrayDimension"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.c new file mode 100644 index 000000000..49cb419f6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.c @@ -0,0 +1,121 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/multi_array_dimension__functions.h" +#include "example_interfaces/msg/detail/multi_array_dimension__struct.h" + + +// Include directives for member types +// Member `label` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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; + example_interfaces__msg__MultiArrayDimension__init(message_memory); +} + +void example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_fini_function(void * message_memory) +{ + example_interfaces__msg__MultiArrayDimension__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array[3] = { + { + "label", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__MultiArrayDimension, label), // 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 + }, + { + "size", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__MultiArrayDimension, size), // 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 + }, + { + "stride", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__MultiArrayDimension, stride), // 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 example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members = { + "example_interfaces__msg", // message namespace + "MultiArrayDimension", // message name + 3, // number of fields + sizeof(example_interfaces__msg__MultiArrayDimension), + example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array, // message members + example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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 example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle = { + 0, + &example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayDimension)() { + if (!example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp new file mode 100644 index 000000000..97c850642 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp @@ -0,0 +1,143 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/MultiArrayDimension.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 "example_interfaces/msg/detail/multi_array_dimension__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MultiArrayDimension_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::MultiArrayDimension(_init); +} + +void MultiArrayDimension_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MultiArrayDimension(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayDimension_message_member_array[3] = { + { + "label", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::MultiArrayDimension, label), // 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 + }, + { + "size", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::MultiArrayDimension, size), // 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 + }, + { + "stride", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::MultiArrayDimension, stride), // 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 MultiArrayDimension_message_members = { + "example_interfaces::msg", // message namespace + "MultiArrayDimension", // message name + 3, // number of fields + sizeof(example_interfaces::msg::MultiArrayDimension), + MultiArrayDimension_message_member_array, // message members + MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) + MultiArrayDimension_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MultiArrayDimension_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MultiArrayDimension_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_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, example_interfaces, msg, MultiArrayDimension)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.hpp new file mode 100644 index 000000000..a6e81eeca --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_dimension__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + MultiArrayDimension +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__builder.hpp new file mode 100644 index 000000000..b86c07075 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MultiArrayLayout_data_offset +{ +public: + explicit Init_MultiArrayLayout_data_offset(::example_interfaces::msg::MultiArrayLayout & msg) + : msg_(msg) + {} + ::example_interfaces::msg::MultiArrayLayout data_offset(::example_interfaces::msg::MultiArrayLayout::_data_offset_type arg) + { + msg_.data_offset = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::MultiArrayLayout msg_; +}; + +class Init_MultiArrayLayout_dim +{ +public: + Init_MultiArrayLayout_dim() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MultiArrayLayout_data_offset dim(::example_interfaces::msg::MultiArrayLayout::_dim_type arg) + { + msg_.dim = std::move(arg); + return Init_MultiArrayLayout_data_offset(msg_); + } + +private: + ::example_interfaces::msg::MultiArrayLayout msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::MultiArrayLayout>() +{ + return example_interfaces::msg::builder::Init_MultiArrayLayout_dim(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__functions.c new file mode 100644 index 000000000..14336b3e3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__functions.c @@ -0,0 +1,259 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `dim` +#include "example_interfaces/msg/detail/multi_array_dimension__functions.h" + +bool +example_interfaces__msg__MultiArrayLayout__init(example_interfaces__msg__MultiArrayLayout * msg) +{ + if (!msg) { + return false; + } + // dim + if (!example_interfaces__msg__MultiArrayDimension__Sequence__init(&msg->dim, 0)) { + example_interfaces__msg__MultiArrayLayout__fini(msg); + return false; + } + // data_offset + return true; +} + +void +example_interfaces__msg__MultiArrayLayout__fini(example_interfaces__msg__MultiArrayLayout * msg) +{ + if (!msg) { + return; + } + // dim + example_interfaces__msg__MultiArrayDimension__Sequence__fini(&msg->dim); + // data_offset +} + +bool +example_interfaces__msg__MultiArrayLayout__are_equal(const example_interfaces__msg__MultiArrayLayout * lhs, const example_interfaces__msg__MultiArrayLayout * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // dim + if (!example_interfaces__msg__MultiArrayDimension__Sequence__are_equal( + &(lhs->dim), &(rhs->dim))) + { + return false; + } + // data_offset + if (lhs->data_offset != rhs->data_offset) { + return false; + } + return true; +} + +bool +example_interfaces__msg__MultiArrayLayout__copy( + const example_interfaces__msg__MultiArrayLayout * input, + example_interfaces__msg__MultiArrayLayout * output) +{ + if (!input || !output) { + return false; + } + // dim + if (!example_interfaces__msg__MultiArrayDimension__Sequence__copy( + &(input->dim), &(output->dim))) + { + return false; + } + // data_offset + output->data_offset = input->data_offset; + return true; +} + +example_interfaces__msg__MultiArrayLayout * +example_interfaces__msg__MultiArrayLayout__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayLayout * msg = (example_interfaces__msg__MultiArrayLayout *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayLayout), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__MultiArrayLayout)); + bool success = example_interfaces__msg__MultiArrayLayout__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__MultiArrayLayout__destroy(example_interfaces__msg__MultiArrayLayout * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__MultiArrayLayout__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__MultiArrayLayout__Sequence__init(example_interfaces__msg__MultiArrayLayout__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayLayout * data = NULL; + + if (size) { + data = (example_interfaces__msg__MultiArrayLayout *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__MultiArrayLayout), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__MultiArrayLayout__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__MultiArrayLayout__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__MultiArrayLayout__Sequence__fini(example_interfaces__msg__MultiArrayLayout__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) { + example_interfaces__msg__MultiArrayLayout__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); + } +} + +example_interfaces__msg__MultiArrayLayout__Sequence * +example_interfaces__msg__MultiArrayLayout__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayLayout__Sequence * array = (example_interfaces__msg__MultiArrayLayout__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayLayout__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__MultiArrayLayout__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__MultiArrayLayout__Sequence__destroy(example_interfaces__msg__MultiArrayLayout__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__MultiArrayLayout__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__MultiArrayLayout__Sequence__are_equal(const example_interfaces__msg__MultiArrayLayout__Sequence * lhs, const example_interfaces__msg__MultiArrayLayout__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__MultiArrayLayout__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__MultiArrayLayout__Sequence__copy( + const example_interfaces__msg__MultiArrayLayout__Sequence * input, + example_interfaces__msg__MultiArrayLayout__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__MultiArrayLayout); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__MultiArrayLayout * data = + (example_interfaces__msg__MultiArrayLayout *)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 (!example_interfaces__msg__MultiArrayLayout__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; ) { + example_interfaces__msg__MultiArrayLayout__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..3ced9a63c --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__MultiArrayLayout( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__MultiArrayLayout( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, MultiArrayLayout)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..0f873b044 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/multi_array_layout__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::MultiArrayLayout & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::MultiArrayLayout & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::MultiArrayLayout & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_MultiArrayLayout( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, MultiArrayLayout)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.h new file mode 100644 index 000000000..801989514 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.h @@ -0,0 +1,75 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'dim' +#include "example_interfaces/msg/detail/multi_array_dimension__struct.h" + +/// Struct defined in msg/MultiArrayLayout in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__MultiArrayLayout +{ + /// The multiarray declares a generic multi-dimensional array of a + /// particular data type. Dimensions are ordered from outer most + /// to inner most. + /// + /// Accessors should ALWAYS be written in terms of dimension stride + /// and specified outer-most dimension first. + /// + /// multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k] + /// + /// A standard, 3-channel 640x480 image with interleaved color channels + /// would be specified as: + /// + /// dim[0].label = "height" + /// dim[0].size = 480 + /// dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image) + /// dim[1].label = "width" + /// dim[1].size = 640 + /// dim[1].stride = 3*640 = 1920 + /// dim[2].label = "channel" + /// dim[2].size = 3 + /// dim[2].stride = 3 + /// + /// multiarray(i,j,k) refers to the ith row, jth column, and kth channel. + /// Array of dimension properties + example_interfaces__msg__MultiArrayDimension__Sequence dim; + /// padding bytes at front of data + uint32_t data_offset; +} example_interfaces__msg__MultiArrayLayout; + +// Struct for a sequence of example_interfaces__msg__MultiArrayLayout. +typedef struct example_interfaces__msg__MultiArrayLayout__Sequence +{ + example_interfaces__msg__MultiArrayLayout * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__MultiArrayLayout__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.hpp new file mode 100644 index 000000000..9936cffca --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__struct.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'dim' +#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__MultiArrayLayout __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__MultiArrayLayout __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct MultiArrayLayout_ +{ + using Type = MultiArrayLayout_; + + explicit MultiArrayLayout_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data_offset = 0ul; + } + } + + explicit MultiArrayLayout_(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->data_offset = 0ul; + } + } + + // field types and members + using _dim_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _dim_type dim; + using _data_offset_type = + uint32_t; + _data_offset_type data_offset; + + // setters for named parameter idiom + Type & set__dim( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->dim = _arg; + return *this; + } + Type & set__data_offset( + const uint32_t & _arg) + { + this->data_offset = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::MultiArrayLayout_ *; + using ConstRawPtr = + const example_interfaces::msg::MultiArrayLayout_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__MultiArrayLayout + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__MultiArrayLayout + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MultiArrayLayout_ & other) const + { + if (this->dim != other.dim) { + return false; + } + if (this->data_offset != other.data_offset) { + return false; + } + return true; + } + bool operator!=(const MultiArrayLayout_ & other) const + { + return !this->operator==(other); + } +}; // struct MultiArrayLayout_ + +// alias to use template instance with default allocator +using MultiArrayLayout = + example_interfaces::msg::MultiArrayLayout_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__traits.hpp new file mode 100644 index 000000000..37e4e64d1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'dim' +#include "example_interfaces/msg/detail/multi_array_dimension__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiArrayLayout & msg, + std::ostream & out) +{ + out << "{"; + // member: dim + { + if (msg.dim.size() == 0) { + out << "dim: []"; + } else { + out << "dim: ["; + size_t pending_items = msg.dim.size(); + for (auto item : msg.dim) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: data_offset + { + out << "data_offset: "; + rosidl_generator_traits::value_to_yaml(msg.data_offset, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiArrayLayout & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: dim + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.dim.size() == 0) { + out << "dim: []\n"; + } else { + out << "dim:\n"; + for (auto item : msg.dim) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: data_offset + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data_offset: "; + rosidl_generator_traits::value_to_yaml(msg.data_offset, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiArrayLayout & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::MultiArrayLayout & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::MultiArrayLayout & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::MultiArrayLayout"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/MultiArrayLayout"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.c new file mode 100644 index 000000000..a215d8da3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.c @@ -0,0 +1,163 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/multi_array_layout__functions.h" +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" + + +// Include directives for member types +// Member `dim` +#include "example_interfaces/msg/multi_array_dimension.h" +// Member `dim` +#include "example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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; + example_interfaces__msg__MultiArrayLayout__init(message_memory); +} + +void example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_fini_function(void * message_memory) +{ + example_interfaces__msg__MultiArrayLayout__fini(message_memory); +} + +size_t example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayLayout__dim( + const void * untyped_member) +{ + const example_interfaces__msg__MultiArrayDimension__Sequence * member = + (const example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index) +{ + const example_interfaces__msg__MultiArrayDimension__Sequence * member = + (const example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim( + void * untyped_member, size_t index) +{ + example_interfaces__msg__MultiArrayDimension__Sequence * member = + (example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__fetch_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index, void * untyped_value) +{ + const example_interfaces__msg__MultiArrayDimension * item = + ((const example_interfaces__msg__MultiArrayDimension *) + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim(untyped_member, index)); + example_interfaces__msg__MultiArrayDimension * value = + (example_interfaces__msg__MultiArrayDimension *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__assign_function__MultiArrayLayout__dim( + void * untyped_member, size_t index, const void * untyped_value) +{ + example_interfaces__msg__MultiArrayDimension * item = + ((example_interfaces__msg__MultiArrayDimension *) + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim(untyped_member, index)); + const example_interfaces__msg__MultiArrayDimension * value = + (const example_interfaces__msg__MultiArrayDimension *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayLayout__dim( + void * untyped_member, size_t size) +{ + example_interfaces__msg__MultiArrayDimension__Sequence * member = + (example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); + example_interfaces__msg__MultiArrayDimension__Sequence__fini(member); + return example_interfaces__msg__MultiArrayDimension__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[2] = { + { + "dim", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__MultiArrayLayout, dim), // bytes offset in struct + NULL, // default value + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayLayout__dim, // size() function pointer + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim, // get(index) function pointer + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__fetch_function__MultiArrayLayout__dim, // fetch(index, &value) function pointer + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__assign_function__MultiArrayLayout__dim, // assign(index, value) function pointer + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayLayout__dim // resize(index) function pointer + }, + { + "data_offset", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__MultiArrayLayout, data_offset), // 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 example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members = { + "example_interfaces__msg", // message namespace + "MultiArrayLayout", // message name + 2, // number of fields + sizeof(example_interfaces__msg__MultiArrayLayout), + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array, // message members + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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 example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle = { + 0, + &example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)() { + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayDimension)(); + if (!example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.cpp new file mode 100644 index 000000000..76054cdbb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/MultiArrayLayout.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 "example_interfaces/msg/detail/multi_array_layout__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MultiArrayLayout_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::MultiArrayLayout(_init); +} + +void MultiArrayLayout_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MultiArrayLayout(); +} + +size_t size_function__MultiArrayLayout__dim(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiArrayLayout__dim(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiArrayLayout__dim(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiArrayLayout__dim(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiArrayLayout__dim( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiArrayLayout__dim(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiArrayLayout__dim(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayLayout_message_member_array[2] = { + { + "dim", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::MultiArrayLayout, dim), // bytes offset in struct + nullptr, // default value + size_function__MultiArrayLayout__dim, // size() function pointer + get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer + get_function__MultiArrayLayout__dim, // get(index) function pointer + fetch_function__MultiArrayLayout__dim, // fetch(index, &value) function pointer + assign_function__MultiArrayLayout__dim, // assign(index, value) function pointer + resize_function__MultiArrayLayout__dim // resize(index) function pointer + }, + { + "data_offset", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::MultiArrayLayout, data_offset), // 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 MultiArrayLayout_message_members = { + "example_interfaces::msg", // message namespace + "MultiArrayLayout", // message name + 2, // number of fields + sizeof(example_interfaces::msg::MultiArrayLayout), + MultiArrayLayout_message_member_array, // message members + MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) + MultiArrayLayout_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MultiArrayLayout_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MultiArrayLayout_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_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, example_interfaces, msg, MultiArrayLayout)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.hpp new file mode 100644 index 000000000..9ba7c1165 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/multi_array_layout__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + MultiArrayLayout +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__builder.hpp new file mode 100644 index 000000000..33bb6079f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/string__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_String_data +{ +public: + Init_String_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::String data(::example_interfaces::msg::String::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::String msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::String>() +{ + return example_interfaces::msg::builder::Init_String_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__functions.c new file mode 100644 index 000000000..b0ec9ac16 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__functions.c @@ -0,0 +1,251 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/string__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/string_functions.h" + +bool +example_interfaces__msg__String__init(example_interfaces__msg__String * msg) +{ + if (!msg) { + return false; + } + // data + if (!rosidl_runtime_c__String__init(&msg->data)) { + example_interfaces__msg__String__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__String__fini(example_interfaces__msg__String * msg) +{ + if (!msg) { + return; + } + // data + rosidl_runtime_c__String__fini(&msg->data); +} + +bool +example_interfaces__msg__String__are_equal(const example_interfaces__msg__String * lhs, const example_interfaces__msg__String * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (!rosidl_runtime_c__String__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__String__copy( + const example_interfaces__msg__String * input, + example_interfaces__msg__String * output) +{ + if (!input || !output) { + return false; + } + // data + if (!rosidl_runtime_c__String__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__String * +example_interfaces__msg__String__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__String * msg = (example_interfaces__msg__String *)allocator.allocate(sizeof(example_interfaces__msg__String), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__String)); + bool success = example_interfaces__msg__String__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__String__destroy(example_interfaces__msg__String * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__String__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__String__Sequence__init(example_interfaces__msg__String__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__String * data = NULL; + + if (size) { + data = (example_interfaces__msg__String *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__String), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__String__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__String__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__String__Sequence__fini(example_interfaces__msg__String__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) { + example_interfaces__msg__String__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); + } +} + +example_interfaces__msg__String__Sequence * +example_interfaces__msg__String__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__String__Sequence * array = (example_interfaces__msg__String__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__String__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__String__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__String__Sequence__destroy(example_interfaces__msg__String__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__String__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__String__Sequence__are_equal(const example_interfaces__msg__String__Sequence * lhs, const example_interfaces__msg__String__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__String__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__String__Sequence__copy( + const example_interfaces__msg__String__Sequence * input, + example_interfaces__msg__String__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__String); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__String * data = + (example_interfaces__msg__String *)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 (!example_interfaces__msg__String__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; ) { + example_interfaces__msg__String__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__String__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/string__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..5eea28991 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__String( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__String( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, String)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..4e58f3220 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/string__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::String & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::String & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::String & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_String( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, String)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.h new file mode 100644 index 000000000..3690d3f17 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'data' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/String in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, string. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__String +{ + rosidl_runtime_c__String data; +} example_interfaces__msg__String; + +// Struct for a sequence of example_interfaces__msg__String. +typedef struct example_interfaces__msg__String__Sequence +{ + example_interfaces__msg__String * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__String__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.hpp new file mode 100644 index 000000000..8fda2ca13 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__String __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__String __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct String_ +{ + using Type = String_; + + explicit String_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + explicit String_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : data(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + // field types and members + using _data_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::String_ *; + using ConstRawPtr = + const example_interfaces::msg::String_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__String + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__String + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const String_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const String_ & other) const + { + return !this->operator==(other); + } +}; // struct String_ + +// alias to use template instance with default allocator +using String = + example_interfaces::msg::String_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__traits.hpp new file mode 100644 index 000000000..4aa104932 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/string__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const String & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const String & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const String & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::String & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::String & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::String"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/String"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.c new file mode 100644 index 000000000..0753468bb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.c @@ -0,0 +1,87 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/string__functions.h" +#include "example_interfaces/msg/detail/string__struct.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_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; + example_interfaces__msg__String__init(message_memory); +} + +void example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_fini_function(void * message_memory) +{ + example_interfaces__msg__String__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__String, data), // 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 example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_members = { + "example_interfaces__msg", // message namespace + "String", // message name + 1, // number of fields + sizeof(example_interfaces__msg__String), + example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_member_array, // message members + example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_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 example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle = { + 0, + &example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, String)() { + if (!example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.cpp new file mode 100644 index 000000000..b33b9f143 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/String.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 "example_interfaces/msg/detail/string__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void String_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::String(_init); +} + +void String_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~String(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember String_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::String, data), // 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 String_message_members = { + "example_interfaces::msg", // message namespace + "String", // message name + 1, // number of fields + sizeof(example_interfaces::msg::String), + String_message_member_array, // message members + String_init_function, // function to initialize message memory (memory has to be allocated) + String_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t String_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &String_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::String_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, example_interfaces, msg, String)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::String_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.hpp new file mode 100644 index 000000000..a3e3cc6e7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/string__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + String +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__builder.hpp new file mode 100644 index 000000000..b107c56a6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int16__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt16_data +{ +public: + Init_UInt16_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::UInt16 data(::example_interfaces::msg::UInt16::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt16 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt16>() +{ + return example_interfaces::msg::builder::Init_UInt16_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__functions.c new file mode 100644 index 000000000..fc4f807f6 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int16__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__UInt16__init(example_interfaces__msg__UInt16 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__UInt16__fini(example_interfaces__msg__UInt16 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__UInt16__are_equal(const example_interfaces__msg__UInt16 * lhs, const example_interfaces__msg__UInt16 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt16__copy( + const example_interfaces__msg__UInt16 * input, + example_interfaces__msg__UInt16 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__UInt16 * +example_interfaces__msg__UInt16__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16 * msg = (example_interfaces__msg__UInt16 *)allocator.allocate(sizeof(example_interfaces__msg__UInt16), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt16)); + bool success = example_interfaces__msg__UInt16__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt16__destroy(example_interfaces__msg__UInt16 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt16__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt16__Sequence__init(example_interfaces__msg__UInt16__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16 * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt16 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt16), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt16__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt16__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt16__Sequence__fini(example_interfaces__msg__UInt16__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) { + example_interfaces__msg__UInt16__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); + } +} + +example_interfaces__msg__UInt16__Sequence * +example_interfaces__msg__UInt16__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16__Sequence * array = (example_interfaces__msg__UInt16__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt16__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt16__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt16__Sequence__destroy(example_interfaces__msg__UInt16__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt16__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt16__Sequence__are_equal(const example_interfaces__msg__UInt16__Sequence * lhs, const example_interfaces__msg__UInt16__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt16__Sequence__copy( + const example_interfaces__msg__UInt16__Sequence * input, + example_interfaces__msg__UInt16__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt16); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16 * data = + (example_interfaces__msg__UInt16 *)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 (!example_interfaces__msg__UInt16__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; ) { + example_interfaces__msg__UInt16__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt16__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..7daeeede9 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt16( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt16)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..b550e5de7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int16__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt16 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt16 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt16 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt16)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.h new file mode 100644 index 000000000..45c8f9c83 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt16 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, uint16. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__UInt16 +{ + uint16_t data; +} example_interfaces__msg__UInt16; + +// Struct for a sequence of example_interfaces__msg__UInt16. +typedef struct example_interfaces__msg__UInt16__Sequence +{ + example_interfaces__msg__UInt16 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt16__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.hpp new file mode 100644 index 000000000..dfb720e62 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt16 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt16 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt16_ +{ + using Type = UInt16_; + + explicit UInt16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit UInt16_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint16_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint16_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt16_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt16_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt16 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt16 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt16_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt16_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt16_ + +// alias to use template instance with default allocator +using UInt16 = + example_interfaces::msg::UInt16_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__traits.hpp new file mode 100644 index 000000000..2a3dc6069 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int16__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt16 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt16 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt16 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt16 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt16 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt16"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt16"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.c new file mode 100644 index 000000000..0e883e4a7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int16__functions.h" +#include "example_interfaces/msg/detail/u_int16__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_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; + example_interfaces__msg__UInt16__init(message_memory); +} + +void example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt16__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt16, data), // 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 example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_members = { + "example_interfaces__msg", // message namespace + "UInt16", // message name + 1, // number of fields + sizeof(example_interfaces__msg__UInt16), + example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array, // message members + example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_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 example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt16)() { + if (!example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.cpp new file mode 100644 index 000000000..24c31ae62 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt16.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 "example_interfaces/msg/detail/u_int16__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt16_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt16(_init); +} + +void UInt16_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt16(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt16, data), // 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 UInt16_message_members = { + "example_interfaces::msg", // message namespace + "UInt16", // message name + 1, // number of fields + sizeof(example_interfaces::msg::UInt16), + UInt16_message_member_array, // message members + UInt16_init_function, // function to initialize message memory (memory has to be allocated) + UInt16_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt16_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt16_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16_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, example_interfaces, msg, UInt16)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.hpp new file mode 100644 index 000000000..e465b59f8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt16 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp new file mode 100644 index 000000000..b9b3c5fb8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt16MultiArray_data +{ +public: + explicit Init_UInt16MultiArray_data(::example_interfaces::msg::UInt16MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::UInt16MultiArray data(::example_interfaces::msg::UInt16MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt16MultiArray msg_; +}; + +class Init_UInt16MultiArray_layout +{ +public: + Init_UInt16MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt16MultiArray_data layout(::example_interfaces::msg::UInt16MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt16MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::UInt16MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt16MultiArray>() +{ + return example_interfaces::msg::builder::Init_UInt16MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__functions.c new file mode 100644 index 000000000..ae7c991cf --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int16_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__UInt16MultiArray__init(example_interfaces__msg__UInt16MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__UInt16MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__UInt16MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__UInt16MultiArray__fini(example_interfaces__msg__UInt16MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint16__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__UInt16MultiArray__are_equal(const example_interfaces__msg__UInt16MultiArray * lhs, const example_interfaces__msg__UInt16MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt16MultiArray__copy( + const example_interfaces__msg__UInt16MultiArray * input, + example_interfaces__msg__UInt16MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__UInt16MultiArray * +example_interfaces__msg__UInt16MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16MultiArray * msg = (example_interfaces__msg__UInt16MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt16MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt16MultiArray)); + bool success = example_interfaces__msg__UInt16MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt16MultiArray__destroy(example_interfaces__msg__UInt16MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt16MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt16MultiArray__Sequence__init(example_interfaces__msg__UInt16MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt16MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt16MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt16MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt16MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt16MultiArray__Sequence__fini(example_interfaces__msg__UInt16MultiArray__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) { + example_interfaces__msg__UInt16MultiArray__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); + } +} + +example_interfaces__msg__UInt16MultiArray__Sequence * +example_interfaces__msg__UInt16MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16MultiArray__Sequence * array = (example_interfaces__msg__UInt16MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt16MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt16MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt16MultiArray__Sequence__destroy(example_interfaces__msg__UInt16MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt16MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt16MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt16MultiArray__Sequence * lhs, const example_interfaces__msg__UInt16MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt16MultiArray__Sequence__copy( + const example_interfaces__msg__UInt16MultiArray__Sequence * input, + example_interfaces__msg__UInt16MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt16MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt16MultiArray * data = + (example_interfaces__msg__UInt16MultiArray *)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 (!example_interfaces__msg__UInt16MultiArray__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; ) { + example_interfaces__msg__UInt16MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt16MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..9020613b5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt16MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..858c33f7e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int16_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt16MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt16MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt16MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.h new file mode 100644 index 000000000..8717106f0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt16MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__UInt16MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint16__Sequence data; +} example_interfaces__msg__UInt16MultiArray; + +// Struct for a sequence of example_interfaces__msg__UInt16MultiArray. +typedef struct example_interfaces__msg__UInt16MultiArray__Sequence +{ + example_interfaces__msg__UInt16MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt16MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp new file mode 100644 index 000000000..a51169238 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt16MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt16MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt16MultiArray_ +{ + using Type = UInt16MultiArray_; + + explicit UInt16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt16MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt16MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt16MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt16MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt16MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt16MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt16MultiArray_ + +// alias to use template instance with default allocator +using UInt16MultiArray = + example_interfaces::msg::UInt16MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp new file mode 100644 index 000000000..af143c696 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt16MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt16MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt16MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt16MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt16MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.c new file mode 100644 index 000000000..d964674dc --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int16_multi_array__functions.h" +#include "example_interfaces/msg/detail/u_int16_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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; + example_interfaces__msg__UInt16MultiArray__init(message_memory); +} + +void example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt16MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__size_function__UInt16MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint16__Sequence * member = + (const rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint16__Sequence * member = + (const rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint16__Sequence * member = + (rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint16_t * item = + ((const uint16_t *) + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data(untyped_member, index)); + uint16_t * value = + (uint16_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint16_t * item = + ((uint16_t *) + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data(untyped_member, index)); + const uint16_t * value = + (const uint16_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt16MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint16__Sequence * member = + (rosidl_runtime_c__uint16__Sequence *)(untyped_member); + rosidl_runtime_c__uint16__Sequence__fini(member); + return rosidl_runtime_c__uint16__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__UInt16MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt16MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__size_function__UInt16MultiArray__data, // size() function pointer + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data, // get(index) function pointer + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt16MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt16MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt16MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "UInt16MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__UInt16MultiArray), + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array, // message members + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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 example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt16MultiArray)() { + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp new file mode 100644 index 000000000..7976dd3d8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt16MultiArray.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 "example_interfaces/msg/detail/u_int16_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt16MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt16MultiArray(_init); +} + +void UInt16MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt16MultiArray(); +} + +size_t size_function__UInt16MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt16MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt16MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt16MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt16MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt16MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt16MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt16MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt16MultiArray__data, // size() function pointer + get_const_function__UInt16MultiArray__data, // get_const(index) function pointer + get_function__UInt16MultiArray__data, // get(index) function pointer + fetch_function__UInt16MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt16MultiArray__data, // assign(index, value) function pointer + resize_function__UInt16MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "UInt16MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::UInt16MultiArray), + UInt16MultiArray_message_member_array, // message members + UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt16MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt16MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_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, example_interfaces, msg, UInt16MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.hpp new file mode 100644 index 000000000..c9142662f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int16_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt16MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__builder.hpp new file mode 100644 index 000000000..5addfd930 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt32_data +{ +public: + Init_UInt32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::UInt32 data(::example_interfaces::msg::UInt32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt32>() +{ + return example_interfaces::msg::builder::Init_UInt32_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__functions.c new file mode 100644 index 000000000..0661d1c25 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__UInt32__init(example_interfaces__msg__UInt32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__UInt32__fini(example_interfaces__msg__UInt32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__UInt32__are_equal(const example_interfaces__msg__UInt32 * lhs, const example_interfaces__msg__UInt32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt32__copy( + const example_interfaces__msg__UInt32 * input, + example_interfaces__msg__UInt32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__UInt32 * +example_interfaces__msg__UInt32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32 * msg = (example_interfaces__msg__UInt32 *)allocator.allocate(sizeof(example_interfaces__msg__UInt32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt32)); + bool success = example_interfaces__msg__UInt32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt32__destroy(example_interfaces__msg__UInt32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt32__Sequence__init(example_interfaces__msg__UInt32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32 * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt32__Sequence__fini(example_interfaces__msg__UInt32__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) { + example_interfaces__msg__UInt32__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); + } +} + +example_interfaces__msg__UInt32__Sequence * +example_interfaces__msg__UInt32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32__Sequence * array = (example_interfaces__msg__UInt32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt32__Sequence__destroy(example_interfaces__msg__UInt32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt32__Sequence__are_equal(const example_interfaces__msg__UInt32__Sequence * lhs, const example_interfaces__msg__UInt32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt32__Sequence__copy( + const example_interfaces__msg__UInt32__Sequence * input, + example_interfaces__msg__UInt32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32 * data = + (example_interfaces__msg__UInt32 *)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 (!example_interfaces__msg__UInt32__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; ) { + example_interfaces__msg__UInt32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..d7662d12f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..8ec87151d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int32__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt32)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.h new file mode 100644 index 000000000..9f4d1c779 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt32 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, uint32. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__UInt32 +{ + uint32_t data; +} example_interfaces__msg__UInt32; + +// Struct for a sequence of example_interfaces__msg__UInt32. +typedef struct example_interfaces__msg__UInt32__Sequence +{ + example_interfaces__msg__UInt32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.hpp new file mode 100644 index 000000000..26e02f76e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt32 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt32 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt32_ +{ + using Type = UInt32_; + + explicit UInt32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ul; + } + } + + explicit UInt32_(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->data = 0ul; + } + } + + // field types and members + using _data_type = + uint32_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint32_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt32_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt32_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt32_ + +// alias to use template instance with default allocator +using UInt32 = + example_interfaces::msg::UInt32_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__traits.hpp new file mode 100644 index 000000000..d823daf42 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt32 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt32 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt32 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt32"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.c new file mode 100644 index 000000000..21a7c9419 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int32__functions.h" +#include "example_interfaces/msg/detail/u_int32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_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; + example_interfaces__msg__UInt32__init(message_memory); +} + +void example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt32, data), // 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 example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_members = { + "example_interfaces__msg", // message namespace + "UInt32", // message name + 1, // number of fields + sizeof(example_interfaces__msg__UInt32), + example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array, // message members + example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_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 example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt32)() { + if (!example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.cpp new file mode 100644 index 000000000..3de7f04b0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt32.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 "example_interfaces/msg/detail/u_int32__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt32(_init); +} + +void UInt32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt32, data), // 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 UInt32_message_members = { + "example_interfaces::msg", // message namespace + "UInt32", // message name + 1, // number of fields + sizeof(example_interfaces::msg::UInt32), + UInt32_message_member_array, // message members + UInt32_init_function, // function to initialize message memory (memory has to be allocated) + UInt32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32_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, example_interfaces, msg, UInt32)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.hpp new file mode 100644 index 000000000..3da750a50 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp new file mode 100644 index 000000000..4baed8225 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt32MultiArray_data +{ +public: + explicit Init_UInt32MultiArray_data(::example_interfaces::msg::UInt32MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::UInt32MultiArray data(::example_interfaces::msg::UInt32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt32MultiArray msg_; +}; + +class Init_UInt32MultiArray_layout +{ +public: + Init_UInt32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt32MultiArray_data layout(::example_interfaces::msg::UInt32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt32MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::UInt32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt32MultiArray>() +{ + return example_interfaces::msg::builder::Init_UInt32MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__functions.c new file mode 100644 index 000000000..40456a6a3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__UInt32MultiArray__init(example_interfaces__msg__UInt32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__UInt32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__UInt32MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__UInt32MultiArray__fini(example_interfaces__msg__UInt32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint32__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__UInt32MultiArray__are_equal(const example_interfaces__msg__UInt32MultiArray * lhs, const example_interfaces__msg__UInt32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt32MultiArray__copy( + const example_interfaces__msg__UInt32MultiArray * input, + example_interfaces__msg__UInt32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__UInt32MultiArray * +example_interfaces__msg__UInt32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32MultiArray * msg = (example_interfaces__msg__UInt32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt32MultiArray)); + bool success = example_interfaces__msg__UInt32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt32MultiArray__destroy(example_interfaces__msg__UInt32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt32MultiArray__Sequence__init(example_interfaces__msg__UInt32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt32MultiArray__Sequence__fini(example_interfaces__msg__UInt32MultiArray__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) { + example_interfaces__msg__UInt32MultiArray__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); + } +} + +example_interfaces__msg__UInt32MultiArray__Sequence * +example_interfaces__msg__UInt32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32MultiArray__Sequence * array = (example_interfaces__msg__UInt32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt32MultiArray__Sequence__destroy(example_interfaces__msg__UInt32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt32MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt32MultiArray__Sequence * lhs, const example_interfaces__msg__UInt32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt32MultiArray__Sequence__copy( + const example_interfaces__msg__UInt32MultiArray__Sequence * input, + example_interfaces__msg__UInt32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt32MultiArray * data = + (example_interfaces__msg__UInt32MultiArray *)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 (!example_interfaces__msg__UInt32MultiArray__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; ) { + example_interfaces__msg__UInt32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2a075f348 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..a7ac8831d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.h new file mode 100644 index 000000000..7b327332d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt32MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__UInt32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint32__Sequence data; +} example_interfaces__msg__UInt32MultiArray; + +// Struct for a sequence of example_interfaces__msg__UInt32MultiArray. +typedef struct example_interfaces__msg__UInt32MultiArray__Sequence +{ + example_interfaces__msg__UInt32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp new file mode 100644 index 000000000..ab21270ce --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt32MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt32MultiArray_ +{ + using Type = UInt32MultiArray_; + + explicit UInt32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt32MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt32MultiArray_ + +// alias to use template instance with default allocator +using UInt32MultiArray = + example_interfaces::msg::UInt32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp new file mode 100644 index 000000000..dd4604173 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt32MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt32MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt32MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.c new file mode 100644 index 000000000..e73c0971a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int32_multi_array__functions.h" +#include "example_interfaces/msg/detail/u_int32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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; + example_interfaces__msg__UInt32MultiArray__init(message_memory); +} + +void example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt32MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__size_function__UInt32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint32_t * item = + ((const uint32_t *) + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data(untyped_member, index)); + uint32_t * value = + (uint32_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint32_t * item = + ((uint32_t *) + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data(untyped_member, index)); + const uint32_t * value = + (const uint32_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + rosidl_runtime_c__uint32__Sequence__fini(member); + return rosidl_runtime_c__uint32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__UInt32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt32MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__size_function__UInt32MultiArray__data, // size() function pointer + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data, // get(index) function pointer + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt32MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt32MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "UInt32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__UInt32MultiArray), + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array, // message members + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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 example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt32MultiArray)() { + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp new file mode 100644 index 000000000..f2c642714 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt32MultiArray.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 "example_interfaces/msg/detail/u_int32_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt32MultiArray(_init); +} + +void UInt32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt32MultiArray(); +} + +size_t size_function__UInt32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt32MultiArray__data, // size() function pointer + get_const_function__UInt32MultiArray__data, // get_const(index) function pointer + get_function__UInt32MultiArray__data, // get(index) function pointer + fetch_function__UInt32MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt32MultiArray__data, // assign(index, value) function pointer + resize_function__UInt32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "UInt32MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::UInt32MultiArray), + UInt32MultiArray_message_member_array, // message members + UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_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, example_interfaces, msg, UInt32MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.hpp new file mode 100644 index 000000000..aa5f5b584 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__builder.hpp new file mode 100644 index 000000000..ad384e0c3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt64_data +{ +public: + Init_UInt64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::UInt64 data(::example_interfaces::msg::UInt64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt64>() +{ + return example_interfaces::msg::builder::Init_UInt64_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__functions.c new file mode 100644 index 000000000..6da211a1a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__UInt64__init(example_interfaces__msg__UInt64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__UInt64__fini(example_interfaces__msg__UInt64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__UInt64__are_equal(const example_interfaces__msg__UInt64 * lhs, const example_interfaces__msg__UInt64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt64__copy( + const example_interfaces__msg__UInt64 * input, + example_interfaces__msg__UInt64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__UInt64 * +example_interfaces__msg__UInt64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64 * msg = (example_interfaces__msg__UInt64 *)allocator.allocate(sizeof(example_interfaces__msg__UInt64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt64)); + bool success = example_interfaces__msg__UInt64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt64__destroy(example_interfaces__msg__UInt64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt64__Sequence__init(example_interfaces__msg__UInt64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64 * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt64__Sequence__fini(example_interfaces__msg__UInt64__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) { + example_interfaces__msg__UInt64__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); + } +} + +example_interfaces__msg__UInt64__Sequence * +example_interfaces__msg__UInt64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64__Sequence * array = (example_interfaces__msg__UInt64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt64__Sequence__destroy(example_interfaces__msg__UInt64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt64__Sequence__are_equal(const example_interfaces__msg__UInt64__Sequence * lhs, const example_interfaces__msg__UInt64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt64__Sequence__copy( + const example_interfaces__msg__UInt64__Sequence * input, + example_interfaces__msg__UInt64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64 * data = + (example_interfaces__msg__UInt64 *)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 (!example_interfaces__msg__UInt64__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; ) { + example_interfaces__msg__UInt64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..d21378821 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..991a2737d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int64__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt64)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.h new file mode 100644 index 000000000..3c523a391 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt64 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, unint64. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__UInt64 +{ + uint64_t data; +} example_interfaces__msg__UInt64; + +// Struct for a sequence of example_interfaces__msg__UInt64. +typedef struct example_interfaces__msg__UInt64__Sequence +{ + example_interfaces__msg__UInt64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.hpp new file mode 100644 index 000000000..973e28359 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt64 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt64 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt64_ +{ + using Type = UInt64_; + + explicit UInt64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ull; + } + } + + explicit UInt64_(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->data = 0ull; + } + } + + // field types and members + using _data_type = + uint64_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint64_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt64_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt64_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt64_ + +// alias to use template instance with default allocator +using UInt64 = + example_interfaces::msg::UInt64_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__traits.hpp new file mode 100644 index 000000000..a01d73b78 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt64 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt64 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt64 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt64"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.c new file mode 100644 index 000000000..005f1eb9f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int64__functions.h" +#include "example_interfaces/msg/detail/u_int64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_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; + example_interfaces__msg__UInt64__init(message_memory); +} + +void example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt64, data), // 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 example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_members = { + "example_interfaces__msg", // message namespace + "UInt64", // message name + 1, // number of fields + sizeof(example_interfaces__msg__UInt64), + example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array, // message members + example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_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 example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt64)() { + if (!example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.cpp new file mode 100644 index 000000000..5278f2dd1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt64.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 "example_interfaces/msg/detail/u_int64__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt64(_init); +} + +void UInt64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt64, data), // 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 UInt64_message_members = { + "example_interfaces::msg", // message namespace + "UInt64", // message name + 1, // number of fields + sizeof(example_interfaces::msg::UInt64), + UInt64_message_member_array, // message members + UInt64_init_function, // function to initialize message memory (memory has to be allocated) + UInt64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64_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, example_interfaces, msg, UInt64)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.hpp new file mode 100644 index 000000000..0ba502544 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp new file mode 100644 index 000000000..9dbd3c76e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt64MultiArray_data +{ +public: + explicit Init_UInt64MultiArray_data(::example_interfaces::msg::UInt64MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::UInt64MultiArray data(::example_interfaces::msg::UInt64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt64MultiArray msg_; +}; + +class Init_UInt64MultiArray_layout +{ +public: + Init_UInt64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt64MultiArray_data layout(::example_interfaces::msg::UInt64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt64MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::UInt64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt64MultiArray>() +{ + return example_interfaces::msg::builder::Init_UInt64MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__functions.c new file mode 100644 index 000000000..3faf63a3a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__UInt64MultiArray__init(example_interfaces__msg__UInt64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__UInt64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__UInt64MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__UInt64MultiArray__fini(example_interfaces__msg__UInt64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint64__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__UInt64MultiArray__are_equal(const example_interfaces__msg__UInt64MultiArray * lhs, const example_interfaces__msg__UInt64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt64MultiArray__copy( + const example_interfaces__msg__UInt64MultiArray * input, + example_interfaces__msg__UInt64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__UInt64MultiArray * +example_interfaces__msg__UInt64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64MultiArray * msg = (example_interfaces__msg__UInt64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt64MultiArray)); + bool success = example_interfaces__msg__UInt64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt64MultiArray__destroy(example_interfaces__msg__UInt64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt64MultiArray__Sequence__init(example_interfaces__msg__UInt64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt64MultiArray__Sequence__fini(example_interfaces__msg__UInt64MultiArray__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) { + example_interfaces__msg__UInt64MultiArray__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); + } +} + +example_interfaces__msg__UInt64MultiArray__Sequence * +example_interfaces__msg__UInt64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64MultiArray__Sequence * array = (example_interfaces__msg__UInt64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt64MultiArray__Sequence__destroy(example_interfaces__msg__UInt64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt64MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt64MultiArray__Sequence * lhs, const example_interfaces__msg__UInt64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt64MultiArray__Sequence__copy( + const example_interfaces__msg__UInt64MultiArray__Sequence * input, + example_interfaces__msg__UInt64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt64MultiArray * data = + (example_interfaces__msg__UInt64MultiArray *)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 (!example_interfaces__msg__UInt64MultiArray__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; ) { + example_interfaces__msg__UInt64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..13d1fdc75 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..f7c823695 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.h new file mode 100644 index 000000000..d0be6ebfb --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt64MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__UInt64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint64__Sequence data; +} example_interfaces__msg__UInt64MultiArray; + +// Struct for a sequence of example_interfaces__msg__UInt64MultiArray. +typedef struct example_interfaces__msg__UInt64MultiArray__Sequence +{ + example_interfaces__msg__UInt64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp new file mode 100644 index 000000000..3d36c4417 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt64MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt64MultiArray_ +{ + using Type = UInt64MultiArray_; + + explicit UInt64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt64MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt64MultiArray_ + +// alias to use template instance with default allocator +using UInt64MultiArray = + example_interfaces::msg::UInt64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp new file mode 100644 index 000000000..89f38ceca --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt64MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt64MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt64MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.c new file mode 100644 index 000000000..5ef0ca071 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int64_multi_array__functions.h" +#include "example_interfaces/msg/detail/u_int64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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; + example_interfaces__msg__UInt64MultiArray__init(message_memory); +} + +void example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt64MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__size_function__UInt64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint64__Sequence * member = + (const rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint64__Sequence * member = + (const rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint64__Sequence * member = + (rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint64_t * item = + ((const uint64_t *) + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data(untyped_member, index)); + uint64_t * value = + (uint64_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint64_t * item = + ((uint64_t *) + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data(untyped_member, index)); + const uint64_t * value = + (const uint64_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint64__Sequence * member = + (rosidl_runtime_c__uint64__Sequence *)(untyped_member); + rosidl_runtime_c__uint64__Sequence__fini(member); + return rosidl_runtime_c__uint64__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__UInt64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt64MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__size_function__UInt64MultiArray__data, // size() function pointer + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data, // get(index) function pointer + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt64MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt64MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "UInt64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__UInt64MultiArray), + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array, // message members + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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 example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt64MultiArray)() { + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp new file mode 100644 index 000000000..12287d51e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt64MultiArray.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 "example_interfaces/msg/detail/u_int64_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt64MultiArray(_init); +} + +void UInt64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt64MultiArray(); +} + +size_t size_function__UInt64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt64MultiArray__data, // size() function pointer + get_const_function__UInt64MultiArray__data, // get_const(index) function pointer + get_function__UInt64MultiArray__data, // get(index) function pointer + fetch_function__UInt64MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt64MultiArray__data, // assign(index, value) function pointer + resize_function__UInt64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "UInt64MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::UInt64MultiArray), + UInt64MultiArray_message_member_array, // message members + UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_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, example_interfaces, msg, UInt64MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.hpp new file mode 100644 index 000000000..3971fcbd1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__builder.hpp new file mode 100644 index 000000000..0c736c350 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int8__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt8_data +{ +public: + Init_UInt8_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::msg::UInt8 data(::example_interfaces::msg::UInt8::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt8 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt8>() +{ + return example_interfaces::msg::builder::Init_UInt8_data(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__functions.c new file mode 100644 index 000000000..eb41a1f25 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int8__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +example_interfaces__msg__UInt8__init(example_interfaces__msg__UInt8 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__msg__UInt8__fini(example_interfaces__msg__UInt8 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__msg__UInt8__are_equal(const example_interfaces__msg__UInt8 * lhs, const example_interfaces__msg__UInt8 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt8__copy( + const example_interfaces__msg__UInt8 * input, + example_interfaces__msg__UInt8 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__msg__UInt8 * +example_interfaces__msg__UInt8__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8 * msg = (example_interfaces__msg__UInt8 *)allocator.allocate(sizeof(example_interfaces__msg__UInt8), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt8)); + bool success = example_interfaces__msg__UInt8__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt8__destroy(example_interfaces__msg__UInt8 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt8__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt8__Sequence__init(example_interfaces__msg__UInt8__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8 * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt8 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt8), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt8__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt8__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt8__Sequence__fini(example_interfaces__msg__UInt8__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) { + example_interfaces__msg__UInt8__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); + } +} + +example_interfaces__msg__UInt8__Sequence * +example_interfaces__msg__UInt8__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8__Sequence * array = (example_interfaces__msg__UInt8__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt8__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt8__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt8__Sequence__destroy(example_interfaces__msg__UInt8__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt8__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt8__Sequence__are_equal(const example_interfaces__msg__UInt8__Sequence * lhs, const example_interfaces__msg__UInt8__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt8__Sequence__copy( + const example_interfaces__msg__UInt8__Sequence * input, + example_interfaces__msg__UInt8__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt8); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8 * data = + (example_interfaces__msg__UInt8 *)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 (!example_interfaces__msg__UInt8__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; ) { + example_interfaces__msg__UInt8__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt8__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..7c790213d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt8( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt8)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..63c8fd5d2 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int8__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt8 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt8 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt8 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt8)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.h new file mode 100644 index 000000000..34a997f21 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt8 in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, uint8. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__UInt8 +{ + uint8_t data; +} example_interfaces__msg__UInt8; + +// Struct for a sequence of example_interfaces__msg__UInt8. +typedef struct example_interfaces__msg__UInt8__Sequence +{ + example_interfaces__msg__UInt8 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt8__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.hpp new file mode 100644 index 000000000..8d6774239 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt8 __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt8 __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt8_ +{ + using Type = UInt8_; + + explicit UInt8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit UInt8_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt8_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt8_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt8 + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt8 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt8_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt8_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt8_ + +// alias to use template instance with default allocator +using UInt8 = + example_interfaces::msg::UInt8_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__traits.hpp new file mode 100644 index 000000000..728ec7145 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int8__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt8 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt8 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt8 & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt8 & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt8 & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt8"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt8"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.c new file mode 100644 index 000000000..e8f324e47 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int8__functions.h" +#include "example_interfaces/msg/detail/u_int8__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_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; + example_interfaces__msg__UInt8__init(message_memory); +} + +void example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt8__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt8, data), // 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 example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_members = { + "example_interfaces__msg", // message namespace + "UInt8", // message name + 1, // number of fields + sizeof(example_interfaces__msg__UInt8), + example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array, // message members + example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_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 example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt8)() { + if (!example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.cpp new file mode 100644 index 000000000..d7aa57133 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt8.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 "example_interfaces/msg/detail/u_int8__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt8_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt8(_init); +} + +void UInt8_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt8(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt8, data), // 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 UInt8_message_members = { + "example_interfaces::msg", // message namespace + "UInt8", // message name + 1, // number of fields + sizeof(example_interfaces::msg::UInt8), + UInt8_message_member_array, // message members + UInt8_init_function, // function to initialize message memory (memory has to be allocated) + UInt8_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt8_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt8_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8_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, example_interfaces, msg, UInt8)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.hpp new file mode 100644 index 000000000..37df668d5 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt8 +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp new file mode 100644 index 000000000..b2f71b3f4 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt8MultiArray_data +{ +public: + explicit Init_UInt8MultiArray_data(::example_interfaces::msg::UInt8MultiArray & msg) + : msg_(msg) + {} + ::example_interfaces::msg::UInt8MultiArray data(::example_interfaces::msg::UInt8MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::msg::UInt8MultiArray msg_; +}; + +class Init_UInt8MultiArray_layout +{ +public: + Init_UInt8MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt8MultiArray_data layout(::example_interfaces::msg::UInt8MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt8MultiArray_data(msg_); + } + +private: + ::example_interfaces::msg::UInt8MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::msg::UInt8MultiArray>() +{ + return example_interfaces::msg::builder::Init_UInt8MultiArray_layout(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__functions.c new file mode 100644 index 000000000..98a2331a7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice +#include "example_interfaces/msg/detail/u_int8_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +example_interfaces__msg__UInt8MultiArray__init(example_interfaces__msg__UInt8MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { + example_interfaces__msg__UInt8MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { + example_interfaces__msg__UInt8MultiArray__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__msg__UInt8MultiArray__fini(example_interfaces__msg__UInt8MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint8__Sequence__fini(&msg->data); +} + +bool +example_interfaces__msg__UInt8MultiArray__are_equal(const example_interfaces__msg__UInt8MultiArray * lhs, const example_interfaces__msg__UInt8MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +example_interfaces__msg__UInt8MultiArray__copy( + const example_interfaces__msg__UInt8MultiArray * input, + example_interfaces__msg__UInt8MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!example_interfaces__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +example_interfaces__msg__UInt8MultiArray * +example_interfaces__msg__UInt8MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8MultiArray * msg = (example_interfaces__msg__UInt8MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt8MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__msg__UInt8MultiArray)); + bool success = example_interfaces__msg__UInt8MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__msg__UInt8MultiArray__destroy(example_interfaces__msg__UInt8MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__msg__UInt8MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__msg__UInt8MultiArray__Sequence__init(example_interfaces__msg__UInt8MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8MultiArray * data = NULL; + + if (size) { + data = (example_interfaces__msg__UInt8MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt8MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__msg__UInt8MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__msg__UInt8MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__msg__UInt8MultiArray__Sequence__fini(example_interfaces__msg__UInt8MultiArray__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) { + example_interfaces__msg__UInt8MultiArray__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); + } +} + +example_interfaces__msg__UInt8MultiArray__Sequence * +example_interfaces__msg__UInt8MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8MultiArray__Sequence * array = (example_interfaces__msg__UInt8MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt8MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__msg__UInt8MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__msg__UInt8MultiArray__Sequence__destroy(example_interfaces__msg__UInt8MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__msg__UInt8MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__msg__UInt8MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt8MultiArray__Sequence * lhs, const example_interfaces__msg__UInt8MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!example_interfaces__msg__UInt8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__msg__UInt8MultiArray__Sequence__copy( + const example_interfaces__msg__UInt8MultiArray__Sequence * input, + example_interfaces__msg__UInt8MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__msg__UInt8MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__msg__UInt8MultiArray * data = + (example_interfaces__msg__UInt8MultiArray *)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 (!example_interfaces__msg__UInt8MultiArray__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; ) { + example_interfaces__msg__UInt8MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!example_interfaces__msg__UInt8MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..6d041af09 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__msg__UInt8MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__msg__UInt8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..5cecf0f30 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/msg/detail/u_int8_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::msg::UInt8MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::msg::UInt8MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::msg::UInt8MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_UInt8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.h new file mode 100644 index 000000000..8100171b0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt8MultiArray in the package example_interfaces. +/** + * This is an example of using complex datatypes. + * It is not recommended to use directly. + * To use a similar datastruct please define a custom message with appropriate semantic meaning. + */ +typedef struct example_interfaces__msg__UInt8MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + example_interfaces__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint8__Sequence data; +} example_interfaces__msg__UInt8MultiArray; + +// Struct for a sequence of example_interfaces__msg__UInt8MultiArray. +typedef struct example_interfaces__msg__UInt8MultiArray__Sequence +{ + example_interfaces__msg__UInt8MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__UInt8MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp new file mode 100644 index 000000000..250883384 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__msg__UInt8MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__msg__UInt8MultiArray __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace msg +{ + +// message struct +template +struct UInt8MultiArray_ +{ + using Type = UInt8MultiArray_; + + explicit UInt8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + example_interfaces::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const example_interfaces::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::msg::UInt8MultiArray_ *; + using ConstRawPtr = + const example_interfaces::msg::UInt8MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__msg__UInt8MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__msg__UInt8MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt8MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt8MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt8MultiArray_ + +// alias to use template instance with default allocator +using UInt8MultiArray = + example_interfaces::msg::UInt8MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp new file mode 100644 index 000000000..614d47aae --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt8MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt8MultiArray & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::UInt8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::UInt8MultiArray & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::UInt8MultiArray"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/UInt8MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.c new file mode 100644 index 000000000..a96645e3d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/u_int8_multi_array__functions.h" +#include "example_interfaces/msg/detail/u_int8_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "example_interfaces/msg/multi_array_layout.h" +// Member `layout` +#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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; + example_interfaces__msg__UInt8MultiArray__init(message_memory); +} + +void example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_fini_function(void * message_memory) +{ + example_interfaces__msg__UInt8MultiArray__fini(message_memory); +} + +size_t example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__size_function__UInt8MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt8MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[2] = { + { + "layout", // 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(example_interfaces__msg__UInt8MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__UInt8MultiArray, data), // bytes offset in struct + NULL, // default value + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__size_function__UInt8MultiArray__data, // size() function pointer + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data, // get_const(index) function pointer + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data, // get(index) function pointer + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt8MultiArray__data, // fetch(index, &value) function pointer + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt8MultiArray__data, // assign(index, value) function pointer + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt8MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members = { + "example_interfaces__msg", // message namespace + "UInt8MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces__msg__UInt8MultiArray), + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array, // message members + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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 example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle = { + 0, + &example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt8MultiArray)() { + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); + if (!example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp new file mode 100644 index 000000000..9a161218d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:msg/UInt8MultiArray.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 "example_interfaces/msg/detail/u_int8_multi_array__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 example_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt8MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::msg::UInt8MultiArray(_init); +} + +void UInt8MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt8MultiArray(); +} + +size_t size_function__UInt8MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt8MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt8MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt8MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt8MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt8MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt8MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::msg::UInt8MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt8MultiArray__data, // size() function pointer + get_const_function__UInt8MultiArray__data, // get_const(index) function pointer + get_function__UInt8MultiArray__data, // get(index) function pointer + fetch_function__UInt8MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt8MultiArray__data, // assign(index, value) function pointer + resize_function__UInt8MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8MultiArray_message_members = { + "example_interfaces::msg", // message namespace + "UInt8MultiArray", // message name + 2, // number of fields + sizeof(example_interfaces::msg::UInt8MultiArray), + UInt8MultiArray_message_member_array, // message members + UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt8MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt8MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_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, example_interfaces, msg, UInt8MultiArray)() { + return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.hpp new file mode 100644 index 000000000..7e8cdb346 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/u_int8_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + UInt8MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__builder.hpp similarity index 95% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__builder.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__builder.hpp index 60f2c7f22..f38602091 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__builder.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__builder.hpp @@ -5,11 +5,12 @@ #ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__BUILDER_HPP_ #define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__BUILDER_HPP_ -#include "example_interfaces/msg/detail/w_string__struct.hpp" -#include #include #include +#include "example_interfaces/msg/detail/w_string__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace example_interfaces { diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__functions.c similarity index 90% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__functions.c rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__functions.c index f7e61668c..4dacd5b5d 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__functions.c +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__functions.c @@ -216,22 +216,27 @@ example_interfaces__msg__WString__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__msg__WString); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__msg__WString * data = - (example_interfaces__msg__WString *)realloc(output->data, allocation_size); + (example_interfaces__msg__WString *)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 (!example_interfaces__msg__WString__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__msg__WString__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; ) { - example_interfaces__msg__WString__fini(&data[i]); + example_interfaces__msg__WString__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h index 5f5cbb1fd..eac2b2477 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_example_interfaces__msg__WString( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__msg__WString( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp index aa2e51244..982ec293a 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_WString( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.h new file mode 100644 index 000000000..38685c07e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:msg/WString.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'data' +#include "rosidl_runtime_c/u16string.h" + +/// Struct defined in msg/WString in the package example_interfaces. +/** + * This is an example message of using a primitive datatype, wstring. + * If you want to test with this that's fine, but if you are deploying + * it into a system you should create a semantically meaningful message type. + * If you want to embed it in another message, use the primitive data type instead. + */ +typedef struct example_interfaces__msg__WString +{ + rosidl_runtime_c__U16String data; +} example_interfaces__msg__WString; + +// Struct for a sequence of example_interfaces__msg__WString. +typedef struct example_interfaces__msg__WString__Sequence +{ + example_interfaces__msg__WString * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__msg__WString__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.hpp similarity index 93% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.hpp index a099c6dda..da8b226d5 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__struct.hpp @@ -5,14 +5,15 @@ #ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_HPP_ #define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__example_interfaces__msg__WString __attribute__((deprecated)) @@ -53,12 +54,12 @@ struct WString_ // field types and members using _data_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _data_type data; // setters for named parameter idiom Type & set__data( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->data = _arg; return *this; diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__traits.hpp new file mode 100644 index 000000000..256521619 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:msg/WString.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/msg/detail/w_string__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const WString & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const WString & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const WString & 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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::msg::WString & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::msg::WString & msg) +{ + return example_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::msg::WString"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/msg/WString"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.c new file mode 100644 index 000000000..0303cdb0e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.c @@ -0,0 +1,87 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:msg/WString.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/msg/detail/w_string__functions.h" +#include "example_interfaces/msg/detail/w_string__struct.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/u16string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_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; + example_interfaces__msg__WString__init(message_memory); +} + +void example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_fini_function(void * message_memory) +{ + example_interfaces__msg__WString__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__msg__WString, data), // 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 example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_members = { + "example_interfaces__msg", // message namespace + "WString", // message name + 1, // number of fields + sizeof(example_interfaces__msg__WString), + example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_member_array, // message members + example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_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 example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle = { + 0, + &example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, WString)() { + if (!example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle.typesupport_identifier) { + example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__msg__WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.cpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.cpp index 5c4f84db8..d7ced6a76 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.cpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember WString_messa 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 } }; diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.hpp new file mode 100644 index 000000000..6d5ad3316 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/detail/w_string__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:msg/WString.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + msg, + WString +)(); +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/empty.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/empty.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/empty.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/empty.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/empty.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/empty.hpp new file mode 100644 index 000000000..9f11b50f0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/empty.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ +#define EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ + +#include "example_interfaces/msg/detail/empty__struct.hpp" +#include "example_interfaces/msg/detail/empty__builder.hpp" +#include "example_interfaces/msg/detail/empty__traits.hpp" +#include "example_interfaces/msg/detail/empty__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float32.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/float32.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32.hpp new file mode 100644 index 000000000..200ab3dd1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ +#define EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ + +#include "example_interfaces/msg/detail/float32__struct.hpp" +#include "example_interfaces/msg/detail/float32__builder.hpp" +#include "example_interfaces/msg/detail/float32__traits.hpp" +#include "example_interfaces/msg/detail/float32__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float32_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/float32_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32_multi_array.hpp new file mode 100644 index 000000000..5cc7e6ce3 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/float32_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/float32_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/float32_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float64.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/float64.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64.hpp new file mode 100644 index 000000000..22073310e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ +#define EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ + +#include "example_interfaces/msg/detail/float64__struct.hpp" +#include "example_interfaces/msg/detail/float64__builder.hpp" +#include "example_interfaces/msg/detail/float64__traits.hpp" +#include "example_interfaces/msg/detail/float64__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float64_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/float64_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64_multi_array.hpp new file mode 100644 index 000000000..0ddea8673 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/float64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/float64_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/float64_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/float64_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int16.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int16.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16.hpp new file mode 100644 index 000000000..b78eedf57 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT16_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT16_HPP_ + +#include "example_interfaces/msg/detail/int16__struct.hpp" +#include "example_interfaces/msg/detail/int16__builder.hpp" +#include "example_interfaces/msg/detail/int16__traits.hpp" +#include "example_interfaces/msg/detail/int16__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT16_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int16_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int16_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16_multi_array.hpp new file mode 100644 index 000000000..9436c05c0 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int16_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/int16_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/int16_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/int16_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int32.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int32.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32.hpp new file mode 100644 index 000000000..98eaca764 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT32_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT32_HPP_ + +#include "example_interfaces/msg/detail/int32__struct.hpp" +#include "example_interfaces/msg/detail/int32__builder.hpp" +#include "example_interfaces/msg/detail/int32__traits.hpp" +#include "example_interfaces/msg/detail/int32__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int32_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int32_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32_multi_array.hpp new file mode 100644 index 000000000..eb798fb0e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/int32_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/int32_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/int32_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int64.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int64.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64.hpp new file mode 100644 index 000000000..f645a3c35 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT64_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT64_HPP_ + +#include "example_interfaces/msg/detail/int64__struct.hpp" +#include "example_interfaces/msg/detail/int64__builder.hpp" +#include "example_interfaces/msg/detail/int64__traits.hpp" +#include "example_interfaces/msg/detail/int64__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int64_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int64_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64_multi_array.hpp new file mode 100644 index 000000000..1c64c3e37 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/int64_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/int64_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/int64_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int8.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int8.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8.hpp new file mode 100644 index 000000000..88da7acf8 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT8_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT8_HPP_ + +#include "example_interfaces/msg/detail/int8__struct.hpp" +#include "example_interfaces/msg/detail/int8__builder.hpp" +#include "example_interfaces/msg/detail/int8__traits.hpp" +#include "example_interfaces/msg/detail/int8__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT8_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int8_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/int8_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8_multi_array.hpp new file mode 100644 index 000000000..b865ae261 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/int8_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/int8_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/int8_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/int8_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/multi_array_dimension.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_dimension.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/multi_array_dimension.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_dimension.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_dimension.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_dimension.hpp new file mode 100644 index 000000000..24ae56126 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_dimension.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ +#define EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ + +#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" +#include "example_interfaces/msg/detail/multi_array_dimension__builder.hpp" +#include "example_interfaces/msg/detail/multi_array_dimension__traits.hpp" +#include "example_interfaces/msg/detail/multi_array_dimension__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/multi_array_layout.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_layout.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/multi_array_layout.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_layout.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_layout.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_layout.hpp new file mode 100644 index 000000000..7f4cd4f35 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/multi_array_layout.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ +#define EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ + +#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" +#include "example_interfaces/msg/detail/multi_array_layout__builder.hpp" +#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" +#include "example_interfaces/msg/detail/multi_array_layout__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..2db806b5d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 EXAMPLE_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define EXAMPLE_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_example_interfaces __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_example_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_example_interfaces __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_example_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_example_interfaces + #define ROSIDL_GENERATOR_CPP_PUBLIC_example_interfaces ROSIDL_GENERATOR_CPP_EXPORT_example_interfaces + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_example_interfaces ROSIDL_GENERATOR_CPP_IMPORT_example_interfaces + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_example_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_example_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_example_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_example_interfaces + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/string.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/string.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/string.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/string.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/string.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/string.hpp new file mode 100644 index 000000000..c6342b86a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/string.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__STRING_HPP_ +#define EXAMPLE_INTERFACES__MSG__STRING_HPP_ + +#include "example_interfaces/msg/detail/string__struct.hpp" +#include "example_interfaces/msg/detail/string__builder.hpp" +#include "example_interfaces/msg/detail/string__traits.hpp" +#include "example_interfaces/msg/detail/string__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__STRING_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int16.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int16.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16.hpp new file mode 100644 index 000000000..248e94293 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ + +#include "example_interfaces/msg/detail/u_int16__struct.hpp" +#include "example_interfaces/msg/detail/u_int16__builder.hpp" +#include "example_interfaces/msg/detail/u_int16__traits.hpp" +#include "example_interfaces/msg/detail/u_int16__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int16_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int16_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16_multi_array.hpp new file mode 100644 index 000000000..3ad8eb9ca --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int16_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/u_int16_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/u_int16_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/u_int16_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int32.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int32.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32.hpp new file mode 100644 index 000000000..533f7362f --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ + +#include "example_interfaces/msg/detail/u_int32__struct.hpp" +#include "example_interfaces/msg/detail/u_int32__builder.hpp" +#include "example_interfaces/msg/detail/u_int32__traits.hpp" +#include "example_interfaces/msg/detail/u_int32__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int32_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int32_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32_multi_array.hpp new file mode 100644 index 000000000..850c08d14 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/u_int32_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/u_int32_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/u_int32_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int64.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int64.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64.hpp new file mode 100644 index 000000000..eedf56ee2 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ + +#include "example_interfaces/msg/detail/u_int64__struct.hpp" +#include "example_interfaces/msg/detail/u_int64__builder.hpp" +#include "example_interfaces/msg/detail/u_int64__traits.hpp" +#include "example_interfaces/msg/detail/u_int64__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int64_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int64_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64_multi_array.hpp new file mode 100644 index 000000000..e1c311599 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/u_int64_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/u_int64_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/u_int64_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int8.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int8.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8.hpp new file mode 100644 index 000000000..f2c4ef369 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ + +#include "example_interfaces/msg/detail/u_int8__struct.hpp" +#include "example_interfaces/msg/detail/u_int8__builder.hpp" +#include "example_interfaces/msg/detail/u_int8__traits.hpp" +#include "example_interfaces/msg/detail/u_int8__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int8_multi_array.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8_multi_array.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/u_int8_multi_array.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8_multi_array.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8_multi_array.hpp new file mode 100644 index 000000000..701bfd910 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/u_int8_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ +#define EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ + +#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" +#include "example_interfaces/msg/detail/u_int8_multi_array__builder.hpp" +#include "example_interfaces/msg/detail/u_int8_multi_array__traits.hpp" +#include "example_interfaces/msg/detail/u_int8_multi_array__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/w_string.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/w_string.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/msg/w_string.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/w_string.h diff --git a/ThirdParty/ros/include/example_interfaces/msg/w_string.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/w_string.hpp similarity index 86% rename from ThirdParty/ros/include/example_interfaces/msg/w_string.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/msg/w_string.hpp index 49545217b..ae934b54d 100644 --- a/ThirdParty/ros/include/example_interfaces/msg/w_string.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/msg/w_string.hpp @@ -7,5 +7,6 @@ #include "example_interfaces/msg/detail/w_string__struct.hpp" #include "example_interfaces/msg/detail/w_string__builder.hpp" #include "example_interfaces/msg/detail/w_string__traits.hpp" +#include "example_interfaces/msg/detail/w_string__type_support.hpp" #endif // EXAMPLE_INTERFACES__MSG__W_STRING_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/add_two_ints.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/add_two_ints.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/add_two_ints.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/add_two_ints.h diff --git a/ThirdParty/ros/include/example_interfaces/srv/add_two_ints.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/add_two_ints.hpp similarity index 86% rename from ThirdParty/ros/include/example_interfaces/srv/add_two_ints.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/add_two_ints.hpp index b9cf274ce..b27ebfcd6 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/add_two_ints.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/add_two_ints.hpp @@ -7,5 +7,6 @@ #include "example_interfaces/srv/detail/add_two_ints__struct.hpp" #include "example_interfaces/srv/detail/add_two_ints__builder.hpp" #include "example_interfaces/srv/detail/add_two_ints__traits.hpp" +#include "example_interfaces/srv/detail/add_two_ints__type_support.hpp" #endif // EXAMPLE_INTERFACES__SRV__ADD_TWO_INTS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__builder.hpp similarity index 97% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__builder.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__builder.hpp index 70aa1f691..2579a30a0 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__builder.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__builder.hpp @@ -5,11 +5,12 @@ #ifndef EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__BUILDER_HPP_ #define EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__BUILDER_HPP_ -#include "example_interfaces/srv/detail/add_two_ints__struct.hpp" -#include #include #include +#include "example_interfaces/srv/detail/add_two_ints__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace example_interfaces { diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__functions.c similarity index 90% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__functions.c rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__functions.c index 8640c385c..98f8580d2 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__functions.c +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__functions.c @@ -208,22 +208,27 @@ example_interfaces__srv__AddTwoInts_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__srv__AddTwoInts_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__srv__AddTwoInts_Request * data = - (example_interfaces__srv__AddTwoInts_Request *)realloc(output->data, allocation_size); + (example_interfaces__srv__AddTwoInts_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 (!example_interfaces__srv__AddTwoInts_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__srv__AddTwoInts_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; ) { - example_interfaces__srv__AddTwoInts_Request__fini(&data[i]); + example_interfaces__srv__AddTwoInts_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -428,22 +433,27 @@ example_interfaces__srv__AddTwoInts_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(example_interfaces__srv__AddTwoInts_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); example_interfaces__srv__AddTwoInts_Response * data = - (example_interfaces__srv__AddTwoInts_Response *)realloc(output->data, allocation_size); + (example_interfaces__srv__AddTwoInts_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 (!example_interfaces__srv__AddTwoInts_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!example_interfaces__srv__AddTwoInts_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; ) { - example_interfaces__srv__AddTwoInts_Response__fini(&data[i]); + example_interfaces__srv__AddTwoInts_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h index 6253812d9..ee004a833 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_example_interfaces__srv__AddTwoInts_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__srv__AddTwoInts_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_example_interfaces__srv__AddTwoInts_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces size_t max_serialized_size_example_interfaces__srv__AddTwoInts_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp index c999f3c6d..d66f654c3 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_AddTwoInts_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces max_serialized_size_AddTwoInts_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.h similarity index 91% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.h index 42bbcf649..aa7c89542 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.h +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/AddTwoInts in the package example_interfaces. +/// Struct defined in srv/AddTwoInts in the package example_interfaces. typedef struct example_interfaces__srv__AddTwoInts_Request { int64_t a; @@ -37,7 +37,7 @@ typedef struct example_interfaces__srv__AddTwoInts_Request__Sequence // Constants defined in the message -// Struct defined in srv/AddTwoInts in the package example_interfaces. +/// Struct defined in srv/AddTwoInts in the package example_interfaces. typedef struct example_interfaces__srv__AddTwoInts_Response { int64_t sum; diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.hpp similarity index 98% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.hpp index 05ec68f3b..742330c39 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__struct.hpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__struct.hpp @@ -5,14 +5,15 @@ #ifndef EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__STRUCT_HPP_ #define EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__example_interfaces__srv__AddTwoInts_Request __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__traits.hpp new file mode 100644 index 000000000..1a4d4955b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:srv/AddTwoInts.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/srv/detail/add_two_ints__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const AddTwoInts_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 << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AddTwoInts_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"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AddTwoInts_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::AddTwoInts_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::AddTwoInts_Request & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::AddTwoInts_Request"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/AddTwoInts_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const AddTwoInts_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 AddTwoInts_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 AddTwoInts_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::AddTwoInts_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::AddTwoInts_Response & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::AddTwoInts_Response"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/AddTwoInts_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::AddTwoInts"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/AddTwoInts"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.c new file mode 100644 index 000000000..aa6943dc7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.c @@ -0,0 +1,245 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:srv/AddTwoInts.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/srv/detail/add_two_ints__functions.h" +#include "example_interfaces/srv/detail/add_two_ints__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_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; + example_interfaces__srv__AddTwoInts_Request__init(message_memory); +} + +void example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_fini_function(void * message_memory) +{ + example_interfaces__srv__AddTwoInts_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_member_array[2] = { + { + "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(example_interfaces__srv__AddTwoInts_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(example_interfaces__srv__AddTwoInts_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 + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_members = { + "example_interfaces__srv", // message namespace + "AddTwoInts_Request", // message name + 2, // number of fields + sizeof(example_interfaces__srv__AddTwoInts_Request), + example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_member_array, // message members + example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_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 example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle = { + 0, + &example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Request)() { + if (!example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/srv/detail/add_two_ints__functions.h" +// already included above +// #include "example_interfaces/srv/detail/add_two_ints__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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; + example_interfaces__srv__AddTwoInts_Response__init(message_memory); +} + +void example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_fini_function(void * message_memory) +{ + example_interfaces__srv__AddTwoInts_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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(example_interfaces__srv__AddTwoInts_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 example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_members = { + "example_interfaces__srv", // message namespace + "AddTwoInts_Response", // message name + 1, // number of fields + sizeof(example_interfaces__srv__AddTwoInts_Response), + example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_member_array, // message members + example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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 example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle = { + 0, + &example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Response)() { + if (!example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "example_interfaces/srv/detail/add_two_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 example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_members = { + "example_interfaces__srv", // service namespace + "AddTwoInts", // service name + // these two fields are initialized below on the first access + NULL, // request message + // example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle, + NULL // response message + // example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle = { + 0, + &example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_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, example_interfaces, srv, AddTwoInts_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts)() { + if (!example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle.typesupport_identifier) { + example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_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, example_interfaces, srv, AddTwoInts_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, example_interfaces, srv, AddTwoInts_Response)()->data; + } + + return &example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.cpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.cpp index 032429a3b..ec85c9c27 100644 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.cpp +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddTwoInts_Re 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddTwoInts_Re 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 } }; @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AddTwoInts_Re 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 } }; diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.hpp new file mode 100644 index 000000000..40c59b4f9 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/add_two_ints__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:srv/AddTwoInts.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + AddTwoInts +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + AddTwoInts_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + AddTwoInts_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__builder.hpp new file mode 100644 index 000000000..5669d32c1 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__builder.hpp @@ -0,0 +1,114 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/srv/detail/set_bool__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace srv +{ + +namespace builder +{ + +class Init_SetBool_Request_data +{ +public: + Init_SetBool_Request_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::example_interfaces::srv::SetBool_Request data(::example_interfaces::srv::SetBool_Request::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::srv::SetBool_Request msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::srv::SetBool_Request>() +{ + return example_interfaces::srv::builder::Init_SetBool_Request_data(); +} + +} // namespace example_interfaces + + +namespace example_interfaces +{ + +namespace srv +{ + +namespace builder +{ + +class Init_SetBool_Response_message +{ +public: + explicit Init_SetBool_Response_message(::example_interfaces::srv::SetBool_Response & msg) + : msg_(msg) + {} + ::example_interfaces::srv::SetBool_Response message(::example_interfaces::srv::SetBool_Response::_message_type arg) + { + msg_.message = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::srv::SetBool_Response msg_; +}; + +class Init_SetBool_Response_success +{ +public: + Init_SetBool_Response_success() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_SetBool_Response_message success(::example_interfaces::srv::SetBool_Response::_success_type arg) + { + msg_.success = std::move(arg); + return Init_SetBool_Response_message(msg_); + } + +private: + ::example_interfaces::srv::SetBool_Response msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::srv::SetBool_Response>() +{ + return example_interfaces::srv::builder::Init_SetBool_Response_success(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__functions.c new file mode 100644 index 000000000..96be6fd9e --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__functions.c @@ -0,0 +1,483 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice +#include "example_interfaces/srv/detail/set_bool__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +bool +example_interfaces__srv__SetBool_Request__init(example_interfaces__srv__SetBool_Request * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +example_interfaces__srv__SetBool_Request__fini(example_interfaces__srv__SetBool_Request * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +example_interfaces__srv__SetBool_Request__are_equal(const example_interfaces__srv__SetBool_Request * lhs, const example_interfaces__srv__SetBool_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +example_interfaces__srv__SetBool_Request__copy( + const example_interfaces__srv__SetBool_Request * input, + example_interfaces__srv__SetBool_Request * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +example_interfaces__srv__SetBool_Request * +example_interfaces__srv__SetBool_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Request * msg = (example_interfaces__srv__SetBool_Request *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__srv__SetBool_Request)); + bool success = example_interfaces__srv__SetBool_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__srv__SetBool_Request__destroy(example_interfaces__srv__SetBool_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__srv__SetBool_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__srv__SetBool_Request__Sequence__init(example_interfaces__srv__SetBool_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Request * data = NULL; + + if (size) { + data = (example_interfaces__srv__SetBool_Request *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__SetBool_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__srv__SetBool_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__srv__SetBool_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__srv__SetBool_Request__Sequence__fini(example_interfaces__srv__SetBool_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) { + example_interfaces__srv__SetBool_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); + } +} + +example_interfaces__srv__SetBool_Request__Sequence * +example_interfaces__srv__SetBool_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Request__Sequence * array = (example_interfaces__srv__SetBool_Request__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__srv__SetBool_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__srv__SetBool_Request__Sequence__destroy(example_interfaces__srv__SetBool_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__srv__SetBool_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__srv__SetBool_Request__Sequence__are_equal(const example_interfaces__srv__SetBool_Request__Sequence * lhs, const example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__srv__SetBool_Request__Sequence__copy( + const example_interfaces__srv__SetBool_Request__Sequence * input, + example_interfaces__srv__SetBool_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__srv__SetBool_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Request * data = + (example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_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; ) { + example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +bool +example_interfaces__srv__SetBool_Response__init(example_interfaces__srv__SetBool_Response * msg) +{ + if (!msg) { + return false; + } + // success + // message + if (!rosidl_runtime_c__String__init(&msg->message)) { + example_interfaces__srv__SetBool_Response__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__srv__SetBool_Response__fini(example_interfaces__srv__SetBool_Response * msg) +{ + if (!msg) { + return; + } + // success + // message + rosidl_runtime_c__String__fini(&msg->message); +} + +bool +example_interfaces__srv__SetBool_Response__are_equal(const example_interfaces__srv__SetBool_Response * lhs, const example_interfaces__srv__SetBool_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // success + if (lhs->success != rhs->success) { + return false; + } + // message + if (!rosidl_runtime_c__String__are_equal( + &(lhs->message), &(rhs->message))) + { + return false; + } + return true; +} + +bool +example_interfaces__srv__SetBool_Response__copy( + const example_interfaces__srv__SetBool_Response * input, + example_interfaces__srv__SetBool_Response * output) +{ + if (!input || !output) { + return false; + } + // success + output->success = input->success; + // message + if (!rosidl_runtime_c__String__copy( + &(input->message), &(output->message))) + { + return false; + } + return true; +} + +example_interfaces__srv__SetBool_Response * +example_interfaces__srv__SetBool_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Response * msg = (example_interfaces__srv__SetBool_Response *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__srv__SetBool_Response)); + bool success = example_interfaces__srv__SetBool_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__srv__SetBool_Response__destroy(example_interfaces__srv__SetBool_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__srv__SetBool_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__srv__SetBool_Response__Sequence__init(example_interfaces__srv__SetBool_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Response * data = NULL; + + if (size) { + data = (example_interfaces__srv__SetBool_Response *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__SetBool_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__srv__SetBool_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__srv__SetBool_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__srv__SetBool_Response__Sequence__fini(example_interfaces__srv__SetBool_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) { + example_interfaces__srv__SetBool_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); + } +} + +example_interfaces__srv__SetBool_Response__Sequence * +example_interfaces__srv__SetBool_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Response__Sequence * array = (example_interfaces__srv__SetBool_Response__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__srv__SetBool_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__srv__SetBool_Response__Sequence__destroy(example_interfaces__srv__SetBool_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__srv__SetBool_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__srv__SetBool_Response__Sequence__are_equal(const example_interfaces__srv__SetBool_Response__Sequence * lhs, const example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__srv__SetBool_Response__Sequence__copy( + const example_interfaces__srv__SetBool_Response__Sequence * input, + example_interfaces__srv__SetBool_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__srv__SetBool_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__SetBool_Response * data = + (example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_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; ) { + example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..87b548293 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__srv__SetBool_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__srv__SetBool_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__srv__SetBool_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__srv__SetBool_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..809d2db2a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/srv/detail/set_bool__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 example_interfaces +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::srv::SetBool_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::srv::SetBool_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::srv::SetBool_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_SetBool_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "example_interfaces/srv/detail/set_bool__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 example_interfaces +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::srv::SetBool_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::srv::SetBool_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::srv::SetBool_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_SetBool_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.h new file mode 100644 index 000000000..4e4239627 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.h @@ -0,0 +1,67 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in srv/SetBool in the package example_interfaces. +typedef struct example_interfaces__srv__SetBool_Request +{ + /// e.g. for hardware enabling / disabling + bool data; +} example_interfaces__srv__SetBool_Request; + +// Struct for a sequence of example_interfaces__srv__SetBool_Request. +typedef struct example_interfaces__srv__SetBool_Request__Sequence +{ + example_interfaces__srv__SetBool_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__srv__SetBool_Request__Sequence; + + +// Constants defined in the message + +// Include directives for member types +// Member 'message' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/SetBool in the package example_interfaces. +typedef struct example_interfaces__srv__SetBool_Response +{ + /// indicate successful run of triggered service + bool success; + /// informational, e.g. for error messages + rosidl_runtime_c__String message; +} example_interfaces__srv__SetBool_Response; + +// Struct for a sequence of example_interfaces__srv__SetBool_Response. +typedef struct example_interfaces__srv__SetBool_Response__Sequence +{ + example_interfaces__srv__SetBool_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__srv__SetBool_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.hpp new file mode 100644 index 000000000..f73f9c856 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__struct.hpp @@ -0,0 +1,275 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__srv__SetBool_Request __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__srv__SetBool_Request __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace srv +{ + +// message struct +template +struct SetBool_Request_ +{ + using Type = SetBool_Request_; + + explicit SetBool_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->data = false; + } + } + + explicit SetBool_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->data = false; + } + } + + // field types and members + using _data_type = + bool; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const bool & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::srv::SetBool_Request_ *; + using ConstRawPtr = + const example_interfaces::srv::SetBool_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__srv__SetBool_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__srv__SetBool_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SetBool_Request_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const SetBool_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct SetBool_Request_ + +// alias to use template instance with default allocator +using SetBool_Request = + example_interfaces::srv::SetBool_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace example_interfaces + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__srv__SetBool_Response __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__srv__SetBool_Response __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace srv +{ + +// message struct +template +struct SetBool_Response_ +{ + using Type = SetBool_Response_; + + explicit SetBool_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->success = false; + this->message = ""; + } + } + + explicit SetBool_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : message(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->success = false; + this->message = ""; + } + } + + // field types and members + using _success_type = + bool; + _success_type success; + using _message_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _message_type message; + + // setters for named parameter idiom + Type & set__success( + const bool & _arg) + { + this->success = _arg; + return *this; + } + Type & set__message( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->message = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::srv::SetBool_Response_ *; + using ConstRawPtr = + const example_interfaces::srv::SetBool_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__srv__SetBool_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__srv__SetBool_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SetBool_Response_ & other) const + { + if (this->success != other.success) { + return false; + } + if (this->message != other.message) { + return false; + } + return true; + } + bool operator!=(const SetBool_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct SetBool_Response_ + +// alias to use template instance with default allocator +using SetBool_Response = + example_interfaces::srv::SetBool_Response_>; + +// constant definitions + +} // namespace srv + +} // namespace example_interfaces + +namespace example_interfaces +{ + +namespace srv +{ + +struct SetBool +{ + using Request = example_interfaces::srv::SetBool_Request; + using Response = example_interfaces::srv::SetBool_Response; +}; + +} // namespace srv + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__traits.hpp new file mode 100644 index 000000000..929be2f70 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/srv/detail/set_bool__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetBool_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetBool_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetBool_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::SetBool_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::SetBool_Request & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::SetBool_Request"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/SetBool_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetBool_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetBool_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetBool_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::SetBool_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::SetBool_Response & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::SetBool_Response"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/SetBool_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::SetBool"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/SetBool"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.c new file mode 100644 index 000000000..624d77e8a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.c @@ -0,0 +1,249 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/srv/detail/set_bool__functions.h" +#include "example_interfaces/srv/detail/set_bool__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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; + example_interfaces__srv__SetBool_Request__init(message_memory); +} + +void example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_fini_function(void * message_memory) +{ + example_interfaces__srv__SetBool_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__SetBool_Request, data), // 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 example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members = { + "example_interfaces__srv", // message namespace + "SetBool_Request", // message name + 1, // number of fields + sizeof(example_interfaces__srv__SetBool_Request), + example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array, // message members + example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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 example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle = { + 0, + &example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Request)() { + if (!example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/srv/detail/set_bool__functions.h" +// already included above +// #include "example_interfaces/srv/detail/set_bool__struct.h" + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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; + example_interfaces__srv__SetBool_Response__init(message_memory); +} + +void example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_fini_function(void * message_memory) +{ + example_interfaces__srv__SetBool_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__SetBool_Response, success), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__SetBool_Response, message), // 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 example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members = { + "example_interfaces__srv", // message namespace + "SetBool_Response", // message name + 2, // number of fields + sizeof(example_interfaces__srv__SetBool_Response), + example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array, // message members + example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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 example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle = { + 0, + &example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Response)() { + if (!example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "example_interfaces/srv/detail/set_bool__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 example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_members = { + "example_interfaces__srv", // service namespace + "SetBool", // service name + // these two fields are initialized below on the first access + NULL, // request message + // example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle, + NULL // response message + // example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle = { + 0, + &example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, example_interfaces, srv, SetBool_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool)() { + if (!example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier) { + example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, example_interfaces, srv, SetBool_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, example_interfaces, srv, SetBool_Response)()->data; + } + + return &example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.cpp new file mode 100644 index 000000000..d13e69a9a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.cpp @@ -0,0 +1,353 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:srv/SetBool.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 "example_interfaces/srv/detail/set_bool__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 example_interfaces +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SetBool_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::srv::SetBool_Request(_init); +} + +void SetBool_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SetBool_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Request_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::SetBool_Request, data), // 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 SetBool_Request_message_members = { + "example_interfaces::srv", // message namespace + "SetBool_Request", // message name + 1, // number of fields + sizeof(example_interfaces::srv::SetBool_Request), + SetBool_Request_message_member_array, // message members + SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) + SetBool_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SetBool_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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, example_interfaces, srv, SetBool_Request)() { + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "example_interfaces/srv/detail/set_bool__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 example_interfaces +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SetBool_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::srv::SetBool_Response(_init); +} + +void SetBool_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SetBool_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Response_message_member_array[2] = { + { + "success", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::SetBool_Response, success), // 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 + }, + { + "message", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::SetBool_Response, message), // 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 SetBool_Response_message_members = { + "example_interfaces::srv", // message namespace + "SetBool_Response", // message name + 2, // number of fields + sizeof(example_interfaces::srv::SetBool_Response), + SetBool_Response_message_member_array, // message members + SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) + SetBool_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SetBool_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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, example_interfaces, srv, SetBool_Response)() { + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "example_interfaces/srv/detail/set_bool__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 example_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 SetBool_service_members = { + "example_interfaces::srv", // service namespace + "SetBool", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t SetBool_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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( + 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< + ::example_interfaces::srv::SetBool_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< + ::example_interfaces::srv::SetBool_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, example_interfaces, srv, SetBool)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.hpp new file mode 100644 index 000000000..eb58525f7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/set_bool__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + SetBool +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + SetBool_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + SetBool_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__builder.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__builder.hpp new file mode 100644 index 000000000..20a315486 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__builder.hpp @@ -0,0 +1,94 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ + +#include +#include + +#include "example_interfaces/srv/detail/trigger__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace example_interfaces +{ + +namespace srv +{ + + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::srv::Trigger_Request>() +{ + return ::example_interfaces::srv::Trigger_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace example_interfaces + + +namespace example_interfaces +{ + +namespace srv +{ + +namespace builder +{ + +class Init_Trigger_Response_message +{ +public: + explicit Init_Trigger_Response_message(::example_interfaces::srv::Trigger_Response & msg) + : msg_(msg) + {} + ::example_interfaces::srv::Trigger_Response message(::example_interfaces::srv::Trigger_Response::_message_type arg) + { + msg_.message = std::move(arg); + return std::move(msg_); + } + +private: + ::example_interfaces::srv::Trigger_Response msg_; +}; + +class Init_Trigger_Response_success +{ +public: + Init_Trigger_Response_success() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Trigger_Response_message success(::example_interfaces::srv::Trigger_Response::_success_type arg) + { + msg_.success = std::move(arg); + return Init_Trigger_Response_message(msg_); + } + +private: + ::example_interfaces::srv::Trigger_Response msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::example_interfaces::srv::Trigger_Response>() +{ + return example_interfaces::srv::builder::Init_Trigger_Response_success(); +} + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__functions.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__functions.c new file mode 100644 index 000000000..f8e0d5d11 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__functions.c @@ -0,0 +1,483 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice +#include "example_interfaces/srv/detail/trigger__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +bool +example_interfaces__srv__Trigger_Request__init(example_interfaces__srv__Trigger_Request * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +example_interfaces__srv__Trigger_Request__fini(example_interfaces__srv__Trigger_Request * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +example_interfaces__srv__Trigger_Request__are_equal(const example_interfaces__srv__Trigger_Request * lhs, const example_interfaces__srv__Trigger_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +example_interfaces__srv__Trigger_Request__copy( + const example_interfaces__srv__Trigger_Request * input, + example_interfaces__srv__Trigger_Request * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +example_interfaces__srv__Trigger_Request * +example_interfaces__srv__Trigger_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Request * msg = (example_interfaces__srv__Trigger_Request *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__srv__Trigger_Request)); + bool success = example_interfaces__srv__Trigger_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__srv__Trigger_Request__destroy(example_interfaces__srv__Trigger_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__srv__Trigger_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__srv__Trigger_Request__Sequence__init(example_interfaces__srv__Trigger_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Request * data = NULL; + + if (size) { + data = (example_interfaces__srv__Trigger_Request *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__Trigger_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__srv__Trigger_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__srv__Trigger_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__srv__Trigger_Request__Sequence__fini(example_interfaces__srv__Trigger_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) { + example_interfaces__srv__Trigger_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); + } +} + +example_interfaces__srv__Trigger_Request__Sequence * +example_interfaces__srv__Trigger_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Request__Sequence * array = (example_interfaces__srv__Trigger_Request__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__srv__Trigger_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__srv__Trigger_Request__Sequence__destroy(example_interfaces__srv__Trigger_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__srv__Trigger_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__srv__Trigger_Request__Sequence__are_equal(const example_interfaces__srv__Trigger_Request__Sequence * lhs, const example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__srv__Trigger_Request__Sequence__copy( + const example_interfaces__srv__Trigger_Request__Sequence * input, + example_interfaces__srv__Trigger_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__srv__Trigger_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Request * data = + (example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_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; ) { + example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +bool +example_interfaces__srv__Trigger_Response__init(example_interfaces__srv__Trigger_Response * msg) +{ + if (!msg) { + return false; + } + // success + // message + if (!rosidl_runtime_c__String__init(&msg->message)) { + example_interfaces__srv__Trigger_Response__fini(msg); + return false; + } + return true; +} + +void +example_interfaces__srv__Trigger_Response__fini(example_interfaces__srv__Trigger_Response * msg) +{ + if (!msg) { + return; + } + // success + // message + rosidl_runtime_c__String__fini(&msg->message); +} + +bool +example_interfaces__srv__Trigger_Response__are_equal(const example_interfaces__srv__Trigger_Response * lhs, const example_interfaces__srv__Trigger_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // success + if (lhs->success != rhs->success) { + return false; + } + // message + if (!rosidl_runtime_c__String__are_equal( + &(lhs->message), &(rhs->message))) + { + return false; + } + return true; +} + +bool +example_interfaces__srv__Trigger_Response__copy( + const example_interfaces__srv__Trigger_Response * input, + example_interfaces__srv__Trigger_Response * output) +{ + if (!input || !output) { + return false; + } + // success + output->success = input->success; + // message + if (!rosidl_runtime_c__String__copy( + &(input->message), &(output->message))) + { + return false; + } + return true; +} + +example_interfaces__srv__Trigger_Response * +example_interfaces__srv__Trigger_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Response * msg = (example_interfaces__srv__Trigger_Response *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(example_interfaces__srv__Trigger_Response)); + bool success = example_interfaces__srv__Trigger_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +example_interfaces__srv__Trigger_Response__destroy(example_interfaces__srv__Trigger_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + example_interfaces__srv__Trigger_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +example_interfaces__srv__Trigger_Response__Sequence__init(example_interfaces__srv__Trigger_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Response * data = NULL; + + if (size) { + data = (example_interfaces__srv__Trigger_Response *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__Trigger_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = example_interfaces__srv__Trigger_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + example_interfaces__srv__Trigger_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +example_interfaces__srv__Trigger_Response__Sequence__fini(example_interfaces__srv__Trigger_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) { + example_interfaces__srv__Trigger_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); + } +} + +example_interfaces__srv__Trigger_Response__Sequence * +example_interfaces__srv__Trigger_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Response__Sequence * array = (example_interfaces__srv__Trigger_Response__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = example_interfaces__srv__Trigger_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +example_interfaces__srv__Trigger_Response__Sequence__destroy(example_interfaces__srv__Trigger_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + example_interfaces__srv__Trigger_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +example_interfaces__srv__Trigger_Response__Sequence__are_equal(const example_interfaces__srv__Trigger_Response__Sequence * lhs, const example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +example_interfaces__srv__Trigger_Response__Sequence__copy( + const example_interfaces__srv__Trigger_Response__Sequence * input, + example_interfaces__srv__Trigger_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(example_interfaces__srv__Trigger_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + example_interfaces__srv__Trigger_Response * data = + (example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_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; ) { + example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__functions.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__functions.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/trigger__functions.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__functions.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..88c9c9b1b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__srv__Trigger_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__srv__Trigger_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t get_serialized_size_example_interfaces__srv__Trigger_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +size_t max_serialized_size_example_interfaces__srv__Trigger_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..2b4506226 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "example_interfaces/srv/detail/trigger__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 example_interfaces +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::srv::Trigger_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::srv::Trigger_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::srv::Trigger_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Trigger_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "example_interfaces/srv/detail/trigger__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 example_interfaces +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_serialize( + const example_interfaces::srv::Trigger_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + example_interfaces::srv::Trigger_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +get_serialized_size( + const example_interfaces::srv::Trigger_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +max_serialized_size_Trigger_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace example_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger)(); + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.h new file mode 100644 index 000000000..bd6e91f2a --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.h @@ -0,0 +1,66 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in srv/Trigger in the package example_interfaces. +typedef struct example_interfaces__srv__Trigger_Request +{ + uint8_t structure_needs_at_least_one_member; +} example_interfaces__srv__Trigger_Request; + +// Struct for a sequence of example_interfaces__srv__Trigger_Request. +typedef struct example_interfaces__srv__Trigger_Request__Sequence +{ + example_interfaces__srv__Trigger_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__srv__Trigger_Request__Sequence; + + +// Constants defined in the message + +// Include directives for member types +// Member 'message' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/Trigger in the package example_interfaces. +typedef struct example_interfaces__srv__Trigger_Response +{ + /// indicate successful run of triggered service + bool success; + /// informational, e.g. for error messages. + rosidl_runtime_c__String message; +} example_interfaces__srv__Trigger_Response; + +// Struct for a sequence of example_interfaces__srv__Trigger_Response. +typedef struct example_interfaces__srv__Trigger_Response__Sequence +{ + example_interfaces__srv__Trigger_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} example_interfaces__srv__Trigger_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.hpp new file mode 100644 index 000000000..30fd922b7 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__struct.hpp @@ -0,0 +1,268 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__srv__Trigger_Request __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__srv__Trigger_Request __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace srv +{ + +// message struct +template +struct Trigger_Request_ +{ + using Type = Trigger_Request_; + + explicit Trigger_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->structure_needs_at_least_one_member = 0; + } + } + + explicit Trigger_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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::srv::Trigger_Request_ *; + using ConstRawPtr = + const example_interfaces::srv::Trigger_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__srv__Trigger_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__srv__Trigger_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Trigger_Request_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Trigger_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct Trigger_Request_ + +// alias to use template instance with default allocator +using Trigger_Request = + example_interfaces::srv::Trigger_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace example_interfaces + + +#ifndef _WIN32 +# define DEPRECATED__example_interfaces__srv__Trigger_Response __attribute__((deprecated)) +#else +# define DEPRECATED__example_interfaces__srv__Trigger_Response __declspec(deprecated) +#endif + +namespace example_interfaces +{ + +namespace srv +{ + +// message struct +template +struct Trigger_Response_ +{ + using Type = Trigger_Response_; + + explicit Trigger_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->success = false; + this->message = ""; + } + } + + explicit Trigger_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : message(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->success = false; + this->message = ""; + } + } + + // field types and members + using _success_type = + bool; + _success_type success; + using _message_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _message_type message; + + // setters for named parameter idiom + Type & set__success( + const bool & _arg) + { + this->success = _arg; + return *this; + } + Type & set__message( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->message = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + example_interfaces::srv::Trigger_Response_ *; + using ConstRawPtr = + const example_interfaces::srv::Trigger_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__example_interfaces__srv__Trigger_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__example_interfaces__srv__Trigger_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Trigger_Response_ & other) const + { + if (this->success != other.success) { + return false; + } + if (this->message != other.message) { + return false; + } + return true; + } + bool operator!=(const Trigger_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct Trigger_Response_ + +// alias to use template instance with default allocator +using Trigger_Response = + example_interfaces::srv::Trigger_Response_>; + +// constant definitions + +} // namespace srv + +} // namespace example_interfaces + +namespace example_interfaces +{ + +namespace srv +{ + +struct Trigger +{ + using Request = example_interfaces::srv::Trigger_Request; + using Response = example_interfaces::srv::Trigger_Response; +}; + +} // namespace srv + +} // namespace example_interfaces + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__traits.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__traits.hpp new file mode 100644 index 000000000..fa679f506 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__traits.hpp @@ -0,0 +1,262 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "example_interfaces/srv/detail/trigger__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Trigger_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Trigger_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Trigger_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::Trigger_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::Trigger_Request & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::Trigger_Request"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/Trigger_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace example_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Trigger_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Trigger_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Trigger_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 example_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use example_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const example_interfaces::srv::Trigger_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + example_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use example_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const example_interfaces::srv::Trigger_Response & msg) +{ + return example_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::Trigger_Response"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/Trigger_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "example_interfaces::srv::Trigger"; +} + +template<> +inline const char * name() +{ + return "example_interfaces/srv/Trigger"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.c b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.c new file mode 100644 index 000000000..b4377af79 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.c @@ -0,0 +1,249 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#include +#include "example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h" +#include "example_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 "example_interfaces/srv/detail/trigger__functions.h" +#include "example_interfaces/srv/detail/trigger__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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; + example_interfaces__srv__Trigger_Request__init(message_memory); +} + +void example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_fini_function(void * message_memory) +{ + example_interfaces__srv__Trigger_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__Trigger_Request, structure_needs_at_least_one_member), // 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 example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members = { + "example_interfaces__srv", // message namespace + "Trigger_Request", // message name + 1, // number of fields + sizeof(example_interfaces__srv__Trigger_Request), + example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array, // message members + example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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 example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle = { + 0, + &example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Request)() { + if (!example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h" +// already included above +// #include "example_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 "example_interfaces/srv/detail/trigger__functions.h" +// already included above +// #include "example_interfaces/srv/detail/trigger__struct.h" + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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; + example_interfaces__srv__Trigger_Response__init(message_memory); +} + +void example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_fini_function(void * message_memory) +{ + example_interfaces__srv__Trigger_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__Trigger_Response, success), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces__srv__Trigger_Response, message), // 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 example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members = { + "example_interfaces__srv", // message namespace + "Trigger_Response", // message name + 2, // number of fields + sizeof(example_interfaces__srv__Trigger_Response), + example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array, // message members + example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) + example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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 example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle = { + 0, + &example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Response)() { + if (!example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier) { + example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &example_interfaces__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "example_interfaces/srv/detail/trigger__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 example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_members = { + "example_interfaces__srv", // service namespace + "Trigger", // service name + // these two fields are initialized below on the first access + NULL, // request message + // example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle, + NULL // response message + // example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle = { + 0, + &example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, example_interfaces, srv, Trigger_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger)() { + if (!example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier) { + example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, example_interfaces, srv, Trigger_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, example_interfaces, srv, Trigger_Response)()->data; + } + + return &example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.cpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.cpp new file mode 100644 index 000000000..a19e8019d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.cpp @@ -0,0 +1,353 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from example_interfaces:srv/Trigger.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 "example_interfaces/srv/detail/trigger__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 example_interfaces +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Trigger_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::srv::Trigger_Request(_init); +} + +void Trigger_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Trigger_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::Trigger_Request, structure_needs_at_least_one_member), // 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 Trigger_Request_message_members = { + "example_interfaces::srv", // message namespace + "Trigger_Request", // message name + 1, // number of fields + sizeof(example_interfaces::srv::Trigger_Request), + Trigger_Request_message_member_array, // message members + Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) + Trigger_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Trigger_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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, example_interfaces, srv, Trigger_Request)() { + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "example_interfaces/srv/detail/trigger__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 example_interfaces +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Trigger_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) example_interfaces::srv::Trigger_Response(_init); +} + +void Trigger_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Trigger_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Response_message_member_array[2] = { + { + "success", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::Trigger_Response, success), // 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 + }, + { + "message", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(example_interfaces::srv::Trigger_Response, message), // 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 Trigger_Response_message_members = { + "example_interfaces::srv", // message namespace + "Trigger_Response", // message name + 2, // number of fields + sizeof(example_interfaces::srv::Trigger_Response), + Trigger_Response_message_member_array, // message members + Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) + Trigger_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Trigger_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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, example_interfaces, srv, Trigger_Response)() { + return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "example_interfaces/srv/detail/trigger__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 example_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 Trigger_service_members = { + "example_interfaces::srv", // service namespace + "Trigger", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t Trigger_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace example_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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( + 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< + ::example_interfaces::srv::Trigger_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< + ::example_interfaces::srv::Trigger_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, example_interfaces, srv, Trigger)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.hpp new file mode 100644 index 000000000..92fad016d --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/detail/trigger__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from example_interfaces:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ +#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "example_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_example_interfaces +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + Trigger +)(); +#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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + Trigger_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_example_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + example_interfaces, + srv, + Trigger_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/set_bool.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/set_bool.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/set_bool.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/set_bool.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/set_bool.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/set_bool.hpp new file mode 100644 index 000000000..deefaed42 --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/set_bool.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ +#define EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ + +#include "example_interfaces/srv/detail/set_bool__struct.hpp" +#include "example_interfaces/srv/detail/set_bool__builder.hpp" +#include "example_interfaces/srv/detail/set_bool__traits.hpp" +#include "example_interfaces/srv/detail/set_bool__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/trigger.h b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/trigger.h similarity index 100% rename from ThirdParty/ros/include/example_interfaces/srv/trigger.h rename to ThirdParty/ros/include/example_interfaces/example_interfaces/srv/trigger.h diff --git a/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/trigger.hpp b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/trigger.hpp new file mode 100644 index 000000000..a5864749b --- /dev/null +++ b/ThirdParty/ros/include/example_interfaces/example_interfaces/srv/trigger.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ +#define EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ + +#include "example_interfaces/srv/detail/trigger__struct.hpp" +#include "example_interfaces/srv/detail/trigger__builder.hpp" +#include "example_interfaces/srv/detail/trigger__traits.hpp" +#include "example_interfaces/srv/detail/trigger__type_support.hpp" + +#endif // EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/bool.hpp b/ThirdParty/ros/include/example_interfaces/msg/bool.hpp deleted file mode 100644 index 22ee21024..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/bool.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__BOOL_HPP_ -#define EXAMPLE_INTERFACES__MSG__BOOL_HPP_ - -#include "example_interfaces/msg/detail/bool__struct.hpp" -#include "example_interfaces/msg/detail/bool__builder.hpp" -#include "example_interfaces/msg/detail/bool__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__BOOL_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/byte.hpp b/ThirdParty/ros/include/example_interfaces/msg/byte.hpp deleted file mode 100644 index 15e1a355a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/byte.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__BYTE_HPP_ -#define EXAMPLE_INTERFACES__MSG__BYTE_HPP_ - -#include "example_interfaces/msg/detail/byte__struct.hpp" -#include "example_interfaces/msg/detail/byte__builder.hpp" -#include "example_interfaces/msg/detail/byte__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__BYTE_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/byte_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/byte_multi_array.hpp deleted file mode 100644 index 5b0b79f41..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/byte_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/byte_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/byte_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__BYTE_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/char.hpp b/ThirdParty/ros/include/example_interfaces/msg/char.hpp deleted file mode 100644 index 37070d973..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/char.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__CHAR_HPP_ -#define EXAMPLE_INTERFACES__MSG__CHAR_HPP_ - -#include "example_interfaces/msg/detail/char__struct.hpp" -#include "example_interfaces/msg/detail/char__builder.hpp" -#include "example_interfaces/msg/detail/char__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__CHAR_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__builder.hpp deleted file mode 100644 index 903d72e7d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/bool__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Bool_data -{ -public: - Init_Bool_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Bool data(::example_interfaces::msg::Bool::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Bool msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Bool>() -{ - return example_interfaces::msg::builder::Init_Bool_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__functions.c deleted file mode 100644 index 847b079d8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/bool__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Bool__init(example_interfaces__msg__Bool * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Bool__fini(example_interfaces__msg__Bool * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Bool__are_equal(const example_interfaces__msg__Bool * lhs, const example_interfaces__msg__Bool * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Bool__copy( - const example_interfaces__msg__Bool * input, - example_interfaces__msg__Bool * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Bool * -example_interfaces__msg__Bool__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Bool * msg = (example_interfaces__msg__Bool *)allocator.allocate(sizeof(example_interfaces__msg__Bool), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Bool)); - bool success = example_interfaces__msg__Bool__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Bool__destroy(example_interfaces__msg__Bool * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Bool__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Bool__Sequence__init(example_interfaces__msg__Bool__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Bool * data = NULL; - - if (size) { - data = (example_interfaces__msg__Bool *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Bool), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Bool__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Bool__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Bool__Sequence__fini(example_interfaces__msg__Bool__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) { - example_interfaces__msg__Bool__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); - } -} - -example_interfaces__msg__Bool__Sequence * -example_interfaces__msg__Bool__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Bool__Sequence * array = (example_interfaces__msg__Bool__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Bool__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Bool__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Bool__Sequence__destroy(example_interfaces__msg__Bool__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Bool__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Bool__Sequence__are_equal(const example_interfaces__msg__Bool__Sequence * lhs, const example_interfaces__msg__Bool__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Bool__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Bool__Sequence__copy( - const example_interfaces__msg__Bool__Sequence * input, - example_interfaces__msg__Bool__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Bool); - example_interfaces__msg__Bool * data = - (example_interfaces__msg__Bool *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Bool__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Bool__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Bool__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index d8b821826..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Bool( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Bool( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Bool)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 0ba995cf9..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/bool__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Bool & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Bool & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Bool & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Bool( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Bool)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.h deleted file mode 100644 index faaeaf3d2..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Bool in the package example_interfaces. -typedef struct example_interfaces__msg__Bool -{ - bool data; -} example_interfaces__msg__Bool; - -// Struct for a sequence of example_interfaces__msg__Bool. -typedef struct example_interfaces__msg__Bool__Sequence -{ - example_interfaces__msg__Bool * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Bool__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.hpp deleted file mode 100644 index 633d7477b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Bool __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Bool __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Bool_ -{ - using Type = Bool_; - - explicit Bool_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = false; - } - } - - explicit Bool_(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->data = false; - } - } - - // field types and members - using _data_type = - bool; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const bool & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Bool_ *; - using ConstRawPtr = - const example_interfaces::msg::Bool_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Bool - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Bool - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Bool_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Bool_ & other) const - { - return !this->operator==(other); - } -}; // struct Bool_ - -// alias to use template instance with default allocator -using Bool = - example_interfaces::msg::Bool_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__traits.hpp deleted file mode 100644 index bb481fef3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/bool__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Bool"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Bool"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.c deleted file mode 100644 index 286da166a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Bool.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/bool__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/bool__functions.h" -#include "example_interfaces/msg/detail/bool__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Bool__rosidl_typesupport_introspection_c__Bool_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; - example_interfaces__msg__Bool__init(message_memory); -} - -void Bool__rosidl_typesupport_introspection_c__Bool_fini_function(void * message_memory) -{ - example_interfaces__msg__Bool__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Bool__rosidl_typesupport_introspection_c__Bool_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Bool, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Bool__rosidl_typesupport_introspection_c__Bool_message_members = { - "example_interfaces__msg", // message namespace - "Bool", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Bool), - Bool__rosidl_typesupport_introspection_c__Bool_message_member_array, // message members - Bool__rosidl_typesupport_introspection_c__Bool_init_function, // function to initialize message memory (memory has to be allocated) - Bool__rosidl_typesupport_introspection_c__Bool_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 Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle = { - 0, - &Bool__rosidl_typesupport_introspection_c__Bool_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Bool)() { - if (!Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier) { - Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.cpp deleted file mode 100644 index 57786c0c4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/bool__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Bool.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 "example_interfaces/msg/detail/bool__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Bool_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Bool(_init); -} - -void Bool_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Bool(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Bool_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Bool, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Bool_message_members = { - "example_interfaces::msg", // message namespace - "Bool", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Bool), - Bool_message_member_array, // message members - Bool_init_function, // function to initialize message memory (memory has to be allocated) - Bool_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Bool_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Bool_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Bool_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, example_interfaces, msg, Bool)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Bool_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__builder.hpp deleted file mode 100644 index 038343f91..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/byte__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Byte_data -{ -public: - Init_Byte_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Byte data(::example_interfaces::msg::Byte::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Byte msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Byte>() -{ - return example_interfaces::msg::builder::Init_Byte_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__functions.c deleted file mode 100644 index e97f8d3c3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/byte__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Byte__init(example_interfaces__msg__Byte * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Byte__fini(example_interfaces__msg__Byte * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Byte__are_equal(const example_interfaces__msg__Byte * lhs, const example_interfaces__msg__Byte * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Byte__copy( - const example_interfaces__msg__Byte * input, - example_interfaces__msg__Byte * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Byte * -example_interfaces__msg__Byte__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Byte * msg = (example_interfaces__msg__Byte *)allocator.allocate(sizeof(example_interfaces__msg__Byte), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Byte)); - bool success = example_interfaces__msg__Byte__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Byte__destroy(example_interfaces__msg__Byte * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Byte__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Byte__Sequence__init(example_interfaces__msg__Byte__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Byte * data = NULL; - - if (size) { - data = (example_interfaces__msg__Byte *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Byte), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Byte__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Byte__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Byte__Sequence__fini(example_interfaces__msg__Byte__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) { - example_interfaces__msg__Byte__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); - } -} - -example_interfaces__msg__Byte__Sequence * -example_interfaces__msg__Byte__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Byte__Sequence * array = (example_interfaces__msg__Byte__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Byte__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Byte__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Byte__Sequence__destroy(example_interfaces__msg__Byte__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Byte__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Byte__Sequence__are_equal(const example_interfaces__msg__Byte__Sequence * lhs, const example_interfaces__msg__Byte__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Byte__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Byte__Sequence__copy( - const example_interfaces__msg__Byte__Sequence * input, - example_interfaces__msg__Byte__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Byte); - example_interfaces__msg__Byte * data = - (example_interfaces__msg__Byte *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Byte__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Byte__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Byte__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index a0a8a4bd6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Byte( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Byte( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Byte)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1c028992c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/byte__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Byte & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Byte & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Byte & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Byte( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Byte)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.h deleted file mode 100644 index 604bdd35f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Byte in the package example_interfaces. -typedef struct example_interfaces__msg__Byte -{ - uint8_t data; -} example_interfaces__msg__Byte; - -// Struct for a sequence of example_interfaces__msg__Byte. -typedef struct example_interfaces__msg__Byte__Sequence -{ - example_interfaces__msg__Byte * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Byte__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.hpp deleted file mode 100644 index e9d79fb84..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Byte __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Byte __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Byte_ -{ - using Type = Byte_; - - explicit Byte_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Byte_(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->data = 0; - } - } - - // field types and members - using _data_type = - unsigned char; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const unsigned char & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Byte_ *; - using ConstRawPtr = - const example_interfaces::msg::Byte_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Byte - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Byte - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Byte_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Byte_ & other) const - { - return !this->operator==(other); - } -}; // struct Byte_ - -// alias to use template instance with default allocator -using Byte = - example_interfaces::msg::Byte_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__traits.hpp deleted file mode 100644 index 4e80bfad0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/byte__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Byte"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Byte"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.c deleted file mode 100644 index 301d230ce..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Byte.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/byte__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/byte__functions.h" -#include "example_interfaces/msg/detail/byte__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Byte__rosidl_typesupport_introspection_c__Byte_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; - example_interfaces__msg__Byte__init(message_memory); -} - -void Byte__rosidl_typesupport_introspection_c__Byte_fini_function(void * message_memory) -{ - example_interfaces__msg__Byte__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Byte__rosidl_typesupport_introspection_c__Byte_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Byte, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Byte__rosidl_typesupport_introspection_c__Byte_message_members = { - "example_interfaces__msg", // message namespace - "Byte", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Byte), - Byte__rosidl_typesupport_introspection_c__Byte_message_member_array, // message members - Byte__rosidl_typesupport_introspection_c__Byte_init_function, // function to initialize message memory (memory has to be allocated) - Byte__rosidl_typesupport_introspection_c__Byte_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 Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle = { - 0, - &Byte__rosidl_typesupport_introspection_c__Byte_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Byte)() { - if (!Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier) { - Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.cpp deleted file mode 100644 index 46e3515c2..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Byte.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 "example_interfaces/msg/detail/byte__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Byte_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Byte(_init); -} - -void Byte_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Byte(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Byte_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Byte, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Byte_message_members = { - "example_interfaces::msg", // message namespace - "Byte", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Byte), - Byte_message_member_array, // message members - Byte_init_function, // function to initialize message memory (memory has to be allocated) - Byte_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Byte_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Byte_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Byte_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, example_interfaces, msg, Byte)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Byte_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__builder.hpp deleted file mode 100644 index 4c65c73d5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_ByteMultiArray_data -{ -public: - explicit Init_ByteMultiArray_data(::example_interfaces::msg::ByteMultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::ByteMultiArray data(::example_interfaces::msg::ByteMultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::ByteMultiArray msg_; -}; - -class Init_ByteMultiArray_layout -{ -public: - Init_ByteMultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_ByteMultiArray_data layout(::example_interfaces::msg::ByteMultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_ByteMultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::ByteMultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::ByteMultiArray>() -{ - return example_interfaces::msg::builder::Init_ByteMultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__functions.c deleted file mode 100644 index d599b587b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/byte_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__ByteMultiArray__init(example_interfaces__msg__ByteMultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__ByteMultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__ByteMultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__ByteMultiArray__fini(example_interfaces__msg__ByteMultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__octet__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__ByteMultiArray__are_equal(const example_interfaces__msg__ByteMultiArray * lhs, const example_interfaces__msg__ByteMultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__ByteMultiArray__copy( - const example_interfaces__msg__ByteMultiArray * input, - example_interfaces__msg__ByteMultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__ByteMultiArray * -example_interfaces__msg__ByteMultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__ByteMultiArray * msg = (example_interfaces__msg__ByteMultiArray *)allocator.allocate(sizeof(example_interfaces__msg__ByteMultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__ByteMultiArray)); - bool success = example_interfaces__msg__ByteMultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__ByteMultiArray__destroy(example_interfaces__msg__ByteMultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__ByteMultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__ByteMultiArray__Sequence__init(example_interfaces__msg__ByteMultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__ByteMultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__ByteMultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__ByteMultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__ByteMultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__ByteMultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__ByteMultiArray__Sequence__fini(example_interfaces__msg__ByteMultiArray__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) { - example_interfaces__msg__ByteMultiArray__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); - } -} - -example_interfaces__msg__ByteMultiArray__Sequence * -example_interfaces__msg__ByteMultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__ByteMultiArray__Sequence * array = (example_interfaces__msg__ByteMultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__ByteMultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__ByteMultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__ByteMultiArray__Sequence__destroy(example_interfaces__msg__ByteMultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__ByteMultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__ByteMultiArray__Sequence__are_equal(const example_interfaces__msg__ByteMultiArray__Sequence * lhs, const example_interfaces__msg__ByteMultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__ByteMultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__ByteMultiArray__Sequence__copy( - const example_interfaces__msg__ByteMultiArray__Sequence * input, - example_interfaces__msg__ByteMultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__ByteMultiArray); - example_interfaces__msg__ByteMultiArray * data = - (example_interfaces__msg__ByteMultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__ByteMultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__ByteMultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__ByteMultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index fe5b0bac4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__ByteMultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__ByteMultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, ByteMultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 898886cc3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/byte_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::ByteMultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::ByteMultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::ByteMultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_ByteMultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, ByteMultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.h deleted file mode 100644 index 5d9295436..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/ByteMultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__ByteMultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__octet__Sequence data; -} example_interfaces__msg__ByteMultiArray; - -// Struct for a sequence of example_interfaces__msg__ByteMultiArray. -typedef struct example_interfaces__msg__ByteMultiArray__Sequence -{ - example_interfaces__msg__ByteMultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__ByteMultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.hpp deleted file mode 100644 index df0e89173..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__ByteMultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__ByteMultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct ByteMultiArray_ -{ - using Type = ByteMultiArray_; - - explicit ByteMultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit ByteMultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::ByteMultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::ByteMultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__ByteMultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__ByteMultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const ByteMultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const ByteMultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct ByteMultiArray_ - -// alias to use template instance with default allocator -using ByteMultiArray = - example_interfaces::msg::ByteMultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__traits.hpp deleted file mode 100644 index 07a61fbb4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/byte_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::ByteMultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/ByteMultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.c deleted file mode 100644 index 1d26697ba..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/byte_multi_array__functions.h" -#include "example_interfaces/msg/detail/byte_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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; - example_interfaces__msg__ByteMultiArray__init(message_memory); -} - -void ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__ByteMultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__ByteMultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__ByteMultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members = { - "example_interfaces__msg", // message namespace - "ByteMultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__ByteMultiArray), - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array, // message members - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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 ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle = { - 0, - &ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, ByteMultiArray)() { - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier) { - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.cpp deleted file mode 100644 index 5bc15006e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/byte_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/ByteMultiArray.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 "example_interfaces/msg/detail/byte_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void ByteMultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::ByteMultiArray(_init); -} - -void ByteMultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~ByteMultiArray(); -} - -size_t size_function__ByteMultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ByteMultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ByteMultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ByteMultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember ByteMultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::ByteMultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::ByteMultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__ByteMultiArray__data, // size() function pointer - get_const_function__ByteMultiArray__data, // get_const(index) function pointer - get_function__ByteMultiArray__data, // get(index) function pointer - resize_function__ByteMultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers ByteMultiArray_message_members = { - "example_interfaces::msg", // message namespace - "ByteMultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::ByteMultiArray), - ByteMultiArray_message_member_array, // message members - ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) - ByteMultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t ByteMultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &ByteMultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_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, example_interfaces, msg, ByteMultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/char__builder.hpp deleted file mode 100644 index f416bb737..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/char__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Char_data -{ -public: - Init_Char_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Char data(::example_interfaces::msg::Char::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Char msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Char>() -{ - return example_interfaces::msg::builder::Init_Char_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/char__functions.c deleted file mode 100644 index 90554b427..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/char__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Char__init(example_interfaces__msg__Char * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Char__fini(example_interfaces__msg__Char * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Char__are_equal(const example_interfaces__msg__Char * lhs, const example_interfaces__msg__Char * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Char__copy( - const example_interfaces__msg__Char * input, - example_interfaces__msg__Char * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Char * -example_interfaces__msg__Char__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Char * msg = (example_interfaces__msg__Char *)allocator.allocate(sizeof(example_interfaces__msg__Char), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Char)); - bool success = example_interfaces__msg__Char__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Char__destroy(example_interfaces__msg__Char * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Char__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Char__Sequence__init(example_interfaces__msg__Char__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Char * data = NULL; - - if (size) { - data = (example_interfaces__msg__Char *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Char), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Char__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Char__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Char__Sequence__fini(example_interfaces__msg__Char__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) { - example_interfaces__msg__Char__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); - } -} - -example_interfaces__msg__Char__Sequence * -example_interfaces__msg__Char__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Char__Sequence * array = (example_interfaces__msg__Char__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Char__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Char__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Char__Sequence__destroy(example_interfaces__msg__Char__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Char__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Char__Sequence__are_equal(const example_interfaces__msg__Char__Sequence * lhs, const example_interfaces__msg__Char__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Char__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Char__Sequence__copy( - const example_interfaces__msg__Char__Sequence * input, - example_interfaces__msg__Char__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Char); - example_interfaces__msg__Char * data = - (example_interfaces__msg__Char *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Char__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Char__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Char__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 8c885184d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Char( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Char( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Char)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 9a53456bf..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/char__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Char & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Char & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Char & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Char( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Char)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.h deleted file mode 100644 index 125ab1172..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Char in the package example_interfaces. -typedef struct example_interfaces__msg__Char -{ - uint8_t data; -} example_interfaces__msg__Char; - -// Struct for a sequence of example_interfaces__msg__Char. -typedef struct example_interfaces__msg__Char__Sequence -{ - example_interfaces__msg__Char * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Char__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.hpp deleted file mode 100644 index 16027a162..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Char __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Char __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Char_ -{ - using Type = Char_; - - explicit Char_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Char_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Char_ *; - using ConstRawPtr = - const example_interfaces::msg::Char_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Char - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Char - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Char_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Char_ & other) const - { - return !this->operator==(other); - } -}; // struct Char_ - -// alias to use template instance with default allocator -using Char = - example_interfaces::msg::Char_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/char__traits.hpp deleted file mode 100644 index 80e48f99d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/char__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Char"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Char"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__CHAR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.c deleted file mode 100644 index e097c3029..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Char.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/char__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/char__functions.h" -#include "example_interfaces/msg/detail/char__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Char__rosidl_typesupport_introspection_c__Char_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; - example_interfaces__msg__Char__init(message_memory); -} - -void Char__rosidl_typesupport_introspection_c__Char_fini_function(void * message_memory) -{ - example_interfaces__msg__Char__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Char__rosidl_typesupport_introspection_c__Char_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Char, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Char__rosidl_typesupport_introspection_c__Char_message_members = { - "example_interfaces__msg", // message namespace - "Char", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Char), - Char__rosidl_typesupport_introspection_c__Char_message_member_array, // message members - Char__rosidl_typesupport_introspection_c__Char_init_function, // function to initialize message memory (memory has to be allocated) - Char__rosidl_typesupport_introspection_c__Char_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 Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle = { - 0, - &Char__rosidl_typesupport_introspection_c__Char_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Char)() { - if (!Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier) { - Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.cpp deleted file mode 100644 index fd68c972b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/char__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Char.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 "example_interfaces/msg/detail/char__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Char_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Char(_init); -} - -void Char_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Char(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Char_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Char, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Char_message_members = { - "example_interfaces::msg", // message namespace - "Char", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Char), - Char_message_member_array, // message members - Char_init_function, // function to initialize message memory (memory has to be allocated) - Char_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Char_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Char_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Char_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, example_interfaces, msg, Char)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Char_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__builder.hpp deleted file mode 100644 index 44c78660e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__builder.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/empty__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Empty>() -{ - return ::example_interfaces::msg::Empty(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__functions.c deleted file mode 100644 index 0980f77ba..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/empty__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Empty__init(example_interfaces__msg__Empty * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -example_interfaces__msg__Empty__fini(example_interfaces__msg__Empty * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -example_interfaces__msg__Empty__are_equal(const example_interfaces__msg__Empty * lhs, const example_interfaces__msg__Empty * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Empty__copy( - const example_interfaces__msg__Empty * input, - example_interfaces__msg__Empty * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -example_interfaces__msg__Empty * -example_interfaces__msg__Empty__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Empty * msg = (example_interfaces__msg__Empty *)allocator.allocate(sizeof(example_interfaces__msg__Empty), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Empty)); - bool success = example_interfaces__msg__Empty__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Empty__destroy(example_interfaces__msg__Empty * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Empty__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Empty__Sequence__init(example_interfaces__msg__Empty__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Empty * data = NULL; - - if (size) { - data = (example_interfaces__msg__Empty *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Empty), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Empty__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Empty__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Empty__Sequence__fini(example_interfaces__msg__Empty__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) { - example_interfaces__msg__Empty__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); - } -} - -example_interfaces__msg__Empty__Sequence * -example_interfaces__msg__Empty__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Empty__Sequence * array = (example_interfaces__msg__Empty__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Empty__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Empty__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Empty__Sequence__destroy(example_interfaces__msg__Empty__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Empty__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Empty__Sequence__are_equal(const example_interfaces__msg__Empty__Sequence * lhs, const example_interfaces__msg__Empty__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Empty__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Empty__Sequence__copy( - const example_interfaces__msg__Empty__Sequence * input, - example_interfaces__msg__Empty__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Empty); - example_interfaces__msg__Empty * data = - (example_interfaces__msg__Empty *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Empty__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Empty__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Empty__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 819b9fc9a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Empty( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Empty( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 7b5a74ddc..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/empty__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Empty & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Empty & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Empty & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Empty( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.h deleted file mode 100644 index fe4487081..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Empty in the package example_interfaces. -typedef struct example_interfaces__msg__Empty -{ - uint8_t structure_needs_at_least_one_member; -} example_interfaces__msg__Empty; - -// Struct for a sequence of example_interfaces__msg__Empty. -typedef struct example_interfaces__msg__Empty__Sequence -{ - example_interfaces__msg__Empty * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Empty__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.hpp deleted file mode 100644 index 9a09fb25d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__struct.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Empty __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Empty __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Empty_ -{ - using Type = Empty_; - - explicit Empty_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->structure_needs_at_least_one_member = 0; - } - } - - explicit Empty_(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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Empty_ *; - using ConstRawPtr = - const example_interfaces::msg::Empty_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Empty - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Empty - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Empty_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Empty_ & other) const - { - return !this->operator==(other); - } -}; // struct Empty_ - -// alias to use template instance with default allocator -using Empty = - example_interfaces::msg::Empty_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__traits.hpp deleted file mode 100644 index 30cc3254d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/empty__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Empty"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Empty"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.c deleted file mode 100644 index 0baf2d3ca..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Empty.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/empty__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/empty__functions.h" -#include "example_interfaces/msg/detail/empty__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Empty__rosidl_typesupport_introspection_c__Empty_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; - example_interfaces__msg__Empty__init(message_memory); -} - -void Empty__rosidl_typesupport_introspection_c__Empty_fini_function(void * message_memory) -{ - example_interfaces__msg__Empty__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Empty__rosidl_typesupport_introspection_c__Empty_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Empty, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Empty__rosidl_typesupport_introspection_c__Empty_message_members = { - "example_interfaces__msg", // message namespace - "Empty", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Empty), - Empty__rosidl_typesupport_introspection_c__Empty_message_member_array, // message members - Empty__rosidl_typesupport_introspection_c__Empty_init_function, // function to initialize message memory (memory has to be allocated) - Empty__rosidl_typesupport_introspection_c__Empty_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 Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle = { - 0, - &Empty__rosidl_typesupport_introspection_c__Empty_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Empty)() { - if (!Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier) { - Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.cpp deleted file mode 100644 index 8c2963f02..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/empty__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Empty.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 "example_interfaces/msg/detail/empty__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Empty_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Empty(_init); -} - -void Empty_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Empty(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Empty, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Empty_message_members = { - "example_interfaces::msg", // message namespace - "Empty", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Empty), - Empty_message_member_array, // message members - Empty_init_function, // function to initialize message memory (memory has to be allocated) - Empty_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Empty_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Empty_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Empty_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, example_interfaces, msg, Empty)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Empty_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__builder.hpp deleted file mode 100644 index a2eed0d1a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/float32__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float32_data -{ -public: - Init_Float32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Float32 data(::example_interfaces::msg::Float32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Float32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Float32>() -{ - return example_interfaces::msg::builder::Init_Float32_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__functions.c deleted file mode 100644 index ffb5523a0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/float32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Float32__init(example_interfaces__msg__Float32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Float32__fini(example_interfaces__msg__Float32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Float32__are_equal(const example_interfaces__msg__Float32 * lhs, const example_interfaces__msg__Float32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Float32__copy( - const example_interfaces__msg__Float32 * input, - example_interfaces__msg__Float32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Float32 * -example_interfaces__msg__Float32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32 * msg = (example_interfaces__msg__Float32 *)allocator.allocate(sizeof(example_interfaces__msg__Float32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Float32)); - bool success = example_interfaces__msg__Float32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Float32__destroy(example_interfaces__msg__Float32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Float32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Float32__Sequence__init(example_interfaces__msg__Float32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Float32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Float32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Float32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Float32__Sequence__fini(example_interfaces__msg__Float32__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) { - example_interfaces__msg__Float32__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); - } -} - -example_interfaces__msg__Float32__Sequence * -example_interfaces__msg__Float32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32__Sequence * array = (example_interfaces__msg__Float32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Float32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Float32__Sequence__destroy(example_interfaces__msg__Float32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Float32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Float32__Sequence__are_equal(const example_interfaces__msg__Float32__Sequence * lhs, const example_interfaces__msg__Float32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Float32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Float32__Sequence__copy( - const example_interfaces__msg__Float32__Sequence * input, - example_interfaces__msg__Float32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Float32); - example_interfaces__msg__Float32 * data = - (example_interfaces__msg__Float32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Float32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Float32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Float32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index db39d4120..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Float32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Float32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index ef859356a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/float32__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Float32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Float32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Float32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Float32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.h deleted file mode 100644 index 249625e75..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Float32 in the package example_interfaces. -typedef struct example_interfaces__msg__Float32 -{ - float data; -} example_interfaces__msg__Float32; - -// Struct for a sequence of example_interfaces__msg__Float32. -typedef struct example_interfaces__msg__Float32__Sequence -{ - example_interfaces__msg__Float32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Float32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.hpp deleted file mode 100644 index 40a4520b1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Float32 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Float32 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Float32_ -{ - using Type = Float32_; - - explicit Float32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0.0f; - } - } - - explicit Float32_(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->data = 0.0f; - } - } - - // field types and members - using _data_type = - float; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const float & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Float32_ *; - using ConstRawPtr = - const example_interfaces::msg::Float32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Float32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Float32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float32_ & other) const - { - return !this->operator==(other); - } -}; // struct Float32_ - -// alias to use template instance with default allocator -using Float32 = - example_interfaces::msg::Float32_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__traits.hpp deleted file mode 100644 index ba2b7bfb5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/float32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Float32"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Float32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.c deleted file mode 100644 index afee78bd1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Float32.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/float32__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/float32__functions.h" -#include "example_interfaces/msg/detail/float32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float32__rosidl_typesupport_introspection_c__Float32_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; - example_interfaces__msg__Float32__init(message_memory); -} - -void Float32__rosidl_typesupport_introspection_c__Float32_fini_function(void * message_memory) -{ - example_interfaces__msg__Float32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float32__rosidl_typesupport_introspection_c__Float32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Float32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float32__rosidl_typesupport_introspection_c__Float32_message_members = { - "example_interfaces__msg", // message namespace - "Float32", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Float32), - Float32__rosidl_typesupport_introspection_c__Float32_message_member_array, // message members - Float32__rosidl_typesupport_introspection_c__Float32_init_function, // function to initialize message memory (memory has to be allocated) - Float32__rosidl_typesupport_introspection_c__Float32_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 Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle = { - 0, - &Float32__rosidl_typesupport_introspection_c__Float32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float32)() { - if (!Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier) { - Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.cpp deleted file mode 100644 index f3cafb9ff..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Float32.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 "example_interfaces/msg/detail/float32__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Float32(_init); -} - -void Float32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Float32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32_message_members = { - "example_interfaces::msg", // message namespace - "Float32", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Float32), - Float32_message_member_array, // message members - Float32_init_function, // function to initialize message memory (memory has to be allocated) - Float32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32_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, example_interfaces, msg, Float32)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__builder.hpp deleted file mode 100644 index d355e964b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float32MultiArray_data -{ -public: - explicit Init_Float32MultiArray_data(::example_interfaces::msg::Float32MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Float32MultiArray data(::example_interfaces::msg::Float32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Float32MultiArray msg_; -}; - -class Init_Float32MultiArray_layout -{ -public: - Init_Float32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Float32MultiArray_data layout(::example_interfaces::msg::Float32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Float32MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Float32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Float32MultiArray>() -{ - return example_interfaces::msg::builder::Init_Float32MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__functions.c deleted file mode 100644 index 06b58e67c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/float32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Float32MultiArray__init(example_interfaces__msg__Float32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Float32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Float32MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Float32MultiArray__fini(example_interfaces__msg__Float32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__float__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Float32MultiArray__are_equal(const example_interfaces__msg__Float32MultiArray * lhs, const example_interfaces__msg__Float32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Float32MultiArray__copy( - const example_interfaces__msg__Float32MultiArray * input, - example_interfaces__msg__Float32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Float32MultiArray * -example_interfaces__msg__Float32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32MultiArray * msg = (example_interfaces__msg__Float32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Float32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Float32MultiArray)); - bool success = example_interfaces__msg__Float32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Float32MultiArray__destroy(example_interfaces__msg__Float32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Float32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Float32MultiArray__Sequence__init(example_interfaces__msg__Float32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Float32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Float32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Float32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Float32MultiArray__Sequence__fini(example_interfaces__msg__Float32MultiArray__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) { - example_interfaces__msg__Float32MultiArray__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); - } -} - -example_interfaces__msg__Float32MultiArray__Sequence * -example_interfaces__msg__Float32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float32MultiArray__Sequence * array = (example_interfaces__msg__Float32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Float32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Float32MultiArray__Sequence__destroy(example_interfaces__msg__Float32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Float32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Float32MultiArray__Sequence__are_equal(const example_interfaces__msg__Float32MultiArray__Sequence * lhs, const example_interfaces__msg__Float32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Float32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Float32MultiArray__Sequence__copy( - const example_interfaces__msg__Float32MultiArray__Sequence * input, - example_interfaces__msg__Float32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Float32MultiArray); - example_interfaces__msg__Float32MultiArray * data = - (example_interfaces__msg__Float32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Float32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Float32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Float32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index c73e8a2aa..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Float32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Float32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1d4fc193a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/float32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Float32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Float32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Float32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Float32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.h deleted file mode 100644 index b25cd582a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Float32MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Float32MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__float__Sequence data; -} example_interfaces__msg__Float32MultiArray; - -// Struct for a sequence of example_interfaces__msg__Float32MultiArray. -typedef struct example_interfaces__msg__Float32MultiArray__Sequence -{ - example_interfaces__msg__Float32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Float32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.hpp deleted file mode 100644 index 9b7f102dd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Float32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Float32MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Float32MultiArray_ -{ - using Type = Float32MultiArray_; - - explicit Float32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Float32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Float32MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Float32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Float32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Float32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Float32MultiArray_ - -// alias to use template instance with default allocator -using Float32MultiArray = - example_interfaces::msg::Float32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__traits.hpp deleted file mode 100644 index 657c4c54a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Float32MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Float32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.c deleted file mode 100644 index d9b2306e0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/float32_multi_array__functions.h" -#include "example_interfaces/msg/detail/float32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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; - example_interfaces__msg__Float32MultiArray__init(message_memory); -} - -void Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Float32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Float32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Float32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Float32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Float32MultiArray), - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array, // message members - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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 Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle = { - 0, - &Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float32MultiArray)() { - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier) { - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.cpp deleted file mode 100644 index 23e821333..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Float32MultiArray.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 "example_interfaces/msg/detail/float32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Float32MultiArray(_init); -} - -void Float32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float32MultiArray(); -} - -size_t size_function__Float32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Float32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Float32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Float32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Float32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Float32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Float32MultiArray__data, // size() function pointer - get_const_function__Float32MultiArray__data, // get_const(index) function pointer - get_function__Float32MultiArray__data, // get(index) function pointer - resize_function__Float32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Float32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Float32MultiArray), - Float32MultiArray_message_member_array, // message members - Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_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, example_interfaces, msg, Float32MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__builder.hpp deleted file mode 100644 index 7f74a611c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/float64__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float64_data -{ -public: - Init_Float64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Float64 data(::example_interfaces::msg::Float64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Float64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Float64>() -{ - return example_interfaces::msg::builder::Init_Float64_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__functions.c deleted file mode 100644 index 1d1d8709e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/float64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Float64__init(example_interfaces__msg__Float64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Float64__fini(example_interfaces__msg__Float64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Float64__are_equal(const example_interfaces__msg__Float64 * lhs, const example_interfaces__msg__Float64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Float64__copy( - const example_interfaces__msg__Float64 * input, - example_interfaces__msg__Float64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Float64 * -example_interfaces__msg__Float64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64 * msg = (example_interfaces__msg__Float64 *)allocator.allocate(sizeof(example_interfaces__msg__Float64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Float64)); - bool success = example_interfaces__msg__Float64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Float64__destroy(example_interfaces__msg__Float64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Float64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Float64__Sequence__init(example_interfaces__msg__Float64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Float64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Float64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Float64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Float64__Sequence__fini(example_interfaces__msg__Float64__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) { - example_interfaces__msg__Float64__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); - } -} - -example_interfaces__msg__Float64__Sequence * -example_interfaces__msg__Float64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64__Sequence * array = (example_interfaces__msg__Float64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Float64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Float64__Sequence__destroy(example_interfaces__msg__Float64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Float64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Float64__Sequence__are_equal(const example_interfaces__msg__Float64__Sequence * lhs, const example_interfaces__msg__Float64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Float64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Float64__Sequence__copy( - const example_interfaces__msg__Float64__Sequence * input, - example_interfaces__msg__Float64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Float64); - example_interfaces__msg__Float64 * data = - (example_interfaces__msg__Float64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Float64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Float64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Float64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 691c1bc91..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Float64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Float64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1784b413f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/float64__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Float64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Float64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Float64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Float64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.h deleted file mode 100644 index bd27bc053..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Float64 in the package example_interfaces. -typedef struct example_interfaces__msg__Float64 -{ - double data; -} example_interfaces__msg__Float64; - -// Struct for a sequence of example_interfaces__msg__Float64. -typedef struct example_interfaces__msg__Float64__Sequence -{ - example_interfaces__msg__Float64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Float64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.hpp deleted file mode 100644 index 8690d6b8a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Float64 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Float64 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Float64_ -{ - using Type = Float64_; - - explicit Float64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0.0; - } - } - - explicit Float64_(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->data = 0.0; - } - } - - // field types and members - using _data_type = - double; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const double & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Float64_ *; - using ConstRawPtr = - const example_interfaces::msg::Float64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Float64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Float64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float64_ & other) const - { - return !this->operator==(other); - } -}; // struct Float64_ - -// alias to use template instance with default allocator -using Float64 = - example_interfaces::msg::Float64_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__traits.hpp deleted file mode 100644 index c8bc5f7ff..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/float64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Float64"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Float64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.c deleted file mode 100644 index 36151fc38..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Float64.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/float64__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/float64__functions.h" -#include "example_interfaces/msg/detail/float64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float64__rosidl_typesupport_introspection_c__Float64_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; - example_interfaces__msg__Float64__init(message_memory); -} - -void Float64__rosidl_typesupport_introspection_c__Float64_fini_function(void * message_memory) -{ - example_interfaces__msg__Float64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float64__rosidl_typesupport_introspection_c__Float64_message_member_array[1] = { - { - "data", // 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(example_interfaces__msg__Float64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float64__rosidl_typesupport_introspection_c__Float64_message_members = { - "example_interfaces__msg", // message namespace - "Float64", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Float64), - Float64__rosidl_typesupport_introspection_c__Float64_message_member_array, // message members - Float64__rosidl_typesupport_introspection_c__Float64_init_function, // function to initialize message memory (memory has to be allocated) - Float64__rosidl_typesupport_introspection_c__Float64_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 Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle = { - 0, - &Float64__rosidl_typesupport_introspection_c__Float64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float64)() { - if (!Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier) { - Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.cpp deleted file mode 100644 index c1d7b9494..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Float64.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 "example_interfaces/msg/detail/float64__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Float64(_init); -} - -void Float64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64_message_member_array[1] = { - { - "data", // 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(example_interfaces::msg::Float64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64_message_members = { - "example_interfaces::msg", // message namespace - "Float64", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Float64), - Float64_message_member_array, // message members - Float64_init_function, // function to initialize message memory (memory has to be allocated) - Float64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64_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, example_interfaces, msg, Float64)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__builder.hpp deleted file mode 100644 index 11841e65a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float64MultiArray_data -{ -public: - explicit Init_Float64MultiArray_data(::example_interfaces::msg::Float64MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Float64MultiArray data(::example_interfaces::msg::Float64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Float64MultiArray msg_; -}; - -class Init_Float64MultiArray_layout -{ -public: - Init_Float64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Float64MultiArray_data layout(::example_interfaces::msg::Float64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Float64MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Float64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Float64MultiArray>() -{ - return example_interfaces::msg::builder::Init_Float64MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__functions.c deleted file mode 100644 index d76695662..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/float64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Float64MultiArray__init(example_interfaces__msg__Float64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Float64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Float64MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Float64MultiArray__fini(example_interfaces__msg__Float64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__double__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Float64MultiArray__are_equal(const example_interfaces__msg__Float64MultiArray * lhs, const example_interfaces__msg__Float64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Float64MultiArray__copy( - const example_interfaces__msg__Float64MultiArray * input, - example_interfaces__msg__Float64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Float64MultiArray * -example_interfaces__msg__Float64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64MultiArray * msg = (example_interfaces__msg__Float64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Float64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Float64MultiArray)); - bool success = example_interfaces__msg__Float64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Float64MultiArray__destroy(example_interfaces__msg__Float64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Float64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Float64MultiArray__Sequence__init(example_interfaces__msg__Float64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Float64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Float64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Float64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Float64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Float64MultiArray__Sequence__fini(example_interfaces__msg__Float64MultiArray__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) { - example_interfaces__msg__Float64MultiArray__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); - } -} - -example_interfaces__msg__Float64MultiArray__Sequence * -example_interfaces__msg__Float64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Float64MultiArray__Sequence * array = (example_interfaces__msg__Float64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Float64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Float64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Float64MultiArray__Sequence__destroy(example_interfaces__msg__Float64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Float64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Float64MultiArray__Sequence__are_equal(const example_interfaces__msg__Float64MultiArray__Sequence * lhs, const example_interfaces__msg__Float64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Float64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Float64MultiArray__Sequence__copy( - const example_interfaces__msg__Float64MultiArray__Sequence * input, - example_interfaces__msg__Float64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Float64MultiArray); - example_interfaces__msg__Float64MultiArray * data = - (example_interfaces__msg__Float64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Float64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Float64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Float64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index c637bae8e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Float64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Float64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Float64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 32a1a49e3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/float64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Float64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Float64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Float64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Float64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Float64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.h deleted file mode 100644 index 9c024ef81..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Float64MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Float64MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__double__Sequence data; -} example_interfaces__msg__Float64MultiArray; - -// Struct for a sequence of example_interfaces__msg__Float64MultiArray. -typedef struct example_interfaces__msg__Float64MultiArray__Sequence -{ - example_interfaces__msg__Float64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Float64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.hpp deleted file mode 100644 index 91f11bae0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Float64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Float64MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Float64MultiArray_ -{ - using Type = Float64MultiArray_; - - explicit Float64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Float64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Float64MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Float64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Float64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Float64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Float64MultiArray_ - -// alias to use template instance with default allocator -using Float64MultiArray = - example_interfaces::msg::Float64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__traits.hpp deleted file mode 100644 index ca9cf638f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Float64MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Float64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.c deleted file mode 100644 index 3428926e3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/float64_multi_array__functions.h" -#include "example_interfaces/msg/detail/float64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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; - example_interfaces__msg__Float64MultiArray__init(message_memory); -} - -void Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Float64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Float64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Float64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Float64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Float64MultiArray), - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array, // message members - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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 Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle = { - 0, - &Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Float64MultiArray)() { - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier) { - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.cpp deleted file mode 100644 index e4832e1d6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/float64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Float64MultiArray.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 "example_interfaces/msg/detail/float64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Float64MultiArray(_init); -} - -void Float64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float64MultiArray(); -} - -size_t size_function__Float64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Float64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Float64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Float64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Float64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Float64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Float64MultiArray__data, // size() function pointer - get_const_function__Float64MultiArray__data, // get_const(index) function pointer - get_function__Float64MultiArray__data, // get(index) function pointer - resize_function__Float64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Float64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Float64MultiArray), - Float64MultiArray_message_member_array, // message members - Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_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, example_interfaces, msg, Float64MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__builder.hpp deleted file mode 100644 index 2ed04660a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int16__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int16_data -{ -public: - Init_Int16_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Int16 data(::example_interfaces::msg::Int16::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int16 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int16>() -{ - return example_interfaces::msg::builder::Init_Int16_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__functions.c deleted file mode 100644 index e06a7e3e1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int16__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Int16__init(example_interfaces__msg__Int16 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Int16__fini(example_interfaces__msg__Int16 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Int16__are_equal(const example_interfaces__msg__Int16 * lhs, const example_interfaces__msg__Int16 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int16__copy( - const example_interfaces__msg__Int16 * input, - example_interfaces__msg__Int16 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Int16 * -example_interfaces__msg__Int16__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16 * msg = (example_interfaces__msg__Int16 *)allocator.allocate(sizeof(example_interfaces__msg__Int16), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int16)); - bool success = example_interfaces__msg__Int16__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int16__destroy(example_interfaces__msg__Int16 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int16__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int16__Sequence__init(example_interfaces__msg__Int16__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int16 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int16), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int16__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int16__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int16__Sequence__fini(example_interfaces__msg__Int16__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) { - example_interfaces__msg__Int16__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); - } -} - -example_interfaces__msg__Int16__Sequence * -example_interfaces__msg__Int16__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16__Sequence * array = (example_interfaces__msg__Int16__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int16__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int16__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int16__Sequence__destroy(example_interfaces__msg__Int16__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int16__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int16__Sequence__are_equal(const example_interfaces__msg__Int16__Sequence * lhs, const example_interfaces__msg__Int16__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int16__Sequence__copy( - const example_interfaces__msg__Int16__Sequence * input, - example_interfaces__msg__Int16__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int16); - example_interfaces__msg__Int16 * data = - (example_interfaces__msg__Int16 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int16__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int16__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int16__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 1adf82f51..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int16( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int16( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int16)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 6f283c562..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int16__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int16 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int16 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int16 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int16( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int16)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.h deleted file mode 100644 index 8a0237f28..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int16 in the package example_interfaces. -typedef struct example_interfaces__msg__Int16 -{ - int16_t data; -} example_interfaces__msg__Int16; - -// Struct for a sequence of example_interfaces__msg__Int16. -typedef struct example_interfaces__msg__Int16__Sequence -{ - example_interfaces__msg__Int16 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int16__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.hpp deleted file mode 100644 index 6b892becf..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int16 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int16 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int16_ -{ - using Type = Int16_; - - explicit Int16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Int16_(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->data = 0; - } - } - - // field types and members - using _data_type = - int16_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int16_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int16_ *; - using ConstRawPtr = - const example_interfaces::msg::Int16_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int16 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int16 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int16_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int16_ & other) const - { - return !this->operator==(other); - } -}; // struct Int16_ - -// alias to use template instance with default allocator -using Int16 = - example_interfaces::msg::Int16_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__traits.hpp deleted file mode 100644 index aae1f6467..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int16__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int16"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int16"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.c deleted file mode 100644 index d8767a741..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int16.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int16__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int16__functions.h" -#include "example_interfaces/msg/detail/int16__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int16__rosidl_typesupport_introspection_c__Int16_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; - example_interfaces__msg__Int16__init(message_memory); -} - -void Int16__rosidl_typesupport_introspection_c__Int16_fini_function(void * message_memory) -{ - example_interfaces__msg__Int16__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int16__rosidl_typesupport_introspection_c__Int16_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int16, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int16__rosidl_typesupport_introspection_c__Int16_message_members = { - "example_interfaces__msg", // message namespace - "Int16", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Int16), - Int16__rosidl_typesupport_introspection_c__Int16_message_member_array, // message members - Int16__rosidl_typesupport_introspection_c__Int16_init_function, // function to initialize message memory (memory has to be allocated) - Int16__rosidl_typesupport_introspection_c__Int16_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 Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle = { - 0, - &Int16__rosidl_typesupport_introspection_c__Int16_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int16)() { - if (!Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier) { - Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.cpp deleted file mode 100644 index 4c2bea5cf..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int16.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 "example_interfaces/msg/detail/int16__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int16_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int16(_init); -} - -void Int16_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int16(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int16, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16_message_members = { - "example_interfaces::msg", // message namespace - "Int16", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Int16), - Int16_message_member_array, // message members - Int16_init_function, // function to initialize message memory (memory has to be allocated) - Int16_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int16_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int16_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16_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, example_interfaces, msg, Int16)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__builder.hpp deleted file mode 100644 index e090f5336..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int16MultiArray_data -{ -public: - explicit Init_Int16MultiArray_data(::example_interfaces::msg::Int16MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Int16MultiArray data(::example_interfaces::msg::Int16MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int16MultiArray msg_; -}; - -class Init_Int16MultiArray_layout -{ -public: - Init_Int16MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int16MultiArray_data layout(::example_interfaces::msg::Int16MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int16MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Int16MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int16MultiArray>() -{ - return example_interfaces::msg::builder::Init_Int16MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__functions.c deleted file mode 100644 index d4c44cb00..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int16_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Int16MultiArray__init(example_interfaces__msg__Int16MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Int16MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Int16MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Int16MultiArray__fini(example_interfaces__msg__Int16MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int16__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Int16MultiArray__are_equal(const example_interfaces__msg__Int16MultiArray * lhs, const example_interfaces__msg__Int16MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int16MultiArray__copy( - const example_interfaces__msg__Int16MultiArray * input, - example_interfaces__msg__Int16MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Int16MultiArray * -example_interfaces__msg__Int16MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16MultiArray * msg = (example_interfaces__msg__Int16MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int16MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int16MultiArray)); - bool success = example_interfaces__msg__Int16MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int16MultiArray__destroy(example_interfaces__msg__Int16MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int16MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int16MultiArray__Sequence__init(example_interfaces__msg__Int16MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int16MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int16MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int16MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int16MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int16MultiArray__Sequence__fini(example_interfaces__msg__Int16MultiArray__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) { - example_interfaces__msg__Int16MultiArray__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); - } -} - -example_interfaces__msg__Int16MultiArray__Sequence * -example_interfaces__msg__Int16MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int16MultiArray__Sequence * array = (example_interfaces__msg__Int16MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int16MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int16MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int16MultiArray__Sequence__destroy(example_interfaces__msg__Int16MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int16MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int16MultiArray__Sequence__are_equal(const example_interfaces__msg__Int16MultiArray__Sequence * lhs, const example_interfaces__msg__Int16MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int16MultiArray__Sequence__copy( - const example_interfaces__msg__Int16MultiArray__Sequence * input, - example_interfaces__msg__Int16MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int16MultiArray); - example_interfaces__msg__Int16MultiArray * data = - (example_interfaces__msg__Int16MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int16MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int16MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int16MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index dc219a9b6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int16MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int16MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 6aecf4ad1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int16_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int16MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int16MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int16MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int16MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.h deleted file mode 100644 index 1dcd34da0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int16MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Int16MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__int16__Sequence data; -} example_interfaces__msg__Int16MultiArray; - -// Struct for a sequence of example_interfaces__msg__Int16MultiArray. -typedef struct example_interfaces__msg__Int16MultiArray__Sequence -{ - example_interfaces__msg__Int16MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int16MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.hpp deleted file mode 100644 index 0f3881852..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int16MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int16MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int16MultiArray_ -{ - using Type = Int16MultiArray_; - - explicit Int16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int16MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Int16MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int16MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int16MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int16MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int16MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int16MultiArray_ - -// alias to use template instance with default allocator -using Int16MultiArray = - example_interfaces::msg::Int16MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__traits.hpp deleted file mode 100644 index 47ce964ff..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int16MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int16MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.c deleted file mode 100644 index 05664a9d7..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int16_multi_array__functions.h" -#include "example_interfaces/msg/detail/int16_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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; - example_interfaces__msg__Int16MultiArray__init(message_memory); -} - -void Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Int16MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Int16MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int16MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Int16MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Int16MultiArray), - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array, // message members - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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 Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle = { - 0, - &Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int16MultiArray)() { - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier) { - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.cpp deleted file mode 100644 index ca6c7cb7b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int16_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int16MultiArray.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 "example_interfaces/msg/detail/int16_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int16MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int16MultiArray(_init); -} - -void Int16MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int16MultiArray(); -} - -size_t size_function__Int16MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int16MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int16MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int16MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int16MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int16MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int16MultiArray__data, // size() function pointer - get_const_function__Int16MultiArray__data, // get_const(index) function pointer - get_function__Int16MultiArray__data, // get(index) function pointer - resize_function__Int16MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Int16MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Int16MultiArray), - Int16MultiArray_message_member_array, // message members - Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int16MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int16MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_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, example_interfaces, msg, Int16MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__builder.hpp deleted file mode 100644 index b7337d0a1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int32__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int32_data -{ -public: - Init_Int32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Int32 data(::example_interfaces::msg::Int32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int32>() -{ - return example_interfaces::msg::builder::Init_Int32_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__functions.c deleted file mode 100644 index 55a988f2b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Int32__init(example_interfaces__msg__Int32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Int32__fini(example_interfaces__msg__Int32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Int32__are_equal(const example_interfaces__msg__Int32 * lhs, const example_interfaces__msg__Int32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int32__copy( - const example_interfaces__msg__Int32 * input, - example_interfaces__msg__Int32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Int32 * -example_interfaces__msg__Int32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32 * msg = (example_interfaces__msg__Int32 *)allocator.allocate(sizeof(example_interfaces__msg__Int32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int32)); - bool success = example_interfaces__msg__Int32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int32__destroy(example_interfaces__msg__Int32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int32__Sequence__init(example_interfaces__msg__Int32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int32__Sequence__fini(example_interfaces__msg__Int32__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) { - example_interfaces__msg__Int32__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); - } -} - -example_interfaces__msg__Int32__Sequence * -example_interfaces__msg__Int32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32__Sequence * array = (example_interfaces__msg__Int32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int32__Sequence__destroy(example_interfaces__msg__Int32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int32__Sequence__are_equal(const example_interfaces__msg__Int32__Sequence * lhs, const example_interfaces__msg__Int32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int32__Sequence__copy( - const example_interfaces__msg__Int32__Sequence * input, - example_interfaces__msg__Int32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int32); - example_interfaces__msg__Int32 * data = - (example_interfaces__msg__Int32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index d4522bba3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 44f363496..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int32__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.h deleted file mode 100644 index 49f2e46cd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int32 in the package example_interfaces. -typedef struct example_interfaces__msg__Int32 -{ - int32_t data; -} example_interfaces__msg__Int32; - -// Struct for a sequence of example_interfaces__msg__Int32. -typedef struct example_interfaces__msg__Int32__Sequence -{ - example_interfaces__msg__Int32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.hpp deleted file mode 100644 index 799502e3b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int32 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int32 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int32_ -{ - using Type = Int32_; - - explicit Int32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0l; - } - } - - explicit Int32_(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->data = 0l; - } - } - - // field types and members - using _data_type = - int32_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int32_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int32_ *; - using ConstRawPtr = - const example_interfaces::msg::Int32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int32_ & other) const - { - return !this->operator==(other); - } -}; // struct Int32_ - -// alias to use template instance with default allocator -using Int32 = - example_interfaces::msg::Int32_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__traits.hpp deleted file mode 100644 index f4d79fdab..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int32"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.c deleted file mode 100644 index a8b5a8a1f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int32.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int32__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int32__functions.h" -#include "example_interfaces/msg/detail/int32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int32__rosidl_typesupport_introspection_c__Int32_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; - example_interfaces__msg__Int32__init(message_memory); -} - -void Int32__rosidl_typesupport_introspection_c__Int32_fini_function(void * message_memory) -{ - example_interfaces__msg__Int32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int32__rosidl_typesupport_introspection_c__Int32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int32__rosidl_typesupport_introspection_c__Int32_message_members = { - "example_interfaces__msg", // message namespace - "Int32", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Int32), - Int32__rosidl_typesupport_introspection_c__Int32_message_member_array, // message members - Int32__rosidl_typesupport_introspection_c__Int32_init_function, // function to initialize message memory (memory has to be allocated) - Int32__rosidl_typesupport_introspection_c__Int32_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 Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle = { - 0, - &Int32__rosidl_typesupport_introspection_c__Int32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int32)() { - if (!Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier) { - Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.cpp deleted file mode 100644 index 35b27b09f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int32.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 "example_interfaces/msg/detail/int32__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int32(_init); -} - -void Int32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32_message_members = { - "example_interfaces::msg", // message namespace - "Int32", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Int32), - Int32_message_member_array, // message members - Int32_init_function, // function to initialize message memory (memory has to be allocated) - Int32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32_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, example_interfaces, msg, Int32)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__builder.hpp deleted file mode 100644 index 2be9b3bc0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int32MultiArray_data -{ -public: - explicit Init_Int32MultiArray_data(::example_interfaces::msg::Int32MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Int32MultiArray data(::example_interfaces::msg::Int32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int32MultiArray msg_; -}; - -class Init_Int32MultiArray_layout -{ -public: - Init_Int32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int32MultiArray_data layout(::example_interfaces::msg::Int32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int32MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Int32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int32MultiArray>() -{ - return example_interfaces::msg::builder::Init_Int32MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__functions.c deleted file mode 100644 index 5b90ec9a4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Int32MultiArray__init(example_interfaces__msg__Int32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Int32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Int32MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Int32MultiArray__fini(example_interfaces__msg__Int32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int32__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Int32MultiArray__are_equal(const example_interfaces__msg__Int32MultiArray * lhs, const example_interfaces__msg__Int32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int32MultiArray__copy( - const example_interfaces__msg__Int32MultiArray * input, - example_interfaces__msg__Int32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Int32MultiArray * -example_interfaces__msg__Int32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32MultiArray * msg = (example_interfaces__msg__Int32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int32MultiArray)); - bool success = example_interfaces__msg__Int32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int32MultiArray__destroy(example_interfaces__msg__Int32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int32MultiArray__Sequence__init(example_interfaces__msg__Int32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int32MultiArray__Sequence__fini(example_interfaces__msg__Int32MultiArray__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) { - example_interfaces__msg__Int32MultiArray__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); - } -} - -example_interfaces__msg__Int32MultiArray__Sequence * -example_interfaces__msg__Int32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int32MultiArray__Sequence * array = (example_interfaces__msg__Int32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int32MultiArray__Sequence__destroy(example_interfaces__msg__Int32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int32MultiArray__Sequence__are_equal(const example_interfaces__msg__Int32MultiArray__Sequence * lhs, const example_interfaces__msg__Int32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int32MultiArray__Sequence__copy( - const example_interfaces__msg__Int32MultiArray__Sequence * input, - example_interfaces__msg__Int32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int32MultiArray); - example_interfaces__msg__Int32MultiArray * data = - (example_interfaces__msg__Int32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 085efa291..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 78b9737cf..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.h deleted file mode 100644 index 2f30520b1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int32MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Int32MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__int32__Sequence data; -} example_interfaces__msg__Int32MultiArray; - -// Struct for a sequence of example_interfaces__msg__Int32MultiArray. -typedef struct example_interfaces__msg__Int32MultiArray__Sequence -{ - example_interfaces__msg__Int32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.hpp deleted file mode 100644 index 08a3b9833..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int32MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int32MultiArray_ -{ - using Type = Int32MultiArray_; - - explicit Int32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int32MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Int32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int32MultiArray_ - -// alias to use template instance with default allocator -using Int32MultiArray = - example_interfaces::msg::Int32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__traits.hpp deleted file mode 100644 index 7e7704b67..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int32MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.c deleted file mode 100644 index a7f2b534b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int32_multi_array__functions.h" -#include "example_interfaces/msg/detail/int32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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; - example_interfaces__msg__Int32MultiArray__init(message_memory); -} - -void Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Int32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Int32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Int32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Int32MultiArray), - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array, // message members - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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 Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle = { - 0, - &Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int32MultiArray)() { - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier) { - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.cpp deleted file mode 100644 index 37f2746fa..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int32MultiArray.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 "example_interfaces/msg/detail/int32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int32MultiArray(_init); -} - -void Int32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int32MultiArray(); -} - -size_t size_function__Int32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int32MultiArray__data, // size() function pointer - get_const_function__Int32MultiArray__data, // get_const(index) function pointer - get_function__Int32MultiArray__data, // get(index) function pointer - resize_function__Int32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Int32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Int32MultiArray), - Int32MultiArray_message_member_array, // message members - Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_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, example_interfaces, msg, Int32MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__builder.hpp deleted file mode 100644 index 88c2d3cf3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int64__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int64_data -{ -public: - Init_Int64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Int64 data(::example_interfaces::msg::Int64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int64>() -{ - return example_interfaces::msg::builder::Init_Int64_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__functions.c deleted file mode 100644 index b79d20aa7..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Int64__init(example_interfaces__msg__Int64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Int64__fini(example_interfaces__msg__Int64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Int64__are_equal(const example_interfaces__msg__Int64 * lhs, const example_interfaces__msg__Int64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int64__copy( - const example_interfaces__msg__Int64 * input, - example_interfaces__msg__Int64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Int64 * -example_interfaces__msg__Int64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64 * msg = (example_interfaces__msg__Int64 *)allocator.allocate(sizeof(example_interfaces__msg__Int64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int64)); - bool success = example_interfaces__msg__Int64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int64__destroy(example_interfaces__msg__Int64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int64__Sequence__init(example_interfaces__msg__Int64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int64__Sequence__fini(example_interfaces__msg__Int64__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) { - example_interfaces__msg__Int64__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); - } -} - -example_interfaces__msg__Int64__Sequence * -example_interfaces__msg__Int64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64__Sequence * array = (example_interfaces__msg__Int64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int64__Sequence__destroy(example_interfaces__msg__Int64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int64__Sequence__are_equal(const example_interfaces__msg__Int64__Sequence * lhs, const example_interfaces__msg__Int64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int64__Sequence__copy( - const example_interfaces__msg__Int64__Sequence * input, - example_interfaces__msg__Int64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int64); - example_interfaces__msg__Int64 * data = - (example_interfaces__msg__Int64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index d7264e59c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1500c373a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int64__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.h deleted file mode 100644 index e48680e7d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int64 in the package example_interfaces. -typedef struct example_interfaces__msg__Int64 -{ - int64_t data; -} example_interfaces__msg__Int64; - -// Struct for a sequence of example_interfaces__msg__Int64. -typedef struct example_interfaces__msg__Int64__Sequence -{ - example_interfaces__msg__Int64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.hpp deleted file mode 100644 index c00d736e6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int64 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int64 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int64_ -{ - using Type = Int64_; - - explicit Int64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ll; - } - } - - explicit Int64_(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->data = 0ll; - } - } - - // field types and members - using _data_type = - int64_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int64_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int64_ *; - using ConstRawPtr = - const example_interfaces::msg::Int64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int64_ & other) const - { - return !this->operator==(other); - } -}; // struct Int64_ - -// alias to use template instance with default allocator -using Int64 = - example_interfaces::msg::Int64_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__traits.hpp deleted file mode 100644 index dcab3feb1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int64"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.c deleted file mode 100644 index 6147b50f5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int64.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int64__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int64__functions.h" -#include "example_interfaces/msg/detail/int64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int64__rosidl_typesupport_introspection_c__Int64_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; - example_interfaces__msg__Int64__init(message_memory); -} - -void Int64__rosidl_typesupport_introspection_c__Int64_fini_function(void * message_memory) -{ - example_interfaces__msg__Int64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int64__rosidl_typesupport_introspection_c__Int64_message_member_array[1] = { - { - "data", // 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(example_interfaces__msg__Int64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int64__rosidl_typesupport_introspection_c__Int64_message_members = { - "example_interfaces__msg", // message namespace - "Int64", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Int64), - Int64__rosidl_typesupport_introspection_c__Int64_message_member_array, // message members - Int64__rosidl_typesupport_introspection_c__Int64_init_function, // function to initialize message memory (memory has to be allocated) - Int64__rosidl_typesupport_introspection_c__Int64_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 Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle = { - 0, - &Int64__rosidl_typesupport_introspection_c__Int64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int64)() { - if (!Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier) { - Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.cpp deleted file mode 100644 index ae77a4b24..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int64.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 "example_interfaces/msg/detail/int64__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int64(_init); -} - -void Int64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64_message_member_array[1] = { - { - "data", // 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(example_interfaces::msg::Int64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64_message_members = { - "example_interfaces::msg", // message namespace - "Int64", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Int64), - Int64_message_member_array, // message members - Int64_init_function, // function to initialize message memory (memory has to be allocated) - Int64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64_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, example_interfaces, msg, Int64)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__builder.hpp deleted file mode 100644 index 1077094f0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int64MultiArray_data -{ -public: - explicit Init_Int64MultiArray_data(::example_interfaces::msg::Int64MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Int64MultiArray data(::example_interfaces::msg::Int64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int64MultiArray msg_; -}; - -class Init_Int64MultiArray_layout -{ -public: - Init_Int64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int64MultiArray_data layout(::example_interfaces::msg::Int64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int64MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Int64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int64MultiArray>() -{ - return example_interfaces::msg::builder::Init_Int64MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__functions.c deleted file mode 100644 index b54cd0992..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Int64MultiArray__init(example_interfaces__msg__Int64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Int64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Int64MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Int64MultiArray__fini(example_interfaces__msg__Int64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int64__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Int64MultiArray__are_equal(const example_interfaces__msg__Int64MultiArray * lhs, const example_interfaces__msg__Int64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int64MultiArray__copy( - const example_interfaces__msg__Int64MultiArray * input, - example_interfaces__msg__Int64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Int64MultiArray * -example_interfaces__msg__Int64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64MultiArray * msg = (example_interfaces__msg__Int64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int64MultiArray)); - bool success = example_interfaces__msg__Int64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int64MultiArray__destroy(example_interfaces__msg__Int64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int64MultiArray__Sequence__init(example_interfaces__msg__Int64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int64MultiArray__Sequence__fini(example_interfaces__msg__Int64MultiArray__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) { - example_interfaces__msg__Int64MultiArray__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); - } -} - -example_interfaces__msg__Int64MultiArray__Sequence * -example_interfaces__msg__Int64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int64MultiArray__Sequence * array = (example_interfaces__msg__Int64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int64MultiArray__Sequence__destroy(example_interfaces__msg__Int64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int64MultiArray__Sequence__are_equal(const example_interfaces__msg__Int64MultiArray__Sequence * lhs, const example_interfaces__msg__Int64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int64MultiArray__Sequence__copy( - const example_interfaces__msg__Int64MultiArray__Sequence * input, - example_interfaces__msg__Int64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int64MultiArray); - example_interfaces__msg__Int64MultiArray * data = - (example_interfaces__msg__Int64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index e5f98fa42..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index fd786db35..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.h deleted file mode 100644 index 8a7b8320b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int64MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Int64MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__int64__Sequence data; -} example_interfaces__msg__Int64MultiArray; - -// Struct for a sequence of example_interfaces__msg__Int64MultiArray. -typedef struct example_interfaces__msg__Int64MultiArray__Sequence -{ - example_interfaces__msg__Int64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.hpp deleted file mode 100644 index 61a1519d4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int64MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int64MultiArray_ -{ - using Type = Int64MultiArray_; - - explicit Int64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int64MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Int64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int64MultiArray_ - -// alias to use template instance with default allocator -using Int64MultiArray = - example_interfaces::msg::Int64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__traits.hpp deleted file mode 100644 index 06ac5f179..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int64MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.c deleted file mode 100644 index ea151bcca..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int64_multi_array__functions.h" -#include "example_interfaces/msg/detail/int64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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; - example_interfaces__msg__Int64MultiArray__init(message_memory); -} - -void Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Int64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Int64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Int64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Int64MultiArray), - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array, // message members - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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 Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle = { - 0, - &Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int64MultiArray)() { - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier) { - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.cpp deleted file mode 100644 index e663a2b75..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int64MultiArray.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 "example_interfaces/msg/detail/int64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int64MultiArray(_init); -} - -void Int64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int64MultiArray(); -} - -size_t size_function__Int64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int64MultiArray__data, // size() function pointer - get_const_function__Int64MultiArray__data, // get_const(index) function pointer - get_function__Int64MultiArray__data, // get(index) function pointer - resize_function__Int64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Int64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Int64MultiArray), - Int64MultiArray_message_member_array, // message members - Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_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, example_interfaces, msg, Int64MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__builder.hpp deleted file mode 100644 index d61deec95..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int8__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int8_data -{ -public: - Init_Int8_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::Int8 data(::example_interfaces::msg::Int8::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int8 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int8>() -{ - return example_interfaces::msg::builder::Init_Int8_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__functions.c deleted file mode 100644 index 83cb601bd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int8__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__Int8__init(example_interfaces__msg__Int8 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__Int8__fini(example_interfaces__msg__Int8 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__Int8__are_equal(const example_interfaces__msg__Int8 * lhs, const example_interfaces__msg__Int8 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int8__copy( - const example_interfaces__msg__Int8 * input, - example_interfaces__msg__Int8 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__Int8 * -example_interfaces__msg__Int8__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8 * msg = (example_interfaces__msg__Int8 *)allocator.allocate(sizeof(example_interfaces__msg__Int8), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int8)); - bool success = example_interfaces__msg__Int8__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int8__destroy(example_interfaces__msg__Int8 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int8__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int8__Sequence__init(example_interfaces__msg__Int8__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8 * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int8 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int8), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int8__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int8__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int8__Sequence__fini(example_interfaces__msg__Int8__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) { - example_interfaces__msg__Int8__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); - } -} - -example_interfaces__msg__Int8__Sequence * -example_interfaces__msg__Int8__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8__Sequence * array = (example_interfaces__msg__Int8__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int8__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int8__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int8__Sequence__destroy(example_interfaces__msg__Int8__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int8__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int8__Sequence__are_equal(const example_interfaces__msg__Int8__Sequence * lhs, const example_interfaces__msg__Int8__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int8__Sequence__copy( - const example_interfaces__msg__Int8__Sequence * input, - example_interfaces__msg__Int8__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int8); - example_interfaces__msg__Int8 * data = - (example_interfaces__msg__Int8 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int8__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int8__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int8__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index a564f6af3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int8( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int8( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int8)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 4c0c881bc..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int8__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int8 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int8 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int8 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int8( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int8)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.h deleted file mode 100644 index f8faaaa7b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int8 in the package example_interfaces. -typedef struct example_interfaces__msg__Int8 -{ - int8_t data; -} example_interfaces__msg__Int8; - -// Struct for a sequence of example_interfaces__msg__Int8. -typedef struct example_interfaces__msg__Int8__Sequence -{ - example_interfaces__msg__Int8 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int8__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.hpp deleted file mode 100644 index 47e87ea19..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int8 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int8 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int8_ -{ - using Type = Int8_; - - explicit Int8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Int8_(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->data = 0; - } - } - - // field types and members - using _data_type = - int8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int8_ *; - using ConstRawPtr = - const example_interfaces::msg::Int8_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int8 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int8 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int8_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int8_ & other) const - { - return !this->operator==(other); - } -}; // struct Int8_ - -// alias to use template instance with default allocator -using Int8 = - example_interfaces::msg::Int8_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__traits.hpp deleted file mode 100644 index a1537842e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int8__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int8"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int8"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.c deleted file mode 100644 index 6c45c3ede..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int8.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int8__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int8__functions.h" -#include "example_interfaces/msg/detail/int8__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int8__rosidl_typesupport_introspection_c__Int8_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; - example_interfaces__msg__Int8__init(message_memory); -} - -void Int8__rosidl_typesupport_introspection_c__Int8_fini_function(void * message_memory) -{ - example_interfaces__msg__Int8__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int8__rosidl_typesupport_introspection_c__Int8_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int8, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int8__rosidl_typesupport_introspection_c__Int8_message_members = { - "example_interfaces__msg", // message namespace - "Int8", // message name - 1, // number of fields - sizeof(example_interfaces__msg__Int8), - Int8__rosidl_typesupport_introspection_c__Int8_message_member_array, // message members - Int8__rosidl_typesupport_introspection_c__Int8_init_function, // function to initialize message memory (memory has to be allocated) - Int8__rosidl_typesupport_introspection_c__Int8_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 Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle = { - 0, - &Int8__rosidl_typesupport_introspection_c__Int8_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int8)() { - if (!Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier) { - Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.cpp deleted file mode 100644 index e97f3aab9..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int8.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 "example_interfaces/msg/detail/int8__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int8_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int8(_init); -} - -void Int8_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int8(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int8, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8_message_members = { - "example_interfaces::msg", // message namespace - "Int8", // message name - 1, // number of fields - sizeof(example_interfaces::msg::Int8), - Int8_message_member_array, // message members - Int8_init_function, // function to initialize message memory (memory has to be allocated) - Int8_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int8_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int8_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8_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, example_interfaces, msg, Int8)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__builder.hpp deleted file mode 100644 index 26dd3d248..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int8MultiArray_data -{ -public: - explicit Init_Int8MultiArray_data(::example_interfaces::msg::Int8MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::Int8MultiArray data(::example_interfaces::msg::Int8MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::Int8MultiArray msg_; -}; - -class Init_Int8MultiArray_layout -{ -public: - Init_Int8MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int8MultiArray_data layout(::example_interfaces::msg::Int8MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int8MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::Int8MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::Int8MultiArray>() -{ - return example_interfaces::msg::builder::Init_Int8MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__functions.c deleted file mode 100644 index 603a2652f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/int8_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__Int8MultiArray__init(example_interfaces__msg__Int8MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__Int8MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__Int8MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__Int8MultiArray__fini(example_interfaces__msg__Int8MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int8__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__Int8MultiArray__are_equal(const example_interfaces__msg__Int8MultiArray * lhs, const example_interfaces__msg__Int8MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__Int8MultiArray__copy( - const example_interfaces__msg__Int8MultiArray * input, - example_interfaces__msg__Int8MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__Int8MultiArray * -example_interfaces__msg__Int8MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8MultiArray * msg = (example_interfaces__msg__Int8MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__Int8MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__Int8MultiArray)); - bool success = example_interfaces__msg__Int8MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__Int8MultiArray__destroy(example_interfaces__msg__Int8MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__Int8MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__Int8MultiArray__Sequence__init(example_interfaces__msg__Int8MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__Int8MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__Int8MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__Int8MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__Int8MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__Int8MultiArray__Sequence__fini(example_interfaces__msg__Int8MultiArray__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) { - example_interfaces__msg__Int8MultiArray__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); - } -} - -example_interfaces__msg__Int8MultiArray__Sequence * -example_interfaces__msg__Int8MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__Int8MultiArray__Sequence * array = (example_interfaces__msg__Int8MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__Int8MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__Int8MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__Int8MultiArray__Sequence__destroy(example_interfaces__msg__Int8MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__Int8MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__Int8MultiArray__Sequence__are_equal(const example_interfaces__msg__Int8MultiArray__Sequence * lhs, const example_interfaces__msg__Int8MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__Int8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__Int8MultiArray__Sequence__copy( - const example_interfaces__msg__Int8MultiArray__Sequence * input, - example_interfaces__msg__Int8MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__Int8MultiArray); - example_interfaces__msg__Int8MultiArray * data = - (example_interfaces__msg__Int8MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__Int8MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__Int8MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__Int8MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index d8505fbf5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__Int8MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__Int8MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, Int8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 8133b9d80..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/int8_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::Int8MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::Int8MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::Int8MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Int8MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, Int8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.h deleted file mode 100644 index 85a7d8a40..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int8MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__Int8MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__int8__Sequence data; -} example_interfaces__msg__Int8MultiArray; - -// Struct for a sequence of example_interfaces__msg__Int8MultiArray. -typedef struct example_interfaces__msg__Int8MultiArray__Sequence -{ - example_interfaces__msg__Int8MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__Int8MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.hpp deleted file mode 100644 index bbf1be7bc..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__Int8MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__Int8MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct Int8MultiArray_ -{ - using Type = Int8MultiArray_; - - explicit Int8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::Int8MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::Int8MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__Int8MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__Int8MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int8MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int8MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int8MultiArray_ - -// alias to use template instance with default allocator -using Int8MultiArray = - example_interfaces::msg::Int8MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__traits.hpp deleted file mode 100644 index 7e1e40248..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::Int8MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/Int8MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.c deleted file mode 100644 index 04008adfa..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/int8_multi_array__functions.h" -#include "example_interfaces/msg/detail/int8_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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; - example_interfaces__msg__Int8MultiArray__init(message_memory); -} - -void Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__Int8MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__Int8MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__Int8MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "Int8MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__Int8MultiArray), - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array, // message members - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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 Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle = { - 0, - &Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, Int8MultiArray)() { - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier) { - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.cpp deleted file mode 100644 index 771793cb5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/int8_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/Int8MultiArray.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 "example_interfaces/msg/detail/int8_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int8MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::Int8MultiArray(_init); -} - -void Int8MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int8MultiArray(); -} - -size_t size_function__Int8MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int8MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int8MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int8MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int8MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::Int8MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int8MultiArray__data, // size() function pointer - get_const_function__Int8MultiArray__data, // get_const(index) function pointer - get_function__Int8MultiArray__data, // get(index) function pointer - resize_function__Int8MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "Int8MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::Int8MultiArray), - Int8MultiArray_message_member_array, // message members - Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int8MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int8MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_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, example_interfaces, msg, Int8MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__builder.hpp deleted file mode 100644 index 0f57b1999..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__builder.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_MultiArrayDimension_stride -{ -public: - explicit Init_MultiArrayDimension_stride(::example_interfaces::msg::MultiArrayDimension & msg) - : msg_(msg) - {} - ::example_interfaces::msg::MultiArrayDimension stride(::example_interfaces::msg::MultiArrayDimension::_stride_type arg) - { - msg_.stride = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::MultiArrayDimension msg_; -}; - -class Init_MultiArrayDimension_size -{ -public: - explicit Init_MultiArrayDimension_size(::example_interfaces::msg::MultiArrayDimension & msg) - : msg_(msg) - {} - Init_MultiArrayDimension_stride size(::example_interfaces::msg::MultiArrayDimension::_size_type arg) - { - msg_.size = std::move(arg); - return Init_MultiArrayDimension_stride(msg_); - } - -private: - ::example_interfaces::msg::MultiArrayDimension msg_; -}; - -class Init_MultiArrayDimension_label -{ -public: - Init_MultiArrayDimension_label() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_MultiArrayDimension_size label(::example_interfaces::msg::MultiArrayDimension::_label_type arg) - { - msg_.label = std::move(arg); - return Init_MultiArrayDimension_size(msg_); - } - -private: - ::example_interfaces::msg::MultiArrayDimension msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::MultiArrayDimension>() -{ - return example_interfaces::msg::builder::Init_MultiArrayDimension_label(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__functions.c deleted file mode 100644 index faab62594..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__functions.c +++ /dev/null @@ -1,262 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/multi_array_dimension__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `label` -#include "rosidl_runtime_c/string_functions.h" - -bool -example_interfaces__msg__MultiArrayDimension__init(example_interfaces__msg__MultiArrayDimension * msg) -{ - if (!msg) { - return false; - } - // label - if (!rosidl_runtime_c__String__init(&msg->label)) { - example_interfaces__msg__MultiArrayDimension__fini(msg); - return false; - } - // size - // stride - return true; -} - -void -example_interfaces__msg__MultiArrayDimension__fini(example_interfaces__msg__MultiArrayDimension * msg) -{ - if (!msg) { - return; - } - // label - rosidl_runtime_c__String__fini(&msg->label); - // size - // stride -} - -bool -example_interfaces__msg__MultiArrayDimension__are_equal(const example_interfaces__msg__MultiArrayDimension * lhs, const example_interfaces__msg__MultiArrayDimension * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // label - if (!rosidl_runtime_c__String__are_equal( - &(lhs->label), &(rhs->label))) - { - return false; - } - // size - if (lhs->size != rhs->size) { - return false; - } - // stride - if (lhs->stride != rhs->stride) { - return false; - } - return true; -} - -bool -example_interfaces__msg__MultiArrayDimension__copy( - const example_interfaces__msg__MultiArrayDimension * input, - example_interfaces__msg__MultiArrayDimension * output) -{ - if (!input || !output) { - return false; - } - // label - if (!rosidl_runtime_c__String__copy( - &(input->label), &(output->label))) - { - return false; - } - // size - output->size = input->size; - // stride - output->stride = input->stride; - return true; -} - -example_interfaces__msg__MultiArrayDimension * -example_interfaces__msg__MultiArrayDimension__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayDimension * msg = (example_interfaces__msg__MultiArrayDimension *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayDimension), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__MultiArrayDimension)); - bool success = example_interfaces__msg__MultiArrayDimension__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__MultiArrayDimension__destroy(example_interfaces__msg__MultiArrayDimension * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__MultiArrayDimension__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__MultiArrayDimension__Sequence__init(example_interfaces__msg__MultiArrayDimension__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayDimension * data = NULL; - - if (size) { - data = (example_interfaces__msg__MultiArrayDimension *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__MultiArrayDimension), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__MultiArrayDimension__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__MultiArrayDimension__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__MultiArrayDimension__Sequence__fini(example_interfaces__msg__MultiArrayDimension__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) { - example_interfaces__msg__MultiArrayDimension__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); - } -} - -example_interfaces__msg__MultiArrayDimension__Sequence * -example_interfaces__msg__MultiArrayDimension__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayDimension__Sequence * array = (example_interfaces__msg__MultiArrayDimension__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayDimension__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__MultiArrayDimension__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__MultiArrayDimension__Sequence__destroy(example_interfaces__msg__MultiArrayDimension__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__MultiArrayDimension__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__MultiArrayDimension__Sequence__are_equal(const example_interfaces__msg__MultiArrayDimension__Sequence * lhs, const example_interfaces__msg__MultiArrayDimension__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__MultiArrayDimension__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__MultiArrayDimension__Sequence__copy( - const example_interfaces__msg__MultiArrayDimension__Sequence * input, - example_interfaces__msg__MultiArrayDimension__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__MultiArrayDimension); - example_interfaces__msg__MultiArrayDimension * data = - (example_interfaces__msg__MultiArrayDimension *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__MultiArrayDimension__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__MultiArrayDimension__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__MultiArrayDimension__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 0c775277b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__MultiArrayDimension( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__MultiArrayDimension( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, MultiArrayDimension)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index b3e650a1e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/multi_array_dimension__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::MultiArrayDimension & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::MultiArrayDimension & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::MultiArrayDimension & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_MultiArrayDimension( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, MultiArrayDimension)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.h deleted file mode 100644 index 39a2ab020..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.h +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'label' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/MultiArrayDimension in the package example_interfaces. -typedef struct example_interfaces__msg__MultiArrayDimension -{ - rosidl_runtime_c__String label; - uint32_t size; - uint32_t stride; -} example_interfaces__msg__MultiArrayDimension; - -// Struct for a sequence of example_interfaces__msg__MultiArrayDimension. -typedef struct example_interfaces__msg__MultiArrayDimension__Sequence -{ - example_interfaces__msg__MultiArrayDimension * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__MultiArrayDimension__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.hpp deleted file mode 100644 index 1f4998027..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__struct.hpp +++ /dev/null @@ -1,158 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__MultiArrayDimension __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__MultiArrayDimension __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct MultiArrayDimension_ -{ - using Type = MultiArrayDimension_; - - explicit MultiArrayDimension_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->label = ""; - this->size = 0ul; - this->stride = 0ul; - } - } - - explicit MultiArrayDimension_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : label(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->label = ""; - this->size = 0ul; - this->stride = 0ul; - } - } - - // field types and members - using _label_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _label_type label; - using _size_type = - uint32_t; - _size_type size; - using _stride_type = - uint32_t; - _stride_type stride; - - // setters for named parameter idiom - Type & set__label( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->label = _arg; - return *this; - } - Type & set__size( - const uint32_t & _arg) - { - this->size = _arg; - return *this; - } - Type & set__stride( - const uint32_t & _arg) - { - this->stride = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::MultiArrayDimension_ *; - using ConstRawPtr = - const example_interfaces::msg::MultiArrayDimension_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__MultiArrayDimension - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__MultiArrayDimension - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const MultiArrayDimension_ & other) const - { - if (this->label != other.label) { - return false; - } - if (this->size != other.size) { - return false; - } - if (this->stride != other.stride) { - return false; - } - return true; - } - bool operator!=(const MultiArrayDimension_ & other) const - { - return !this->operator==(other); - } -}; // struct MultiArrayDimension_ - -// alias to use template instance with default allocator -using MultiArrayDimension = - example_interfaces::msg::MultiArrayDimension_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__traits.hpp deleted file mode 100644 index 18748dead..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::MultiArrayDimension"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/MultiArrayDimension"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.c deleted file mode 100644 index 98ce66a6c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.c +++ /dev/null @@ -1,115 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/multi_array_dimension__functions.h" -#include "example_interfaces/msg/detail/multi_array_dimension__struct.h" - - -// Include directives for member types -// Member `label` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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; - example_interfaces__msg__MultiArrayDimension__init(message_memory); -} - -void MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_fini_function(void * message_memory) -{ - example_interfaces__msg__MultiArrayDimension__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array[3] = { - { - "label", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__MultiArrayDimension, label), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "size", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__MultiArrayDimension, size), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "stride", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__MultiArrayDimension, stride), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members = { - "example_interfaces__msg", // message namespace - "MultiArrayDimension", // message name - 3, // number of fields - sizeof(example_interfaces__msg__MultiArrayDimension), - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array, // message members - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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 MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle = { - 0, - &MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayDimension)() { - if (!MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier) { - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp deleted file mode 100644 index 7e4926fd6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_dimension__type_support.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/MultiArrayDimension.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 "example_interfaces/msg/detail/multi_array_dimension__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void MultiArrayDimension_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::MultiArrayDimension(_init); -} - -void MultiArrayDimension_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~MultiArrayDimension(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayDimension_message_member_array[3] = { - { - "label", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::MultiArrayDimension, label), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "size", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::MultiArrayDimension, size), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "stride", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::MultiArrayDimension, stride), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiArrayDimension_message_members = { - "example_interfaces::msg", // message namespace - "MultiArrayDimension", // message name - 3, // number of fields - sizeof(example_interfaces::msg::MultiArrayDimension), - MultiArrayDimension_message_member_array, // message members - MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayDimension_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t MultiArrayDimension_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &MultiArrayDimension_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_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, example_interfaces, msg, MultiArrayDimension)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__builder.hpp deleted file mode 100644 index 514a2be3a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_MultiArrayLayout_data_offset -{ -public: - explicit Init_MultiArrayLayout_data_offset(::example_interfaces::msg::MultiArrayLayout & msg) - : msg_(msg) - {} - ::example_interfaces::msg::MultiArrayLayout data_offset(::example_interfaces::msg::MultiArrayLayout::_data_offset_type arg) - { - msg_.data_offset = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::MultiArrayLayout msg_; -}; - -class Init_MultiArrayLayout_dim -{ -public: - Init_MultiArrayLayout_dim() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_MultiArrayLayout_data_offset dim(::example_interfaces::msg::MultiArrayLayout::_dim_type arg) - { - msg_.dim = std::move(arg); - return Init_MultiArrayLayout_data_offset(msg_); - } - -private: - ::example_interfaces::msg::MultiArrayLayout msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::MultiArrayLayout>() -{ - return example_interfaces::msg::builder::Init_MultiArrayLayout_dim(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__functions.c deleted file mode 100644 index ba62616e7..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__functions.c +++ /dev/null @@ -1,254 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `dim` -#include "example_interfaces/msg/detail/multi_array_dimension__functions.h" - -bool -example_interfaces__msg__MultiArrayLayout__init(example_interfaces__msg__MultiArrayLayout * msg) -{ - if (!msg) { - return false; - } - // dim - if (!example_interfaces__msg__MultiArrayDimension__Sequence__init(&msg->dim, 0)) { - example_interfaces__msg__MultiArrayLayout__fini(msg); - return false; - } - // data_offset - return true; -} - -void -example_interfaces__msg__MultiArrayLayout__fini(example_interfaces__msg__MultiArrayLayout * msg) -{ - if (!msg) { - return; - } - // dim - example_interfaces__msg__MultiArrayDimension__Sequence__fini(&msg->dim); - // data_offset -} - -bool -example_interfaces__msg__MultiArrayLayout__are_equal(const example_interfaces__msg__MultiArrayLayout * lhs, const example_interfaces__msg__MultiArrayLayout * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // dim - if (!example_interfaces__msg__MultiArrayDimension__Sequence__are_equal( - &(lhs->dim), &(rhs->dim))) - { - return false; - } - // data_offset - if (lhs->data_offset != rhs->data_offset) { - return false; - } - return true; -} - -bool -example_interfaces__msg__MultiArrayLayout__copy( - const example_interfaces__msg__MultiArrayLayout * input, - example_interfaces__msg__MultiArrayLayout * output) -{ - if (!input || !output) { - return false; - } - // dim - if (!example_interfaces__msg__MultiArrayDimension__Sequence__copy( - &(input->dim), &(output->dim))) - { - return false; - } - // data_offset - output->data_offset = input->data_offset; - return true; -} - -example_interfaces__msg__MultiArrayLayout * -example_interfaces__msg__MultiArrayLayout__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayLayout * msg = (example_interfaces__msg__MultiArrayLayout *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayLayout), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__MultiArrayLayout)); - bool success = example_interfaces__msg__MultiArrayLayout__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__MultiArrayLayout__destroy(example_interfaces__msg__MultiArrayLayout * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__MultiArrayLayout__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__MultiArrayLayout__Sequence__init(example_interfaces__msg__MultiArrayLayout__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayLayout * data = NULL; - - if (size) { - data = (example_interfaces__msg__MultiArrayLayout *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__MultiArrayLayout), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__MultiArrayLayout__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__MultiArrayLayout__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__MultiArrayLayout__Sequence__fini(example_interfaces__msg__MultiArrayLayout__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) { - example_interfaces__msg__MultiArrayLayout__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); - } -} - -example_interfaces__msg__MultiArrayLayout__Sequence * -example_interfaces__msg__MultiArrayLayout__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__MultiArrayLayout__Sequence * array = (example_interfaces__msg__MultiArrayLayout__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__MultiArrayLayout__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__MultiArrayLayout__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__MultiArrayLayout__Sequence__destroy(example_interfaces__msg__MultiArrayLayout__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__MultiArrayLayout__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__MultiArrayLayout__Sequence__are_equal(const example_interfaces__msg__MultiArrayLayout__Sequence * lhs, const example_interfaces__msg__MultiArrayLayout__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__MultiArrayLayout__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__MultiArrayLayout__Sequence__copy( - const example_interfaces__msg__MultiArrayLayout__Sequence * input, - example_interfaces__msg__MultiArrayLayout__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__MultiArrayLayout); - example_interfaces__msg__MultiArrayLayout * data = - (example_interfaces__msg__MultiArrayLayout *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__MultiArrayLayout__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__MultiArrayLayout__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 05715b9da..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__MultiArrayLayout( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__MultiArrayLayout( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, MultiArrayLayout)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index e4070a463..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/multi_array_layout__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::MultiArrayLayout & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::MultiArrayLayout & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::MultiArrayLayout & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_MultiArrayLayout( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, MultiArrayLayout)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.h deleted file mode 100644 index 64821c23b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.h +++ /dev/null @@ -1,45 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'dim' -#include "example_interfaces/msg/detail/multi_array_dimension__struct.h" - -// Struct defined in msg/MultiArrayLayout in the package example_interfaces. -typedef struct example_interfaces__msg__MultiArrayLayout -{ - example_interfaces__msg__MultiArrayDimension__Sequence dim; - uint32_t data_offset; -} example_interfaces__msg__MultiArrayLayout; - -// Struct for a sequence of example_interfaces__msg__MultiArrayLayout. -typedef struct example_interfaces__msg__MultiArrayLayout__Sequence -{ - example_interfaces__msg__MultiArrayLayout * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__MultiArrayLayout__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.hpp deleted file mode 100644 index be547e28b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__struct.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'dim' -#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__MultiArrayLayout __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__MultiArrayLayout __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct MultiArrayLayout_ -{ - using Type = MultiArrayLayout_; - - explicit MultiArrayLayout_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data_offset = 0ul; - } - } - - explicit MultiArrayLayout_(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->data_offset = 0ul; - } - } - - // field types and members - using _dim_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _dim_type dim; - using _data_offset_type = - uint32_t; - _data_offset_type data_offset; - - // setters for named parameter idiom - Type & set__dim( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->dim = _arg; - return *this; - } - Type & set__data_offset( - const uint32_t & _arg) - { - this->data_offset = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::MultiArrayLayout_ *; - using ConstRawPtr = - const example_interfaces::msg::MultiArrayLayout_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__MultiArrayLayout - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__MultiArrayLayout - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const MultiArrayLayout_ & other) const - { - if (this->dim != other.dim) { - return false; - } - if (this->data_offset != other.data_offset) { - return false; - } - return true; - } - bool operator!=(const MultiArrayLayout_ & other) const - { - return !this->operator==(other); - } -}; // struct MultiArrayLayout_ - -// alias to use template instance with default allocator -using MultiArrayLayout = - example_interfaces::msg::MultiArrayLayout_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__traits.hpp deleted file mode 100644 index f0099aba0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::MultiArrayLayout"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/MultiArrayLayout"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.c deleted file mode 100644 index 74a53b065..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.c +++ /dev/null @@ -1,137 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/multi_array_layout__functions.h" -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" - - -// Include directives for member types -// Member `dim` -#include "example_interfaces/msg/multi_array_dimension.h" -// Member `dim` -#include "example_interfaces/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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; - example_interfaces__msg__MultiArrayLayout__init(message_memory); -} - -void MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_fini_function(void * message_memory) -{ - example_interfaces__msg__MultiArrayLayout__fini(message_memory); -} - -size_t MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayDimension__dim( - const void * untyped_member) -{ - const example_interfaces__msg__MultiArrayDimension__Sequence * member = - (const example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayDimension__dim( - const void * untyped_member, size_t index) -{ - const example_interfaces__msg__MultiArrayDimension__Sequence * member = - (const example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayDimension__dim( - void * untyped_member, size_t index) -{ - example_interfaces__msg__MultiArrayDimension__Sequence * member = - (example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayDimension__dim( - void * untyped_member, size_t size) -{ - example_interfaces__msg__MultiArrayDimension__Sequence * member = - (example_interfaces__msg__MultiArrayDimension__Sequence *)(untyped_member); - example_interfaces__msg__MultiArrayDimension__Sequence__fini(member); - return example_interfaces__msg__MultiArrayDimension__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[2] = { - { - "dim", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__MultiArrayLayout, dim), // bytes offset in struct - NULL, // default value - MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayDimension__dim, // size() function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayDimension__dim, // get_const(index) function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayDimension__dim, // get(index) function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayDimension__dim // resize(index) function pointer - }, - { - "data_offset", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__MultiArrayLayout, data_offset), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members = { - "example_interfaces__msg", // message namespace - "MultiArrayLayout", // message name - 2, // number of fields - sizeof(example_interfaces__msg__MultiArrayLayout), - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array, // message members - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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 MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle = { - 0, - &MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)() { - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayDimension)(); - if (!MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier) { - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.cpp deleted file mode 100644 index 4c4007eaf..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/multi_array_layout__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/MultiArrayLayout.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 "example_interfaces/msg/detail/multi_array_layout__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void MultiArrayLayout_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::MultiArrayLayout(_init); -} - -void MultiArrayLayout_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~MultiArrayLayout(); -} - -size_t size_function__MultiArrayLayout__dim(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiArrayLayout__dim(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiArrayLayout__dim(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiArrayLayout__dim(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayLayout_message_member_array[2] = { - { - "dim", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::MultiArrayLayout, dim), // bytes offset in struct - nullptr, // default value - size_function__MultiArrayLayout__dim, // size() function pointer - get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer - get_function__MultiArrayLayout__dim, // get(index) function pointer - resize_function__MultiArrayLayout__dim // resize(index) function pointer - }, - { - "data_offset", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::MultiArrayLayout, data_offset), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiArrayLayout_message_members = { - "example_interfaces::msg", // message namespace - "MultiArrayLayout", // message name - 2, // number of fields - sizeof(example_interfaces::msg::MultiArrayLayout), - MultiArrayLayout_message_member_array, // message members - MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayLayout_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t MultiArrayLayout_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &MultiArrayLayout_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_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, example_interfaces, msg, MultiArrayLayout)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/string__builder.hpp deleted file mode 100644 index cc45f1f62..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/string__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_String_data -{ -public: - Init_String_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::String data(::example_interfaces::msg::String::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::String msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::String>() -{ - return example_interfaces::msg::builder::Init_String_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/string__functions.c deleted file mode 100644 index 280d1ca39..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__functions.c +++ /dev/null @@ -1,246 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/string__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `data` -#include "rosidl_runtime_c/string_functions.h" - -bool -example_interfaces__msg__String__init(example_interfaces__msg__String * msg) -{ - if (!msg) { - return false; - } - // data - if (!rosidl_runtime_c__String__init(&msg->data)) { - example_interfaces__msg__String__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__String__fini(example_interfaces__msg__String * msg) -{ - if (!msg) { - return; - } - // data - rosidl_runtime_c__String__fini(&msg->data); -} - -bool -example_interfaces__msg__String__are_equal(const example_interfaces__msg__String * lhs, const example_interfaces__msg__String * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (!rosidl_runtime_c__String__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__String__copy( - const example_interfaces__msg__String * input, - example_interfaces__msg__String * output) -{ - if (!input || !output) { - return false; - } - // data - if (!rosidl_runtime_c__String__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__String * -example_interfaces__msg__String__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__String * msg = (example_interfaces__msg__String *)allocator.allocate(sizeof(example_interfaces__msg__String), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__String)); - bool success = example_interfaces__msg__String__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__String__destroy(example_interfaces__msg__String * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__String__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__String__Sequence__init(example_interfaces__msg__String__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__String * data = NULL; - - if (size) { - data = (example_interfaces__msg__String *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__String), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__String__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__String__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__String__Sequence__fini(example_interfaces__msg__String__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) { - example_interfaces__msg__String__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); - } -} - -example_interfaces__msg__String__Sequence * -example_interfaces__msg__String__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__String__Sequence * array = (example_interfaces__msg__String__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__String__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__String__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__String__Sequence__destroy(example_interfaces__msg__String__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__String__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__String__Sequence__are_equal(const example_interfaces__msg__String__Sequence * lhs, const example_interfaces__msg__String__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__String__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__String__Sequence__copy( - const example_interfaces__msg__String__Sequence * input, - example_interfaces__msg__String__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__String); - example_interfaces__msg__String * data = - (example_interfaces__msg__String *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__String__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__String__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__String__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 5cb19d77e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__String( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__String( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, String)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index bf0048636..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/string__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::String & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::String & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::String & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_String( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, String)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.h deleted file mode 100644 index b08cb24da..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.h +++ /dev/null @@ -1,44 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'data' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/String in the package example_interfaces. -typedef struct example_interfaces__msg__String -{ - rosidl_runtime_c__String data; -} example_interfaces__msg__String; - -// Struct for a sequence of example_interfaces__msg__String. -typedef struct example_interfaces__msg__String__Sequence -{ - example_interfaces__msg__String * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__String__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.hpp deleted file mode 100644 index a122d0217..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__String __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__String __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct String_ -{ - using Type = String_; - - explicit String_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = ""; - } - } - - explicit String_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : data(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = ""; - } - } - - // field types and members - using _data_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::String_ *; - using ConstRawPtr = - const example_interfaces::msg::String_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__String - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__String - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const String_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const String_ & other) const - { - return !this->operator==(other); - } -}; // struct String_ - -// alias to use template instance with default allocator -using String = - example_interfaces::msg::String_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/string__traits.hpp deleted file mode 100644 index 1c1aa3fec..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/string__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::String"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/String"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.c deleted file mode 100644 index 41dc252d6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.c +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/String.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/string__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/string__functions.h" -#include "example_interfaces/msg/detail/string__struct.h" - - -// Include directives for member types -// Member `data` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void String__rosidl_typesupport_introspection_c__String_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; - example_interfaces__msg__String__init(message_memory); -} - -void String__rosidl_typesupport_introspection_c__String_fini_function(void * message_memory) -{ - example_interfaces__msg__String__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember String__rosidl_typesupport_introspection_c__String_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__String, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers String__rosidl_typesupport_introspection_c__String_message_members = { - "example_interfaces__msg", // message namespace - "String", // message name - 1, // number of fields - sizeof(example_interfaces__msg__String), - String__rosidl_typesupport_introspection_c__String_message_member_array, // message members - String__rosidl_typesupport_introspection_c__String_init_function, // function to initialize message memory (memory has to be allocated) - String__rosidl_typesupport_introspection_c__String_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 String__rosidl_typesupport_introspection_c__String_message_type_support_handle = { - 0, - &String__rosidl_typesupport_introspection_c__String_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, String)() { - if (!String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier) { - String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &String__rosidl_typesupport_introspection_c__String_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.cpp deleted file mode 100644 index 7918822f1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/string__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/String.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 "example_interfaces/msg/detail/string__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void String_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::String(_init); -} - -void String_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~String(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember String_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::String, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers String_message_members = { - "example_interfaces::msg", // message namespace - "String", // message name - 1, // number of fields - sizeof(example_interfaces::msg::String), - String_message_member_array, // message members - String_init_function, // function to initialize message memory (memory has to be allocated) - String_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t String_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &String_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::String_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, example_interfaces, msg, String)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::String_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__builder.hpp deleted file mode 100644 index 8109be328..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int16__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt16_data -{ -public: - Init_UInt16_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::UInt16 data(::example_interfaces::msg::UInt16::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt16 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt16>() -{ - return example_interfaces::msg::builder::Init_UInt16_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__functions.c deleted file mode 100644 index 1965ebbe7..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int16__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__UInt16__init(example_interfaces__msg__UInt16 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__UInt16__fini(example_interfaces__msg__UInt16 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__UInt16__are_equal(const example_interfaces__msg__UInt16 * lhs, const example_interfaces__msg__UInt16 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt16__copy( - const example_interfaces__msg__UInt16 * input, - example_interfaces__msg__UInt16 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__UInt16 * -example_interfaces__msg__UInt16__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16 * msg = (example_interfaces__msg__UInt16 *)allocator.allocate(sizeof(example_interfaces__msg__UInt16), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt16)); - bool success = example_interfaces__msg__UInt16__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt16__destroy(example_interfaces__msg__UInt16 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt16__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt16__Sequence__init(example_interfaces__msg__UInt16__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16 * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt16 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt16), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt16__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt16__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt16__Sequence__fini(example_interfaces__msg__UInt16__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) { - example_interfaces__msg__UInt16__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); - } -} - -example_interfaces__msg__UInt16__Sequence * -example_interfaces__msg__UInt16__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16__Sequence * array = (example_interfaces__msg__UInt16__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt16__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt16__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt16__Sequence__destroy(example_interfaces__msg__UInt16__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt16__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt16__Sequence__are_equal(const example_interfaces__msg__UInt16__Sequence * lhs, const example_interfaces__msg__UInt16__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt16__Sequence__copy( - const example_interfaces__msg__UInt16__Sequence * input, - example_interfaces__msg__UInt16__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt16); - example_interfaces__msg__UInt16 * data = - (example_interfaces__msg__UInt16 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt16__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt16__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt16__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 1e2ab2233..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt16( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt16( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt16)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a1170e608..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int16__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt16 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt16 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt16 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt16( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt16)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.h deleted file mode 100644 index 2d1701b31..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt16 in the package example_interfaces. -typedef struct example_interfaces__msg__UInt16 -{ - uint16_t data; -} example_interfaces__msg__UInt16; - -// Struct for a sequence of example_interfaces__msg__UInt16. -typedef struct example_interfaces__msg__UInt16__Sequence -{ - example_interfaces__msg__UInt16 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt16__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.hpp deleted file mode 100644 index 3072e176d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt16 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt16 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt16_ -{ - using Type = UInt16_; - - explicit UInt16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit UInt16_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint16_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint16_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt16_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt16_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt16 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt16 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt16_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt16_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt16_ - -// alias to use template instance with default allocator -using UInt16 = - example_interfaces::msg::UInt16_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__traits.hpp deleted file mode 100644 index caa04c76f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int16__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt16"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt16"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.c deleted file mode 100644 index 01a5405bd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt16.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int16__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int16__functions.h" -#include "example_interfaces/msg/detail/u_int16__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt16__rosidl_typesupport_introspection_c__UInt16_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; - example_interfaces__msg__UInt16__init(message_memory); -} - -void UInt16__rosidl_typesupport_introspection_c__UInt16_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt16__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt16, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt16__rosidl_typesupport_introspection_c__UInt16_message_members = { - "example_interfaces__msg", // message namespace - "UInt16", // message name - 1, // number of fields - sizeof(example_interfaces__msg__UInt16), - UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array, // message members - UInt16__rosidl_typesupport_introspection_c__UInt16_init_function, // function to initialize message memory (memory has to be allocated) - UInt16__rosidl_typesupport_introspection_c__UInt16_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 UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle = { - 0, - &UInt16__rosidl_typesupport_introspection_c__UInt16_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt16)() { - if (!UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier) { - UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.cpp deleted file mode 100644 index 89a80c910..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt16.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 "example_interfaces/msg/detail/u_int16__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt16_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt16(_init); -} - -void UInt16_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt16(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt16, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16_message_members = { - "example_interfaces::msg", // message namespace - "UInt16", // message name - 1, // number of fields - sizeof(example_interfaces::msg::UInt16), - UInt16_message_member_array, // message members - UInt16_init_function, // function to initialize message memory (memory has to be allocated) - UInt16_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt16_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt16_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16_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, example_interfaces, msg, UInt16)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp deleted file mode 100644 index 9eb34c253..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt16MultiArray_data -{ -public: - explicit Init_UInt16MultiArray_data(::example_interfaces::msg::UInt16MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::UInt16MultiArray data(::example_interfaces::msg::UInt16MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt16MultiArray msg_; -}; - -class Init_UInt16MultiArray_layout -{ -public: - Init_UInt16MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt16MultiArray_data layout(::example_interfaces::msg::UInt16MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt16MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::UInt16MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt16MultiArray>() -{ - return example_interfaces::msg::builder::Init_UInt16MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__functions.c deleted file mode 100644 index ff5594bea..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int16_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__UInt16MultiArray__init(example_interfaces__msg__UInt16MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__UInt16MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__UInt16MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__UInt16MultiArray__fini(example_interfaces__msg__UInt16MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint16__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__UInt16MultiArray__are_equal(const example_interfaces__msg__UInt16MultiArray * lhs, const example_interfaces__msg__UInt16MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt16MultiArray__copy( - const example_interfaces__msg__UInt16MultiArray * input, - example_interfaces__msg__UInt16MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__UInt16MultiArray * -example_interfaces__msg__UInt16MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16MultiArray * msg = (example_interfaces__msg__UInt16MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt16MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt16MultiArray)); - bool success = example_interfaces__msg__UInt16MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt16MultiArray__destroy(example_interfaces__msg__UInt16MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt16MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt16MultiArray__Sequence__init(example_interfaces__msg__UInt16MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt16MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt16MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt16MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt16MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt16MultiArray__Sequence__fini(example_interfaces__msg__UInt16MultiArray__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) { - example_interfaces__msg__UInt16MultiArray__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); - } -} - -example_interfaces__msg__UInt16MultiArray__Sequence * -example_interfaces__msg__UInt16MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt16MultiArray__Sequence * array = (example_interfaces__msg__UInt16MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt16MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt16MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt16MultiArray__Sequence__destroy(example_interfaces__msg__UInt16MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt16MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt16MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt16MultiArray__Sequence * lhs, const example_interfaces__msg__UInt16MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt16MultiArray__Sequence__copy( - const example_interfaces__msg__UInt16MultiArray__Sequence * input, - example_interfaces__msg__UInt16MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt16MultiArray); - example_interfaces__msg__UInt16MultiArray * data = - (example_interfaces__msg__UInt16MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt16MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt16MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt16MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 5640e58de..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt16MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt16MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 9beb4ee2a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int16_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt16MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt16MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt16MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt16MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.h deleted file mode 100644 index dfcaa412b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt16MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__UInt16MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint16__Sequence data; -} example_interfaces__msg__UInt16MultiArray; - -// Struct for a sequence of example_interfaces__msg__UInt16MultiArray. -typedef struct example_interfaces__msg__UInt16MultiArray__Sequence -{ - example_interfaces__msg__UInt16MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt16MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp deleted file mode 100644 index 0d8fec074..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt16MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt16MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt16MultiArray_ -{ - using Type = UInt16MultiArray_; - - explicit UInt16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt16MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt16MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt16MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt16MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt16MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt16MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt16MultiArray_ - -// alias to use template instance with default allocator -using UInt16MultiArray = - example_interfaces::msg::UInt16MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp deleted file mode 100644 index 9dfa72ccd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt16MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt16MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.c deleted file mode 100644 index 19c779fd0..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int16_multi_array__functions.h" -#include "example_interfaces/msg/detail/u_int16_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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; - example_interfaces__msg__UInt16MultiArray__init(message_memory); -} - -void UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt16MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__UInt16MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt16MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "UInt16MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__UInt16MultiArray), - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array, // message members - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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 UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle = { - 0, - &UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt16MultiArray)() { - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier) { - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp deleted file mode 100644 index 4b3cc3918..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int16_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt16MultiArray.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 "example_interfaces/msg/detail/u_int16_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt16MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt16MultiArray(_init); -} - -void UInt16MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt16MultiArray(); -} - -size_t size_function__UInt16MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt16MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt16MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt16MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt16MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt16MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt16MultiArray__data, // size() function pointer - get_const_function__UInt16MultiArray__data, // get_const(index) function pointer - get_function__UInt16MultiArray__data, // get(index) function pointer - resize_function__UInt16MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "UInt16MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::UInt16MultiArray), - UInt16MultiArray_message_member_array, // message members - UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt16MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt16MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_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, example_interfaces, msg, UInt16MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__builder.hpp deleted file mode 100644 index d097193af..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int32__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt32_data -{ -public: - Init_UInt32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::UInt32 data(::example_interfaces::msg::UInt32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt32>() -{ - return example_interfaces::msg::builder::Init_UInt32_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__functions.c deleted file mode 100644 index 684af1f4d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__UInt32__init(example_interfaces__msg__UInt32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__UInt32__fini(example_interfaces__msg__UInt32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__UInt32__are_equal(const example_interfaces__msg__UInt32 * lhs, const example_interfaces__msg__UInt32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt32__copy( - const example_interfaces__msg__UInt32 * input, - example_interfaces__msg__UInt32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__UInt32 * -example_interfaces__msg__UInt32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32 * msg = (example_interfaces__msg__UInt32 *)allocator.allocate(sizeof(example_interfaces__msg__UInt32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt32)); - bool success = example_interfaces__msg__UInt32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt32__destroy(example_interfaces__msg__UInt32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt32__Sequence__init(example_interfaces__msg__UInt32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32 * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt32 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt32__Sequence__fini(example_interfaces__msg__UInt32__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) { - example_interfaces__msg__UInt32__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); - } -} - -example_interfaces__msg__UInt32__Sequence * -example_interfaces__msg__UInt32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32__Sequence * array = (example_interfaces__msg__UInt32__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt32__Sequence__destroy(example_interfaces__msg__UInt32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt32__Sequence__are_equal(const example_interfaces__msg__UInt32__Sequence * lhs, const example_interfaces__msg__UInt32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt32__Sequence__copy( - const example_interfaces__msg__UInt32__Sequence * input, - example_interfaces__msg__UInt32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt32); - example_interfaces__msg__UInt32 * data = - (example_interfaces__msg__UInt32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 7a906396b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 46c00d6e5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int32__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt32)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.h deleted file mode 100644 index 764ad5dd4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt32 in the package example_interfaces. -typedef struct example_interfaces__msg__UInt32 -{ - uint32_t data; -} example_interfaces__msg__UInt32; - -// Struct for a sequence of example_interfaces__msg__UInt32. -typedef struct example_interfaces__msg__UInt32__Sequence -{ - example_interfaces__msg__UInt32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.hpp deleted file mode 100644 index bdd7596fb..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt32 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt32 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt32_ -{ - using Type = UInt32_; - - explicit UInt32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ul; - } - } - - explicit UInt32_(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->data = 0ul; - } - } - - // field types and members - using _data_type = - uint32_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint32_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt32_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt32_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt32_ - -// alias to use template instance with default allocator -using UInt32 = - example_interfaces::msg::UInt32_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__traits.hpp deleted file mode 100644 index 04df45ea5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt32"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.c deleted file mode 100644 index b296681f8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt32.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int32__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int32__functions.h" -#include "example_interfaces/msg/detail/u_int32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt32__rosidl_typesupport_introspection_c__UInt32_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; - example_interfaces__msg__UInt32__init(message_memory); -} - -void UInt32__rosidl_typesupport_introspection_c__UInt32_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt32__rosidl_typesupport_introspection_c__UInt32_message_members = { - "example_interfaces__msg", // message namespace - "UInt32", // message name - 1, // number of fields - sizeof(example_interfaces__msg__UInt32), - UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array, // message members - UInt32__rosidl_typesupport_introspection_c__UInt32_init_function, // function to initialize message memory (memory has to be allocated) - UInt32__rosidl_typesupport_introspection_c__UInt32_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 UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle = { - 0, - &UInt32__rosidl_typesupport_introspection_c__UInt32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt32)() { - if (!UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier) { - UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.cpp deleted file mode 100644 index 8817ba140..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt32.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 "example_interfaces/msg/detail/u_int32__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt32(_init); -} - -void UInt32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32_message_members = { - "example_interfaces::msg", // message namespace - "UInt32", // message name - 1, // number of fields - sizeof(example_interfaces::msg::UInt32), - UInt32_message_member_array, // message members - UInt32_init_function, // function to initialize message memory (memory has to be allocated) - UInt32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32_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, example_interfaces, msg, UInt32)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp deleted file mode 100644 index d34fee89e..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt32MultiArray_data -{ -public: - explicit Init_UInt32MultiArray_data(::example_interfaces::msg::UInt32MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::UInt32MultiArray data(::example_interfaces::msg::UInt32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt32MultiArray msg_; -}; - -class Init_UInt32MultiArray_layout -{ -public: - Init_UInt32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt32MultiArray_data layout(::example_interfaces::msg::UInt32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt32MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::UInt32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt32MultiArray>() -{ - return example_interfaces::msg::builder::Init_UInt32MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__functions.c deleted file mode 100644 index e401e62c8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__UInt32MultiArray__init(example_interfaces__msg__UInt32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__UInt32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__UInt32MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__UInt32MultiArray__fini(example_interfaces__msg__UInt32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint32__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__UInt32MultiArray__are_equal(const example_interfaces__msg__UInt32MultiArray * lhs, const example_interfaces__msg__UInt32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt32MultiArray__copy( - const example_interfaces__msg__UInt32MultiArray * input, - example_interfaces__msg__UInt32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__UInt32MultiArray * -example_interfaces__msg__UInt32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32MultiArray * msg = (example_interfaces__msg__UInt32MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt32MultiArray)); - bool success = example_interfaces__msg__UInt32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt32MultiArray__destroy(example_interfaces__msg__UInt32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt32MultiArray__Sequence__init(example_interfaces__msg__UInt32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt32MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt32MultiArray__Sequence__fini(example_interfaces__msg__UInt32MultiArray__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) { - example_interfaces__msg__UInt32MultiArray__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); - } -} - -example_interfaces__msg__UInt32MultiArray__Sequence * -example_interfaces__msg__UInt32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt32MultiArray__Sequence * array = (example_interfaces__msg__UInt32MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt32MultiArray__Sequence__destroy(example_interfaces__msg__UInt32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt32MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt32MultiArray__Sequence * lhs, const example_interfaces__msg__UInt32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt32MultiArray__Sequence__copy( - const example_interfaces__msg__UInt32MultiArray__Sequence * input, - example_interfaces__msg__UInt32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt32MultiArray); - example_interfaces__msg__UInt32MultiArray * data = - (example_interfaces__msg__UInt32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 774ba8092..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a8f3c8630..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.h deleted file mode 100644 index 64c4a7e91..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt32MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__UInt32MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint32__Sequence data; -} example_interfaces__msg__UInt32MultiArray; - -// Struct for a sequence of example_interfaces__msg__UInt32MultiArray. -typedef struct example_interfaces__msg__UInt32MultiArray__Sequence -{ - example_interfaces__msg__UInt32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp deleted file mode 100644 index 97ba0b70b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt32MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt32MultiArray_ -{ - using Type = UInt32MultiArray_; - - explicit UInt32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt32MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt32MultiArray_ - -// alias to use template instance with default allocator -using UInt32MultiArray = - example_interfaces::msg::UInt32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp deleted file mode 100644 index a00bf1a7c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt32MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.c deleted file mode 100644 index c3e59b7c8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int32_multi_array__functions.h" -#include "example_interfaces/msg/detail/u_int32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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; - example_interfaces__msg__UInt32MultiArray__init(message_memory); -} - -void UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__UInt32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "UInt32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__UInt32MultiArray), - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array, // message members - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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 UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle = { - 0, - &UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt32MultiArray)() { - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier) { - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp deleted file mode 100644 index 4a756b2c6..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt32MultiArray.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 "example_interfaces/msg/detail/u_int32_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt32MultiArray(_init); -} - -void UInt32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt32MultiArray(); -} - -size_t size_function__UInt32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt32MultiArray__data, // size() function pointer - get_const_function__UInt32MultiArray__data, // get_const(index) function pointer - get_function__UInt32MultiArray__data, // get(index) function pointer - resize_function__UInt32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "UInt32MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::UInt32MultiArray), - UInt32MultiArray_message_member_array, // message members - UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_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, example_interfaces, msg, UInt32MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__builder.hpp deleted file mode 100644 index daaf31d0b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int64__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt64_data -{ -public: - Init_UInt64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::UInt64 data(::example_interfaces::msg::UInt64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt64>() -{ - return example_interfaces::msg::builder::Init_UInt64_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__functions.c deleted file mode 100644 index 58ca9e4d4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__UInt64__init(example_interfaces__msg__UInt64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__UInt64__fini(example_interfaces__msg__UInt64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__UInt64__are_equal(const example_interfaces__msg__UInt64 * lhs, const example_interfaces__msg__UInt64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt64__copy( - const example_interfaces__msg__UInt64 * input, - example_interfaces__msg__UInt64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__UInt64 * -example_interfaces__msg__UInt64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64 * msg = (example_interfaces__msg__UInt64 *)allocator.allocate(sizeof(example_interfaces__msg__UInt64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt64)); - bool success = example_interfaces__msg__UInt64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt64__destroy(example_interfaces__msg__UInt64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt64__Sequence__init(example_interfaces__msg__UInt64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64 * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt64 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt64__Sequence__fini(example_interfaces__msg__UInt64__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) { - example_interfaces__msg__UInt64__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); - } -} - -example_interfaces__msg__UInt64__Sequence * -example_interfaces__msg__UInt64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64__Sequence * array = (example_interfaces__msg__UInt64__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt64__Sequence__destroy(example_interfaces__msg__UInt64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt64__Sequence__are_equal(const example_interfaces__msg__UInt64__Sequence * lhs, const example_interfaces__msg__UInt64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt64__Sequence__copy( - const example_interfaces__msg__UInt64__Sequence * input, - example_interfaces__msg__UInt64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt64); - example_interfaces__msg__UInt64 * data = - (example_interfaces__msg__UInt64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 22b2488de..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 2bdfc7de3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int64__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt64)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.h deleted file mode 100644 index 8d2fbdc84..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt64 in the package example_interfaces. -typedef struct example_interfaces__msg__UInt64 -{ - uint64_t data; -} example_interfaces__msg__UInt64; - -// Struct for a sequence of example_interfaces__msg__UInt64. -typedef struct example_interfaces__msg__UInt64__Sequence -{ - example_interfaces__msg__UInt64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.hpp deleted file mode 100644 index 628ad81f8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt64 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt64 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt64_ -{ - using Type = UInt64_; - - explicit UInt64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ull; - } - } - - explicit UInt64_(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->data = 0ull; - } - } - - // field types and members - using _data_type = - uint64_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint64_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt64_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt64_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt64_ - -// alias to use template instance with default allocator -using UInt64 = - example_interfaces::msg::UInt64_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__traits.hpp deleted file mode 100644 index 86322f8d5..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt64"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.c deleted file mode 100644 index 6a00117c2..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt64.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int64__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int64__functions.h" -#include "example_interfaces/msg/detail/u_int64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt64__rosidl_typesupport_introspection_c__UInt64_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; - example_interfaces__msg__UInt64__init(message_memory); -} - -void UInt64__rosidl_typesupport_introspection_c__UInt64_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt64__rosidl_typesupport_introspection_c__UInt64_message_members = { - "example_interfaces__msg", // message namespace - "UInt64", // message name - 1, // number of fields - sizeof(example_interfaces__msg__UInt64), - UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array, // message members - UInt64__rosidl_typesupport_introspection_c__UInt64_init_function, // function to initialize message memory (memory has to be allocated) - UInt64__rosidl_typesupport_introspection_c__UInt64_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 UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle = { - 0, - &UInt64__rosidl_typesupport_introspection_c__UInt64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt64)() { - if (!UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier) { - UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.cpp deleted file mode 100644 index a084ff404..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt64.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 "example_interfaces/msg/detail/u_int64__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt64(_init); -} - -void UInt64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64_message_members = { - "example_interfaces::msg", // message namespace - "UInt64", // message name - 1, // number of fields - sizeof(example_interfaces::msg::UInt64), - UInt64_message_member_array, // message members - UInt64_init_function, // function to initialize message memory (memory has to be allocated) - UInt64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64_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, example_interfaces, msg, UInt64)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp deleted file mode 100644 index d6aa0314c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt64MultiArray_data -{ -public: - explicit Init_UInt64MultiArray_data(::example_interfaces::msg::UInt64MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::UInt64MultiArray data(::example_interfaces::msg::UInt64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt64MultiArray msg_; -}; - -class Init_UInt64MultiArray_layout -{ -public: - Init_UInt64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt64MultiArray_data layout(::example_interfaces::msg::UInt64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt64MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::UInt64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt64MultiArray>() -{ - return example_interfaces::msg::builder::Init_UInt64MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__functions.c deleted file mode 100644 index 9d9208eed..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__UInt64MultiArray__init(example_interfaces__msg__UInt64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__UInt64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__UInt64MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__UInt64MultiArray__fini(example_interfaces__msg__UInt64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint64__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__UInt64MultiArray__are_equal(const example_interfaces__msg__UInt64MultiArray * lhs, const example_interfaces__msg__UInt64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt64MultiArray__copy( - const example_interfaces__msg__UInt64MultiArray * input, - example_interfaces__msg__UInt64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__UInt64MultiArray * -example_interfaces__msg__UInt64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64MultiArray * msg = (example_interfaces__msg__UInt64MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt64MultiArray)); - bool success = example_interfaces__msg__UInt64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt64MultiArray__destroy(example_interfaces__msg__UInt64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt64MultiArray__Sequence__init(example_interfaces__msg__UInt64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt64MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt64MultiArray__Sequence__fini(example_interfaces__msg__UInt64MultiArray__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) { - example_interfaces__msg__UInt64MultiArray__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); - } -} - -example_interfaces__msg__UInt64MultiArray__Sequence * -example_interfaces__msg__UInt64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt64MultiArray__Sequence * array = (example_interfaces__msg__UInt64MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt64MultiArray__Sequence__destroy(example_interfaces__msg__UInt64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt64MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt64MultiArray__Sequence * lhs, const example_interfaces__msg__UInt64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt64MultiArray__Sequence__copy( - const example_interfaces__msg__UInt64MultiArray__Sequence * input, - example_interfaces__msg__UInt64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt64MultiArray); - example_interfaces__msg__UInt64MultiArray * data = - (example_interfaces__msg__UInt64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index ba6527b9c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index c0b0102c8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.h deleted file mode 100644 index 1e1883862..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt64MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__UInt64MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint64__Sequence data; -} example_interfaces__msg__UInt64MultiArray; - -// Struct for a sequence of example_interfaces__msg__UInt64MultiArray. -typedef struct example_interfaces__msg__UInt64MultiArray__Sequence -{ - example_interfaces__msg__UInt64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp deleted file mode 100644 index 31b07994d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt64MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt64MultiArray_ -{ - using Type = UInt64MultiArray_; - - explicit UInt64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt64MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt64MultiArray_ - -// alias to use template instance with default allocator -using UInt64MultiArray = - example_interfaces::msg::UInt64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp deleted file mode 100644 index e98527f8c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt64MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.c deleted file mode 100644 index 76ea6a3de..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int64_multi_array__functions.h" -#include "example_interfaces/msg/detail/u_int64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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; - example_interfaces__msg__UInt64MultiArray__init(message_memory); -} - -void UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__UInt64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "UInt64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__UInt64MultiArray), - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array, // message members - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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 UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle = { - 0, - &UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt64MultiArray)() { - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier) { - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp deleted file mode 100644 index c6f46a46c..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt64MultiArray.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 "example_interfaces/msg/detail/u_int64_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt64MultiArray(_init); -} - -void UInt64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt64MultiArray(); -} - -size_t size_function__UInt64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt64MultiArray__data, // size() function pointer - get_const_function__UInt64MultiArray__data, // get_const(index) function pointer - get_function__UInt64MultiArray__data, // get(index) function pointer - resize_function__UInt64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "UInt64MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::UInt64MultiArray), - UInt64MultiArray_message_member_array, // message members - UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_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, example_interfaces, msg, UInt64MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__builder.hpp deleted file mode 100644 index a3cb78e43..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int8__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt8_data -{ -public: - Init_UInt8_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::msg::UInt8 data(::example_interfaces::msg::UInt8::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt8 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt8>() -{ - return example_interfaces::msg::builder::Init_UInt8_data(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__functions.c deleted file mode 100644 index a4766cb41..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int8__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -example_interfaces__msg__UInt8__init(example_interfaces__msg__UInt8 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__msg__UInt8__fini(example_interfaces__msg__UInt8 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__msg__UInt8__are_equal(const example_interfaces__msg__UInt8 * lhs, const example_interfaces__msg__UInt8 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt8__copy( - const example_interfaces__msg__UInt8 * input, - example_interfaces__msg__UInt8 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__msg__UInt8 * -example_interfaces__msg__UInt8__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8 * msg = (example_interfaces__msg__UInt8 *)allocator.allocate(sizeof(example_interfaces__msg__UInt8), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt8)); - bool success = example_interfaces__msg__UInt8__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt8__destroy(example_interfaces__msg__UInt8 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt8__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt8__Sequence__init(example_interfaces__msg__UInt8__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8 * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt8 *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt8), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt8__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt8__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt8__Sequence__fini(example_interfaces__msg__UInt8__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) { - example_interfaces__msg__UInt8__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); - } -} - -example_interfaces__msg__UInt8__Sequence * -example_interfaces__msg__UInt8__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8__Sequence * array = (example_interfaces__msg__UInt8__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt8__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt8__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt8__Sequence__destroy(example_interfaces__msg__UInt8__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt8__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt8__Sequence__are_equal(const example_interfaces__msg__UInt8__Sequence * lhs, const example_interfaces__msg__UInt8__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt8__Sequence__copy( - const example_interfaces__msg__UInt8__Sequence * input, - example_interfaces__msg__UInt8__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt8); - example_interfaces__msg__UInt8 * data = - (example_interfaces__msg__UInt8 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt8__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt8__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt8__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 4df9307b4..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt8( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt8( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt8)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1e0f1ef2f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int8__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt8 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt8 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt8 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt8( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt8)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.h deleted file mode 100644 index b798d276a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt8 in the package example_interfaces. -typedef struct example_interfaces__msg__UInt8 -{ - uint8_t data; -} example_interfaces__msg__UInt8; - -// Struct for a sequence of example_interfaces__msg__UInt8. -typedef struct example_interfaces__msg__UInt8__Sequence -{ - example_interfaces__msg__UInt8 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt8__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.hpp deleted file mode 100644 index b5f3405da..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt8 __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt8 __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt8_ -{ - using Type = UInt8_; - - explicit UInt8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit UInt8_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt8_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt8_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt8 - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt8 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt8_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt8_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt8_ - -// alias to use template instance with default allocator -using UInt8 = - example_interfaces::msg::UInt8_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__traits.hpp deleted file mode 100644 index b06507249..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int8__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt8"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt8"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.c deleted file mode 100644 index b78662bdd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt8.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int8__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int8__functions.h" -#include "example_interfaces/msg/detail/u_int8__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt8__rosidl_typesupport_introspection_c__UInt8_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; - example_interfaces__msg__UInt8__init(message_memory); -} - -void UInt8__rosidl_typesupport_introspection_c__UInt8_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt8__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt8, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt8__rosidl_typesupport_introspection_c__UInt8_message_members = { - "example_interfaces__msg", // message namespace - "UInt8", // message name - 1, // number of fields - sizeof(example_interfaces__msg__UInt8), - UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array, // message members - UInt8__rosidl_typesupport_introspection_c__UInt8_init_function, // function to initialize message memory (memory has to be allocated) - UInt8__rosidl_typesupport_introspection_c__UInt8_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 UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle = { - 0, - &UInt8__rosidl_typesupport_introspection_c__UInt8_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt8)() { - if (!UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier) { - UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.cpp deleted file mode 100644 index 456b4f614..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt8.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 "example_interfaces/msg/detail/u_int8__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt8_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt8(_init); -} - -void UInt8_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt8(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt8, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8_message_members = { - "example_interfaces::msg", // message namespace - "UInt8", // message name - 1, // number of fields - sizeof(example_interfaces::msg::UInt8), - UInt8_message_member_array, // message members - UInt8_init_function, // function to initialize message memory (memory has to be allocated) - UInt8_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt8_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt8_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8_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, example_interfaces, msg, UInt8)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp deleted file mode 100644 index 2e0b0b1f7..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ - -#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt8MultiArray_data -{ -public: - explicit Init_UInt8MultiArray_data(::example_interfaces::msg::UInt8MultiArray & msg) - : msg_(msg) - {} - ::example_interfaces::msg::UInt8MultiArray data(::example_interfaces::msg::UInt8MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::msg::UInt8MultiArray msg_; -}; - -class Init_UInt8MultiArray_layout -{ -public: - Init_UInt8MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt8MultiArray_data layout(::example_interfaces::msg::UInt8MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt8MultiArray_data(msg_); - } - -private: - ::example_interfaces::msg::UInt8MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::msg::UInt8MultiArray>() -{ - return example_interfaces::msg::builder::Init_UInt8MultiArray_layout(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__functions.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__functions.c deleted file mode 100644 index c07b20821..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice -#include "example_interfaces/msg/detail/u_int8_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -example_interfaces__msg__UInt8MultiArray__init(example_interfaces__msg__UInt8MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__init(&msg->layout)) { - example_interfaces__msg__UInt8MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { - example_interfaces__msg__UInt8MultiArray__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__msg__UInt8MultiArray__fini(example_interfaces__msg__UInt8MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - example_interfaces__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint8__Sequence__fini(&msg->data); -} - -bool -example_interfaces__msg__UInt8MultiArray__are_equal(const example_interfaces__msg__UInt8MultiArray * lhs, const example_interfaces__msg__UInt8MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -example_interfaces__msg__UInt8MultiArray__copy( - const example_interfaces__msg__UInt8MultiArray * input, - example_interfaces__msg__UInt8MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!example_interfaces__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -example_interfaces__msg__UInt8MultiArray * -example_interfaces__msg__UInt8MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8MultiArray * msg = (example_interfaces__msg__UInt8MultiArray *)allocator.allocate(sizeof(example_interfaces__msg__UInt8MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__msg__UInt8MultiArray)); - bool success = example_interfaces__msg__UInt8MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__msg__UInt8MultiArray__destroy(example_interfaces__msg__UInt8MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__msg__UInt8MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__msg__UInt8MultiArray__Sequence__init(example_interfaces__msg__UInt8MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8MultiArray * data = NULL; - - if (size) { - data = (example_interfaces__msg__UInt8MultiArray *)allocator.zero_allocate(size, sizeof(example_interfaces__msg__UInt8MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__msg__UInt8MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__msg__UInt8MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__msg__UInt8MultiArray__Sequence__fini(example_interfaces__msg__UInt8MultiArray__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) { - example_interfaces__msg__UInt8MultiArray__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); - } -} - -example_interfaces__msg__UInt8MultiArray__Sequence * -example_interfaces__msg__UInt8MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__msg__UInt8MultiArray__Sequence * array = (example_interfaces__msg__UInt8MultiArray__Sequence *)allocator.allocate(sizeof(example_interfaces__msg__UInt8MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__msg__UInt8MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__msg__UInt8MultiArray__Sequence__destroy(example_interfaces__msg__UInt8MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__msg__UInt8MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__msg__UInt8MultiArray__Sequence__are_equal(const example_interfaces__msg__UInt8MultiArray__Sequence * lhs, const example_interfaces__msg__UInt8MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!example_interfaces__msg__UInt8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__msg__UInt8MultiArray__Sequence__copy( - const example_interfaces__msg__UInt8MultiArray__Sequence * input, - example_interfaces__msg__UInt8MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__msg__UInt8MultiArray); - example_interfaces__msg__UInt8MultiArray * data = - (example_interfaces__msg__UInt8MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__msg__UInt8MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__msg__UInt8MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__msg__UInt8MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 21d49c0ec..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__msg__UInt8MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__msg__UInt8MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, msg, UInt8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index ee6b6fdfc..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/msg/detail/u_int8_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::msg::UInt8MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::msg::UInt8MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::msg::UInt8MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_UInt8MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, msg, UInt8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.h deleted file mode 100644 index 57b94afa8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt8MultiArray in the package example_interfaces. -typedef struct example_interfaces__msg__UInt8MultiArray -{ - example_interfaces__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint8__Sequence data; -} example_interfaces__msg__UInt8MultiArray; - -// Struct for a sequence of example_interfaces__msg__UInt8MultiArray. -typedef struct example_interfaces__msg__UInt8MultiArray__Sequence -{ - example_interfaces__msg__UInt8MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__UInt8MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp deleted file mode 100644 index 61b55fb81..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__msg__UInt8MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__msg__UInt8MultiArray __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace msg -{ - -// message struct -template -struct UInt8MultiArray_ -{ - using Type = UInt8MultiArray_; - - explicit UInt8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - example_interfaces::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const example_interfaces::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::msg::UInt8MultiArray_ *; - using ConstRawPtr = - const example_interfaces::msg::UInt8MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__msg__UInt8MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__msg__UInt8MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt8MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt8MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt8MultiArray_ - -// alias to use template instance with default allocator -using UInt8MultiArray = - example_interfaces::msg::UInt8MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp deleted file mode 100644 index 390bb1571..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::UInt8MultiArray"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/UInt8MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.c deleted file mode 100644 index 5cff2e677..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/u_int8_multi_array__functions.h" -#include "example_interfaces/msg/detail/u_int8_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "example_interfaces/msg/multi_array_layout.h" -// Member `layout` -#include "example_interfaces/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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; - example_interfaces__msg__UInt8MultiArray__init(message_memory); -} - -void UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_fini_function(void * message_memory) -{ - example_interfaces__msg__UInt8MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[2] = { - { - "layout", // 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(example_interfaces__msg__UInt8MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__UInt8MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members = { - "example_interfaces__msg", // message namespace - "UInt8MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces__msg__UInt8MultiArray), - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array, // message members - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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 UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle = { - 0, - &UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, UInt8MultiArray)() { - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, MultiArrayLayout)(); - if (!UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier) { - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp b/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp deleted file mode 100644 index 7945eb0ce..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/u_int8_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:msg/UInt8MultiArray.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 "example_interfaces/msg/detail/u_int8_multi_array__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 example_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt8MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::msg::UInt8MultiArray(_init); -} - -void UInt8MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt8MultiArray(); -} - -size_t size_function__UInt8MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt8MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt8MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt8MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt8MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::msg::UInt8MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt8MultiArray__data, // size() function pointer - get_const_function__UInt8MultiArray__data, // get_const(index) function pointer - get_function__UInt8MultiArray__data, // get(index) function pointer - resize_function__UInt8MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8MultiArray_message_members = { - "example_interfaces::msg", // message namespace - "UInt8MultiArray", // message name - 2, // number of fields - sizeof(example_interfaces::msg::UInt8MultiArray), - UInt8MultiArray_message_member_array, // message members - UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt8MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt8MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_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, example_interfaces, msg, UInt8MultiArray)() { - return &::example_interfaces::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.h b/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.h deleted file mode 100644 index 41c6e5d4b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__struct.h +++ /dev/null @@ -1,44 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:msg/WString.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'data' -#include "rosidl_runtime_c/u16string.h" - -// Struct defined in msg/WString in the package example_interfaces. -typedef struct example_interfaces__msg__WString -{ - rosidl_runtime_c__U16String data; -} example_interfaces__msg__WString; - -// Struct for a sequence of example_interfaces__msg__WString. -typedef struct example_interfaces__msg__WString__Sequence -{ - example_interfaces__msg__WString * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__msg__WString__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__traits.hpp b/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__traits.hpp deleted file mode 100644 index 9355622fd..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:msg/WString.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ - -#include "example_interfaces/msg/detail/w_string__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::msg::WString"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/msg/WString"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__MSG__DETAIL__W_STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.c b/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.c deleted file mode 100644 index 148d96740..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/detail/w_string__type_support.c +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:msg/WString.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/msg/detail/w_string__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/msg/detail/w_string__functions.h" -#include "example_interfaces/msg/detail/w_string__struct.h" - - -// Include directives for member types -// Member `data` -#include "rosidl_runtime_c/u16string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void WString__rosidl_typesupport_introspection_c__WString_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; - example_interfaces__msg__WString__init(message_memory); -} - -void WString__rosidl_typesupport_introspection_c__WString_fini_function(void * message_memory) -{ - example_interfaces__msg__WString__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember WString__rosidl_typesupport_introspection_c__WString_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__msg__WString, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers WString__rosidl_typesupport_introspection_c__WString_message_members = { - "example_interfaces__msg", // message namespace - "WString", // message name - 1, // number of fields - sizeof(example_interfaces__msg__WString), - WString__rosidl_typesupport_introspection_c__WString_message_member_array, // message members - WString__rosidl_typesupport_introspection_c__WString_init_function, // function to initialize message memory (memory has to be allocated) - WString__rosidl_typesupport_introspection_c__WString_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 WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle = { - 0, - &WString__rosidl_typesupport_introspection_c__WString_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, msg, WString)() { - if (!WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle.typesupport_identifier) { - WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &WString__rosidl_typesupport_introspection_c__WString_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/msg/empty.hpp b/ThirdParty/ros/include/example_interfaces/msg/empty.hpp deleted file mode 100644 index 28a45e7a2..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/empty.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ -#define EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ - -#include "example_interfaces/msg/detail/empty__struct.hpp" -#include "example_interfaces/msg/detail/empty__builder.hpp" -#include "example_interfaces/msg/detail/empty__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float32.hpp b/ThirdParty/ros/include/example_interfaces/msg/float32.hpp deleted file mode 100644 index 7577832fb..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/float32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ -#define EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ - -#include "example_interfaces/msg/detail/float32__struct.hpp" -#include "example_interfaces/msg/detail/float32__builder.hpp" -#include "example_interfaces/msg/detail/float32__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__FLOAT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/float32_multi_array.hpp deleted file mode 100644 index 0c1672721..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/float32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/float32_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/float32_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/float32_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__FLOAT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float64.hpp b/ThirdParty/ros/include/example_interfaces/msg/float64.hpp deleted file mode 100644 index 722a80a05..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/float64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ -#define EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ - -#include "example_interfaces/msg/detail/float64__struct.hpp" -#include "example_interfaces/msg/detail/float64__builder.hpp" -#include "example_interfaces/msg/detail/float64__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__FLOAT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/float64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/float64_multi_array.hpp deleted file mode 100644 index bc704e209..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/float64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/float64_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/float64_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/float64_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__FLOAT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int16.hpp b/ThirdParty/ros/include/example_interfaces/msg/int16.hpp deleted file mode 100644 index b83249524..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int16.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT16_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT16_HPP_ - -#include "example_interfaces/msg/detail/int16__struct.hpp" -#include "example_interfaces/msg/detail/int16__builder.hpp" -#include "example_interfaces/msg/detail/int16__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT16_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int16_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/int16_multi_array.hpp deleted file mode 100644 index 00c1cb0f2..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int16_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/int16_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/int16_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/int16_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int32.hpp b/ThirdParty/ros/include/example_interfaces/msg/int32.hpp deleted file mode 100644 index 7d009a710..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT32_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT32_HPP_ - -#include "example_interfaces/msg/detail/int32__struct.hpp" -#include "example_interfaces/msg/detail/int32__builder.hpp" -#include "example_interfaces/msg/detail/int32__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/int32_multi_array.hpp deleted file mode 100644 index 582d0d025..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/int32_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/int32_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/int32_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int64.hpp b/ThirdParty/ros/include/example_interfaces/msg/int64.hpp deleted file mode 100644 index 78f5eddd1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT64_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT64_HPP_ - -#include "example_interfaces/msg/detail/int64__struct.hpp" -#include "example_interfaces/msg/detail/int64__builder.hpp" -#include "example_interfaces/msg/detail/int64__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/int64_multi_array.hpp deleted file mode 100644 index ab5889d8b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/int64_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/int64_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/int64_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int8.hpp b/ThirdParty/ros/include/example_interfaces/msg/int8.hpp deleted file mode 100644 index 28a458420..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int8.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT8_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT8_HPP_ - -#include "example_interfaces/msg/detail/int8__struct.hpp" -#include "example_interfaces/msg/detail/int8__builder.hpp" -#include "example_interfaces/msg/detail/int8__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT8_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/int8_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/int8_multi_array.hpp deleted file mode 100644 index 628d9bb36..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/int8_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/int8_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/int8_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/int8_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/multi_array_dimension.hpp b/ThirdParty/ros/include/example_interfaces/msg/multi_array_dimension.hpp deleted file mode 100644 index 12d82dab3..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/multi_array_dimension.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ -#define EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ - -#include "example_interfaces/msg/detail/multi_array_dimension__struct.hpp" -#include "example_interfaces/msg/detail/multi_array_dimension__builder.hpp" -#include "example_interfaces/msg/detail/multi_array_dimension__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_DIMENSION_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/multi_array_layout.hpp b/ThirdParty/ros/include/example_interfaces/msg/multi_array_layout.hpp deleted file mode 100644 index e7f62f07b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/multi_array_layout.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ -#define EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ - -#include "example_interfaces/msg/detail/multi_array_layout__struct.hpp" -#include "example_interfaces/msg/detail/multi_array_layout__builder.hpp" -#include "example_interfaces/msg/detail/multi_array_layout__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__MULTI_ARRAY_LAYOUT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/string.hpp b/ThirdParty/ros/include/example_interfaces/msg/string.hpp deleted file mode 100644 index bd31b273f..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/string.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__STRING_HPP_ -#define EXAMPLE_INTERFACES__MSG__STRING_HPP_ - -#include "example_interfaces/msg/detail/string__struct.hpp" -#include "example_interfaces/msg/detail/string__builder.hpp" -#include "example_interfaces/msg/detail/string__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__STRING_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int16.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int16.hpp deleted file mode 100644 index 74987fe5d..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int16.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ - -#include "example_interfaces/msg/detail/u_int16__struct.hpp" -#include "example_interfaces/msg/detail/u_int16__builder.hpp" -#include "example_interfaces/msg/detail/u_int16__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT16_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int16_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int16_multi_array.hpp deleted file mode 100644 index 458a8d62a..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int16_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/u_int16_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/u_int16_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/u_int16_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int32.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int32.hpp deleted file mode 100644 index 15aa6ecc8..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ - -#include "example_interfaces/msg/detail/u_int32__struct.hpp" -#include "example_interfaces/msg/detail/u_int32__builder.hpp" -#include "example_interfaces/msg/detail/u_int32__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT32_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int32_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int32_multi_array.hpp deleted file mode 100644 index f054d17f1..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/u_int32_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/u_int32_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/u_int32_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int64.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int64.hpp deleted file mode 100644 index a92fdb589..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ - -#include "example_interfaces/msg/detail/u_int64__struct.hpp" -#include "example_interfaces/msg/detail/u_int64__builder.hpp" -#include "example_interfaces/msg/detail/u_int64__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT64_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int64_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int64_multi_array.hpp deleted file mode 100644 index 51bd20e2b..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/u_int64_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/u_int64_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/u_int64_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int8.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int8.hpp deleted file mode 100644 index 7f710ebec..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int8.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ - -#include "example_interfaces/msg/detail/u_int8__struct.hpp" -#include "example_interfaces/msg/detail/u_int8__builder.hpp" -#include "example_interfaces/msg/detail/u_int8__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT8_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/msg/u_int8_multi_array.hpp b/ThirdParty/ros/include/example_interfaces/msg/u_int8_multi_array.hpp deleted file mode 100644 index a4bbf8e56..000000000 --- a/ThirdParty/ros/include/example_interfaces/msg/u_int8_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ -#define EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ - -#include "example_interfaces/msg/detail/u_int8_multi_array__struct.hpp" -#include "example_interfaces/msg/detail/u_int8_multi_array__builder.hpp" -#include "example_interfaces/msg/detail/u_int8_multi_array__traits.hpp" - -#endif // EXAMPLE_INTERFACES__MSG__U_INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__traits.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__traits.hpp deleted file mode 100644 index ce21a9f80..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:srv/AddTwoInts.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ - -#include "example_interfaces/srv/detail/add_two_ints__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::AddTwoInts_Request"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/AddTwoInts_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::AddTwoInts_Response"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/AddTwoInts_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::AddTwoInts"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/AddTwoInts"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__ADD_TWO_INTS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.c b/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.c deleted file mode 100644 index 1c9714b6b..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/add_two_ints__type_support.c +++ /dev/null @@ -1,239 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:srv/AddTwoInts.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/srv/detail/add_two_ints__functions.h" -#include "example_interfaces/srv/detail/add_two_ints__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_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; - example_interfaces__srv__AddTwoInts_Request__init(message_memory); -} - -void AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_fini_function(void * message_memory) -{ - example_interfaces__srv__AddTwoInts_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_member_array[2] = { - { - "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(example_interfaces__srv__AddTwoInts_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 // 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(example_interfaces__srv__AddTwoInts_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 // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_members = { - "example_interfaces__srv", // message namespace - "AddTwoInts_Request", // message name - 2, // number of fields - sizeof(example_interfaces__srv__AddTwoInts_Request), - AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_member_array, // message members - AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_init_function, // function to initialize message memory (memory has to be allocated) - AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_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 AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle = { - 0, - &AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Request)() { - if (!AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle.typesupport_identifier) { - AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AddTwoInts_Request__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/srv/detail/add_two_ints__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/srv/detail/add_two_ints__functions.h" -// already included above -// #include "example_interfaces/srv/detail/add_two_ints__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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; - example_interfaces__srv__AddTwoInts_Response__init(message_memory); -} - -void AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_fini_function(void * message_memory) -{ - example_interfaces__srv__AddTwoInts_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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(example_interfaces__srv__AddTwoInts_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 // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_members = { - "example_interfaces__srv", // message namespace - "AddTwoInts_Response", // message name - 1, // number of fields - sizeof(example_interfaces__srv__AddTwoInts_Response), - AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_member_array, // message members - AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_init_function, // function to initialize message memory (memory has to be allocated) - AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_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 AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle = { - 0, - &AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Response)() { - if (!AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle.typesupport_identifier) { - AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AddTwoInts_Response__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "example_interfaces/srv/detail/add_two_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 example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_members = { - "example_interfaces__srv", // service namespace - "AddTwoInts", // service name - // these two fields are initialized below on the first access - NULL, // request message - // example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_Request_message_type_support_handle, - NULL // response message - // example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle = { - 0, - &example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_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, example_interfaces, srv, AddTwoInts_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, AddTwoInts)() { - if (!example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle.typesupport_identifier) { - example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_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, example_interfaces, srv, AddTwoInts_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, example_interfaces, srv, AddTwoInts_Response)()->data; - } - - return &example_interfaces__srv__detail__add_two_ints__rosidl_typesupport_introspection_c__AddTwoInts_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__builder.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__builder.hpp deleted file mode 100644 index ccc6836d0..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__builder.hpp +++ /dev/null @@ -1,113 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ - -#include "example_interfaces/srv/detail/set_bool__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace srv -{ - -namespace builder -{ - -class Init_SetBool_Request_data -{ -public: - Init_SetBool_Request_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::example_interfaces::srv::SetBool_Request data(::example_interfaces::srv::SetBool_Request::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::srv::SetBool_Request msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::srv::SetBool_Request>() -{ - return example_interfaces::srv::builder::Init_SetBool_Request_data(); -} - -} // namespace example_interfaces - - -namespace example_interfaces -{ - -namespace srv -{ - -namespace builder -{ - -class Init_SetBool_Response_message -{ -public: - explicit Init_SetBool_Response_message(::example_interfaces::srv::SetBool_Response & msg) - : msg_(msg) - {} - ::example_interfaces::srv::SetBool_Response message(::example_interfaces::srv::SetBool_Response::_message_type arg) - { - msg_.message = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::srv::SetBool_Response msg_; -}; - -class Init_SetBool_Response_success -{ -public: - Init_SetBool_Response_success() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_SetBool_Response_message success(::example_interfaces::srv::SetBool_Response::_success_type arg) - { - msg_.success = std::move(arg); - return Init_SetBool_Response_message(msg_); - } - -private: - ::example_interfaces::srv::SetBool_Response msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::srv::SetBool_Response>() -{ - return example_interfaces::srv::builder::Init_SetBool_Response_success(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__functions.c b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__functions.c deleted file mode 100644 index c0d00e5c9..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__functions.c +++ /dev/null @@ -1,473 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice -#include "example_interfaces/srv/detail/set_bool__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - -bool -example_interfaces__srv__SetBool_Request__init(example_interfaces__srv__SetBool_Request * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -example_interfaces__srv__SetBool_Request__fini(example_interfaces__srv__SetBool_Request * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -example_interfaces__srv__SetBool_Request__are_equal(const example_interfaces__srv__SetBool_Request * lhs, const example_interfaces__srv__SetBool_Request * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -example_interfaces__srv__SetBool_Request__copy( - const example_interfaces__srv__SetBool_Request * input, - example_interfaces__srv__SetBool_Request * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -example_interfaces__srv__SetBool_Request * -example_interfaces__srv__SetBool_Request__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Request * msg = (example_interfaces__srv__SetBool_Request *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Request), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__srv__SetBool_Request)); - bool success = example_interfaces__srv__SetBool_Request__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__srv__SetBool_Request__destroy(example_interfaces__srv__SetBool_Request * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__srv__SetBool_Request__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__srv__SetBool_Request__Sequence__init(example_interfaces__srv__SetBool_Request__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Request * data = NULL; - - if (size) { - data = (example_interfaces__srv__SetBool_Request *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__SetBool_Request), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__srv__SetBool_Request__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__srv__SetBool_Request__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__srv__SetBool_Request__Sequence__fini(example_interfaces__srv__SetBool_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) { - example_interfaces__srv__SetBool_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); - } -} - -example_interfaces__srv__SetBool_Request__Sequence * -example_interfaces__srv__SetBool_Request__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Request__Sequence * array = (example_interfaces__srv__SetBool_Request__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Request__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__srv__SetBool_Request__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__srv__SetBool_Request__Sequence__destroy(example_interfaces__srv__SetBool_Request__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__srv__SetBool_Request__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__srv__SetBool_Request__Sequence__are_equal(const example_interfaces__srv__SetBool_Request__Sequence * lhs, const example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__srv__SetBool_Request__Sequence__copy( - const example_interfaces__srv__SetBool_Request__Sequence * input, - example_interfaces__srv__SetBool_Request__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__srv__SetBool_Request); - example_interfaces__srv__SetBool_Request * data = - (example_interfaces__srv__SetBool_Request *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__srv__SetBool_Request__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__srv__SetBool_Request__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__srv__SetBool_Request__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -bool -example_interfaces__srv__SetBool_Response__init(example_interfaces__srv__SetBool_Response * msg) -{ - if (!msg) { - return false; - } - // success - // message - if (!rosidl_runtime_c__String__init(&msg->message)) { - example_interfaces__srv__SetBool_Response__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__srv__SetBool_Response__fini(example_interfaces__srv__SetBool_Response * msg) -{ - if (!msg) { - return; - } - // success - // message - rosidl_runtime_c__String__fini(&msg->message); -} - -bool -example_interfaces__srv__SetBool_Response__are_equal(const example_interfaces__srv__SetBool_Response * lhs, const example_interfaces__srv__SetBool_Response * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // success - if (lhs->success != rhs->success) { - return false; - } - // message - if (!rosidl_runtime_c__String__are_equal( - &(lhs->message), &(rhs->message))) - { - return false; - } - return true; -} - -bool -example_interfaces__srv__SetBool_Response__copy( - const example_interfaces__srv__SetBool_Response * input, - example_interfaces__srv__SetBool_Response * output) -{ - if (!input || !output) { - return false; - } - // success - output->success = input->success; - // message - if (!rosidl_runtime_c__String__copy( - &(input->message), &(output->message))) - { - return false; - } - return true; -} - -example_interfaces__srv__SetBool_Response * -example_interfaces__srv__SetBool_Response__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Response * msg = (example_interfaces__srv__SetBool_Response *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Response), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__srv__SetBool_Response)); - bool success = example_interfaces__srv__SetBool_Response__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__srv__SetBool_Response__destroy(example_interfaces__srv__SetBool_Response * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__srv__SetBool_Response__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__srv__SetBool_Response__Sequence__init(example_interfaces__srv__SetBool_Response__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Response * data = NULL; - - if (size) { - data = (example_interfaces__srv__SetBool_Response *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__SetBool_Response), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__srv__SetBool_Response__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__srv__SetBool_Response__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__srv__SetBool_Response__Sequence__fini(example_interfaces__srv__SetBool_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) { - example_interfaces__srv__SetBool_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); - } -} - -example_interfaces__srv__SetBool_Response__Sequence * -example_interfaces__srv__SetBool_Response__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__SetBool_Response__Sequence * array = (example_interfaces__srv__SetBool_Response__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__SetBool_Response__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__srv__SetBool_Response__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__srv__SetBool_Response__Sequence__destroy(example_interfaces__srv__SetBool_Response__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__srv__SetBool_Response__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__srv__SetBool_Response__Sequence__are_equal(const example_interfaces__srv__SetBool_Response__Sequence * lhs, const example_interfaces__srv__SetBool_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 (!example_interfaces__srv__SetBool_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__srv__SetBool_Response__Sequence__copy( - const example_interfaces__srv__SetBool_Response__Sequence * input, - example_interfaces__srv__SetBool_Response__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__srv__SetBool_Response); - example_interfaces__srv__SetBool_Response * data = - (example_interfaces__srv__SetBool_Response *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__srv__SetBool_Response__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__srv__SetBool_Response__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__srv__SetBool_Response__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 83c8883f9..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__srv__SetBool_Request( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__srv__SetBool_Request( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool_Request)(); - -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// 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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__srv__SetBool_Response( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__srv__SetBool_Response( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, SetBool)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a0c1a8151..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/srv/detail/set_bool__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 example_interfaces -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::srv::SetBool_Request & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::srv::SetBool_Request & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::srv::SetBool_Request & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_SetBool_Request( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -// already included above -// #include "example_interfaces/srv/detail/set_bool__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 example_interfaces -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::srv::SetBool_Response & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::srv::SetBool_Response & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::srv::SetBool_Response & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_SetBool_Response( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_service_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, SetBool)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.h b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.h deleted file mode 100644 index 47f6d1e82..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.h +++ /dev/null @@ -1,64 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in srv/SetBool in the package example_interfaces. -typedef struct example_interfaces__srv__SetBool_Request -{ - bool data; -} example_interfaces__srv__SetBool_Request; - -// Struct for a sequence of example_interfaces__srv__SetBool_Request. -typedef struct example_interfaces__srv__SetBool_Request__Sequence -{ - example_interfaces__srv__SetBool_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__srv__SetBool_Request__Sequence; - - -// Constants defined in the message - -// Include directives for member types -// Member 'message' -#include "rosidl_runtime_c/string.h" - -// Struct defined in srv/SetBool in the package example_interfaces. -typedef struct example_interfaces__srv__SetBool_Response -{ - bool success; - rosidl_runtime_c__String message; -} example_interfaces__srv__SetBool_Response; - -// Struct for a sequence of example_interfaces__srv__SetBool_Response. -typedef struct example_interfaces__srv__SetBool_Response__Sequence -{ - example_interfaces__srv__SetBool_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__srv__SetBool_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.hpp deleted file mode 100644 index 9341f470c..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__struct.hpp +++ /dev/null @@ -1,274 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__srv__SetBool_Request __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__srv__SetBool_Request __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace srv -{ - -// message struct -template -struct SetBool_Request_ -{ - using Type = SetBool_Request_; - - explicit SetBool_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->data = false; - } - } - - explicit SetBool_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->data = false; - } - } - - // field types and members - using _data_type = - bool; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const bool & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::srv::SetBool_Request_ *; - using ConstRawPtr = - const example_interfaces::srv::SetBool_Request_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__srv__SetBool_Request - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__srv__SetBool_Request - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const SetBool_Request_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const SetBool_Request_ & other) const - { - return !this->operator==(other); - } -}; // struct SetBool_Request_ - -// alias to use template instance with default allocator -using SetBool_Request = - example_interfaces::srv::SetBool_Request_>; - -// constant definitions - -} // namespace srv - -} // namespace example_interfaces - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__srv__SetBool_Response __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__srv__SetBool_Response __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace srv -{ - -// message struct -template -struct SetBool_Response_ -{ - using Type = SetBool_Response_; - - explicit SetBool_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->success = false; - this->message = ""; - } - } - - explicit SetBool_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : message(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->success = false; - this->message = ""; - } - } - - // field types and members - using _success_type = - bool; - _success_type success; - using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _message_type message; - - // setters for named parameter idiom - Type & set__success( - const bool & _arg) - { - this->success = _arg; - return *this; - } - Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->message = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::srv::SetBool_Response_ *; - using ConstRawPtr = - const example_interfaces::srv::SetBool_Response_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__srv__SetBool_Response - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__srv__SetBool_Response - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const SetBool_Response_ & other) const - { - if (this->success != other.success) { - return false; - } - if (this->message != other.message) { - return false; - } - return true; - } - bool operator!=(const SetBool_Response_ & other) const - { - return !this->operator==(other); - } -}; // struct SetBool_Response_ - -// alias to use template instance with default allocator -using SetBool_Response = - example_interfaces::srv::SetBool_Response_>; - -// constant definitions - -} // namespace srv - -} // namespace example_interfaces - -namespace example_interfaces -{ - -namespace srv -{ - -struct SetBool -{ - using Request = example_interfaces::srv::SetBool_Request; - using Response = example_interfaces::srv::SetBool_Response; -}; - -} // namespace srv - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__traits.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__traits.hpp deleted file mode 100644 index b0c8240c8..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ - -#include "example_interfaces/srv/detail/set_bool__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::SetBool_Request"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/SetBool_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::SetBool_Response"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/SetBool_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::SetBool"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/SetBool"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.c b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.c deleted file mode 100644 index bbca8afda..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.c +++ /dev/null @@ -1,243 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:srv/SetBool.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/srv/detail/set_bool__functions.h" -#include "example_interfaces/srv/detail/set_bool__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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; - example_interfaces__srv__SetBool_Request__init(message_memory); -} - -void SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_fini_function(void * message_memory) -{ - example_interfaces__srv__SetBool_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__SetBool_Request, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members = { - "example_interfaces__srv", // message namespace - "SetBool_Request", // message name - 1, // number of fields - sizeof(example_interfaces__srv__SetBool_Request), - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array, // message members - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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 SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle = { - 0, - &SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Request)() { - if (!SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier) { - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/srv/detail/set_bool__functions.h" -// already included above -// #include "example_interfaces/srv/detail/set_bool__struct.h" - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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; - example_interfaces__srv__SetBool_Response__init(message_memory); -} - -void SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_fini_function(void * message_memory) -{ - example_interfaces__srv__SetBool_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__SetBool_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__SetBool_Response, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members = { - "example_interfaces__srv", // message namespace - "SetBool_Response", // message name - 2, // number of fields - sizeof(example_interfaces__srv__SetBool_Response), - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array, // message members - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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 SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle = { - 0, - &SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Response)() { - if (!SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier) { - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "example_interfaces/srv/detail/set_bool__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 example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_members = { - "example_interfaces__srv", // service namespace - "SetBool", // service name - // these two fields are initialized below on the first access - NULL, // request message - // example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle, - NULL // response message - // example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle = { - 0, - &example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, example_interfaces, srv, SetBool_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, SetBool)() { - if (!example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier) { - example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, example_interfaces, srv, SetBool_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, example_interfaces, srv, SetBool_Response)()->data; - } - - return &example_interfaces__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.cpp b/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.cpp deleted file mode 100644 index fc9d6adfc..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/set_bool__type_support.cpp +++ /dev/null @@ -1,347 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:srv/SetBool.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 "example_interfaces/srv/detail/set_bool__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 example_interfaces -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void SetBool_Request_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::srv::SetBool_Request(_init); -} - -void SetBool_Request_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~SetBool_Request(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Request_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::SetBool_Request, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers SetBool_Request_message_members = { - "example_interfaces::srv", // message namespace - "SetBool_Request", // message name - 1, // number of fields - sizeof(example_interfaces::srv::SetBool_Request), - SetBool_Request_message_member_array, // message members - SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Request_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t SetBool_Request_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_Request_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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, example_interfaces, srv, SetBool_Request)() { - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "example_interfaces/srv/detail/set_bool__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 example_interfaces -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void SetBool_Response_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::srv::SetBool_Response(_init); -} - -void SetBool_Response_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~SetBool_Response(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Response_message_member_array[2] = { - { - "success", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::SetBool_Response, success), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "message", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::SetBool_Response, message), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers SetBool_Response_message_members = { - "example_interfaces::srv", // message namespace - "SetBool_Response", // message name - 2, // number of fields - sizeof(example_interfaces::srv::SetBool_Response), - SetBool_Response_message_member_array, // message members - SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Response_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t SetBool_Response_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_Response_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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, example_interfaces, srv, SetBool_Response)() { - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "example_interfaces/srv/detail/set_bool__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 example_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 SetBool_service_members = { - "example_interfaces::srv", // service namespace - "SetBool", // service name - // these two fields are initialized below on the first access - // see get_service_type_support_handle() - nullptr, // request message - nullptr // response message -}; - -static const rosidl_service_type_support_t SetBool_service_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_service_members, - get_service_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_service_type_support_t * -get_service_type_support_handle() -{ - // get a handle to the value to be returned - auto service_type_support = - &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::SetBool_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( - 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< - ::example_interfaces::srv::SetBool_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< - ::example_interfaces::srv::SetBool_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, example_interfaces, srv, SetBool)() { - return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__builder.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__builder.hpp deleted file mode 100644 index 6605f7922..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__builder.hpp +++ /dev/null @@ -1,93 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ - -#include "example_interfaces/srv/detail/trigger__struct.hpp" -#include -#include -#include - - -namespace example_interfaces -{ - -namespace srv -{ - - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::srv::Trigger_Request>() -{ - return ::example_interfaces::srv::Trigger_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace example_interfaces - - -namespace example_interfaces -{ - -namespace srv -{ - -namespace builder -{ - -class Init_Trigger_Response_message -{ -public: - explicit Init_Trigger_Response_message(::example_interfaces::srv::Trigger_Response & msg) - : msg_(msg) - {} - ::example_interfaces::srv::Trigger_Response message(::example_interfaces::srv::Trigger_Response::_message_type arg) - { - msg_.message = std::move(arg); - return std::move(msg_); - } - -private: - ::example_interfaces::srv::Trigger_Response msg_; -}; - -class Init_Trigger_Response_success -{ -public: - Init_Trigger_Response_success() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Trigger_Response_message success(::example_interfaces::srv::Trigger_Response::_success_type arg) - { - msg_.success = std::move(arg); - return Init_Trigger_Response_message(msg_); - } - -private: - ::example_interfaces::srv::Trigger_Response msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::example_interfaces::srv::Trigger_Response>() -{ - return example_interfaces::srv::builder::Init_Trigger_Response_success(); -} - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__functions.c b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__functions.c deleted file mode 100644 index ec824136d..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__functions.c +++ /dev/null @@ -1,473 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice -#include "example_interfaces/srv/detail/trigger__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - -bool -example_interfaces__srv__Trigger_Request__init(example_interfaces__srv__Trigger_Request * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -example_interfaces__srv__Trigger_Request__fini(example_interfaces__srv__Trigger_Request * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -example_interfaces__srv__Trigger_Request__are_equal(const example_interfaces__srv__Trigger_Request * lhs, const example_interfaces__srv__Trigger_Request * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -example_interfaces__srv__Trigger_Request__copy( - const example_interfaces__srv__Trigger_Request * input, - example_interfaces__srv__Trigger_Request * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -example_interfaces__srv__Trigger_Request * -example_interfaces__srv__Trigger_Request__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Request * msg = (example_interfaces__srv__Trigger_Request *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Request), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__srv__Trigger_Request)); - bool success = example_interfaces__srv__Trigger_Request__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__srv__Trigger_Request__destroy(example_interfaces__srv__Trigger_Request * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__srv__Trigger_Request__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__srv__Trigger_Request__Sequence__init(example_interfaces__srv__Trigger_Request__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Request * data = NULL; - - if (size) { - data = (example_interfaces__srv__Trigger_Request *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__Trigger_Request), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__srv__Trigger_Request__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__srv__Trigger_Request__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__srv__Trigger_Request__Sequence__fini(example_interfaces__srv__Trigger_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) { - example_interfaces__srv__Trigger_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); - } -} - -example_interfaces__srv__Trigger_Request__Sequence * -example_interfaces__srv__Trigger_Request__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Request__Sequence * array = (example_interfaces__srv__Trigger_Request__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Request__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__srv__Trigger_Request__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__srv__Trigger_Request__Sequence__destroy(example_interfaces__srv__Trigger_Request__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__srv__Trigger_Request__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__srv__Trigger_Request__Sequence__are_equal(const example_interfaces__srv__Trigger_Request__Sequence * lhs, const example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__srv__Trigger_Request__Sequence__copy( - const example_interfaces__srv__Trigger_Request__Sequence * input, - example_interfaces__srv__Trigger_Request__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__srv__Trigger_Request); - example_interfaces__srv__Trigger_Request * data = - (example_interfaces__srv__Trigger_Request *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__srv__Trigger_Request__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__srv__Trigger_Request__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__srv__Trigger_Request__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -bool -example_interfaces__srv__Trigger_Response__init(example_interfaces__srv__Trigger_Response * msg) -{ - if (!msg) { - return false; - } - // success - // message - if (!rosidl_runtime_c__String__init(&msg->message)) { - example_interfaces__srv__Trigger_Response__fini(msg); - return false; - } - return true; -} - -void -example_interfaces__srv__Trigger_Response__fini(example_interfaces__srv__Trigger_Response * msg) -{ - if (!msg) { - return; - } - // success - // message - rosidl_runtime_c__String__fini(&msg->message); -} - -bool -example_interfaces__srv__Trigger_Response__are_equal(const example_interfaces__srv__Trigger_Response * lhs, const example_interfaces__srv__Trigger_Response * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // success - if (lhs->success != rhs->success) { - return false; - } - // message - if (!rosidl_runtime_c__String__are_equal( - &(lhs->message), &(rhs->message))) - { - return false; - } - return true; -} - -bool -example_interfaces__srv__Trigger_Response__copy( - const example_interfaces__srv__Trigger_Response * input, - example_interfaces__srv__Trigger_Response * output) -{ - if (!input || !output) { - return false; - } - // success - output->success = input->success; - // message - if (!rosidl_runtime_c__String__copy( - &(input->message), &(output->message))) - { - return false; - } - return true; -} - -example_interfaces__srv__Trigger_Response * -example_interfaces__srv__Trigger_Response__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Response * msg = (example_interfaces__srv__Trigger_Response *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Response), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(example_interfaces__srv__Trigger_Response)); - bool success = example_interfaces__srv__Trigger_Response__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -example_interfaces__srv__Trigger_Response__destroy(example_interfaces__srv__Trigger_Response * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - example_interfaces__srv__Trigger_Response__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -example_interfaces__srv__Trigger_Response__Sequence__init(example_interfaces__srv__Trigger_Response__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Response * data = NULL; - - if (size) { - data = (example_interfaces__srv__Trigger_Response *)allocator.zero_allocate(size, sizeof(example_interfaces__srv__Trigger_Response), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = example_interfaces__srv__Trigger_Response__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - example_interfaces__srv__Trigger_Response__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -example_interfaces__srv__Trigger_Response__Sequence__fini(example_interfaces__srv__Trigger_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) { - example_interfaces__srv__Trigger_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); - } -} - -example_interfaces__srv__Trigger_Response__Sequence * -example_interfaces__srv__Trigger_Response__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - example_interfaces__srv__Trigger_Response__Sequence * array = (example_interfaces__srv__Trigger_Response__Sequence *)allocator.allocate(sizeof(example_interfaces__srv__Trigger_Response__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = example_interfaces__srv__Trigger_Response__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -example_interfaces__srv__Trigger_Response__Sequence__destroy(example_interfaces__srv__Trigger_Response__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - example_interfaces__srv__Trigger_Response__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -example_interfaces__srv__Trigger_Response__Sequence__are_equal(const example_interfaces__srv__Trigger_Response__Sequence * lhs, const example_interfaces__srv__Trigger_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 (!example_interfaces__srv__Trigger_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -example_interfaces__srv__Trigger_Response__Sequence__copy( - const example_interfaces__srv__Trigger_Response__Sequence * input, - example_interfaces__srv__Trigger_Response__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(example_interfaces__srv__Trigger_Response); - example_interfaces__srv__Trigger_Response * data = - (example_interfaces__srv__Trigger_Response *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!example_interfaces__srv__Trigger_Response__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - example_interfaces__srv__Trigger_Response__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!example_interfaces__srv__Trigger_Response__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 13309a33e..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__srv__Trigger_Request( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__srv__Trigger_Request( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger_Request)(); - -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// 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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t get_serialized_size_example_interfaces__srv__Trigger_Response( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -size_t max_serialized_size_example_interfaces__srv__Trigger_Response( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, example_interfaces, srv, Trigger)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 6f142a9ad..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "example_interfaces/srv/detail/trigger__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 example_interfaces -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::srv::Trigger_Request & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::srv::Trigger_Request & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::srv::Trigger_Request & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Trigger_Request( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -// already included above -// #include "example_interfaces/srv/detail/trigger__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 example_interfaces -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_serialize( - const example_interfaces::srv::Trigger_Response & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - example_interfaces::srv::Trigger_Response & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -get_serialized_size( - const example_interfaces::srv::Trigger_Response & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -max_serialized_size_Trigger_Response( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace example_interfaces - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger_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 "example_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_example_interfaces -const rosidl_service_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, example_interfaces, srv, Trigger)(); - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.h b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.h deleted file mode 100644 index 77163d361..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.h +++ /dev/null @@ -1,64 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in srv/Trigger in the package example_interfaces. -typedef struct example_interfaces__srv__Trigger_Request -{ - uint8_t structure_needs_at_least_one_member; -} example_interfaces__srv__Trigger_Request; - -// Struct for a sequence of example_interfaces__srv__Trigger_Request. -typedef struct example_interfaces__srv__Trigger_Request__Sequence -{ - example_interfaces__srv__Trigger_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__srv__Trigger_Request__Sequence; - - -// Constants defined in the message - -// Include directives for member types -// Member 'message' -#include "rosidl_runtime_c/string.h" - -// Struct defined in srv/Trigger in the package example_interfaces. -typedef struct example_interfaces__srv__Trigger_Response -{ - bool success; - rosidl_runtime_c__String message; -} example_interfaces__srv__Trigger_Response; - -// Struct for a sequence of example_interfaces__srv__Trigger_Response. -typedef struct example_interfaces__srv__Trigger_Response__Sequence -{ - example_interfaces__srv__Trigger_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} example_interfaces__srv__Trigger_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_H_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.hpp deleted file mode 100644 index 3bc367835..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__struct.hpp +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__srv__Trigger_Request __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__srv__Trigger_Request __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace srv -{ - -// message struct -template -struct Trigger_Request_ -{ - using Type = Trigger_Request_; - - explicit Trigger_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->structure_needs_at_least_one_member = 0; - } - } - - explicit Trigger_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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::srv::Trigger_Request_ *; - using ConstRawPtr = - const example_interfaces::srv::Trigger_Request_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__srv__Trigger_Request - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__srv__Trigger_Request - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Trigger_Request_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Trigger_Request_ & other) const - { - return !this->operator==(other); - } -}; // struct Trigger_Request_ - -// alias to use template instance with default allocator -using Trigger_Request = - example_interfaces::srv::Trigger_Request_>; - -// constant definitions - -} // namespace srv - -} // namespace example_interfaces - - -#ifndef _WIN32 -# define DEPRECATED__example_interfaces__srv__Trigger_Response __attribute__((deprecated)) -#else -# define DEPRECATED__example_interfaces__srv__Trigger_Response __declspec(deprecated) -#endif - -namespace example_interfaces -{ - -namespace srv -{ - -// message struct -template -struct Trigger_Response_ -{ - using Type = Trigger_Response_; - - explicit Trigger_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->success = false; - this->message = ""; - } - } - - explicit Trigger_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : message(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->success = false; - this->message = ""; - } - } - - // field types and members - using _success_type = - bool; - _success_type success; - using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _message_type message; - - // setters for named parameter idiom - Type & set__success( - const bool & _arg) - { - this->success = _arg; - return *this; - } - Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->message = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - example_interfaces::srv::Trigger_Response_ *; - using ConstRawPtr = - const example_interfaces::srv::Trigger_Response_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__example_interfaces__srv__Trigger_Response - std::shared_ptr> - Ptr; - typedef DEPRECATED__example_interfaces__srv__Trigger_Response - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Trigger_Response_ & other) const - { - if (this->success != other.success) { - return false; - } - if (this->message != other.message) { - return false; - } - return true; - } - bool operator!=(const Trigger_Response_ & other) const - { - return !this->operator==(other); - } -}; // struct Trigger_Response_ - -// alias to use template instance with default allocator -using Trigger_Response = - example_interfaces::srv::Trigger_Response_>; - -// constant definitions - -} // namespace srv - -} // namespace example_interfaces - -namespace example_interfaces -{ - -namespace srv -{ - -struct Trigger -{ - using Request = example_interfaces::srv::Trigger_Request; - using Response = example_interfaces::srv::Trigger_Response; -}; - -} // namespace srv - -} // namespace example_interfaces - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__traits.hpp b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__traits.hpp deleted file mode 100644 index 912f8ee6e..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ -#define EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ - -#include "example_interfaces/srv/detail/trigger__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::Trigger_Request"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/Trigger_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::Trigger_Response"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/Trigger_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "example_interfaces::srv::Trigger"; -} - -template<> -inline const char * name() -{ - return "example_interfaces/srv/Trigger"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // EXAMPLE_INTERFACES__SRV__DETAIL__TRIGGER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.c b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.c deleted file mode 100644 index a4cc096f1..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.c +++ /dev/null @@ -1,243 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from example_interfaces:srv/Trigger.idl -// generated code does not contain a copyright notice - -#include -#include "example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h" -#include "example_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 "example_interfaces/srv/detail/trigger__functions.h" -#include "example_interfaces/srv/detail/trigger__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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; - example_interfaces__srv__Trigger_Request__init(message_memory); -} - -void Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_fini_function(void * message_memory) -{ - example_interfaces__srv__Trigger_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__Trigger_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members = { - "example_interfaces__srv", // message namespace - "Trigger_Request", // message name - 1, // number of fields - sizeof(example_interfaces__srv__Trigger_Request), - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array, // message members - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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 Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle = { - 0, - &Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Request)() { - if (!Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier) { - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "example_interfaces/srv/detail/trigger__rosidl_typesupport_introspection_c.h" -// already included above -// #include "example_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 "example_interfaces/srv/detail/trigger__functions.h" -// already included above -// #include "example_interfaces/srv/detail/trigger__struct.h" - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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; - example_interfaces__srv__Trigger_Response__init(message_memory); -} - -void Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_fini_function(void * message_memory) -{ - example_interfaces__srv__Trigger_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__Trigger_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces__srv__Trigger_Response, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members = { - "example_interfaces__srv", // message namespace - "Trigger_Response", // message name - 2, // number of fields - sizeof(example_interfaces__srv__Trigger_Response), - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array, // message members - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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 Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle = { - 0, - &Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Response)() { - if (!Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier) { - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "example_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "example_interfaces/srv/detail/trigger__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 example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_members = { - "example_interfaces__srv", // service namespace - "Trigger", // service name - // these two fields are initialized below on the first access - NULL, // request message - // example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle, - NULL // response message - // example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle = { - 0, - &example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, example_interfaces, srv, Trigger_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_example_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, example_interfaces, srv, Trigger)() { - if (!example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier) { - example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, example_interfaces, srv, Trigger_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, example_interfaces, srv, Trigger_Response)()->data; - } - - return &example_interfaces__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.cpp b/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.cpp deleted file mode 100644 index bf1c8c07e..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/detail/trigger__type_support.cpp +++ /dev/null @@ -1,347 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from example_interfaces:srv/Trigger.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 "example_interfaces/srv/detail/trigger__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 example_interfaces -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Trigger_Request_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::srv::Trigger_Request(_init); -} - -void Trigger_Request_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Trigger_Request(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::Trigger_Request, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Trigger_Request_message_members = { - "example_interfaces::srv", // message namespace - "Trigger_Request", // message name - 1, // number of fields - sizeof(example_interfaces::srv::Trigger_Request), - Trigger_Request_message_member_array, // message members - Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Request_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Trigger_Request_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_Request_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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, example_interfaces, srv, Trigger_Request)() { - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "example_interfaces/srv/detail/trigger__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 example_interfaces -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Trigger_Response_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) example_interfaces::srv::Trigger_Response(_init); -} - -void Trigger_Response_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Trigger_Response(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Response_message_member_array[2] = { - { - "success", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::Trigger_Response, success), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "message", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(example_interfaces::srv::Trigger_Response, message), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Trigger_Response_message_members = { - "example_interfaces::srv", // message namespace - "Trigger_Response", // message name - 2, // number of fields - sizeof(example_interfaces::srv::Trigger_Response), - Trigger_Response_message_member_array, // message members - Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Response_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Trigger_Response_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_Response_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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, example_interfaces, srv, Trigger_Response)() { - return &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "example_interfaces/srv/detail/trigger__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 example_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 Trigger_service_members = { - "example_interfaces::srv", // service namespace - "Trigger", // service name - // these two fields are initialized below on the first access - // see get_service_type_support_handle() - nullptr, // request message - nullptr // response message -}; - -static const rosidl_service_type_support_t Trigger_service_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_service_members, - get_service_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace example_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_service_type_support_t * -get_service_type_support_handle() -{ - // get a handle to the value to be returned - auto service_type_support = - &::example_interfaces::srv::rosidl_typesupport_introspection_cpp::Trigger_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( - 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< - ::example_interfaces::srv::Trigger_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< - ::example_interfaces::srv::Trigger_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, example_interfaces, srv, Trigger)() { - return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/example_interfaces/srv/set_bool.hpp b/ThirdParty/ros/include/example_interfaces/srv/set_bool.hpp deleted file mode 100644 index cef3a753b..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/set_bool.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ -#define EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ - -#include "example_interfaces/srv/detail/set_bool__struct.hpp" -#include "example_interfaces/srv/detail/set_bool__builder.hpp" -#include "example_interfaces/srv/detail/set_bool__traits.hpp" - -#endif // EXAMPLE_INTERFACES__SRV__SET_BOOL_HPP_ diff --git a/ThirdParty/ros/include/example_interfaces/srv/trigger.hpp b/ThirdParty/ros/include/example_interfaces/srv/trigger.hpp deleted file mode 100644 index dcc000c67..000000000 --- a/ThirdParty/ros/include/example_interfaces/srv/trigger.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ -#define EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ - -#include "example_interfaces/srv/detail/trigger__struct.hpp" -#include "example_interfaces/srv/detail/trigger__builder.hpp" -#include "example_interfaces/srv/detail/trigger__traits.hpp" - -#endif // EXAMPLE_INTERFACES__SRV__TRIGGER_HPP_ diff --git a/ThirdParty/ros/include/fastcdr/Cdr.h b/ThirdParty/ros/include/fastcdr/Cdr.h index 493a7cdc1..6e7bae10b 100644 --- a/ThirdParty/ros/include/fastcdr/Cdr.h +++ b/ThirdParty/ros/include/fastcdr/Cdr.h @@ -24,2918 +24,3534 @@ #include #include -#if !__APPLE__ +#if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__ #include #else #include -#endif +#endif // if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__ #if HAVE_CXX0X #include -#endif - -namespace eprosima +#endif // if HAVE_CXX0X + +namespace eprosima { +namespace fastcdr { +/*! + * @brief This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an eprosima::fastcdr::FastBuffer. + * @ingroup FASTCDRAPIREFERENCE + */ +class Cdr_DllAPI Cdr { - namespace fastcdr +public: + + //! @brief This enumeration represents the two kinds of CDR serialization supported by eprosima::fastcdr::CDR. + typedef enum { - /*! - * @brief This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an eprosima::fastcdr::FastBuffer. - * @ingroup FASTCDRAPIREFERENCE - */ - class Cdr_DllAPI Cdr - { - public: - - //! @brief This enumeration represents the two kinds of CDR serialization supported by eprosima::fastcdr::CDR. - typedef enum - { - //! @brief Common CORBA CDR serialization. - CORBA_CDR, - //! @brief DDS CDR serialization. - DDS_CDR - } CdrType; - - //! @brief This enumeration represents the two posible values of the flag that points if the content is a parameter list (only in DDS CDR). - typedef enum + //! @brief Common CORBA CDR serialization. + CORBA_CDR, + //! @brief DDS CDR serialization. + DDS_CDR + } CdrType; + + //! @brief This enumeration represents the two posible values of the flag that points if the content is a parameter list (only in DDS CDR). + #ifdef HAVE_CXX0X - : uint8_t -#endif - { - //! @brief Specifies that the content is not a parameter list. - DDS_CDR_WITHOUT_PL = 0x0, - //! @brief Specifies that the content is a parameter list. - DDS_CDR_WITH_PL = 0x2 - } DDSCdrPlFlag; - - /*! - * @brief This enumeration represents endianness types. - */ - typedef enum + typedef enum : uint8_t +#else + typedef enum +#endif // ifdef HAVE_CXX0X + { + //! @brief Specifies that the content is not a parameter list. + DDS_CDR_WITHOUT_PL = 0x0, + //! @brief Specifies that the content is a parameter list. + DDS_CDR_WITH_PL = 0x2 + } DDSCdrPlFlag; + + /*! + * @brief This enumeration represents endianness types. + */ #ifdef HAVE_CXX0X - : uint8_t -#endif - { - //! @brief Big endianness. - BIG_ENDIANNESS = 0x0, - //! @brief Little endianness. - LITTLE_ENDIANNESS = 0x1 - } Endianness; - - //! @brief Default endiness in the system. - static const Endianness DEFAULT_ENDIAN; - - /*! - * @brief This class stores the current state of a CDR serialization. - */ - class Cdr_DllAPI state - { - friend class Cdr; - public: - - /*! - * @brief Default constructor. - */ - state(const Cdr &cdr); - - /*! - * @brief Copy constructor. - */ - state(const state&); - - private: - - state& operator=(const state&) = delete; - - //! @brief The position in the buffer when the state was created. - const FastBuffer::iterator m_currentPosition; - - //! @brief The position from the aligment is calculated, when the state was created.. - const FastBuffer::iterator m_alignPosition; - - //! @brief This attribute specified if it is needed to swap the bytes when the state was created.. - bool m_swapBytes; - - //! @brief Stores the last datasize serialized/deserialized when the state was created. - size_t m_lastDataSize; - }; - - /*! - * @brief This constructor creates an eprosima::fastcdr::Cdr object that can serialize/deserialize - * the assigned buffer. - * - * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation. - * @param endianness The initial endianness that will be used. The default value is the endianness of the system. - * @param cdrType Represents the type of CDR that will be used in serialization/deserialization. The default value is CORBA CDR. - */ - Cdr(FastBuffer &cdrBuffer, const Endianness endianness = DEFAULT_ENDIAN, const CdrType cdrType = CORBA_CDR); - - /*! - * @brief This function reads the encapsulation of the CDR stream. - * If the CDR stream contains an encapsulation, then this function should be called before starting to deserialize. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - Cdr& read_encapsulation(); - - /*! - * @brief This function writes the encapsulation of the CDR stream. - * If the CDR stream should contain an encapsulation, then this function should be called before starting to serialize. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize_encapsulation(); - - /*! - * @brief This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. - * @return The flag that specifies if the content is a parameter list. - */ - DDSCdrPlFlag getDDSCdrPlFlag() const; - - /*! - * @brief This function sets the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. - * @param plFlag New value for the flag that specifies if the content is a parameter list. - */ - void setDDSCdrPlFlag(DDSCdrPlFlag plFlag); - - /*! - * @brief This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. - * @return The option flags. - */ - uint16_t getDDSCdrOptions() const; - - /*! - * @brief This function sets the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. - * @param options New value for the option flags. - */ - void setDDSCdrOptions(uint16_t options); - - /*! - * @brief This function sets the current endianness used by the CDR type. - * @param endianness The new endianness value. - */ - void changeEndianness(Endianness endianness); - - /*! - * @brief This function returns the current endianness used by the CDR type. - * @return The endianness. - */ - Endianness endianness() const { return static_cast(m_endianness); } - - /*! - * @brief This function skips a number of bytes in the CDR stream buffer. - * @param numBytes The number of bytes that will be jumped. - * @return True is returned when it works successfully. Otherwise, false is returned. - */ - bool jump(size_t numBytes); - - /*! - * @brief This function resets the current position in the buffer to the beginning. - */ - void reset(); - - /*! - * @brief This function returns the pointer to the current used buffer. - * @return Pointer to the starting position of the buffer. - */ - char* getBufferPointer(); - - /*! - * @brief This function returns the current position in the CDR stream. - * @return Pointer to the current position in the buffer. - */ - char* getCurrentPosition(); - - /*! - * @brief This function returns the length of the serialized data inside the stream. - * @return The length of the serialized data. - */ - inline size_t getSerializedDataLength() const { return m_currentPosition - m_cdrBuffer.begin();} - - /*! - * @brief Get the number of bytes needed to align a position to certain data size. - * @param current_alignment Position to be aligned. - * @param dataSize Size of next data to process (should be power of two). - * @return Number of required alignment bytes. - */ - inline static size_t alignment(size_t current_alignment, size_t dataSize) { return (dataSize - (current_alignment % dataSize)) & (dataSize-1);} - - /*! - * @brief This function returns the current state of the CDR serialization process. - * @return The current state of the CDR serialization process. - */ - state getState(); - - /*! - * @brief This function sets a previous state of the CDR serialization process; - * @param state Previous state that will be set. - */ - void setState(state &state); - - /*! - * @brief This function moves the alignment forward. - * @param numBytes The number of bytes the alignment should advance. - * @return True If alignment was moved successfully. - */ - bool moveAlignmentForward(size_t numBytes); - - /*! - * @brief This function resets the alignment to the current position in the buffer. - */ - inline void resetAlignment(){m_alignPosition = m_currentPosition;} - - /*! - * @brief This operator serializes an octet. - * @param octet_t The value of the octet that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const uint8_t octet_t){return serialize(octet_t);} - - /*! - * @brief This operator serializes a character. - * @param char_t The value of the character that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const char char_t){return serialize(char_t);} - - /*! - * @brief This operator serializes a int8_t. - * @param int8 The value of the int8_t that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const int8_t int8){return serialize(int8);} - - /*! - * @brief This operator serializes an unsigned short. - * @param ushort_t The value of the unsigned short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const uint16_t ushort_t){return serialize(ushort_t);} - - /*! - * @brief This operator serializes a short. - * @param short_t The value of the short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const int16_t short_t){return serialize(short_t);} - - /*! - * @brief This operator serializes an unsigned long. - * @param ulong_t The value of the unsigned long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const uint32_t ulong_t){return serialize(ulong_t);} - - /*! - * @brief This operator serializes a long. - * @param ulong_t The value of the long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const int32_t long_t){return serialize(long_t);} - - /*! - * @brief This operator serializes a wide-char. - * @param wchar The value of the wide-char that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const wchar_t wchar){return serialize(wchar);} - - /*! - * @brief This operator serializes an unsigned long long. - * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const uint64_t ulonglong_t){return serialize(ulonglong_t);} - - /*! - * @brief This operator serializes a long long. - * @param longlong_t The value of the long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const int64_t longlong_t){return serialize(longlong_t);} - - /*! - * @brief This operator serializes a float. - * @param float_t The value of the float that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const float float_t){return serialize(float_t);} - - /*! - * @brief This operator serializes a double. - * @param double_t The value of the double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const double double_t){return serialize(double_t);} - - /*! - * @brief This operator serializes a long double. - * @param ldouble_t The value of the long double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const long double ldouble_t){return serialize(ldouble_t);} - - /*! - * @brief This operator serializes a boolean. - * @param bool_t The value of the boolean that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const bool bool_t){return serialize(bool_t);} - - /*! - * @brief This operator serializes a null-terminated c-string. - * @param string_t Pointer to the begining of the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const char *string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a null-terminated c-string. - * @param string_t Pointer to the begining of the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(char *string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a string. - * @param string_t The string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const std::string &string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a wstring. - * @param string_t The wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& operator<<(const std::wstring &string_t){return serialize(string_t);} + typedef enum : uint8_t +#else + typedef enum +#endif // ifdef HAVE_CXX0X + { + //! @brief Big endianness. + BIG_ENDIANNESS = 0x0, + //! @brief Little endianness. + LITTLE_ENDIANNESS = 0x1 + } Endianness; + + //! @brief Default endiness in the system. + static const Endianness DEFAULT_ENDIAN; + + /*! + * @brief This class stores the current state of a CDR serialization. + */ + class Cdr_DllAPI state + { + friend class Cdr; + + public: + + /*! + * @brief Default constructor. + */ + state( + const Cdr& cdr); + + /*! + * @brief Copy constructor. + */ + state( + const state&); + + private: + + state& operator =( + const state&) = delete; + + //! @brief The position in the buffer when the state was created. + const FastBuffer::iterator m_currentPosition; + + //! @brief The position from the aligment is calculated, when the state was created.. + const FastBuffer::iterator m_alignPosition; + + //! @brief This attribute specified if it is needed to swap the bytes when the state was created.. + bool m_swapBytes; + + //! @brief Stores the last datasize serialized/deserialized when the state was created. + size_t m_lastDataSize; + }; + + /*! + * @brief This constructor creates an eprosima::fastcdr::Cdr object that can serialize/deserialize + * the assigned buffer. + * + * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation. + * @param endianness The initial endianness that will be used. The default value is the endianness of the system. + * @param cdrType Represents the type of CDR that will be used in serialization/deserialization. The default value is CORBA CDR. + */ + Cdr( + FastBuffer& cdrBuffer, + const Endianness endianness = DEFAULT_ENDIAN, + const CdrType cdrType = CORBA_CDR); + + /*! + * @brief This function reads the encapsulation of the CDR stream. + * If the CDR stream contains an encapsulation, then this function should be called before starting to deserialize. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + Cdr& read_encapsulation(); + + /*! + * @brief This function writes the encapsulation of the CDR stream. + * If the CDR stream should contain an encapsulation, then this function should be called before starting to serialize. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize_encapsulation(); + + /*! + * @brief This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. + * @return The flag that specifies if the content is a parameter list. + */ + DDSCdrPlFlag getDDSCdrPlFlag() const; + + /*! + * @brief This function sets the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. + * @param plFlag New value for the flag that specifies if the content is a parameter list. + */ + void setDDSCdrPlFlag( + DDSCdrPlFlag plFlag); + + /*! + * @brief This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. + * @return The option flags. + */ + uint16_t getDDSCdrOptions() const; + + /*! + * @brief This function sets the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. + * @param options New value for the option flags. + */ + void setDDSCdrOptions( + uint16_t options); + + /*! + * @brief This function sets the current endianness used by the CDR type. + * @param endianness The new endianness value. + */ + void changeEndianness( + Endianness endianness); + + /*! + * @brief This function returns the current endianness used by the CDR type. + * @return The endianness. + */ + Endianness endianness() const + { + return static_cast(m_endianness); + } + + /*! + * @brief This function skips a number of bytes in the CDR stream buffer. + * @param numBytes The number of bytes that will be jumped. + * @return True is returned when it works successfully. Otherwise, false is returned. + */ + bool jump( + size_t numBytes); + + /*! + * @brief This function resets the current position in the buffer to the beginning. + */ + void reset(); + + /*! + * @brief This function returns the pointer to the current used buffer. + * @return Pointer to the starting position of the buffer. + */ + char* getBufferPointer(); + + /*! + * @brief This function returns the current position in the CDR stream. + * @return Pointer to the current position in the buffer. + */ + char* getCurrentPosition(); + + /*! + * @brief This function returns the length of the serialized data inside the stream. + * @return The length of the serialized data. + */ + inline size_t getSerializedDataLength() const + { + return m_currentPosition - m_cdrBuffer.begin(); + } + + /*! + * @brief Get the number of bytes needed to align a position to certain data size. + * @param current_alignment Position to be aligned. + * @param dataSize Size of next data to process (should be power of two). + * @return Number of required alignment bytes. + */ + inline static size_t alignment( + size_t current_alignment, + size_t dataSize) + { + return (dataSize - (current_alignment % dataSize)) & (dataSize - 1); + } + + /*! + * @brief This function returns the current state of the CDR serialization process. + * @return The current state of the CDR serialization process. + */ + state getState(); + + /*! + * @brief This function sets a previous state of the CDR serialization process; + * @param state Previous state that will be set. + */ + void setState( + state& state); + + /*! + * @brief This function moves the alignment forward. + * @param numBytes The number of bytes the alignment should advance. + * @return True If alignment was moved successfully. + */ + bool moveAlignmentForward( + size_t numBytes); + + /*! + * @brief This function resets the alignment to the current position in the buffer. + */ + inline void resetAlignment() + { + m_alignPosition = m_currentPosition; + } + + /*! + * @brief This operator serializes an octet. + * @param octet_t The value of the octet that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const uint8_t octet_t) + { + return serialize(octet_t); + } + + /*! + * @brief This operator serializes a character. + * @param char_t The value of the character that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const char char_t) + { + return serialize(char_t); + } + + /*! + * @brief This operator serializes a int8_t. + * @param int8 The value of the int8_t that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const int8_t int8) + { + return serialize(int8); + } + + /*! + * @brief This operator serializes an unsigned short. + * @param ushort_t The value of the unsigned short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const uint16_t ushort_t) + { + return serialize(ushort_t); + } + + /*! + * @brief This operator serializes a short. + * @param short_t The value of the short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const int16_t short_t) + { + return serialize(short_t); + } + + /*! + * @brief This operator serializes an unsigned long. + * @param ulong_t The value of the unsigned long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const uint32_t ulong_t) + { + return serialize(ulong_t); + } + + /*! + * @brief This operator serializes a long. + * @param long_t The value of the long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const int32_t long_t) + { + return serialize(long_t); + } + + /*! + * @brief This operator serializes a wide-char. + * @param wchar The value of the wide-char that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const wchar_t wchar) + { + return serialize(wchar); + } + + /*! + * @brief This operator serializes an unsigned long long. + * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const uint64_t ulonglong_t) + { + return serialize(ulonglong_t); + } + + /*! + * @brief This operator serializes a long long. + * @param longlong_t The value of the long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const int64_t longlong_t) + { + return serialize(longlong_t); + } + + /*! + * @brief This operator serializes a float. + * @param float_t The value of the float that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const float float_t) + { + return serialize(float_t); + } + + /*! + * @brief This operator serializes a double. + * @param double_t The value of the double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const double double_t) + { + return serialize(double_t); + } + + /*! + * @brief This operator serializes a long double. + * @param ldouble_t The value of the long double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const long double ldouble_t) + { + return serialize(ldouble_t); + } + + /*! + * @brief This operator serializes a boolean. + * @param bool_t The value of the boolean that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const bool bool_t) + { + return serialize(bool_t); + } + + /*! + * @brief This operator serializes a null-terminated c-string. + * @param string_t Pointer to the begining of the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const char* string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a null-terminated c-string. + * @param string_t Pointer to the begining of the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + char* string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a string. + * @param string_t The string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const std::string& string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a wstring. + * @param string_t The wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& operator <<( + const std::wstring& string_t) + { + return serialize(string_t); + } #if HAVE_CXX0X - /*! - * @brief This operator template is used to serialize arrays. - * @param array_t The array that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator<<(const std::array<_T, _Size> &array_t){return serialize<_T, _Size>(array_t);} -#endif - - /*! - * @brief This operator template is used to serialize sequences. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator<<(const std::vector<_T> &vector_t){return serialize<_T>(vector_t);} - - /*! - * @brief This operator template is used to serialize maps. - * @param map_t The map that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator<<(const std::map<_K, _T> &map_t){return serialize<_K, _T>(map_t);} - - /*! - * @brief This operator template is used to serialize any other non-basic type. - * @param type_t A reference to the object that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator<<(const _T &type_t) - { - type_t.serialize(*this); - return *this; - } - - /*! - * @brief This operator deserializes an octet. - * @param octet_t The variable that will store the octet read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(uint8_t &octet_t){return deserialize(octet_t);} - - /*! - * @brief This operator deserializes a character. - * @param char_t The variable that will store the character read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(char &char_t){return deserialize(char_t);} - - /*! - * @brief This operator deserializes a int8_t. - * @param int8 The variable that will store the int8_t read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(int8_t &int8){return deserialize(int8);} - - /*! - * @brief This operator deserializes an unsigned short. - * @param ushort_t The variable that will store the unsigned short read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(uint16_t &ushort_t){return deserialize(ushort_t);} - - /*! - * @brief This operator deserializes a short. - * @param short_t The variable that will store the short read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(int16_t &short_t){return deserialize(short_t);} - - /*! - * @brief This operator deserializes an unsigned long. - * @param ulong_t The variable that will store the unsigned long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(uint32_t &ulong_t){return deserialize(ulong_t);} - - /*! - * @brief This operator deserializes a long. - * @param long_t The variable that will store the long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(int32_t &long_t){return deserialize(long_t);} - - // TODO in FastCdr - /*! - * @brief This operator deserializes a wide-char. - * @param wchar The variable that will store the wide-char read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(wchar_t &wchar){return deserialize(wchar);} - - /*! - * @brief This operator deserializes a unsigned long long. - * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(uint64_t &ulonglong_t){return deserialize(ulonglong_t);} - - /*! - * @brief This operator deserializes a long long. - * @param longlong_t The variable that will store the long long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(int64_t &longlong_t){return deserialize(longlong_t);} - - /*! - * @brief This operator deserializes a float. - * @param float_t The variable that will store the float read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(float &float_t){return deserialize(float_t);} - - /*! - * @brief This operator deserializes a double. - * @param double_t The variable that will store the double read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(double &double_t){return deserialize(double_t);} - - /*! - * @brief This operator deserializes a long double. - * @param ldouble_t The variable that will store the long double read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(long double &ldouble_t){return deserialize(ldouble_t);} - - /*! - * @brief This operator deserializes a boolean. - * @param bool_t The variable that will store the boolean read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - inline Cdr& operator>>(bool &bool_t){return deserialize(bool_t);} - - /*! - * @brief This operator deserializes a null-terminated c-string. - * @param string_t The variable that will store the c-string read from the buffer. - * Please note that a newly allocated string will be returned. - * The caller should free the returned pointer when appropiate. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - inline Cdr& operator>>(char *&string_t){return deserialize(string_t);} - - /*! - * @brief This operator deserializes a string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(std::string &string_t){return deserialize(string_t);} - - /*! - * @brief This operator deserializes a string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline Cdr& operator>>(std::wstring &string_t){return deserialize(string_t);} + /*! + * @brief This operator template is used to serialize arrays. + * @param array_t The array that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator <<( + const std::array<_T, _Size>& array_t) + { + return serialize<_T, _Size>(array_t); + } + +#endif // if HAVE_CXX0X + + /*! + * @brief This operator template is used to serialize sequences. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator <<( + const std::vector<_T>& vector_t) + { + return serialize<_T>(vector_t); + } + + /*! + * @brief This operator template is used to serialize maps. + * @param map_t The map that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator <<( + const std::map<_K, _T>& map_t) + { + return serialize<_K, _T>(map_t); + } + + /*! + * @brief This operator template is used to serialize any other non-basic type. + * @param type_t A reference to the object that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator <<( + const _T& type_t) + { + type_t.serialize(*this); + return *this; + } + + /*! + * @brief This operator deserializes an octet. + * @param octet_t The variable that will store the octet read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + uint8_t& octet_t) + { + return deserialize(octet_t); + } + + /*! + * @brief This operator deserializes a character. + * @param char_t The variable that will store the character read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + char& char_t) + { + return deserialize(char_t); + } + + /*! + * @brief This operator deserializes a int8_t. + * @param int8 The variable that will store the int8_t read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + int8_t& int8) + { + return deserialize(int8); + } + + /*! + * @brief This operator deserializes an unsigned short. + * @param ushort_t The variable that will store the unsigned short read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + uint16_t& ushort_t) + { + return deserialize(ushort_t); + } + + /*! + * @brief This operator deserializes a short. + * @param short_t The variable that will store the short read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + int16_t& short_t) + { + return deserialize(short_t); + } + + /*! + * @brief This operator deserializes an unsigned long. + * @param ulong_t The variable that will store the unsigned long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + uint32_t& ulong_t) + { + return deserialize(ulong_t); + } + + /*! + * @brief This operator deserializes a long. + * @param long_t The variable that will store the long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + int32_t& long_t) + { + return deserialize(long_t); + } + + // TODO in FastCdr + /*! + * @brief This operator deserializes a wide-char. + * @param wchar The variable that will store the wide-char read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + wchar_t& wchar) + { + return deserialize(wchar); + } + + /*! + * @brief This operator deserializes a unsigned long long. + * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + uint64_t& ulonglong_t) + { + return deserialize(ulonglong_t); + } + + /*! + * @brief This operator deserializes a long long. + * @param longlong_t The variable that will store the long long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + int64_t& longlong_t) + { + return deserialize(longlong_t); + } + + /*! + * @brief This operator deserializes a float. + * @param float_t The variable that will store the float read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + float& float_t) + { + return deserialize(float_t); + } + + /*! + * @brief This operator deserializes a double. + * @param double_t The variable that will store the double read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + double& double_t) + { + return deserialize(double_t); + } + + /*! + * @brief This operator deserializes a long double. + * @param ldouble_t The variable that will store the long double read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + long double& ldouble_t) + { + return deserialize(ldouble_t); + } + + /*! + * @brief This operator deserializes a boolean. + * @param bool_t The variable that will store the boolean read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + inline Cdr& operator >>( + bool& bool_t) + { + return deserialize(bool_t); + } + + /*! + * @brief This operator deserializes a null-terminated c-string. + * @param string_t The variable that will store the c-string read from the buffer. + * Please note that a newly allocated string will be returned. + * The caller should free the returned pointer when appropiate. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + inline Cdr& operator >>( + char*& string_t) + { + return deserialize(string_t); + } + + /*! + * @brief This operator deserializes a string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + std::string& string_t) + { + return deserialize(string_t); + } + + /*! + * @brief This operator deserializes a string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline Cdr& operator >>( + std::wstring& string_t) + { + return deserialize(string_t); + } #if HAVE_CXX0X - /*! - * @brief This operator template is used to deserialize arrays. - * @param array_t The variable that will store the array read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator>>(std::array<_T, _Size> &array_t){return deserialize<_T, _Size>(array_t);} -#endif - - /*! - * @brief This operator template is used to deserialize sequences. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator>>(std::vector<_T> &vector_t){return deserialize<_T>(vector_t);} - - /*! - * @brief This operator template is used to deserialize maps. - * @param map_t The variable that will store the map read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator>>(std::map<_K, _T> &map_t){return deserialize<_K, _T>(map_t);} - - /*! - * @brief This operator template is used to deserialize any other non-basic type. - * @param type_t The variable that will store the object read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& operator>>(_T &type_t) - { - type_t.deserialize(*this); - return *this; - } - - /*! - * @brief This function serializes an octet. - * @param octet_t The value of the octet that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint8_t octet_t) - { - return serialize(static_cast(octet_t)); - } - - /*! - * @brief This function serializes an octet with a different endianness. - * @param octet_t The value of the octet that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint8_t octet_t, Endianness endianness) - { - return serialize(static_cast(octet_t), endianness); - } - - /*! - * @brief This function serializes a character. - * @param char_t The value of the character that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const char char_t); - - /*! - * @brief This function serializes a character with a different endianness. - * @param char_t The value of the character that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const char char_t, Endianness /*endianness*/) - { - return serialize(char_t); - } - - /*! - * @brief This function serializes an int8_t. - * @param int8 The value of the int8_t that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const int8_t int8) - { - return serialize(static_cast(int8)); - } - - /*! - * @brief This function serializes an int8_t with a different endianness. - * @param octet_t The value of the int8_t that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const int8_t int8, Endianness endianness) - { - return serialize(static_cast(int8), endianness); - } - - /*! - * @brief This function serializes an unsigned short. - * @param ushort_t The value of the unsigned short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint16_t ushort_t) - { - return serialize(static_cast(ushort_t)); - } - - /*! - * @brief This function serializes an unsigned short with a different endianness. - * @param ushort_t The value of the unsigned short that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint16_t ushort_t, Endianness endianness) - { - return serialize(static_cast(ushort_t), endianness); - } - - /*! - * @brief This function serializes a short. - * @param short_t The value of the short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int16_t short_t); - - /*! - * @brief This function serializes a short with a different endianness. - * @param short_t The value of the short that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int16_t short_t, Endianness endianness); - - /*! - * @brief This function serializes an unsigned long. - * @param ulong_t The value of the unsigned long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint32_t ulong_t) - { - return serialize(static_cast(ulong_t)); - } - - /*! - * @brief This function serializes an unsigned long with a different endianness. - * @param ulong_t The value of the unsigned long that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint32_t ulong_t, Endianness endianness) - { - return serialize(static_cast(ulong_t), endianness); - } - - /*! - * @brief This function serializes a long. - * @param long_t The value of the long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int32_t long_t); - - /*! - * @brief This function serializes a long with a different endianness. - * @param long_t The value of the long that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int32_t long_t, Endianness endianness); - - /*! - * @brief This function serializes a wide-char. - * @param wchar The value of the wide-char that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const wchar_t wchar) - { - return serialize(static_cast(wchar)); - } - - /*! - * @brief This function serializes a wide-char with a different endianness. - * @param wchar The value of the wide-char that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const wchar_t wchar, Endianness endianness) - { - return serialize(static_cast(wchar), endianness); - } - - /*! - * @brief This function serializes an unsigned long long. - * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint64_t ulonglong_t) - { - return serialize(static_cast(ulonglong_t)); - } - - /*! - * @brief This function serializes an unsigned long long with a different endianness. - * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const uint64_t ulonglong_t, Endianness endianness) - { - return serialize(static_cast(ulonglong_t), endianness); - } - - /*! - * @brief This function serializes a long long. - * @param longlong_t The value of the long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int64_t longlong_t); - - /*! - * @brief This function serializes a long long with a different endianness. - * @param longlong_t The value of the long long that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const int64_t longlong_t, Endianness endianness); - - /*! - * @brief This function serializes a float. - * @param float_t The value of the float that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const float float_t); - - /*! - * @brief This function serializes a float with a different endianness. - * @param float_t The value of the float that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const float float_t, Endianness endianness); - - /*! - * @brief This function serializes a double. - * @param double_t The value of the double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const double double_t); - - /*! - * @brief This function serializes a double with a different endianness. - * @param double_t The value of the double that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const double double_t, Endianness endianness); - - - /*! - * @brief This function serializes a long double. - * @param ldouble_t The value of the long double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. - */ - Cdr& serialize(const long double ldouble_t); - - /*! - * @brief This function serializes a long double with a different endianness. - * @param ldouble_t The value of the long double that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. - */ - Cdr& serialize(const long double ldouble_t, Endianness endianness); - - /*! - * @brief This function serializes a boolean. - * @param bool_t The value of the boolean that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const bool bool_t); - - /*! - * @brief This function serializes a boolean with a different endianness. - * @param bool_t The value of the boolean that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const bool bool_t, Endianness /*endianness*/) - { - return serialize(bool_t); - } - - /*! - * @brief This function serializes a string. - * @param string_t The pointer to the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline Cdr& serialize(char *string_t) { return serialize(static_cast(string_t)); } - - /*! - * @brief This function serializes a string. - * @param string_t The pointer to the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const char *string_t); - - /*! - * @brief This function serializes a wstring. - * @param string_t The pointer to the wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const wchar_t *string_t); - - /*! - * @brief This function serializes a string with a different endianness. - * @param string_t The pointer to the string that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const char *string_t, Endianness endianness); - - /*! - * @brief This function serializes a wstring with a different endianness. - * @param string_t The pointer to the wstring that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serialize(const wchar_t *string_t, Endianness endianness); - - /*! - * @brief This function serializes a std::string. - * @param string_t The string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const std::string &string_t) {return serialize(string_t.c_str());} - - /*! - * @brief This function serializes a std::wstring. - * @param string_t The wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const std::wstring &string_t) {return serialize(string_t.c_str());} - - /*! - * @brief This function serializes a std::string with a different endianness. - * @param string_t The string that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serialize(const std::string &string_t, Endianness endianness) {return serialize(string_t.c_str(), endianness);} + /*! + * @brief This operator template is used to deserialize arrays. + * @param array_t The variable that will store the array read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator >>( + std::array<_T, _Size>& array_t) + { + return deserialize<_T, _Size>(array_t); + } + +#endif // if HAVE_CXX0X + + /*! + * @brief This operator template is used to deserialize sequences. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator >>( + std::vector<_T>& vector_t) + { + return deserialize<_T>(vector_t); + } + + /*! + * @brief This operator template is used to deserialize maps. + * @param map_t The variable that will store the map read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator >>( + std::map<_K, _T>& map_t) + { + return deserialize<_K, _T>(map_t); + } + + /*! + * @brief This operator template is used to deserialize any other non-basic type. + * @param type_t The variable that will store the object read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& operator >>( + _T& type_t) + { + type_t.deserialize(*this); + return *this; + } + + /*! + * @brief This function serializes an octet. + * @param octet_t The value of the octet that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint8_t octet_t) + { + return serialize(static_cast(octet_t)); + } + + /*! + * @brief This function serializes an octet with a different endianness. + * @param octet_t The value of the octet that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint8_t octet_t, + Endianness endianness) + { + return serialize(static_cast(octet_t), endianness); + } + + /*! + * @brief This function serializes a character. + * @param char_t The value of the character that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const char char_t); + + /*! + * @brief This function serializes a character with a different endianness. + * @param char_t The value of the character that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const char char_t, + Endianness endianness) + { + (void) endianness; + return serialize(char_t); + } + + /*! + * @brief This function serializes an int8_t. + * @param int8 The value of the int8_t that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const int8_t int8) + { + return serialize(static_cast(int8)); + } + + /*! + * @brief This function serializes an int8_t with a different endianness. + * @param int8 The value of the int8_t that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const int8_t int8, + Endianness endianness) + { + return serialize(static_cast(int8), endianness); + } + + /*! + * @brief This function serializes an unsigned short. + * @param ushort_t The value of the unsigned short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint16_t ushort_t) + { + return serialize(static_cast(ushort_t)); + } + + /*! + * @brief This function serializes an unsigned short with a different endianness. + * @param ushort_t The value of the unsigned short that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint16_t ushort_t, + Endianness endianness) + { + return serialize(static_cast(ushort_t), endianness); + } + + /*! + * @brief This function serializes a short. + * @param short_t The value of the short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int16_t short_t); + + /*! + * @brief This function serializes a short with a different endianness. + * @param short_t The value of the short that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int16_t short_t, + Endianness endianness); + + /*! + * @brief This function serializes an unsigned long. + * @param ulong_t The value of the unsigned long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint32_t ulong_t) + { + return serialize(static_cast(ulong_t)); + } + + /*! + * @brief This function serializes an unsigned long with a different endianness. + * @param ulong_t The value of the unsigned long that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint32_t ulong_t, + Endianness endianness) + { + return serialize(static_cast(ulong_t), endianness); + } + + /*! + * @brief This function serializes a long. + * @param long_t The value of the long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int32_t long_t); + + /*! + * @brief This function serializes a long with a different endianness. + * @param long_t The value of the long that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int32_t long_t, + Endianness endianness); + + /*! + * @brief This function serializes a wide-char. + * @param wchar The value of the wide-char that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const wchar_t wchar) + { + return serialize(static_cast(wchar)); + } + + /*! + * @brief This function serializes a wide-char with a different endianness. + * @param wchar The value of the wide-char that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const wchar_t wchar, + Endianness endianness) + { + return serialize(static_cast(wchar), endianness); + } + + /*! + * @brief This function serializes an unsigned long long. + * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint64_t ulonglong_t) + { + return serialize(static_cast(ulonglong_t)); + } + + /*! + * @brief This function serializes an unsigned long long with a different endianness. + * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const uint64_t ulonglong_t, + Endianness endianness) + { + return serialize(static_cast(ulonglong_t), endianness); + } + + /*! + * @brief This function serializes a long long. + * @param longlong_t The value of the long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int64_t longlong_t); + + /*! + * @brief This function serializes a long long with a different endianness. + * @param longlong_t The value of the long long that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const int64_t longlong_t, + Endianness endianness); + + /*! + * @brief This function serializes a float. + * @param float_t The value of the float that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const float float_t); + + /*! + * @brief This function serializes a float with a different endianness. + * @param float_t The value of the float that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const float float_t, + Endianness endianness); + + /*! + * @brief This function serializes a double. + * @param double_t The value of the double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const double double_t); + + /*! + * @brief This function serializes a double with a different endianness. + * @param double_t The value of the double that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const double double_t, + Endianness endianness); + + + /*! + * @brief This function serializes a long double. + * @param ldouble_t The value of the long double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. + */ + Cdr& serialize( + const long double ldouble_t); + + /*! + * @brief This function serializes a long double with a different endianness. + * @param ldouble_t The value of the long double that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. + */ + Cdr& serialize( + const long double ldouble_t, + Endianness endianness); + + /*! + * @brief This function serializes a boolean. + * @param bool_t The value of the boolean that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const bool bool_t); + + /*! + * @brief This function serializes a boolean with a different endianness. + * @param bool_t The value of the boolean that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const bool bool_t, + Endianness endianness) + { + (void) endianness; + return serialize(bool_t); + } + + /*! + * @brief This function serializes a string. + * @param string_t The pointer to the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline Cdr& serialize( + char* string_t) + { + return serialize(static_cast(string_t)); + } + + /*! + * @brief This function serializes a string. + * @param string_t The pointer to the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const char* string_t); + + /*! + * @brief This function serializes a wstring. + * @param string_t The pointer to the wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const wchar_t* string_t); + + /*! + * @brief This function serializes a string with a different endianness. + * @param string_t The pointer to the string that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const char* string_t, + Endianness endianness); + + /*! + * @brief This function serializes a wstring with a different endianness. + * @param string_t The pointer to the wstring that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serialize( + const wchar_t* string_t, + Endianness endianness); + + /*! + * @brief This function serializes a std::string. + * @param string_t The string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const std::string& string_t) + { + return serialize(string_t.c_str()); + } + + /*! + * @brief This function serializes a std::wstring. + * @param string_t The wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const std::wstring& string_t) + { + return serialize(string_t.c_str()); + } + + /*! + * @brief This function serializes a std::string with a different endianness. + * @param string_t The string that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serialize( + const std::string& string_t, + Endianness endianness) + { + return serialize(string_t.c_str(), endianness); + } #if HAVE_CXX0X - /*! - * @brief This function template serializes an array. - * @param array_t The array that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& serialize(const std::array<_T, _Size> &array_t) - { return serializeArray(array_t.data(), array_t.size());} - - /*! - * @brief This function template serializes an array with a different endianness. - * @param array_t The array that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& serialize(const std::array<_T, _Size> &array_t, Endianness endianness) - { return serializeArray(array_t.data(), array_t.size(), endianness);} -#endif + /*! + * @brief This function template serializes an array. + * @param array_t The array that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& serialize( + const std::array<_T, _Size>& array_t) + { + return serializeArray(array_t.data(), array_t.size()); + } + + /*! + * @brief This function template serializes an array with a different endianness. + * @param array_t The array that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& serialize( + const std::array<_T, _Size>& array_t, + Endianness endianness) + { + return serializeArray(array_t.data(), array_t.size(), endianness); + } + +#endif // if HAVE_CXX0X #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template serializes a sequence of booleans. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serialize(const std::vector &vector_t) - { - return serializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template serializes a sequence. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serialize(const std::vector<_T> &vector_t) - { - state state_before_error(*this); - - *this << static_cast(vector_t.size()); - - try - { - return serializeArray(vector_t.data(), vector_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template serializes a map. - * @param map_t The map that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serialize(const std::map<_K, _T> &map_t) - { - state state_(*this); - - *this << static_cast(map_t.size()); - - try - { - for (auto it_pair = map_t.begin(); it_pair != map_t.end(); ++it_pair) - { - *this << it_pair->first; - *this << it_pair->second; - } - //return serializeArray(map_t.data(), map_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_); - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template serializes a sequence of booleans. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serialize( + const std::vector& vector_t) + { + return serializeBoolSequence(vector_t); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template serializes a sequence. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serialize( + const std::vector<_T>& vector_t) + { + state state_before_error(*this); + + *this << static_cast(vector_t.size()); + + try + { + return serializeArray(vector_t.data(), vector_t.size()); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template serializes a map. + * @param map_t The map that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serialize( + const std::map<_K, _T>& map_t) + { + state state_(*this); + + *this << static_cast(map_t.size()); + + try + { + for (auto it_pair = map_t.begin(); it_pair != map_t.end(); ++it_pair) + { + *this << it_pair->first; + *this << it_pair->second; + } + //return serializeArray(map_t.data(), map_t.size()); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_); + ex.raise(); + } + + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template serializes a sequence of booleans. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template<> - Cdr& serialize(const std::vector &vector_t) - { - return serializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template serializes a sequence with a different endianness. - * @param vector_t The sequence that will be serialized in the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serialize(const std::vector<_T> &vector_t, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - serialize(vector_t); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template serializes a non-basic object. - * @param type_t The object that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - inline Cdr& serialize(const _T &type_t) - { - type_t.serialize(*this); - return *this; - } - - /*! - * @brief This function serializes an array of octets. - * @param octet_t The sequence of octets that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint8_t *octet_t, size_t numElements) - { - return serializeArray(reinterpret_cast(octet_t), numElements); - } - - /*! - * @brief This function serializes an array of octets with a different endianness. - * @param octet_t The array of octets that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint8_t *octet_t, size_t numElements, Endianness /*endianness*/) - { - return serializeArray(reinterpret_cast(octet_t), numElements); - } - - /*! - * @brief This function serializes an array of characters. - * @param char_t The array of characters that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const char *char_t, size_t numElements); - - /*! - * @brief This function serializes an array of characters with a different endianness. - * @param char_t The array of characters that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const char *char_t, size_t numElements, Endianness /*endianness*/) - { - return serializeArray(char_t, numElements); - } - - /*! - * @brief This function serializes an array of int8_t. - * @param int8 The sequence of int8_t that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const int8_t *int8, size_t numElements) - { - return serializeArray(reinterpret_cast(int8), numElements); - } - - /*! - * @brief This function serializes an array of int8_t with a different endianness. - * @param int8 The array of int8_t that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const int8_t *int8, size_t numElements, Endianness /*endianness*/) - { - return serializeArray(reinterpret_cast(int8), numElements); - } - - /*! - * @brief This function serializes an array of unsigned shorts. - * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint16_t *ushort_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ushort_t), numElements); - } - - /*! - * @brief This function serializes an array of unsigned shorts with a different endianness. - * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint16_t *ushort_t, size_t numElements, Endianness endianness) - { - return serializeArray(reinterpret_cast(ushort_t), numElements, endianness); - } - - /*! - * @brief This function serializes an array of shorts. - * @param short_t The array of shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int16_t *short_t, size_t numElements); - - /*! - * @brief This function serializes an array of shorts with a different endianness. - * @param short_t The array of shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int16_t *short_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of unsigned longs. - * @param ulong_t The array of unsigned longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint32_t *ulong_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ulong_t), numElements); - } - - /*! - * @brief This function serializes an array of unsigned longs with a different endianness. - * @param ulong_t The array of unsigned longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint32_t *ulong_t, size_t numElements, Endianness endianness) - { - return serializeArray(reinterpret_cast(ulong_t), numElements, endianness); - } - - /*! - * @brief This function serializes an array of longs. - * @param long_t The array of longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int32_t *long_t, size_t numElements); - - /*! - * @brief This function serializes an array of longs with a different endianness. - * @param long_t The array of longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int32_t *long_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of wide-chars. - * @param wchar The array of wide-chars that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const wchar_t *wchar, size_t numElements); - - /*! - * @brief This function serializes an array of wide-chars with a different endianness. - * @param wchar The array of longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const wchar_t *wchar, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of unsigned long longs. - * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ulonglong_t), numElements); - } - - /*! - * @brief This function serializes an array of unsigned long longs with a different endianness. - * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements, Endianness endianness) - { - return serializeArray(reinterpret_cast(ulonglong_t), numElements, endianness); - } - - /*! - * @brief This function serializes an array of long longs. - * @param longlong_t The array of long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int64_t *longlong_t, size_t numElements); - - /*! - * @brief This function serializes an array of long longs with a different endianness. - * @param longlong_t The array of long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const int64_t *longlong_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of floats. - * @param float_t The array of floats that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const float *float_t, size_t numElements); - - /*! - * @brief This function serializes an array of floats with a different endianness. - * @param float_t The array of floats that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const float *float_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of doubles. - * @param double_t The array of doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const double *double_t, size_t numElements); - - /*! - * @brief This function serializes an array of doubles with a different endianness. - * @param double_t The array of doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const double *double_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of long doubles. - * @param ldouble_t The array of long doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const long double *ldouble_t, size_t numElements); - - /*! - * @brief This function serializes an array of long doubles with a different endianness. - * @param ldouble_t The array of long doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const long double *ldouble_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function serializes an array of booleans. - * @param bool_t The array of booleans that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - Cdr& serializeArray(const bool *bool_t, size_t numElements); - - /*! - * @brief This function serializes an array of booleans with a different endianness. - * @param bool_t The array of booleans that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const bool *bool_t, size_t numElements, Endianness /*endianness*/) - { - return serializeArray(bool_t, numElements); - } - - /*! - * @brief This function serializes an array of strings. - * @param string_t The array of strings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const std::string *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(string_t[count].c_str()); - return *this; - } - - /*! - * @brief This function serializes an array of wide-strings. - * @param string_t The array of wide-strings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const std::wstring *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(string_t[count].c_str()); - return *this; - } - - /*! - * @brief This function serializes an array of strings with a different endianness. - * @param string_t The array of strings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const std::string *string_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - serializeArray(string_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function serializes an array of wide-strings with a different endianness. - * @param string_t The array of wide-strings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - inline - Cdr& serializeArray(const std::wstring *string_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - serializeArray(string_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template serializes an array of sequences of objects. - * @param vector_t The array of sequences of objects that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeArray(const std::vector<_T> *vector_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(vector_t[count]); - return *this; - } - - /*! - * @brief This function template serializes an array of non-basic objects. - * @param type_t The array of objects that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeArray(const _T *type_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - type_t[count].serialize(*this); - return *this; - } - - /*! - * @brief This function template serializes an array of non-basic objects with a different endianness. - * @param type_t The array of objects that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeArray(const _T *type_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - serializeArray(type_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template serializes a raw sequence. - * @param sequence_t Pointer to the sequence that will be serialized in the buffer. - * @param numElements The number of elements contained in the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeSequence(const _T *sequence_t, size_t numElements) - { - state state_before_error(*this); - - serialize(static_cast(numElements)); - - try - { - return serializeArray(sequence_t, numElements); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template serializes a raw sequence with a different endianness. - * @param sequence_t Pointer to the sequence that will be serialized in the buffer. - * @param numElements The number of elements contained in the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeSequence(const _T *sequence_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - serializeSequence(sequence_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function deserializes an octet. - * @param octet_t The variable that will store the octet read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint8_t &octet_t) - { - return deserialize(reinterpret_cast(octet_t)); - } - - /*! - * @brief This function deserializes an octet with a different endianness. - * @param octet_t The variable that will store the octet read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint8_t &octet_t, Endianness endianness) - { - return deserialize(reinterpret_cast(octet_t), endianness); - } - - /*! - * @brief This function deserializes a character. - * @param char_t The variable that will store the character read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(char &char_t); - - /*! - * @brief This function deserializes a character with a different endianness. - * @param char_t The variable that will store the character read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(char &char_t, Endianness /*endianness*/) - { - return deserialize(char_t); - } - - /*! - * @brief This function deserializes an int8_t. - * @param int8 The variable that will store the int8_t read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(int8_t &int8) - { - return deserialize(reinterpret_cast(int8)); - } - - /*! - * @brief This function deserializes an int8_t with a different endianness. - * @param int8 The variable that will store the int8_t read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(int8_t &int8, Endianness endianness) - { - return deserialize(reinterpret_cast(int8), endianness); - } - - /*! - * @brief This function deserializes an unsigned short. - * @param ushort_t The variable that will store the unsigned short read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint16_t &ushort_t) - { - return deserialize(reinterpret_cast(ushort_t)); - } - - /*! - * @brief This function deserializes an unsigned short with a different endianness. - * @param ushort_t The variable that will store the unsigned short read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint16_t &ushort_t, Endianness endianness) - { - return deserialize(reinterpret_cast(ushort_t), endianness); - } - - /*! - * @brief This function deserializes a short. - * @param short_t The variable that will store the short read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int16_t &short_t); - - /*! - * @brief This function deserializes a short with a different endianness. - * @param short_t The variable that will store the short read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int16_t &short_t, Endianness endianness); - - /*! - * @brief This function deserializes an unsigned long. - * @param ulong_t The variable that will store the unsigned long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint32_t &ulong_t) - { - return deserialize(reinterpret_cast(ulong_t)); - } - - /*! - * @brief This function deserializes an unsigned long with a different endianness. - * @param ulong_t The variable that will store the unsigned long read from the buffer.. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint32_t &ulong_t, Endianness endianness) - { - return deserialize(reinterpret_cast(ulong_t), endianness); - } - - /*! - * @brief This function deserializes a long. - * @param long_t The variable that will store the long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int32_t &long_t); - - /*! - * @brief This function deserializes a long with a different endianness. - * @param long_t The variable that will store the long read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int32_t &long_t, Endianness endianness); - - /*! - * @brief This function deserializes a wide-char. - * @param wchar The variable that will store the wide-char read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(wchar_t &wchar) - { - uint32_t ret; - deserialize(ret); - wchar = static_cast(ret); - return *this; - } - - /*! - * @brief This function deserializes a wide-char with a different endianness. - * @param wchar The variable that will store the wide-char read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(wchar_t &wchar, Endianness endianness) - { - uint32_t ret; - deserialize(ret, endianness); - wchar = static_cast(ret); - return *this; - } - - /*! - * @brief This function deserializes an unsigned long long. - * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint64_t &ulonglong_t) - { - return deserialize(reinterpret_cast(ulonglong_t)); - } - - /*! - * @brief This function deserializes an unsigned long long with a different endianness. - * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(uint64_t &ulonglong_t, Endianness endianness) - { - return deserialize(reinterpret_cast(ulonglong_t), endianness); - } - - /*! - * @brief This function deserializes a long long. - * @param longlong_t The variable that will store the long long read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int64_t &longlong_t); - - /*! - * @brief This function deserializes a long long with a different endianness. - * @param longlong_t The variable that will store the long long read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(int64_t &longlong_t, Endianness endianness); - - /*! - * @brief This function deserializes a float. - * @param float_t The variable that will store the float read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(float &float_t); - - /*! - * @brief This function deserializes a float with a different endianness. - * @param float_t The variable that will store the float read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(float &float_t, Endianness endianness); - - /*! - * @brief This function deserializes a double. - * @param double_t The variable that will store the double read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(double &double_t); - - /*! - * @brief This function deserializes a double with a different endianness. - * @param double_t The variable that will store the double read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(double &double_t, Endianness endianness); - - /*! - * @brief This function deserializes a long double. - * @param ldouble_t The variable that will store the long double read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. - */ - Cdr& deserialize(long double &ldouble_t); - - /*! - * @brief This function deserializes a long double with a different endianness. - * @param ldouble_t The variable that will store the long double read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. - */ - Cdr& deserialize(long double &ldouble_t, Endianness endianness); - - /*! - * @brief This function deserializes a boolean. - * @param bool_t The variable that will store the boolean read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - Cdr& deserialize(bool &bool_t); - - /*! - * @brief This function deserializes a boolean with a different endianness. - * @param bool_t The variable that will store the boolean read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - inline - Cdr& deserialize(bool &bool_t, Endianness /*endianness*/) - { - return deserialize(bool_t); - }; - - /*! - * @brief This function deserializes a string. - * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(char *&string_t); - - /*! - * @brief This function deserializes a wide string. - * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the wide string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(wchar_t *&string_t); - - /*! - * @brief This function deserializes a string with a different endianness. - * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(char *&string_t, Endianness endianness); - - /*! - * @brief This function deserializes a wide string with a different endianness. - * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the wide string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserialize(wchar_t *&string_t, Endianness endianness); - - /*! - * @brief This function deserializes a std::string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(std::string &string_t) - { - uint32_t length = 0; - const char *str = readString(length); - string_t = std::string(str, length); - return *this; - } - - /*! - * @brief This function deserializes a std::string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(std::wstring &string_t) - { - uint32_t length = 0; - string_t = readWString(length); - return *this; - } - - /*! - * @brief This function deserializes a string with a different endianness. - * @param string_t The variable that will store the string read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(std::string &string_t, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserialize(string_t); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function deserializes a string with a different endianness. - * @param string_t The variable that will store the string read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserialize(std::wstring &string_t, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserialize(string_t); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template serializes a sequence of booleans. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template<> + Cdr& serialize( + const std::vector& vector_t) + { + return serializeBoolSequence(vector_t); + } + +#endif // ifdef _MSC_VER + + /*! + * @brief This function template serializes a sequence with a different endianness. + * @param vector_t The sequence that will be serialized in the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serialize( + const std::vector<_T>& vector_t, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + serialize(vector_t); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template serializes a non-basic object. + * @param type_t The object that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + inline Cdr& serialize( + const _T& type_t) + { + type_t.serialize(*this); + return *this; + } + + /*! + * @brief This function serializes an array of octets. + * @param octet_t The sequence of octets that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint8_t* octet_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(octet_t), numElements); + } + + /*! + * @brief This function serializes an array of octets with a different endianness. + * @param octet_t The array of octets that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint8_t* octet_t, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return serializeArray(reinterpret_cast(octet_t), numElements); + } + + /*! + * @brief This function serializes an array of characters. + * @param char_t The array of characters that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const char* char_t, + size_t numElements); + + /*! + * @brief This function serializes an array of characters with a different endianness. + * @param char_t The array of characters that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const char* char_t, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return serializeArray(char_t, numElements); + } + + /*! + * @brief This function serializes an array of int8_t. + * @param int8 The sequence of int8_t that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const int8_t* int8, + size_t numElements) + { + return serializeArray(reinterpret_cast(int8), numElements); + } + + /*! + * @brief This function serializes an array of int8_t with a different endianness. + * @param int8 The array of int8_t that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const int8_t* int8, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return serializeArray(reinterpret_cast(int8), numElements); + } + + /*! + * @brief This function serializes an array of unsigned shorts. + * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint16_t* ushort_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ushort_t), numElements); + } + + /*! + * @brief This function serializes an array of unsigned shorts with a different endianness. + * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint16_t* ushort_t, + size_t numElements, + Endianness endianness) + { + return serializeArray(reinterpret_cast(ushort_t), numElements, endianness); + } + + /*! + * @brief This function serializes an array of shorts. + * @param short_t The array of shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int16_t* short_t, + size_t numElements); + + /*! + * @brief This function serializes an array of shorts with a different endianness. + * @param short_t The array of shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int16_t* short_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of unsigned longs. + * @param ulong_t The array of unsigned longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint32_t* ulong_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ulong_t), numElements); + } + + /*! + * @brief This function serializes an array of unsigned longs with a different endianness. + * @param ulong_t The array of unsigned longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint32_t* ulong_t, + size_t numElements, + Endianness endianness) + { + return serializeArray(reinterpret_cast(ulong_t), numElements, endianness); + } + + /*! + * @brief This function serializes an array of longs. + * @param long_t The array of longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int32_t* long_t, + size_t numElements); + + /*! + * @brief This function serializes an array of longs with a different endianness. + * @param long_t The array of longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int32_t* long_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of wide-chars. + * @param wchar The array of wide-chars that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const wchar_t* wchar, + size_t numElements); + + /*! + * @brief This function serializes an array of wide-chars with a different endianness. + * @param wchar The array of longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const wchar_t* wchar, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of unsigned long longs. + * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint64_t* ulonglong_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ulonglong_t), numElements); + } + + /*! + * @brief This function serializes an array of unsigned long longs with a different endianness. + * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const uint64_t* ulonglong_t, + size_t numElements, + Endianness endianness) + { + return serializeArray(reinterpret_cast(ulonglong_t), numElements, endianness); + } + + /*! + * @brief This function serializes an array of long longs. + * @param longlong_t The array of long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int64_t* longlong_t, + size_t numElements); + + /*! + * @brief This function serializes an array of long longs with a different endianness. + * @param longlong_t The array of long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const int64_t* longlong_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of floats. + * @param float_t The array of floats that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const float* float_t, + size_t numElements); + + /*! + * @brief This function serializes an array of floats with a different endianness. + * @param float_t The array of floats that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const float* float_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of doubles. + * @param double_t The array of doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const double* double_t, + size_t numElements); + + /*! + * @brief This function serializes an array of doubles with a different endianness. + * @param double_t The array of doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const double* double_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of long doubles. + * @param ldouble_t The array of long doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const long double* ldouble_t, + size_t numElements); + + /*! + * @brief This function serializes an array of long doubles with a different endianness. + * @param ldouble_t The array of long doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const long double* ldouble_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function serializes an array of booleans. + * @param bool_t The array of booleans that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + Cdr& serializeArray( + const bool* bool_t, + size_t numElements); + + /*! + * @brief This function serializes an array of booleans with a different endianness. + * @param bool_t The array of booleans that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const bool* bool_t, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return serializeArray(bool_t, numElements); + } + + /*! + * @brief This function serializes an array of strings. + * @param string_t The array of strings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const std::string* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(string_t[count].c_str()); + } + return *this; + } + + /*! + * @brief This function serializes an array of wide-strings. + * @param string_t The array of wide-strings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const std::wstring* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(string_t[count].c_str()); + } + return *this; + } + + /*! + * @brief This function serializes an array of strings with a different endianness. + * @param string_t The array of strings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const std::string* string_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + serializeArray(string_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function serializes an array of wide-strings with a different endianness. + * @param string_t The array of wide-strings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + inline + Cdr& serializeArray( + const std::wstring* string_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + serializeArray(string_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template serializes an array of sequences of objects. + * @param vector_t The array of sequences of objects that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeArray( + const std::vector<_T>* vector_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(vector_t[count]); + } + return *this; + } + + /*! + * @brief This function template serializes an array of non-basic objects. + * @param type_t The array of objects that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeArray( + const _T* type_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + type_t[count].serialize(*this); + } + return *this; + } + + /*! + * @brief This function template serializes an array of non-basic objects with a different endianness. + * @param type_t The array of objects that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeArray( + const _T* type_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + serializeArray(type_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template serializes a raw sequence. + * @param sequence_t Pointer to the sequence that will be serialized in the buffer. + * @param numElements The number of elements contained in the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeSequence( + const _T* sequence_t, + size_t numElements) + { + state state_before_error(*this); + + serialize(static_cast(numElements)); + + try + { + return serializeArray(sequence_t, numElements); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template serializes a raw sequence with a different endianness. + * @param sequence_t Pointer to the sequence that will be serialized in the buffer. + * @param numElements The number of elements contained in the sequence. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeSequence( + const _T* sequence_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + serializeSequence(sequence_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function deserializes an octet. + * @param octet_t The variable that will store the octet read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint8_t& octet_t) + { + return deserialize(reinterpret_cast(octet_t)); + } + + /*! + * @brief This function deserializes an octet with a different endianness. + * @param octet_t The variable that will store the octet read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint8_t& octet_t, + Endianness endianness) + { + return deserialize(reinterpret_cast(octet_t), endianness); + } + + /*! + * @brief This function deserializes a character. + * @param char_t The variable that will store the character read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + char& char_t); + + /*! + * @brief This function deserializes a character with a different endianness. + * @param char_t The variable that will store the character read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + char& char_t, + Endianness endianness) + { + (void) endianness; + return deserialize(char_t); + } + + /*! + * @brief This function deserializes an int8_t. + * @param int8 The variable that will store the int8_t read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + int8_t& int8) + { + return deserialize(reinterpret_cast(int8)); + } + + /*! + * @brief This function deserializes an int8_t with a different endianness. + * @param int8 The variable that will store the int8_t read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + int8_t& int8, + Endianness endianness) + { + return deserialize(reinterpret_cast(int8), endianness); + } + + /*! + * @brief This function deserializes an unsigned short. + * @param ushort_t The variable that will store the unsigned short read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint16_t& ushort_t) + { + return deserialize(reinterpret_cast(ushort_t)); + } + + /*! + * @brief This function deserializes an unsigned short with a different endianness. + * @param ushort_t The variable that will store the unsigned short read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint16_t& ushort_t, + Endianness endianness) + { + return deserialize(reinterpret_cast(ushort_t), endianness); + } + + /*! + * @brief This function deserializes a short. + * @param short_t The variable that will store the short read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int16_t& short_t); + + /*! + * @brief This function deserializes a short with a different endianness. + * @param short_t The variable that will store the short read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int16_t& short_t, + Endianness endianness); + + /*! + * @brief This function deserializes an unsigned long. + * @param ulong_t The variable that will store the unsigned long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint32_t& ulong_t) + { + return deserialize(reinterpret_cast(ulong_t)); + } + + /*! + * @brief This function deserializes an unsigned long with a different endianness. + * @param ulong_t The variable that will store the unsigned long read from the buffer.. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint32_t& ulong_t, + Endianness endianness) + { + return deserialize(reinterpret_cast(ulong_t), endianness); + } + + /*! + * @brief This function deserializes a long. + * @param long_t The variable that will store the long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int32_t& long_t); + + /*! + * @brief This function deserializes a long with a different endianness. + * @param long_t The variable that will store the long read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int32_t& long_t, + Endianness endianness); + + /*! + * @brief This function deserializes a wide-char. + * @param wchar The variable that will store the wide-char read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + wchar_t& wchar) + { + uint32_t ret; + deserialize(ret); + wchar = static_cast(ret); + return *this; + } + + /*! + * @brief This function deserializes a wide-char with a different endianness. + * @param wchar The variable that will store the wide-char read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + wchar_t& wchar, + Endianness endianness) + { + uint32_t ret; + deserialize(ret, endianness); + wchar = static_cast(ret); + return *this; + } + + /*! + * @brief This function deserializes an unsigned long long. + * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint64_t& ulonglong_t) + { + return deserialize(reinterpret_cast(ulonglong_t)); + } + + /*! + * @brief This function deserializes an unsigned long long with a different endianness. + * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + uint64_t& ulonglong_t, + Endianness endianness) + { + return deserialize(reinterpret_cast(ulonglong_t), endianness); + } + + /*! + * @brief This function deserializes a long long. + * @param longlong_t The variable that will store the long long read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int64_t& longlong_t); + + /*! + * @brief This function deserializes a long long with a different endianness. + * @param longlong_t The variable that will store the long long read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + int64_t& longlong_t, + Endianness endianness); + + /*! + * @brief This function deserializes a float. + * @param float_t The variable that will store the float read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + float& float_t); + + /*! + * @brief This function deserializes a float with a different endianness. + * @param float_t The variable that will store the float read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + float& float_t, + Endianness endianness); + + /*! + * @brief This function deserializes a double. + * @param double_t The variable that will store the double read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + double& double_t); + + /*! + * @brief This function deserializes a double with a different endianness. + * @param double_t The variable that will store the double read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + double& double_t, + Endianness endianness); + + /*! + * @brief This function deserializes a long double. + * @param ldouble_t The variable that will store the long double read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. + */ + Cdr& deserialize( + long double& ldouble_t); + + /*! + * @brief This function deserializes a long double with a different endianness. + * @param ldouble_t The variable that will store the long double read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @note Due to internal representation differences, WIN32 and *NIX like systems are not compatible. + */ + Cdr& deserialize( + long double& ldouble_t, + Endianness endianness); + + /*! + * @brief This function deserializes a boolean. + * @param bool_t The variable that will store the boolean read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + Cdr& deserialize( + bool& bool_t); + + /*! + * @brief This function deserializes a boolean with a different endianness. + * @param bool_t The variable that will store the boolean read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + inline + Cdr& deserialize( + bool& bool_t, + Endianness endianness) + { + (void) endianness; + return deserialize(bool_t); + } + + /*! + * @brief This function deserializes a string. + * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the string read from the buffer. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + char*& string_t); + + /*! + * @brief This function deserializes a wide string. + * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the wide string read from the buffer. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + wchar_t*& string_t); + + /*! + * @brief This function deserializes a string with a different endianness. + * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the string read from the buffer. + * @param endianness Endianness that will be used in the deserialization of this value. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + char*& string_t, + Endianness endianness); + + /*! + * @brief This function deserializes a wide string with a different endianness. + * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the wide string read from the buffer. + * @param endianness Endianness that will be used in the deserialization of this value. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserialize( + wchar_t*& string_t, + Endianness endianness); + + /*! + * @brief This function deserializes a std::string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + std::string& string_t) + { + uint32_t length = 0; + const char* str = readString(length); + string_t = std::string(str, length); + return *this; + } + + /*! + * @brief This function deserializes a std::string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + std::wstring& string_t) + { + uint32_t length = 0; + string_t = readWString(length); + return *this; + } + + /*! + * @brief This function deserializes a string with a different endianness. + * @param string_t The variable that will store the string read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + std::string& string_t, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserialize(string_t); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function deserializes a string with a different endianness. + * @param string_t The variable that will store the string read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserialize( + std::wstring& string_t, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserialize(string_t); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } #if HAVE_CXX0X - /*! - * @brief This function template deserializes an array. - * @param array_t The variable that will store the array read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& deserialize(std::array<_T, _Size> &array_t) - { return deserializeArray(array_t.data(), array_t.size());} - - /*! - * @brief This function template deserializes an array with a different endianness. - * @param array_t The variable that will store the array read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& deserialize(std::array<_T, _Size> &array_t, Endianness endianness) - { return deserializeArray(array_t.data(), array_t.size(), endianness);} -#endif + /*! + * @brief This function template deserializes an array. + * @param array_t The variable that will store the array read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& deserialize( + std::array<_T, _Size>& array_t) + { + return deserializeArray(array_t.data(), array_t.size()); + } + + /*! + * @brief This function template deserializes an array with a different endianness. + * @param array_t The variable that will store the array read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& deserialize( + std::array<_T, _Size>& array_t, + Endianness endianness) + { + return deserializeArray(array_t.data(), array_t.size(), endianness); + } + +#endif // if HAVE_CXX0X #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template deserializes a sequence. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserialize(std::vector &vector_t) - { - return deserializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template deserializes a sequence. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserialize(std::vector<_T> &vector_t) - { - uint32_t seqLength = 0; - state state_before_error(*this); - - *this >> seqLength; - - try - { - vector_t.resize(seqLength); - return deserializeArray(vector_t.data(), vector_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template deserializes a map. - * @param map_t The variable that will store the map read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserialize(std::map<_K, _T> &map_t) - { - uint32_t seqLength = 0; - state state_(*this); - - *this >> seqLength; - - try - { - //map_t.resize(seqLength); - _K key; - _T value; - for (uint32_t i = 0; i < seqLength; ++i) - { - *this >> key; - *this >> value; - map_t.emplace(std::pair<_K, _T>(key, value)); - } - //return deserializeArray(vector_t.data(), vector_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_); - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template deserializes a sequence. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserialize( + std::vector& vector_t) + { + return deserializeBoolSequence(vector_t); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template deserializes a sequence. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserialize( + std::vector<_T>& vector_t) + { + uint32_t seqLength = 0; + state state_before_error(*this); + + *this >> seqLength; + + if (seqLength == 0) + { + vector_t.clear(); + return *this; + } + + if ((m_lastPosition - m_currentPosition) < seqLength) + { + setState(state_before_error); + throw eprosima::fastcdr::exception::NotEnoughMemoryException( + eprosima::fastcdr::exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + try + { + vector_t.resize(seqLength); + return deserializeArray(vector_t.data(), vector_t.size()); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template deserializes a map. + * @param map_t The variable that will store the map read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserialize( + std::map<_K, _T>& map_t) + { + uint32_t seqLength = 0; + state state_(*this); + + *this >> seqLength; + + try + { + for (uint32_t i = 0; i < seqLength; ++i) + { + _K key; + _T value; + *this >> key; + *this >> value; + map_t.emplace(std::pair<_K, _T>(std::move(key), std::move(value))); + } + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_); + ex.raise(); + } + + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template deserializes a sequence. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template<> - Cdr& deserialize(std::vector &vector_t) - { - return deserializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template deserializes a sequence with a different endianness. - * @param vector_t The variable that will store the sequence read from the buffer. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserialize(std::vector<_T> &vector_t, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserialize(vector_t); - m_swapBytes = auxSwap; - } - catch(exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function template deserializes a non-basic object. - * @param type_t The variable that will store the object read from the buffer. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - inline Cdr& deserialize(_T &type_t) - { - type_t.deserialize(*this); - return *this; - } - - /*! - * @brief This function deserializes an array of octets. - * @param octet_t The variable that will store the array of octets read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint8_t *octet_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(octet_t), numElements); - } - - /*! - * @brief This function deserializes an array of octets with a different endianness. - * @param octet_t The variable that will store the array of octets read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint8_t *octet_t, size_t numElements, Endianness endianness) - { - return deserializeArray(reinterpret_cast(octet_t), numElements, endianness); - } - - /*! - * @brief This function deserializes an array of characters. - * @param char_t The variable that will store the array of characters read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(char *char_t, size_t numElements); - - /*! - * @brief This function deserializes an array of characters with a different endianness. - * @param char_t The variable that will store the array of characters read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(char *char_t, size_t numElements, Endianness /*endianness*/) - { - return deserializeArray(char_t, numElements); - } - - /*! - * @brief This function deserializes an array of int8_t. - * @param int8 The variable that will store the array of int8_t read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(int8_t *int8, size_t numElements) - { - return deserializeArray(reinterpret_cast(int8), numElements); - } - - /*! - * @brief This function deserializes an array of int8_t with a different endianness. - * @param int8 The variable that will store the array of int8_t read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(int8_t *int8, size_t numElements, Endianness endianness) - { - return deserializeArray(reinterpret_cast(int8), numElements, endianness); - } - - /*! - * @brief This function deserializes an array of unsigned shorts. - * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint16_t *ushort_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ushort_t), numElements); - } - - /*! - * @brief This function deserializes an array of unsigned shorts with a different endianness. - * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint16_t *ushort_t, size_t numElements, Endianness endianness) - { - return deserializeArray(reinterpret_cast(ushort_t), numElements, endianness); - } - - /*! - * @brief This function deserializes an array of shorts. - * @param short_t The variable that will store the array of shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int16_t *short_t, size_t numElements); - - /*! - * @brief This function deserializes an array of shorts with a different endianness. - * @param short_t The variable that will store the array of shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int16_t *short_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of unsigned longs. - * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint32_t *ulong_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ulong_t), numElements); - } - - /*! - * @brief This function deserializes an array of unsigned longs with a different endianness. - * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint32_t *ulong_t, size_t numElements, Endianness endianness) - { - return deserializeArray(reinterpret_cast(ulong_t), numElements, endianness); - } - - /*! - * @brief This function deserializes an array of longs. - * @param long_t The variable that will store the array of longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int32_t *long_t, size_t numElements); - - /*! - * @brief This function deserializes an array of longs with a different endianness. - * @param long_t The variable that will store the array of longs read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int32_t *long_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of wide-chars. - * @param wchar The variable that will store the array of wide-chars read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(wchar_t *wchar, size_t numElements); - - /*! - * @brief This function deserializes an array of wide-chars with a different endianness. - * @param wchar The variable that will store the array of wide-chars read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(wchar_t *wchar, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of unsigned long longs. - * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ulonglong_t), numElements); - } - - /*! - * @brief This function deserializes an array of unsigned long longs with a different endianness. - * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements, Endianness endianness) - { - return deserializeArray(reinterpret_cast(ulonglong_t), numElements, endianness); - } - - /*! - * @brief This function deserializes an array of long longs. - * @param longlong_t The variable that will store the array of long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int64_t *longlong_t, size_t numElements); - - /*! - * @brief This function deserializes an array of long longs with a different endianness. - * @param longlong_t The variable that will store the array of long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(int64_t *longlong_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of floats. - * @param float_t The variable that will store the array of floats read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(float *float_t, size_t numElements); - - /*! - * @brief This function deserializes an array of floats with a different endianness. - * @param float_t The variable that will store the array of floats read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(float *float_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of doubles. - * @param double_t The variable that will store the array of doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(double *double_t, size_t numElements); - - /*! - * @brief This function deserializes an array of doubles with a different endianness. - * @param double_t The variable that will store the array of doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(double *double_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of long doubles. - * @param ldouble_t The variable that will store the array of long doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(long double *ldouble_t, size_t numElements); - - /*! - * @brief This function deserializes an array of long doubles with a different endianness. - * @param ldouble_t The variable that will store the array of long doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(long double *ldouble_t, size_t numElements, Endianness endianness); - - /*! - * @brief This function deserializes an array of booleans. - * @param bool_t The variable that will store the array of booleans read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - Cdr& deserializeArray(bool *bool_t, size_t numElements); - - /*! - * @brief This function deserializes an array of booleans with a different endianness. - * @param bool_t The variable that will store the array of booleans read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(bool *bool_t, size_t numElements, Endianness /*endianness*/) - { - return deserializeArray(bool_t, numElements); - } - - /*! - * @brief This function deserializes an array of strings. - * @param string_t The variable that will store the array of strings read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(std::string *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(string_t[count]); - return *this; - } - - /*! - * @brief This function deserializes an array of wide-strings. - * @param string_t The variable that will store the array of wide-strings read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(std::wstring *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(string_t[count]); - return *this; - } - - /*! - * @brief This function deserializes an array of strings with a different endianness. - * @param string_t The variable that will store the array of strings read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(std::string *string_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserializeArray(string_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function deserializes an array of wide-strings with a different endianness. - * @param string_t The variable that will store the array of wide-strings read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - inline - Cdr& deserializeArray(std::wstring *string_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserializeArray(string_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function deserializes an array of sequences of objects. - * @param string_t The variable that will store the array of sequences of objects read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeArray(std::vector<_T> *vector_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(vector_t[count]); - return *this; - } - - /*! - * @brief This function template deserializes an array of non-basic objects. - * @param type_t The variable that will store the array of objects read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeArray(_T *type_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - type_t[count].deserialize(*this); - return *this; - } - - /*! - * @brief This function template deserializes an array of non-basic objects with a different endianness. - * @param type_t The variable that will store the array of objects read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeArray(_T *type_t, size_t numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserializeArray(type_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template deserializes a sequence. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template<> + Cdr& deserialize( + std::vector& vector_t) + { + return deserializeBoolSequence(vector_t); + } + +#endif // ifdef _MSC_VER + + /*! + * @brief This function template deserializes a sequence with a different endianness. + * @param vector_t The variable that will store the sequence read from the buffer. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserialize( + std::vector<_T>& vector_t, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserialize(vector_t); + m_swapBytes = auxSwap; + } + catch (exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function template deserializes a non-basic object. + * @param type_t The variable that will store the object read from the buffer. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + inline Cdr& deserialize( + _T& type_t) + { + type_t.deserialize(*this); + return *this; + } + + /*! + * @brief This function deserializes an array of octets. + * @param octet_t The variable that will store the array of octets read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint8_t* octet_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(octet_t), numElements); + } + + /*! + * @brief This function deserializes an array of octets with a different endianness. + * @param octet_t The variable that will store the array of octets read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint8_t* octet_t, + size_t numElements, + Endianness endianness) + { + return deserializeArray(reinterpret_cast(octet_t), numElements, endianness); + } + + /*! + * @brief This function deserializes an array of characters. + * @param char_t The variable that will store the array of characters read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + char* char_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of characters with a different endianness. + * @param char_t The variable that will store the array of characters read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + char* char_t, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return deserializeArray(char_t, numElements); + } + + /*! + * @brief This function deserializes an array of int8_t. + * @param int8 The variable that will store the array of int8_t read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + int8_t* int8, + size_t numElements) + { + return deserializeArray(reinterpret_cast(int8), numElements); + } + + /*! + * @brief This function deserializes an array of int8_t with a different endianness. + * @param int8 The variable that will store the array of int8_t read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + int8_t* int8, + size_t numElements, + Endianness endianness) + { + return deserializeArray(reinterpret_cast(int8), numElements, endianness); + } + + /*! + * @brief This function deserializes an array of unsigned shorts. + * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint16_t* ushort_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ushort_t), numElements); + } + + /*! + * @brief This function deserializes an array of unsigned shorts with a different endianness. + * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint16_t* ushort_t, + size_t numElements, + Endianness endianness) + { + return deserializeArray(reinterpret_cast(ushort_t), numElements, endianness); + } + + /*! + * @brief This function deserializes an array of shorts. + * @param short_t The variable that will store the array of shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int16_t* short_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of shorts with a different endianness. + * @param short_t The variable that will store the array of shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int16_t* short_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of unsigned longs. + * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint32_t* ulong_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ulong_t), numElements); + } + + /*! + * @brief This function deserializes an array of unsigned longs with a different endianness. + * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint32_t* ulong_t, + size_t numElements, + Endianness endianness) + { + return deserializeArray(reinterpret_cast(ulong_t), numElements, endianness); + } + + /*! + * @brief This function deserializes an array of longs. + * @param long_t The variable that will store the array of longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int32_t* long_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of longs with a different endianness. + * @param long_t The variable that will store the array of longs read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int32_t* long_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of wide-chars. + * @param wchar The variable that will store the array of wide-chars read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + wchar_t* wchar, + size_t numElements); + + /*! + * @brief This function deserializes an array of wide-chars with a different endianness. + * @param wchar The variable that will store the array of wide-chars read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + wchar_t* wchar, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of unsigned long longs. + * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint64_t* ulonglong_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ulonglong_t), numElements); + } + + /*! + * @brief This function deserializes an array of unsigned long longs with a different endianness. + * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + uint64_t* ulonglong_t, + size_t numElements, + Endianness endianness) + { + return deserializeArray(reinterpret_cast(ulonglong_t), numElements, endianness); + } + + /*! + * @brief This function deserializes an array of long longs. + * @param longlong_t The variable that will store the array of long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int64_t* longlong_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of long longs with a different endianness. + * @param longlong_t The variable that will store the array of long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + int64_t* longlong_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of floats. + * @param float_t The variable that will store the array of floats read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + float* float_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of floats with a different endianness. + * @param float_t The variable that will store the array of floats read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + float* float_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of doubles. + * @param double_t The variable that will store the array of doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + double* double_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of doubles with a different endianness. + * @param double_t The variable that will store the array of doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + double* double_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of long doubles. + * @param ldouble_t The variable that will store the array of long doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + long double* ldouble_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of long doubles with a different endianness. + * @param ldouble_t The variable that will store the array of long doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + long double* ldouble_t, + size_t numElements, + Endianness endianness); + + /*! + * @brief This function deserializes an array of booleans. + * @param bool_t The variable that will store the array of booleans read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + Cdr& deserializeArray( + bool* bool_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of booleans with a different endianness. + * @param bool_t The variable that will store the array of booleans read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + bool* bool_t, + size_t numElements, + Endianness endianness) + { + (void) endianness; + return deserializeArray(bool_t, numElements); + } + + /*! + * @brief This function deserializes an array of strings. + * @param string_t The variable that will store the array of strings read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + std::string* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(string_t[count]); + } + return *this; + } + + /*! + * @brief This function deserializes an array of wide-strings. + * @param string_t The variable that will store the array of wide-strings read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + std::wstring* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(string_t[count]); + } + return *this; + } + + /*! + * @brief This function deserializes an array of strings with a different endianness. + * @param string_t The variable that will store the array of strings read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + std::string* string_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserializeArray(string_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function deserializes an array of wide-strings with a different endianness. + * @param string_t The variable that will store the array of wide-strings read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + inline + Cdr& deserializeArray( + std::wstring* string_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserializeArray(string_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function deserializes an array of sequences of objects. + * @param vector_t The variable that will store the array of sequences of objects read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeArray( + std::vector<_T>* vector_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(vector_t[count]); + } + return *this; + } + + /*! + * @brief This function template deserializes an array of non-basic objects. + * @param type_t The variable that will store the array of objects read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeArray( + _T* type_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + type_t[count].deserialize(*this); + } + return *this; + } + + /*! + * @brief This function template deserializes an array of non-basic objects with a different endianness. + * @param type_t The variable that will store the array of objects read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeArray( + _T* type_t, + size_t numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserializeArray(type_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template deserializes a string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeSequence(std::string *&sequence_t, size_t &numElements) - { - return deserializeStringSequence(sequence_t, numElements); - } - - /*! - * @brief This function template deserializes a wide-string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements) - { - return deserializeWStringSequence(sequence_t, numElements); - } -#endif - - /*! - * @brief This function template deserializes a raw sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeSequence(_T *&sequence_t, size_t &numElements) - { - uint32_t seqLength = 0; - state state_before_error(*this); - - deserialize(seqLength); - - try - { - sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T))); - deserializeArray(sequence_t, seqLength); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - free(sequence_t); - sequence_t = NULL; - setState(state_before_error); - ex.raise(); - } - - numElements = seqLength; - return *this; - } + /*! + * @brief This function template deserializes a string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeSequence( + std::string*& sequence_t, + size_t& numElements) + { + return deserializeStringSequence(sequence_t, numElements); + } + + /*! + * @brief This function template deserializes a wide-string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeSequence( + std::wstring*& sequence_t, + size_t& numElements) + { + return deserializeWStringSequence(sequence_t, numElements); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template deserializes a raw sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeSequence( + _T*& sequence_t, + size_t& numElements) + { + uint32_t seqLength = 0; + state state_before_error(*this); + + deserialize(seqLength); + + try + { + sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T))); + deserializeArray(sequence_t, seqLength); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + free(sequence_t); + sequence_t = NULL; + setState(state_before_error); + ex.raise(); + } + + numElements = seqLength; + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template deserializes a string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template<> - Cdr& deserializeSequence(std::string *&sequence_t, size_t &numElements) - { - return deserializeStringSequence(sequence_t, numElements); - } - - /*! - * @brief This function template deserializes a wide-string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template<> - Cdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements) - { - return deserializeWStringSequence(sequence_t, numElements); - } -#endif - - /*! - * @brief This function template deserializes a raw sequence with a different endianness. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeSequence(_T *&sequence_t, size_t &numElements, Endianness endianness) - { - bool auxSwap = m_swapBytes; - m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); - - try - { - deserializeSequence(sequence_t, numElements); - m_swapBytes = auxSwap; - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - m_swapBytes = auxSwap; - ex.raise(); - } - - return *this; - } - - private: - - Cdr(const Cdr&) = delete; - - Cdr& operator=(const Cdr&) = delete; - - Cdr& serializeBoolSequence(const std::vector &vector_t); - - Cdr& deserializeBoolSequence(std::vector &vector_t); - - Cdr& deserializeStringSequence(std::string *&sequence_t, size_t &numElements); - - Cdr& deserializeWStringSequence(std::wstring *&sequence_t, size_t &numElements); + /*! + * @brief This function template deserializes a string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template<> + Cdr& deserializeSequence( + std::string*& sequence_t, + size_t& numElements) + { + return deserializeStringSequence(sequence_t, numElements); + } + + /*! + * @brief This function template deserializes a wide-string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template<> + Cdr& deserializeSequence( + std::wstring*& sequence_t, + size_t& numElements) + { + return deserializeWStringSequence(sequence_t, numElements); + } + +#endif // ifdef _MSC_VER + + /*! + * @brief This function template deserializes a raw sequence with a different endianness. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @param endianness Endianness that will be used in the deserialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeSequence( + _T*& sequence_t, + size_t& numElements, + Endianness endianness) + { + bool auxSwap = m_swapBytes; + m_swapBytes = (m_swapBytes && (m_endianness == endianness)) || (!m_swapBytes && (m_endianness != endianness)); + + try + { + deserializeSequence(sequence_t, numElements); + m_swapBytes = auxSwap; + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + m_swapBytes = auxSwap; + ex.raise(); + } + + return *this; + } + +private: + + Cdr( + const Cdr&) = delete; + + Cdr& operator =( + const Cdr&) = delete; + + Cdr& serializeBoolSequence( + const std::vector& vector_t); + + Cdr& deserializeBoolSequence( + std::vector& vector_t); + + Cdr& deserializeStringSequence( + std::string*& sequence_t, + size_t& numElements); + + Cdr& deserializeWStringSequence( + std::wstring*& sequence_t, + size_t& numElements); #if HAVE_CXX0X - /*! - * @brief This function template detects the content type of the STD container array and serializes the array. - * @param array_t The array that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements) - { - return serializeArray(array_t->data(), numElements * array_t->size()); - } - - /*! - * @brief This function template detects the content type of the STD container array and serializes the array with a different endianness. - * @param array_t The array that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. - */ - template - Cdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements, Endianness endianness) - { - return serializeArray(array_t->data(), numElements * array_t->size(), endianness); - } - - /*! - * @brief This function template detects the content type of the STD container array and deserializes the array. - * @param array_t The variable that will store the array read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements) - { - return deserializeArray(array_t->data(), numElements * array_t->size()); - } - - /*! - * @brief This function template detects the content type of STD container array and deserializes the array with a different endianness. - * @param array_t The variable that will store the array read from the buffer. - * @param numElements Number of the elements in the array. - * @param endianness Endianness that will be used in the serialization of this value. - * @return Reference to the eprosima::fastcdr::Cdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - */ - template - Cdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements, Endianness endianness) - { - return deserializeArray(array_t->data(), numElements * array_t->size(), endianness); - } -#endif - - /*! - * @brief This function returns the extra bytes regarding the allignment. - * @param dataSize The size of the data that will be serialized. - * @return The size needed for the aligment. - */ - inline size_t alignment(size_t dataSize) const {return dataSize > m_lastDataSize ? (dataSize - ((m_currentPosition - m_alignPosition) % dataSize)) & (dataSize-1) : 0;} - - /*! - * @brief This function jumps the number of bytes of the alignment. These bytes should be calculated with the function eprosima::fastcdr::Cdr::alignment. - * @param align The number of bytes to be skipped. - */ - inline void makeAlign(size_t align){m_currentPosition += align;} - - /*! - * @brief This function resizes the internal buffer. It only applies if the FastBuffer object was created with the default constructor. - * @param minSizeInc Minimun size increase for the internal buffer - * @return True if the resize was succesful, false if it was not - */ - bool resize(size_t minSizeInc); - - //TODO - const char* readString(uint32_t &length); - const std::wstring readWString(uint32_t &length); - - //! @brief Reference to the buffer that will be serialized/deserialized. - FastBuffer &m_cdrBuffer; - - //! @brief The type of CDR that will be use in serialization/deserialization. - CdrType m_cdrType; - - //! @brief Using DDS_CDR type, this attribute stores if the stream buffer contains a parameter list or not. - DDSCdrPlFlag m_plFlag; - - //! @brief This attribute stores the option flags when the CDR type is DDS_CDR; - uint16_t m_options; - - //! @brief The endianness that will be applied over the buffer. - uint8_t m_endianness; - - //! @brief This attribute specifies if it is needed to swap the bytes. - bool m_swapBytes; - - //! @brief Stores the last datasize serialized/deserialized. It's used to optimize. - size_t m_lastDataSize; - - //! @brief The current position in the serialization/deserialization process. - FastBuffer::iterator m_currentPosition; - - //! @brief The position from where the aligment is calculated. - FastBuffer::iterator m_alignPosition; - - //! @brief The last position in the buffer; - FastBuffer::iterator m_lastPosition; - }; - } //namespace fastcdr + /*! + * @brief This function template detects the content type of the STD container array and serializes the array. + * @param array_t The array that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeArray( + const std::array<_T, _Size>* array_t, + size_t numElements) + { + return serializeArray(array_t->data(), numElements * array_t->size()); + } + + /*! + * @brief This function template detects the content type of the STD container array and serializes the array with a different endianness. + * @param array_t The array that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize a position that exceeds the internal memory size. + */ + template + Cdr& serializeArray( + const std::array<_T, _Size>* array_t, + size_t numElements, + Endianness endianness) + { + return serializeArray(array_t->data(), numElements * array_t->size(), endianness); + } + + /*! + * @brief This function template detects the content type of the STD container array and deserializes the array. + * @param array_t The variable that will store the array read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeArray( + std::array<_T, _Size>* array_t, + size_t numElements) + { + return deserializeArray(array_t->data(), numElements * array_t->size()); + } + + /*! + * @brief This function template detects the content type of STD container array and deserializes the array with a different endianness. + * @param array_t The variable that will store the array read from the buffer. + * @param numElements Number of the elements in the array. + * @param endianness Endianness that will be used in the serialization of this value. + * @return Reference to the eprosima::fastcdr::Cdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + */ + template + Cdr& deserializeArray( + std::array<_T, _Size>* array_t, + size_t numElements, + Endianness endianness) + { + return deserializeArray(array_t->data(), numElements * array_t->size(), endianness); + } + +#endif // if HAVE_CXX0X + + /*! + * @brief This function returns the extra bytes regarding the allignment. + * @param dataSize The size of the data that will be serialized. + * @return The size needed for the aligment. + */ + inline size_t alignment( + size_t dataSize) const + { + return dataSize > + m_lastDataSize ? (dataSize - ((m_currentPosition - m_alignPosition) % dataSize)) & + (dataSize - 1) : 0; + } + + /*! + * @brief This function jumps the number of bytes of the alignment. These bytes should be calculated with the function eprosima::fastcdr::Cdr::alignment. + * @param align The number of bytes to be skipped. + */ + inline void makeAlign( + size_t align) + { + m_currentPosition += align; + } + + /*! + * @brief This function resizes the internal buffer. It only applies if the FastBuffer object was created with the default constructor. + * @param minSizeInc Minimun size increase for the internal buffer + * @return True if the resize was succesful, false if it was not + */ + bool resize( + size_t minSizeInc); + + //TODO + const char* readString( + uint32_t& length); + const std::wstring readWString( + uint32_t& length); + + //! @brief Reference to the buffer that will be serialized/deserialized. + FastBuffer& m_cdrBuffer; + + //! @brief The type of CDR that will be use in serialization/deserialization. + CdrType m_cdrType; + + //! @brief Using DDS_CDR type, this attribute stores if the stream buffer contains a parameter list or not. + DDSCdrPlFlag m_plFlag; + + //! @brief This attribute stores the option flags when the CDR type is DDS_CDR; + uint16_t m_options; + + //! @brief The endianness that will be applied over the buffer. + uint8_t m_endianness; + + //! @brief This attribute specifies if it is needed to swap the bytes. + bool m_swapBytes; + + //! @brief Stores the last datasize serialized/deserialized. It's used to optimize. + size_t m_lastDataSize; + + //! @brief The current position in the serialization/deserialization process. + FastBuffer::iterator m_currentPosition; + + //! @brief The position from where the aligment is calculated. + FastBuffer::iterator m_alignPosition; + + //! @brief The last position in the buffer; + FastBuffer::iterator m_lastPosition; +}; +} //namespace fastcdr } //namespace eprosima #endif // _CDR_CDR_H_ diff --git a/ThirdParty/ros/include/fastcdr/FastBuffer.h b/ThirdParty/ros/include/fastcdr/FastBuffer.h index 535d5595d..ba5fe6d38 100644 --- a/ThirdParty/ros/include/fastcdr/FastBuffer.h +++ b/ThirdParty/ros/include/fastcdr/FastBuffer.h @@ -22,291 +22,332 @@ #include #include -inline uint32_t size_to_uint32(size_t val) { +inline uint32_t size_to_uint32( + size_t val) +{ #if defined(_WIN32) || !defined(FASTCDR_ARM32) - // On 64 bit platforms and all Windows architectures (because of C4267), explicitly cast. - return static_cast(val); + // On 64 bit platforms and all Windows architectures (because of C4267), explicitly cast. + return static_cast(val); #else - // Skip useless cast on 32-bit builds. - return val; - #endif + // Skip useless cast on 32-bit builds. + return val; + #endif // if defined(_WIN32) || !defined(FASTCDR_ARM32) } -namespace eprosima +namespace eprosima { +namespace fastcdr { +/*! + * @brief This class implements the iterator used to go through a FastBuffer. + */ +class Cdr_DllAPI _FastBuffer_iterator { - namespace fastcdr +public: + + /*! + * @brief Default constructor. + * The iterator points any position. + */ + _FastBuffer_iterator() + : m_buffer(NULL) + , m_currentPosition(NULL) + { + } + + /*! + * @brief Constructor. + * The iterator points to the indicated position. + * @param buffer Pointer to the raw buffer. + * @param index Position of the raw buffer where the iterator will point. + */ + explicit _FastBuffer_iterator( + char* buffer, + size_t index) + : m_buffer(buffer) + , m_currentPosition(&m_buffer[index]) + { + } + + /*! + * @brief This operator changes the iterator's raw buffer. + * This operator makes the iterator point to the same position but in another raw buffer. + * The new raw buffer is the same than the source iterator's. + * @param iterator The source iterator. The iterator will use the source iterator's raw buffer after this operation. + */ + inline + void operator <<( + const _FastBuffer_iterator& iterator) + { + ptrdiff_t diff = m_currentPosition - m_buffer; + m_buffer = iterator.m_buffer; + m_currentPosition = m_buffer + diff; + } + + /*! + * @brief This operator changes the position where the iterator points. + * This operator takes the index of the source iterator, but the iterator continues using its raw buffer. + * @param iterator The source iterator. The iterator will use the source's iterator index to point to its own raw buffer. + */ + inline + void operator >>( + const _FastBuffer_iterator& iterator) + { + ptrdiff_t diff = iterator.m_currentPosition - iterator.m_buffer; + m_currentPosition = m_buffer + diff; + } + + /*! + * @brief This operator copies a data in the raw buffer. + * The copy uses the size of the data type. + * @param data Data to be copied. Cannot be NULL. + */ + template + inline + void operator <<( + const _T& data) + { + memcpy(m_currentPosition, &data, sizeof(_T)); + } + + /*! + * @brief This operator copies data from the raw buffer to a variable. + * The copy uses the size of the data type. + * @param data Data to be filled. + */ + template + inline + void operator >>( + _T& data) { - /*! - * @brief This class implements the iterator used to go through a FastBuffer. - */ - class Cdr_DllAPI _FastBuffer_iterator + memcpy(&data, m_currentPosition, sizeof(_T)); + } + + /*! + * @brief This function copies a buffer into the raw buffer. + * @param src The source buffer. + * @param size The number of bytes to be copied. + */ + inline + void memcopy( + const void* src, + const size_t size) + { + if (size > 0) { - public: - - /*! - * @brief Default constructor. - * The iterator points any position. - */ - _FastBuffer_iterator() : m_buffer(NULL), m_currentPosition(NULL) {} - - /*! - * @brief Constructor. - * The iterator points to the indicated position. - * @param buffer Pointer to the raw buffer. - * @param index Position of the raw buffer where the iterator will point. - */ - explicit _FastBuffer_iterator(char *buffer, size_t index) : m_buffer(buffer), m_currentPosition(&m_buffer[index]){} - - /*! - * @brief This operator changes the iterator's raw buffer. - * This operator makes the iterator point to the same position but in another raw buffer. - * The new raw buffer is the same than the source iterator's. - * @param iterator The source iterator. The iterator will use the source iterator's raw buffer after this operation. - */ - inline - void operator<<(const _FastBuffer_iterator &iterator) - { - ptrdiff_t diff = m_currentPosition - m_buffer; - m_buffer = iterator.m_buffer; - m_currentPosition = m_buffer + diff; - } - - /*! - * @brief This operator changes the position where the iterator points. - * This operator takes the index of the source iterator, but the iterator continues using its raw buffer. - * @param The source iterator. The iterator will use the source's iterator index to point to its own raw buffer. - */ - inline - void operator>>(const _FastBuffer_iterator &iterator) - { - ptrdiff_t diff = iterator.m_currentPosition - iterator.m_buffer; - m_currentPosition = m_buffer + diff; - } - - /*! - * @brief This operator copies a data in the raw buffer. - * The copy uses the size of the data type. - * @param data Data to be copied. Cannot be NULL. - */ - template - inline - void operator<<(const _T &data) - { - memcpy(m_currentPosition, &data, sizeof(_T)); - } - - /*! - * @brief This operator copies data from the raw buffer to a variable. - * The copy uses the size of the data type. - * @param data Data to be filled. - */ - template - inline - void operator>>(_T &data) - { - memcpy(&data, m_currentPosition, sizeof(_T)); - } - - /*! - * @brief This function copies a buffer into the raw buffer. - * @param src The source buffer. - * @param size The number of bytes to be copied. - */ - inline - void memcopy(const void* src, const size_t size) - { - if (size > 0) { - memcpy(m_currentPosition, src, size); - } - } - - /*! - * @brief This function copies from the raw buffer to a external buffer. - * @param dst The destination buffer. - * @param size The size of bytes to be copied. - */ - inline - void rmemcopy(void* dst, const size_t size) - { - if (size > 0) { - memcpy(dst, m_currentPosition, size); - } - } - - /*! - * @brief This function increments the position where the iterator points. - * @param numBytes Number of bytes the iterator moves the position. - */ - inline - void operator+=(size_t numBytes) - { - m_currentPosition += numBytes; - } - - /*! - * @brief This operator returns the subtraction of the current interator's position and the source iterator's position. - * @iterator Source iterator whose position is subtracted to the current iterator's position. - * @return The result of subtract the current iterator's position and the source iterator's position. - */ - inline - size_t operator-(const _FastBuffer_iterator &it) const - { - return static_cast(m_currentPosition - it.m_currentPosition); - } - - /*! - * @brief This function increments the iterator in one the position. - * @return The current iterator. - */ - inline - _FastBuffer_iterator operator++() - { - ++m_currentPosition; - return *this; - } - - /*! - * @brief This function increments the iterator in one the position. - * @return The current iterator. - */ - inline - _FastBuffer_iterator operator++(int) - { - _FastBuffer_iterator tmp = *this; - ++*this; - return tmp; - } - - /*! - * @brief This function returns the current position in the raw buffer. - * @return The current position in the raw buffer. - */ - inline - char* operator&() - { - return m_currentPosition; - } - - private: - - //! Pointer to the raw buffer. - char *m_buffer; - - //! Current position in the raw buffer. - char *m_currentPosition; - }; - - /*! - * @brief This class represents a stream of bytes that contains (or will contain) - * serialized data. This class is used by the serializers to serialize - * or deserialize using their representation. - * @ingroup FASTCDRAPIREFERENCE - */ - class Cdr_DllAPI FastBuffer + memcpy(m_currentPosition, src, size); + } + } + + /*! + * @brief This function copies from the raw buffer to a external buffer. + * @param dst The destination buffer. + * @param size The size of bytes to be copied. + */ + inline + void rmemcopy( + void* dst, + const size_t size) + { + if (size > 0) { - public: - typedef _FastBuffer_iterator iterator; - - /*! - * @brief This constructor creates an internal stream and assigns it to the eprosima::fastcdr::FastBuffers object. - * The user can obtain this internal stream using the function eprosima::fastcdr::FastBuffers::getBuffer(). Be careful because this internal stream - * is deleted in the destruction of the eprosima::fastcdr::FastBuffers object. - */ - FastBuffer(); - - /*! - * @brief This constructor assigns the user's stream of bytes to the eprosima::fastcdr::FastBuffers object. - * The user's stream will be used to serialize. - * - * @param buffer The user's buffer that will be used. This buffer is not deallocated in the object's destruction. Cannot be NULL. - * @param bufferSize The length of user's buffer. - */ - FastBuffer(char* const buffer, const size_t bufferSize); - - //! Move constructor - FastBuffer(FastBuffer&& fbuffer) : m_buffer(nullptr), m_bufferSize(0), m_internalBuffer(true) - { - std::swap(m_buffer, fbuffer.m_buffer); - std::swap(m_bufferSize, fbuffer.m_bufferSize); - std::swap(m_internalBuffer, fbuffer.m_internalBuffer); - } - - //! Move assignment - FastBuffer& operator=(FastBuffer&& fbuffer) - { - std::swap(m_buffer, fbuffer.m_buffer); - std::swap(m_bufferSize, fbuffer.m_bufferSize); - std::swap(m_internalBuffer, fbuffer.m_internalBuffer); - return *this; - } - - /*! - * @brief Default destructor. - */ - virtual ~FastBuffer(); - - /*! - * @brief This function returns the stream that the eprosima::fastcdr::FastBuffers uses to serialize data. - * @return The stream used by eprosima::fastcdr::FastBuffers to serialize data. - */ - inline char* getBuffer() const { return m_buffer;} - - /*! - * @brief This function returns the size of the allocated memory of the stream that the eprosima::fastcdr::FastBuffers uses to serialize data. - * @return The size of the allocated memory of the stream used by the eprosima::fastcdr::FastBuffers to serialize data. - */ - inline size_t getBufferSize() const { return m_bufferSize;} - - /*! - * @brief This function returns a iterator that points to the begining of the stream. - * @return The new iterator. - */ - inline - iterator begin() - { - return (iterator(m_buffer, 0)); - } - - /*! - * @brief This function returns a iterator that points to the end of the stream. - * @return The new iterator. - */ - inline - iterator end() - { - return (iterator(m_buffer, m_bufferSize)); - } - - /*! - * @brief This function reserves memory for the internal raw buffer. It will only do so if the buffer is not yet allocated and is not externally set. - * @param size The size of the memory to be allocated. - * @return True if the allocation suceeded. False if the raw buffer was set externally or is already allocated. - */ - bool reserve(size_t size); - - /*! - * @brief This function resizes the raw buffer. It will call the user's defined function for this purpose. - * @param minSizeInc The minimun growth expected of the current raw buffer. - * @return True if the operation works. False if it does not. - */ - bool resize(size_t minSizeInc); - - private: - - FastBuffer(const FastBuffer&) = delete; - - FastBuffer& operator=(const FastBuffer&) = delete; - - //! @brief Pointer to the stream of bytes that contains the serialized data. - char *m_buffer; - - //! @brief The total size of the user's buffer. - size_t m_bufferSize; - - //! @brief This variable indicates if the managed buffer is internal or is from the user. - bool m_internalBuffer; - }; - } //namespace fastcdr + memcpy(dst, m_currentPosition, size); + } + } + + /*! + * @brief This function increments the position where the iterator points. + * @param numBytes Number of bytes the iterator moves the position. + */ + inline + void operator +=( + size_t numBytes) + { + m_currentPosition += numBytes; + } + + /*! + * @brief This operator returns the subtraction of the current interator's position and the source iterator's position. + * @param it Source iterator whose position is subtracted to the current iterator's position. + * @return The result of subtract the current iterator's position and the source iterator's position. + */ + inline + size_t operator -( + const _FastBuffer_iterator& it) const + { + return static_cast(m_currentPosition - it.m_currentPosition); + } + + /*! + * @brief This function increments the iterator in one the position. + * @return The current iterator. + */ + inline + _FastBuffer_iterator operator ++() + { + ++m_currentPosition; + return *this; + } + + /*! + * @brief This function increments the iterator in one the position. + * @return The current iterator. + */ + inline + _FastBuffer_iterator operator ++( + int) + { + _FastBuffer_iterator tmp = *this; + ++*this; + return tmp; + } + + /*! + * @brief This function returns the current position in the raw buffer. + * @return The current position in the raw buffer. + */ + inline + char* operator &() + { + return m_currentPosition; + } + +private: + + //! Pointer to the raw buffer. + char* m_buffer; + + //! Current position in the raw buffer. + char* m_currentPosition; +}; + +/*! + * @brief This class represents a stream of bytes that contains (or will contain) + * serialized data. This class is used by the serializers to serialize + * or deserialize using their representation. + * @ingroup FASTCDRAPIREFERENCE + */ +class Cdr_DllAPI FastBuffer +{ +public: + + typedef _FastBuffer_iterator iterator; + + /*! + * @brief This constructor creates an internal stream and assigns it to the eprosima::fastcdr::FastBuffers object. + * The user can obtain this internal stream using the function eprosima::fastcdr::FastBuffers::getBuffer(). Be careful because this internal stream + * is deleted in the destruction of the eprosima::fastcdr::FastBuffers object. + */ + FastBuffer(); + + /*! + * @brief This constructor assigns the user's stream of bytes to the eprosima::fastcdr::FastBuffers object. + * The user's stream will be used to serialize. + * + * @param buffer The user's buffer that will be used. This buffer is not deallocated in the object's destruction. Cannot be NULL. + * @param bufferSize The length of user's buffer. + */ + FastBuffer( + char* const buffer, + const size_t bufferSize); + + //! Move constructor + FastBuffer( + FastBuffer&& fbuffer) + : m_buffer(nullptr) + , m_bufferSize(0) + , m_internalBuffer(true) + { + std::swap(m_buffer, fbuffer.m_buffer); + std::swap(m_bufferSize, fbuffer.m_bufferSize); + std::swap(m_internalBuffer, fbuffer.m_internalBuffer); + } + + //! Move assignment + FastBuffer& operator =( + FastBuffer&& fbuffer) + { + std::swap(m_buffer, fbuffer.m_buffer); + std::swap(m_bufferSize, fbuffer.m_bufferSize); + std::swap(m_internalBuffer, fbuffer.m_internalBuffer); + return *this; + } + + /*! + * @brief Default destructor. + */ + virtual ~FastBuffer(); + + /*! + * @brief This function returns the stream that the eprosima::fastcdr::FastBuffers uses to serialize data. + * @return The stream used by eprosima::fastcdr::FastBuffers to serialize data. + */ + inline char* getBuffer() const + { + return m_buffer; + } + + /*! + * @brief This function returns the size of the allocated memory of the stream that the eprosima::fastcdr::FastBuffers uses to serialize data. + * @return The size of the allocated memory of the stream used by the eprosima::fastcdr::FastBuffers to serialize data. + */ + inline size_t getBufferSize() const + { + return m_bufferSize; + } + + /*! + * @brief This function returns a iterator that points to the begining of the stream. + * @return The new iterator. + */ + inline + iterator begin() + { + return (iterator(m_buffer, 0)); + } + + /*! + * @brief This function returns a iterator that points to the end of the stream. + * @return The new iterator. + */ + inline + iterator end() + { + return (iterator(m_buffer, m_bufferSize)); + } + + /*! + * @brief This function reserves memory for the internal raw buffer. It will only do so if the buffer is not yet allocated and is not externally set. + * @param size The size of the memory to be allocated. + * @return True if the allocation suceeded. False if the raw buffer was set externally or is already allocated. + */ + bool reserve( + size_t size); + + /*! + * @brief This function resizes the raw buffer. It will call the user's defined function for this purpose. + * @param minSizeInc The minimun growth expected of the current raw buffer. + * @return True if the operation works. False if it does not. + */ + bool resize( + size_t minSizeInc); + +private: + + FastBuffer( + const FastBuffer&) = delete; + + FastBuffer& operator =( + const FastBuffer&) = delete; + + //! @brief Pointer to the stream of bytes that contains the serialized data. + char* m_buffer; + + //! @brief The total size of the user's buffer. + size_t m_bufferSize; + + //! @brief This variable indicates if the managed buffer is internal or is from the user. + bool m_internalBuffer; +}; +} //namespace fastcdr } //namespace eprosima #endif // _FASTCDR_FASTCDRBUFFER_H_ diff --git a/ThirdParty/ros/include/fastcdr/FastCdr.h b/ThirdParty/ros/include/fastcdr/FastCdr.h index ea64fdc31..8f0973e56 100644 --- a/ThirdParty/ros/include/fastcdr/FastCdr.h +++ b/ThirdParty/ros/include/fastcdr/FastCdr.h @@ -22,1735 +22,2083 @@ #include #include -#if !__APPLE__ +#if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__ #include #else #include -#endif +#endif // if !__APPLE__ && !__FreeBSD__ && !__VXWORKS__ #if HAVE_CXX0X #include -#endif - -namespace eprosima +#endif // if HAVE_CXX0X + +namespace eprosima { +namespace fastcdr { +/*! + * @brief This class offers an interface to serialize/deserialize some basic types using a modified CDR protocol inside a eprosima::FastBuffer. + * This modified CDR protocol provides a serialization mechanism much faster than common CDR protocol, because it doesn't use alignment. + * @ingroup FASTCDRAPIREFERENCE + */ +class Cdr_DllAPI FastCdr { - namespace fastcdr +public: + + /*! + * @brief This class stores the current state of a CDR serialization. + */ + class Cdr_DllAPI state { + friend class FastCdr; + + public: + /*! - * @brief This class offers an interface to serialize/deserialize some basic types using a modified CDR protocol inside a eprosima::FastBuffer. - * This modified CDR protocol provides a serialization mechanism much faster than common CDR protocol, because it doesn't use alignment. - * @ingroup FASTCDRAPIREFERENCE + * @brief Default constructor. */ - class Cdr_DllAPI FastCdr - { - public: - - /*! - * @brief This class stores the current state of a CDR serialization. - */ - class Cdr_DllAPI state - { - friend class FastCdr; - public: - - /*! - * @brief Default constructor. - */ - state(const FastCdr &fastcdr); - - /*! - * @brief Copy constructor. - */ - state(const state&); - - private: - - state& operator=(const state&) = delete; - - //! @brief The position in the buffer when the state was created. - const FastBuffer::iterator m_currentPosition; - }; - /*! - * @brief This constructor creates a eprosima::fastcdr::FastCdr object that can serialize/deserialize - * the assigned buffer. - * - * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation. - */ - FastCdr(FastBuffer &cdrBuffer); - - /*! - * @brief This function skips a number of bytes in the CDR stream buffer. - * @param numBytes The number of bytes that will be jumped. - * @return True is returned when the jump operation works successfully. Otherwise, false is returned. - */ - bool jump(size_t numBytes); - - /*! - * @brief This function resets the current position in the buffer to the begining. - */ - void reset(); - - /*! - * @brief This function returns the current position in the CDR stream. - * @return Pointer to the current position in the buffer. - */ - char* getCurrentPosition(); - - /*! - * @brief This function returns the length of the serialized data inside the stream. - * @return The length of the serialized data. - */ - inline size_t getSerializedDataLength() const { return m_currentPosition - m_cdrBuffer.begin();} - - /*! - * @brief This function returns the current state of the CDR stream. - * @return The current state of the buffer. - */ - FastCdr::state getState(); - - /*! - * @brief This function sets a previous state of the CDR stream; - * @param state Previous state that will be set again. - */ - void setState(FastCdr::state &state); - - /*! - * @brief This operator serializes an octet. - * @param octet_t The value of the octet that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const uint8_t octet_t){return serialize(octet_t);} - - /*! - * @brief This operator serializes a character. - * @param char_t The value of the character that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const char char_t){return serialize(char_t);} - - /*! - * @brief This operator serializes a int8_t. - * @param int8 The value of the int8_t that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const int8_t int8){return serialize(int8);} - - /*! - * @brief This operator serializes an unsigned short. - * @param ushort_t The value of the unsigned short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const uint16_t ushort_t){return serialize(ushort_t);} - - /*! - * @brief This operator serializes a short. - * @param short_t The value of the short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const int16_t short_t){return serialize(short_t);} - - /*! - * @brief This operator serializes an unsigned long. - * @param ulong_t The value of the unsigned long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const uint32_t ulong_t){return serialize(ulong_t);} - - /*! - * @brief This operator serializes a long. - * @param long_t The value of the long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const int32_t long_t){return serialize(long_t);} - - /*! - * @brief This operator serializes a wide-char. - * @param wchar The value of the wide-char that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const wchar_t wchar){return serialize(wchar);} - - /*! - * @brief This operator serializes an unsigned long long. - * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const uint64_t ulonglong_t){return serialize(ulonglong_t);} - - /*! - * @brief This operator serializes a long long. - * @param longlong_t The value of the long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const int64_t longlong_t){return serialize(longlong_t);} - - /*! - * @brief This operator serializes a float. - * @param float_t The value of the float that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const float float_t){return serialize(float_t);} - - /*! - * @brief This operator serializes a ldouble. - * @param double_t The value of the double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const double double_t){return serialize(double_t);} - - /*! - * @brief This operator serializes a long double. - * @param ldouble_t The value of the long double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const long double ldouble_t){return serialize(ldouble_t);} - - /*! - * @brief This operator serializes a boolean. - * @param bool_t The value of the boolean that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const bool bool_t){return serialize(bool_t);} - - /*! - * @brief This operator serializes a null-terminated string. - * @param string_t The value of the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const char *string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a null-terminated wide-string. - * @param string_t The value of the wide-string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const wchar_t *string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a string. - * @param string_t The string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const std::string &string_t){return serialize(string_t);} - - /*! - * @brief This operator serializes a wstring. - * @param string_t The wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator<<(const std::wstring &string_t){return serialize(string_t);} + state( + const FastCdr& fastcdr); + + /*! + * @brief Copy constructor. + */ + state( + const state&); + + private: + + state& operator =( + const state&) = delete; + + //! @brief The position in the buffer when the state was created. + const FastBuffer::iterator m_currentPosition; + }; + /*! + * @brief This constructor creates a eprosima::fastcdr::FastCdr object that can serialize/deserialize + * the assigned buffer. + * + * @param cdrBuffer A reference to the buffer that contains (or will contain) the CDR representation. + */ + FastCdr( + FastBuffer& cdrBuffer); + + /*! + * @brief This function skips a number of bytes in the CDR stream buffer. + * @param numBytes The number of bytes that will be jumped. + * @return True is returned when the jump operation works successfully. Otherwise, false is returned. + */ + bool jump( + size_t numBytes); + + /*! + * @brief This function resets the current position in the buffer to the begining. + */ + void reset(); + + /*! + * @brief This function returns the current position in the CDR stream. + * @return Pointer to the current position in the buffer. + */ + char* getCurrentPosition(); + + /*! + * @brief This function returns the length of the serialized data inside the stream. + * @return The length of the serialized data. + */ + inline size_t getSerializedDataLength() const + { + return m_currentPosition - m_cdrBuffer.begin(); + } + + /*! + * @brief This function returns the current state of the CDR stream. + * @return The current state of the buffer. + */ + FastCdr::state getState(); + + /*! + * @brief This function sets a previous state of the CDR stream; + * @param state Previous state that will be set again. + */ + void setState( + FastCdr::state& state); + + /*! + * @brief This operator serializes an octet. + * @param octet_t The value of the octet that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const uint8_t octet_t) + { + return serialize(octet_t); + } + + /*! + * @brief This operator serializes a character. + * @param char_t The value of the character that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const char char_t) + { + return serialize(char_t); + } + + /*! + * @brief This operator serializes a int8_t. + * @param int8 The value of the int8_t that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const int8_t int8) + { + return serialize(int8); + } + + /*! + * @brief This operator serializes an unsigned short. + * @param ushort_t The value of the unsigned short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const uint16_t ushort_t) + { + return serialize(ushort_t); + } + + /*! + * @brief This operator serializes a short. + * @param short_t The value of the short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const int16_t short_t) + { + return serialize(short_t); + } + + /*! + * @brief This operator serializes an unsigned long. + * @param ulong_t The value of the unsigned long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const uint32_t ulong_t) + { + return serialize(ulong_t); + } + + /*! + * @brief This operator serializes a long. + * @param long_t The value of the long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const int32_t long_t) + { + return serialize(long_t); + } + + /*! + * @brief This operator serializes a wide-char. + * @param wchar The value of the wide-char that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const wchar_t wchar) + { + return serialize(wchar); + } + + /*! + * @brief This operator serializes an unsigned long long. + * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const uint64_t ulonglong_t) + { + return serialize(ulonglong_t); + } + + /*! + * @brief This operator serializes a long long. + * @param longlong_t The value of the long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const int64_t longlong_t) + { + return serialize(longlong_t); + } + + /*! + * @brief This operator serializes a float. + * @param float_t The value of the float that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const float float_t) + { + return serialize(float_t); + } + + /*! + * @brief This operator serializes a ldouble. + * @param double_t The value of the double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const double double_t) + { + return serialize(double_t); + } + + /*! + * @brief This operator serializes a long double. + * @param ldouble_t The value of the long double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const long double ldouble_t) + { + return serialize(ldouble_t); + } + + /*! + * @brief This operator serializes a boolean. + * @param bool_t The value of the boolean that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const bool bool_t) + { + return serialize(bool_t); + } + + /*! + * @brief This operator serializes a null-terminated string. + * @param string_t The value of the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const char* string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a null-terminated wide-string. + * @param string_t The value of the wide-string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const wchar_t* string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a string. + * @param string_t The string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const std::string& string_t) + { + return serialize(string_t); + } + + /*! + * @brief This operator serializes a wstring. + * @param string_t The wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator <<( + const std::wstring& string_t) + { + return serialize(string_t); + } #if HAVE_CXX0X - /*! - * @brief This operator template is used to serialize arrays. - * @param array_t The array that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator<<(const std::array<_T, _Size> &array_t){return serialize<_T, _Size>(array_t);} -#endif - - /*! - * @brief This operator template is used to serialize sequences. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator<<(const std::vector<_T> &vector_t){return serialize<_T>(vector_t);} - - /*! - * @brief This operator template is used to serialize non-basic types. - * @param type_t The object that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator<<(const _T &type_t) - { - type_t.serialize(*this); - return *this; - } - - /*! - * @brief This operator deserializes an octet. - * @param octet_t The variable that will store the octet read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(uint8_t &octet_t){return deserialize(octet_t);} - - /*! - * @brief This operator deserializes a character. - * @param char_t The variable that will store the character read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(char &char_t){return deserialize(char_t);} - - /*! - * @brief This operator deserializes an int8_t. - * @param int8 The variable that will store the int8_t read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(int8_t &int8){return deserialize(int8);} - - /*! - * @brief This operator deserializes an unsigned short. - * @param ushort_t The variable that will store the unsigned short read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(uint16_t &ushort_t){return deserialize(ushort_t);} - - /*! - * @brief This operator deserializes a short. - * @param short_t The variable that will store the short read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(int16_t &short_t){return deserialize(short_t);} - - /*! - * @brief This operator deserializes an unsigned long. - * @param ulong_t The variable that will store the unsigned long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(uint32_t &ulong_t){return deserialize(ulong_t);} - - /*! - * @brief This operator deserializes a long. - * @param long_t The variable that will store the long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(int32_t &long_t){return deserialize(long_t);} - - /*! - * @brief This operator deserializes a wide-char. - * @param wchar The variable that will store the wide-char read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(wchar_t &wchar){return deserialize(wchar);} - - /*! - * @brief This operator deserializes an unsigned long long. - * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(uint64_t &ulonglong_t){return deserialize(ulonglong_t);} - - /*! - * @brief This operator deserializes a long long. - * @param longlong_t The variable that will store the long long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(int64_t &longlong_t){return deserialize(longlong_t);} - - /*! - * @brief This operator deserializes a float. - * @param float_t The variable that will store the float read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(float &float_t){return deserialize(float_t);} - - /*! - * @brief This operator deserializes a double. - * @param double_t The variable that will store the double read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(double &double_t){return deserialize(double_t);} - - /*! - * @brief This operator deserializes a long double. - * @param ldouble_t The variable that will store the long double read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(long double &ldouble_t){return deserialize(ldouble_t);} - - /*! - * @brief This operator deserializes a boolean. - * @param bool_t The variable that will store the boolean read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value. - */ - inline FastCdr& operator>>(bool &bool_t){return deserialize(bool_t);} - - /*! - * @brief This operator deserializes a null-terminated c-string. - * @param string_t The variable that will store the c-string read from the buffer. - * Please note that a newly allocated string will be returned. - * The caller should free the returned pointer when appropiate. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. - */ - inline FastCdr& operator>>(char *&string_t){return deserialize(string_t);} - - /*! - * @brief This operator deserializes a string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(std::string &string_t){return deserialize(string_t);} - - /*! - * @brief This operator deserializes a wstring. - * @param string_t The variable that will store the wstring read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline FastCdr& operator>>(std::wstring &string_t){return deserialize(string_t);} + /*! + * @brief This operator template is used to serialize arrays. + * @param array_t The array that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator <<( + const std::array<_T, _Size>& array_t) + { + return serialize<_T, _Size>(array_t); + } + +#endif // if HAVE_CXX0X + + /*! + * @brief This operator template is used to serialize sequences. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator <<( + const std::vector<_T>& vector_t) + { + return serialize<_T>(vector_t); + } + + /*! + * @brief This operator template is used to serialize non-basic types. + * @param type_t The object that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator <<( + const _T& type_t) + { + type_t.serialize(*this); + return *this; + } + + /*! + * @brief This operator deserializes an octet. + * @param octet_t The variable that will store the octet read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + uint8_t& octet_t) + { + return deserialize(octet_t); + } + + /*! + * @brief This operator deserializes a character. + * @param char_t The variable that will store the character read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + char& char_t) + { + return deserialize(char_t); + } + + /*! + * @brief This operator deserializes an int8_t. + * @param int8 The variable that will store the int8_t read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + int8_t& int8) + { + return deserialize(int8); + } + + /*! + * @brief This operator deserializes an unsigned short. + * @param ushort_t The variable that will store the unsigned short read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + uint16_t& ushort_t) + { + return deserialize(ushort_t); + } + + /*! + * @brief This operator deserializes a short. + * @param short_t The variable that will store the short read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + int16_t& short_t) + { + return deserialize(short_t); + } + + /*! + * @brief This operator deserializes an unsigned long. + * @param ulong_t The variable that will store the unsigned long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + uint32_t& ulong_t) + { + return deserialize(ulong_t); + } + + /*! + * @brief This operator deserializes a long. + * @param long_t The variable that will store the long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + int32_t& long_t) + { + return deserialize(long_t); + } + + /*! + * @brief This operator deserializes a wide-char. + * @param wchar The variable that will store the wide-char read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + wchar_t& wchar) + { + return deserialize(wchar); + } + + /*! + * @brief This operator deserializes an unsigned long long. + * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + uint64_t& ulonglong_t) + { + return deserialize(ulonglong_t); + } + + /*! + * @brief This operator deserializes a long long. + * @param longlong_t The variable that will store the long long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + int64_t& longlong_t) + { + return deserialize(longlong_t); + } + + /*! + * @brief This operator deserializes a float. + * @param float_t The variable that will store the float read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + float& float_t) + { + return deserialize(float_t); + } + + /*! + * @brief This operator deserializes a double. + * @param double_t The variable that will store the double read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + double& double_t) + { + return deserialize(double_t); + } + + /*! + * @brief This operator deserializes a long double. + * @param ldouble_t The variable that will store the long double read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + long double& ldouble_t) + { + return deserialize(ldouble_t); + } + + /*! + * @brief This operator deserializes a boolean. + * @param bool_t The variable that will store the boolean read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value. + */ + inline FastCdr& operator >>( + bool& bool_t) + { + return deserialize(bool_t); + } + + /*! + * @brief This operator deserializes a null-terminated c-string. + * @param string_t The variable that will store the c-string read from the buffer. + * Please note that a newly allocated string will be returned. + * The caller should free the returned pointer when appropiate. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize an invalid value. + */ + inline FastCdr& operator >>( + char*& string_t) + { + return deserialize(string_t); + } + + /*! + * @brief This operator deserializes a string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + std::string& string_t) + { + return deserialize(string_t); + } + + /*! + * @brief This operator deserializes a wstring. + * @param string_t The variable that will store the wstring read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline FastCdr& operator >>( + std::wstring& string_t) + { + return deserialize(string_t); + } #if HAVE_CXX0X - /*! - * @brief This operator template is used to deserialize arrays. - * @param array_t The variable that will store the array read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator>>(std::array<_T, _Size> &array_t){return deserialize<_T, _Size>(array_t);} -#endif - - /*! - * @brief This operator template is used to deserialize sequences. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator>>(std::vector<_T> &vector_t){return deserialize<_T>(vector_t);} - - /*! - * @brief This operator template is used to deserialize non-basic types. - * @param type_t The variable that will store the object read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& operator>>(_T &type_t) - { - type_t.deserialize(*this); - return *this; - } - - /*! - * @brief This function serializes an octet. - * @param octet_t The value of the octet that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const uint8_t octet_t) - { - return serialize(static_cast(octet_t)); - } - - /*! - * @brief This function serializes a character. - * @param char_t The value of the character that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const char char_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(char_t)) || resize(sizeof(char_t))) - { - m_currentPosition++ << char_t; - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes an int8_t. - * @param int8 The value of the int8_t that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const int8_t int8) - { - return serialize(static_cast(int8)); - } - - /*! - * @brief This function serializes an unsigned short. - * @param ushort_t The value of the unsigned short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const uint16_t ushort_t) - { - return serialize(static_cast(ushort_t)); - } - - /*! - * @brief This function serializes a short. - * @param short_t The value of the short that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const int16_t short_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(short_t)) || resize(sizeof(short_t))) - { - m_currentPosition << short_t; - m_currentPosition += sizeof(short_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes an unsigned long. - * @param ulong_t The value of the unsigned long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const uint32_t ulong_t) - { - return serialize(static_cast(ulong_t)); - } - - /*! - * @brief This function serializes a long. - * @param long_t The value of the long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const int32_t long_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(long_t)) || resize(sizeof(long_t))) - { - m_currentPosition << long_t; - m_currentPosition += sizeof(long_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes a wide-char. - * @param wchar The value of the wide-char that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const wchar_t wchar) - { - return serialize(static_cast(wchar)); - } - - /*! - * @brief This function serializes an unsigned long long. - * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const uint64_t ulonglong_t) - { - return serialize(static_cast(ulonglong_t)); - } - - /*! - * @brief This function serializes a long long. - * @param longlong_t The value of the long long that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const int64_t longlong_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(longlong_t)) || resize(sizeof(longlong_t))) - { - m_currentPosition << longlong_t; - m_currentPosition += sizeof(longlong_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes a float. - * @param float_t The value of the float that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const float float_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(float_t)) || resize(sizeof(float_t))) - { - m_currentPosition << float_t; - m_currentPosition += sizeof(float_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes a double. - * @param double_t The value of the double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const double double_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(double_t)) || resize(sizeof(double_t))) - { - m_currentPosition << double_t; - m_currentPosition += sizeof(double_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes a long double. - * @param ldouble_t The value of the long double that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const long double ldouble_t) - { - if(((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t)) || resize(sizeof(ldouble_t))) - { - m_currentPosition << ldouble_t; + /*! + * @brief This operator template is used to deserialize arrays. + * @param array_t The variable that will store the array read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator >>( + std::array<_T, _Size>& array_t) + { + return deserialize<_T, _Size>(array_t); + } + +#endif // if HAVE_CXX0X + + /*! + * @brief This operator template is used to deserialize sequences. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator >>( + std::vector<_T>& vector_t) + { + return deserialize<_T>(vector_t); + } + + /*! + * @brief This operator template is used to deserialize non-basic types. + * @param type_t The variable that will store the object read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& operator >>( + _T& type_t) + { + type_t.deserialize(*this); + return *this; + } + + /*! + * @brief This function serializes an octet. + * @param octet_t The value of the octet that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const uint8_t octet_t) + { + return serialize(static_cast(octet_t)); + } + + /*! + * @brief This function serializes a character. + * @param char_t The value of the character that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const char char_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(char_t)) || resize(sizeof(char_t))) + { + m_currentPosition++ << char_t; + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes an int8_t. + * @param int8 The value of the int8_t that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const int8_t int8) + { + return serialize(static_cast(int8)); + } + + /*! + * @brief This function serializes an unsigned short. + * @param ushort_t The value of the unsigned short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const uint16_t ushort_t) + { + return serialize(static_cast(ushort_t)); + } + + /*! + * @brief This function serializes a short. + * @param short_t The value of the short that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const int16_t short_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(short_t)) || resize(sizeof(short_t))) + { + m_currentPosition << short_t; + m_currentPosition += sizeof(short_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes an unsigned long. + * @param ulong_t The value of the unsigned long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const uint32_t ulong_t) + { + return serialize(static_cast(ulong_t)); + } + + /*! + * @brief This function serializes a long. + * @param long_t The value of the long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const int32_t long_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(long_t)) || resize(sizeof(long_t))) + { + m_currentPosition << long_t; + m_currentPosition += sizeof(long_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes a wide-char. + * @param wchar The value of the wide-char that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const wchar_t wchar) + { + return serialize(static_cast(wchar)); + } + + /*! + * @brief This function serializes an unsigned long long. + * @param ulonglong_t The value of the unsigned long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const uint64_t ulonglong_t) + { + return serialize(static_cast(ulonglong_t)); + } + + /*! + * @brief This function serializes a long long. + * @param longlong_t The value of the long long that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const int64_t longlong_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(longlong_t)) || resize(sizeof(longlong_t))) + { + m_currentPosition << longlong_t; + m_currentPosition += sizeof(longlong_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes a float. + * @param float_t The value of the float that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const float float_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(float_t)) || resize(sizeof(float_t))) + { + m_currentPosition << float_t; + m_currentPosition += sizeof(float_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes a double. + * @param double_t The value of the double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const double double_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(double_t)) || resize(sizeof(double_t))) + { + m_currentPosition << double_t; + m_currentPosition += sizeof(double_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes a long double. + * @param ldouble_t The value of the long double that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const long double ldouble_t) + { + if (((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t)) || resize(sizeof(ldouble_t))) + { + m_currentPosition << ldouble_t; #if defined(_WIN32) - m_currentPosition += sizeof(ldouble_t); - m_currentPosition << static_cast(0); -#endif - m_currentPosition += sizeof(ldouble_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function serializes a boolean. - * @param bool_t The value of the boolean that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serialize(const bool bool_t); - - /*! - * @brief This function serializes a string. - * @param string_t The pointer to the string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serialize(const char *string_t); - - /*! - * @brief This function serializes a wstring. - * @param string_t The pointer to the wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serialize(const wchar_t *string_t); - - /*! - * @brief This function serializes a std::string. - * @param string_t The string that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const std::string &string_t) {return serialize(string_t.c_str());} - - /*! - * @brief This function serializes a std::wstring. - * @param string_t The wstring that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serialize(const std::wstring &string_t) {return serialize(string_t.c_str());} + m_currentPosition += sizeof(ldouble_t); + m_currentPosition << static_cast(0); +#endif // if defined(_WIN32) + m_currentPosition += sizeof(ldouble_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function serializes a boolean. + * @param bool_t The value of the boolean that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serialize( + const bool bool_t); + + /*! + * @brief This function serializes a string. + * @param string_t The pointer to the string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serialize( + const char* string_t); + + /*! + * @brief This function serializes a wstring. + * @param string_t The pointer to the wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serialize( + const wchar_t* string_t); + + /*! + * @brief This function serializes a std::string. + * @param string_t The string that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const std::string& string_t) + { + return serialize(string_t.c_str()); + } + + /*! + * @brief This function serializes a std::wstring. + * @param string_t The wstring that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serialize( + const std::wstring& string_t) + { + return serialize(string_t.c_str()); + } #if HAVE_CXX0X - /*! - * @brief This function template serializes an array. - * @param array_t The array that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& serialize(const std::array<_T, _Size> &array_t) - { return serializeArray(array_t.data(), array_t.size());} -#endif + /*! + * @brief This function template serializes an array. + * @param array_t The array that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& serialize( + const std::array<_T, _Size>& array_t) + { + return serializeArray(array_t.data(), array_t.size()); + } + +#endif // if HAVE_CXX0X #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template serializes a sequence of booleans. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serialize(const std::vector &vector_t) - { - return serializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template serializes a sequence. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serialize(const std::vector<_T> &vector_t) - { - state state_before_error(*this); - - *this << static_cast(vector_t.size()); - - try - { - return serializeArray(vector_t.data(), vector_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template serializes a sequence of booleans. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serialize( + const std::vector& vector_t) + { + return serializeBoolSequence(vector_t); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template serializes a sequence. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serialize( + const std::vector<_T>& vector_t) + { + state state_before_error(*this); + + *this << static_cast(vector_t.size()); + + try + { + return serializeArray(vector_t.data(), vector_t.size()); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template serializes a sequence of booleans. - * @param vector_t The sequence that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template<> - FastCdr& serialize(const std::vector &vector_t) - { - return serializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template serializes a non-basic type. - * @param type_t The object that will be serialized in the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& serialize(const _T &type_t) - { - type_t.serialize(*this); - return *this; - } - - /*! - * @brief This function serializes an array of octets. - * @param octet_t The sequence of octets that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const uint8_t *octet_t, size_t numElements) - { - return serializeArray(reinterpret_cast(octet_t), numElements); - } - - /*! - * @brief This function serializes an array of characters. - * @param char_t The array of characters that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const char *char_t, size_t numElements); - - /*! - * @brief This function serializes an array of int8_t. - * @param int8 The sequence of int8_t that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const int8_t *int8, size_t numElements) - { - return serializeArray(reinterpret_cast(int8), numElements); - } - - /*! - * @brief This function serializes an array of unsigned shorts. - * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const uint16_t *ushort_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ushort_t), numElements); - } - - /*! - * @brief This function serializes an array of shorts. - * @param short_t The array of shorts that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const int16_t *short_t, size_t numElements); - - /*! - * @brief This function serializes an array of unsigned longs. - * @param ulong_t The array of unsigned longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const uint32_t *ulong_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ulong_t), numElements); - } - - /*! - * @brief This function serializes an array of longs. - * @param long_t The array of longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const int32_t *long_t, size_t numElements); - - /*! - * @brief This function serializes an array of wide-chars. - * @param wchar The array of wide-chars that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const wchar_t *wchar, size_t numElements); - - /*! - * @brief This function serializes an array of unsigned long longs. - * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const uint64_t *ulonglong_t, size_t numElements) - { - return serializeArray(reinterpret_cast(ulonglong_t), numElements); - } - - /*! - * @brief This function serializes an array of long longs. - * @param longlong_t The array of long longs that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const int64_t *longlong_t, size_t numElements); - - /*! - * @brief This function serializes an array of floats. - * @param float_t The array of floats that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const float *float_t, size_t numElements); - - /*! - * @brief This function serializes an array of doubles. - * @param double_t The array of doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const double *double_t, size_t numElements); - - /*! - * @brief This function serializes an array of long doubles. - * @param ldouble_t The array of long doubles that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const long double *ldouble_t, size_t numElements); - - /*! - * @brief This function serializes an array of booleans. - * @param bool_t The array of booleans that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - FastCdr& serializeArray(const bool *bool_t, size_t numElements); - - /*! - * @brief This function serializes an array of strings. - * @param string_t The array of strings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const std::string *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(string_t[count].c_str()); - return *this; - } - - /*! - * @brief This function serializes an array of wstrings. - * @param string_t The array of wstrings that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& serializeArray(const std::wstring *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(string_t[count].c_str()); - return *this; - } - - /*! - * @brief This function template serializes an array of sequences. - * @param vector_t The array of sequences that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serializeArray(const std::vector<_T> *vector_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - serialize(vector_t[count]); - return *this; - } - - /*! - * @brief This function template serializes an array of non-basic type objects. - * @param string_t The array of objects that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serializeArray(const _T *type_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - type_t[count].serialize(*this); - return *this; - } - - /*! - * @brief This function template serializes a raw sequence. - * @param sequence_t Pointer to the sequence that will be serialized in the buffer. - * @param numElements The number of elements contained in the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serializeSequence(const _T *sequence_t, size_t numElements) - { - state state_before_error(*this); - - serialize(static_cast(numElements)); - - try - { - return serializeArray(sequence_t, numElements); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } - - /*! - * @brief This function deserializes an octet. - * @param octet_t The variable that will store the octet read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(uint8_t &octet_t) - { - return deserialize(reinterpret_cast(octet_t)); - } - - /*! - * @brief This function deserializes a character. - * @param char_t The variable that will store the character read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(char &char_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(char_t)) - { - m_currentPosition++ >> char_t; - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes an int8_t. - * @param int8 The variable that will store the int8_t read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(int8_t &int8) - { - return deserialize(reinterpret_cast(int8)); - } - - /*! - * @brief This function deserializes an unsigned short. - * @param ushort_t The variable that will store the unsigned short read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(uint16_t &ushort_t) - { - return deserialize(reinterpret_cast(ushort_t)); - } - - /*! - * @brief This function deserializes a short. - * @param short_t The variable that will store the short read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(int16_t &short_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(short_t)) - { - m_currentPosition >> short_t; - m_currentPosition += sizeof(short_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes an unsigned long. - * @param ulong_t The variable that will store the unsigned long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(uint32_t &ulong_t) - { - return deserialize(reinterpret_cast(ulong_t)); - } - - /*! - * @brief This function deserializes a long. - * @param long_t The variable that will store the long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(int32_t &long_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(long_t)) - { - m_currentPosition >> long_t; - m_currentPosition += sizeof(long_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes a wide-char. - * @param wchar The variable that will store the wide-char read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(wchar_t &wchar) - { - uint32_t ret; - deserialize(ret); - wchar = static_cast(ret); - return *this; - } - - /*! - * @brief This function deserializes an unsigned long long. - * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(uint64_t &ulonglong_t) - { - return deserialize(reinterpret_cast(ulonglong_t)); - } - - /*! - * @brief This function deserializes a long long. - * @param longlong_t The variable that will store the long long read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(int64_t &longlong_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(longlong_t)) - { - m_currentPosition >> longlong_t; - m_currentPosition += sizeof(longlong_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes a float. - * @param float_t The variable that will store the float read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(float &float_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(float_t)) - { - m_currentPosition >> float_t; - m_currentPosition += sizeof(float_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes a double. - * @param double_t The variable that will store the double read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(double &double_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(double_t)) - { - m_currentPosition >> double_t; - m_currentPosition += sizeof(double_t); - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes a long double. - * @param ldouble_t The variable that will store the long double read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(long double &ldouble_t) - { - if((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t)) - { - m_currentPosition >> ldouble_t; - m_currentPosition += sizeof(ldouble_t); + /*! + * @brief This function template serializes a sequence of booleans. + * @param vector_t The sequence that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template<> + FastCdr& serialize( + const std::vector& vector_t) + { + return serializeBoolSequence(vector_t); + } + +#endif // ifdef _MSC_VER + + /*! + * @brief This function template serializes a non-basic type. + * @param type_t The object that will be serialized in the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& serialize( + const _T& type_t) + { + type_t.serialize(*this); + return *this; + } + + /*! + * @brief This function serializes an array of octets. + * @param octet_t The sequence of octets that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const uint8_t* octet_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(octet_t), numElements); + } + + /*! + * @brief This function serializes an array of characters. + * @param char_t The array of characters that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const char* char_t, + size_t numElements); + + /*! + * @brief This function serializes an array of int8_t. + * @param int8 The sequence of int8_t that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const int8_t* int8, + size_t numElements) + { + return serializeArray(reinterpret_cast(int8), numElements); + } + + /*! + * @brief This function serializes an array of unsigned shorts. + * @param ushort_t The array of unsigned shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const uint16_t* ushort_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ushort_t), numElements); + } + + /*! + * @brief This function serializes an array of shorts. + * @param short_t The array of shorts that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const int16_t* short_t, + size_t numElements); + + /*! + * @brief This function serializes an array of unsigned longs. + * @param ulong_t The array of unsigned longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const uint32_t* ulong_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ulong_t), numElements); + } + + /*! + * @brief This function serializes an array of longs. + * @param long_t The array of longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const int32_t* long_t, + size_t numElements); + + /*! + * @brief This function serializes an array of wide-chars. + * @param wchar The array of wide-chars that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const wchar_t* wchar, + size_t numElements); + + /*! + * @brief This function serializes an array of unsigned long longs. + * @param ulonglong_t The array of unsigned long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const uint64_t* ulonglong_t, + size_t numElements) + { + return serializeArray(reinterpret_cast(ulonglong_t), numElements); + } + + /*! + * @brief This function serializes an array of long longs. + * @param longlong_t The array of long longs that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const int64_t* longlong_t, + size_t numElements); + + /*! + * @brief This function serializes an array of floats. + * @param float_t The array of floats that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const float* float_t, + size_t numElements); + + /*! + * @brief This function serializes an array of doubles. + * @param double_t The array of doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const double* double_t, + size_t numElements); + + /*! + * @brief This function serializes an array of long doubles. + * @param ldouble_t The array of long doubles that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const long double* ldouble_t, + size_t numElements); + + /*! + * @brief This function serializes an array of booleans. + * @param bool_t The array of booleans that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + FastCdr& serializeArray( + const bool* bool_t, + size_t numElements); + + /*! + * @brief This function serializes an array of strings. + * @param string_t The array of strings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const std::string* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(string_t[count].c_str()); + } + return *this; + } + + /*! + * @brief This function serializes an array of wstrings. + * @param string_t The array of wstrings that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& serializeArray( + const std::wstring* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(string_t[count].c_str()); + } + return *this; + } + + /*! + * @brief This function template serializes an array of sequences. + * @param vector_t The array of sequences that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serializeArray( + const std::vector<_T>* vector_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + serialize(vector_t[count]); + } + return *this; + } + + /*! + * @brief This function template serializes an array of non-basic type objects. + * @param type_t The array of objects that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serializeArray( + const _T* type_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + type_t[count].serialize(*this); + } + return *this; + } + + /*! + * @brief This function template serializes a raw sequence. + * @param sequence_t Pointer to the sequence that will be serialized in the buffer. + * @param numElements The number of elements contained in the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serializeSequence( + const _T* sequence_t, + size_t numElements) + { + state state_before_error(*this); + + serialize(static_cast(numElements)); + + try + { + return serializeArray(sequence_t, numElements); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } + + /*! + * @brief This function deserializes an octet. + * @param octet_t The variable that will store the octet read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + uint8_t& octet_t) + { + return deserialize(reinterpret_cast(octet_t)); + } + + /*! + * @brief This function deserializes a character. + * @param char_t The variable that will store the character read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + char& char_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(char_t)) + { + m_currentPosition++ >> char_t; + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes an int8_t. + * @param int8 The variable that will store the int8_t read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + int8_t& int8) + { + return deserialize(reinterpret_cast(int8)); + } + + /*! + * @brief This function deserializes an unsigned short. + * @param ushort_t The variable that will store the unsigned short read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + uint16_t& ushort_t) + { + return deserialize(reinterpret_cast(ushort_t)); + } + + /*! + * @brief This function deserializes a short. + * @param short_t The variable that will store the short read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + int16_t& short_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(short_t)) + { + m_currentPosition >> short_t; + m_currentPosition += sizeof(short_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes an unsigned long. + * @param ulong_t The variable that will store the unsigned long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + uint32_t& ulong_t) + { + return deserialize(reinterpret_cast(ulong_t)); + } + + /*! + * @brief This function deserializes a long. + * @param long_t The variable that will store the long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + int32_t& long_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(long_t)) + { + m_currentPosition >> long_t; + m_currentPosition += sizeof(long_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes a wide-char. + * @param wchar The variable that will store the wide-char read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + wchar_t& wchar) + { + uint32_t ret; + deserialize(ret); + wchar = static_cast(ret); + return *this; + } + + /*! + * @brief This function deserializes an unsigned long long. + * @param ulonglong_t The variable that will store the unsigned long long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + uint64_t& ulonglong_t) + { + return deserialize(reinterpret_cast(ulonglong_t)); + } + + /*! + * @brief This function deserializes a long long. + * @param longlong_t The variable that will store the long long read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + int64_t& longlong_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(longlong_t)) + { + m_currentPosition >> longlong_t; + m_currentPosition += sizeof(longlong_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes a float. + * @param float_t The variable that will store the float read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + float& float_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(float_t)) + { + m_currentPosition >> float_t; + m_currentPosition += sizeof(float_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes a double. + * @param double_t The variable that will store the double read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + double& double_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(double_t)) + { + m_currentPosition >> double_t; + m_currentPosition += sizeof(double_t); + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes a long double. + * @param ldouble_t The variable that will store the long double read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + long double& ldouble_t) + { + if ((m_lastPosition - m_currentPosition) >= sizeof(ldouble_t)) + { + m_currentPosition >> ldouble_t; + m_currentPosition += sizeof(ldouble_t); #if defined(_WIN32) - m_currentPosition += sizeof(ldouble_t); -#endif - - return *this; - } - - throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); - } - - /*! - * @brief This function deserializes a boolean. - * @param bool_t The variable that will store the boolean read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value. - */ - FastCdr& deserialize(bool &bool_t); - - /*! - * @brief This function deserializes a string. - * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserialize(char *&string_t); - - /*! - * @brief This function deserializes a wide string. - * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param string_t The pointer that will point to the wide string read from the buffer. - * The user will have to free the allocated memory using free() - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserialize(wchar_t *&string_t); - - /*! - * @brief This function deserializes a std::string. - * @param string_t The variable that will store the string read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(std::string &string_t) - { - uint32_t length = 0; - const char *str = readString(length); - string_t = std::string(str, length); - return *this; - } - - /*! - * @brief This function deserializes a std::wstring. - * @param string_t The variable that will store the wstring read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserialize(std::wstring &string_t) - { - uint32_t length = 0; - string_t = readWString(length); - return *this; - } + m_currentPosition += sizeof(ldouble_t); +#endif // if defined(_WIN32) + + return *this; + } + + throw exception::NotEnoughMemoryException(exception::NotEnoughMemoryException::NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT); + } + + /*! + * @brief This function deserializes a boolean. + * @param bool_t The variable that will store the boolean read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + * @exception exception::BadParamException This exception is thrown when trying to deserialize in an invalid value. + */ + FastCdr& deserialize( + bool& bool_t); + + /*! + * @brief This function deserializes a string. + * This function allocates memory to store the string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the string read from the buffer. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserialize( + char*& string_t); + + /*! + * @brief This function deserializes a wide string. + * This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param string_t The pointer that will point to the wide string read from the buffer. + * The user will have to free the allocated memory using free() + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserialize( + wchar_t*& string_t); + + /*! + * @brief This function deserializes a std::string. + * @param string_t The variable that will store the string read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + std::string& string_t) + { + uint32_t length = 0; + const char* str = readString(length); + string_t = std::string(str, length); + return *this; + } + + /*! + * @brief This function deserializes a std::wstring. + * @param string_t The variable that will store the wstring read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserialize( + std::wstring& string_t) + { + uint32_t length = 0; + string_t = readWString(length); + return *this; + } #if HAVE_CXX0X - /*! - * @brief This function template deserializes an array. - * @param array_t The variable that will store the array read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& deserialize(std::array<_T, _Size> &array_t) - { return deserializeArray(array_t.data(), array_t.size());} -#endif + /*! + * @brief This function template deserializes an array. + * @param array_t The variable that will store the array read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& deserialize( + std::array<_T, _Size>& array_t) + { + return deserializeArray(array_t.data(), array_t.size()); + } + +#endif // if HAVE_CXX0X #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template deserializes a sequence of booleans. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserialize(std::vector &vector_t) - { - return deserializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template deserializes a sequence. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserialize(std::vector<_T> &vector_t) - { - uint32_t seqLength = 0; - state state_before_error(*this); - - *this >> seqLength; - - try - { - vector_t.resize(seqLength); - return deserializeArray(vector_t.data(), vector_t.size()); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - setState(state_before_error); - ex.raise(); - } - - return *this; - } + /*! + * @brief This function template deserializes a sequence of booleans. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserialize( + std::vector& vector_t) + { + return deserializeBoolSequence(vector_t); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template deserializes a sequence. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserialize( + std::vector<_T>& vector_t) + { + uint32_t seqLength = 0; + state state_before_error(*this); + + *this >> seqLength; + + try + { + vector_t.resize(seqLength); + return deserializeArray(vector_t.data(), vector_t.size()); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + setState(state_before_error); + ex.raise(); + } + + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template deserializes a sequence of booleans. - * @param vector_t The variable that will store the sequence read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template<> - FastCdr& deserialize(std::vector &vector_t) - { - return deserializeBoolSequence(vector_t); - } -#endif - - /*! - * @brief This function template deserializes a non-basic type object. - * @param type_t The variable that will store the object read from the buffer. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - inline FastCdr& deserialize(_T &type_t) - { - type_t.deserialize(*this); - return *this; - } - - /*! - * @brief This function deserializes an array of octets. - * @param octet_t The variable that will store the array of octets read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(uint8_t *octet_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(octet_t), numElements); - } - - /*! - * @brief This function deserializes an array of characters. - * @param char_t The variable that will store the array of characters read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(char *char_t, size_t numElements); - - /*! - * @brief This function deserializes an array of int8_t. - * @param int8 The variable that will store the array of int8_t read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(int8_t *int8, size_t numElements) - { - return deserializeArray(reinterpret_cast(int8), numElements); - } - - /*! - * @brief This function deserializes an array of unsigned shorts. - * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(uint16_t *ushort_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ushort_t), numElements); - } - - /*! - * @brief This function deserializes an array of shorts. - * @param short_t The variable that will store the array of shorts read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(int16_t *short_t, size_t numElements); - - /*! - * @brief This function deserializes an array of unsigned longs. - * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(uint32_t *ulong_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ulong_t), numElements); - } - - /*! - * @brief This function deserializes an array of longs. - * @param long_t The variable that will store the array of longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(int32_t *long_t, size_t numElements); - - /*! - * @brief This function deserializes an array of wide-chars. - * @param wchar The variable that will store the array of wide-chars read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(wchar_t *wchar, size_t numElements); - - /*! - * @brief This function deserializes an array of unsigned long longs. - * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(uint64_t *ulonglong_t, size_t numElements) - { - return deserializeArray(reinterpret_cast(ulonglong_t), numElements); - } - - /*! - * @brief This function deserializes an array of long longs. - * @param longlong_t The variable that will store the array of long longs read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(int64_t *longlong_t, size_t numElements); - - /*! - * @brief This function deserializes an array of floats. - * @param float_t The variable that will store the array of floats read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(float *float_t, size_t numElements); - - /*! - * @brief This function deserializes an array of doubles. - * @param double_t The variable that will store the array of doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(double *double_t, size_t numElements); - - /*! - * @brief This function deserializes an array of long doubles. - * @param ldouble_t The variable that will store the array of long doubles read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(long double *ldouble_t, size_t numElements); - - /*! - * @brief This function deserializes an array of booleans. - * @param bool_t The variable that will store the array of booleans read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - FastCdr& deserializeArray(bool *bool_t, size_t numElements); - - /*! - * @brief This function deserializes an array of strings. - * @param string_t The variable that will store the array of strings read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(std::string *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(string_t[count]); - return *this; - } - - /*! - * @brief This function deserializes an array of wide-strings. - * @param string_t The variable that will store the array of strings read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - inline - FastCdr& deserializeArray(std::wstring *string_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(string_t[count]); - return *this; - } - - /*! - * @brief This function template deserializes an array of sequences. - * @param vector_t The variable that will store the array of sequences read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeArray(std::vector<_T> *vector_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - deserialize(vector_t[count]); - return *this; - } - - /*! - * @brief This function template deserializes an array of non-basic type objects. - * @param type_t The variable that will store the array of objects read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeArray(_T *type_t, size_t numElements) - { - for(size_t count = 0; count < numElements; ++count) - type_t[count].deserialize(*this); - return *this; - } + /*! + * @brief This function template deserializes a sequence of booleans. + * @param vector_t The variable that will store the sequence read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template<> + FastCdr& deserialize( + std::vector& vector_t) + { + return deserializeBoolSequence(vector_t); + } + +#endif // ifdef _MSC_VER + + /*! + * @brief This function template deserializes a non-basic type object. + * @param type_t The variable that will store the object read from the buffer. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + inline FastCdr& deserialize( + _T& type_t) + { + type_t.deserialize(*this); + return *this; + } + + /*! + * @brief This function deserializes an array of octets. + * @param octet_t The variable that will store the array of octets read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + uint8_t* octet_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(octet_t), numElements); + } + + /*! + * @brief This function deserializes an array of characters. + * @param char_t The variable that will store the array of characters read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + char* char_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of int8_t. + * @param int8 The variable that will store the array of int8_t read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + int8_t* int8, + size_t numElements) + { + return deserializeArray(reinterpret_cast(int8), numElements); + } + + /*! + * @brief This function deserializes an array of unsigned shorts. + * @param ushort_t The variable that will store the array of unsigned shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + uint16_t* ushort_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ushort_t), numElements); + } + + /*! + * @brief This function deserializes an array of shorts. + * @param short_t The variable that will store the array of shorts read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + int16_t* short_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of unsigned longs. + * @param ulong_t The variable that will store the array of unsigned longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + uint32_t* ulong_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ulong_t), numElements); + } + + /*! + * @brief This function deserializes an array of longs. + * @param long_t The variable that will store the array of longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + int32_t* long_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of wide-chars. + * @param wchar The variable that will store the array of wide-chars read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + wchar_t* wchar, + size_t numElements); + + /*! + * @brief This function deserializes an array of unsigned long longs. + * @param ulonglong_t The variable that will store the array of unsigned long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + uint64_t* ulonglong_t, + size_t numElements) + { + return deserializeArray(reinterpret_cast(ulonglong_t), numElements); + } + + /*! + * @brief This function deserializes an array of long longs. + * @param longlong_t The variable that will store the array of long longs read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + int64_t* longlong_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of floats. + * @param float_t The variable that will store the array of floats read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + float* float_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of doubles. + * @param double_t The variable that will store the array of doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + double* double_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of long doubles. + * @param ldouble_t The variable that will store the array of long doubles read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + long double* ldouble_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of booleans. + * @param bool_t The variable that will store the array of booleans read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + FastCdr& deserializeArray( + bool* bool_t, + size_t numElements); + + /*! + * @brief This function deserializes an array of strings. + * @param string_t The variable that will store the array of strings read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + std::string* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(string_t[count]); + } + return *this; + } + + /*! + * @brief This function deserializes an array of wide-strings. + * @param string_t The variable that will store the array of strings read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + inline + FastCdr& deserializeArray( + std::wstring* string_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(string_t[count]); + } + return *this; + } + + /*! + * @brief This function template deserializes an array of sequences. + * @param vector_t The variable that will store the array of sequences read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeArray( + std::vector<_T>* vector_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + deserialize(vector_t[count]); + } + return *this; + } + + /*! + * @brief This function template deserializes an array of non-basic type objects. + * @param type_t The variable that will store the array of objects read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeArray( + _T* type_t, + size_t numElements) + { + for (size_t count = 0; count < numElements; ++count) + { + type_t[count].deserialize(*this); + } + return *this; + } #if !defined(_MSC_VER) && HAVE_CXX0X - /*! - * @brief This function template deserializes a string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeSequence(std::string *&sequence_t, size_t &numElements) - { - return deserializeStringSequence(sequence_t, numElements); - } - - /*! - * @brief This function template deserializes a wide-string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements) - { - return deserializeWStringSequence(sequence_t, numElements); - } -#endif - - /*! - * @brief This function template deserializes a raw sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeSequence(_T *&sequence_t, size_t &numElements) - { - uint32_t seqLength = 0; - state state_before_error(*this); - - deserialize(seqLength); - - try - { - sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T))); - deserializeArray(sequence_t, seqLength); - } - catch(eprosima::fastcdr::exception::Exception &ex) - { - free(sequence_t); - sequence_t = NULL; - setState(state_before_error); - ex.raise(); - } - - numElements = seqLength; - return *this; - } + /*! + * @brief This function template deserializes a string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeSequence( + std::string*& sequence_t, + size_t& numElements) + { + return deserializeStringSequence(sequence_t, numElements); + } + + /*! + * @brief This function template deserializes a wide-string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeSequence( + std::wstring*& sequence_t, + size_t& numElements) + { + return deserializeWStringSequence(sequence_t, numElements); + } + +#endif // if !defined(_MSC_VER) && HAVE_CXX0X + + /*! + * @brief This function template deserializes a raw sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeSequence( + _T*& sequence_t, + size_t& numElements) + { + uint32_t seqLength = 0; + state state_before_error(*this); + + deserialize(seqLength); + + try + { + sequence_t = reinterpret_cast<_T*>(calloc(seqLength, sizeof(_T))); + deserializeArray(sequence_t, seqLength); + } + catch (eprosima::fastcdr::exception::Exception& ex) + { + free(sequence_t); + sequence_t = NULL; + setState(state_before_error); + ex.raise(); + } + + numElements = seqLength; + return *this; + } #ifdef _MSC_VER - /*! - * @brief This function template deserializes a string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template<> - FastCdr& deserializeSequence(std::string *&sequence_t, size_t &numElements) - { - return deserializeStringSequence(sequence_t, numElements); - } - - /*! - * @brief This function template deserializes a wide-string sequence. - * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. - * The user will have to free this allocated memory using free() - * @param sequence_t The pointer that will store the sequence read from the buffer. - * @param numElements This variable return the number of elements of the sequence. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template<> - FastCdr& deserializeSequence(std::wstring *&sequence_t, size_t &numElements) - { - return deserializeWStringSequence(sequence_t, numElements); - } -#endif - - private: - - FastCdr(const FastCdr&) = delete; - - FastCdr& operator=(const FastCdr&) = delete; - - FastCdr& serializeBoolSequence(const std::vector &vector_t); - - FastCdr& deserializeBoolSequence(std::vector &vector_t); - - FastCdr& deserializeStringSequence(std::string *&sequence_t, size_t &numElements); - - FastCdr& deserializeWStringSequence(std::wstring *&sequence_t, size_t &numElements); + /*! + * @brief This function template deserializes a string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template<> + FastCdr& deserializeSequence( + std::string*& sequence_t, + size_t& numElements) + { + return deserializeStringSequence(sequence_t, numElements); + } + + /*! + * @brief This function template deserializes a wide-string sequence. + * This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. + * The user will have to free this allocated memory using free() + * @param sequence_t The pointer that will store the sequence read from the buffer. + * @param numElements This variable return the number of elements of the sequence. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template<> + FastCdr& deserializeSequence( + std::wstring*& sequence_t, + size_t& numElements) + { + return deserializeWStringSequence(sequence_t, numElements); + } + +#endif // ifdef _MSC_VER + +private: + + FastCdr( + const FastCdr&) = delete; + + FastCdr& operator =( + const FastCdr&) = delete; + + FastCdr& serializeBoolSequence( + const std::vector& vector_t); + + FastCdr& deserializeBoolSequence( + std::vector& vector_t); + + FastCdr& deserializeStringSequence( + std::string*& sequence_t, + size_t& numElements); + + FastCdr& deserializeWStringSequence( + std::wstring*& sequence_t, + size_t& numElements); #if HAVE_CXX0X - /*! - * @brief This function template detects the content type of the STD container array and serializes the array. - * @param array_t The array that will be serialized in the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. - */ - template - FastCdr& serializeArray(const std::array<_T, _Size> *array_t, size_t numElements) - { - return serializeArray(array_t->data(), numElements * array_t->size()); - } - - /*! - * @brief This function template detects the content type of the STD container array and deserializes the array. - * @param array_t The variable that will store the array read from the buffer. - * @param numElements Number of the elements in the array. - * @return Reference to the eprosima::fastcdr::FastCdr object. - * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. - */ - template - FastCdr& deserializeArray(std::array<_T, _Size> *array_t, size_t numElements) - { - return deserializeArray(array_t->data(), numElements * array_t->size()); - } -#endif - - bool resize(size_t minSizeInc); - - const char* readString(uint32_t &length); - - std::wstring readWString(uint32_t &length); - - //! @brief Reference to the buffer that will be serialized/deserialized. - FastBuffer &m_cdrBuffer; - - //! @brief The current position in the serialization/deserialization process. - FastBuffer::iterator m_currentPosition; - - //! @brief The last position in the buffer; - FastBuffer::iterator m_lastPosition; - }; - } //namespace fastcdr + /*! + * @brief This function template detects the content type of the STD container array and serializes the array. + * @param array_t The array that will be serialized in the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to serialize in a position that exceeds the internal memory size. + */ + template + FastCdr& serializeArray( + const std::array<_T, _Size>* array_t, + size_t numElements) + { + return serializeArray(array_t->data(), numElements * array_t->size()); + } + + /*! + * @brief This function template detects the content type of the STD container array and deserializes the array. + * @param array_t The variable that will store the array read from the buffer. + * @param numElements Number of the elements in the array. + * @return Reference to the eprosima::fastcdr::FastCdr object. + * @exception exception::NotEnoughMemoryException This exception is thrown when trying to deserialize in a position that exceeds the internal memory size. + */ + template + FastCdr& deserializeArray( + std::array<_T, _Size>* array_t, + size_t numElements) + { + return deserializeArray(array_t->data(), numElements * array_t->size()); + } + +#endif // if HAVE_CXX0X + + bool resize( + size_t minSizeInc); + + const char* readString( + uint32_t& length); + + std::wstring readWString( + uint32_t& length); + + //! @brief Reference to the buffer that will be serialized/deserialized. + FastBuffer& m_cdrBuffer; + + //! @brief The current position in the serialization/deserialization process. + FastBuffer::iterator m_currentPosition; + + //! @brief The last position in the buffer; + FastBuffer::iterator m_lastPosition; +}; +} //namespace fastcdr } //namespace eprosima #endif //_FASTCDR_FASTCDR_H_ diff --git a/ThirdParty/ros/include/fastcdr/config.h b/ThirdParty/ros/include/fastcdr/config.h index 9652d14bd..583b5416f 100644 --- a/ThirdParty/ros/include/fastcdr/config.h +++ b/ThirdParty/ros/include/fastcdr/config.h @@ -17,8 +17,8 @@ #define FASTCDR_VERSION_MAJOR 1 #define FASTCDR_VERSION_MINOR 0 -#define FASTCDR_VERSION_MICRO 13 -#define FASTCDR_VERSION_STR "1.0.13" +#define FASTCDR_VERSION_MICRO 24 +#define FASTCDR_VERSION_STR "1.0.24" // C++11 support defines #ifndef HAVE_CXX11 @@ -42,8 +42,16 @@ #endif // Endianness defines -#ifndef __BIG_ENDIAN__ -#define __BIG_ENDIAN__ 0 +#ifndef FASTCDR_IS_BIG_ENDIAN_TARGET +#define FASTCDR_IS_BIG_ENDIAN_TARGET 0 +#endif + +#ifndef FASTCDR_HAVE_FLOAT128 +#define FASTCDR_HAVE_FLOAT128 1 +#endif + +#ifndef FASTCDR_SIZEOF_LONG_DOUBLE +#define FASTCDR_SIZEOF_LONG_DOUBLE 16 #endif #if defined(__ARM_ARCH) && __ARM_ARCH <= 7 diff --git a/ThirdParty/ros/include/fastcdr/eProsima_auto_link.h b/ThirdParty/ros/include/fastcdr/eProsima_auto_link.h index 76c7a1d3e..3e821d8cf 100644 --- a/ThirdParty/ros/include/fastcdr/eProsima_auto_link.h +++ b/ThirdParty/ros/include/fastcdr/eProsima_auto_link.h @@ -13,12 +13,12 @@ // limitations under the License. /* - Expected defines. + Expected defines. - - EPROSIMA_LIB_NAME - - FASTCDR_VERSION_MAJOR - - FASTCDR_VERSION_MINOR -*/ + - EPROSIMA_LIB_NAME + - FASTCDR_VERSION_MAJOR + - FASTCDR_VERSION_MINOR + */ #if defined(_MSC_VER) #define EPROSIMA_STRINGIZE(X) EPROSIMA_DO_STRINGIZE(X) @@ -30,37 +30,38 @@ #define EPROSIMA_LIB_DEBUG_TAG #endif // _DEBUG - // Select linkage option. +// Select linkage option. #if (defined(_DLL) || defined(_RTLDLL)) && defined(EPROSIMA_DYN_LINK) #define EPROSIMA_LIB_PREFIX #elif defined(EPROSIMA_DYN_LINK) #error "Mixing a dll eprosima library with a static runtime is a bad idea" #else #define EPROSIMA_LIB_PREFIX "lib" - #endif + #endif // if (defined(_DLL) || defined(_RTLDLL)) && defined(EPROSIMA_DYN_LINK) - // Include library +// Include library #if defined(EPROSIMA_LIB_NAME) \ - && defined(EPROSIMA_LIB_PREFIX) \ - && defined(EPROSIMA_LIB_DEBUG_TAG) \ - && defined(FASTCDR_VERSION_MAJOR) \ - && defined(FASTCDR_VERSION_MINOR) - #pragma comment(lib, EPROSIMA_LIB_PREFIX EPROSIMA_STRINGIZE(EPROSIMA_LIB_NAME) EPROSIMA_LIB_DEBUG_TAG "-" EPROSIMA_STRINGIZE(FASTCDR_VERSION_MAJOR) "." EPROSIMA_STRINGIZE(FASTCDR_VERSION_MINOR) ".lib") + && defined(EPROSIMA_LIB_PREFIX) \ + && defined(EPROSIMA_LIB_DEBUG_TAG) \ + && defined(FASTCDR_VERSION_MAJOR) \ + && defined(FASTCDR_VERSION_MINOR) + #pragma \ + comment(lib, EPROSIMA_LIB_PREFIX EPROSIMA_STRINGIZE(EPROSIMA_LIB_NAME) EPROSIMA_LIB_DEBUG_TAG "-" EPROSIMA_STRINGIZE(FASTCDR_VERSION_MAJOR) "." EPROSIMA_STRINGIZE(FASTCDR_VERSION_MINOR) ".lib") #else #error "Some required macros where not defined" - #endif + #endif // if defined(EPROSIMA_LIB_NAME) && defined(EPROSIMA_LIB_PREFIX) && defined(EPROSIMA_LIB_DEBUG_TAG) && defined(FASTCDR_VERSION_MAJOR) && defined(FASTCDR_VERSION_MINOR) #endif // _MSC_VER - + // Undef macros #ifdef EPROSIMA_LIB_PREFIX #undef EPROSIMA_LIB_PREFIX -#endif +#endif // ifdef EPROSIMA_LIB_PREFIX #ifdef EPROSIMA_LIB_NAME #undef EPROSIMA_LIB_NAME -#endif +#endif // ifdef EPROSIMA_LIB_NAME #ifdef EPROSIMA_LIB_DEBUG_TAG #undef EPROSIMA_LIB_DEBUG_TAG -#endif +#endif // ifdef EPROSIMA_LIB_DEBUG_TAG diff --git a/ThirdParty/ros/include/fastcdr/exceptions/BadParamException.h b/ThirdParty/ros/include/fastcdr/exceptions/BadParamException.h index 366879499..95838ed84 100644 --- a/ThirdParty/ros/include/fastcdr/exceptions/BadParamException.h +++ b/ThirdParty/ros/include/fastcdr/exceptions/BadParamException.h @@ -17,69 +17,71 @@ #include "Exception.h" -namespace eprosima +namespace eprosima { +namespace fastcdr { +namespace exception { +/*! + * @brief This class is thrown as an exception when a invalid parameter was being serialized. + * @ingroup EXCEPTIONMODULE + */ +class BadParamException : public Exception { - namespace fastcdr - { - namespace exception - { - /*! - * @brief This class is thrown as an exception when a invalid parameter was being serialized. - * @ingroup EXCEPTIONMODULE - */ - class BadParamException : public Exception - { - public: +public: - /*! - * @brief Default constructor. - * - * @param message A error message. This message pointer is copied. - */ - Cdr_DllAPI BadParamException(const char* const &message) noexcept; + /*! + * @brief Default constructor. + * + * @param message A error message. This message pointer is copied. + */ + Cdr_DllAPI BadParamException( + const char* const& message) noexcept; - /*! - * @brief Default copy constructor. - * - * @param ex BadParamException that will be copied. - */ - Cdr_DllAPI BadParamException(const BadParamException &ex) noexcept; + /*! + * @brief Default copy constructor. + * + * @param ex BadParamException that will be copied. + */ + Cdr_DllAPI BadParamException( + const BadParamException& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Default move constructor. - * - * @param ex BadParamException that will be moved. - */ - Cdr_DllAPI BadParamException(BadParamException&& ex) noexcept; -#endif + /*! + * @brief Default move constructor. + * + * @param ex BadParamException that will be moved. + */ + Cdr_DllAPI BadParamException( + BadParamException&& ex) noexcept; +#endif // if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex BadParamException that will be copied. - */ - Cdr_DllAPI BadParamException& operator=(const BadParamException &ex) noexcept; + /*! + * @brief Assigment operation. + * + * @param ex BadParamException that will be copied. + */ + Cdr_DllAPI BadParamException& operator =( + const BadParamException& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex BadParamException that will be moved. - */ - BadParamException& operator=(BadParamException&& ex) noexcept; -#endif + /*! + * @brief Assigment operation. + * + * @param ex BadParamException that will be moved. + */ + BadParamException& operator =( + BadParamException&& ex) noexcept; +#endif // if HAVE_CXX0X - //! @brief Default constructor - virtual Cdr_DllAPI ~BadParamException() noexcept; + //! @brief Default constructor + virtual Cdr_DllAPI ~BadParamException() noexcept; - //! @brief This function throws the object as exception. - virtual Cdr_DllAPI void raise() const; + //! @brief This function throws the object as exception. + virtual Cdr_DllAPI void raise() const; - //! @brief Default message used in the library. - static Cdr_DllAPI const char* const BAD_PARAM_MESSAGE_DEFAULT; - }; - } //namespace exception - } //namespace fastcdr + //! @brief Default message used in the library. + static Cdr_DllAPI const char* const BAD_PARAM_MESSAGE_DEFAULT; +}; +} //namespace exception +} //namespace fastcdr } //namespace eprosima #endif // _FASTCDR_EXCEPTIONS_BADPARAMEXCEPTION_H_ diff --git a/ThirdParty/ros/include/fastcdr/exceptions/Exception.h b/ThirdParty/ros/include/fastcdr/exceptions/Exception.h index bed79f63c..b37133267 100644 --- a/ThirdParty/ros/include/fastcdr/exceptions/Exception.h +++ b/ThirdParty/ros/include/fastcdr/exceptions/Exception.h @@ -19,80 +19,82 @@ #include #include -namespace eprosima +namespace eprosima { +namespace fastcdr { +namespace exception { +/*! + * @brief This abstract class is used to create exceptions. + * @ingroup EXCEPTIONMODULE + */ +class Exception : public std::exception { - namespace fastcdr - { - namespace exception - { - /*! - * @brief This abstract class is used to create exceptions. - * @ingroup EXCEPTIONMODULE - */ - class Exception : public std::exception - { - public: +public: - //! \brief Default destructor. - virtual Cdr_DllAPI ~Exception() noexcept; + //! \brief Default destructor. + virtual Cdr_DllAPI ~Exception() noexcept; - //! \brief This function throws the object as exception. - virtual Cdr_DllAPI void raise() const = 0; + //! \brief This function throws the object as exception. + virtual Cdr_DllAPI void raise() const = 0; - /*! - * @brief This function returns the error message. - * - * @return The error message. - */ - virtual Cdr_DllAPI const char* what() const noexcept ; + /*! + * @brief This function returns the error message. + * + * @return The error message. + */ + virtual Cdr_DllAPI const char* what() const noexcept override; - protected: +protected: - /*! - * @brief Default constructor. - * - * @param message A error message. This message pointer is copied. - */ - Cdr_DllAPI Exception(const char* const &message) noexcept; + /*! + * @brief Default constructor. + * + * @param message A error message. This message pointer is copied. + */ + Cdr_DllAPI Exception( + const char* const& message) noexcept; - /*! - * @brief Default copy constructor. - * - * @param ex Exception that will be copied. - */ - Cdr_DllAPI Exception(const Exception &ex) noexcept; + /*! + * @brief Default copy constructor. + * + * @param ex Exception that will be copied. + */ + Cdr_DllAPI Exception( + const Exception& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Default move constructor. - * - * @param ex Exception that will be moved. - */ - Cdr_DllAPI Exception(Exception&& ex) noexcept; -#endif + /*! + * @brief Default move constructor. + * + * @param ex Exception that will be moved. + */ + Cdr_DllAPI Exception( + Exception&& ex) noexcept; +#endif // if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex Exception that will be copied. - */ - Cdr_DllAPI Exception& operator=(const Exception &ex) noexcept; + /*! + * @brief Assigment operation. + * + * @param ex Exception that will be copied. + */ + Cdr_DllAPI Exception& operator =( + const Exception& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex Exception that will be moved. - */ - Cdr_DllAPI Exception& operator=(Exception&&) noexcept; -#endif + /*! + * @brief Assigment operation. + * + * @param ex Exception that will be moved. + */ + Cdr_DllAPI Exception& operator =( + Exception&&) noexcept; +#endif // if HAVE_CXX0X - private: +private: - const char* m_message; - }; - } //namespace exception - } //namespace fastcdr + const char* m_message; +}; +} //namespace exception +} //namespace fastcdr } //namespace eprosima #endif // _FASTCDR_EXCEPTIONS_EXCEPTION_H_ diff --git a/ThirdParty/ros/include/fastcdr/exceptions/NotEnoughMemoryException.h b/ThirdParty/ros/include/fastcdr/exceptions/NotEnoughMemoryException.h index 4a8f899f3..3a190c525 100644 --- a/ThirdParty/ros/include/fastcdr/exceptions/NotEnoughMemoryException.h +++ b/ThirdParty/ros/include/fastcdr/exceptions/NotEnoughMemoryException.h @@ -17,69 +17,71 @@ #include "Exception.h" -namespace eprosima +namespace eprosima { +namespace fastcdr { +namespace exception { +/*! + * @brief This class is thrown as an exception when the buffer's internal memory reachs its size limit. + * @ingroup EXCEPTIONMODULE + */ +class NotEnoughMemoryException : public Exception { - namespace fastcdr - { - namespace exception - { - /*! - * @brief This class is thrown as an exception when the buffer's internal memory reachs its size limit. - * @ingroup EXCEPTIONMODULE - */ - class NotEnoughMemoryException : public Exception - { - public: +public: - /*! - * @brief Default constructor. - * - * @param message A error message. This message pointer is copied. - */ - Cdr_DllAPI NotEnoughMemoryException(const char* const &message) noexcept; + /*! + * @brief Default constructor. + * + * @param message A error message. This message pointer is copied. + */ + Cdr_DllAPI NotEnoughMemoryException( + const char* const& message) noexcept; - /*! - * @brief Default copy constructor. - * - * @param ex NotEnoughMemoryException that will be copied. - */ - Cdr_DllAPI NotEnoughMemoryException(const NotEnoughMemoryException &ex) noexcept; + /*! + * @brief Default copy constructor. + * + * @param ex NotEnoughMemoryException that will be copied. + */ + Cdr_DllAPI NotEnoughMemoryException( + const NotEnoughMemoryException& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Default move constructor. - * - * @param ex NotEnoughMemoryException that will be moved. - */ - Cdr_DllAPI NotEnoughMemoryException(NotEnoughMemoryException&& ex) noexcept; -#endif + /*! + * @brief Default move constructor. + * + * @param ex NotEnoughMemoryException that will be moved. + */ + Cdr_DllAPI NotEnoughMemoryException( + NotEnoughMemoryException&& ex) noexcept; +#endif // if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex NotEnoughMemoryException that will be copied. - */ - Cdr_DllAPI NotEnoughMemoryException& operator=(const NotEnoughMemoryException &ex) noexcept; + /*! + * @brief Assigment operation. + * + * @param ex NotEnoughMemoryException that will be copied. + */ + Cdr_DllAPI NotEnoughMemoryException& operator =( + const NotEnoughMemoryException& ex) noexcept; #if HAVE_CXX0X - /*! - * @brief Assigment operation. - * - * @param ex NotEnoughMemoryException that will be moved. - */ - Cdr_DllAPI NotEnoughMemoryException& operator=(NotEnoughMemoryException&& ex) noexcept; -#endif + /*! + * @brief Assigment operation. + * + * @param ex NotEnoughMemoryException that will be moved. + */ + Cdr_DllAPI NotEnoughMemoryException& operator =( + NotEnoughMemoryException&& ex) noexcept; +#endif // if HAVE_CXX0X - //! @brief Default constructor - virtual Cdr_DllAPI ~NotEnoughMemoryException() noexcept; + //! @brief Default constructor + virtual Cdr_DllAPI ~NotEnoughMemoryException() noexcept; - //! @brief This function throws the object as exception. - virtual Cdr_DllAPI void raise() const; + //! @brief This function throws the object as exception. + virtual Cdr_DllAPI void raise() const override; - //! @brief Default message used in the library. - static Cdr_DllAPI const char* const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT; - }; - } //namespace exception - } //namespace fastcdr + //! @brief Default message used in the library. + static Cdr_DllAPI const char* const NOT_ENOUGH_MEMORY_MESSAGE_DEFAULT; +}; +} //namespace exception +} //namespace fastcdr } //namespace eprosima #endif // _FASTCDR_EXCEPTIONS_NOTENOUGHMEMORYEXCEPTION_H_ diff --git a/ThirdParty/ros/include/fastcdr/fastcdr_dll.h b/ThirdParty/ros/include/fastcdr/fastcdr_dll.h index a5a3062ef..c355f2f40 100644 --- a/ThirdParty/ros/include/fastcdr/fastcdr_dll.h +++ b/ThirdParty/ros/include/fastcdr/fastcdr_dll.h @@ -21,19 +21,19 @@ #if !defined(FASTCDR_DYN_LINK) && !defined(FASTCDR_STATIC_LINK) \ && !defined(EPROSIMA_ALL_DYN_LINK) && !defined(EPROSIMA_ALL_STATIC_LINK) #define FASTCDR_STATIC_LINK -#endif +#endif // if !defined(FASTCDR_DYN_LINK) && !defined(FASTCDR_STATIC_LINK) && !defined(EPROSIMA_ALL_DYN_LINK) && !defined(EPROSIMA_ALL_STATIC_LINK) #if defined(EPROSIMA_ALL_DYN_LINK) && !defined(FASTCDR_DYN_LINK) #define FASTCDR_DYN_LINK -#endif +#endif // if defined(EPROSIMA_ALL_DYN_LINK) && !defined(FASTCDR_DYN_LINK) #if defined(FASTCDR_DYN_LINK) && defined(FASTCDR_STATIC_LINK) #error Must not define both FASTCDR_DYN_LINK and FASTCDR_STATIC_LINK -#endif +#endif // if defined(FASTCDR_DYN_LINK) && defined(FASTCDR_STATIC_LINK) #if defined(EPROSIMA_ALL_NO_LIB) && !defined(FASTCDR_NO_LIB) #define FASTCDR_NO_LIB -#endif +#endif // if defined(EPROSIMA_ALL_NO_LIB) && !defined(FASTCDR_NO_LIB) // enable dynamic linking @@ -46,7 +46,7 @@ #endif // FASTCDR_SOURCE #else #define Cdr_DllAPI -#endif +#endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK) #else #define Cdr_DllAPI #endif // _WIN32 @@ -61,7 +61,7 @@ #if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK) #define EPROSIMA_DYN_LINK -#endif +#endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK) #include "eProsima_auto_link.h" #endif // auto-linking disabled diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/topic/BuiltinTopicKey.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/topic/BuiltinTopicKey.hpp new file mode 100644 index 000000000..43fe1aae1 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/builtin/topic/BuiltinTopicKey.hpp @@ -0,0 +1,45 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file BuiltinTopicKey.hpp + * + */ + +#ifndef FASTDDS_DDS_BUILTIN_TOPIC_BUILTINTOPICKEY_HPP +#define FASTDDS_DDS_BUILTIN_TOPIC_BUILTINTOPICKEY_HPP + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { +namespace builtin { + +// following API definition: +// #define BUILTIN_TOPIC_KEY_TYPE_NATIVE uint32_t + +struct BuiltinTopicKey_t +{ + // BUILTIN_TOPIC_KEY_TYPE_NATIVE = long type + //!Value + uint32_t value[3]; +}; + +} // builtin +} // dds +} // fastdds +} // eprosima + +#endif // FASTDDS_DDS_BUILTIN_TOPIC_BUILTINTOPICKEY_HPP diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp new file mode 100644 index 000000000..a8083d61d --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp @@ -0,0 +1,45 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file ParticipantBuiltinTopicData.hpp + * + */ + +#ifndef FASTDDS_DDS_BUILTIN_TOPIC_PARTICIPANTBUILTINTOPICDATA_HPP +#define FASTDDS_DDS_BUILTIN_TOPIC_PARTICIPANTBUILTINTOPICDATA_HPP + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { +namespace builtin { + +struct ParticipantBuiltinTopicData +{ + //! Builtin topic Key + BuiltinTopicKey_t key; + + //! UserData QoS + UserDataQosPolicy user_data; +}; + +} // builtin +} // dds +} // fastdds +} // eprosima + +#endif // FASTDDS_DDS_BUILTIN_TOPIC_PARTICIPANTBUILTINTOPICDATA_HPP diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp new file mode 100644 index 000000000..ed9601b91 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp @@ -0,0 +1,100 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file PublicationBuiltinTopicData.hpp + * + */ + +#ifndef FASTDDS_DDS_BUILTIN_TOPIC_PUBLICATIONBUILTINTOPICDATA_HPP +#define FASTDDS_DDS_BUILTIN_TOPIC_PUBLICATIONBUILTINTOPICDATA_HPP + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { +namespace builtin { + +struct PublicationBuiltinTopicData +{ + //! Builtin topic Key + BuiltinTopicKey_t key; + + //! Builtin participant topic Key + BuiltinTopicKey_t participant_key; + + //! Topic name + std::string topic_name; + + //! Type name + std::string type_name; + + // DataWriter Qos + + //!Durability Qos, implemented in the library. + DurabilityQosPolicy durability; + + //!Durability Service Qos, NOT implemented in the library. + DurabilityServiceQosPolicy durability_service; + + //!Deadline Qos, implemented in the library. + DeadlineQosPolicy deadline; + + //!Latency Budget Qos, NOT implemented in the library. + LatencyBudgetQosPolicy latency_budget; + + //!Liveliness Qos, implemented in the library. + LivelinessQosPolicy liveliness; + + //!Reliability Qos, implemented in the library. + ReliabilityQosPolicy reliability; + + //!Lifespan Qos, implemented in the library. + LifespanQosPolicy lifespan; + + //!User Data Qos, implemented in the library. + UserDataQosPolicy user_data; + + //!Ownership Qos, implemented in the library. + OwnershipQosPolicy ownership; + + //!Ownership Strength Qos, implemented in the library. + OwnershipStrengthQosPolicy ownership_strength; + + //!Destination Order Qos, NOT implemented in the library. + DestinationOrderQosPolicy destination_order; + + // Publisher Qos + + //!Presentation Qos, NOT implemented in the library. + PresentationQosPolicy presentation; + + //!Partition Qos, implemented in the library. + PartitionQosPolicy partition; + + //!Topic Data Qos, NOT implemented in the library. + TopicDataQosPolicy topic_data; + + //!Group Data Qos, implemented in the library. + GroupDataQosPolicy group_data; +}; + +} // builtin +} // dds +} // fastdds +} // eprosima + +#endif // FASTDDS_DDS_BUILTIN_TOPIC_PUBLICATIONBUILTINTOPICDATA_HPP diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.hpp new file mode 100644 index 000000000..854fe4d79 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/builtin/topic/SubscriptionBuiltinTopicData.hpp @@ -0,0 +1,94 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file SubscriptionBuiltinTopicData.hpp + * + */ + +#ifndef FASTDDS_DDS_BUILTIN_TOPIC_SUBSCRIPTIONBUILTINTOPICDATA_HPP +#define FASTDDS_DDS_BUILTIN_TOPIC_SUBSCRIPTIONBUILTINTOPICDATA_HPP + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { +namespace builtin { + +struct SubscriptionBuiltinTopicData +{ + //! Builtin topic Key + BuiltinTopicKey_t key; + + //! Builtin participant topic Key + BuiltinTopicKey_t participant_key; + + //! Topic name + std::string topic_name; + + //! Type name + std::string type_name; + + // DataReader Qos + + //!Durability Qos, implemented in the library. + DurabilityQosPolicy durability; + + //!Deadline Qos, implemented in the library. + DeadlineQosPolicy deadline; + + //!Latency Budget Qos, NOT implemented in the library. + LatencyBudgetQosPolicy latency_budget; + + //!Liveliness Qos, implemented in the library. + LivelinessQosPolicy liveliness; + + //!Reliability Qos, implemented in the library. + ReliabilityQosPolicy reliability; + + //!Ownership Qos, implemented in the library. + OwnershipQosPolicy ownership; + + //!Destination Order Qos, NOT implemented in the library. + DestinationOrderQosPolicy destination_order; + + //!User Data Qos, implemented in the library. + UserDataQosPolicy user_data; + + //!Time Based Filter Qos, NOT implemented in the library. + TimeBasedFilterQosPolicy m_timeBasedFilter; + + // Subscriber Qos + + //!Presentation Qos, NOT implemented in the library. + PresentationQosPolicy presentation; + + //!Partition Qos, implemented in the library. + PartitionQosPolicy partition; + + //!Topic Data Qos, NOT implemented in the library. + TopicDataQosPolicy topic_data; + + //!Group Data Qos, implemented in the library. + GroupDataQosPolicy group_data; +}; + +} // builtin +} // dds +} // fastdds +} // eprosima + +#endif // FASTDDS_DDS_BUILTIN_TOPIC_SUBSCRIPTIONBUILTINTOPICDATA_HPP diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/topic/TopicBuiltinTopicData.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/topic/TopicBuiltinTopicData.hpp new file mode 100644 index 000000000..6fa180775 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/builtin/topic/TopicBuiltinTopicData.hpp @@ -0,0 +1,81 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file TopicBuiltinTopicData.hpp + * + */ + +#ifndef FASTDDS_DDS_BUILTIN_TOPIC_TOPICBUILTINTOPICDATA_HPP +#define FASTDDS_DDS_BUILTIN_TOPIC_TOPICBUILTINTOPICDATA_HPP + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { +namespace builtin { + +struct TopicBuiltinTopicData +{ + //! Builtin topic Key + BuiltinTopicKey_t key; + + //! Name + std::string name; + + //! Type name + std::string type_name; + + //!Durability Qos, implemented in the library. + DurabilityQosPolicy durability; + + //!Durability Service Qos, NOT implemented in the library. + DurabilityServiceQosPolicy durability_service; + + //!Deadline Qos, implemented in the library. + DeadlineQosPolicy deadline; + + //!Liveliness Qos, implemented in the library. + LivelinessQosPolicy liveliness; + + //!Reliability Qos, implemented in the library. + ReliabilityQosPolicy reliability; + + //!Transport Priority Qos, NOT implemented in the library. + TransportPriorityQosPolicy transport_priority; + + //!Lifespan Qos, implemented in the library. + LifespanQosPolicy lifespan; + + //!History Qos, implemented in the library. + HistoryQosPolicy history; + + //!Resource Limits Qos, implemented in the library. + ResourceLimitsQosPolicy resource_limits; + + //!Ownership Qos, NOT implemented in the library. + OwnershipQosPolicy ownership; + + //!Topic Data Qos, NOT implemented in the library. + TopicDataQosPolicy topic_data; +}; + +} // builtin +} // dds +} // fastdds +} // eprosima + +#endif // FASTDDS_DDS_BUILTIN_TOPIC_TOPICBUILTINTOPICDATA_HPP diff --git a/ThirdParty/ros/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp b/ThirdParty/ros/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp index bcc691906..7c955fc95 100644 --- a/ThirdParty/ros/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp +++ b/ThirdParty/ros/include/fastdds/dds/builtin/typelookup/TypeLookupManager.hpp @@ -20,7 +20,9 @@ #ifndef _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP #define _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC + #include +#include #include #include @@ -30,7 +32,7 @@ #include namespace eprosima { -namespace fastrtps{ +namespace fastrtps { namespace rtps { @@ -61,10 +63,11 @@ class TypeLookupManager friend class TypeLookupReplyListener; public: + /** - * Constructor - * @param prot Pointer to the BuiltinProtocols object. - */ + * Constructor + * @param prot Pointer to the BuiltinProtocols object. + */ TypeLookupManager( fastrtps::rtps::BuiltinProtocols* prot); @@ -73,7 +76,7 @@ class TypeLookupManager /** * Initialize the TypeLookupManager protocol. * @param p Pointer to the RTPS participant implementation. - * @return true if the initialziacion was succesful. + * @return true if the initialziacion was successful. */ bool init_typelookup_service( fastrtps::rtps::RTPSParticipantImpl* p); @@ -115,15 +118,15 @@ class TypeLookupManager fastrtps::rtps::StatefulWriter* get_builtin_reply_writer(); /** - * Get the builtin request writer's history - * @return writer history - */ + * Get the builtin request writer's history + * @return writer history + */ fastrtps::rtps::WriterHistory* get_builtin_request_writer_history(); /** - * Get the builtin reply writer's history - * @return writer history - */ + * Get the builtin reply writer's history + * @return writer history + */ fastrtps::rtps::WriterHistory* get_builtin_reply_writer_history(); /** @@ -139,28 +142,28 @@ class TypeLookupManager fastrtps::rtps::StatefulReader* get_builtin_reply_reader(); /** - * Get the builtin request reader's history - * @return reader history - */ + * Get the builtin request reader's history + * @return reader history + */ fastrtps::rtps::ReaderHistory* get_builtin_request_reader_history(); /** - * Get the builtin reply reader's history - * @return reader history - */ + * Get the builtin reply reader's history + * @return reader history + */ fastrtps::rtps::ReaderHistory* get_builtin_reply_reader_history(); -/* TODO Uncomment if security is implemented. -#if HAVE_SECURITY - bool pairing_remote_reader_with_local_writer_after_security( - const fastrtps::rtps::GUID_t& local_writer, - const fastrtps::rtps::ReaderProxyData& remote_reader_data); + /* TODO Uncomment if security is implemented. + #if HAVE_SECURITY + bool pairing_remote_reader_with_local_writer_after_security( + const fastrtps::rtps::GUID_t& local_writer, + const fastrtps::rtps::ReaderProxyData& remote_reader_data); - bool pairing_remote_writer_with_local_reader_after_security( - const fastrtps::rtps::GUID_t& local_reader, - const fastrtps::rtps::WriterProxyData& remote_writer_data); -#endif -*/ + bool pairing_remote_writer_with_local_reader_after_security( + const fastrtps::rtps::GUID_t& local_reader, + const fastrtps::rtps::WriterProxyData& remote_writer_data); + #endif + */ fastrtps::rtps::SampleIdentity get_type_dependencies( const fastrtps::types::TypeIdentifierSeq& in) const; @@ -169,6 +172,7 @@ class TypeLookupManager const fastrtps::types::TypeIdentifierSeq& in) const; private: + /** * Create the endpoints used in the TypeLookupManager. * @return true if correct. @@ -253,40 +257,40 @@ class TypeLookupManager mutable TypeLookup_ReplyTypeSupport reply_type_; -/* TODO Uncomment if security is implemented. -#if HAVE_SECURITY - //!Pointer to the builtinRTPSParticipantMEssageWriter. - fastrtps::rtps::StatefulWriter* builtin_request_writer_secure_; + /* TODO Uncomment if security is implemented. + #if HAVE_SECURITY + //!Pointer to the builtinRTPSParticipantMEssageWriter. + fastrtps::rtps::StatefulWriter* builtin_request_writer_secure_; - //!Pointer to the builtinRTPSParticipantMEssageWriter. - fastrtps::rtps::StatefulWriter* builtin_reply_writer_secure_; + //!Pointer to the builtinRTPSParticipantMEssageWriter. + fastrtps::rtps::StatefulWriter* builtin_reply_writer_secure_; - //!Pointer to the builtinRTPSParticipantMEssageReader. - fastrtps::rtps::StatefulReader* builtin_request_reader_secure_; + //!Pointer to the builtinRTPSParticipantMEssageReader. + fastrtps::rtps::StatefulReader* builtin_request_reader_secure_; - //!Pointer to the builtinRTPSParticipantMEssageReader. - fastrtps::rtps::StatefulReader* builtin_reply_reader_secure_; + //!Pointer to the builtinRTPSParticipantMEssageReader. + fastrtps::rtps::StatefulReader* builtin_reply_reader_secure_; - //!Writer History - fastrtps::rtps::WriterHistory* builtin_request_writer_secure_history_; + //!Writer History + fastrtps::rtps::WriterHistory* builtin_request_writer_secure_history_; - //!Writer History - fastrtps::rtps::WriterHistory* builtin_reply_writer_secure_history_; + //!Writer History + fastrtps::rtps::WriterHistory* builtin_reply_writer_secure_history_; - //!Reader History - fastrtps::rtps::ReaderHistory* builtin_request_reader_secure_history_; + //!Reader History + fastrtps::rtps::ReaderHistory* builtin_request_reader_secure_history_; - //!Reader History - fastrtps::rtps::ReaderHistory* builtin_reply_reader_secure_history_; + //!Reader History + fastrtps::rtps::ReaderHistory* builtin_reply_reader_secure_history_; - bool create_secure_endpoints(); -#endif -*/ + bool create_secure_endpoints(); + #endif + */ }; } /* namespace builtin */ } /* namespace dds */ } /* namespace fastdds */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_TYPELOOKUP_SERVICE_MANAGER_HPP */ diff --git a/ThirdParty/ros/include/fastdds/dds/common/InstanceHandle.hpp b/ThirdParty/ros/include/fastdds/dds/common/InstanceHandle.hpp new file mode 100644 index 000000000..144af61e0 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/common/InstanceHandle.hpp @@ -0,0 +1,39 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file InstanceHandle.hpp + * + */ + +#ifndef _FASTDDS_DDS_COMMON_INSTANCEHANDLE_HPP_ +#define _FASTDDS_DDS_COMMON_INSTANCEHANDLE_HPP_ + +#include +#include + + +namespace eprosima { +namespace fastdds { +namespace dds { + +using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t; + +extern RTPS_DllAPI const InstanceHandle_t HANDLE_NIL; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_COMMON_INSTANCEHANDLE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/Entity.hpp b/ThirdParty/ros/include/fastdds/dds/core/Entity.hpp index 4a3cb011e..2cb5a8938 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/Entity.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/Entity.hpp @@ -20,8 +20,9 @@ #ifndef _FASTDDS_ENTITY_HPP_ #define _FASTDDS_ENTITY_HPP_ +#include #include -#include +#include #include namespace eprosima { @@ -39,18 +40,20 @@ class Entity /** * @brief Constructor + * * @param mask StatusMask (default: all) */ RTPS_DllAPI Entity( const StatusMask& mask = StatusMask::all()) : status_mask_(mask) - , status_changes_(StatusMask::none()) + , status_condition_(this) , enable_(false) { } /** * @brief This operation enables the Entity + * * @return RETCODE_OK */ virtual fastrtps::types::ReturnCode_t enable() @@ -69,6 +72,7 @@ class Entity /** * @brief Retrieves the set of relevant statuses for the Entity + * * @return Reference to the StatusMask with the relevant statuses set to 1 */ RTPS_DllAPI const StatusMask& get_status_mask() const @@ -90,22 +94,21 @@ class Entity * * @return const reference to the StatusMask with the triggered statuses set to 1 */ - RTPS_DllAPI const StatusMask& get_status_changes() const - { - return status_changes_; - } + RTPS_DllAPI const StatusMask& get_status_changes() const; /** * @brief Retrieves the instance handler that represents the Entity + * * @return Reference to the InstanceHandle */ - const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const + const InstanceHandle_t& get_instance_handle() const { return instance_handle_; } /** * @brief Checks if the Entity is enabled + * * @return true if enabled, false if not */ RTPS_DllAPI bool is_enabled() const @@ -119,14 +122,25 @@ class Entity return (this->instance_handle_ == other.instance_handle_); } + /** + * @brief Allows access to the StatusCondition associated with the Entity + * + * @return Reference to StatusCondition object + */ + RTPS_DllAPI StatusCondition& get_statuscondition() + { + return status_condition_; + } + protected: /** * @brief Setter for the Instance Handle + * * @param handle Instance Handle */ RTPS_DllAPI void set_instance_handle( - const fastrtps::rtps::InstanceHandle_t& handle) + const InstanceHandle_t& handle) { instance_handle_ = handle; } @@ -134,15 +148,14 @@ class Entity //! StatusMask with relevant statuses set to 1 StatusMask status_mask_; - //! StatusMask with triggered statuses set to 1 - StatusMask status_changes_; + //! Condition associated to the Entity + StatusCondition status_condition_; //! InstanceHandle associated to the Entity - fastrtps::rtps::InstanceHandle_t instance_handle_; + InstanceHandle_t instance_handle_; //! Boolean that states if the Entity is enabled or disabled bool enable_; - }; /** @@ -155,9 +168,10 @@ class DomainEntity : public Entity /** * @brief Constructor + * * @param mask StatusMask (default: all) */ - RTPS_DllAPI DomainEntity( + DomainEntity( const StatusMask& mask = StatusMask::all()) : Entity(mask) { diff --git a/ThirdParty/ros/include/fastdds/dds/core/LoanableArray.hpp b/ThirdParty/ros/include/fastdds/dds/core/LoanableArray.hpp new file mode 100644 index 000000000..29c8ca591 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/LoanableArray.hpp @@ -0,0 +1,75 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LoanableArray.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_LOANABLEARRAY_HPP_ +#define _FASTDDS_DDS_CORE_LOANABLEARRAY_HPP_ + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A type-safe, ordered collection of elements allocated on the stack, which can be loaned to a + * @ref LoanableCollection. + */ +template +struct LoanableArray : public std::array +{ + LoanableArray() + { + for (std::size_t n = 0; n < num_items; ++n) + { + buffer_[n] = &((*this)[n]); + } + } + + // Non-copyable + LoanableArray( + const LoanableArray&) = delete; + LoanableArray& operator = ( + const LoanableArray&) = delete; + + // Non-moveable + LoanableArray( + LoanableArray&&) = delete; + LoanableArray& operator = ( + LoanableArray&&) = delete; + + /** + * Get a buffer pointer that could be used on @ref LoanableCollection::loan. + * + * @return buffer pointer for loans. + */ + void** buffer_for_loans() const + { + return (void**) buffer_; + } + +private: + + void* buffer_[num_items]; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_CORE_LOANABLEARRAY_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/LoanableCollection.hpp b/ThirdParty/ros/include/fastdds/dds/core/LoanableCollection.hpp new file mode 100644 index 000000000..bf472d95f --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/LoanableCollection.hpp @@ -0,0 +1,250 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LoanableCollection.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_LOANABLECOLLECTION_HPP_ +#define _FASTDDS_DDS_CORE_LOANABLECOLLECTION_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A collection of generic opaque pointers that can receive the buffer from outside (loan). + * + * This is an abstract class. See @ref LoanableSequence for details. + */ +class LoanableCollection +{ +public: + + using size_type = int32_t; + using element_type = void*; + + /** + * Get the pointer to the elements buffer. + * + * The returned value may be nullptr if maximum() is 0. + * Otherwise it is guaranteed that up to maximum() elements can be accessed. + * + * @return the pointer to the elements buffer. + */ + const element_type* buffer() const + { + return elements_; + } + + /** + * Get the ownership flag. + * + * @return whether the collection has ownership of the buffer. + */ + bool has_ownership() const + { + return has_ownership_; + } + + /** + * Get the maximum number of elements currently allocated. + * + * @return the maximum number of elements currently allocated. + */ + size_type maximum() const + { + return maximum_; + } + + /** + * Get the number of elements currently accessible. + * + * @return the number of elements currently accessible. + */ + size_type length() const + { + return length_; + } + + /** + * Set the number of elements currently accessible. + * + * This method tells the collection that a certain number of elements should be accessible. + * If the new length is greater than the current @ref maximum() the collection should allocate + * space for the new elements. If this is the case and the collection does not own the buffer + * (i.e. @ref has_ownership() is false) then no allocation will be performed, the length will + * remain unchanged, and false will be returned. + * + * @pre new_length >= 0 + * + * @param [in] new_length New number of elements to be accessible. + * + * @return true if the new length was correctly set. + * + * @post length() == new_length + * @post maximum() >= new_length + */ + bool length( + size_type new_length) + { + if (new_length < 0) + { + return false; + } + + if (new_length <= maximum_) + { + length_ = new_length; + return true; + } + + if (!has_ownership_) + { + return false; + } + + resize(new_length); + length_ = new_length; + return true; + } + + /** + * Loan a buffer to the collection. + * + * @param [in] buffer pointer to the buffer to be loaned. + * @param [in] new_maximum number of allocated elements in buffer. + * @param [in] new_length number of accessible elements in buffer. + * + * @pre (has_ownership() == false) || (maximum() == 0) + * @pre new_maximum > 0 + * @pre new_maximum >= new_length + * @pre buffer != nullptr + * + * @return false if preconditions are not met. + * @return true if operation succeeds. + * + * @post buffer() == buffer + * @post has_ownership() == false + * @post maximum() == new_maximum + * @post length() == new_length + */ + bool loan( + element_type* buffer, + size_type new_maximum, + size_type new_length) + { + if (has_ownership_ && maximum_ > 0) + { + return false; + } + + if ((nullptr == buffer) || (new_maximum < new_length) || (new_maximum < 1)) + { + return false; + } + + maximum_ = new_maximum; + length_ = new_length; + elements_ = buffer; + has_ownership_ = false; + return true; + } + + /** + * Remove the loan from the collection. + * + * @param [out] maximum number of allocated elements on the returned buffer. + * @param [out] length number of accessible elements on the returned buffer. + * + * @pre has_ownership() == false + * + * @return nullptr if preconditions are not met. + * @return pointer to the previously loaned buffer of elements. + * + * @post buffer() == nullptr + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == 0 + */ + element_type* unloan( + size_type& maximum, + size_type& length) + { + if (has_ownership_) + { + return nullptr; + } + + element_type* ret_val = elements_; + maximum = maximum_; + length = length_; + + maximum_ = 0; + length_ = 0; + elements_ = nullptr; + has_ownership_ = true; + + return ret_val; + } + + /** + * Remove the loan from the collection. + * + * @pre has_ownership() == false + * + * @return nullptr if preconditions are not met. + * @return pointer to the previously loaned buffer of elements. + * + * @post buffer() == nullptr + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == 0 + */ + element_type* unloan() + { + size_type max, len; + return unloan(max, len); + } + +protected: + + /** + * Default constructor. + * + * Creates the loanable collection with no data. + * + * @post buffer() == nullptr + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == 0 + */ + LoanableCollection() = default; + + virtual void resize( + size_type new_length) = 0; + + size_type maximum_ = 0; + size_type length_ = 0; + element_type* elements_ = nullptr; + bool has_ownership_ = true; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_CORE_LOANABLECOLLECTION_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/LoanableSequence.hpp b/ThirdParty/ros/include/fastdds/dds/core/LoanableSequence.hpp new file mode 100644 index 000000000..1cdab9b84 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/LoanableSequence.hpp @@ -0,0 +1,233 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LoanableSequence.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_LOANABLESEQUENCE_HPP_ +#define _FASTDDS_DDS_CORE_LOANABLESEQUENCE_HPP_ + +#include +#include +#include +#include + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A type-safe, ordered collection of elements that can receive the buffer from outside (loan). + * + * For users who define data types in OMG IDL, this type corresponds to the IDL express sequence. + * + * For any user-data type Foo that an application defines for the purpose of data-distribution with + * Fast DDS, a 'using FooSeq = LoanableSequence' is generated. The sequence offers a subset of the + * methods defined by the standard OMG IDL to C++ mapping for sequences. + * We refer to an IDL 'sequence' as \c FooSeq. + * + * The state of a sequence is described by the properties 'maximum', 'length' and 'has_ownership'. + * @li The 'maximum' represents the size of the underlying buffer; this is the maximum number of elements + * it can possibly hold. It is returned by the maximum() operation. + * @li The 'length' represents the actual number of elements it currently holds. It is returned by the + * length() operation. + * @li The 'has_ownership' flag represents whether the sequence owns the underlying buffer. It is returned + * by the has_ownership() operation. If the sequence does not own the underlying buffer, the underlying + * buffer is loaned from somewhere else. This flag influences the lifecycle of the sequence and what + * operations are allowed on it. The general guidelines are provided below and more details are described + * in detail as pre-conditions and post-conditions of each of the sequence's operations: + * + * @li If has_ownership == true, the sequence has ownership on the buffer. It is then responsible for + * destroying the buffer when the sequence is destroyed. + * @li If has_ownership == false, the sequence does not have ownership on the buffer. This implies that + * the sequence is loaning the buffer. The sequence should not be destroyed until the loan is returned. + * @li A sequence with a zero maximum always has has_ownership == true + */ +template +class LoanableSequence : public LoanableTypedCollection +{ +public: + + using size_type = LoanableCollection::size_type; + using element_type = LoanableCollection::element_type; + + /** + * Default constructor. + * + * Creates the sequence with no data. + * + * @post buffer() == nullptr + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == 0 + */ + LoanableSequence() = default; + + /** + * Pre-allocation constructor. + * + * Creates the sequence with an initial number of allocated elements. + * When the input parameter is less than or equal to 0, the behavior is equivalent to the default constructor. + * Otherwise, the post-conditions below will apply. + * + * @param [in] max Number of elements to pre-allocate. + * + * @post buffer() != nullptr + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == max + */ + LoanableSequence( + size_type max) + { + if (max <= 0) + { + return; + } + + resize(max); + } + + /** + * Deallocate this sequence's buffer. + * + * @pre has_ownership() == true. If this precondition is not met, no memory will be released and + * a warning will be logged. + * @post maximum() == 0 and the underlying buffer is released. + */ + ~LoanableSequence() + { + if (elements_ && !has_ownership_) + { + logWarning(SUBSCRIBER, "Sequence destroyed with active loan"); + return; + } + + release(); + } + + /** + * Construct a sequence with the contents of another sequence. + * + * This method performs a deep copy of the sequence received into this one. + * Allocations will happen when other.length() > 0 + * + * @param [in] other The sequence from where contents are to be copied. + * + * @post has_ownership() == true + * @post maximum() == other.length() + * @post length() == other.length() + * @post buffer() != nullptr when other.length() > 0 + */ + LoanableSequence( + const LoanableSequence& other) + { + *this = other; + } + + /** + * Copy the contents of another sequence into this one. + * + * This method performs a deep copy of the sequence received into this one. + * If this sequence had a buffer loaned, it will behave as if @ref unloan has been called. + * Allocations will happen when + * (a) has_ownership() == false and other.length() > 0 + * (b) has_ownership() == true and other.length() > maximum() + * + * @param [in] other The sequence from where contents are to be copied. + * + * @post has_ownership() == true + * @post maximum() >= other.length() + * @post length() == other.length() + * @post buffer() != nullptr when other.length() > 0 + */ + LoanableSequence& operator =( + const LoanableSequence& other) + { + if (!has_ownership_) + { + release(); + } + + LoanableCollection::length(other.length()); + const element_type* other_buf = other.buffer(); + for (size_type n = 0; n < length_; ++n) + { + *static_cast(elements_[n]) = *static_cast(other_buf[n]); + } + + return *this; + } + +protected: + + using LoanableCollection::maximum_; + using LoanableCollection::length_; + using LoanableCollection::elements_; + using LoanableCollection::has_ownership_; + +private: + + void resize( + size_type maximum) override + { + assert(has_ownership_); + + // Resize collection and get new pointer + data_.reserve(maximum); + data_.resize(maximum); + elements_ = reinterpret_cast(data_.data()); + + // Allocate individual elements + while (maximum_ < maximum) + { + data_[maximum_++] = new T(); + } + } + + void release() + { + if (has_ownership_ && elements_) + { + for (size_type n = 0; n < maximum_; ++n) + { + T* elem = data_[n]; + delete elem; + } + std::vector().swap(data_); + } + + maximum_ = 0u; + length_ = 0u; + elements_ = nullptr; + has_ownership_ = true; + } + + std::vector data_; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +// Macro to easily declare a LoanableSequence for a data type +#define FASTDDS_SEQUENCE(FooSeq, Foo) using FooSeq = eprosima::fastdds::dds::LoanableSequence +#define FASTDDS_CONST_SEQUENCE(FooSeq, Foo) using FooSeq = eprosima::fastdds::dds::LoanableSequence + +#endif // _FASTDDS_DDS_CORE_LOANABLESEQUENCE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/LoanableTypedCollection.hpp b/ThirdParty/ros/include/fastdds/dds/core/LoanableTypedCollection.hpp new file mode 100644 index 000000000..a35159f66 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/LoanableTypedCollection.hpp @@ -0,0 +1,101 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LoanableTypedCollection.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_LOANABLETYPEDCOLLECTION_HPP_ +#define _FASTDDS_DDS_CORE_LOANABLETYPEDCOLLECTION_HPP_ + +#include +#include +#include +#include + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A type-safe accessible collection of generic opaque pointers that can receive the buffer from outside (loan). + * + * This is an abstract class. See @ref LoanableSequence for details. + */ +template +class LoanableTypedCollection : public LoanableCollection +{ +public: + + /** + * Set an element of the sequence. + * + * This is the operator that is invoked when the application indexes into a @em non-const sequence: + * @code{.cpp} + * element = sequence[n]; + * sequence[n] = element; + * @endcode + * + * Note that a @em reference to the element is returned (and not a copy) + * + * @param [in] n index of element to access, must be >= 0 and less than length(). + * + * @return a reference to the element at position @c n + */ + template + typename std::enable_if::type& operator []( + size_type n) + { + if (n >= length_) + { + throw std::out_of_range(""); + } + + return *static_cast(elements_[n]); + } + + /** + * Get an element of the sequence. + * + * This is the operator that is invoked when the application indexes into a @em const sequence: + * @code{.cpp} + * element = sequence[n]; + * @endcode + * + * Note that a @em reference to the element is returned (and not a copy) + * + * @param [in] n index of element to access, must be >= 0 and less than length(). + * + * @return a const reference to the element at position @n + */ + const T& operator []( + size_type n) const + { + if (n >= length_) + { + throw std::out_of_range(""); + } + + return *static_cast(elements_[n]); + } + +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_CORE_LOANABLETYPEDCOLLECTION_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/StackAllocatedSequence.hpp b/ThirdParty/ros/include/fastdds/dds/core/StackAllocatedSequence.hpp new file mode 100644 index 000000000..7320ac698 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/StackAllocatedSequence.hpp @@ -0,0 +1,91 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file StackAllocatedSequence.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_STACKALLOCATEDSEQUENCE_HPP_ +#define _FASTDDS_DDS_CORE_STACKALLOCATEDSEQUENCE_HPP_ + +#include +#include +#include +#include + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A type-safe, ordered collection of elements allocated on the stack. + */ +template +struct StackAllocatedSequence : public LoanableTypedCollection +{ + using size_type = LoanableCollection::size_type; + using element_type = LoanableCollection::element_type; + + StackAllocatedSequence() + { + has_ownership_ = true; + maximum_ = num_items; + length_ = 0; + elements_ = data_.buffer_for_loans(); + } + + ~StackAllocatedSequence() = default; + + // Non-copyable + StackAllocatedSequence( + const StackAllocatedSequence&) = delete; + StackAllocatedSequence& operator = ( + const StackAllocatedSequence&) = delete; + + // Non-moveable + StackAllocatedSequence( + StackAllocatedSequence&&) = delete; + StackAllocatedSequence& operator = ( + StackAllocatedSequence&&) = delete; + +protected: + + using LoanableCollection::maximum_; + using LoanableCollection::length_; + using LoanableCollection::elements_; + using LoanableCollection::has_ownership_; + + void resize( + LoanableCollection::size_type new_length) override + { + // This kind of collection cannot grow above its stack-allocated size + if (new_length > num_items) + { + throw std::bad_alloc(); + } + } + +private: + + LoanableArray data_; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_CORE_STACKALLOCATEDSEQUENCE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/UserAllocatedSequence.hpp b/ThirdParty/ros/include/fastdds/dds/core/UserAllocatedSequence.hpp new file mode 100644 index 000000000..eec686ab3 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/UserAllocatedSequence.hpp @@ -0,0 +1,103 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file UserAllocatedSequence.hpp + */ + +#ifndef _FASTDDS_DDS_CORE_USERALLOCATEDSEQUENCE_HPP_ +#define _FASTDDS_DDS_CORE_USERALLOCATEDSEQUENCE_HPP_ + +#include +#include +#include + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * A collection of generic opaque pointers allocated by the user. + * + * This kind of collection would always return @c true for @c has_ownership(), + * and thus would not be able to receive loans. + * It would also have an inmutable @c maximum(), so it would not allow @c length() to grow beyond the maximum + * value indicated on construction. + */ +struct UserAllocatedSequence : public LoanableCollection +{ + using size_type = LoanableCollection::size_type; + using element_type = LoanableCollection::element_type; + + /** + * Construct a UserAllocatedSequence. + * + * @param [in] items Pointer to the beginning of an array of @c num_items opaque pointers. + * @param [in] num_items Number of opaque pointers in @c items. + * + * @post buffer() == items + * @post has_ownership() == true + * @post length() == 0 + * @post maximum() == num_items + */ + UserAllocatedSequence( + element_type* items, + size_type num_items) + { + has_ownership_ = true; + maximum_ = num_items; + length_ = 0; + elements_ = items; + } + + ~UserAllocatedSequence() = default; + + // Non-copyable + UserAllocatedSequence( + const UserAllocatedSequence&) = delete; + UserAllocatedSequence& operator = ( + const UserAllocatedSequence&) = delete; + + // Non-moveable + UserAllocatedSequence( + UserAllocatedSequence&&) = delete; + UserAllocatedSequence& operator = ( + UserAllocatedSequence&&) = delete; + +protected: + + using LoanableCollection::maximum_; + using LoanableCollection::length_; + using LoanableCollection::elements_; + using LoanableCollection::has_ownership_; + + void resize( + size_type new_length) override + { + // This kind of collection cannot grow above its stack-allocated size + if (new_length > maximum_) + { + throw std::bad_alloc(); + } + } + +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_CORE_USERALLOCATEDSEQUENCE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/condition/Condition.hpp b/ThirdParty/ros/include/fastdds/dds/core/condition/Condition.hpp new file mode 100644 index 000000000..2131b581e --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/condition/Condition.hpp @@ -0,0 +1,74 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file Condition.hpp + * + */ + +#ifndef _FASTDDS_CONDITION_HPP_ +#define _FASTDDS_CONDITION_HPP_ + +#include +#include + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +// Forward declaration of implementation details +namespace detail { +struct ConditionNotifier; +} // namespace detail + +/** + * @brief The Condition class is the root base class for all the conditions that may be attached to a WaitSet. + */ +class Condition +{ +public: + + /** + * @brief Retrieves the trigger_value of the Condition + * @return true if trigger_value is set to 'true', 'false' otherwise + */ + RTPS_DllAPI virtual bool get_trigger_value() const + { + logWarning(CONDITION, "get_trigger_value public member function not implemented"); + return false; // TODO return trigger value + } + + detail::ConditionNotifier* get_notifier() const + { + return notifier_.get(); + } + +protected: + + Condition(); + virtual ~Condition(); + + std::unique_ptr notifier_; +}; + +using ConditionSeq = std::vector; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_CONDITION_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/condition/GuardCondition.hpp b/ThirdParty/ros/include/fastdds/dds/core/condition/GuardCondition.hpp new file mode 100644 index 000000000..1912fb8c9 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/condition/GuardCondition.hpp @@ -0,0 +1,72 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file GuardCondition.hpp + * + */ + +#ifndef _FASTDDS_GUARD_CONDITION_HPP_ +#define _FASTDDS_GUARD_CONDITION_HPP_ + +#include + +#include +#include +#include + +using eprosima::fastrtps::types::ReturnCode_t; + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * @brief The GuardCondition class is a specific Condition whose trigger_value is completely under the control + * of the application. + * + * The purpose of the GuardCondition is to provide the means for the application to manually wakeup a WaitSet. This is + * accomplished by attaching the GuardCondition to the WaitSet and then setting the trigger_value by means of the + * set_trigger_value operation. + * + */ +class GuardCondition : public Condition +{ +public: + + RTPS_DllAPI GuardCondition(); + + RTPS_DllAPI ~GuardCondition(); + + RTPS_DllAPI bool get_trigger_value() const override; + + /** + * @brief Set the trigger_value + * @param value new value for trigger + * @return RETURN_OK + */ + RTPS_DllAPI ReturnCode_t set_trigger_value( + bool value); + +private: + + std::atomic trigger_value_; + +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_GUARD_CONDITION_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/condition/StatusCondition.hpp b/ThirdParty/ros/include/fastdds/dds/core/condition/StatusCondition.hpp new file mode 100644 index 000000000..49fd0adc9 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/condition/StatusCondition.hpp @@ -0,0 +1,112 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file StatusCondition.hpp + * + */ + +#ifndef _FASTDDS_STATUS_CONDITION_HPP_ +#define _FASTDDS_STATUS_CONDITION_HPP_ + +#include +#include +#include +#include + +using eprosima::fastrtps::types::ReturnCode_t; + +namespace eprosima { +namespace fastdds { +namespace dds { + +namespace detail { + +struct StatusConditionImpl; + +} // namespace detail + +class Entity; + +/** + * @brief The StatusCondition class is a specific Condition that is associated with each Entity. + * + */ +class StatusCondition final : public Condition +{ +public: + + StatusCondition( + Entity* parent); + + ~StatusCondition() final; + + // Non-copyable + StatusCondition( + const StatusCondition&) = delete; + StatusCondition& operator =( + const StatusCondition&) = delete; + + // Non-movable + StatusCondition( + StatusCondition&&) = delete; + StatusCondition& operator =( + StatusCondition&&) = delete; + + /** + * @brief Retrieves the trigger_value of the Condition + * @return true if trigger_value is set to 'true', 'false' otherwise + */ + RTPS_DllAPI bool get_trigger_value() const override; + + /** + * @brief Defines the list of communication statuses that are taken into account to determine the trigger_value + * @param mask defines the mask for the status + * @return RETCODE_OK with everything ok, error code otherwise + */ + RTPS_DllAPI ReturnCode_t set_enabled_statuses( + const StatusMask& mask); + + /** + * @brief Retrieves the list of communication statuses that are taken into account to determine the trigger_value + * @return Status set or default status if it has not been set + */ + RTPS_DllAPI const StatusMask& get_enabled_statuses() const; + + /** + * @brief Returns the Entity associated + * @return Entity + */ + RTPS_DllAPI Entity* get_entity() const; + + detail::StatusConditionImpl* get_impl() const + { + return impl_.get(); + } + +protected: + + //! DDS Entity for which this condition is monitoring the status + Entity* entity_ = nullptr; + + //! Class implementation + std::unique_ptr impl_; + +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_STATUS_CONDITION_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/condition/WaitSet.hpp b/ThirdParty/ros/include/fastdds/dds/core/condition/WaitSet.hpp new file mode 100644 index 000000000..2066aaede --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/core/condition/WaitSet.hpp @@ -0,0 +1,110 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file WaitSet.hpp + * + */ + +#ifndef _FASTDDS_WAIT_SET_HPP_ +#define _FASTDDS_WAIT_SET_HPP_ + +#include + +#include +#include +#include +#include + +using eprosima::fastrtps::types::ReturnCode_t; + +namespace eprosima { +namespace fastdds { +namespace dds { + +// Forward declaration of implementation details +namespace detail { +struct WaitSetImpl; +} // namespace detail + +/** + * @brief The WaitSet class allows an application to wait until one or more of the attached Condition objects + * has a trigger_value of TRUE or until timeout expires. + * + */ +class WaitSet +{ +public: + + RTPS_DllAPI WaitSet(); + + RTPS_DllAPI ~WaitSet(); + + WaitSet( + const WaitSet&) = delete; + WaitSet( + WaitSet&&) = delete; + WaitSet& operator = ( + const WaitSet&) = delete; + WaitSet& operator = ( + WaitSet&&) = delete; + + /** + * @brief Attaches a Condition to the Wait Set. + * @param cond Condition + * @return RETCODE_OK if attached correctly, error code otherwise + */ + RTPS_DllAPI ReturnCode_t attach_condition( + const Condition& cond); + + + /** + * @brief Detaches a Condition from the WaitSet + * @param cond Condition + * @return RETCODE_OK if detached correctly, PRECONDITION_NOT_MET if condition was not attached + */ + RTPS_DllAPI ReturnCode_t detach_condition( + const Condition& cond); + + /** + * @brief Allows an application thread to wait for the occurrence of certain conditions. + * If none of the conditions attached to the WaitSet have a trigger_value of true, + * the wait operation will block suspending the calling thread + * @param active_conditions Reference to the collection of conditions which trigger_value are true + * @param timeout Maximum time of the wait + * @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if WaitSet already waiting, TIMEOUT if maximum + * time expired, error code otherwise + */ + RTPS_DllAPI ReturnCode_t wait( + ConditionSeq& active_conditions, + const fastrtps::Duration_t timeout) const; + + /** + * @brief Retrieves the list of attached conditions + * @param attached_conditions Reference to the collection of attached conditions + * @return RETCODE_OK if everything correct, error code otherwise + */ + RTPS_DllAPI ReturnCode_t get_conditions( + ConditionSeq& attached_conditions) const; + +private: + + std::unique_ptr impl_; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_WAIT_SET_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/core/policy/ParameterTypes.hpp b/ThirdParty/ros/include/fastdds/dds/core/policy/ParameterTypes.hpp index 6b140b144..51083d7d4 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/policy/ParameterTypes.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/policy/ParameterTypes.hpp @@ -56,79 +56,110 @@ namespace dds { */ enum ParameterId_t : uint16_t { - PID_PAD = 0x0000, - PID_SENTINEL = 0x0001, - PID_USER_DATA = 0x002c, - PID_TOPIC_NAME = 0x0005, - PID_TYPE_NAME = 0x0007, - PID_GROUP_DATA =0x002d, - PID_TOPIC_DATA =0x002e, - PID_DURABILITY =0x001d, - PID_DURABILITY_SERVICE =0x001e, - PID_DEADLINE =0x0023, - PID_LATENCY_BUDGET =0x0027, - PID_LIVELINESS =0x001b, - PID_RELIABILITY =0x001A, - PID_LIFESPAN =0x002b, - PID_DESTINATION_ORDER =0x0025, - PID_HISTORY =0x0040, - PID_RESOURCE_LIMITS =0x0041, - PID_OWNERSHIP =0x001f, - PID_OWNERSHIP_STRENGTH =0x0006, - PID_PRESENTATION =0x0021, - PID_PARTITION =0x0029, - PID_TIME_BASED_FILTER =0x0004, - PID_TRANSPORT_PRIORITY =0x0049, - PID_PROTOCOL_VERSION = 0x0015, - PID_VENDORID = 0x0016, - PID_UNICAST_LOCATOR = 0x002f, - PID_MULTICAST_LOCATOR = 0x0030, - PID_MULTICAST_IPADDRESS =0x0011, - PID_DEFAULT_UNICAST_LOCATOR = 0x0031, - PID_DEFAULT_MULTICAST_LOCATOR = 0x0048, - PID_METATRAFFIC_UNICAST_LOCATOR = 0x0032, - PID_METATRAFFIC_MULTICAST_LOCATOR = 0x0033, - PID_DEFAULT_UNICAST_IPADDRESS =0x000c, - PID_DEFAULT_UNICAST_PORT = 0x000e, - PID_METATRAFFIC_UNICAST_IPADDRESS =0x0045, - PID_METATRAFFIC_UNICAST_PORT = 0x000d, - PID_METATRAFFIC_MULTICAST_IPADDRESS =0x000b, - PID_METATRAFFIC_MULTICAST_PORT = 0x0046, - PID_EXPECTS_INLINE_QOS =0x0043, - PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT =0x0034, - PID_PARTICIPANT_BUILTIN_ENDPOINTS = 0x0044, - PID_PARTICIPANT_LEASE_DURATION = 0x0002, - PID_CONTENT_FILTER_PROPERTY =0x0035, - PID_PARTICIPANT_GUID = 0x0050, - PID_PARTICIPANT_ENTITYID =0x0051, - PID_GROUP_GUID =0x0052, - PID_GROUP_ENTITYID =0x0053, - PID_BUILTIN_ENDPOINT_SET = 0x0058, - PID_PROPERTY_LIST = 0x0059, - PID_TYPE_MAX_SIZE_SERIALIZED =0x0060, - PID_ENTITY_NAME = 0x0062, - PID_TYPE_IDV1 = 0x0069, - PID_KEY_HASH = 0x0070, - PID_STATUS_INFO = 0x0071, - PID_TYPE_OBJECTV1 = 0x0072, - PID_ENDPOINT_GUID = 0x005a, - //PID_RELATED_SAMPLE_IDENTITY = 0x0083 - PID_IDENTITY_TOKEN = 0x1001, - PID_PERMISSIONS_TOKEN = 0x1002, - PID_DATA_TAGS = 0x1003, - PID_ENDPOINT_SECURITY_INFO = 0x1004, - PID_PARTICIPANT_SECURITY_INFO = 0x1005, - PID_IDENTITY_STATUS_TOKEN = 0x1006, - PID_PERSISTENCE_GUID = 0x8002, - PID_RELATED_SAMPLE_IDENTITY = 0x800f, - PID_DATA_REPRESENTATION = 0x0073, - PID_TYPE_CONSISTENCY_ENFORCEMENT = 0x0074, - PID_TYPE_INFORMATION = 0x0075, - PID_DISABLE_POSITIVE_ACKS = 0x8005, + /* From Table 9.18 of DDS-RTPS 2.5 */ + PID_PAD = 0x0000, + PID_SENTINEL = 0x0001, + PID_USER_DATA = 0x002c, + PID_TOPIC_NAME = 0x0005, + PID_TYPE_NAME = 0x0007, + PID_GROUP_DATA = 0x002d, + PID_TOPIC_DATA = 0x002e, + PID_DURABILITY = 0x001d, + PID_DURABILITY_SERVICE = 0x001e, + PID_DEADLINE = 0x0023, + PID_LATENCY_BUDGET = 0x0027, + PID_LIVELINESS = 0x001b, + PID_RELIABILITY = 0x001a, + PID_LIFESPAN = 0x002b, + PID_DESTINATION_ORDER = 0x0025, + PID_HISTORY = 0x0040, + PID_RESOURCE_LIMITS = 0x0041, + PID_OWNERSHIP = 0x001f, + PID_OWNERSHIP_STRENGTH = 0x0006, + PID_PRESENTATION = 0x0021, + PID_PARTITION = 0x0029, + PID_TIME_BASED_FILTER = 0x0004, + PID_TRANSPORT_PRIORITY = 0x0049, + PID_DOMAIN_ID = 0x000f, + PID_DOMAIN_TAG = 0x4014, + PID_PROTOCOL_VERSION = 0x0015, + PID_VENDORID = 0x0016, + PID_UNICAST_LOCATOR = 0x002f, + PID_MULTICAST_LOCATOR = 0x0030, + PID_DEFAULT_UNICAST_LOCATOR = 0x0031, + PID_DEFAULT_MULTICAST_LOCATOR = 0x0048, + PID_METATRAFFIC_UNICAST_LOCATOR = 0x0032, + PID_METATRAFFIC_MULTICAST_LOCATOR = 0x0033, + PID_EXPECTS_INLINE_QOS = 0x0043, + PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT = 0x0034, + PID_PARTICIPANT_LEASE_DURATION = 0x0002, + PID_CONTENT_FILTER_PROPERTY = 0x0035, + PID_PARTICIPANT_GUID = 0x0050, + PID_GROUP_GUID = 0x0052, + PID_GROUP_ENTITYID = 0x0053, + PID_BUILTIN_ENDPOINT_SET = 0x0058, + PID_BUILTIN_ENDPOINT_QOS = 0x0077, + PID_PROPERTY_LIST = 0x0059, + PID_TYPE_MAX_SIZE_SERIALIZED = 0x0060, + PID_ENTITY_NAME = 0x0062, + PID_ENDPOINT_GUID = 0x005a, + + /* From table 9.20 of DDS-RTPS 2.5 - inline QoS only */ + PID_CONTENT_FILTER_INFO = 0x0055, + PID_COHERENT_SET = 0x0056, + PID_DIRECTED_WRITE = 0x0057, + PID_ORIGINAL_WRITER_INFO = 0x0061, + PID_GROUP_COHERENT_SET = 0x0063, + PID_GROUP_SEQ_NUM = 0x0064, + PID_WRITER_GROUP_INFO = 0x0065, + PID_SECURE_WRITER_GROUP_INFO = 0x0066, + PID_KEY_HASH = 0x0070, + PID_STATUS_INFO = 0x0071, + + /* Deprecated */ + // PID_MULTICAST_IPADDRESS = 0x0011, + // PID_DEFAULT_UNICAST_IPADDRESS = 0x000c, + // PID_DEFAULT_UNICAST_PORT = 0x000e, + // PID_METATRAFFIC_UNICAST_IPADDRESS = 0x0045, + // PID_METATRAFFIC_UNICAST_PORT = 0x000d, + // PID_METATRAFFIC_MULTICAST_IPADDRESS = 0x000b, + // PID_METATRAFFIC_MULTICAST_PORT = 0x0046, + // PID_PARTICIPANT_BUILTIN_ENDPOINTS = 0x0044, + // PID_PARTICIPANT_ENTITYID = 0x0051, + + /* From DDS-XTYPES 1.3 */ + PID_TYPE_IDV1 = 0x0069, + PID_TYPE_OBJECTV1 = 0x0072, + PID_DATA_REPRESENTATION = 0x0073, + PID_TYPE_CONSISTENCY_ENFORCEMENT = 0x0074, + PID_TYPE_INFORMATION = 0x0075, + + /* From table 10 of DDS-SEC 1.1 */ + PID_IDENTITY_TOKEN = 0x1001, + PID_PERMISSIONS_TOKEN = 0x1002, + PID_PARTICIPANT_SECURITY_INFO = 0x1005, + + /* From table 12 of DDS-SEC 1.1 */ + PID_ENDPOINT_SECURITY_INFO = 0x1004, + + /* From table 13 of DDS-SEC 1.1 */ + PID_IDENTITY_STATUS_TOKEN = 0x1006, + + /* From table 14 of DDS-SEC 1.1 */ + PID_DATA_TAGS = 0x1003, + + /* eProsima Fast DDS extensions */ + PID_PERSISTENCE_GUID = 0x8002, + PID_RELATED_SAMPLE_IDENTITY = 0x800f, + PID_DISABLE_POSITIVE_ACKS = 0x8005, + PID_DATASHARING = 0x8006, }; -//!Base Parameter class with parameter PID and parameter length in bytes. -//!@ingroup PARAMETER_MODULE +/*! + * Base Parameter class with parameter PID and parameter length in bytes. + * + * @ingroup PARAMETER_MODULE + */ class Parameter_t { public: @@ -144,6 +175,7 @@ class Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param length Its associated length */ @@ -195,6 +227,7 @@ class ParameterKey_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -207,6 +240,7 @@ class ParameterKey_t : public Parameter_t /** * @brief Constructor using a parameter PID, parameter length and Instance Handle + * * @param pid Pid of the parameter * @param in_length Its associated length * @param ke Instance Handle to be set @@ -232,7 +266,7 @@ class ParameterLocator_t : public Parameter_t public: //!Locator - fastrtps::rtps::Locator_t locator; + rtps::Locator locator; /** * @brief Constructor without parameters @@ -243,6 +277,7 @@ class ParameterLocator_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -255,6 +290,7 @@ class ParameterLocator_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a Locator + * * @param pid Pid of the parameter * @param in_length Its associated length * @param loc Locator to be set @@ -262,7 +298,7 @@ class ParameterLocator_t : public Parameter_t ParameterLocator_t( ParameterId_t pid, uint16_t in_length, - const fastrtps::rtps::Locator_t& loc) + const rtps::Locator& loc) : Parameter_t(pid, in_length) , locator(loc) { @@ -288,6 +324,7 @@ class ParameterString_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -300,6 +337,7 @@ class ParameterString_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a string + * * @param pid Pid of the parameter * @param in_length Its associated length * @param strin Parameter name @@ -315,6 +353,7 @@ class ParameterString_t : public Parameter_t /** * @brief Getter for the name + * * @return current name associated */ inline const char* getName() const @@ -324,6 +363,7 @@ class ParameterString_t : public Parameter_t /** * @brief Setter for the name + * * @param name String to be set */ inline void setName( @@ -334,6 +374,7 @@ class ParameterString_t : public Parameter_t /** * @brief Getter for the name size + * * @return size_t */ inline size_t size() const @@ -367,6 +408,7 @@ class ParameterPort_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -380,6 +422,7 @@ class ParameterPort_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a port + * * @param pid Pid of the parameter * @param in_length Its associated length * @param po Port to be set @@ -416,6 +459,7 @@ class ParameterGuid_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -428,6 +472,7 @@ class ParameterGuid_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a GUID + * * @param pid Pid of the parameter * @param in_length Its associated length * @param guidin GUID to be set @@ -443,6 +488,7 @@ class ParameterGuid_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a Instance Handle + * * @param pid Pid of the parameter * @param in_length Its associated length * @param iH Instance Handle to be set as GUID @@ -453,17 +499,7 @@ class ParameterGuid_t : public Parameter_t const fastrtps::rtps::InstanceHandle_t& iH) : Parameter_t(pid, in_length) { - for (uint8_t i = 0; i < 16; ++i) - { - if (i < 12) - { - guid.guidPrefix.value[i] = iH.value[i]; - } - else - { - guid.entityId.value[i - 12] = iH.value[i]; - } - } + fastrtps::rtps::iHandle2GUID(guid, iH); } }; @@ -490,6 +526,7 @@ class ParameterProtocolVersion_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -525,6 +562,7 @@ class ParameterVendorId_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -560,6 +598,7 @@ class ParameterIP4Address_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -573,6 +612,7 @@ class ParameterIP4Address_t : public Parameter_t /** * @brief Setter for the address + * * @param o1 First octet * @param o2 Second octet * @param o3 Third octet @@ -614,6 +654,7 @@ class ParameterBool_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -627,6 +668,7 @@ class ParameterBool_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and a boolean + * * @param pid Pid of the parameter * @param in_length Its associated length * @param inbool Boolean to be set @@ -664,6 +706,7 @@ class ParameterStatusInfo_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -677,6 +720,7 @@ class ParameterStatusInfo_t : public Parameter_t /** * @brief Constructor using a parameter PID, the parameter length and status value + * * @param pid Pid of the parameter * @param in_length Its associated length * @param instatus uint8_t to be set as status @@ -714,6 +758,7 @@ class ParameterCount_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -749,6 +794,7 @@ class ParameterEntityId_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -783,6 +829,7 @@ class ParameterTime_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -817,6 +864,7 @@ class ParameterBuiltinEndpointSet_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -858,6 +906,7 @@ class ParameterProperty_t /** * @brief Constructor using a pointer + * * @param ptr Pointer to be set as data */ explicit ParameterProperty_t( @@ -868,6 +917,7 @@ class ParameterProperty_t /** * @brief Getter for the first element in data + * * @return string with the data */ std::string first() const @@ -878,6 +928,7 @@ class ParameterProperty_t /** * @brief Getter for the second element in data + * * @return string with the data */ std::string second() const @@ -891,6 +942,7 @@ class ParameterProperty_t /** * @brief Setter using a pair of strings + * * @param new_value Pair of strings with the new values * @return true if the modification is done correctly and false if the size of the new_value is not valid */ @@ -925,6 +977,7 @@ class ParameterProperty_t /** * @brief Getter that returns a pair of the first and second elements in data + * * @return Pair of strings with the first and second elements data */ std::pair pair() const @@ -934,6 +987,7 @@ class ParameterProperty_t /** * @brief Getter for data size + * * @return uint32_t with the size */ uint32_t size() const @@ -963,6 +1017,7 @@ class ParameterProperty_t /** * @brief Getter for the size of a specific octet pointer + * * @param ptr Octet pointer to measure * @return Size of the pointer data */ @@ -978,28 +1033,53 @@ class ParameterProperty_t /** * Parameter property ID for persistence GUID + * * @ingroup PARAMETER_MODULE */ const std::string parameter_property_persistence_guid = "PID_PERSISTENCE_GUID"; /** * Parameter property ID for participant type + * * @ingroup PARAMETER_MODULE */ const std::string parameter_property_participant_type = "PARTICIPANT_TYPE"; /** * Parameter property ID for Discovery Server version + * * @ingroup PARAMETER_MODULE */ const std::string parameter_property_ds_version = "DS_VERSION"; /** * Parameter property value for Discovery Server version + * * @ingroup PARAMETER_MODULE */ const std::string parameter_property_current_ds_version = "2.0"; +/** + * Parameter property value for Host physical data + * + * @ingroup PARAMETER_MODULE + */ +const char* const parameter_policy_physical_data_host = "fastdds.physical_data.host"; + +/** + * Parameter property value for User physical data + * + * @ingroup PARAMETER_MODULE + */ +const char* const parameter_policy_physical_data_user = "fastdds.physical_data.user"; + +/** + * Parameter property value for Process physical data + * + * @ingroup PARAMETER_MODULE + */ +const char* const parameter_policy_physical_data_process = "fastdds.physical_data.process"; + /** * @ingroup PARAMETER_MODULE */ @@ -1029,6 +1109,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Constructor using an octet pointer + * * @param ptr Octet pointer to be set */ iterator( @@ -1063,13 +1144,13 @@ class ParameterPropertyList_t : public Parameter_t } bool operator ==( - const self_type& rhs) + const self_type& rhs) const { return ptr_ == rhs.ptr_; } bool operator !=( - const self_type& rhs) + const self_type& rhs) const { return ptr_ != rhs.ptr_; } @@ -1087,6 +1168,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the pointer + * * @return the pointer */ fastrtps::rtps::octet* address() const @@ -1115,6 +1197,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Constructor using a pointer + * * @param ptr Pointer to be set */ const_iterator( @@ -1149,13 +1232,13 @@ class ParameterPropertyList_t : public Parameter_t } bool operator ==( - const self_type& rhs) + const self_type& rhs) const { return ptr_ == rhs.ptr_; } bool operator !=( - const self_type& rhs) + const self_type& rhs) const { return ptr_ != rhs.ptr_; } @@ -1173,6 +1256,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the pointer + * * @return the pointer */ const fastrtps::rtps::octet* address() const @@ -1203,6 +1287,7 @@ class ParameterPropertyList_t : public Parameter_t /** * Constructor with a defined maximum size + * * @param size Size to be set as maximum */ ParameterPropertyList_t( @@ -1216,19 +1301,23 @@ class ParameterPropertyList_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * + * @param pid Pid of the parameter * @param in_length Its associated length */ ParameterPropertyList_t( - ParameterId_t /*pid*/, + ParameterId_t pid, uint16_t in_length) : Parameter_t(PID_PROPERTY_LIST, in_length) , Nproperties_ (0) , limit_size_ (false) { + static_cast(pid); } /** * @brief Constructor using a Parameter Property List + * * @param parameter_properties Properties to be set */ ParameterPropertyList_t( @@ -1258,6 +1347,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the first position of the ParameterPropertyList + * * @return iterator */ iterator begin() @@ -1267,6 +1357,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the end of the ParameterPropertyList + * * @return iterator */ iterator end() @@ -1276,6 +1367,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the first position of the ParameterPropertyList + * * @return const_iterator */ const_iterator begin() const @@ -1285,6 +1377,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the end of the ParameterPropertyList + * * @return const_iterator */ const_iterator end() const @@ -1294,37 +1387,38 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Introduce a new property in the ParameterPropertyList + * * @param p Pair with the values of the new property * @return true if it is introduced, false if not. */ bool push_back( std::pair p) { - //Realloc if needed; - uint32_t size1 = (uint32_t) p.first.length() + 1; - uint32_t alignment1 = ((size1 + 3u) & ~3u) - size1; - - uint32_t size2 = (uint32_t) p.second.length() + 1; - uint32_t alignment2 = ((size2 + 3u) & ~3u) - size2; + return push_back(p.first, p.second); + } - if (limit_size_ && (properties_.max_size < properties_.length + - size1 + alignment1 + 4 + - size2 + alignment2 + 4)) - { - return false; - } - properties_.reserve(properties_.length + - size1 + alignment1 + 4 + - size2 + alignment2 + 4); + /** + * @brief Introduce a new property in the ParameterPropertyList + * + * @param key Key part of the new property + * @param value Value part of the new property + * @return true if it is introduced, false if not. + */ + bool push_back( + const std::string& key, + const std::string& value) + { + auto str1 = reinterpret_cast(key.c_str()); + uint32_t size1 = (uint32_t) key.length() + 1; + auto str2 = reinterpret_cast(value.c_str()); + uint32_t size2 = (uint32_t) value.length() + 1; - push_back_helper((fastrtps::rtps::octet*)p.first.c_str(), size1, alignment1); - push_back_helper((fastrtps::rtps::octet*)p.second.c_str(), size2, alignment2); - ++Nproperties_; - return true; + return push_back(str1, size1, str2, size2); } /** * @brief Introduce a new property in the ParameterPropertyList + * * @param str1 Name of the property * @param str1_size Size of the first string * @param str2 Value of the property @@ -1359,6 +1453,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Setter of a new property value on a specific position + * * @param pos Iterator with the position of the property to be changed * @param new_value Value to be set * @return true if changed, false if not @@ -1381,6 +1476,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the size of the ParameterPropertyList + * * @return uint32_t with the size */ uint32_t size() const @@ -1400,6 +1496,7 @@ class ParameterPropertyList_t : public Parameter_t /** * @brief Getter for the maximum size of the ParameterPropertyList + * * @return uint32_t with the size */ uint32_t max_size () @@ -1451,6 +1548,7 @@ class ParameterSampleIdentity_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -1464,6 +1562,7 @@ class ParameterSampleIdentity_t : public Parameter_t /** * Add the parameter to a CDRMessage_t message. + * * @param[in,out] msg Pointer to the message where the parameter should be added. * @return True if the parameter was correctly added. */ @@ -1472,6 +1571,7 @@ class ParameterSampleIdentity_t : public Parameter_t /** * Read the parameter from a CDRMessage_t message. + * * @param[in,out] msg Pointer to the message from where the parameter should be taken. * @param size Size of the parameter field to read * @return True if the parameter was correctly taken. @@ -1506,6 +1606,7 @@ class ParameterToken_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -1545,6 +1646,7 @@ class ParameterParticipantSecurityInfo_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -1582,6 +1684,7 @@ class ParameterEndpointSecurityInfo_t : public Parameter_t /** * Constructor using a parameter PID and the parameter length + * * @param pid Pid of the parameter * @param in_length Its associated length */ @@ -1635,7 +1738,7 @@ void set_proxy_property( else { // if not exists add - properties.push_back(pair); + properties.push_back(pair.first, pair.second); } } diff --git a/ThirdParty/ros/include/fastdds/dds/core/policy/QosPolicies.hpp b/ThirdParty/ros/include/fastdds/dds/core/policy/QosPolicies.hpp index eda8b2721..09ecc45df 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/policy/QosPolicies.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/policy/QosPolicies.hpp @@ -21,18 +21,21 @@ #define _FASTDDS_DDS_QOS_QOSPOLICIES_HPP_ #include -#include -#include + #include + #include #include #include +#include +#include +#include #include -#include +#include + #include #include - namespace eprosima { namespace fastdds { namespace dds { @@ -102,7 +105,7 @@ class QosPolicy { public: - //! Boolean that indicates if the Qos has been changed + //! Boolean that indicates if the Qos has been changed with respect to the default Qos. bool hasChanged; /** @@ -116,6 +119,7 @@ class QosPolicy /** * @brief Constructor + * * @param send_always Boolean that set if the Qos need to be sent even if it is not changed */ explicit QosPolicy( @@ -127,6 +131,7 @@ class QosPolicy /** * @brief Copy Constructor + * * @param b Another instance of QosPolicy */ QosPolicy( @@ -149,6 +154,7 @@ class QosPolicy /** * Whether it should always be sent. + * * @return True if it should always be sent. */ virtual bool send_always() const @@ -170,6 +176,7 @@ class QosPolicy /** * @brief Controls the behavior of the entity when acting as a factory for other entities. In other words, * configures the side-effects of the create_* and delete_* operations. + * * @note Mutable Qos Policy */ class EntityFactoryQosPolicy @@ -193,6 +200,7 @@ class EntityFactoryQosPolicy /** * @brief Constructor + * * @param autoenable Value for the autoenable_created_entities boolean */ RTPS_DllAPI EntityFactoryQosPolicy( @@ -246,6 +254,7 @@ typedef enum DurabilityQosPolicyKind : fastrtps::rtps::octet TRANSIENT_DURABILITY_QOS, /** * Data is kept on permanent storage, so that they can outlive a system session. + * * @warning Not Supported */ PERSISTENT_DURABILITY_QOS @@ -256,6 +265,7 @@ typedef enum DurabilityQosPolicyKind : fastrtps::rtps::octet /** * This policy expresses if the data should ‘outlive’ their writing time. + * * @note Immutable Qos Policy */ class DurabilityQosPolicy : public Parameter_t, public QosPolicy @@ -279,6 +289,7 @@ class DurabilityQosPolicy : public Parameter_t, public QosPolicy /** * Translates kind to rtps layer equivalent + * * @return fastrtps::rtps::DurabilityKind_t */ inline fastrtps::rtps::DurabilityKind_t durabilityKind() const @@ -303,6 +314,7 @@ class DurabilityQosPolicy : public Parameter_t, public QosPolicy /** * Set kind passing the rtps layer equivalent kind + * * @param new_kind fastrtps::rtps::DurabilityKind_t */ inline void durabilityKind( @@ -338,6 +350,7 @@ class DurabilityQosPolicy : public Parameter_t, public QosPolicy * @brief DataReader expects a new sample updating the value of each instance at least once every deadline period. * DataWriter indicates that the application commits to write a new value (using the DataWriter) for each instance managed * by the DataWriter at least once every deadline period. + * * @note Mutable Qos Policy */ class DeadlineQosPolicy : public Parameter_t, public QosPolicy @@ -388,7 +401,9 @@ class DeadlineQosPolicy : public Parameter_t, public QosPolicy * Specifies the maximum acceptable delay from the time the data is written until the data is inserted in the receiver's * application-cache and the receiving application is notified of the fact.This policy is a hint to the Service, not something * that must be monitored or enforced. The Service is not required to track or alert the user of any violation. + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Mutable Qos Policy */ class LatencyBudgetQosPolicy : public Parameter_t, public QosPolicy @@ -504,16 +519,19 @@ class LivelinessQosPolicy : public Parameter_t, public QosPolicy //! Liveliness kind
By default, AUTOMATIC_LIVELINESS. LivelinessQosPolicyKind kind; - //! Period within which liveliness should be asserted. - //! On a DataWriter it represents the period it commits to signal its liveliness. - //! On a DataReader it represents the period without assertion after which a DataWriter is considered - //! inactive. - //! By default, c_TimeInfinite. + /*! Period within which liveliness should be asserted. + * On a DataWriter it represents the period it commits to signal its liveliness. + * On a DataReader it represents the period without assertion after which a DataWriter is considered + * inactive. + * By default, c_TimeInfinite. + */ fastrtps::Duration_t lease_duration; - //! The period for automatic assertion of liveliness. - //! Only used for DataWriters with AUTOMATIC liveliness. - //! By default, c_TimeInfinite. - //! @warning When not infinite, must be < lease_duration, and it is advisable to be less than 0.7*lease_duration. + /*! The period for automatic assertion of liveliness. + * Only used for DataWriters with AUTOMATIC liveliness. + * By default, c_TimeInfinite. + * + * @warning When not infinite, must be < lease_duration, and it is advisable to be less than 0.7*lease_duration. + */ fastrtps::Duration_t announcement_period; }; @@ -539,6 +557,7 @@ typedef enum ReliabilityQosPolicyKind : fastrtps::rtps::octet /** * Indicates the reliability of the endpoint. + * * @note Immutable Qos Policy */ class ReliabilityQosPolicy : public Parameter_t, public QosPolicy @@ -620,6 +639,7 @@ enum OwnershipQosPolicyKind : fastrtps::rtps::octet /** * Specifies whether it is allowed for multiple DataWriters to write the same instance of the data and if so, how these * modifications should be arbitrated + * * @note Immutable Qos Policy */ class OwnershipQosPolicy : public Parameter_t, public QosPolicy @@ -684,7 +704,9 @@ enum DestinationOrderQosPolicyKind : fastrtps::rtps::octet /** * Controls the criteria used to determine the logical order among changes made by Publisher entities to the same instance of * data (i.e., matching Topic and key). + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Immutable Qos Policy */ class DestinationOrderQosPolicy : public Parameter_t, public QosPolicy @@ -853,6 +875,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Set the maximum size of the user data and reserves memory for that much. + * * @param size new maximum size of the user data. Zero for unlimited size */ void set_max_size ( @@ -891,6 +914,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Returns raw data vector. + * * @return raw data as vector of octets. * */ RTPS_DllAPI inline const collection_type& data_vec() const @@ -900,6 +924,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Returns raw data vector. + * * @return raw data as vector of octets. * */ RTPS_DllAPI inline collection_type& data_vec() @@ -909,6 +934,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Sets raw data vector. + * * @param vec raw data to set. * */ RTPS_DllAPI inline void data_vec( @@ -924,6 +950,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Returns raw data vector. + * * @return raw data as vector of octets. * */ RTPS_DllAPI inline const collection_type& getValue() const @@ -933,6 +960,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, /** * Sets raw data vector. + * * @param vec raw data to set. * */ RTPS_DllAPI inline void setValue( @@ -947,6 +975,7 @@ class GenericDataQosPolicy : public Parameter_t, public QosPolicy, * Class TClassName, base template for data qos policies. * Data not known by the middleware, but distributed by means of built-in topics. * By default, zero-sized sequence. + * * @note Mutable Qos Policy */ // *INDENT-OFF* (uncrustify seems to have problems with this macro) @@ -1060,7 +1089,9 @@ TEMPLATE_DATA_QOS_POLICY(GroupDataQosPolicy, PID_GROUP_DATA) * The filter states that the DataReader does not want to receive more than one value each minimum_separation, regardless * of how fast the changes occur. It is inconsistent for a DataReader to have a minimum_separation longer than its * Deadline period. + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Mutable Qos Policy */ class TimeBasedFilterQosPolicy : public Parameter_t, public QosPolicy @@ -1132,7 +1163,9 @@ enum PresentationQosPolicyAccessScopeKind : fastrtps::rtps::octet * order of changes.access_scope determines the largest scope spanning the entities for which the order and coherency * of changes can be preserved. The two booleans control whether coherent access and ordered access are supported within * the scope access_scope. + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Immutable Qos Policy */ class PresentationQosPolicy : public Parameter_t, public QosPolicy @@ -1211,6 +1244,7 @@ class Partition_t /** * @brief Constructor using a pointer + * * @param ptr Pointer to be set */ explicit Partition_t( @@ -1234,6 +1268,7 @@ class Partition_t /** * @brief Getter for the size + * * @return uint32_t with the size */ uint32_t size() const @@ -1243,6 +1278,7 @@ class Partition_t /** * @brief Getter for the partition name + * * @return name */ const char* name() const @@ -1259,6 +1295,7 @@ class Partition_t * * The empty string ("") is considered a valid partition that is matched with other partition names using the same rules of * string matching and regular-expression matching used for any other partition name. + * * @note Mutable Qos Policy */ class PartitionQosPolicy : public Parameter_t, public QosPolicy @@ -1278,6 +1315,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Constructor using a pointer + * * @param ptr Pointer to be set */ const_iterator( @@ -1312,13 +1350,13 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy } bool operator ==( - const self_type& rhs) + const self_type& rhs) const { return ptr_ == rhs.ptr_; } bool operator !=( - const self_type& rhs) + const self_type& rhs) const { return ptr_ != rhs.ptr_; } @@ -1360,6 +1398,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Constructor using Parameter length + * * @param in_length Length of the parameter */ RTPS_DllAPI PartitionQosPolicy( @@ -1374,6 +1413,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Copy constructor + * * @param b Another PartitionQosPolicy instance */ RTPS_DllAPI PartitionQosPolicy( @@ -1421,6 +1461,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Getter for the first position of the partition list + * * @return const_iterator */ const_iterator begin() const @@ -1430,6 +1471,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Getter for the end of the partition list + * * @return const_iterator */ const_iterator end() const @@ -1439,6 +1481,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Getter for the number of partitions + * * @return uint32_t with the size */ uint32_t size() const @@ -1448,6 +1491,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Check if the set is empty + * * @return true if it is empty, false otherwise */ uint32_t empty() const @@ -1457,6 +1501,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Setter for the maximum size reserved for partitions (in bytes) + * * @param size Size to be set */ void set_max_size ( @@ -1468,6 +1513,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * @brief Getter for the maximum size (in bytes) + * * @return uint32_t with the maximum size */ uint32_t max_size () const @@ -1477,6 +1523,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * Appends a name to the list of partition names. + * * @param name Name to append. */ RTPS_DllAPI inline void push_back( @@ -1520,6 +1567,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * Returns partition names. + * * @return Vector of partition name strings. */ RTPS_DllAPI inline const std::vector getNames() const @@ -1529,6 +1577,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * Overrides partition names + * * @param nam Vector of partition name strings. */ RTPS_DllAPI inline void setNames( @@ -1539,6 +1588,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * Returns partition names. + * * @return Vector of partition name strings. */ RTPS_DllAPI inline const std::vector names() const @@ -1556,6 +1606,7 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy /** * Overrides partition names + * * @param nam Vector of partition name strings. */ RTPS_DllAPI inline void names( @@ -1609,6 +1660,7 @@ enum HistoryQosPolicyKind : fastrtps::rtps::octet * existing DataReader entities. The behavior with regards to a DataReaderentities discovered after a sample is written * is controlled by the DURABILITY QoS policy. On the subscribing side it controls the samples that should be maintained * until the application “takes” them from the Service. + * * @note Immutable Qos Policy */ class HistoryQosPolicy : public Parameter_t, public QosPolicy @@ -1650,14 +1702,20 @@ class HistoryQosPolicy : public Parameter_t, public QosPolicy //!HistoryQosPolicyKind.
By default, KEEP_LAST_HISTORY_QOS. HistoryQosPolicyKind kind; - //!History depth.
By default, 1. If a value other than 1 is specified, it should - //! be consistent with the settings of the ResourceLimitsQosPolicy. - //! @warning Only takes effect if the kind is KEEP_LAST_HISTORY_QOS. + /*! History depth.
By default, 1. If a value other than 1 is specified, it should + * be consistent with the settings of the ResourceLimitsQosPolicy. + * + * @warning Only takes effect if the kind is KEEP_LAST_HISTORY_QOS. + */ int32_t depth; }; +//! A special value indicating an unlimited quantity +constexpr int32_t LENGTH_UNLIMITED = -1; + /** * Specifies the resources that the Service can consume in order to meet the requested QoS + * * @note Immutable Qos Policy */ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy @@ -1669,6 +1727,7 @@ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy * instances associated with it. Represents the maximum samples the middleware can store for any one DataWriter * (or DataReader).
* By default, 5000. + * * @warning It is inconsistent for this value to be less than max_samples_per_instance. */ int32_t max_samples; @@ -1680,6 +1739,7 @@ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy /** * @brief Represents the maximum number of samples of any one instance a DataWriter(or DataReader) can manage.
* By default, 400. + * * @warning It is inconsistent for this value to be greater than max_samples. */ int32_t max_samples_per_instance; @@ -1688,6 +1748,11 @@ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy * By default, 100. */ int32_t allocated_samples; + /** + * @brief Represents the extra number of samples available once the max_samples have been reached in the history. + * This makes it possible, for example, to loan samples even with a full history. By default, 1. + */ + int32_t extra_samples; /** * @brief Constructor @@ -1699,6 +1764,7 @@ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy , max_instances(10) , max_samples_per_instance(400) , allocated_samples(100) + , extra_samples(1) { } @@ -1731,7 +1797,9 @@ class ResourceLimitsQosPolicy : public Parameter_t, public QosPolicy /** * Specifies the configuration of the durability service. That is, the service that implements the DurabilityQosPolicy kind * of TRANSIENT and PERSISTENT. + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Immutable Qos Policy */ class DurabilityServiceQosPolicy : public Parameter_t, public QosPolicy @@ -1746,9 +1814,9 @@ class DurabilityServiceQosPolicy : public Parameter_t, public QosPolicy , QosPolicy(false) , history_kind(KEEP_LAST_HISTORY_QOS) , history_depth(1) - , max_samples(-1) - , max_instances(-1) - , max_samples_per_instance(-1) + , max_samples(LENGTH_UNLIMITED) + , max_instances(LENGTH_UNLIMITED) + , max_samples_per_instance(LENGTH_UNLIMITED) { } @@ -1799,26 +1867,27 @@ class DurabilityServiceQosPolicy : public Parameter_t, public QosPolicy * Specifies the maximum number of data-samples the DataWriter (or DataReader) can manage across all the instances * associated with it. Represents the maximum samples the middleware can store for any one DataWriter (or DataReader). * It is inconsistent for this value to be less than max_samples_per_instance.
- * By default, -1 (Length Unlimited). + * By default, LENGTH_UNLIMITED. */ int32_t max_samples; /** * @brief Control the ResourceLimitsQos of the implied DataReader that stores the data within the durability service. * Represents the maximum number of instances DataWriter (or DataReader) can manage.
- * By default, -1 (Length Unlimited). + * By default, LENGTH_UNLIMITED. */ int32_t max_instances; /** * @brief Control the ResourceLimitsQos of the implied DataReader that stores the data within the durability service. * Represents the maximum number of samples of any one instance a DataWriter(or DataReader) can manage. * It is inconsistent for this value to be greater than max_samples.
- * By default, -1 (Length Unlimited). + * By default, LENGTH_UNLIMITED. */ int32_t max_samples_per_instance; }; /** * Specifies the maximum duration of validity of the data written by the DataWriter. + * * @note Mutable Qos Policy */ class LifespanQosPolicy : public Parameter_t, public QosPolicy @@ -1864,6 +1933,7 @@ class LifespanQosPolicy : public Parameter_t, public QosPolicy * Specifies the value of the “strength” used to arbitrate among multiple DataWriter objects that attempt to modify the same * instance of a data-object (identified by Topic + key).This policy only applies if the OWNERSHIP QoS policy is of kind * EXCLUSIVE. + * * @note Mutable Qos Policy */ class OwnershipStrengthQosPolicy : public Parameter_t, public QosPolicy @@ -1908,7 +1978,9 @@ class OwnershipStrengthQosPolicy : public Parameter_t, public QosPolicy /** * This policy is a hint to the infrastructure as to how to set the priority of the underlying transport used to send the data. + * * @warning This QosPolicy can be defined and is transmitted to the rest of the network but is not implemented in this version. + * * @note Mutable Qos Policy */ class TransportPriorityQosPolicy : public Parameter_t, public QosPolicy @@ -1966,20 +2038,13 @@ class PublishModeQosPolicy : public QosPolicy public: //!PublishModeQosPolicyKind
By default, SYNCHRONOUS_PUBLISH_MODE. - PublishModeQosPolicyKind kind; + PublishModeQosPolicyKind kind = SYNCHRONOUS_PUBLISH_MODE; - /** - * @brief Constructor - */ - RTPS_DllAPI PublishModeQosPolicy() - : kind(SYNCHRONOUS_PUBLISH_MODE) - { - } - - /** - * @brief Destructor + /*! Name of the flow controller used when publish mode kind is ASYNCHRONOUS_PUBLISH_MODE. + * + * @since 2.4.0 */ - virtual RTPS_DllAPI ~PublishModeQosPolicy() = default; + const char* flow_controller_name = fastdds::rtps::FASTDDS_FLOW_CONTROLLER_DEFAULT; inline void clear() override { @@ -1987,6 +2052,14 @@ class PublishModeQosPolicy : public QosPolicy std::swap(*this, reset); } + bool operator ==( + const PublishModeQosPolicy& b) const + { + return (this->kind == b.kind) && + 0 == strcmp(flow_controller_name, b.flow_controller_name) && + QosPolicy::operator ==(b); + } + }; /** @@ -2003,8 +2076,10 @@ typedef enum DataRepresentationId : int16_t * With multiple standard data Representations available, and vendor-specific extensions possible, DataWriters and * DataReaders must be able to negotiate which data representation(s) to use. This negotiation shall occur based on * DataRepresentationQosPolicy. + * * @warning If a writer’s offered representation is contained within a reader’s sequence, the offer satisfies the * request and the policies are compatible. Otherwise, they are incompatible. + * * @note Immutable Qos Policy */ class DataRepresentationQosPolicy : public Parameter_t, public QosPolicy @@ -2030,6 +2105,7 @@ class DataRepresentationQosPolicy : public Parameter_t, public QosPolicy /** * Compares the given policy to check if it's equal. + * * @param b QoS Policy. * @return True if the policy is equal. */ @@ -2065,6 +2141,7 @@ enum TypeConsistencyKind : uint16_t /** * The TypeConsistencyEnforcementQosPolicy defines the rules for determining whether the type used to publish a given data * stream is consistent with that used to subscribe to it. It applies to DataReaders. + * * @note Immutable Qos Policy */ class TypeConsistencyEnforcementQosPolicy : public Parameter_t, public QosPolicy @@ -2084,7 +2161,7 @@ class TypeConsistencyEnforcementQosPolicy : public Parameter_t, public QosPolicy bool m_ignore_sequence_bounds; /** * @brief This option controls whether string bounds are taken into consideration for type assignability. If the option - * is set to TRUE, string bounds (maximum lengths) are not considered as part of the type assignability. This means + * is set to TRUE, string bounds (maximum lengths) are not considered as part of the type assignability. This means * that a T2 string type with maximum length L2 would be assignable to a T1 string type with maximum length L1, even * if L2 is greater than L1. If the option is set to false, then string bounds are taken into consideration for type * assignability and in order for T1 to be assignable from T2 it is required that L1>= L2.
@@ -2154,6 +2231,7 @@ class TypeConsistencyEnforcementQosPolicy : public Parameter_t, public QosPolicy /** * Class DisablePositiveACKsQosPolicy to disable sending of positive ACKs + * * @note Immutable Qos Policy */ class DisablePositiveACKsQosPolicy : public Parameter_t, public QosPolicy @@ -2221,6 +2299,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy /** * @brief Copy constructor + * * @param type Another instance of TypeIdV1 */ RTPS_DllAPI TypeIdV1( @@ -2233,6 +2312,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy /** * @brief Constructor using a TypeIndentifier + * * @param identifier TypeIdentifier to be set */ RTPS_DllAPI TypeIdV1( @@ -2245,6 +2325,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy /** * @brief Move constructor + * * @param type Another instance of TypeIdV1 */ RTPS_DllAPI TypeIdV1( @@ -2298,6 +2379,7 @@ class TypeIdV1 : public Parameter_t, public QosPolicy /** * @brief Getter for the TypeIndentifier + * * @return TypeIdentifier reference */ RTPS_DllAPI const fastrtps::types::TypeIdentifier& get() const @@ -2329,6 +2411,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy /** * @brief Copy constructor + * * @param type Another instance of TypeObjectV1 */ RTPS_DllAPI TypeObjectV1( @@ -2341,6 +2424,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy /** * @brief Constructor using a TypeObject + * * @param type TypeObject to be set */ RTPS_DllAPI TypeObjectV1( @@ -2353,6 +2437,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy /** * @brief Move constructor + * * @param type Another instance of TypeObjectV1 */ RTPS_DllAPI TypeObjectV1( @@ -2406,6 +2491,7 @@ class TypeObjectV1 : public Parameter_t, public QosPolicy /** * @brief Getter for the TypeObject + * * @return TypeObject reference */ RTPS_DllAPI const fastrtps::types::TypeObject& get() const @@ -2440,6 +2526,7 @@ class TypeInformation : public Parameter_t, public QosPolicy /** * @brief Copy constructor + * * @param type Another instance of TypeInformation */ RTPS_DllAPI TypeInformation( @@ -2453,6 +2540,7 @@ class TypeInformation : public Parameter_t, public QosPolicy /** * @brief Constructor using a fastrtps::types::TypeInformation + * * @param info fastrtps::types::TypeInformation to be set */ RTPS_DllAPI TypeInformation( @@ -2466,6 +2554,7 @@ class TypeInformation : public Parameter_t, public QosPolicy /** * @brief Move Constructor + * * @param type Another instance of TypeInformation */ RTPS_DllAPI TypeInformation( @@ -2515,6 +2604,7 @@ class TypeInformation : public Parameter_t, public QosPolicy /** * @brief Check if it is assigned + * * @return true if assigned, false if not */ RTPS_DllAPI bool assigned() const @@ -2524,6 +2614,7 @@ class TypeInformation : public Parameter_t, public QosPolicy /** * @brief Setter for assigned boolean + * * @param value Boolean to be set */ RTPS_DllAPI void assigned( @@ -2605,20 +2696,24 @@ class WireProtocolConfigQos : public QosPolicy //!Port Parameters fastrtps::rtps::PortParameters port; - //!Throughput controller parameters. Leave default for uncontrolled flow. + /** + * @brief Throughput controller parameters. Leave default for uncontrolled flow. + * + * @deprecated Use flow_controllers() on DomainParticipantQoS + */ fastrtps::rtps::ThroughputControllerDescriptor throughput_controller; /** * Default list of Unicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the case * that it was defined with NO UnicastLocators. At least ONE locator should be included in this list. */ - fastrtps::rtps::LocatorList_t default_unicast_locator_list; + rtps::LocatorList default_unicast_locator_list; /** * Default list of Multicast Locators to be used for any Endpoint defined inside this RTPSParticipant in the * case that it was defined with NO UnicastLocators. This is usually left empty. */ - fastrtps::rtps::LocatorList_t default_multicast_locator_list; + rtps::LocatorList default_multicast_locator_list; }; //! Qos Policy to configure the transport layer @@ -2702,13 +2797,13 @@ class RTPSEndpointQos } //!Unicast locator list - fastrtps::rtps::LocatorList_t unicast_locator_list; + rtps::LocatorList unicast_locator_list; //!Multicast locator list - fastrtps::rtps::LocatorList_t multicast_locator_list; + rtps::LocatorList multicast_locator_list; //!Remote locator list - fastrtps::rtps::LocatorList_t remote_locator_list; + rtps::LocatorList remote_locator_list; //!User Defined ID, used for StaticEndpointDiscovery.
By default, -1. int16_t user_defined_id; @@ -2729,6 +2824,8 @@ class WriterResourceLimitsQos * @brief Constructor */ RTPS_DllAPI WriterResourceLimitsQos() + : matched_subscriber_allocation() + , reader_filters_allocation(0, 32u, 1u) { } @@ -2740,13 +2837,311 @@ class WriterResourceLimitsQos bool operator ==( const WriterResourceLimitsQos& b) const { - return (this->matched_subscriber_allocation == b.matched_subscriber_allocation); + return (matched_subscriber_allocation == b.matched_subscriber_allocation) && + (reader_filters_allocation == b.reader_filters_allocation); } //!Matched subscribers allocation limits. fastrtps::ResourceLimitedContainerConfig matched_subscriber_allocation; + //!Reader filters allocation limits. + fastrtps::ResourceLimitedContainerConfig reader_filters_allocation; +}; + +/** + * Data sharing configuration kinds + */ +enum DataSharingKind : fastrtps::rtps::octet +{ + /** + * Automatic configuration. + * DataSharing will be used if requirements are met. + */ + AUTO = 0x01, + /** + * Activate the use of DataSharing. + * Entity creation will fail if requirements for DataSharing are not met + */ + ON = 0x02, + /** + * Disable the use of DataSharing + */ + OFF = 0x03 +}; + + +/** + * Qos Policy to configure the data sharing + * + * @note Immutable Qos Policy + */ +class DataSharingQosPolicy : public Parameter_t, public QosPolicy +{ +public: + + /** + * @brief Constructor + */ + RTPS_DllAPI DataSharingQosPolicy() + : Parameter_t(PID_DATASHARING, 0) + , QosPolicy(true) + { + //Needed to generate the automatic domain ID + automatic(); + } + + /** + * @brief Destructor + */ + virtual RTPS_DllAPI ~DataSharingQosPolicy() = default; + + /** + * @brief Copy constructor + * + * @param b Another DataSharingQosPolicy instance + */ + RTPS_DllAPI DataSharingQosPolicy( + const DataSharingQosPolicy& b) + : Parameter_t(b) + , QosPolicy(b) + , kind_(b.kind()) + , shm_directory_ (b.shm_directory()) + , max_domains_ (b.max_domains()) + , domain_ids_(b.max_domains() != 0 ? + b.max_domains() : + b.domain_ids().size()) + { + domain_ids_ = b.domain_ids(); + } + + RTPS_DllAPI DataSharingQosPolicy& operator =( + const DataSharingQosPolicy& b) + { + QosPolicy::operator =(b); + Parameter_t::operator =(b); + kind_ = b.kind(); + shm_directory_ = b.shm_directory(); + max_domains_ = b.max_domains(); + domain_ids_.reserve(max_domains_ != 0 ? + max_domains_ : + b.domain_ids().size()); + domain_ids_ = b.domain_ids(); + + return *this; + } + + bool operator ==( + const DataSharingQosPolicy& b) const + { + return kind_ == b.kind_ && + shm_directory_ == b.shm_directory_ && + domain_ids_ == b.domain_ids_ && + Parameter_t::operator ==(b) && + QosPolicy::operator ==(b); + } + + inline void clear() override + { + DataSharingQosPolicy reset = DataSharingQosPolicy(); + std::swap(*this, reset); + } + + /** + * @return the current DataSharing configuration mode + */ + RTPS_DllAPI const DataSharingKind& kind() const + { + return kind_; + } + + /** + * @return the current DataSharing shared memory directory + */ + RTPS_DllAPI const std::string& shm_directory() const + { + return shm_directory_; + } + + /** + * Gets the set of DataSharing domain IDs. + * + * Each domain ID is 64 bit long. + * However, user-defined domain IDs are only 16 bit long, + * while the rest of the 48 bits are used for the + * automatically generated domain ID (if any). + * + * - Automatic domain IDs use the 48 MSB and leave the 16 LSB as zero. + * - User defined domain IDs use the 16 LSB and leave the 48 MSB as zero. + * + * @return the current DataSharing domain IDs + */ + RTPS_DllAPI const std::vector& domain_ids() const + { + return domain_ids_; + } + + /** + * @param size the new maximum number of domain IDs + */ + RTPS_DllAPI void set_max_domains( + uint32_t size) + { + domain_ids_.reserve(size); + max_domains_ = size; + } + + /** + * @return the current configured maximum number of domain IDs + */ + RTPS_DllAPI const uint32_t& max_domains() const + { + return max_domains_; + } + + /** + * @brief Configures the DataSharing in automatic mode + * + * The default shared memory directory of the OS is used. + * A default domain ID is automatically computed. + */ + RTPS_DllAPI void automatic() + { + setup (AUTO, "", std::vector()); + } + + /** + * @brief Configures the DataSharing in automatic mode + * + * The default shared memory directory of the OS is used. + * + * @param domain_ids the user configured DataSharing domain IDs (16 bits). + */ + RTPS_DllAPI void automatic( + const std::vector& domain_ids) + { + setup (AUTO, "", domain_ids); + } + + /** + * @brief Configures the DataSharing in automatic mode + * + * A default domain ID is automatically computed. + * + * @param directory The shared memory directory to use. + */ + RTPS_DllAPI void automatic( + const std::string& directory) + { + setup (AUTO, directory, std::vector()); + } + + /** + * @brief Configures the DataSharing in automatic mode + * + * @param directory The shared memory directory to use. + * @param domain_ids the user configured DataSharing domain IDs (16 bits). + */ + RTPS_DllAPI void automatic( + const std::string& directory, + const std::vector& domain_ids) + { + setup (AUTO, directory, domain_ids); + } + + /** + * @brief Configures the DataSharing in active mode + * + * A default domain ID is automatically computed. + * + * @param directory The shared memory directory to use. + * It is mandatory to provide a non-empty name or the creation of endpoints will fail. + */ + RTPS_DllAPI void on( + const std::string& directory) + { + // TODO [ILG]: This parameter is unused right now. Activate the assert once it is used + //assert(!directory.empty()); + setup (ON, directory, std::vector()); + } + + /** + * @brief Configures the DataSharing in active mode + * + * @param directory The shared memory directory to use. + * It is mandatory to provide a non-empty name or the creation of endpoints will fail. + * @param domain_ids the user configured DataSharing domain IDs (16 bits). + */ + RTPS_DllAPI void on( + const std::string& directory, + const std::vector& domain_ids) + { + // TODO [ILG]: This parameter is unused right now. Activate the assert once it is used + //assert(!directory.empty()); + setup (ON, directory, domain_ids); + } + + /** + * @brief Configures the DataSharing in disabled mode + */ + RTPS_DllAPI void off() + { + setup (OFF, "", std::vector()); + } + + /** + * @brief Adds a user-specific DataSharing domain ID + * + * @param id 16 bit identifier + */ + RTPS_DllAPI void add_domain_id( + uint16_t id) + { + if (max_domains_ == 0 || domain_ids_.size() < max_domains_) + { + domain_ids_.push_back(id); + } + } + + // Not on the exported API, but must be public for other internal classes + void add_domain_id( + uint64_t id) + { + if (max_domains_ == 0 || domain_ids_.size() < max_domains_) + { + domain_ids_.push_back(id); + } + } + +private: + + void setup( + const DataSharingKind& kind, + const std::string& directory, + const std::vector& domain_ids) + { + kind_ = kind; + shm_directory_ = directory; + domain_ids_.clear(); + + for (uint16_t id : domain_ids) + { + add_domain_id(id); + } + } + + //! DataSharing configuration mode + DataSharingKind kind_ = AUTO; + + //! Shared memory directory to use on DataSharing + std::string shm_directory_; + + //! Maximum number of domain IDs + uint32_t max_domains_ = 0; + + //! Only endpoints with matching domain IDs are DataSharing compatible + std::vector domain_ids_; }; + } // namespace dds } // namespace fastdds } // namespace eprosima diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp index 604b55419..6adbcc30b 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/DeadlineMissedStatus.hpp @@ -19,7 +19,7 @@ #ifndef _FASTDDS_DDS_QOS_DEADLINEMISSEDSTATUS_HPP_ #define _FASTDDS_DDS_QOS_DEADLINEMISSEDSTATUS_HPP_ -#include +#include namespace eprosima { namespace fastdds { @@ -42,7 +42,7 @@ struct DeadlineMissedStatus { } - //! @brief Total cumulative number of offered deadline periods epased during which a writer failed to provide data + //! @brief Total cumulative number of offered deadline periods elapsed during which a writer failed to provide data //! @details Missed deadlines accumulate, that is, each deadline period the total_count will be incremented by 1 uint32_t total_count; @@ -50,7 +50,7 @@ struct DeadlineMissedStatus uint32_t total_count_change; //! @brief Handle to the last instance missing the deadline - fastrtps::rtps::InstanceHandle_t last_instance_handle; + InstanceHandle_t last_instance_handle; }; //! Typedef of DeadlineMissedStatus diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp index bb23cc13f..c5ee4908d 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/IncompatibleQosStatus.hpp @@ -33,6 +33,9 @@ namespace dds { */ struct QosPolicyCount { + //!Constructor + QosPolicyCount() = default; + //!Constructor QosPolicyCount( QosPolicyId_t id, diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp index e2cf46eae..f4deb4b6f 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/LivelinessChangedStatus.hpp @@ -19,7 +19,7 @@ #ifndef _FASTDDS_DDS_QOS_LIVELINESSCHANGEDSTATUS_HPP_ #define _FASTDDS_DDS_QOS_LIVELINESSCHANGEDSTATUS_HPP_ -#include +#include namespace eprosima { namespace fastdds { @@ -49,7 +49,7 @@ struct LivelinessChangedStatus int32_t not_alive_count_change = 0; //! @brief Handle to the last publisher whose change in liveliness caused this status to change - fastrtps::rtps::InstanceHandle_t last_publication_handle; + InstanceHandle_t last_publication_handle; }; } //namespace dds diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp index c58f345a9..08c9253ba 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/PublicationMatchedStatus.hpp @@ -14,24 +14,24 @@ /** * @file PublicationMatchedStatus.hpp -*/ + */ #ifndef _PUBLICATION_MATCHED_STATUS_HPP_ #define _PUBLICATION_MATCHED_STATUS_HPP_ #include -#include #include +#include namespace eprosima { namespace fastdds { namespace dds { //! @brief A structure storing the publication status -struct PublicationMatchedStatus: public MatchedStatus +struct PublicationMatchedStatus : public MatchedStatus { - //! @brief Handle to the last reader that matched the writer causing the status to change - eprosima::fastrtps::rtps::InstanceHandle_t last_subscription_handle; + //! @brief Handle to the last reader that matched the writer causing the status to change + InstanceHandle_t last_subscription_handle; }; } // namespace dds diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/SampleRejectedStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/SampleRejectedStatus.hpp index e959f1069..70ea19f1a 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/SampleRejectedStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/SampleRejectedStatus.hpp @@ -20,7 +20,8 @@ #define _FASTDDS_DDS_QOS_SAMPLEREJECTEDSTATUS_HPP_ #include -#include + +#include namespace eprosima { namespace fastdds { @@ -61,7 +62,7 @@ struct SampleRejectedStatus /** * Handle to the instance being updated by the last sample that was rejected. */ - fastrtps::rtps::InstanceHandle_t last_instance_handle; + InstanceHandle_t last_instance_handle; }; } //namespace dds diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/StatusMask.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/StatusMask.hpp index 97e5d2a1b..c838ff369 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/StatusMask.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/StatusMask.hpp @@ -21,6 +21,8 @@ #ifndef _FASTDDS_STATUSMASK_HPP_ #define _FASTDDS_STATUSMASK_HPP_ +#include + #include #include @@ -40,7 +42,8 @@ namespace dds { * - set conditions in dds::core::cond::StatusCondition * - indicate status changes when calling dds::core::Entity::status_changes */ -class StatusMask : public std::bitset + +class RTPS_DllAPI StatusMask : public std::bitset { public: diff --git a/ThirdParty/ros/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp b/ThirdParty/ros/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp index 6e22a482c..95846a4d0 100644 --- a/ThirdParty/ros/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp +++ b/ThirdParty/ros/include/fastdds/dds/core/status/SubscriptionMatchedStatus.hpp @@ -14,25 +14,25 @@ /** * @file SubscriptionMatchedStatus.hpp -*/ + */ #ifndef _SUBSCRIPTION_MATCHED_STATUS_HPP_ #define _SUBSCRIPTION_MATCHED_STATUS_HPP_ #include -#include #include +#include namespace eprosima { namespace fastdds { namespace dds { //! @brief A structure storing the subscription status -struct SubscriptionMatchedStatus: public MatchedStatus +struct SubscriptionMatchedStatus : public MatchedStatus { - //! @brief Handle to the last writer that matched the reader causing the status change - eprosima::fastrtps::rtps::InstanceHandle_t last_publication_handle; + //! @brief Handle to the last writer that matched the reader causing the status change + InstanceHandle_t last_publication_handle; }; } // namespace dds diff --git a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipant.hpp b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipant.hpp index 4ad69dc20..d61e1577b 100644 --- a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipant.hpp +++ b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipant.hpp @@ -20,19 +20,26 @@ #ifndef _FASTDDS_DOMAIN_PARTICIPANT_HPP_ #define _FASTDDS_DOMAIN_PARTICIPANT_HPP_ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include #include #include -#include - +#include #include #include -#include +#include #include -#include -#include -#include - -#include +#include using eprosima::fastrtps::types::ReturnCode_t; @@ -71,16 +78,28 @@ class SubscriberQos; class SubscriberListener; class TopicQos; +// Not implemented classes +class MultiTopic; + /** * Class DomainParticipant used to group Publishers and Subscribers into a single working unit. + * * @ingroup FASTDDS_MODULE */ class DomainParticipant : public Entity { public: + /** + * @brief Destructor + */ + virtual ~DomainParticipant(); + + // Superclass methods + /** * This operation returns the value of the DomainParticipant QoS policies + * * @param qos DomainParticipantQos reference where the qos is going to be returned * @return RETCODE_OK */ @@ -89,18 +108,14 @@ class DomainParticipant : public Entity /** * @brief This operation returns the value of the DomainParticipant QoS policies + * * @return A reference to the DomainParticipantQos */ RTPS_DllAPI const DomainParticipantQos& get_qos() const; - /** - * @brief This operation enables the DomainParticipant - * @return RETCODE_OK - */ - RTPS_DllAPI ReturnCode_t enable() override; - /** * This operation sets the value of the DomainParticipant QoS policies. + * * @param qos DomainParticipantQos to be set * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not * self consistent and RETCODE_OK if the qos is changed correctly. @@ -108,8 +123,16 @@ class DomainParticipant : public Entity RTPS_DllAPI ReturnCode_t set_qos( const DomainParticipantQos& qos) const; + /** + * Allows accessing the DomainParticipantListener. + * + * @return DomainParticipantListener pointer + */ + RTPS_DllAPI const DomainParticipantListener* get_listener() const; + /** * Modifies the DomainParticipantListener, sets the mask to StatusMask::all() + * * @param listener new value for the DomainParticipantListener * @return RETCODE_OK */ @@ -118,6 +141,7 @@ class DomainParticipant : public Entity /** * Modifies the DomainParticipantListener. + * * @param listener new value for the DomainParticipantListener * @param mask StatusMask that holds statuses the listener responds to * @return RETCODE_OK @@ -127,13 +151,17 @@ class DomainParticipant : public Entity const StatusMask& mask); /** - * Allows accessing the DomainParticipantListener. - * @return DomainParticipantListener pointer + * @brief This operation enables the DomainParticipant + * + * @return RETCODE_OK */ - RTPS_DllAPI const DomainParticipantListener* get_listener() const; + RTPS_DllAPI ReturnCode_t enable() override; + + // DomainParticipant specific methods from DDS API /** * Create a Publisher in this Participant. + * * @param qos QoS of the Publisher. * @param listener Pointer to the listener (default: nullptr) * @param mask StatusMask that holds statuses the listener responds to (default: all) @@ -146,6 +174,7 @@ class DomainParticipant : public Entity /** * Create a Publisher in this Participant. + * * @param profile_name Publisher profile name. * @param listener Pointer to the listener (default: nullptr) * @param mask StatusMask that holds statuses the listener responds to (default: all) @@ -158,15 +187,17 @@ class DomainParticipant : public Entity /** * Deletes an existing Publisher. + * * @param publisher to be deleted. * @return RETCODE_PRECONDITION_NOT_MET if the publisher does not belong to this participant or if it has active DataWriters, * RETCODE_OK if it is correctly deleted and RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t delete_publisher( - Publisher* publisher); + const Publisher* publisher); /** * Create a Subscriber in this Participant. + * * @param qos QoS of the Subscriber. * @param listener Pointer to the listener (default: nullptr) * @param mask StatusMask that holds statuses the listener responds to (default: all) @@ -179,6 +210,7 @@ class DomainParticipant : public Entity /** * Create a Subscriber in this Participant. + * * @param profile_name Subscriber profile name. * @param listener Pointer to the listener (default: nullptr) * @param mask StatusMask that holds statuses the listener responds to (default: all) @@ -191,44 +223,17 @@ class DomainParticipant : public Entity /** * Deletes an existing Subscriber. + * * @param subscriber to be deleted. * @return RETCODE_PRECONDITION_NOT_MET if the subscriber does not belong to this participant or if it has active DataReaders, * RETCODE_OK if it is correctly deleted and RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t delete_subscriber( - Subscriber* subscriber); - - /** - * Register a type in this participant. - * @param type TypeSupport. - * @param type_name The name that will be used to identify the Type. - * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport - * with the same name and RETCODE_OK if it is correctly registered. - */ - RTPS_DllAPI ReturnCode_t register_type( - TypeSupport type, - const std::string& type_name); - - /** - * Register a type in this participant. - * @param type TypeSupport. - * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport - * with the same name and RETCODE_OK if it is correctly registered. - */ - RTPS_DllAPI ReturnCode_t register_type( - TypeSupport type); - - /** - * Unregister a type in this participant. - * @param typeName Name of the type - * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there are entities using that - * TypeSupport and RETCODE_OK if it is correctly unregistered. - */ - RTPS_DllAPI ReturnCode_t unregister_type( - const std::string& typeName); + const Subscriber* subscriber); /** * Create a Topic in this Participant. + * * @param topic_name Name of the Topic. * @param type_name Data type of the Topic. * @param qos QoS of the Topic. @@ -245,6 +250,7 @@ class DomainParticipant : public Entity /** * Create a Topic in this Participant. + * * @param topic_name Name of the Topic. * @param type_name Data type of the Topic. * @param profile_name Topic profile name. @@ -261,19 +267,108 @@ class DomainParticipant : public Entity /** * Deletes an existing Topic. + * * @param topic to be deleted. * @return RETCODE_BAD_PARAMETER if the topic passed is a nullptr, RETCODE_PRECONDITION_NOT_MET if the topic does not belong to - * this participant or if it is referenced by any entity and ETCODE_OK if the Topic was deleted. + * this participant or if it is referenced by any entity and RETCODE_OK if the Topic was deleted. */ RTPS_DllAPI ReturnCode_t delete_topic( - Topic* topic); + const Topic* topic); + + /** + * Create a ContentFilteredTopic in this Participant. + * + * @param name Name of the ContentFilteredTopic + * @param related_topic Related Topic to being subscribed + * @param filter_expression Logic expression to create filter + * @param expression_parameters Parameters to filter content + * @return Pointer to the created ContentFilteredTopic. + * @return nullptr if @c related_topic does not belong to this participant. + * @return nullptr if a topic with the specified @c name has already been created. + * @return nullptr if a filter cannot be created with the specified @c filter_expression and + * @c expression_parameters. + */ + RTPS_DllAPI ContentFilteredTopic* create_contentfilteredtopic( + const std::string& name, + Topic* related_topic, + const std::string& filter_expression, + const std::vector& expression_parameters); + + /** + * Create a ContentFilteredTopic in this Participant using a custom filter. + * + * @param name Name of the ContentFilteredTopic + * @param related_topic Related Topic to being subscribed + * @param filter_expression Logic expression to create filter + * @param expression_parameters Parameters to filter content + * @param filter_class_name Name of the filter class to use + * + * @return Pointer to the created ContentFilteredTopic. + * @return nullptr if @c related_topic does not belong to this participant. + * @return nullptr if a topic with the specified @c name has already been created. + * @return nullptr if a filter cannot be created with the specified @c filter_expression and + * @c expression_parameters. + * @return nullptr if the specified @c filter_class_name has not been registered. + */ + RTPS_DllAPI ContentFilteredTopic* create_contentfilteredtopic( + const std::string& name, + Topic* related_topic, + const std::string& filter_expression, + const std::vector& expression_parameters, + const char* filter_class_name); + + /** + * Deletes an existing ContentFilteredTopic. + * + * @param a_contentfilteredtopic ContentFilteredTopic to be deleted + * @return RETCODE_BAD_PARAMETER if the topic passed is a nullptr, RETCODE_PRECONDITION_NOT_MET if the topic does not belong to + * this participant or if it is referenced by any entity and RETCODE_OK if the ContentFilteredTopic was deleted. + */ + RTPS_DllAPI ReturnCode_t delete_contentfilteredtopic( + const ContentFilteredTopic* a_contentfilteredtopic); + + /** + * Create a MultiTopic in this Participant. + * + * @param name Name of the MultiTopic + * @param type_name Result type of the MultiTopic + * @param subscription_expression Logic expression to combine filter + * @param expression_parameters Parameters to subscription content + * @return Pointer to the created ContentFilteredTopic, nullptr in error case + */ + RTPS_DllAPI MultiTopic* create_multitopic( + const std::string& name, + const std::string& type_name, + const std::string& subscription_expression, + const std::vector& expression_parameters); + + /** + * Deletes an existing MultiTopic. + * + * @param a_multitopic MultiTopic to be deleted + * @return RETCODE_BAD_PARAMETER if the topic passed is a nullptr, RETCODE_PRECONDITION_NOT_MET if the topic does not belong to + * this participant or if it is referenced by any entity and RETCODE_OK if the Topic was deleted. + */ + RTPS_DllAPI ReturnCode_t delete_multitopic( + const MultiTopic* a_multitopic); + + /** + * Gives access to an existing (or ready to exist) enabled Topic. + * Topics obtained by this method must be destroyed by delete_topic. + * + * @param topic_name Topic name + * @param timeout Maximum time to wait for the Topic + * @return Pointer to the existing Topic, nullptr in error case + */ + RTPS_DllAPI Topic* find_topic( + const std::string& topic_name, + const fastrtps::Duration_t& timeout); /** * Looks up an existing, locally created @ref TopicDescription, based on its name. * May be called on a disabled participant. * * @param topic_name Name of the @ref TopicDescription to search for. - * * @return Pointer to the topic description, if it has been created locally. Otherwise, nullptr is returned. * * @remark UNSAFE. It is unsafe to lookup a topic description while another thread is creating a topic. @@ -281,40 +376,71 @@ class DomainParticipant : public Entity RTPS_DllAPI TopicDescription* lookup_topicdescription( const std::string& topic_name) const; - /* TODO - Subscriber* get_builtin_subscriber(); + /** + * Allows access to the builtin Subscriber. + * + * @return Pointer to the builtin Subscriber, nullptr in error case */ + RTPS_DllAPI const Subscriber* get_builtin_subscriber() const; - /* TODO - bool ignore_participant( - const fastrtps::rtps::InstanceHandle_t& handle); + /** + * Locally ignore a remote domain participant. + * + * @note This action is not required to be reversible. + * + * @param handle Identifier of the remote participant to ignore + * @return RETURN_OK code if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t ignore_participant( + const InstanceHandle_t& handle); - /* TODO - bool ignore_topic( - const fastrtps::rtps::InstanceHandle_t& handle); + /** + * Locally ignore a topic. + * + * @note This action is not required to be reversible. + * + * @param handle Identifier of the topic to ignore + * @return RETURN_OK code if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t ignore_topic( + const InstanceHandle_t& handle); - /* TODO - bool ignore_publication( - const fastrtps::rtps::InstanceHandle_t& handle); + /** + * Locally ignore a datawriter. + * + * @note This action is not required to be reversible. + * + * @param handle Identifier of the datawriter to ignore + * @return RETURN_OK code if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t ignore_publication( + const InstanceHandle_t& handle); - /* TODO - bool ignore_subscription( - const fastrtps::rtps::InstanceHandle_t& handle); + /** + * Locally ignore a datareader. + * + * @note This action is not required to be reversible. + * + * @param handle Identifier of the datareader to ignore + * @return RETURN_OK code if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t ignore_subscription( + const InstanceHandle_t& handle); /** * This operation retrieves the domain_id used to create the DomainParticipant. * The domain_id identifies the DDS domain to which the DomainParticipant belongs. + * * @return The Participant's domain_id */ RTPS_DllAPI DomainId_t get_domain_id() const; - /* TODO - bool delete_contained_entities(); + /** + * Deletes all the entities that were created by means of the “create” methods + * + * @return RETURN_OK code if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t delete_contained_entities(); /** * This operation manually asserts the liveliness of the DomainParticipant. @@ -328,6 +454,7 @@ class DomainParticipant : public Entity * @note Writing data via the write operation on a DataWriter asserts liveliness on the DataWriter itself and its * DomainParticipant. Consequently the use of assert_liveliness is only needed if the application is not * writing data regularly. + * * @return RETCODE_OK if the liveliness was asserted, RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t assert_liveliness(); @@ -342,6 +469,7 @@ class DomainParticipant : public Entity * The special value PUBLISHER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS * should be reset back to the initial values the factory would use, that is the values that would be used * if the set_default_publisher_qos operation had never been called. + * * @param qos PublisherQos to be set * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly. */ @@ -355,6 +483,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_publisher_qos will match the set of values specified on the last successful * call to set_default_publisher_qos, or else, if the call was never made, the default values. + * * @return Current default publisher qos. */ RTPS_DllAPI const PublisherQos& get_default_publisher_qos() const; @@ -366,6 +495,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_publisher_qos will match the set of values specified on the last successful * call to set_default_publisher_qos, or else, if the call was never made, the default values. + * * @param qos PublisherQos reference where the default_publisher_qos is returned * @return RETCODE_OK */ @@ -374,6 +504,7 @@ class DomainParticipant : public Entity /** * Fills the PublisherQos with the values of the XML profile. + * * @param profile_name Publisher profile name. * @param qos PublisherQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -392,6 +523,7 @@ class DomainParticipant : public Entity * The special value SUBSCRIBER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS * should be reset back to the initial values the factory would use, that is the values that would be used * if the set_default_subscriber_qos operation had never been called. + * * @param qos SubscriberQos to be set * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly. */ @@ -405,6 +537,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_subscriber_qos will match the set of values specified on the last successful * call to set_default_subscriber_qos, or else, if the call was never made, the default values. + * * @return Current default subscriber qos. */ RTPS_DllAPI const SubscriberQos& get_default_subscriber_qos() const; @@ -416,6 +549,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_subscriber_qos will match the set of values specified on the last successful * call to set_default_subscriber_qos, or else, if the call was never made, the default values. + * * @param qos SubscriberQos reference where the default_subscriber_qos is returned * @return RETCODE_OK */ @@ -424,6 +558,7 @@ class DomainParticipant : public Entity /** * Fills the SubscriberQos with the values of the XML profile. + * * @param profile_name Subscriber profile name. * @param qos SubscriberQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -442,6 +577,7 @@ class DomainParticipant : public Entity * The special value TOPIC_QOS_DEFAULT may be passed to this operation to indicate that the default QoS * should be reset back to the initial values the factory would use, that is the values that would be used * if the set_default_topic_qos operation had never been called. + * * @param qos TopicQos to be set * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly. */ @@ -455,6 +591,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_topic_qos will match the set of values specified on the last successful * call to set_default_topic_qos, or else, TOPIC_QOS_DEFAULT if the call was never made. + * * @return Current default topic qos. */ RTPS_DllAPI const TopicQos& get_default_topic_qos() const; @@ -466,6 +603,7 @@ class DomainParticipant : public Entity * * The values retrieved get_default_topic_qos will match the set of values specified on the last successful * call to set_default_topic_qos, or else, TOPIC_QOS_DEFAULT if the call was never made. + * * @param qos TopicQos reference where the default_topic_qos is returned * @return RETCODE_OK */ @@ -474,6 +612,7 @@ class DomainParticipant : public Entity /** * Fills the TopicQos with the values of the XML profile. + * * @param profile_name Topic profile name. * @param qos TopicQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -482,53 +621,107 @@ class DomainParticipant : public Entity const std::string& profile_name, TopicQos& qos) const; - - /* TODO - bool get_discovered_participants( - std::vector& participant_handles) const; + /** + * Retrieves the list of DomainParticipants that have been discovered in the domain and are not "ignored". + * + * @param[out] participant_handles Reference to the vector where discovered participants will be returned + * @return RETCODE_OK if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t get_discovered_participants( + std::vector& participant_handles) const; - /* TODO - bool get_discovered_participant_data( - ParticipantBuiltinTopicData& participant_data, - const fastrtps::rtps::InstanceHandle_t& participant_handle) const; + /** + * Retrieves the DomainParticipant data of a discovered not ignored participant. + * + * @param[out] participant_data Reference to the ParticipantBuiltinTopicData object to return the data + * @param participant_handle InstanceHandle of DomainParticipant to retrieve the data from + * @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if participant does not exist */ + RTPS_DllAPI ReturnCode_t get_discovered_participant_data( + builtin::ParticipantBuiltinTopicData& participant_data, + const InstanceHandle_t& participant_handle) const; - /* TODO - bool get_discovered_topics( - std::vector& topic_handles) const; + /** + * Retrieves the list of topics that have been discovered in the domain and are not "ignored". + * + * @param[out] topic_handles Reference to the vector where discovered topics will be returned + * @return RETCODE_OK if everything correct, error code otherwise */ + RTPS_DllAPI ReturnCode_t get_discovered_topics( + std::vector& topic_handles) const; - /* TODO - bool get_discovered_topic_data( - TopicBuiltinTopicData& topic_data, - const fastrtps::rtps::InstanceHandle_t& topic_handle) const; + /** + * Retrieves the Topic data of a discovered not ignored topic. + * + * @param[out] topic_data Reference to the TopicBuiltinTopicData object to return the data + * @param topic_handle InstanceHandle of Topic to retrieve the data from + * @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if topic does not exist */ + RTPS_DllAPI ReturnCode_t get_discovered_topic_data( + builtin::TopicBuiltinTopicData& topic_data, + const InstanceHandle_t& topic_handle) const; /** * This operation checks whether or not the given handle represents an Entity that was created from the * DomainParticipant. - * @param handle InstanceHandle of the entity to look for. + * + * @param a_handle InstanceHandle of the entity to look for. * @param recursive The containment applies recursively. That is, it applies both to entities * (TopicDescription, Publisher, or Subscriber) created directly using the DomainParticipant as well as * entities created using a contained Publisher, or Subscriber as the factory, and so forth. (default: true) * @return True if entity is contained. False otherwise. */ RTPS_DllAPI bool contains_entity( - const fastrtps::rtps::InstanceHandle_t& handle, + const InstanceHandle_t& a_handle, bool recursive = true) const; /** * This operation returns the current value of the time that the service uses to time-stamp data-writes * and to set the reception-timestamp for the data-updates it receives. + * * @param current_time Time_t reference where the current time is returned * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_current_time( fastrtps::Time_t& current_time) const; + // DomainParticipant methods specific from Fast-DDS + + /** + * Register a type in this participant. + * + * @param type TypeSupport. + * @param type_name The name that will be used to identify the Type. + * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport + * with the same name and RETCODE_OK if it is correctly registered. + */ + RTPS_DllAPI ReturnCode_t register_type( + TypeSupport type, + const std::string& type_name); + + /** + * Register a type in this participant. + * + * @param type TypeSupport. + * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there is another TypeSupport + * with the same name and RETCODE_OK if it is correctly registered. + */ + RTPS_DllAPI ReturnCode_t register_type( + TypeSupport type); + + /** + * Unregister a type in this participant. + * + * @param typeName Name of the type + * @return RETCODE_BAD_PARAMETER if the size of the name is 0, RERCODE_PRECONDITION_NOT_MET if there are entities using that + * TypeSupport and RETCODE_OK if it is correctly unregistered. + */ + RTPS_DllAPI ReturnCode_t unregister_type( + const std::string& typeName); + /** * This method gives access to a registered type based on its name. + * * @param type_name Name of the type * @return TypeSupport corresponding to the type_name */ @@ -537,20 +730,23 @@ class DomainParticipant : public Entity /** * Returns the DomainParticipant's handle. + * * @return InstanceHandle of this DomainParticipant. */ - RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const; + RTPS_DllAPI const InstanceHandle_t& get_instance_handle() const; // From here legacy RTPS methods. /** * @brief Getter for the Participant GUID + * * @return A reference to the GUID */ RTPS_DllAPI const fastrtps::rtps::GUID_t& guid() const; /** * @brief Getter for the participant names + * * @return Vector with the names */ RTPS_DllAPI std::vector get_participant_names() const; @@ -560,6 +756,7 @@ class DomainParticipant : public Entity * included in FastRTPS, for example when communicating with other implementations. * It indicates the Participant that an Endpoint from the XML has been discovered and * should be activated. + * * @param partguid Participant GUID_t. * @param userId User defined ID as shown in the XML file. * @param kind EndpointKind (WRITER or READER) @@ -572,6 +769,7 @@ class DomainParticipant : public Entity /** * @brief Getter for the resource event + * * @return A reference to the resource event */ RTPS_DllAPI fastrtps::rtps::ResourceEvent& get_resource_event() const; @@ -580,6 +778,7 @@ class DomainParticipant : public Entity * When a DomainParticipant receives an incomplete list of TypeIdentifiers in a * PublicationBuiltinTopicData or SubscriptionBuiltinTopicData, it may request the additional type * dependencies by invoking the getTypeDependencies operation. + * * @param in TypeIdentifier sequence * @return SampleIdentity */ @@ -589,6 +788,7 @@ class DomainParticipant : public Entity /** * A DomainParticipant may invoke the operation getTypes to retrieve the TypeObjects associated with a * list of TypeIdentifiers. + * * @param in TypeIdentifier sequence * @return SampleIdentity */ @@ -603,6 +803,7 @@ class DomainParticipant : public Entity * If the type is already registered, the function will return true, but the callback will not be called. * If the given type_information is enough to build the type without using the typelookup service, * it will return true and the callback will be never called. + * * @param type_information * @param type_name * @param callback @@ -615,25 +816,82 @@ class DomainParticipant : public Entity std::function& callback); /** - * @brief Destructor + * Register a custom content filter factory, which can be used to create a ContentFilteredTopic. + * + * DDS specifies a SQL-like content filter to be used by content filtered topics. + * If this filter does not meet your filtering requirements, you can register a custom filter factory. + * + * To use a custom filter, a factory for it must be registered in the following places: + * + * - In any application that uses the custom filter factory to create a ContentFilteredTopic and the corresponding + * DataReader. + * + * - In each application that writes the data to the applications mentioned above. + * + * For example, suppose Application A on the subscription side creates a Topic named X and a ContentFilteredTopic + * named filteredX (and a corresponding DataReader), using a previously registered content filter factory, myFilterFactory. + * With only that, you will have filtering at the subscription side. + * If you also want to perform filtering in any application that publishes Topic X, then you also need to register + * the same definition of the ContentFilterFactory myFilterFactory in that application. + * + * Each @c filter_class_name can only be used to register a content filter factory once per DomainParticipant. + * + * @param filter_class_name Name of the filter class. Cannot be nullptr, must not exceed 255 characters, and must + * be unique within this DomainParticipant. + * @param filter_factory Factory of content filters to be registered. Cannot be nullptr. + * + * @return RETCODE_BAD_PARAMETER if any parameter is nullptr, or the filter_class_name exceeds 255 characters. + * @return RETCODE_PRECONDITION_NOT_MET if the filter_class_name has been already registered. + * @return RETCODE_PRECONDITION_NOT_MET if filter_class_name is FASTDDS_SQLFILTER_NAME. + * @return RETCODE_OK if the filter is correctly registered. */ - RTPS_DllAPI virtual ~DomainParticipant(); + RTPS_DllAPI ReturnCode_t register_content_filter_factory( + const char* filter_class_name, + IContentFilterFactory* const filter_factory); + + /** + * Lookup a custom content filter factory previously registered with register_content_filter_factory. + * + * @param filter_class_name Name of the filter class. Cannot be nullptr. + * + * @return nullptr if the given filter_class_name has not been previously registered on this DomainParticipant. + * Otherwise, the content filter factory previously registered with the given filter_class_name. + */ + RTPS_DllAPI IContentFilterFactory* lookup_content_filter_factory( + const char* filter_class_name); + + /** + * Unregister a custom content filter factory previously registered with register_content_filter_factory. + * + * A filter_class_name can be unregistered only if it has been previously registered to the DomainParticipant with + * register_content_filter_factory. + * + * The unregistration of filter is not allowed if there are any existing ContentFilteredTopic objects that are + * using the filter. + * + * If there is any existing discovered DataReader with the same filter_class_name, filtering on the writer side will be + * stopped, but this operation will not fail. + * + * @param filter_class_name Name of the filter class. Cannot be nullptr. + * + * @return RETCODE_BAD_PARAMETER if the filter_class_name is nullptr. + * @return RERCODE_PRECONDITION_NOT_MET if the filter_class_name has not been previously registered. + * @return RERCODE_PRECONDITION_NOT_MET if there is any ContentFilteredTopic referencing the filter. + * @return RETCODE_OK if the filter is correctly unregistered. + */ + RTPS_DllAPI ReturnCode_t unregister_content_filter_factory( + const char* filter_class_name); /** * @brief Check if the Participant has any Publisher, Subscriber or Topic + * * @return true if any, false otherwise. */ bool has_active_entities(); protected: - RTPS_DllAPI DomainParticipant( - const StatusMask& mask = StatusMask::all()); - - RTPS_DllAPI DomainParticipant( - DomainId_t domain_id, - const DomainParticipantQos& qos, - DomainParticipantListener* listener, + DomainParticipant( const StatusMask& mask = StatusMask::all()); DomainParticipantImpl* impl_; diff --git a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantFactory.hpp b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantFactory.hpp index a9384ef12..5186cc926 100644 --- a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantFactory.hpp +++ b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantFactory.hpp @@ -41,6 +41,7 @@ class DomainParticipantImpl; /** * Class DomainParticipantFactory + * * @ingroup FASTDDS_MODULE */ class DomainParticipantFactory @@ -50,12 +51,14 @@ class DomainParticipantFactory /** * Returns the DomainParticipantFactory singleton. + * * @return The DomainParticipantFactory singleton. */ RTPS_DllAPI static DomainParticipantFactory* get_instance(); /** * Create a Participant. + * * @param domain_id Domain Id. * @param qos DomainParticipantQos Reference. * @param listener DomainParticipantListener Pointer (default: nullptr) @@ -70,6 +73,7 @@ class DomainParticipantFactory /** * Create a Participant. + * * @param domain_id Domain Id. * @param profile_name Participant profile name. * @param listener DomainParticipantListener Pointer (default: nullptr) @@ -84,6 +88,7 @@ class DomainParticipantFactory /** * Create a Participant. + * * @param profile_name Participant profile name. * @param listener DomainParticipantListener Pointer (default: nullptr) * @param mask StatusMask Reference (default: all) @@ -99,6 +104,7 @@ class DomainParticipantFactory * If no such DomainParticipant exists, the operation will return 'nullptr'. * If multiple DomainParticipant entities belonging to that domain_id exist, * then the operation will return one of them. It is not specified which one. + * * @param domain_id * @return previously created DomainParticipant within the specified domain */ @@ -107,6 +113,7 @@ class DomainParticipantFactory /** * Returns all participants that belongs to the specified domain_id. + * * @param domain_id * @return previously created DomainParticipants within the specified domain */ @@ -119,6 +126,7 @@ class DomainParticipantFactory * create_participant operation. * The values retrieved get_default_participant_qos will match the set of values specified on the last successful call * to set_default_participant_qos, or else, if the call was never made, the default values. + * * @param qos DomainParticipantQos where the qos is returned * @return RETCODE_OK */ @@ -131,6 +139,7 @@ class DomainParticipantFactory * create_participant operation. * The values retrieved get_default_participant_qos will match the set of values specified on the last successful call * to set_default_participant_qos, or else, if the call was never made, the default values. + * * @return A reference to the default DomainParticipantQos */ RTPS_DllAPI const DomainParticipantQos& get_default_participant_qos() const; @@ -155,6 +164,7 @@ class DomainParticipantFactory /** * Fills the DomainParticipantQos with the values of the XML profile. + * * @param profile_name DomainParticipant profile name. * @param qos DomainParticipantQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -165,6 +175,7 @@ class DomainParticipantFactory /** * Remove a Participant and all associated publishers and subscribers. + * * @param part Pointer to the participant. * @return RETCODE_PRECONDITION_NOT_MET if the participant has active entities, RETCODE_OK if the participant is correctly * deleted and RETCODE_ERROR otherwise. @@ -174,20 +185,34 @@ class DomainParticipantFactory /** * Load profiles from default XML file. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t load_profiles(); /** * Load profiles from XML file. + * * @param xml_profile_file XML profile file. * @return RETCODE_OK if it is correctly loaded, RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t load_XML_profiles_file( const std::string& xml_profile_file); + /** + * Load profiles from XML string. + * + * @param data buffer containing xml data. + * @param length length of data + * @return RETCODE_OK if it is correctly loaded, RETCODE_ERROR otherwise. + */ + RTPS_DllAPI ReturnCode_t load_XML_profiles_string( + const char* data, + size_t length); + /** * This operation returns the value of the DomainParticipantFactory QoS policies. + * * @param qos DomaParticipantFactoryQos reference where the qos is returned * @return RETCODE_OK */ @@ -202,6 +227,7 @@ class DomainParticipantFactory * * This operation will check that the resulting policies are self consistent; if they are not, * the operation will have no effect and return INCONSISTENT_POLICY. + * * @param qos DomainParticipantFactoryQos to be set. * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not * self consistent and RETCODE_OK if the qos is changed correctly. diff --git a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantListener.hpp b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantListener.hpp index 7a70bdda8..596e295df 100644 --- a/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantListener.hpp +++ b/ThirdParty/ros/include/fastdds/dds/domain/DomainParticipantListener.hpp @@ -39,6 +39,7 @@ class DomainParticipant; /** * Class DomainParticipantListener, overrides behaviour towards certain events. + * * @ingroup FASTDDS_MODULE */ class DomainParticipantListener : @@ -65,6 +66,7 @@ class DomainParticipantListener : /*! * This method is called when a new Participant is discovered, or a previously discovered participant changes * its QOS or is removed. + * * @param participant Pointer to the Participant which discovered the remote participant. * @param info Remote participant information. User can take ownership of the object. */ @@ -78,6 +80,7 @@ class DomainParticipantListener : #if HAVE_SECURITY /*! * This method is called when a new Participant is authenticated. + * * @param participant Pointer to the authenticated Participant. * @param info Remote participant authentication information. User can take ownership of the object. */ @@ -88,11 +91,12 @@ class DomainParticipantListener : (void)participant, (void)info; } -#endif +#endif // if HAVE_SECURITY /*! * This method is called when a new Subscriber is discovered, or a previously discovered subscriber changes * its QOS or is removed. + * * @param participant Pointer to the Participant which discovered the remote subscriber. * @param info Remote subscriber information. User can take ownership of the object. */ @@ -106,6 +110,7 @@ class DomainParticipantListener : /*! * This method is called when a new Publisher is discovered, or a previously discovered publisher changes * its QOS or is removed. + * * @param participant Pointer to the Participant which discovered the remote publisher. * @param info Remote publisher information. User can take ownership of the object. */ @@ -121,7 +126,7 @@ class DomainParticipantListener : * The ownership of all object belongs to the caller so if needs to be used after the * method ends, a full copy should be perform (except for dyn_type due to its shared_ptr nature. * For example: - * fastrtps::types::TypeIdentifier new_type_id = *identifier; + * fastrtps::types::TypeIdentifier new_type_id = \*identifier; */ virtual void on_type_discovery( DomainParticipant* participant, diff --git a/ThirdParty/ros/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp b/ThirdParty/ros/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp index e9ec4c603..0f040b583 100644 --- a/ThirdParty/ros/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/domain/qos/DomainParticipantQos.hpp @@ -20,8 +20,11 @@ #ifndef _FASTDDS_PARTICIPANTQOS_HPP_ #define _FASTDDS_PARTICIPANTQOS_HPP_ +#include + #include #include +#include namespace eprosima { namespace fastdds { @@ -30,17 +33,35 @@ namespace dds { /** * Class DomainParticipantQos, contains all the possible Qos that can be set for a determined participant. * Please consult each of them to check for implementation details and default values. + * * @ingroup FASTDDS_QOS_MODULE */ class DomainParticipantQos { public: + /*! + * User defined flow controllers to use alongside. + * + * @since 2.4.0 + */ + using FlowControllerDescriptorList = std::vector>; + /** * @brief Constructor */ RTPS_DllAPI DomainParticipantQos() { +#ifdef FASTDDS_STATISTICS + /* + * In the case of Statistics, the following properties are set with an empty value. This is because if these + * properties are set and empty during the enabling of the DomainParticipant, they are fill with the default + * mechanism + */ + properties_.properties().emplace_back(parameter_policy_physical_data_host, ""); + properties_.properties().emplace_back(parameter_policy_physical_data_user, ""); + properties_.properties().emplace_back(parameter_policy_physical_data_process, ""); +#endif // ifdef FASTDDS_STATISTICS } /** @@ -59,11 +80,13 @@ class DomainParticipantQos (this->properties_ == b.properties()) && (this->wire_protocol_ == b.wire_protocol()) && (this->transport_ == b.transport()) && - (this->name_ == b.name()); + (this->name_ == b.name()) && + (this->flow_controllers_ == b.flow_controllers()); } /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy reference */ const UserDataQosPolicy& user_data() const @@ -73,6 +96,7 @@ class DomainParticipantQos /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy reference */ UserDataQosPolicy& user_data() @@ -82,6 +106,7 @@ class DomainParticipantQos /** * Setter for UserDataQosPolicy + * * @param value UserDataQosPolicy */ void user_data( @@ -92,6 +117,7 @@ class DomainParticipantQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ const EntityFactoryQosPolicy& entity_factory() const @@ -101,6 +127,7 @@ class DomainParticipantQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ EntityFactoryQosPolicy& entity_factory() @@ -110,6 +137,7 @@ class DomainParticipantQos /** * Setter for EntityFactoryQosPolicy + * * @param value EntityFactoryQosPolicy */ void entity_factory( @@ -120,6 +148,7 @@ class DomainParticipantQos /** * Getter for ParticipantResourceLimitsQos + * * @return ParticipantResourceLimitsQos reference */ const ParticipantResourceLimitsQos& allocation() const @@ -129,6 +158,7 @@ class DomainParticipantQos /** * Getter for ParticipantResourceLimitsQos + * * @return ParticipantResourceLimitsQos reference */ ParticipantResourceLimitsQos& allocation() @@ -138,6 +168,7 @@ class DomainParticipantQos /** * Setter for ParticipantResourceLimitsQos + * * @param allocation ParticipantResourceLimitsQos */ void allocation( @@ -148,6 +179,7 @@ class DomainParticipantQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos reference */ const PropertyPolicyQos& properties() const @@ -157,6 +189,7 @@ class DomainParticipantQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos reference */ PropertyPolicyQos& properties() @@ -166,6 +199,7 @@ class DomainParticipantQos /** * Setter for PropertyPolicyQos + * * @param properties PropertyPolicyQos */ void properties( @@ -176,6 +210,7 @@ class DomainParticipantQos /** * Getter for WireProtocolConfigQos + * * @return WireProtocolConfigQos reference */ const WireProtocolConfigQos& wire_protocol() const @@ -185,6 +220,7 @@ class DomainParticipantQos /** * Getter for WireProtocolConfigQos + * * @return WireProtocolConfigQos reference */ WireProtocolConfigQos& wire_protocol() @@ -194,6 +230,7 @@ class DomainParticipantQos /** * Setter for WireProtocolConfigQos + * * @param wire_protocol WireProtocolConfigQos */ void wire_protocol( @@ -204,6 +241,7 @@ class DomainParticipantQos /** * Getter for TransportConfigQos + * * @return TransportConfigQos reference */ const TransportConfigQos& transport() const @@ -213,6 +251,7 @@ class DomainParticipantQos /** * Getter for TransportConfigQos + * * @return TransportConfigQos reference */ TransportConfigQos& transport() @@ -222,6 +261,7 @@ class DomainParticipantQos /** * Setter for TransportConfigQos + * * @param transport TransportConfigQos */ void transport( @@ -232,6 +272,7 @@ class DomainParticipantQos /** * Getter for the Participant name + * * @return name */ const fastrtps::string_255& name() const @@ -241,6 +282,7 @@ class DomainParticipantQos /** * Getter for the Participant name + * * @return name */ fastrtps::string_255& name() @@ -250,7 +292,8 @@ class DomainParticipantQos /** * Setter for the Participant name - * @return value New name to be set + * + * @param value New name to be set */ void name( const fastrtps::string_255& value) @@ -258,6 +301,26 @@ class DomainParticipantQos name_ = value; } + /** + * Getter for FlowControllerDescriptorList + * + * @return FlowControllerDescriptorList reference + */ + FlowControllerDescriptorList& flow_controllers() + { + return flow_controllers_; + } + + /** + * Getter for FlowControllerDescriptorList + * + * @return FlowControllerDescriptorList reference + */ + const FlowControllerDescriptorList& flow_controllers() const + { + return flow_controllers_; + } + private: //!UserData Qos, implemented in the library. @@ -281,6 +344,12 @@ class DomainParticipantQos //!Name of the participant. fastrtps::string_255 name_ = "RTPSParticipant"; + /*! User defined flow controller to use alongside. + * + * @since 2.4.0 + */ + FlowControllerDescriptorList flow_controllers_; + }; RTPS_DllAPI extern const DomainParticipantQos PARTICIPANT_QOS_DEFAULT; diff --git a/ThirdParty/ros/include/fastdds/dds/log/Log.hpp b/ThirdParty/ros/include/fastdds/dds/log/Log.hpp index ae837f41c..0ff9d2d78 100644 --- a/ThirdParty/ros/include/fastdds/dds/log/Log.hpp +++ b/ThirdParty/ros/include/fastdds/dds/log/Log.hpp @@ -15,7 +15,6 @@ #ifndef _FASTDDS_DDS_LOG_LOG_HPP_ #define _FASTDDS_DDS_LOG_LOG_HPP_ -#include #include #include #include @@ -23,8 +22,9 @@ #include /** - * eProsima log layer. Logging categories and verbosities can be specified dynamically at runtime. However, even on a category - * not covered by the current verbosity level, there is some overhead on calling a log macro. For maximum performance, you can + * eProsima log layer. Logging categories and verbosity can be specified dynamically at runtime. + * However, even on a category not covered by the current verbosity level, + * there is some overhead on calling a log macro. For maximum performance, you can * opt out of logging any particular level by defining the following symbols: * * * define LOG_NO_ERROR @@ -115,7 +115,7 @@ class Log //! Returns the logging engine to configuration defaults. RTPS_DllAPI static void Reset(); - //! Waits until no more log info is availabel + //! Waits until no more log info is available RTPS_DllAPI static void Flush(); //! Stops the logging thread. It will re-launch on the next call to a successful log macro. @@ -153,36 +153,6 @@ class Log private: - struct Resources - { - fastrtps::DBQueue logs; - std::vector> consumers; - std::unique_ptr logging_thread; - - // Condition variable segment. - std::condition_variable cv; - std::mutex cv_mutex; - bool logging; - bool work; - int current_loop; - - // Context configuration. - std::mutex config_mutex; - bool filenames; - bool functions; - std::unique_ptr category_filter; - std::unique_ptr filename_filter; - std::unique_ptr error_string_filter; - - std::atomic verbosity; - - Resources(); - - ~Resources(); - }; - - static struct Resources resources_; - // Applies transformations to the entries compliant with the options selected (such as // erasure of certain context information, or filtering by category. Returns false // if the log entry is blacklisted. @@ -238,78 +208,85 @@ class LogConsumer #define __func__ __FUNCTION__ #endif // if defined(WIN32) -#ifndef LOG_NO_ERROR -#define logError_(cat, msg) \ - { \ - using namespace eprosima::fastdds::dds; \ - std::stringstream ss; \ - ss << msg; \ - Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Error); \ +// Name of variables inside macros must be unique, or it could produce an error with external variables +#if !HAVE_LOG_NO_ERROR +#define logError_(cat, msg) \ + { \ + using namespace eprosima::fastdds::dds; \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + Log::QueueLog(fastdds_log_ss_tmp__.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Error); \ } -#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) -#define logError_(cat, msg) \ - { \ - auto tmp_lambda = [&]() \ - { \ - std::stringstream ss; \ - ss << msg; \ - }; \ - (void)tmp_lambda; \ +#elif (__INTERNALDEBUG || _INTERNALDEBUG) +#define logError_(cat, msg) \ + { \ + auto fastdds_log_lambda_tmp__ = [&]() \ + { \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + }; \ + (void)fastdds_log_lambda_tmp__; \ } #else #define logError_(cat, msg) #endif // ifndef LOG_NO_ERROR -#ifndef LOG_NO_WARNING -#define logWarning_(cat, msg) \ - { \ - using namespace eprosima::fastdds::dds; \ - if (Log::GetVerbosity() >= Log::Kind::Warning) \ - { \ - std::stringstream ss; \ - ss << msg; \ - Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Warning); \ - } \ +#if !HAVE_LOG_NO_WARNING +#define logWarning_(cat, msg) \ + { \ + using namespace eprosima::fastdds::dds; \ + if (Log::GetVerbosity() >= Log::Kind::Warning) \ + { \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + Log::QueueLog( \ + fastdds_log_ss_tmp__.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Warning); \ + } \ } -#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) -#define logWarning_(cat, msg) \ - { \ - auto tmp_lambda = [&]() \ - { \ - std::stringstream ss; \ - ss << msg; \ - }; \ - (void)tmp_lambda; \ +#elif (__INTERNALDEBUG || _INTERNALDEBUG) +#define logWarning_(cat, msg) \ + { \ + auto fastdds_log_lambda_tmp__ = [&]() \ + { \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + }; \ + (void)fastdds_log_lambda_tmp__; \ } #else #define logWarning_(cat, msg) #endif // ifndef LOG_NO_WARNING -#if (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) && (defined(_DEBUG) || defined(__DEBUG)) && \ - (!defined(LOG_NO_INFO)) +// Allow multiconfig platforms like windows to disable info queueing on Release and other non-debug configs +#if !HAVE_LOG_NO_INFO && \ + (defined(FASTDDS_ENFORCE_LOG_INFO) || \ + ((defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) && (defined(_DEBUG) || defined(__DEBUG) || \ + !defined(NDEBUG)))) #define logInfo_(cat, msg) \ { \ using namespace eprosima::fastdds::dds; \ if (Log::GetVerbosity() >= Log::Kind::Info) \ { \ - std::stringstream ss; \ - ss << msg; \ - Log::QueueLog(ss.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, Log::Kind::Info); \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + Log::QueueLog(fastdds_log_ss_tmp__.str(), Log::Context{__FILE__, __LINE__, __func__, #cat}, \ + Log::Kind::Info); \ } \ } -#elif (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) -#define logInfo_(cat, msg) \ - { \ - auto tmp_lambda = [&]() \ - { \ - std::stringstream ss; \ - ss << msg; \ - }; \ - (void)tmp_lambda; \ +#elif (__INTERNALDEBUG || _INTERNALDEBUG) +#define logInfo_(cat, msg) \ + { \ + auto fastdds_log_lambda_tmp__ = [&]() \ + { \ + std::stringstream fastdds_log_ss_tmp__; \ + fastdds_log_ss_tmp__ << msg; \ + }; \ + (void)fastdds_log_lambda_tmp__; \ } #else #define logInfo_(cat, msg) -#endif // if (defined(__INTERNALDEBUG) || defined(_INTERNALDEBUG)) && (defined(_DEBUG) || defined(__DEBUG)) && (!defined(LOG_NO_INFO)) +#endif // ifndef LOG_NO_INFO + } // namespace dds } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/DataWriter.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/DataWriter.hpp index 93426c113..a0455b326 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/DataWriter.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/DataWriter.hpp @@ -16,34 +16,35 @@ * @file DataWriter.hpp */ -#ifndef _FASTRTPS_DATAWRITER_HPP_ -#define _FASTRTPS_DATAWRITER_HPP_ +#ifndef _FASTDDS_DDS_PUBLISHER_DATAWRITER_HPP_ +#define _FASTDDS_DDS_PUBLISHER_DATAWRITER_HPP_ -#include -#include -#include -#include -#include +#include #include +#include +#include +#include #include #include +#include +#include + +#include + +#include +#include + using eprosima::fastrtps::types::ReturnCode_t; namespace eprosima { namespace fastrtps { - -class TopicAttributes; - namespace rtps { class WriteParams; -class WriterAttributes; -struct InstanceHandle_t; struct GUID_t; } // namespace rtps - } // namespace fastrtps namespace fastdds { @@ -62,6 +63,7 @@ class Topic; /** * Class DataWriter, contains the actual implementation of the behaviour of the DataWriter. + * * @ingroup FASTDDS_MODULE */ class DataWriter : public DomainEntity @@ -75,11 +77,11 @@ class DataWriter : public DomainEntity * Create a data writer, assigning its pointer to the associated implementation. * Don't use directly, create DataWriter using create_datawriter from Publisher. */ - RTPS_DllAPI DataWriter( + DataWriter( DataWriterImpl* impl, const StatusMask& mask = StatusMask::all()); - RTPS_DllAPI DataWriter( + DataWriter( Publisher* pub, Topic* topic, const DataWriterQos& qos = DATAWRITER_QOS_DEFAULT, @@ -88,10 +90,42 @@ class DataWriter : public DomainEntity public: - RTPS_DllAPI virtual ~DataWriter(); + /** + * How to initialize samples loaned with @ref loan_sample + */ + enum class LoanInitializationKind + { + /** + * @brief Do not perform initialization of sample. + * + * This is the default initialization scheme of loaned samples. + * It is the fastest scheme, but implies the user should take care of writing + * every field on the data type before calling @ref write on the loaned sample. + */ + NO_LOAN_INITIALIZATION, + + /** + * @brief Initialize all memory with zero-valued bytes. + * + * The contents of the loaned sample will be zero-initialized upon return of + * @ref loan_sample. + */ + ZERO_LOAN_INITIALIZATION, + + /** + * @brief Use in-place constructor initialization. + * + * This will call the constructor of the data type over the memory space being + * returned by @ref loan_sample. + */ + CONSTRUCTED_LOAN_INITIALIZATION + }; + + virtual ~DataWriter(); /** * @brief This operation enables the DataWriter + * * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the Publisher creating this * DataWriter is not enabled. */ @@ -99,6 +133,7 @@ class DataWriter : public DomainEntity /** * Write data to the topic. + * * @param data Pointer to the data * @return True if correct, false otherwise */ @@ -107,6 +142,7 @@ class DataWriter : public DomainEntity /** * Write data with params to the topic. + * * @param data Pointer to the data * @param params Extra write parameters. * @return True if correct, false otherwise @@ -128,24 +164,90 @@ class DataWriter : public DomainEntity */ RTPS_DllAPI ReturnCode_t write( void* data, - const fastrtps::rtps::InstanceHandle_t& handle); + const InstanceHandle_t& handle); + + /** + * NOT YET IMPLEMENTED + * + * @brief This operation performs the same function as write except that it also provides the value for the + * @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp" that is made available to DataReader + * objects by means of the @ref eprosima::fastdds::dds::SampleInfo::source_timestamp attribute "source_timestamp" + * inside the SampleInfo. + * The constraints on the values of the @c handle parameter and the corresponding error behavior are the same + * specified for the @ref write operation. This operation may block and return RETCODE_TIMEOUT under the same + * circumstances described for the @ref write operation. + * This operation may return RETCODE_OUT_OF_RESOURCES, RETCODE_PRECONDITION_NOT_MET or RETCODE_BAD_PARAMETER under + * the same circumstances described for the write operation. + * + * @param data Pointer to the data + * @param handle InstanceHandle_t + * @param timestamp Time_t used to set the source_timestamp. + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t write_w_timestamp( + void* data, + const InstanceHandle_t& handle, + const fastrtps::Time_t& timestamp); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds:DataWriter::write_w_timestamp()", + "In favor of version using eprosima::fastrtps::Time_t.") + RTPS_DllAPI ReturnCode_t write_w_timestamp( + void* data, + const InstanceHandle_t& handle, + const fastrtps::rtps::Time_t& timestamp); +#endif // DOXYGEN_SHOULD_SKIP_THIS /*! * @brief Informs that the application will be modifying a particular instance. * It gives an opportunity to the middleware to pre-configure itself to improve performance. + * * @param[in] instance Sample used to get the instance's key. * @return Handle containing the instance's key. * This handle could be used in successive `write` or `dispose` operations. * In case of error, HANDLE_NIL will be returned. */ - RTPS_DllAPI fastrtps::rtps::InstanceHandle_t register_instance( + RTPS_DllAPI InstanceHandle_t register_instance( void* instance); + /** + * NOT YET IMPLEMENTED + * + * @brief This operation performs the same function as register_instance and can be used instead of + * @ref register_instance in the cases where the application desires to specify the value for the + * @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp". + * The @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp" potentially affects the relative + * order in which readers observe events from multiple writers. See the QoS policy + * @ref eprosima::fastdds::dds::DataWriterQos::destination_order "DESTINATION_ORDER". + * + * This operation may block and return RETCODE_TIMEOUT under the same circumstances described for the @ref write + * operation. + * + * This operation may return RETCODE_OUT_OF_RESOURCES under the same circumstances described for the + * @ref write operation. + * + * @param instance Sample used to get the instance's key. + * @param timestamp Time_t used to set the source_timestamp. + * @return Handle containing the instance's key. + */ + RTPS_DllAPI InstanceHandle_t register_instance_w_timestamp( + void* instance, + const fastrtps::Time_t& timestamp); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds:DataWriter::register_instance_w_timestamp()", + "In favor of version using eprosima::fastrtps::Time_t.") + RTPS_DllAPI InstanceHandle_t register_instance_w_timestamp( + void* instance, + const fastrtps::rtps::Time_t& timestamp); +#endif // DOXYGEN_SHOULD_SKIP_THIS + /*! * @brief This operation reverses the action of `register_instance`. * It should only be called on an instance that is currently registered. * Informs the middleware that the DataWriter is not intending to modify any more of that data instance. * Also indicates that the middleware can locally remove all information regarding that instance. + * * @param[in] instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL. * @param[in] handle Instance's key to be unregistered. * @return Returns the operation's result. @@ -153,34 +255,99 @@ class DataWriter : public DomainEntity */ RTPS_DllAPI ReturnCode_t unregister_instance( void* instance, - const fastrtps::rtps::InstanceHandle_t& handle); + const InstanceHandle_t& handle); /** - * Returns the DataWriter's GUID - * @return Reference to the DataWriter GUID + * NOT YET IMPLEMENTED + * + * @brief This operation performs the same function as @ref unregister_instance and can be used instead of + * @ref unregister_instance in the cases where the application desires to specify the value for the + * @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp". + * The @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp" potentially affects the relative + * order in which readers observe events from multiple writers. See the QoS policy + * @ref eprosima::fastdds::dds::DataWriterQos::destination_order "DESTINATION_ORDER". + * + * The constraints on the values of the @c handle parameter and the corresponding error behavior are the same + * specified for the @ref unregister_instance operation. + * + * This operation may block and return RETCODE_TIMEOUT under the same circumstances described for the write + * operation + * + * @param instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL. + * @param handle Instance's key to be unregistered. + * @param timestamp Time_t used to set the source_timestamp. + * @return Handle containing the instance's key. */ - RTPS_DllAPI const fastrtps::rtps::GUID_t& guid(); + RTPS_DllAPI ReturnCode_t unregister_instance_w_timestamp( + void* instance, + const InstanceHandle_t& handle, + const fastrtps::Time_t& timestamp); + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds:DataWriter::unregister_instance_w_timestamp()", + "In favor of version using eprosima::fastrtps::Time_t.") + RTPS_DllAPI ReturnCode_t unregister_instance_w_timestamp( + void* instance, + const InstanceHandle_t& handle, + const fastrtps::rtps::Time_t& timestamp); +#endif // DOXYGEN_SHOULD_SKIP_THIS + + /** + * This operation can be used to retrieve the instance key that corresponds to an + * @ref eprosima::fastdds::dds::Entity::instance_handle_ "instance_handle". + * The operation will only fill the fields that form the key inside the key_holder instance. + * + * This operation may return BAD_PARAMETER if the InstanceHandle_t handle does not correspond to an existing + * data-object known to the DataWriter. If the implementation is not able to check invalid handles then the result + * in this situation is unspecified. + * + * @param[in,out] key_holder Sample where the key fields will be returned. + * @param[in] handle Handle to the instance to retrieve the key values from. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t get_key_value( + void* key_holder, + const InstanceHandle_t& handle); + + /** + * NOT YET IMPLEMENTED + * + * Takes as a parameter an instance and returns a handle that can be used in subsequent operations that accept an + * instance handle as an argument. The instance parameter is only used for the purpose of examining the fields that + * define the key. + * + * @param[in] instance Data pointer to the sample + * + * @return handle of the given instance + */ + RTPS_DllAPI InstanceHandle_t lookup_instance( + const void* instance) const; /** * Returns the DataWriter's GUID + * * @return Reference to the DataWriter GUID */ RTPS_DllAPI const fastrtps::rtps::GUID_t& guid() const; /** * Returns the DataWriter's InstanceHandle + * * @return Copy of the DataWriter InstanceHandle */ - RTPS_DllAPI fastrtps::rtps::InstanceHandle_t get_instance_handle() const; + RTPS_DllAPI InstanceHandle_t get_instance_handle() const; /** * Get data type associated to the DataWriter + * * @return Copy of the TypeSupport */ RTPS_DllAPI TypeSupport get_type() const; /** * Waits the current thread until all writers have received their acknowledgments. + * * @param max_wait Maximum blocking time for this operation * @return RETCODE_OK if the DataWriter receive the acknowledgments before the time expires and RETCODE_ERROR otherwise */ @@ -189,22 +356,34 @@ class DataWriter : public DomainEntity /** * @brief Returns the offered deadline missed status + * * @param[out] status Deadline missed status struct * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_offered_deadline_missed_status( - fastrtps::OfferedDeadlineMissedStatus& status); + OfferedDeadlineMissedStatus& status); /** * @brief Returns the offered incompatible qos status + * * @param[out] status Offered incompatible qos status struct * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_offered_incompatible_qos_status( OfferedIncompatibleQosStatus& status); + /** + * @brief Returns the publication matched status + * + * @param[out] status publication matched status struct + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_publication_matched_status( + PublicationMatchedStatus& status) const; + /** * Establishes the DataWriterQos for this DataWriter. + * * @param qos DataWriterQos to be set * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not * self consistent and RETCODE_OK if the qos is changed correctly. @@ -214,12 +393,14 @@ class DataWriter : public DomainEntity /** * Retrieves the DataWriterQos for this DataWriter. + * * @return Reference to the current DataWriterQos */ RTPS_DllAPI const DataWriterQos& get_qos() const; /** * Fills the DataWriterQos with the values of this DataWriter. + * * @param qos DataWriterQos object where the qos is returned. * @return RETCODE_OK */ @@ -228,18 +409,21 @@ class DataWriter : public DomainEntity /** * Retrieves the topic for this DataWriter. + * * @return Pointer to the associated Topic */ RTPS_DllAPI Topic* get_topic() const; /** * Retrieves the listener for this DataWriter. + * * @return Pointer to the DataWriterListener */ RTPS_DllAPI const DataWriterListener* get_listener() const; /** * Modifies the DataWriterListener, sets the mask to StatusMask::all() + * * @param listener new value for the DataWriterListener * @return RETCODE_OK */ @@ -248,6 +432,7 @@ class DataWriter : public DomainEntity /** * Modifies the DataWriterListener. + * * @param listener new value for the DataWriterListener * @param mask StatusMask that holds statuses the listener responds to (default: all). * @return RETCODE_OK @@ -256,12 +441,6 @@ class DataWriter : public DomainEntity DataWriterListener* listener, const StatusMask& mask); - /* TODO - bool get_key_value( - void* key_holder, - const fastrtps::rtps::InstanceHandle_t& handle); - */ - /** * @brief This operation requests the middleware to delete the data (the actual deletion is postponed until there is no * more use for that data in the whole system). In general, applications are made aware of the deletion by means of @@ -271,6 +450,7 @@ class DataWriter : public DomainEntity * available to DataReader objects by means of the source_timestamp attribute inside the SampleInfo. The constraints * on the values of the handle parameter and the corresponding error behavior are the same specified for the * unregister_instance operation. + * * @param[in] data Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL. * @param[in] handle InstanceHandle of the data * @return RETCODE_PRECONDITION_NOT_MET if the handle introduced does not match with the one associated to the data, @@ -278,28 +458,44 @@ class DataWriter : public DomainEntity */ RTPS_DllAPI ReturnCode_t dispose( void* data, - const fastrtps::rtps::InstanceHandle_t& handle); + const InstanceHandle_t& handle); + /** + * @brief This operation performs the same functions as @ref dispose except that the application provides the value + * for the @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp" that is made available to + * DataReader objects by means of the @ref eprosima::fastdds::dds::SampleInfo::source_timestamp "source_timestamp" + * attribute inside the SampleInfo. + * + * The constraints on the values of the @c handle parameter and the corresponding error behavior are the same + * specified for the @ref dispose operation. + * + * This operation may return RETCODE_PRECONDITION_NOT_MET and RETCODE_BAD_PARAMETER under the same circumstances + * described for the @ref dispose operation. + * + * This operation may return RETCODE_TIMEOUT and RETCODE_OUT_OF_RESOURCES under the same circumstances described + * for the @ref write operation. + * + * @param instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL. + * @param handle Instance's key to be disposed. + * @param timestamp Time_t used to set the source_timestamp. + * @return RTPS_DllAPI + */ + RTPS_DllAPI ReturnCode_t dispose_w_timestamp( + void* instance, + const InstanceHandle_t& handle, + const fastrtps::Time_t& timestamp); /** * @brief Returns the liveliness lost status + * * @param status Liveliness lost status struct * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_liveliness_lost_status( LivelinessLostStatus& status); - /* TODO - bool get_offered_incompatible_qos_status( - OfferedIncompatibleQosStatus& status) - { - // Not implemented - (void)status; - return false; - } - */ - /** * @brief Getter for the Publisher that creates this DataWriter + * * @return Pointer to the Publisher */ RTPS_DllAPI const Publisher* get_publisher() const; @@ -309,21 +505,128 @@ class DataWriter : public DomainEntity * LivelinessQosPolicy to indicate to the Service that the entity remains active. * This operation need only be used if the LIVELINESS setting is either MANUAL_BY_PARTICIPANT or MANUAL_BY_TOPIC. * Otherwise, it has no effect. + * * @note Writing data via the write operation on a DataWriter asserts liveliness on the DataWriter itself and its * DomainParticipant. Consequently the use of assert_liveliness is only needed if the application is not writing data * regularly. + * * @return RETCODE_OK if asserted, RETCODE_ERROR otherwise */ RTPS_DllAPI ReturnCode_t assert_liveliness(); + /** + * @brief Retrieves in a subscription associated with the DataWriter + * + * @param[out] subscription_data subscription data struct + * @param subscription_handle InstanceHandle_t of the subscription + * @return RETCODE_OK + * + */ + RTPS_DllAPI ReturnCode_t get_matched_subscription_data( + builtin::SubscriptionBuiltinTopicData& subscription_data, + const InstanceHandle_t& subscription_handle) const; + + /** + * @brief Fills the given vector with the InstanceHandle_t of matched DataReaders + * + * @param[out] subscription_handles Vector where the InstanceHandle_t are returned + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_matched_subscriptions( + std::vector& subscription_handles) const; + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds:DataWriter::get_matched_subscriptions()", + "In favor of version using std::vector.") + RTPS_DllAPI ReturnCode_t get_matched_subscriptions( + std::vector& subscription_handles) const; +#endif // DOXYGEN_SHOULD_SKIP_THIS + /** * @brief Clears the DataWriter history + * * @param removed size_t pointer to return the size of the data removed * @return RETCODE_OK if the samples are removed and RETCODE_ERROR otherwise */ RTPS_DllAPI ReturnCode_t clear_history( size_t* removed); + /** + * @brief Get a pointer to the internal pool where the user could directly write. + * + * This method can only be used on a DataWriter for a plain data type. It will provide the + * user with a pointer to an internal buffer where the data type can be prepared for sending. + * + * When using NO_LOAN_INITIALIZATION on the initialization parameter, which is the default, + * no assumptions should be made on the contents where the pointer points to, as it may be an + * old pointer being reused. See @ref LoanInitializationKind for more details. + * + * Once the sample has been prepared, it can then be published by calling @ref write. + * After a successful call to @ref write, the middleware takes ownership of the loaned pointer again, + * and the user should not access that memory again. + * + * If, for whatever reason, the sample is not published, the loan can be returned by calling + * @ref discard_loan. + * + * @param [out] sample Pointer to the sample on the internal pool. + * @param [in] initialization How to initialize the loaned sample. + * + * @return ReturnCode_t::RETCODE_ILLEGAL_OPERATION when the data type does not support loans. + * @return ReturnCode_t::RETCODE_NOT_ENABLED if the writer has not been enabled. + * @return ReturnCode_t::RETCODE_OUT_OF_RESOURCES if the pool has been exhausted. + * @return ReturnCode_t::RETCODE_OK if a pointer to a sample is successfully obtained. + */ + RTPS_DllAPI ReturnCode_t loan_sample( + void*& sample, + LoanInitializationKind initialization = LoanInitializationKind::NO_LOAN_INITIALIZATION); + + /** + * @brief Discards a loaned sample pointer. + * + * See the description on @ref loan_sample for how and when to call this method. + * + * @param [in,out] sample Pointer to the previously loaned sample. + * + * @return ReturnCode_t::RETCODE_ILLEGAL_OPERATION when the data type does not support loans. + * @return ReturnCode_t::RETCODE_NOT_ENABLED if the writer has not been enabled. + * @return ReturnCode_t::RETCODE_BAD_PARAMETER if the pointer does not correspond to a loaned sample. + * @return ReturnCode_t::RETCODE_OK if the loan is successfully discarded. + */ + RTPS_DllAPI ReturnCode_t discard_loan( + void*& sample); + + /** + * @brief Get the list of locators from which this DataWriter may send data. + * + * @param [out] locators LocatorList where the list of locators will be stored. + * + * @return NOT_ENABLED if the reader has not been enabled. + * @return OK if a list of locators is returned. + */ + RTPS_DllAPI ReturnCode_t get_sending_locators( + rtps::LocatorList& locators) const; + + /** + * Block the current thread until the writer has received the acknowledgment corresponding to the given instance. + * Operations performed on the same instance while the current thread is waiting will not be taken into + * consideration, i.e. this method may return `RETCODE_OK` with those operations unacknowledged. + * + * @param instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL. + * @param handle Instance handle of the data. + * @param max_wait Maximum blocking time for this operation. + * + * @return RETCODE_NOT_ENABLED if the writer has not been enabled. + * @return RETCODE_BAD_PARAMETER if `instance` is not a valid pointer. + * @return RETCODE_PRECONDITION_NOT_MET if the topic does not have a key, the key is unknown to the writer, + * or the key is not consistent with `handle`. + * @return RETCODE_OK if the DataWriter received the acknowledgments before the time expired. + * @return RETCODE_TIMEOUT otherwise. + */ + RTPS_DllAPI ReturnCode_t wait_for_acknowledgments( + void* instance, + const InstanceHandle_t& handle, + const fastrtps::Duration_t& max_wait); + protected: DataWriterImpl* impl_; @@ -333,4 +636,4 @@ class DataWriter : public DomainEntity } /* namespace fastdds */ } /* namespace eprosima */ -#endif //_FASTRTPS_DATAWRITER_HPP_ +#endif // _FASTDDS_DDS_PUBLISHER_DATAWRITER_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/DataWriterListener.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/DataWriterListener.hpp index 53c83138f..2e3c60840 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/DataWriterListener.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/DataWriterListener.hpp @@ -55,6 +55,7 @@ class RTPS_DllAPI DataWriterListener /** * This method is called when the Publisher is matched (or unmatched) against an endpoint. + * * @param writer Pointer to the associated Publisher * @param info Information regarding the matched subscriber */ @@ -68,6 +69,7 @@ class RTPS_DllAPI DataWriterListener /** * A method called when a deadline is missed + * * @param writer Pointer to the associated Publisher * @param status The deadline missed status */ @@ -81,6 +83,7 @@ class RTPS_DllAPI DataWriterListener /** * A method called when an incompatible QoS is offered + * * @param writer Pointer to the associated Publisher * @param status The deadline missed status */ @@ -93,7 +96,8 @@ class RTPS_DllAPI DataWriterListener } /** - * @brief Method called when the livelivess of a publisher is lost + * @brief Method called when the liveliness of a publisher is lost + * * @param writer The publisher * @param status The liveliness lost status */ diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/Publisher.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/Publisher.hpp index 6ca5ee109..961124e80 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/Publisher.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/Publisher.hpp @@ -20,13 +20,14 @@ #ifndef _FASTDDS_PUBLISHER_HPP_ #define _FASTDDS_PUBLISHER_HPP_ -#include -#include -#include -#include #include -#include #include +#include +#include +#include + +#include +#include using eprosima::fastrtps::types::ReturnCode_t; @@ -55,6 +56,7 @@ class Topic; /** * Class Publisher, used to send data to associated subscribers. + * * @ingroup FASTDDS_MODULE */ class Publisher : public DomainEntity @@ -68,11 +70,11 @@ class Publisher : public DomainEntity * Create a publisher, assigning its pointer to the associated implementation. * Don't use directly, create Publisher using create_publisher from DomainParticipant. */ - RTPS_DllAPI Publisher( + Publisher( PublisherImpl* p, const StatusMask& mask = StatusMask::all()); - RTPS_DllAPI Publisher( + Publisher( DomainParticipant* dp, const PublisherQos& qos = PUBLISHER_QOS_DEFAULT, PublisherListener* listener = nullptr, @@ -83,10 +85,11 @@ class Publisher : public DomainEntity /** * @brief Destructor */ - RTPS_DllAPI virtual ~Publisher(); + virtual ~Publisher(); /** * @brief This operation enables the Publisher + * * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the participant creating this * Publisher is not enabled. */ @@ -94,12 +97,14 @@ class Publisher : public DomainEntity /** * Allows accessing the Publisher Qos. + * * @return PublisherQos reference */ RTPS_DllAPI const PublisherQos& get_qos() const; /** * Retrieves the Publisher Qos. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_qos( @@ -108,6 +113,7 @@ class Publisher : public DomainEntity /** * Allows modifying the Publisher Qos. * The given Qos must be supported by the PublisherQos. + * * @param qos PublisherQos to be set * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not * self consistent and RETCODE_OK if the qos is changed correctly. @@ -117,12 +123,14 @@ class Publisher : public DomainEntity /** * Retrieves the attached PublisherListener. + * * @return PublisherListener pointer */ RTPS_DllAPI const PublisherListener* get_listener() const; /** * Modifies the PublisherListener, sets the mask to StatusMask::all() + * * @param listener new value for the PublisherListener * @return RETCODE_OK */ @@ -131,6 +139,7 @@ class Publisher : public DomainEntity /** * Modifies the PublisherListener. + * * @param listener new value for the PublisherListener * @param mask StatusMask that holds statuses the listener responds to * @return RETCODE_OK @@ -141,6 +150,7 @@ class Publisher : public DomainEntity /** * This operation creates a DataWriter. The returned DataWriter will be attached and belongs to the Publisher. + * * @param topic Topic the DataWriter will be listening * @param qos QoS of the DataWriter. * @param listener Pointer to the listener (default: nullptr). @@ -155,6 +165,7 @@ class Publisher : public DomainEntity /** * This operation creates a DataWriter. The returned DataWriter will be attached and belongs to the Publisher. + * * @param topic Topic the DataWriter will be listening * @param profile_name DataWriter profile name. * @param listener Pointer to the listener (default: nullptr). @@ -177,12 +188,13 @@ class Publisher : public DomainEntity * The deletion of the DataWriter will automatically unregister all instances. * Depending on the settings of the WRITER_DATA_LIFECYCLE QosPolicy, the deletion of the DataWriter * may also dispose all instances. + * * @param writer DataWriter to delete * @return RETCODE_PRECONDITION_NOT_MET if it does not belong to this Publisher, RETCODE_OK if it is correctly deleted and * RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t delete_datawriter( - DataWriter* writer); + const DataWriter* writer); /** * This operation retrieves a previously created DataWriter belonging to the Publisher that is attached to a @@ -190,6 +202,7 @@ class Publisher : public DomainEntity * * If multiple DataWriter attached to the Publisher satisfy this condition, then the operation will return * one of them. It is not specified which one. + * * @param topic_name Name of the Topic * @return Pointer to a previously created DataWriter associated to a Topic with the requested topic_name */ @@ -197,34 +210,32 @@ class Publisher : public DomainEntity const std::string& topic_name) const; /** - * Fills the given vector with all the datawriters of this publisher. - * @param writers Vector where the DataWriters are returned - * @return true + * @brief Indicates to FastDDS that the contained DataWriters are about to be modified + * + * @return RETCODE_OK if successful, an error code otherwise */ - RTPS_DllAPI bool get_datawriters( - std::vector& writers) const; + RTPS_DllAPI ReturnCode_t suspend_publications(); /** - * This operation checks if the publisher has DataWriters - * @return true if the publisher has one or several DataWriters, false otherwise - */ - RTPS_DllAPI bool has_datawriters() const; - - /* TODO - bool suspend_publications(); - */ - - /* TODO - bool resume_publications(); + * @brief Indicates to FastDDS that the modifications to the DataWriters are complete. + * + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI ReturnCode_t resume_publications(); - /* TODO - bool begin_coherent_changes(); + /** + * @brief Signals the beginning of a set of coherent cache changes using the Datawriters attached to the publisher + * + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI ReturnCode_t begin_coherent_changes(); - /* TODO - bool end_coherent_changes(); + /** + * @brief Signals the end of a set of coherent cache changes + * + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI ReturnCode_t end_coherent_changes(); /** * This operation blocks the calling thread until either all data written by the reliable DataWriter entities @@ -232,6 +243,7 @@ class Publisher : public DomainEntity * parameter elapses, whichever happens first. A return value of true indicates that all the samples written * have been acknowledged by all reliable matched data readers; a return value of false indicates that max_wait * elapsed before all the data was acknowledged. + * * @param max_wait Maximum blocking time for this operation * @return RETCODE_TIMEOUT if the function takes more than the maximum blocking time established, RETCODE_OK if the * Publisher receives the acknowledgments and RETCODE_ERROR otherwise. @@ -241,13 +253,17 @@ class Publisher : public DomainEntity /** * This operation returns the DomainParticipant to which the Publisher belongs. + * * @return Pointer to the DomainParticipant */ RTPS_DllAPI const DomainParticipant* get_participant() const; - /* TODO - bool delete_contained_entities(); + /** + * @brief Deletes all contained DataWriters + * + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI ReturnCode_t delete_contained_entities(); /** * This operation sets a default value of the DataWriter QoS policies which will be used for newly created @@ -259,6 +275,7 @@ class Publisher : public DomainEntity * The special value DATAWRITER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS * should be reset back to the initial values the factory would use, that is the values that would be used * if the set_default_datawriter_qos operation had never been called. + * * @param qos DataWriterQos to be set * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly. */ @@ -272,6 +289,7 @@ class Publisher : public DomainEntity * * The values retrieved by get_default_datawriter_qos will match the set of values specified on the last * successful call to set_default_datawriter_qos, or else, if the call was never made, the default values. + * * @return Current default WriterQos */ RTPS_DllAPI const DataWriterQos& get_default_datawriter_qos() const; @@ -283,14 +301,27 @@ class Publisher : public DomainEntity * * The values retrieved by get_default_datawriter_qos will match the set of values specified on the last * successful call to set_default_datawriter_qos, or else, if the call was never made, the default values. + * * @param qos Reference to the current default WriterQos. * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_default_datawriter_qos( DataWriterQos& qos) const; + /** + * @brief Copies TopicQos into the corresponding DataWriterQos + * + * @param[out] writer_qos + * @param[in] topic_qos + * @return RETCODE_OK if successful, an error code otherwise + */ + RTPS_DllAPI ReturnCode_t copy_from_topic_qos( + fastdds::dds::DataWriterQos& writer_qos, + const fastdds::dds::TopicQos& topic_qos) const; + /** * Fills the DataWriterQos with the values of the XML profile. + * * @param profile_name DataWriter profile name. * @param qos DataWriterQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -299,17 +330,28 @@ class Publisher : public DomainEntity const std::string& profile_name, DataWriterQos& qos) const; - /* TODO - bool copy_from_topic_qos( - WriterQos& writer_qos, - const fastrtps::TopicAttributes& topic_qos) const; - */ - /** * Returns the Publisher's handle. + * * @return InstanceHandle of this Publisher. */ - RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const; + RTPS_DllAPI const InstanceHandle_t& get_instance_handle() const; + + /** + * Fills the given vector with all the datawriters of this publisher. + * + * @param writers Vector where the DataWriters are returned + * @return true + */ + RTPS_DllAPI bool get_datawriters( + std::vector& writers) const; + + /** + * This operation checks if the publisher has DataWriters + * + * @return true if the publisher has one or several DataWriters, false otherwise + */ + RTPS_DllAPI bool has_datawriters() const; protected: diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/qos/DataWriterQos.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/qos/DataWriterQos.hpp index b4d01690e..d8bb92d57 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/qos/DataWriterQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/qos/DataWriterQos.hpp @@ -62,6 +62,9 @@ class RTPSReliableWriterQos //!Disable positive acks QoS, implemented in the library. DisablePositiveACKsQosPolicy disable_positive_acks; + + //! Disable heartbeat piggyback mechanism. + bool disable_heartbeat_piggyback = false; }; /** @@ -69,6 +72,7 @@ class RTPSReliableWriterQos * Although these values can be and are transmitted * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library. * Please consult each of them to check for implementation details and default values. + * * @ingroup FASTDDS_QOS_MODULE */ class DataWriterQos @@ -109,7 +113,8 @@ class DataWriterQos (this->reliable_writer_qos_ == b.reliable_writer_qos()) && (this->endpoint_ == b.endpoint()) && (this->writer_resource_limits_ == b.writer_resource_limits()) && - (this->throughput_controller_ == b.throughput_controller()); + (this->throughput_controller_ == b.throughput_controller()) && + (this->data_sharing_ == b.data_sharing()); } RTPS_DllAPI WriterQos get_writerqos( @@ -118,6 +123,7 @@ class DataWriterQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQosPolicy reference */ RTPS_DllAPI DurabilityQosPolicy& durability() @@ -127,6 +133,7 @@ class DataWriterQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQosPolicy reference */ RTPS_DllAPI const DurabilityQosPolicy& durability() const @@ -136,6 +143,7 @@ class DataWriterQos /** * Setter for DurabilityQosPolicy + * * @param durability new value for the DurabilityQosPolicy */ RTPS_DllAPI void durability( @@ -146,6 +154,7 @@ class DataWriterQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQosPolicy reference */ RTPS_DllAPI DurabilityServiceQosPolicy& durability_service() @@ -155,6 +164,7 @@ class DataWriterQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQosPolicy reference */ RTPS_DllAPI const DurabilityServiceQosPolicy& durability_service() const @@ -164,6 +174,7 @@ class DataWriterQos /** * Setter for DurabilityServiceQosPolicy + * * @param durability_service new value for the DurabilityServiceQosPolicy */ RTPS_DllAPI void durability_service( @@ -174,6 +185,7 @@ class DataWriterQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQosPolicy reference */ RTPS_DllAPI DeadlineQosPolicy& deadline() @@ -183,6 +195,7 @@ class DataWriterQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQosPolicy reference */ RTPS_DllAPI const DeadlineQosPolicy& deadline() const @@ -192,6 +205,7 @@ class DataWriterQos /** * Setter for DeadlineQosPolicy + * * @param deadline new value for the DeadlineQosPolicy */ RTPS_DllAPI void deadline( @@ -202,6 +216,7 @@ class DataWriterQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQosPolicy reference */ RTPS_DllAPI LatencyBudgetQosPolicy& latency_budget() @@ -211,6 +226,7 @@ class DataWriterQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQosPolicy reference */ RTPS_DllAPI const LatencyBudgetQosPolicy& latency_budget() const @@ -220,6 +236,7 @@ class DataWriterQos /** * Setter for LatencyBudgetQosPolicy + * * @param latency_budget new value for the LatencyBudgetQosPolicy */ RTPS_DllAPI void latency_budget( @@ -230,6 +247,7 @@ class DataWriterQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQosPolicy reference */ RTPS_DllAPI LivelinessQosPolicy& liveliness() @@ -239,6 +257,7 @@ class DataWriterQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQosPolicy reference */ RTPS_DllAPI const LivelinessQosPolicy& liveliness() const @@ -248,6 +267,7 @@ class DataWriterQos /** * Setter for LivelinessQosPolicy + * * @param liveliness new value for the LivelinessQosPolicy */ RTPS_DllAPI void liveliness( @@ -258,6 +278,7 @@ class DataWriterQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQosPolicy reference */ RTPS_DllAPI ReliabilityQosPolicy& reliability() @@ -267,6 +288,7 @@ class DataWriterQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQosPolicy reference */ RTPS_DllAPI const ReliabilityQosPolicy& reliability() const @@ -276,6 +298,7 @@ class DataWriterQos /** * Setter for ReliabilityQosPolicy + * * @param reliability new value for the ReliabilityQosPolicy */ RTPS_DllAPI void reliability( @@ -286,6 +309,7 @@ class DataWriterQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQosPolicy reference */ RTPS_DllAPI DestinationOrderQosPolicy& destination_order() @@ -295,6 +319,7 @@ class DataWriterQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQosPolicy reference */ RTPS_DllAPI const DestinationOrderQosPolicy& destination_order() const @@ -304,6 +329,7 @@ class DataWriterQos /** * Setter for DestinationOrderQosPolicy + * * @param destination_order new value for the DestinationOrderQosPolicy */ RTPS_DllAPI void destination_order( @@ -314,6 +340,7 @@ class DataWriterQos /** * Getter for HistoryQosPolicy + * * @return HistoryQosPolicy reference */ RTPS_DllAPI HistoryQosPolicy& history() @@ -323,6 +350,7 @@ class DataWriterQos /** * Getter for HistoryQosPolicy + * * @return HistoryQosPolicy reference */ RTPS_DllAPI const HistoryQosPolicy& history() const @@ -332,6 +360,7 @@ class DataWriterQos /** * Setter for HistoryQosPolicy + * * @param history new value for the HistoryQosPolicy */ RTPS_DllAPI void history( @@ -342,6 +371,7 @@ class DataWriterQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQosPolicy reference */ RTPS_DllAPI ResourceLimitsQosPolicy& resource_limits() @@ -351,6 +381,7 @@ class DataWriterQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQosPolicy reference */ RTPS_DllAPI const ResourceLimitsQosPolicy& resource_limits() const @@ -360,6 +391,7 @@ class DataWriterQos /** * Setter for ResourceLimitsQosPolicy + * * @param resource_limits new value for the ResourceLimitsQosPolicy */ RTPS_DllAPI void resource_limits( @@ -370,6 +402,7 @@ class DataWriterQos /** * Getter for TransportPriorityQosPolicy + * * @return TransportPriorityQosPolicy reference */ RTPS_DllAPI TransportPriorityQosPolicy& transport_priority() @@ -379,6 +412,7 @@ class DataWriterQos /** * Getter for TransportPriorityQosPolicy + * * @return TransportPriorityQosPolicy reference */ RTPS_DllAPI const TransportPriorityQosPolicy& transport_priority() const @@ -388,6 +422,7 @@ class DataWriterQos /** * Setter for TransportPriorityQosPolicy + * * @param transport_priority new value for the TransportPriorityQosPolicy */ RTPS_DllAPI void transport_priority( @@ -398,6 +433,7 @@ class DataWriterQos /** * Getter for LifespanQosPolicy + * * @return LifespanQosPolicy reference */ RTPS_DllAPI LifespanQosPolicy& lifespan() @@ -407,6 +443,7 @@ class DataWriterQos /** * Getter for LifespanQosPolicy + * * @return LifespanQosPolicy reference */ RTPS_DllAPI const LifespanQosPolicy& lifespan() const @@ -416,6 +453,7 @@ class DataWriterQos /** * Setter for LifespanQosPolicy + * * @param lifespan new value for the LifespanQosPolicy */ RTPS_DllAPI void lifespan( @@ -426,6 +464,7 @@ class DataWriterQos /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy reference */ RTPS_DllAPI UserDataQosPolicy& user_data() @@ -435,6 +474,7 @@ class DataWriterQos /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy reference */ RTPS_DllAPI const UserDataQosPolicy& user_data() const @@ -444,6 +484,7 @@ class DataWriterQos /** * Setter for UserDataQosPolicy + * * @param user_data new value for the UserDataQosPolicy */ RTPS_DllAPI void user_data( @@ -454,6 +495,7 @@ class DataWriterQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQosPolicy reference */ RTPS_DllAPI OwnershipQosPolicy& ownership() @@ -463,6 +505,7 @@ class DataWriterQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQosPolicy reference */ RTPS_DllAPI const OwnershipQosPolicy& ownership() const @@ -472,6 +515,7 @@ class DataWriterQos /** * Setter for OwnershipQosPolicy + * * @param ownership new value for the OwnershipQosPolicy */ RTPS_DllAPI void ownership( @@ -482,6 +526,7 @@ class DataWriterQos /** * Getter for OwnershipStrengthQosPolicy + * * @return OwnershipStrengthQosPolicy reference */ RTPS_DllAPI OwnershipStrengthQosPolicy& ownership_strength() @@ -491,6 +536,7 @@ class DataWriterQos /** * Getter for OwnershipStrengthQosPolicy + * * @return OwnershipStrengthQosPolicy reference */ RTPS_DllAPI const OwnershipStrengthQosPolicy& ownership_strength() const @@ -500,6 +546,7 @@ class DataWriterQos /** * Setter for OwnershipStrengthQosPolicy + * * @param ownership_strength new value for the OwnershipStrengthQosPolicy */ RTPS_DllAPI void ownership_strength( @@ -510,6 +557,7 @@ class DataWriterQos /** * Getter for WriterDataLifecycleQosPolicy + * * @return WriterDataLifecycleQosPolicy reference */ RTPS_DllAPI WriterDataLifecycleQosPolicy& writer_data_lifecycle() @@ -519,6 +567,7 @@ class DataWriterQos /** * Getter for WriterDataLifecycleQosPolicy + * * @return WriterDataLifecycleQosPolicy reference */ RTPS_DllAPI const WriterDataLifecycleQosPolicy& writer_data_lifecycle() const @@ -528,6 +577,7 @@ class DataWriterQos /** * Setter for WriterDataLifecycleQosPolicy + * * @param writer_data_lifecycle new value for the WriterDataLifecycleQosPolicy */ RTPS_DllAPI void writer_data_lifecycle( @@ -538,6 +588,7 @@ class DataWriterQos /** * Getter for PublishModeQosPolicy + * * @return PublishModeQosPolicy reference */ RTPS_DllAPI PublishModeQosPolicy& publish_mode() @@ -547,6 +598,7 @@ class DataWriterQos /** * Getter for PublishModeQosPolicy + * * @return PublishModeQosPolicy reference */ RTPS_DllAPI const PublishModeQosPolicy& publish_mode() const @@ -556,6 +608,7 @@ class DataWriterQos /** * Setter for PublishModeQosPolicy + * * @param publish_mode new value for the PublishModeQosPolicy */ RTPS_DllAPI void publish_mode( @@ -566,6 +619,7 @@ class DataWriterQos /** * Getter for DataRepresentationQosPolicy + * * @return DataRepresentationQosPolicy reference */ RTPS_DllAPI DataRepresentationQosPolicy& representation() @@ -575,6 +629,7 @@ class DataWriterQos /** * Getter for DataRepresentationQosPolicy + * * @return DataRepresentationQosPolicy reference */ RTPS_DllAPI const DataRepresentationQosPolicy& representation() const @@ -584,6 +639,7 @@ class DataWriterQos /** * Setter for DataRepresentationQosPolicy + * * @param representation new value for the DataRepresentationQosPolicy */ RTPS_DllAPI void representation( @@ -594,6 +650,7 @@ class DataWriterQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos reference */ RTPS_DllAPI PropertyPolicyQos& properties() @@ -603,6 +660,7 @@ class DataWriterQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos reference */ RTPS_DllAPI const PropertyPolicyQos& properties() const @@ -612,6 +670,7 @@ class DataWriterQos /** * Setter for PropertyPolicyQos + * * @param properties new value for the PropertyPolicyQos */ RTPS_DllAPI void properties( @@ -622,6 +681,7 @@ class DataWriterQos /** * Getter for RTPSReliableWriterQos + * * @return RTPSReliableWriterQos reference */ RTPS_DllAPI RTPSReliableWriterQos& reliable_writer_qos() @@ -631,6 +691,7 @@ class DataWriterQos /** * Getter for RTPSReliableWriterQos + * * @return RTPSReliableWriterQos reference */ RTPS_DllAPI const RTPSReliableWriterQos& reliable_writer_qos() const @@ -640,6 +701,7 @@ class DataWriterQos /** * Setter for RTPSReliableWriterQos + * * @param reliable_writer_qos new value for the RTPSReliableWriterQos */ RTPS_DllAPI void reliable_writer_qos( @@ -650,6 +712,7 @@ class DataWriterQos /** * Getter for RTPSEndpointQos + * * @return RTPSEndpointQos reference */ RTPS_DllAPI RTPSEndpointQos& endpoint() @@ -668,6 +731,7 @@ class DataWriterQos /** * Setter for RTPSEndpointQos + * * @param endpoint new value for the RTPSEndpointQos */ RTPS_DllAPI void endpoint( @@ -678,6 +742,7 @@ class DataWriterQos /** * Getter for WriterResourceLimitsQos + * * @return WriterResourceLimitsQos reference */ RTPS_DllAPI WriterResourceLimitsQos& writer_resource_limits() @@ -687,6 +752,7 @@ class DataWriterQos /** * Getter for WriterResourceLimitsQos + * * @return WriterResourceLimitsQos reference */ RTPS_DllAPI const WriterResourceLimitsQos& writer_resource_limits() const @@ -696,6 +762,7 @@ class DataWriterQos /** * Setter for WriterResourceLimitsQos + * * @param writer_resource_limits new value for the WriterResourceLimitsQos */ RTPS_DllAPI void writer_resource_limits( @@ -706,7 +773,9 @@ class DataWriterQos /** * Getter for ThroughputControllerDescriptor + * * @return ThroughputControllerDescriptor reference + * @deprecated Use flow_controllers() on DomainParticipantQoS */ RTPS_DllAPI fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller() { @@ -715,7 +784,9 @@ class DataWriterQos /** * Getter for ThroughputControllerDescriptor + * * @return ThroughputControllerDescriptor reference + * @deprecated Use flow_controllers() on DomainParticipantQoS */ RTPS_DllAPI const fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller() const { @@ -724,7 +795,9 @@ class DataWriterQos /** * Setter for ThroughputControllerDescriptor + * * @param throughput_controller new value for the ThroughputControllerDescriptor + * @deprecated Use flow_controllers() on DomainParticipantQoS */ RTPS_DllAPI void throughput_controller( const fastrtps::rtps::ThroughputControllerDescriptor& throughput_controller) @@ -732,6 +805,37 @@ class DataWriterQos throughput_controller_ = throughput_controller; } + /** + * Getter for DataSharingQosPolicy + * + * @return DataSharingQosPolicy reference + */ + RTPS_DllAPI DataSharingQosPolicy& data_sharing() + { + return data_sharing_; + } + + /** + * Getter for DataSharingQosPolicy + * + * @return DataSharingQosPolicy reference + */ + RTPS_DllAPI const DataSharingQosPolicy& data_sharing() const + { + return data_sharing_; + } + + /** + * Setter for DataSharingQosPolicy + * + * @param data_sharing new value for the DataSharingQosPolicy + */ + RTPS_DllAPI void data_sharing( + const DataSharingQosPolicy& data_sharing) + { + data_sharing_ = data_sharing; + } + private: //!Durability Qos, implemented in the library. @@ -799,6 +903,9 @@ class DataWriterQos //!Throughput controller fastrtps::rtps::ThroughputControllerDescriptor throughput_controller_; + + //!DataSharing configuration + DataSharingQosPolicy data_sharing_; }; RTPS_DllAPI extern const DataWriterQos DATAWRITER_QOS_DEFAULT; diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/qos/PublisherQos.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/qos/PublisherQos.hpp index 2dc1b7571..52151c4cb 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/qos/PublisherQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/qos/PublisherQos.hpp @@ -33,6 +33,7 @@ namespace dds { * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been * implemented in the library. * Please consult each of them to check for implementation details and default values. + * * @ingroup FASTDDS_QOS_MODULE */ class PublisherQos @@ -62,6 +63,7 @@ class PublisherQos /** * Getter for PresentationQosPolicy + * * @return PresentationQosPolicy reference */ const PresentationQosPolicy& presentation() const @@ -71,6 +73,7 @@ class PublisherQos /** * Getter for PresentationQosPolicy + * * @return PresentationQosPolicy reference */ PresentationQosPolicy& presentation() @@ -80,6 +83,7 @@ class PublisherQos /** * Setter for PresentationQosPolicy + * * @param presentation PresentationQosPolicy */ void presentation( @@ -90,6 +94,7 @@ class PublisherQos /** * Getter for PartitionQosPolicy + * * @return PartitionQosPolicy reference */ const PartitionQosPolicy& partition() const @@ -99,6 +104,7 @@ class PublisherQos /** * Getter for PartitionQosPolicy + * * @return PartitionQosPolicy reference */ PartitionQosPolicy& partition() @@ -108,6 +114,7 @@ class PublisherQos /** * Setter for PartitionQosPolicy + * * @param partition PartitionQosPolicy */ void partition( @@ -118,6 +125,7 @@ class PublisherQos /** * Getter for GroupDataQosPolicy + * * @return GroupDataQosPolicy reference */ const GroupDataQosPolicy& group_data() const @@ -127,6 +135,7 @@ class PublisherQos /** * Getter for GroupDataQosPolicy + * * @return GroupDataQosPolicy reference */ GroupDataQosPolicy& group_data() @@ -136,6 +145,7 @@ class PublisherQos /** * Setter for GroupDataQosPolicy + * * @param group_data GroupDataQosPolicy */ void group_data( @@ -146,6 +156,7 @@ class PublisherQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ const EntityFactoryQosPolicy& entity_factory() const @@ -155,6 +166,7 @@ class PublisherQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ EntityFactoryQosPolicy& entity_factory() @@ -164,6 +176,7 @@ class PublisherQos /** * Setter for EntityFactoryQosPolicy + * * @param entity_factory EntityFactoryQosPolicy */ void entity_factory( diff --git a/ThirdParty/ros/include/fastdds/dds/publisher/qos/WriterQos.hpp b/ThirdParty/ros/include/fastdds/dds/publisher/qos/WriterQos.hpp index 3ea3f36a0..155578ac3 100644 --- a/ThirdParty/ros/include/fastdds/dds/publisher/qos/WriterQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/publisher/qos/WriterQos.hpp @@ -61,7 +61,8 @@ class WriterQos (this->m_groupData == b.m_groupData) && (this->m_publishMode == b.m_publishMode) && (this->m_disablePositiveACKs == b.m_disablePositiveACKs) && - (this->representation == b.representation); + (this->representation == b.representation) && + (this->data_sharing == b.data_sharing); } //!Durability Qos, implemented in the library. @@ -121,6 +122,12 @@ class WriterQos //!Disable positive acks QoS, implemented in the library. DisablePositiveACKsQosPolicy m_disablePositiveACKs; + //!Information for data sharing compatibility check. + DataSharingQosPolicy data_sharing; + + //! Disable heartbeat piggyback mechanism. + bool disable_heartbeat_piggyback = false; + /** * Set Qos from another class * @param qos Reference from a WriterQos object. diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/DataReader.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/DataReader.hpp index 305a9cab1..e89d124dc 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/DataReader.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/DataReader.hpp @@ -17,20 +17,31 @@ * */ -#ifndef _FASTRTPS_DATAREADER_HPP_ -#define _FASTRTPS_DATAREADER_HPP_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC +#ifndef _FASTDDS_DDS_SUBSCRIBER_DATAREADER_HPP_ +#define _FASTDDS_DDS_SUBSCRIBER_DATAREADER_HPP_ -#include -#include -#include -#include +#include +#include + +#include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include -#include +#include +#include + +#include using eprosima::fastrtps::types::ReturnCode_t; @@ -44,13 +55,8 @@ class DataReader; namespace eprosima { namespace fastrtps { - -class TopicAttributes; - namespace rtps { -class ReaderAttributes; struct GUID_t; -struct InstanceHandle_t; } // namespace rtps } // namespace fastrtps @@ -61,14 +67,19 @@ class Subscriber; class SubscriberImpl; class DataReaderImpl; class DataReaderListener; -class TypeSupport; class DataReaderQos; class TopicDescription; struct LivelinessChangedStatus; -struct SampleInfo; + +// Not yet implemented +class QueryCondition; +class ReadCondition; + +using SampleInfoSeq = LoanableSequence; /** * Class DataReader, contains the actual implementation of the behaviour of the Subscriber. + * * @ingroup FASTDDS_MODULE */ class DataReader : public DomainEntity @@ -82,11 +93,11 @@ class DataReader : public DomainEntity * Create a data reader, assigning its pointer to the associated implementation. * Don't use directly, create DataReader using create_datareader from Subscriber. */ - RTPS_DllAPI DataReader( + DataReader( DataReaderImpl* impl, const StatusMask& mask = StatusMask::all()); - RTPS_DllAPI DataReader( + DataReader( Subscriber* s, TopicDescription* topic, const DataReaderQos& qos, @@ -96,25 +107,39 @@ class DataReader : public DomainEntity public: /** - * @brief Destructor + * @brief Destructor. */ - RTPS_DllAPI virtual ~DataReader(); + virtual ~DataReader(); /** - * @brief This operation enables the DataReader + * @brief This operation enables the DataReader. + * * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the Subscriber creating this * DataReader is not enabled. */ RTPS_DllAPI ReturnCode_t enable() override; /** - * Method to block the current thread until an unread message is available - * @param timeout Max blocking time for this operation + * Method to block the current thread until an unread message is available. + * + * @param [in] timeout Max blocking time for this operation. + * * @return true if there is new unread message, false if timeout */ RTPS_DllAPI bool wait_for_unread_message( const fastrtps::Duration_t& timeout); + /** + * NOT YET IMPLEMENTED + * + * @brief Method to block the current thread until an unread message is available. + * + * @param[in] max_wait Max blocking time for this operation. + * @return RETCODE_OK if there is new unread message, ReturnCode_t::RETCODE_TIMEOUT if timeout + */ + RTPS_DllAPI ReturnCode_t wait_for_historical_data( + const fastrtps::Duration_t& max_wait) const; + /** @name Read or take data methods. * Methods to read or take data from the History. @@ -122,55 +147,572 @@ class DataReader : public DomainEntity ///@{ - /* TODO - RTPS_DllAPI bool read( - std::vector& data_values, - std::vector& sample_infos, - uint32_t max_samples); + /** + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of Data values from the DataReader. The caller can limit the size + * of the returned collection with the @c max_samples parameter. + * + * The properties of the @c data_values collection and the setting of the @ref PresentationQosPolicy may + * impose further limits on the size of the returned ‘list.’ + * + * 1. If @ref PresentationQosPolicy::access_scope is @ref INSTANCE_PRESENTATION_QOS, then the returned + * collection is a 'list' where samples belonging to the same data-instance are consecutive. + * + * 2. If @ref PresentationQosPolicy::access_scope is @ref TOPIC_PRESENTATION_QOS and + * @ref PresentationQosPolicy::ordered_access is set to @c false, then the returned collection is a + * 'list' where samples belonging to the same data-instance are consecutive. + * + * 3. If @ref PresentationQosPolicy::access_scope is @ref TOPIC_PRESENTATION_QOS and + * @ref PresentationQosPolicy::ordered_access is set to @c true, then the returned collection is a + * 'list' where samples belonging to the same instance may or may not be consecutive. This is because to + * preserve order it may be necessary to mix samples from different instances. + * + * 4. If @ref PresentationQosPolicy::access_scope is @ref GROUP_PRESENTATION_QOS and + * @ref PresentationQosPolicy::ordered_access is set to @c false, then the returned collection is a + * 'list' where samples belonging to the same data instance are consecutive. + * + * 5. If @ref PresentationQosPolicy::access_scope is @ref GROUP_PRESENTATION_QOS and + * @ref PresentationQosPolicy::ordered_access is set to @c true, then the returned collection contains at + * most one sample. The difference in this case is due to the fact that it is required that the application + * is able to read samples belonging to different DataReader objects in a specific order. + * + * In any case, the relative order between the samples of one instance is consistent with the + * @ref eprosima::fastdds::dds::DestinationOrderQosPolicy "DestinationOrderQosPolicy": + * + * - If @ref DestinationOrderQosPolicy::kind is @ref BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, samples + * belonging to the same instances will appear in the relative order in which there were received (FIFO, + * earlier samples ahead of the later samples). + * + * - If @ref DestinationOrderQosPolicy::kind is @ref BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS, samples + * belonging to the same instances will appear in the relative order implied by the source_timestamp (FIFO, + * smaller values of source_timestamp ahead of the larger values). + * + * The actual number of samples returned depends on the information that has been received by the middleware + * as well as the @ref HistoryQosPolicy, @ref ResourceLimitsQosPolicy, and + * @ref eprosima::fastdds::dds::ReaderResourceLimitsQos "ReaderResourceLimitsQos": + * + * - In the case where the @ref HistoryQosPolicy::kind is KEEP_LAST_HISTORY_QOS, the call will return at most + * @ref HistoryQosPolicy::depth samples per instance. + * + * - The maximum number of samples returned is limited by @ref ResourceLimitsQosPolicy::max_samples, and by + * @ref ReaderResourceLimitsQos::max_samples_per_read. + * + * - For multiple instances, the number of samples returned is additionally limited by the product + * (@ref ResourceLimitsQosPolicy::max_samples_per_instance * @ref ResourceLimitsQosPolicy::max_instances). + * + * - If ReaderResourceLimitsQos::sample_infos_allocation has a maximum limit, the number of samples returned + * may also be limited if insufficient @ref SampleInfo resources are available. + * + * If the operation succeeds and the number of samples returned has been limited (by means of a maximum limit, + * as listed above, or insufficient @ref SampleInfo resources), the call will complete successfully and provide + * those samples the reader is able to return. The user may need to make additional calls, or return outstanding + * loaned buffers in the case of insufficient resources, in order to access remaining samples. + * + * In addition to the collection of samples, the read operation also uses a collection of @ref SampleInfo + * structures (@c sample_infos). + * + * The initial (input) properties of the @c data_values and @c sample_infos collections will determine the + * precise behavior of this operation. For the purposes of this description the collections are modeled as having + * three properties: + * + * - the current length (@c len, see @ref LoanableCollection::length()) + * + * - the maximum length (@c max_len, see @ref LoanableCollection::maximum()) + * + * - whether the collection container owns the memory of the elements within + * (@c owns, see @ref LoanableCollection::has_ownership()) + * + * The initial (input) values of the @c len, @c max_len, and @c owns properties for the @c data_values and + * @c sample_infos collections govern the behavior of the read operation as specified by the following rules: + * + * 1. The values of @c len, @c max_len, and @c owns for the two collections must be identical. Otherwise read + * will fail with RETCODE_PRECONDITION_NOT_MET. + * + * 2. On successful output, the values of @c len, @c max_len, and @c owns will be the same for both collections. + * + * 3. If the input max_len == 0 , then the @c data_values and @c sample_infos collections will be + * filled with elements that are 'loaned' by the DataReader. On output, @c owns will be @c false, @c len will + * be set to the number of values returned, and @c max_len will be set to a value + * verifying max_len >= len . The use of this variant allows for zero-copy access to the data and the + * application will need to return the loan to the DataReader using the @ref return_loan operation. + * + * 4. If the input max_len > 0 and the input owns == false , then the read operation will + * fail with RETCODE_PRECONDITION_NOT_MET. This avoids the potential hard-to-detect memory leaks caused by an + * application forgetting to return the loan. + * + * 5. If input max_len > 0 and the input owns == true , then the read operation will copy + * the Data values and SampleInfo values into the elements already inside the collections. On output, @c owns + * will be @c true, @c len will be set to the number of values copied, and @c max_len will remain unchanged. + * The use of this variant forces a copy but the application can control where the copy is placed and the + * application will not need to return the loan. The number of samples copied depends on the values of + * @c max_len and @c max_samples: + * + * - If max_samples == LENGTH_UNLIMITED , then at most @c max_len values will be copied. The use of + * this variant lets the application limit the number of samples returned to what the sequence can + * accommodate. + * + * - If max_samples <= max_len , then at most @c max_samples values will be copied. The use of this + * variant lets the application limit the number of samples returned to fewer that what the sequence can + * accommodate. + * + * - If max_samples > max_len , then the read operation will fail with RETCODE_PRECONDITION_NOT_MET. + * This avoids the potential confusion where the application expects to be able to access up to + * @c max_samples, but that number can never be returned, even if they are available in the DataReader, + * because the output sequence cannot accommodate them. + * + * As described above, upon return the @c data_values and @c sample_infos collections may contain elements + * 'loaned' from the DataReader. If this is the case, the application will need to use the @ref return_loan + * operation to return the loan once it is no longer using the Data in the collection. Upon return from + * @ref return_loan, the collection will have max_len == 0 and owns == false . + * + * The application can determine whether it is necessary to return the loan or not based on the state of the + * collections when the read operation was called, or by accessing the @c owns property. However, in many cases + * it may be simpler to always call @ref return_loan, as this operation is harmless (i.e., leaves all elements + * unchanged) if the collection does not have a loan. + * + * On output, the collection of Data values and the collection of SampleInfo structures are of the same length + * and are in a one-to-one correspondence. Each SampleInfo provides information, such as the @c source_timestamp, + * the @c sample_state, @c view_state, and @c instance_state, etc., about the corresponding sample. + * + * Some elements in the returned collection may not have valid data. If the @c instance_state in the SampleInfo is + * @ref NOT_ALIVE_DISPOSED_INSTANCE_STATE or @ref NOT_ALIVE_NO_WRITERS_INSTANCE_STATE, then the last sample for + * that instance in the collection, that is, the one whose SampleInfo has sample_rank == 0 does not + * contain valid data. Samples that contain no data do not count towards the limits imposed by the + * @ref ResourceLimitsQosPolicy. + * + * The act of reading a sample changes its @c sample_state to @ref READ_SAMPLE_STATE. If the sample belongs + * to the most recent generation of the instance, it will also set the @c view_state of the instance to be + * @ref NOT_NEW_VIEW_STATE. It will not affect the @c instance_state of the instance. + * + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. + * + * @em Important: If the samples "returned" by this method are loaned from the middleware (see @ref take + * for more information on memory loaning), it is important that their contents not be changed. Because the + * memory in which the data is stored belongs to the middleware, any modifications made to the data will be + * seen the next time the same samples are read or taken; the samples will no longer reflect the state that + * was received from the network. + * + * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param [in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described above. + * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t read( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); + + /** + * NOT YET IMPLEMENTED + * + * This operation accesses via ‘read’ the samples that match the criteria specified in the ReadCondition. + * This operation is especially useful in combination with QueryCondition to filter data samples based on the + * content. + * + * The specified ReadCondition must be attached to the DataReader; otherwise the operation will fail and return + * RETCODE_PRECONDITION_NOT_MET. + * + * In case the ReadCondition is a ‘plain’ ReadCondition and not the specialized QueryCondition, the + * operation is equivalent to calling read and passing as @c sample_states, @c view_states and @c instance_states + * the value of the corresponding attributes in @c a_condition. Using this operation the application can avoid + * repeating the same parameters specified when creating the ReadCondition. + * + * The samples are accessed with the same semantics as the read operation. If the DataReader has no samples that + * meet the constraints, the return value will be RETCODE_NO_DATA. + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. + * @param[in] a_condition A ReadCondition that returned @c sample_states must pass + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t read_w_condition( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + ReadCondition* a_condition = nullptr); + + /** + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of data values from the DataReader. The behavior is identical to + * @ref read, except that all samples returned belong to the single specified instance whose handle is + * @c a_handle. + * + * Upon successful completion, the data collection will contain samples all belonging to the same instance. + * The corresponding @ref SampleInfo verifies @ref SampleInfo::instance_handle == @c a_handle. + * + * This operation is semantically equivalent to the @ref read operation, except in building the collection. + * The DataReader will check that the sample belongs to the specified instance and otherwise it will not place + * the sample in the returned collection. + * + * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and + * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' + * elements to the output collections, which must then be returned by means of @ref return_loan. + * + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. + * + * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param [in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param [in] a_handle The specified instance to return samples for. The method will fail with + * RETCODE_BAD_PARAMETER if the handle does not correspond to an existing + * data-object known to the DataReader. + * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. */ + RTPS_DllAPI ReturnCode_t read_instance( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& a_handle = HANDLE_NIL, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); /** - * @brief This operation copies the next, non-previously accessed Data value from the DataReader; the operation also - * copies the corresponding SampleInfo. The implied order among the samples stored in the DataReader is the same as for - * the read operation. + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of data values from the DataReader where all the samples belong to a + * single instance. The behavior is similar to @ref read_instance, except that the actual instance is not + * directly specified. Rather, the samples will all belong to the 'next' instance with @c instance_handle + * 'greater' than the specified 'previous_handle' that has available samples. + * + * This operation implies the existence of a total order 'greater-than' relationship between the instance + * handles. The specifics of this relationship are not all important and are implementation specific. The + * important thing is that, according to the middleware, all instances are ordered relative to each other. + * This ordering is between the instance handles, and should not depend on the state of the instance (e.g. + * whether it has data or not) and must be defined even for instance handles that do not correspond to instances + * currently managed by the DataReader. For the purposes of the ordering, it should be 'as if' each instance + * handle was represented as an integer. + * + * The behavior of this operation is 'as if' the DataReader invoked @ref read_instance, passing the smallest + * @c instance_handle among all the ones that: (a) are greater than @c previous_handle, and (b) have available + * samples (i.e. samples that meet the constraints imposed by the specified states). + * + * The special value @ref HANDLE_NIL is guaranteed to be 'less than' any valid @c instance_handle. So the use + * of the parameter value @c previous_handle == @ref HANDLE_NIL will return the samples for the instance which + * has the smallest @c instance_handle among all the instances that contain available samples. + * + * This operation is intended to be used in an application-driven iteration, where the application starts by + * passing @c previous_handle == @ref HANDLE_NIL, examines the samples returned, and then uses the + * @c instance_handle returned in the @ref SampleInfo as the value of the @c previous_handle argument to the + * next call to @ref read_next_instance. The iteration continues until @ref read_next_instance fails with + * RETCODE_NO_DATA. + * + * Note that it is possible to call the @ref read_next_instance operation with a @c previous_handle that does not + * correspond to an instance currently managed by the DataReader. This is because as stated earlier the + * 'greater-than' relationship is defined even for handles not managed by the DataReader. One practical situation + * where this may occur is when an application is iterating through all the instances, takes all the samples of a + * @ref NOT_ALIVE_NO_WRITERS_INSTANCE_STATE instance, returns the loan (at which point the instance information + * may be removed, and thus the handle becomes invalid), and tries to read the next instance. * - * The read_next_sample operation is semantically equivalent to the read operation where the input Data sequence has - * max_length=1, the sample_states=NOT_READ, the view_states=ANY_VIEW_STATE, and the instance_states=ANY_INSTANCE_STATE. + * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and + * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' + * elements to the output collections, which must then be returned by means of @ref return_loan. * - * The read_next_sample operation provides a simplified API to ‘read’ samples avoiding the need for the application to - * manage sequences and specify states. + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. * - * If there is no unread data in the DataReader, the operation will return NO_DATA and nothing is copied - * @param data Data pointer to store the sample - * @param info SampleInfo pointer to store the sample information - * @return RETCODE_NO_DATA if the history is empty, RETCODE_OK if the next sample is returned and RETCODE_ERROR otherwise + * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param [in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param [in] previous_handle The 'next smallest' instance with a value greater than this value that has + * available samples will be returned. + * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t read_next_instance( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& previous_handle = HANDLE_NIL, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); + + /** + * NOT YET IMPLEMENTED + * + * This operation accesses a collection of Data values from the DataReader. The behavior is identical to + * @ref read_next_instance except that all samples returned satisfy the specified condition. In other words, on + * success all returned samples belong to the same instance, and the instance is the instance with + * ‘smallest’ @c instance_handle among the ones that verify (a) @c instance_handle >= @c previous_handle and (b) have samples + * for which the specified ReadCondition evaluates to TRUE. + * + * Similar to the operation @ref read_next_instance it is possible to call + * @ref read_next_instance_w_condition with a @c previous_handle that does not correspond to an instance currently + * managed by the DataReader. + * + * The behavior of the @ref read_next_instance_w_condition operation follows the same rules than the read operation + * regarding the pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar + * to read, the @ref read_next_instance_w_condition operation may ‘loan’ elements to the output collections which + * must then be returned by means of @ref return_loan. + * + * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA. + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has + * available samples will be returned. + * @param[in] a_condition A ReadCondition that returned @c sample_states must pass + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t read_next_instance_w_condition( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& previous_handle = HANDLE_NIL, + ReadCondition* a_condition = nullptr); + + /** + * @brief This operation copies the next, non-previously accessed Data value from the DataReader; the operation + * also copies the corresponding SampleInfo. The implied order among the samples stored in the DataReader is the + * same as for the read operation. + * + * The read_next_sample operation is semantically equivalent to the read operation where the input Data sequence + * has max_length = 1 , the sample_states = NOT_READ_SAMPLE_STATE , + * the view_states = ANY_VIEW_STATE , and the instance_states = ANY_INSTANCE_STATE . + * + * The read_next_sample operation provides a simplified API to ‘read’ samples avoiding the need for the + * application to manage sequences and specify states. + * + * If there is no unread data in the DataReader, the operation will return RETCODE_NO_DATA and nothing is copied + * + * @param [out] data Data pointer to store the sample + * @param [out] info SampleInfo pointer to store the sample information + * + * @return Any of the standard return codes. */ RTPS_DllAPI ReturnCode_t read_next_sample( void* data, SampleInfo* info); - /* TODO - RTPS_DllAPI bool take( - std::vector& data_values, - std::vector& sample_infos, - uint32_t max_samples); + /** + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of data-samples from the DataReader and a corresponding collection of + * SampleInfo structures, and 'removes' them from the DataReader. The operation will return either a 'list' of + * samples or else a single sample. This is controlled by the @ref PresentationQosPolicy using the same logic + * as for the @ref read operation. + * + * The act of taking a sample removes it from the DataReader so it cannot be 'read' or 'taken' again. If the + * sample belongs to the most recent generation of the instance, it will also set the @c view_state of the + * instance to NOT_NEW. It will not affect the @c instance_state of the instance. + * + * The behavior of the take operation follows the same rules than the @ref read operation regarding the + * pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar to + * @ref read, the take operation may 'loan' elements to the output collections which must then be returned by + * means of @ref return_loan. The only difference with @ref read is that, as stated, the samples returned by + * take will no longer be accessible to successive calls to read or take. + * + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. + * + * @param [in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param [in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param [in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param [in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param [in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param [in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t take( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); + + /** + * NOT YET IMPLEMENTED + * + * This operation is analogous to @ref read_w_condition except it accesses samples via the ‘take’ operation. + * + * The specified ReadCondition must be attached to the DataReader; otherwise the operation will fail and return + * RETCODE_PRECONDITION_NOT_MET. + * + * The samples are accessed with the same semantics as the @ref take operation. + * + * This operation is especially useful in combination with QueryCondition to filter data samples based on the + * content. + * + * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA. + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are. + * @param[in] a_condition A ReadCondition that returned @c sample_states must pass + * + * @return Any of the standard return codes. */ + RTPS_DllAPI ReturnCode_t take_w_condition( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + ReadCondition* a_condition = nullptr); /** - * @brief This operation copies the next, non-previously accessed Data value from the DataReader and ‘removes’ it from - * the DataReader so it is no longer accessible. The operation also copies the corresponding SampleInfo. This operation - * is analogous to the read_next_sample except for the fact that the sample is ‘removed’ from the DataReader. + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of data values from the DataReader and 'removes' them from the DataReader. * - * The take_next_sample operation is semantically equivalent to the take operation where the input sequence has - * max_length=1, the sample_states=NOT_READ, the view_states=ANY_VIEW_STATE, and the instance_states=ANY_INSTANCE_STATE. + * This operation has the same behavior as @ref read_instance, except that the samples are 'taken' from the + * DataReader such that they are no longer accessible via subsequent 'read' or 'take' operations. * - * This operation provides a simplified API to ’take’ samples avoiding the need for the application to manage sequences - * and specify states. + * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and + * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' + * elements to the output collections, which must then be returned by means of @ref return_loan. * - * If there is no unread data in the DataReader, the operation will return NO_DATA and nothing is copied. - * @param data Data pointer to store the sample - * @param info SampleInfo pointer to store the sample information - * @return RETCODE_NO_DATA if the history is empty, RETCODE_OK if the next sample is returned and RETCODE_ERROR otherwise + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param[in] a_handle The specified instance to return samples for. The method will fail with + * RETCODE_BAD_PARAMETER if the handle does not correspond to an existing + * data-object known to the DataReader. + * @param[in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param[in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param[in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t take_instance( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& a_handle = HANDLE_NIL, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); + + /** + * Access a collection of data samples from the DataReader. + * + * This operation accesses a collection of data values from the DataReader and 'removes' them from the DataReader. + * + * This operation has the same behavior as @ref read_next_instance, except that the samples are 'taken' from the + * DataReader such that they are no longer accessible via subsequent 'read' or 'take' operations. + * + * Similar to the operation @ref read_next_instance, it is possible to call this operation with a + * @c previous_handle that does not correspond to an instance currently managed by the DataReader. + * + * The behavior of this operation follows the same rules as the @ref read operation regarding the pre-conditions and + * post-conditions for the @c data_values and @c sample_infos. Similar to @ref read, this operation may 'loan' + * elements to the output collections, which must then be returned by means of @ref return_loan. + * + * If the DataReader has no samples that meet the constraints, the operations fails with RETCODE_NO_DATA. + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has + * available samples will be returned. + * @param[in] sample_states Only data samples with @c sample_state matching one of these will be returned. + * @param[in] view_states Only data samples with @c view_state matching one of these will be returned. + * @param[in] instance_states Only data samples with @c instance_state matching one of these will be returned. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t take_next_instance( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& previous_handle = HANDLE_NIL, + SampleStateMask sample_states = ANY_SAMPLE_STATE, + ViewStateMask view_states = ANY_VIEW_STATE, + InstanceStateMask instance_states = ANY_INSTANCE_STATE); + + /** + * NOT YET IMPLEMENTED + * + * This operation accesses a collection of Data values from the DataReader. The behavior is identical to + * @ref read_next_instance except that all samples returned satisfy the specified condition. In other words, on + * success all returned samples belong to the same instance, and the instance is the instance with ‘smallest’ + * @c instance_handle among the ones that verify (a) @c instance_handle >= @c previous_handle and (b) have + * samples for which the specified ReadCondition evaluates to TRUE. + * + * Similar to the operation @ref read_next_instance it is possible to call @ref read_next_instance_w_condition with + * a @c previous_handle that does not correspond to an instance currently managed by the DataReader. + * + * The behavior of the @ref read_next_instance_w_condition operation follows the same rules than the read operation + * regarding the pre-conditions and post-conditions for the @c data_values and @c sample_infos collections. Similar + * to read, the @ref read_next_instance_w_condition operation may ‘loan’ elements to the output collections which + * must then be returned by means of @ref return_loan. + * + * If the DataReader has no samples that meet the constraints, the return value will be RETCODE_NO_DATA + * + * @param[in,out] data_values A LoanableCollection object where the received data samples will be returned. + * @param[in,out] sample_infos A SampleInfoSeq object where the received sample info will be returned. + * @param[in] max_samples The maximum number of samples to be returned. If the special value + * @ref LENGTH_UNLIMITED is provided, as many samples will be returned as are + * available, up to the limits described in the documentation for @ref read(). + * @param[in] previous_handle The 'next smallest' instance with a value greater than this value that has + * available samples will be returned. + * @param[in] a_condition A ReadCondition that returned @c sample_states must pass + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t take_next_instance_w_condition( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos, + int32_t max_samples = LENGTH_UNLIMITED, + const InstanceHandle_t& previous_handle = HANDLE_NIL, + ReadCondition* a_condition = nullptr); + + /** + * @brief This operation copies the next, non-previously accessed Data value from the DataReader and ‘removes’ it + * from the DataReader so it is no longer accessible. The operation also copies the corresponding SampleInfo. + * + * This operation is analogous to @ref read_next_sample except for the fact that the sample is ‘removed’ from the + * DataReader. + * + * This operation is semantically equivalent to the @ref take operation where the input sequence has + * max_length = 1 , the sample_states = NOT_READ_SAMPLE_STATE , the + * view_states = ANY_VIEW_STATE , and the instance_states = ANY_INSTANCE_STATE . + * + * This operation provides a simplified API to ’take’ samples avoiding the need for the application to manage + * sequences and specify states. + * + * If there is no unread data in the DataReader, the operation will return RETCODE_NO_DATA and nothing is copied. + * + * @param [out] data Data pointer to store the sample + * @param [out] info SampleInfo pointer to store the sample information + * + * @return Any of the standard return codes. */ RTPS_DllAPI ReturnCode_t take_next_sample( void* data, @@ -178,85 +720,191 @@ class DataReader : public DomainEntity ///@} + /** + * This operation indicates to the DataReader that the application is done accessing the collection of + * @c data_values and @c sample_infos obtained by some earlier invocation of @ref read or @ref take on the + * DataReader. + * + * The @c data_values and @c sample_infos must belong to a single related ‘pair’; that is, they should correspond + * to a pair returned from a single call to read or take. The @c data_values and @c sample_infos must also have + * been obtained from the same DataReader to which they are returned. If either of these conditions is not met, + * the operation will fail and return RETCODE_PRECONDITION_NOT_MET. + * + * This operation allows implementations of the @ref read and @ref take operations to "loan" buffers from the + * DataReader to the application and in this manner provide "zero-copy" access to the data. During the loan, the + * DataReader will guarantee that the data and sample-information are not modified. + * + * It is not necessary for an application to return the loans immediately after the read or take calls. However, + * as these buffers correspond to internal resources inside the DataReader, the application should not retain them + * indefinitely. + * + * The use of the @ref return_loan operation is only necessary if the read or take calls "loaned" buffers to the + * application. This only occurs if the @c data_values and @c sample_infos collections had max_len == 0 + * at the time read or take was called. The application may also examine the @c owns property of the collection to + * determine if there is an outstanding loan. However, calling @ref return_loan on a collection that does not have + * a loan is safe and has no side effects. + * + * If the collections had a loan, upon return from return_loan the collections will have max_len == 0 . + * + * @param [in,out] data_values A LoanableCollection object where the received data samples were obtained from + * an earlier invocation of read or take on this DataReader. + * @param [in,out] sample_infos A SampleInfoSeq object where the received sample infos were obtained from + * an earlier invocation of read or take on this DataReader. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t return_loan( + LoanableCollection& data_values, + SampleInfoSeq& sample_infos); + + /** + * NOT YET IMPLEMENTED + * + * This operation can be used to retrieve the instance key that corresponds to an @c instance_handle. The operation + * will only fill the fields that form the key inside the key_holder instance. + * + * This operation may return BAD_PARAMETER if the InstanceHandle_t a_handle does not correspond to an existing + * data-object known to the DataReader. If the implementation is not able to check invalid handles then the result + * in this situation is unspecified. + * + * @param[in,out] key_holder + * @param[in] handle + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t get_key_value( + void* key_holder, + const InstanceHandle_t& handle); + + /** + * Takes as a parameter an instance and returns a handle that can be used in subsequent operations that accept an + * instance handle as an argument. The instance parameter is only used for the purpose of examining the fields that + * define the key. + * + * @param [in] instance Data pointer to the sample + * + * @return handle of the given @c instance. + * @return HANDLE_NIL if @c instance is nullptr. + * @return HANDLE_NIL if there is no instance on the DataReader's history with the same key as @c instance. + */ + RTPS_DllAPI InstanceHandle_t lookup_instance( + const void* instance) const; + /** * @brief Returns information about the first untaken sample. + * * @param [out] info Pointer to a SampleInfo_t structure to store first untaken sample information. + * * @return RETCODE_OK if sample info was returned. RETCODE_NO_DATA if there is no sample to take. */ RTPS_DllAPI ReturnCode_t get_first_untaken_info( SampleInfo* info); /** - * Get associated GUID + * Get the number of samples pending to be read. + * The number includes samples that may not yet be available to be read or taken by the user, due to samples + * being received out of order. + * + * @return the number of samples on the reader history that have never been read. + */ + RTPS_DllAPI uint64_t get_unread_count() const; + + /** + * Get the number of samples pending to be read. + * + * @param mark_as_read Whether the unread samples should be marked as read or not. + * + * @return the number of samples on the reader history that have never been read. + */ + RTPS_DllAPI uint64_t get_unread_count( + bool mark_as_read) const; + + /** + * Get associated GUID. + * * @return Associated GUID */ RTPS_DllAPI const fastrtps::rtps::GUID_t& guid(); /** - * Get associated GUID + * Get associated GUID. + * * @return Associated GUID */ RTPS_DllAPI const fastrtps::rtps::GUID_t& guid() const; /** - * @brief Getter for the associated InstanceHandle + * @brief Getter for the associated InstanceHandle. + * * @return Copy of the InstanceHandle */ - RTPS_DllAPI fastrtps::rtps::InstanceHandle_t get_instance_handle() const; + RTPS_DllAPI InstanceHandle_t get_instance_handle() const; /** - * Getter for the data type - * @return TypeSupport associated to the DataReader + * Getter for the data type. + * + * @return TypeSupport associated to the DataReader. */ - TypeSupport type(); + RTPS_DllAPI TypeSupport type(); /** - * Get TopicDescription - * @return TopicDescription pointer + * Get TopicDescription. + * + * @return TopicDescription pointer. */ RTPS_DllAPI const TopicDescription* get_topicdescription() const; /** - * @brief Get the requested deadline missed status - * @return The deadline missed status + * @brief Get the requested deadline missed status. + * + * @return The deadline missed status. */ RTPS_DllAPI ReturnCode_t get_requested_deadline_missed_status( - fastrtps::RequestedDeadlineMissedStatus& status); + RequestedDeadlineMissedStatus& status); /** - * @brief Get the requested incompatible qos status - * @param[out] status Requested incompatible qos status + * @brief Get the requested incompatible qos status. + * + * @param [out] status Requested incompatible qos status. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_requested_incompatible_qos_status( RequestedIncompatibleQosStatus& status); /** - * @brief Setter for the DataReaderQos - * @param qos new value for the DataReaderQos - * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not - * self consistent and RETCODE_OK if the qos is changed correctly. + * @brief Setter for the DataReaderQos. + * + * @param [in] qos new value for the DataReaderQos. + * + * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is + * not self consistent and RETCODE_OK if the qos is changed correctly. */ RTPS_DllAPI ReturnCode_t set_qos( const DataReaderQos& qos); /** - * @brief Getter for the DataReaderQos - * @return Pointer to the DataReaderQos + * @brief Getter for the DataReaderQos. + * + * @return Pointer to the DataReaderQos. */ RTPS_DllAPI const DataReaderQos& get_qos() const; /** - * @brief Getter for the DataReaderQos - * @param qos DataReaderQos where the qos is returned + * @brief Getter for the DataReaderQos. + * + * @param [in] qos DataReaderQos where the qos is returned. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_qos( DataReaderQos& qos) const; /** - * Modifies the DataReaderListener, sets the mask to StatusMask::all() - * @param listener new value for the DataReaderListener + * Modifies the DataReaderListener, sets the mask to StatusMask::all(). + * + * @param [in] listener new value for the DataReaderListener. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t set_listener( @@ -264,8 +912,10 @@ class DataReader : public DomainEntity /** * Modifies the DataReaderListener. - * @param listener new value for the DataReaderListener - * @param mask StatusMask that holds statuses the listener responds to (default: all). + * + * @param [in] listener new value for the DataReaderListener. + * @param [in] mask StatusMask that holds statuses the listener responds to (default: all). + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t set_listener( @@ -273,6 +923,7 @@ class DataReader : public DomainEntity const StatusMask& mask); /** * @brief Getter for the DataReaderListener + * * @return Pointer to the DataReaderListener */ RTPS_DllAPI const DataReaderListener* get_listener() const; @@ -280,31 +931,110 @@ class DataReader : public DomainEntity /* TODO RTPS_DllAPI bool get_key_value( void* data, - const fastrtps::rtps::InstanceHandle_t& handle); + const InstanceHandle_t& handle); */ /** - * @brief Get the liveliness changed status - * @param status LivelinessChangedStatus object where the status is returned + * @brief Get the liveliness changed status. + * + * @param [out] status LivelinessChangedStatus object where the status is returned. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_liveliness_changed_status( LivelinessChangedStatus& status) const; - /* TODO - RTPS_DllAPI bool get_requested_incompatible_qos_status( - fastrtps::RequestedIncompatibleQosStatus& status) const; + + /** + * @brief Get the SAMPLE_LOST communication status + * + * @param[out] status SampleLostStatus object where the status is returned. + * + * @return RETCODE_OK */ + RTPS_DllAPI ReturnCode_t get_sample_lost_status( + SampleLostStatus& status) const; - /* TODO - RTPS_DllAPI bool get_sample_lost_status( - fastrtps::SampleLostStatus& status) const; + /** + * @brief Get the SAMPLE_REJECTED communication status + * + * @param[out] status SampleRejectedStatus object where the status is returned. + * + * @return RETCODE_OK */ + RTPS_DllAPI ReturnCode_t get_sample_rejected_status( + SampleRejectedStatus& status) const; - /* TODO - RTPS_DllAPI bool get_sample_rejected_status( - fastrtps::SampleRejectedStatus& status) const; + /** + * @brief Returns the subscription matched status + * + * @param[out] status subscription matched status struct + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_subscription_matched_status( + SubscriptionMatchedStatus& status) const; + + /** + * @brief Retrieves in a publication associated with the DataWriter + * + * @param[out] publication_data publication data struct + * @param publication_handle InstanceHandle_t of the publication + * @return RETCODE_OK + * */ + RTPS_DllAPI ReturnCode_t get_matched_publication_data( + builtin::PublicationBuiltinTopicData& publication_data, + const fastrtps::rtps::InstanceHandle_t& publication_handle) const; + + /** + * @brief Fills the given vector with the InstanceHandle_t of matched DataReaders + * + * @param[out] publication_handles Vector where the InstanceHandle_t are returned + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_matched_publications( + std::vector& publication_handles) const; + + /** + * @brief This operation creates a ReadCondition. The returned ReadCondition will be attached and belong to the + * DataReader. + * + * @param sample_states Vector of SampleStateKind + * @param view_states Vector of ViewStateKind + * @param instance_states Vector of InstanceStateKind + * @return ReadCondition pointer + */ + RTPS_DllAPI ReadCondition* create_readcondition( + const std::vector& sample_states, + const std::vector& view_states, + const std::vector& instance_states); + + /** + * @brief This operation creates a QueryCondition. The returned QueryCondition will be attached and belong to the + * DataReader. + * + * @param sample_states Vector of SampleStateKind + * @param view_states Vector of ViewStateKind + * @param instance_states Vector of InstanceStateKind + * @param query_expression string containing query + * @param query_parameters Vector of strings containing parameters of query expression + * @return QueryCondition pointer + */ + RTPS_DllAPI QueryCondition* create_querycondition( + const std::vector& sample_states, + const std::vector& view_states, + const std::vector& instance_states, + const std::string& query_expression, + const std::vector& query_parameters); + + /** + * @brief This operation deletes a ReadCondition attached to the DataReader. + * + * @param a_condition pointer to a ReadCondition belonging to the DataReader + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t delete_readcondition( + const ReadCondition* a_condition); /** * @brief Getter for the Subscriber @@ -312,10 +1042,41 @@ class DataReader : public DomainEntity */ RTPS_DllAPI const Subscriber* get_subscriber() const; - /* TODO - RTPS_DllAPI bool wait_for_historical_data( - const fastrtps::Duration_t& max_wait) const; + /** + * This operation deletes all the entities that were created by means of the “create” operations on the DataReader. + * That is, it deletes all contained ReadCondition and QueryCondition objects. + * + * The operation will return PRECONDITION_NOT_MET if the any of the contained entities is in a state where it cannot + * be deleted. + * + * @return Any of the standard return codes. + */ + RTPS_DllAPI ReturnCode_t delete_contained_entities(); + + /** + * Checks whether a loaned sample is still valid or is corrupted. + * Calling this method on a sample which has not been loaned, or one for which the loan has been returned + * yields undefined behavior. + * + * @param data Pointer to the sample data to check + * @param info Pointer to the SampleInfo related to \c data + * + * @return true if the sample is valid + */ + RTPS_DllAPI bool is_sample_valid( + const void* data, + const SampleInfo* info) const; + + /** + * Get the list of locators on which this DataReader is listening. + * + * @param [out] locators LocatorList where the list of locators will be stored. + * + * @return NOT_ENABLED if the reader has not been enabled. + * @return OK if a list of locators is returned. */ + RTPS_DllAPI ReturnCode_t get_listening_locators( + rtps::LocatorList& locators) const; protected: @@ -328,5 +1089,5 @@ class DataReader : public DomainEntity } /* namespace dds */ } /* namespace fastdds */ } /* namespace eprosima */ -#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* _FASTRTPS_DATAREADER_HPP_*/ + +#endif /* _FASTDDS_DDS_SUBSCRIBER_DATAREADER_HPP_*/ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/DataReaderListener.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/DataReaderListener.hpp index 3768c3e99..e25f4ebaa 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/DataReaderListener.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/DataReaderListener.hpp @@ -57,6 +57,7 @@ class DataReaderListener /** * Virtual function to be implemented by the user containing the actions to be performed when a new Data Message is received. + * * @param reader DataReader */ RTPS_DllAPI virtual void on_data_available( @@ -67,6 +68,7 @@ class DataReaderListener /** * Virtual method to be called when the subscriber is matched with a new Writer (or unmatched); i.e., when a writer publishing in the same topic is discovered. + * * @param reader DataReader * @param info The subscription matched status */ @@ -80,6 +82,7 @@ class DataReaderListener /** * Virtual method to be called when a topic misses the deadline period + * * @param reader DataReader * @param status The requested deadline missed status */ @@ -93,6 +96,7 @@ class DataReaderListener /** * @brief Method called when the liveliness status associated to a subscriber changes + * * @param reader The DataReader * @param status The liveliness changed status */ @@ -106,6 +110,7 @@ class DataReaderListener /** * @brief Method called when a sample was rejected. + * * @param reader The DataReader * @param status The rejected status */ @@ -119,6 +124,7 @@ class DataReaderListener /** * @brief Method called an incompatible QoS was requested. + * * @param reader The DataReader * @param status The requested incompatible QoS status */ @@ -132,6 +138,7 @@ class DataReaderListener /** * @brief Method called when a sample was lost. + * * @param reader The DataReader * @param status The sample lost status */ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/InstanceState.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/InstanceState.hpp new file mode 100644 index 000000000..15d2b0304 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/InstanceState.hpp @@ -0,0 +1,87 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file InstanceState.hpp + */ + +#ifndef _FASTDDS_DDS_SUBSCRIBER_INSTANCESTATE_HPP_ +#define _FASTDDS_DDS_SUBSCRIBER_INSTANCESTATE_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * Indicates if the samples are from an alive @ref DataWriter or not. + * + * For each instance, the middleware internally maintains an instance state. The instance state + * can be: + * + * @li @ref ALIVE_INSTANCE_STATE indicates that (a) samples have been received for the instance, + * (b) there are alive @ref DataWriter entities writing the instance, and (c) the instance has + * not been explicitly disposed (or else more samples have been received after it was disposed). + * + * @li @ref NOT_ALIVE_DISPOSED_INSTANCE_STATE indicates the instance was explicitly disposed by a + * @ref DataWriter by means of the dispose operation. + * + * @li @ref NOT_ALIVE_NO_WRITERS_INSTANCE_STATE indicates the instance has been declared as + * not-alive by the @ref DataReader because it detected that there are no alive @ref DataWriter + * entities writing that instance. + * + * The precise behavior events that cause the instance state to change depends on the setting of the + * OWNERSHIP QoS: + * + * @li If OWNERSHIP is set to EXCLUSIVE_OWNERSHIP_QOS, then the instance state becomes + * @ref NOT_ALIVE_DISPOSED_INSTANCE_STATE only if the @ref DataWriter that "owns" the instance + * explicitly disposes it. The instance state becomes @ref ALIVE_INSTANCE_STATE again only + * if the @ref DataWriter that owns the instance writes it. + * + * @li If OWNERSHIP is set to SHARED_OWNERSHIP_QOS, then the instance state becomes + * @ref NOT_ALIVE_DISPOSED_INSTANCE_STATE if any @ref DataWriter explicitly disposes the + * instance. The instance state becomes @ref ALIVE_INSTANCE_STATE as soon as any + * @ref DataWriter writes the instance again. + * + * The instance state available in the @ref SampleInfo is a snapshot of the instance state of the + * instance at the time the collection was obtained (i.e. at the time read or take was called). The + * instance state is therefore the same for all samples in the returned collection that refer to the + * same instance. + */ +enum InstanceStateKind : uint16_t +{ + /// Instance is currently in existence. + ALIVE_INSTANCE_STATE = 0x0001 << 0, + /// Not alive disposed instance. The instance has been disposed by a DataWriter. + NOT_ALIVE_DISPOSED_INSTANCE_STATE = 0x0001 << 1, + /// Not alive no writers for instance. None of the @ref DataWriter objects that are + /// currently alive (according to the LIVELINESS QoS) are writing the instance. + NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 0x0001 << 2 +}; + +/// A bit-mask (list) of instance states, i.e. @ref InstanceStateKind +using InstanceStateMask = uint16_t; + +/// Not alive instance state +constexpr InstanceStateMask NOT_ALIVE_INSTANCE_STATE = + NOT_ALIVE_DISPOSED_INSTANCE_STATE | NOT_ALIVE_NO_WRITERS_INSTANCE_STATE; +/// Any instance state +constexpr InstanceStateMask ANY_INSTANCE_STATE = ALIVE_INSTANCE_STATE | NOT_ALIVE_INSTANCE_STATE; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_SUBSCRIBER_INSTANCESTATE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/SampleInfo.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/SampleInfo.hpp index 71f7a1d09..8f9e5ba8d 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/SampleInfo.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/SampleInfo.hpp @@ -17,38 +17,49 @@ * */ -#ifndef _FASTRTPS_SAMPLEINFO_HPP_ -#define _FASTRTPS_SAMPLEINFO_HPP_ +#ifndef _FASTDDS_DDS_SUBSCRIBER_SAMPLEINFO_HPP_ +#define _FASTDDS_DDS_SUBSCRIBER_SAMPLEINFO_HPP_ +#include +#include +#include +#include -#include -#include -#include #include +#include +#include namespace eprosima { namespace fastdds { namespace dds { +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::READ", + "Use eprosima::fastdds::dds::READ_SAMPLE_STATE instead.") +constexpr SampleStateKind READ = READ_SAMPLE_STATE; -enum SampleStateKind -{ - READ, - NOT_READ -}; +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::NOT_READ", + "Use eprosima::fastdds::dds::NOT_READ_SAMPLE_STATE instead.") +constexpr SampleStateKind NOT_READ = NOT_READ_SAMPLE_STATE; -enum ViewStateKind -{ - NEW, - NOT_NEW -}; +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::NEW", + "Use eprosima::fastdds::dds::NEW_VIEW_STATE instead.") +constexpr ViewStateKind NEW = NEW_VIEW_STATE; -enum InstanceStateKind -{ - ALIVE, - NOT_ALIVE_DISPOSED, - NOT_ALIVE_NO_WRITERS -}; +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::NOT_NEW", + "Use eprosima::fastdds::dds::NOT_NEW_VIEW_STATE instead.") +constexpr ViewStateKind NOT_NEW = NOT_NEW_VIEW_STATE; + +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::ALIVE", + "Use eprosima::fastdds::dds::ALIVE_INSTANCE_STATE instead.") +constexpr InstanceStateKind ALIVE = ALIVE_INSTANCE_STATE; + +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::NOT_ALIVE_DISPOSED", + "Use eprosima::fastdds::dds::NOT_ALIVE_DISPOSED_INSTANCE_STATE instead.") +constexpr InstanceStateKind NOT_ALIVE_DISPOSED = NOT_ALIVE_DISPOSED_INSTANCE_STATE; + +FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastdds::dds::NOT_ALIVE_NO_WRITERS", + "Use eprosima::fastdds::dds::NOT_ALIVE_NO_WRITERS_INSTANCE_STATE instead.") +constexpr InstanceStateKind NOT_ALIVE_NO_WRITERS = NOT_ALIVE_NO_WRITERS_INSTANCE_STATE; /*! * @brief SampleInfo is the information that accompanies each sample that is ‘read’ or ‘taken.’ @@ -78,18 +89,21 @@ struct SampleInfo //! the generation difference between the time the sample was received, and the time the most recent sample was received. //! The most recent sample used for the calculation may or may not be in the returned collection - int32_t absoulte_generation_rank; + int32_t absolute_generation_rank; //! time provided by the DataWriter when the sample was written fastrtps::rtps::Time_t source_timestamp; + //! time provided by the DataReader when the sample was added to its history + fastrtps::rtps::Time_t reception_timestamp; + //! identifies locally the corresponding instance - fastrtps::rtps::InstanceHandle_t instance_handle; + InstanceHandle_t instance_handle; //! identifies locally the DataWriter that modified the instance //! //! Is the same InstanceHandle_t that is returned by the operation get_matched_publications on the DataReader - fastrtps::rtps::InstanceHandle_t publication_handle; + InstanceHandle_t publication_handle; //! whether the DataSample contains data or is only used to communicate of a change in the instance bool valid_data; @@ -102,8 +116,8 @@ struct SampleInfo }; -} /* namespace dds */ -} /* namespace fastdds */ -} /* namespace eprosima */ +} // namespace dds +} // namespace fastdds +} // namespace eprosima -#endif /* _FASTRTPS_SAMPLEINFO_HPP_*/ +#endif /* _FASTDDS_DDS_SUBSCRIBER_SAMPLEINFO_HPP_*/ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/SampleState.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/SampleState.hpp new file mode 100644 index 000000000..04d144aaa --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/SampleState.hpp @@ -0,0 +1,60 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file SampleState.hpp + */ + +#ifndef _FASTDDS_DDS_SUBSCRIBER_SAMPLESTATE_HPP_ +#define _FASTDDS_DDS_SUBSCRIBER_SAMPLESTATE_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * Indicates whether or not a sample has ever been read. + * + * For each sample received, the middleware internally maintains a sample state relative to each @ref DataReader. This + * sample state can have the following values: + * + * @li @ref READ_SAMPLE_STATE indicates that the \ref DataReader has already accessed that sample by means of a read + * or take operation + * + * @li @ref NOT_READ_SAMPLE_STATE indicates that the \ref DataReader has not accessed that sample before. + * + * The sample state will, in general, be different for each sample in the collection returned by read or take. + */ +enum SampleStateKind : uint16_t +{ + /// Sample has been read. + READ_SAMPLE_STATE = 0x0001 << 0, + + /// Sample has not been read. + NOT_READ_SAMPLE_STATE = 0x0001 << 1, +}; + +/// A bit-mask (list) of sample states, i.e. @ref SampleStateKind +using SampleStateMask = uint16_t; + +/// Any sample state +constexpr SampleStateMask ANY_SAMPLE_STATE = READ_SAMPLE_STATE | NOT_READ_SAMPLE_STATE; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_SUBSCRIBER_SAMPLESTATE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/Subscriber.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/Subscriber.hpp index 173f4e69c..432134876 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/Subscriber.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/Subscriber.hpp @@ -16,16 +16,19 @@ * @file Subscriber.hpp */ - #ifndef _FASTDDS_SUBSCRIBER_HPP_ #define _FASTDDS_SUBSCRIBER_HPP_ -#include - +#include #include +#include +#include #include +#include +#include +#include +#include #include -#include using eprosima::fastrtps::types::ReturnCode_t; @@ -58,6 +61,7 @@ class TopicDescription; * Class Subscriber, contains the public API that allows the user to control the reception of messages. * This class should not be instantiated directly. * DomainRTPSParticipant class should be used to correctly create this element. + * * @ingroup FASTDDS_MODULE */ class Subscriber : public DomainEntity @@ -71,11 +75,11 @@ class Subscriber : public DomainEntity * Create a subscriber, assigning its pointer to the associated implementation. * Don't use directly, create Subscriber using create_subscriber from DomainParticipant. */ - RTPS_DllAPI Subscriber( + Subscriber( SubscriberImpl* pimpl, const StatusMask& mask = StatusMask::all()); - RTPS_DllAPI Subscriber( + Subscriber( DomainParticipant* dp, const SubscriberQos& qos = SUBSCRIBER_QOS_DEFAULT, SubscriberListener* listener = nullptr, @@ -86,12 +90,13 @@ class Subscriber : public DomainEntity /** * @brief Destructor */ - RTPS_DllAPI virtual ~Subscriber() + virtual ~Subscriber() { } /** * @brief This operation enables the Subscriber + * * @return RETCODE_OK is successfully enabled. RETCODE_PRECONDITION_NOT_MET if the participant creating this * Subscriber is not enabled. */ @@ -99,12 +104,14 @@ class Subscriber : public DomainEntity /** * Allows accessing the Subscriber Qos. + * * @return SubscriberQos reference */ RTPS_DllAPI const SubscriberQos& get_qos() const; /** * Retrieves the Subscriber Qos. + * * @param qos SubscriberQos where the qos is returned * @return RETCODE_OK */ @@ -114,6 +121,7 @@ class Subscriber : public DomainEntity /** * Allows modifying the Subscriber Qos. * The given Qos must be supported by the SubscriberQos. + * * @param qos new value for SubscriberQos * @return RETCODE_IMMUTABLE_POLICY if any of the Qos cannot be changed, RETCODE_INCONSISTENT_POLICY if the Qos is not * self consistent and RETCODE_OK if the qos is changed correctly. @@ -123,12 +131,14 @@ class Subscriber : public DomainEntity /** * Retrieves the attached SubscriberListener. + * * @return Pointer to the SubscriberListener */ RTPS_DllAPI const SubscriberListener* get_listener() const; /** * Modifies the SubscriberListener, sets the mask to StatusMask::all() + * * @param listener new value for SubscriberListener * @return RETCODE_OK */ @@ -137,6 +147,7 @@ class Subscriber : public DomainEntity /** * Modifies the SubscriberListener. + * * @param listener new value for the SubscriberListener * @param mask StatusMask that holds statuses the listener responds to. * @return RETCODE_OK @@ -146,6 +157,7 @@ class Subscriber : public DomainEntity const StatusMask& mask); /** * This operation creates a DataReader. The returned DataReader will be attached and belong to the Subscriber. + * * @param topic Topic the DataReader will be listening. * @param reader_qos QoS of the DataReader. * @param listener Pointer to the listener (default: nullptr) @@ -160,6 +172,7 @@ class Subscriber : public DomainEntity /** * This operation creates a DataReader. The returned DataReader will be attached and belongs to the Subscriber. + * * @param topic Topic the DataReader will be listening. * @param profile_name DataReader profile name. * @param listener Pointer to the listener (default: nullptr) @@ -178,12 +191,13 @@ class Subscriber : public DomainEntity * The delete_datareader operation must be called on the same Subscriber object used to create the DataReader. * If delete_datareader is called on a different Subscriber, the operation will have no effect and it will * return an error. + * * @param reader DataReader to delete * @return RETCODE_PRECONDITION_NOT_MET if the datareader does not belong to this subscriber, RETCODE_OK if it is correctly * deleted and RETCODE_ERROR otherwise. */ RTPS_DllAPI ReturnCode_t delete_datareader( - DataReader* reader); + const DataReader* reader); /** * This operation retrieves a previously-created DataReader belonging to the Subscriber that is attached to a @@ -191,6 +205,7 @@ class Subscriber : public DomainEntity * * If multiple DataReaders attached to the Subscriber satisfy this condition, then the operation will return * one of them. It is not specified which one. + * * @param topic_name Name of the topic associated to the DataReader * @return Pointer to a previously created DataReader created on a Topic with that topic_name */ @@ -199,25 +214,52 @@ class Subscriber : public DomainEntity /** * This operation allows the application to access the DataReader objects. + * * @param readers Vector of DataReader where the list of existing readers is returned * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t get_datareaders( std::vector& readers) const; + /** + * @brief This operation allows the application to access the DataReader objects that contain samples with the + * specified sample_states, view_states, and instance_states. + * + * @param[out] readers Vector of DataReader where the list of existing readers is returned + * @param sample_states Vector of SampleStateKind + * @param view_states Vector of ViewStateKind + * @param instance_states Vector of InstanceStateKind + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_datareaders( + std::vector& readers, + const std::vector& sample_states, + const std::vector& view_states, + const std::vector& instance_states) const; + /** * This operation checks if the subscriber has DataReaders + * * @return true if the subscriber has one or several DataReaders, false in other case */ RTPS_DllAPI bool has_datareaders() const; - /* TODO - bool begin_access(); + /** + * @brief Indicates that the application is about to access the data samples in any of the DataReader objects + * attached to the Subscriber. + * + * @return RETCODE_OK */ + RTPS_DllAPI ReturnCode_t begin_access(); - /* TODO - bool end_access(); + /** + * @brief Indicates that the application has finished accessing the data samples in DataReader objects managed by + * the Subscriber. + * + * @return RETCODE_OK */ + RTPS_DllAPI ReturnCode_t end_access(); + /** * This operation invokes the operation on_data_available on the DataReaderListener objects attached to @@ -225,13 +267,18 @@ class Subscriber : public DomainEntity * * This operation is typically invoked from the on_data_on_readers operation in the SubscriberListener. * That way the SubscriberListener can delegate to the DataReaderListener objects the handling of the data. + * * @return RETCODE_OK */ RTPS_DllAPI ReturnCode_t notify_datareaders() const; - /* TODO - bool delete_contained_entities(); + /** + * @brief Deletes all contained DataReaders. If the DataReaders have any QueryCondition or ReadCondition, they are + * deleted before the DataReader itself. + * + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI ReturnCode_t delete_contained_entities(); /** * This operation sets a default value of the DataReader QoS policies which will be used for newly created @@ -243,6 +290,7 @@ class Subscriber : public DomainEntity * The special value DATAREADER_QOS_DEFAULT may be passed to this operation to indicate that the default QoS * should be reset back to the initial values the factory would use, that is the values that would be used * if the set_default_datareader_qos operation had never been called. + * * @param qos new value for DataReaderQos to set as default * @return RETCODE_INCONSISTENT_POLICY if the Qos is not self consistent and RETCODE_OK if the qos is changed correctly. */ @@ -256,6 +304,7 @@ class Subscriber : public DomainEntity * * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful * call to get_default_datareader_qos, or else, if the call was never made, the default values. + * * @return Current default DataReaderQos. */ RTPS_DllAPI const DataReaderQos& get_default_datareader_qos() const; @@ -268,6 +317,7 @@ class Subscriber : public DomainEntity * * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful * call to get_default_datareader_qos, or else, if the call was never made, the default values. + * * @return Current default DataReaderQos. */ RTPS_DllAPI DataReaderQos& get_default_datareader_qos(); @@ -279,6 +329,7 @@ class Subscriber : public DomainEntity * * The values retrieved get_default_datareader_qos will match the set of values specified on the last successful * call to get_default_datareader_qos, or else, if the call was never made, the default values. + * * @param qos DataReaderQos where the default_qos is returned * @return RETCODE_OK */ @@ -287,6 +338,7 @@ class Subscriber : public DomainEntity /** * Fills the DataReaderQos with the values of the XML profile. + * * @param profile_name DataReader profile name. * @param qos DataReaderQos object where the qos is returned. * @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise. @@ -295,23 +347,30 @@ class Subscriber : public DomainEntity const std::string& profile_name, DataReaderQos& qos) const; - /* TODO - bool copy_from_topic_qos( - DataReaderQos& reader_qos, - const fastrtps::TopicAttributes& topic_qos) const; + /** + * @brief Copies TopicQos into the corresponding DataReaderQos + * + * @param[in, out] reader_qos + * @param[in] topic_qos + * @return RETCODE_OK if successful, an error code otherwise */ + RTPS_DllAPI static ReturnCode_t copy_from_topic_qos( + DataReaderQos& reader_qos, + const TopicQos& topic_qos); /** * This operation returns the DomainParticipant to which the Subscriber belongs. + * * @return DomainParticipant Pointer */ RTPS_DllAPI const DomainParticipant* get_participant() const; /** * Returns the Subscriber's handle. + * * @return InstanceHandle of this Subscriber. */ - RTPS_DllAPI const fastrtps::rtps::InstanceHandle_t& get_instance_handle() const; + RTPS_DllAPI const InstanceHandle_t& get_instance_handle() const; protected: diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/SubscriberListener.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/SubscriberListener.hpp index edf1b200a..080921f06 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/SubscriberListener.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/SubscriberListener.hpp @@ -34,6 +34,7 @@ class Subscriber; /** * Class SubscriberListener, it should be used by the end user to implement specific callbacks to certain actions. * It also inherits all DataReaderListener callbacks. + * * @ingroup FASTDDS_MODULE */ class SubscriberListener : public DataReaderListener @@ -57,6 +58,7 @@ class SubscriberListener : public DataReaderListener /** * Virtual function to be implemented by the user containing the actions to be performed when a new * Data Message is available on any reader. + * * @param sub Subscriber */ RTPS_DllAPI virtual void on_data_on_readers( diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/ViewState.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/ViewState.hpp new file mode 100644 index 000000000..23615fc2a --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/ViewState.hpp @@ -0,0 +1,71 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file ViewState.hpp + */ + +#ifndef _FASTDDS_DDS_SUBSCRIBER_VIEWSTATE_HPP_ +#define _FASTDDS_DDS_SUBSCRIBER_VIEWSTATE_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * Indicates whether or not an instance is new. + * + * For each instance (identified by the key), the middleware internally maintains a view state + * relative to each @ref DataReader. This view state can have the following values: + * + * @li @ref NEW_VIEW_STATE indicates that either this is the first time that the @ref DataReader has + * ever accessed samples of that instance, or else that the @ref DataReader has accessed previous + * samples of the instance, but the instance has since been reborn (i.e. become not-alive and + * then alive again). These two cases are distinguished by examining the + * @ref SampleInfo::disposed_generation_count and the @ref SampleInfo::no_writers_generation_count. + * + * @li @ref NOT_NEW_VIEW_STATE indicates that the @ref DataReader has already accessed samples of the + * same instance and that the instance has not been reborn since. + * + * The view_state available in the @ref SampleInfo is a snapshot of the view state of the instance + * relative to the @ref DataReader used to access the samples at the time the collection was obtained + * (i.e. at the time read or take was called). The view_state is therefore the same for all samples in + * the returned collection that refer to the same instance. + * + * Once an instance has been detected as not having any "live" writers and all the samples associated + * with the instance are "taken" from the DDSDataReader, the middleware can reclaim all local resources + * regarding the instance. Future samples will be treated as "never seen." + */ +enum ViewStateKind : uint16_t +{ + /// New instance.This latest generation of the instance has not previously been accessed. + NEW_VIEW_STATE = 0x0001 << 0, + + /// Not a new instance. This latest generation of the instance has previously been accessed. + NOT_NEW_VIEW_STATE = 0x0001 << 1, +}; + +/// A bit-mask (list) of view states, i.e. @ref ViewStateKind +using ViewStateMask = uint16_t; + +/// Any view state +constexpr ViewStateMask ANY_VIEW_STATE = NEW_VIEW_STATE | NOT_NEW_VIEW_STATE; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_SUBSCRIBER_VIEWSTATE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp index 4721dd05c..87a80a276 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp @@ -84,9 +84,7 @@ class ReaderResourceLimitsQos /** * @brief Constructor */ - RTPS_DllAPI ReaderResourceLimitsQos() - { - } + RTPS_DllAPI ReaderResourceLimitsQos() = default; /** * @brief Destructor @@ -96,7 +94,11 @@ class ReaderResourceLimitsQos bool operator ==( const ReaderResourceLimitsQos& b) const { - return (this->matched_publisher_allocation == b.matched_publisher_allocation); + return + (matched_publisher_allocation == b.matched_publisher_allocation) && + (sample_infos_allocation == b.sample_infos_allocation) && + (outstanding_reads_allocation == b.outstanding_reads_allocation) && + (max_samples_per_read == b.max_samples_per_read); } inline void clear() @@ -105,8 +107,24 @@ class ReaderResourceLimitsQos std::swap(*this, reset); } - //!Matched publishers allocation limits. + //! Matched publishers allocation limits. fastrtps::ResourceLimitedContainerConfig matched_publisher_allocation; + //! SampleInfo allocation limits. + fastrtps::ResourceLimitedContainerConfig sample_infos_allocation{ 32u }; + //! Loaned collections allocation limits. + fastrtps::ResourceLimitedContainerConfig outstanding_reads_allocation{ 2u }; + + /** + * Maximum number of samples to return on a single call to read / take. + * + * This attribute is a signed integer to be consistent with the @c max_samples argument of + * @ref DataReader methods, but should always have a strict positive value. Bear in mind that + * a big number here may cause the creation of the DataReader to fail due to pre-allocation of + * internal resources. + * + * Default value: 32. + */ + int32_t max_samples_per_read = 32; }; //! Qos Policy to configure the XTypes Qos associated to the DataReader @@ -189,7 +207,8 @@ class DataReaderQos (expects_inline_qos_ == b.expects_inline_qos()) && (properties_ == b.properties()) && (endpoint_ == b.endpoint()) && - (reader_resource_limits_ == b.reader_resource_limits()); + (reader_resource_limits_ == b.reader_resource_limits()) && + (data_sharing_ == b.data_sharing()); } RTPS_DllAPI ReaderQos get_readerqos( @@ -197,6 +216,7 @@ class DataReaderQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQosPolicy reference */ RTPS_DllAPI DurabilityQosPolicy& durability() @@ -206,6 +226,7 @@ class DataReaderQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQosPolicy const reference */ RTPS_DllAPI const DurabilityQosPolicy& durability() const @@ -215,6 +236,7 @@ class DataReaderQos /** * Setter for DurabilityQosPolicy + * * @param new_value new value for the DurabilityQosPolicy */ RTPS_DllAPI void durability( @@ -225,6 +247,7 @@ class DataReaderQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQosPolicy reference */ RTPS_DllAPI DeadlineQosPolicy& deadline() @@ -234,6 +257,7 @@ class DataReaderQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQosPolicy const reference */ RTPS_DllAPI const DeadlineQosPolicy& deadline() const @@ -243,6 +267,7 @@ class DataReaderQos /** * Setter for DeadlineQosPolicy + * * @param new_value new value for the DeadlineQosPolicy */ RTPS_DllAPI void deadline( @@ -253,6 +278,7 @@ class DataReaderQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQosPolicy reference */ RTPS_DllAPI LatencyBudgetQosPolicy& latency_budget() @@ -262,6 +288,7 @@ class DataReaderQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQosPolicy const reference */ RTPS_DllAPI const LatencyBudgetQosPolicy& latency_budget() const @@ -271,6 +298,7 @@ class DataReaderQos /** * Setter for LatencyBudgetQosPolicy + * * @param new_value new value for the LatencyBudgetQosPolicy */ RTPS_DllAPI void latency_budget( @@ -281,6 +309,7 @@ class DataReaderQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQosPolicy reference */ RTPS_DllAPI LivelinessQosPolicy& liveliness() @@ -290,6 +319,7 @@ class DataReaderQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQosPolicy const reference */ RTPS_DllAPI const LivelinessQosPolicy& liveliness() const @@ -299,6 +329,7 @@ class DataReaderQos /** * Setter for LivelinessQosPolicy + * * @param new_value new value for the LivelinessQosPolicy */ RTPS_DllAPI void liveliness( @@ -309,6 +340,7 @@ class DataReaderQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQosPolicy reference */ RTPS_DllAPI ReliabilityQosPolicy& reliability() @@ -318,6 +350,7 @@ class DataReaderQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQosPolicy const reference */ RTPS_DllAPI const ReliabilityQosPolicy& reliability() const @@ -327,6 +360,7 @@ class DataReaderQos /** * Setter for ReliabilityQosPolicy + * * @param new_value new value for the ReliabilityQosPolicy */ RTPS_DllAPI void reliability( @@ -337,6 +371,7 @@ class DataReaderQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQosPolicy reference */ RTPS_DllAPI DestinationOrderQosPolicy& destination_order() @@ -346,6 +381,7 @@ class DataReaderQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQosPolicy const reference */ RTPS_DllAPI const DestinationOrderQosPolicy& destination_order() const @@ -355,6 +391,7 @@ class DataReaderQos /** * Setter for DestinationOrderQosPolicy + * * @param new_value new value for the DestinationOrderQosPolicy */ RTPS_DllAPI void destination_order( @@ -365,6 +402,7 @@ class DataReaderQos /** * Getter for HistoryQosPolicy + * * @return HistoryQosPolicy reference */ RTPS_DllAPI HistoryQosPolicy& history() @@ -374,6 +412,7 @@ class DataReaderQos /** * Getter for HistoryQosPolicy + * * @return HistoryQosPolicy const reference */ RTPS_DllAPI const HistoryQosPolicy& history() const @@ -383,6 +422,7 @@ class DataReaderQos /** * Setter for HistoryQosPolicy + * * @param new_value new value for the HistoryQosPolicy */ RTPS_DllAPI void history( @@ -393,6 +433,7 @@ class DataReaderQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQosPolicy reference */ RTPS_DllAPI ResourceLimitsQosPolicy& resource_limits() @@ -402,6 +443,7 @@ class DataReaderQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQosPolicy const reference */ RTPS_DllAPI const ResourceLimitsQosPolicy& resource_limits() const @@ -411,6 +453,7 @@ class DataReaderQos /** * Setter for ResourceLimitsQosPolicy + * * @param new_value new value for the ResourceLimitsQosPolicy */ RTPS_DllAPI void resource_limits( @@ -421,6 +464,7 @@ class DataReaderQos /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy reference */ RTPS_DllAPI UserDataQosPolicy& user_data() @@ -430,6 +474,7 @@ class DataReaderQos /** * Getter for UserDataQosPolicy + * * @return UserDataQosPolicy const reference */ RTPS_DllAPI const UserDataQosPolicy& user_data() const @@ -439,6 +484,7 @@ class DataReaderQos /** * Setter for UserDataQosPolicy + * * @param new_value new value for the UserDataQosPolicy */ RTPS_DllAPI void user_data( @@ -449,6 +495,7 @@ class DataReaderQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQosPolicy reference */ RTPS_DllAPI OwnershipQosPolicy& ownership() @@ -458,6 +505,7 @@ class DataReaderQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQosPolicy const reference */ RTPS_DllAPI const OwnershipQosPolicy& ownership() const @@ -467,6 +515,7 @@ class DataReaderQos /** * Setter for OwnershipQosPolicy + * * @param new_value new value for the OwnershipQosPolicy */ RTPS_DllAPI void ownership( @@ -477,6 +526,7 @@ class DataReaderQos /** * Getter for TimeBasedFilterQosPolicy + * * @return TimeBasedFilterQosPolicy reference */ RTPS_DllAPI TimeBasedFilterQosPolicy& time_based_filter() @@ -486,6 +536,7 @@ class DataReaderQos /** * Getter for TimeBasedFilterQosPolicy + * * @return TimeBasedFilterQosPolicy const reference */ RTPS_DllAPI const TimeBasedFilterQosPolicy& time_based_filter() const @@ -495,6 +546,7 @@ class DataReaderQos /** * Setter for TimeBasedFilterQosPolicy + * * @param new_value new value for the TimeBasedFilterQosPolicy */ RTPS_DllAPI void time_based_filter( @@ -505,6 +557,7 @@ class DataReaderQos /** * Getter for ReaderDataLifecycleQosPolicy + * * @return ReaderDataLifecycleQosPolicy reference */ RTPS_DllAPI ReaderDataLifecycleQosPolicy& reader_data_lifecycle() @@ -514,6 +567,7 @@ class DataReaderQos /** * Getter for ReaderDataLifecycleQosPolicy + * * @return ReaderDataLifecycleQosPolicy const reference */ RTPS_DllAPI const ReaderDataLifecycleQosPolicy& reader_data_lifecycle() const @@ -523,6 +577,7 @@ class DataReaderQos /** * Setter for ReaderDataLifecycleQosPolicy + * * @param new_value new value for the ReaderDataLifecycleQosPolicy */ RTPS_DllAPI void reader_data_lifecycle( @@ -533,6 +588,7 @@ class DataReaderQos /** * Getter for LifespanQosPolicy + * * @return LifespanQosPolicy reference */ RTPS_DllAPI LifespanQosPolicy& lifespan() @@ -542,6 +598,7 @@ class DataReaderQos /** * Getter for LifespanQosPolicy + * * @return LifespanQosPolicy const reference */ RTPS_DllAPI const LifespanQosPolicy& lifespan() const @@ -551,6 +608,7 @@ class DataReaderQos /** * Setter for LifespanQosPolicy + * * @param new_value new value for the LifespanQosPolicy */ RTPS_DllAPI void lifespan( @@ -561,6 +619,7 @@ class DataReaderQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQosPolicy reference */ RTPS_DllAPI DurabilityServiceQosPolicy& durability_service() @@ -570,6 +629,7 @@ class DataReaderQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQosPolicy const reference */ RTPS_DllAPI const DurabilityServiceQosPolicy& durability_service() const @@ -579,6 +639,7 @@ class DataReaderQos /** * Setter for DurabilityServiceQosPolicy + * * @param new_value new value for the DurabilityServiceQosPolicy */ RTPS_DllAPI void durability_service( @@ -589,6 +650,7 @@ class DataReaderQos /** * Getter for RTPSReliableReaderQos + * * @return RTPSReliableReaderQos reference */ RTPS_DllAPI RTPSReliableReaderQos& reliable_reader_qos() @@ -598,6 +660,7 @@ class DataReaderQos /** * Getter for RTPSReliableReaderQos + * * @return RTPSReliableReaderQos const reference */ RTPS_DllAPI const RTPSReliableReaderQos& reliable_reader_qos() const @@ -607,6 +670,7 @@ class DataReaderQos /** * Setter for RTPSReliableReaderQos + * * @param new_value new value for the RTPSReliableReaderQos */ RTPS_DllAPI void reliable_reader_qos( @@ -617,6 +681,7 @@ class DataReaderQos /** * Getter for TypeConsistencyQos + * * @return TypeConsistencyQos reference */ RTPS_DllAPI TypeConsistencyQos& type_consistency() @@ -626,6 +691,7 @@ class DataReaderQos /** * Getter for TypeConsistencyQos + * * @return TypeConsistencyQos const reference */ RTPS_DllAPI const TypeConsistencyQos& type_consistency() const @@ -635,6 +701,7 @@ class DataReaderQos /** * Setter for TypeConsistencyQos + * * @param new_value new value for the TypeConsistencyQos */ RTPS_DllAPI void type_consistency( @@ -644,8 +711,9 @@ class DataReaderQos } /** - * Getter for expectsInlineQos_ - * @return expectsInlineQos_ + * Getter for expectsInlineQos + * + * @return expectsInlineQos */ RTPS_DllAPI bool expects_inline_qos() const { @@ -653,8 +721,9 @@ class DataReaderQos } /** - * Setter for expectsInlineQos_ - * @param new_value new value for the expectsInlineQos_ + * Setter for expectsInlineQos + * + * @param new_value new value for the expectsInlineQos */ RTPS_DllAPI void expects_inline_qos( bool new_value) @@ -664,6 +733,7 @@ class DataReaderQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos reference */ RTPS_DllAPI PropertyPolicyQos& properties() @@ -673,6 +743,7 @@ class DataReaderQos /** * Getter for PropertyPolicyQos + * * @return PropertyPolicyQos const reference */ RTPS_DllAPI const PropertyPolicyQos& properties() const @@ -682,6 +753,7 @@ class DataReaderQos /** * Setter for PropertyPolicyQos + * * @param new_value new value for the PropertyPolicyQos */ RTPS_DllAPI void properties( @@ -692,6 +764,7 @@ class DataReaderQos /** * Getter for RTPSEndpointQos + * * @return RTPSEndpointQos reference */ RTPS_DllAPI RTPSEndpointQos& endpoint() @@ -701,6 +774,7 @@ class DataReaderQos /** * Getter for RTPSEndpointQos + * * @return RTPSEndpointQos const reference */ RTPS_DllAPI const RTPSEndpointQos& endpoint() const @@ -710,6 +784,7 @@ class DataReaderQos /** * Setter for RTPSEndpointQos + * * @param new_value new value for the RTPSEndpointQos */ RTPS_DllAPI void endpoint( @@ -720,6 +795,7 @@ class DataReaderQos /** * Getter for ReaderResourceLimitsQos + * * @return ReaderResourceLimitsQos reference */ RTPS_DllAPI ReaderResourceLimitsQos& reader_resource_limits() @@ -729,6 +805,7 @@ class DataReaderQos /** * Getter for ReaderResourceLimitsQos + * * @return ReaderResourceLimitsQos const reference */ RTPS_DllAPI const ReaderResourceLimitsQos& reader_resource_limits() const @@ -738,6 +815,7 @@ class DataReaderQos /** * Setter for ReaderResourceLimitsQos + * * @param new_value new value for the ReaderResourceLimitsQos */ RTPS_DllAPI void reader_resource_limits( @@ -746,6 +824,37 @@ class DataReaderQos reader_resource_limits_ = new_value; } + /** + * Getter for DataSharingQosPolicy + * + * @return DataSharingQosPolicy reference + */ + RTPS_DllAPI DataSharingQosPolicy& data_sharing() + { + return data_sharing_; + } + + /** + * Getter for DataSharingQosPolicy + * + * @return DataSharingQosPolicy reference + */ + RTPS_DllAPI const DataSharingQosPolicy& data_sharing() const + { + return data_sharing_; + } + + /** + * Setter for DataSharingQosPolicy + * + * @param data_sharing new value for the DataSharingQosPolicy + */ + RTPS_DllAPI void data_sharing( + const DataSharingQosPolicy& data_sharing) + { + data_sharing_ = data_sharing; + } + private: //!Durability Qos, implemented in the library. @@ -808,6 +917,9 @@ class DataReaderQos //!ReaderResourceLimitsQos ReaderResourceLimitsQos reader_resource_limits_; + + //!DataSharing configuration (Extension) + DataSharingQosPolicy data_sharing_; }; RTPS_DllAPI extern const DataReaderQos DATAREADER_QOS_DEFAULT; diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/ReaderQos.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/ReaderQos.hpp index 04fe156d8..3180e0b8f 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/ReaderQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/ReaderQos.hpp @@ -65,7 +65,8 @@ class ReaderQos (m_lifespan == b.m_lifespan) && (m_disablePositiveACKs == b.m_disablePositiveACKs) && (type_consistency == b.type_consistency) && - (representation == b.representation); + (representation == b.representation) && + (data_sharing == b.data_sharing); } //!Durability Qos, implemented in the library. @@ -122,6 +123,9 @@ class ReaderQos //!Disable positive ACKs QoS DisablePositiveACKsQosPolicy m_disablePositiveACKs; + //!Information for data sharing compatibility check. + DataSharingQosPolicy data_sharing; + /** * Set Qos from another class * @param readerqos Reference from a ReaderQos object. diff --git a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp index 12b97e5d1..3f1e029d6 100644 --- a/ThirdParty/ros/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/subscriber/qos/SubscriberQos.hpp @@ -32,6 +32,7 @@ namespace dds { * Although these values can be set and are transmitted * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library. * Please consult each of them to check for implementation details and default values. + * * @ingroup FASTDDS_QOS_MODULE */ class SubscriberQos @@ -63,6 +64,7 @@ class SubscriberQos /** * Getter for PresentationQosPolicy + * * @return PresentationQosPolicy reference */ const PresentationQosPolicy& presentation() const @@ -72,6 +74,7 @@ class SubscriberQos /** * Getter for PresentationQosPolicy + * * @return PresentationQosPolicy reference */ PresentationQosPolicy& presentation() @@ -81,6 +84,7 @@ class SubscriberQos /** * Setter for PresentationQosPolicy + * * @param presentation new value for the PresentationQosPolicy */ void presentation( @@ -91,6 +95,7 @@ class SubscriberQos /** * Getter for PartitionQosPolicy + * * @return PartitionQosPolicy reference */ const PartitionQosPolicy& partition() const @@ -100,6 +105,7 @@ class SubscriberQos /** * Getter for PartitionQosPolicy + * * @return PartitionQosPolicy reference */ PartitionQosPolicy& partition() @@ -109,6 +115,7 @@ class SubscriberQos /** * Setter for PartitionQosPolicy + * * @param partition new value for the PartitionQosPolicy */ void partition( @@ -119,6 +126,7 @@ class SubscriberQos /** * Getter for GroupDataQosPolicy + * * @return GroupDataQosPolicy reference */ const GroupDataQosPolicy& group_data() const @@ -128,6 +136,7 @@ class SubscriberQos /** * Getter for GroupDataQosPolicy + * * @return GroupDataQosPolicy reference */ GroupDataQosPolicy& group_data() @@ -137,6 +146,7 @@ class SubscriberQos /** * Setter for GroupDataQosPolicy + * * @param group_data new value for the GroupDataQosPolicy */ void group_data( @@ -147,6 +157,7 @@ class SubscriberQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ const EntityFactoryQosPolicy& entity_factory() const @@ -156,6 +167,7 @@ class SubscriberQos /** * Getter for EntityFactoryQosPolicy + * * @return EntityFactoryQosPolicy reference */ EntityFactoryQosPolicy& entity_factory() @@ -165,6 +177,7 @@ class SubscriberQos /** * Setter for EntityFactoryQosPolicy + * * @param entity_factory new value for the EntityFactoryQosPolicy */ void entity_factory( diff --git a/ThirdParty/ros/include/fastdds/dds/topic/ContentFilteredTopic.hpp b/ThirdParty/ros/include/fastdds/dds/topic/ContentFilteredTopic.hpp new file mode 100644 index 000000000..c657b7678 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/topic/ContentFilteredTopic.hpp @@ -0,0 +1,145 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file ContentFilteredTopic.hpp + */ + +#ifndef _FASTDDS_DDS_TOPIC_CONTENTFILTEREDTOPIC_HPP_ +#define _FASTDDS_DDS_TOPIC_CONTENTFILTEREDTOPIC_HPP_ + +#include +#include +#include + +#define FASTDDS_SQLFILTER_NAME eprosima::fastdds::dds::sqlfilter_name + +using eprosima::fastrtps::types::ReturnCode_t; + +namespace eprosima { +namespace fastdds { +namespace dds { + +class DomainParticipant; +class DomainParticipantImpl; +class ContentFilteredTopicImpl; + +constexpr const char* const sqlfilter_name = "DDSSQL"; + +/** + * Specialization of TopicDescription that allows for content-based subscriptions. + * + * @ingroup FASTDDS_MODULE + */ +class ContentFilteredTopic : public TopicDescription +{ + friend class DomainParticipantImpl; + +private: + + RTPS_DllAPI ContentFilteredTopic( + const std::string& name, + Topic* related_topic, + const std::string& filter_expression, + const std::vector& expression_parameters); + +public: + + RTPS_DllAPI virtual ~ContentFilteredTopic(); + + /** + * @brief Getter for the related topic. + * + * This operation returns the Topic associated with the ContentFilteredTopic. + * That is, the Topic specified when the ContentFilteredTopic was created. + */ + RTPS_DllAPI Topic* get_related_topic() const; + + /** + * @brief Get the filter expression. + * + * This operation returns filter expression associated with this ContentFilteredTopic. + * It will return the @c filter_expression specified on the last successful call to @c set_expression or, + * if that method is never called, the expression specified when the ContentFilteredTopic was created. + * + * @return the @c filter_expression. + */ + RTPS_DllAPI const std::string& get_filter_expression() const; + + /** + * @brief Get the expression parameters. + * + * This operation returns expression parameters associated with this ContentFilteredTopic. + * These will be the @c expression_parameters specified on the last successful call to @c set_expression or + * @c set_expression_parameters. + * If those methods have never been called, the expression parameters specified when the ContentFilteredTopic + * was created will be returned. + * + * @param [out] expression_parameters The expression parameters currently associated with the + * ContentFilteredTopic. + * + * @return RETCODE_OK + */ + RTPS_DllAPI ReturnCode_t get_expression_parameters( + std::vector& expression_parameters) const; + + /** + * @brief Set the expression parameters. + * + * This operation changes expression parameters associated with this ContentFilteredTopic. + * + * @param [in] expression_parameters The expression parameters to set. + * + * @return RETCODE_OK if the expression parameters where correctly updated. + * @return RETCODE_BAD_PARAMETER if the expression parameters do not match with the current @c filter_expression. + */ + RTPS_DllAPI ReturnCode_t set_expression_parameters( + const std::vector& expression_parameters); + + /** + * @brief Set the filter expression and the expression parameters. + * + * This operation changes the filter expression and the expression parameters associated with this + * ContentFilteredTopic. + * + * @param [in] filter_expression The filter expression to set. + * @param [in] expression_parameters The expression parameters to set. + * + * @return RETCODE_OK if the expression and parameters where correctly updated. + * @return RETCODE_BAD_PARAMETER if @c filter_expression is not valid for this ContentFilteredTopic. + * @return RETCODE_BAD_PARAMETER if the expression parameters do not match with the @c filter_expression. + */ + RTPS_DllAPI ReturnCode_t set_filter_expression( + const std::string& filter_expression, + const std::vector& expression_parameters); + + /** + * @brief Getter for the DomainParticipant + * @return DomainParticipant pointer + */ + DomainParticipant* get_participant() const override; + + TopicDescriptionImpl* get_impl() const override; + +protected: + + ContentFilteredTopicImpl* impl_; + +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_TOPIC_CONTENTFILTEREDTOPIC_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/topic/IContentFilter.hpp b/ThirdParty/ros/include/fastdds/dds/topic/IContentFilter.hpp new file mode 100644 index 000000000..62449bc68 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/topic/IContentFilter.hpp @@ -0,0 +1,78 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file IContentFilter.hpp + */ + +#ifndef _FASTDDS_DDS_TOPIC_ICONTENTFILTER_HPP_ +#define _FASTDDS_DDS_TOPIC_ICONTENTFILTER_HPP_ + +#include + +#include + +#include +#include +#include + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * The interface that content filter objects should implement. + */ +struct IContentFilter +{ + using SerializedPayload = eprosima::fastrtps::rtps::SerializedPayload_t; + using GUID_t = fastrtps::rtps::GUID_t; + + /** + * Selected information from the cache change that is passed to the content filter object on + * payload evaluation. + */ + struct FilterSampleInfo + { + using SampleIdentity = eprosima::fastrtps::rtps::SampleIdentity; + + /// Identity of the sample being filtered. + SampleIdentity sample_identity; + /// Identity of a sample related to the one being filtered. + SampleIdentity related_sample_identity; + }; + + /** + * Evaluate if a serialized payload should be accepted by certain reader. + * + * @param [in] payload The serialized payload of the sample being evaluated. + * @param [in] sample_info The accompanying sample information. + * @param [in] reader_guid The GUID of the reader for which the filter is being evaluated. + * + * @return whether the sample should be accepted for the specified reader. + */ + virtual bool evaluate( + const SerializedPayload& payload, + const FilterSampleInfo& sample_info, + const GUID_t& reader_guid) const = 0; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_TOPIC_ICONTENTFILTER_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/topic/IContentFilterFactory.hpp b/ThirdParty/ros/include/fastdds/dds/topic/IContentFilterFactory.hpp new file mode 100644 index 000000000..598767b1b --- /dev/null +++ b/ThirdParty/ros/include/fastdds/dds/topic/IContentFilterFactory.hpp @@ -0,0 +1,96 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file IContentFilter.hpp + */ + +#ifndef _FASTDDS_DDS_TOPIC_ICONTENTFILTERFACTORY_HPP_ +#define _FASTDDS_DDS_TOPIC_ICONTENTFILTERFACTORY_HPP_ + +#include + +#include +#include +#include + +#include + +namespace eprosima { +namespace fastdds { +namespace dds { + +/** + * The interface that a factory of IContentFilter objects should implement. + */ +struct IContentFilterFactory +{ + using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; + using ParameterSeq = LoanableTypedCollection; + using TypeDescriptor = eprosima::fastrtps::types::TypeDescriptor; + + /** + * Create or update an IContentFilter instance. + * + * @param [in] filter_class_name Filter class name for which the factory is being called. + * Allows using the same factory for different filter classes. + * @param [in] type_name Type name of the topic being filtered. + * @param [in] data_type Type support object of the topic being filtered. + * @param [in] filter_expression Content filter expression. + * May be nullptr when updating the parameters of a filter instance. + * @param [in] filter_parameters Values to set for the filter parameters (%n on the filter expression). + * @param [in, out] filter_instance When a filter is being created, it will be nullptr on input, + * and will have the pointer to the created filter instance on output. + * The caller takes ownership of the filter instance returned. + * When a filter is being updated, it will have a previously returned pointer + * on input. The method takes ownership of the filter instance during its + * execution, and can update the filter instance or even destroy it and + * create a new one. + * The caller takes ownership of the filter instance returned. + * It should always have a valid pointer upon return. + * The original state of the filter instance should be preserved when an + * error is returned. + * + * @return A return code indicating the result of the operation. + */ + virtual ReturnCode_t create_content_filter( + const char* filter_class_name, + const char* type_name, + const TopicDataType* data_type, + const char* filter_expression, + const ParameterSeq& filter_parameters, + IContentFilter*& filter_instance) = 0; + + /** + * Delete an IContentFilter instance. + * + * @param [in] filter_class_name Filter class name for which the factory is being called. + * Allows using the same factory for different filter classes. + * @param [in] filter_instance A pointer to a filter instance previously returned by create_content_filter. + * The factory takes ownership of the filter instance, and can decide to destroy + * it or keep it for future use. + * In case of deletion, note this pointer must be downcasted to the derived class. + * + * @return A return code indicating the result of the operation. + */ + virtual ReturnCode_t delete_content_filter( + const char* filter_class_name, + IContentFilter* filter_instance) = 0; +}; + +} // namespace dds +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_DDS_TOPIC_ICONTENTFILTERFACTORY_HPP_ diff --git a/ThirdParty/ros/include/fastdds/dds/topic/Topic.hpp b/ThirdParty/ros/include/fastdds/dds/topic/Topic.hpp index 6c9d7a46b..da6acfc93 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/Topic.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/Topic.hpp @@ -45,8 +45,9 @@ class DomainParticipantImpl; class TopicImpl; /** - * Class TopicDescription, represents the fact that both publications + * Class Topic, represents the fact that both publications * and subscriptions are tied to a single data-type + * * @ingroup FASTDDS_MODULE */ class Topic : public DomainEntity, public TopicDescription @@ -58,13 +59,13 @@ class Topic : public DomainEntity, public TopicDescription * Create a topic, assigning its pointer to the associated implementation. * Don't use directly, create Topic using create_topic from DomainParticipant. */ - RTPS_DllAPI Topic( + Topic( const std::string& topic_name, const std::string& type_name, TopicImpl* p, const StatusMask& mask = StatusMask::all()); - RTPS_DllAPI Topic( + Topic( DomainParticipant* dp, const std::string& topic_name, const std::string& type_name, @@ -74,19 +75,18 @@ class Topic : public DomainEntity, public TopicDescription public: - /** - * @brief Destructor - */ - RTPS_DllAPI virtual ~Topic(); + virtual ~Topic(); /** * @brief Getter for the DomainParticipant + * * @return DomainParticipant pointer */ virtual DomainParticipant* get_participant() const override; /** * Allows the application to retrieve the INCONSISTENT_TOPIC_STATUS status of a Topic. + * * @param status [out] Status to be retrieved. * @return RETCODE_OK */ @@ -95,12 +95,14 @@ class Topic : public DomainEntity, public TopicDescription /** * Allows accessing the Topic Qos. + * * @return reference to TopicQos */ RTPS_DllAPI const TopicQos& get_qos() const; /** * Retrieves the Topic Qos. + * * @param qos TopicQos where the qos is returned * @return RETCODE_OK */ @@ -110,6 +112,7 @@ class Topic : public DomainEntity, public TopicDescription /** * Allows modifying the Topic Qos. * The given Qos must be supported by the Topic. + * * @param qos new TopicQos value to set for the Topic. * @retval RETCODE_IMMUTABLE_POLICY if a change was not allowed. * @retval RETCODE_INCONSISTENT_POLICY if new qos has inconsistent values. @@ -120,12 +123,14 @@ class Topic : public DomainEntity, public TopicDescription /** * Retrieves the attached TopicListener. + * * @return pointer to TopicListener */ RTPS_DllAPI const TopicListener* get_listener() const; /** * Modifies the TopicListener. + * * @param listener new value for the TopicListener * @param mask StatusMask that holds statuses the listener responds to (default: all). * @return RETCODE_OK @@ -134,10 +139,6 @@ class Topic : public DomainEntity, public TopicDescription TopicListener* listener, const StatusMask& mask = StatusMask::all()); - /** - * @brief Getter for the TopicDescriptionImpl - * @return pointer to TopicDescriptionImpl - */ TopicDescriptionImpl* get_impl() const override; protected: diff --git a/ThirdParty/ros/include/fastdds/dds/topic/TopicDataType.hpp b/ThirdParty/ros/include/fastdds/dds/topic/TopicDataType.hpp index 8e9710980..2afe0b895 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/TopicDataType.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/TopicDataType.hpp @@ -19,14 +19,26 @@ #ifndef _FASTDDS_TOPICDATATYPE_HPP_ #define _FASTDDS_TOPICDATATYPE_HPP_ -#include +#include +#include +#include + #include +#include -#include -#include +#include +#include -namespace eprosima { +// This version of TypeSupport has `is_bounded()` +#define TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + +// This version of TypeSupport has `is_plain()` +#define TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + +// This version of TypeSupport has `construct_sample()` +#define TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE +namespace eprosima { namespace fastrtps { namespace rtps { @@ -70,6 +82,7 @@ class TopicDataType /** * Serialize method, it should be implemented by the user, since it is abstract. * It is VERY IMPORTANT that the user sets the SerializedPayload length correctly. + * * @param[in] data Pointer to the data * @param[out] payload Pointer to the payload * @return True if correct. @@ -80,6 +93,7 @@ class TopicDataType /** * Deserialize method, it should be implemented by the user, since it is abstract. + * * @param[in] payload Pointer to the payload * @param[out] data Pointer to the data * @return True if correct. @@ -90,6 +104,7 @@ class TopicDataType /** * @brief Gets the SerializedSizeProvider function + * * @param data Pointer * @return function */ @@ -98,11 +113,13 @@ class TopicDataType /** * Create a Data Type. + * * @return Void pointer to the created object. */ RTPS_DllAPI virtual void* createData() = 0; /** * Remove a previously created object. + * * @param data Pointer to the created Data. */ RTPS_DllAPI virtual void deleteData( @@ -110,6 +127,7 @@ class TopicDataType /** * Get the key associated with the data. + * * @param[in] data Pointer to the data. * @param[out] ihandle Pointer to the Handle. * @param[in] force_md5 Force MD5 checking. @@ -122,6 +140,7 @@ class TopicDataType /** * Set topic data type name + * * @param nam Topic data type name */ RTPS_DllAPI inline void setName( @@ -132,6 +151,7 @@ class TopicDataType /** * Get topic data type name + * * @return Topic data type name */ RTPS_DllAPI inline const char* getName() const @@ -141,6 +161,7 @@ class TopicDataType /** * Get the type object auto-fill configuration + * * @return true if the type object should be auto-filled */ RTPS_DllAPI inline bool auto_fill_type_object() const @@ -150,6 +171,7 @@ class TopicDataType /** * Set the type object auto-fill configuration + * * @param auto_fill_type_object new value to set */ RTPS_DllAPI inline void auto_fill_type_object( @@ -160,6 +182,7 @@ class TopicDataType /** * Get the type information auto-fill configuration + * * @return true if the type information should be auto-filled */ RTPS_DllAPI inline bool auto_fill_type_information() const @@ -169,6 +192,7 @@ class TopicDataType /** * Set type information auto-fill configuration + * * @param auto_fill_type_information new value to set */ RTPS_DllAPI inline void auto_fill_type_information( @@ -179,6 +203,7 @@ class TopicDataType /** * Get the type identifier + * * @return TypeIdV1 */ RTPS_DllAPI inline const std::shared_ptr type_identifier() const @@ -188,6 +213,7 @@ class TopicDataType /** * Set type identifier + * * @param id new value for TypeIdV1 */ RTPS_DllAPI inline void type_identifier( @@ -198,6 +224,7 @@ class TopicDataType /** * Set type identifier + * * @param id shared pointer to TypeIdV1 */ RTPS_DllAPI inline void type_identifier( @@ -208,6 +235,7 @@ class TopicDataType /** * Get the type object + * * @return TypeObjectV1 */ RTPS_DllAPI inline const std::shared_ptr type_object() const @@ -217,6 +245,7 @@ class TopicDataType /** * Set type object + * * @param object new value for TypeObjectV1 */ RTPS_DllAPI inline void type_object( @@ -227,6 +256,7 @@ class TopicDataType /** * Set type object + * * @param object shared pointer to TypeObjectV1 */ RTPS_DllAPI inline void type_object( @@ -237,6 +267,7 @@ class TopicDataType /** * Get the type information + * * @return TypeInformation */ RTPS_DllAPI inline const std::shared_ptr type_information() const @@ -246,6 +277,7 @@ class TopicDataType /** * Set type information + * * @param info new value for TypeInformation */ RTPS_DllAPI inline void type_information( @@ -256,6 +288,7 @@ class TopicDataType /** * Set type information + * * @param info shared pointer to TypeInformation */ RTPS_DllAPI inline void type_information( @@ -264,6 +297,36 @@ class TopicDataType type_information_ = std::move(info); } + /** + * Checks if the type is bounded. + */ + RTPS_DllAPI virtual inline bool is_bounded() const + { + return false; + } + + /** + * Checks if the type is plain. + */ + RTPS_DllAPI virtual inline bool is_plain() const + { + return false; + } + + /** + * Construct a sample on a memory location. + * + * @param memory Pointer to the memory location where the sample should be constructed. + * + * @return whether this type supports in-place construction or not. + */ + RTPS_DllAPI virtual inline bool construct_sample( + void* memory) const + { + static_cast(memory); + return false; + } + //! Maximum serialized size of the type in bytes. //! If the type has unbounded fields, and therefore cannot have a maximum size, use 0. uint32_t m_typeSize; diff --git a/ThirdParty/ros/include/fastdds/dds/topic/TopicDescription.hpp b/ThirdParty/ros/include/fastdds/dds/topic/TopicDescription.hpp index bf6a71754..656e70b66 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/TopicDescription.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/TopicDescription.hpp @@ -31,6 +31,7 @@ class TopicDescriptionImpl; /** * Class TopicDescription, represents the fact that both publications * and subscriptions are tied to a single data-type + * * @ingroup FASTDDS_MODULE */ class TopicDescription @@ -39,12 +40,14 @@ class TopicDescription /** * Get the DomainParticipant to which the TopicDescription belongs. + * * @return The DomainParticipant to which the TopicDescription belongs. */ virtual DomainParticipant* get_participant() const = 0; /** * Get the name used to create this TopicDescription. + * * @return the name used to create this TopicDescription. */ const std::string& get_name() const @@ -54,6 +57,7 @@ class TopicDescription /** * Get the associated type name. + * * @return the type name. */ const std::string& get_type_name() const @@ -61,19 +65,10 @@ class TopicDescription return type_name_; } - /** - * Get the TopicDescriptionImpl - * @return pointer to TopicDescriptionImpl - */ virtual TopicDescriptionImpl* get_impl() const = 0; protected: - /** - * @brief Constructor using topic name and data type name - * @param name Name for the topic - * @param type_name Data type name - */ TopicDescription( const std::string& name, const std::string& type_name) @@ -82,9 +77,6 @@ class TopicDescription { } - /** - * @brief Destructor - */ virtual ~TopicDescription() { } diff --git a/ThirdParty/ros/include/fastdds/dds/topic/TopicListener.hpp b/ThirdParty/ros/include/fastdds/dds/topic/TopicListener.hpp index e61d1b3f3..61344fc52 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/TopicListener.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/TopicListener.hpp @@ -30,6 +30,7 @@ class Topic; /** * Class TopicListener, it should be used by the end user to implement specific callbacks to certain actions. + * * @ingroup FASTDDS_MODULE */ class RTPS_DllAPI TopicListener @@ -53,6 +54,7 @@ class RTPS_DllAPI TopicListener /** * Virtual function to be implemented by the user containing the actions to be performed when * another topic exists with the same name but different characteristics. + * * @param topic Topic * @param status The inconsistent topic status */ diff --git a/ThirdParty/ros/include/fastdds/dds/topic/TypeSupport.hpp b/ThirdParty/ros/include/fastdds/dds/topic/TypeSupport.hpp index d0e2ca8f9..a48ddaacc 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/TypeSupport.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/TypeSupport.hpp @@ -20,6 +20,7 @@ #define _FASTDDS_TYPE_SUPPORT_HPP_ #include +#include #include #include @@ -48,34 +49,50 @@ class TypeSupport : public std::shared_ptr using ReturnCode_t = eprosima::fastrtps::types::ReturnCode_t; using Base = std::shared_ptr; - using Base::operator ->; - using Base::operator *; - using Base::operator bool; - using Base::operator =; /** * @brief Constructor */ - RTPS_DllAPI TypeSupport() - : std::shared_ptr(nullptr) - { - } + RTPS_DllAPI TypeSupport() noexcept = default; /** * @brief Copy Constructor + * * @param type Another instance of TypeSupport */ RTPS_DllAPI TypeSupport( - const TypeSupport& type) - : std::shared_ptr(type) - { - } + const TypeSupport& type) noexcept = default; + + /** + * @brief Move Constructor + * + * @param type Another instance of TypeSupport + */ + RTPS_DllAPI TypeSupport( + TypeSupport&& type) noexcept = default; + + /** + * @brief Copy Assignment + * + * @param type Another instance of TypeSupport + */ + RTPS_DllAPI TypeSupport& operator = ( + const TypeSupport& type) noexcept = default; + + /** + * @brief Move Assignment + * + * @param type Another instance of TypeSupport + */ + RTPS_DllAPI TypeSupport& operator = ( + TypeSupport&& type) noexcept = default; /*! - * \brief TypeSupport constructor that receives a TopicDataType pointer. + * @brief TypeSupport constructor that receives a TopicDataType pointer. * The passed pointer will be managed by the TypeSupport object, so creating two TypeSupport * from the same pointer or deleting the passed pointer will produce a runtime error. - * \param ptr + * + * @param ptr */ RTPS_DllAPI explicit TypeSupport( fastdds::dds::TopicDataType* ptr) @@ -84,9 +101,10 @@ class TypeSupport : public std::shared_ptr } /*! - * \brief TypeSupport constructor that receives a DynamicPubSubType. + * @brief TypeSupport constructor that receives a DynamicPubSubType. * It will copy the instance so the user will keep the ownership of his object. - * \param ptr + * + * @param ptr */ RTPS_DllAPI TypeSupport( fastrtps::types::DynamicPubSubType ptr) @@ -97,6 +115,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Registers the type on a participant + * * @param participant DomainParticipant where the type is going to be registered * @return RETCODE_BAD_PARAMETER if the type name is empty, RETCODE_PRECONDITION_NOT_MET if there is another type with * the same name registered on the DomainParticipant and RETCODE_OK if it is registered correctly @@ -106,6 +125,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Registers the type on a participant + * * @param participant DomainParticipant where the type is going to be registered * @param type_name Name of the type to register * @return RETCODE_BAD_PARAMETER if the type name is empty, RETCODE_PRECONDITION_NOT_MET if there is another type with @@ -117,6 +137,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Getter for the type name + * * @return name of the data type */ RTPS_DllAPI virtual const std::string& get_type_name() const @@ -126,32 +147,29 @@ class TypeSupport : public std::shared_ptr /** * @brief Serializes the data + * * @param data Pointer to data * @param payload Pointer to payload * @return true if it is serialized correctly, false if not */ RTPS_DllAPI virtual bool serialize( void* data, - fastrtps::rtps::SerializedPayload_t* payload) - { - return get()->serialize(data, payload); - } + fastrtps::rtps::SerializedPayload_t* payload); /** * @brief Deserializes the data + * * @param payload Pointer to payload * @param data Pointer to data * @return true if it is deserialized correctly, false if not */ RTPS_DllAPI virtual bool deserialize( fastrtps::rtps::SerializedPayload_t* payload, - void* data) - { - return get()->deserialize(payload, data); - } + void* data); /** * @brief Getter for the SerializedSizeProvider + * * @param data Pointer to data * @return function */ @@ -163,6 +181,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Creates new data + * * @return Pointer to the data */ RTPS_DllAPI virtual void* create_data() @@ -172,6 +191,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Deletes data + * * @param data Pointer to the data to delete */ RTPS_DllAPI virtual void delete_data( @@ -182,6 +202,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Getter for the data key + * * @param data Pointer to data * @param i_handle InstanceHandle pointer to store the key * @param force_md5 boolean to force md5 (default: false) @@ -189,7 +210,7 @@ class TypeSupport : public std::shared_ptr */ RTPS_DllAPI virtual bool get_key( void* data, - fastrtps::rtps::InstanceHandle_t* i_handle, + InstanceHandle_t* i_handle, bool force_md5 = false) { return get()->getKey(data, i_handle, force_md5); @@ -208,6 +229,7 @@ class TypeSupport : public std::shared_ptr /** * @brief Check if the TypeSupport is empty + * * @return true if empty, false if not */ RTPS_DllAPI bool empty() const @@ -215,6 +237,34 @@ class TypeSupport : public std::shared_ptr return get() == nullptr; } + /** + * Checks if the type is bounded. + */ + RTPS_DllAPI virtual inline bool is_bounded() const + { + return get()->is_bounded(); + } + + /** + * Checks if the type is plain. + */ + RTPS_DllAPI virtual inline bool is_plain() const + { + return get()->is_plain(); + } + + RTPS_DllAPI bool operator !=( + std::nullptr_t) const + { + return bool(*this); + } + + RTPS_DllAPI bool operator ==( + std::nullptr_t) const + { + return !*this; + } + }; } /* namespace dds */ diff --git a/ThirdParty/ros/include/fastdds/dds/topic/qos/TopicQos.hpp b/ThirdParty/ros/include/fastdds/dds/topic/qos/TopicQos.hpp index 3653cfc65..0c64050bd 100644 --- a/ThirdParty/ros/include/fastdds/dds/topic/qos/TopicQos.hpp +++ b/ThirdParty/ros/include/fastdds/dds/topic/qos/TopicQos.hpp @@ -34,6 +34,7 @@ namespace dds { * Although these values can be set and are transmitted * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library. * Please consult each of them to check for implementation details and default values. + * * @ingroup FASTDDS_QOS_MODULE */ class TopicQos @@ -65,6 +66,7 @@ class TopicQos /** * Getter for TopicDataQosPolicy + * * @return TopicDataQos reference */ const TopicDataQosPolicy& topic_data() const @@ -74,6 +76,7 @@ class TopicQos /** * Getter for TopicDataQosPolicy + * * @return TopicDataQos reference */ TopicDataQosPolicy& topic_data() @@ -83,6 +86,7 @@ class TopicQos /** * Setter for TopicDataQosPolicy + * * @param value new value for the TopicDataQosPolicy */ void topic_data( @@ -93,6 +97,7 @@ class TopicQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQos reference */ const DurabilityQosPolicy& durability() const @@ -102,6 +107,7 @@ class TopicQos /** * Getter for DurabilityQosPolicy + * * @return DurabilityQos reference */ DurabilityQosPolicy& durability() @@ -111,6 +117,7 @@ class TopicQos /** * Setter for DurabilityQosPolicy + * * @param durability new value for the DurabilityQosPolicy */ void durability( @@ -121,6 +128,7 @@ class TopicQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQos reference */ const DurabilityServiceQosPolicy& durability_service() const @@ -130,6 +138,7 @@ class TopicQos /** * Getter for DurabilityServiceQosPolicy + * * @return DurabilityServiceQos reference */ DurabilityServiceQosPolicy& durability_service() @@ -139,6 +148,7 @@ class TopicQos /** * Setter for DurabilityServiceQosPolicy + * * @param durability_service new value for the DurabilityServiceQosPolicy */ void durability_service( @@ -149,6 +159,7 @@ class TopicQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQos reference */ const DeadlineQosPolicy& deadline() const @@ -158,6 +169,7 @@ class TopicQos /** * Getter for DeadlineQosPolicy + * * @return DeadlineQos reference */ DeadlineQosPolicy& deadline() @@ -167,6 +179,7 @@ class TopicQos /** * Setter for DeadlineQosPolicy + * * @param deadline new value for the DeadlineQosPolicy */ void deadline( @@ -177,6 +190,7 @@ class TopicQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQos reference */ const LatencyBudgetQosPolicy& latency_budget() const @@ -186,6 +200,7 @@ class TopicQos /** * Getter for LatencyBudgetQosPolicy + * * @return LatencyBudgetQos reference */ LatencyBudgetQosPolicy& latency_budget() @@ -195,6 +210,7 @@ class TopicQos /** * Setter for LatencyBudgetQosPolicy + * * @param latency_budget new value for the LatencyBudgetQosPolicy */ void latency_budget( @@ -205,6 +221,7 @@ class TopicQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQos reference */ const LivelinessQosPolicy& liveliness() const @@ -214,6 +231,7 @@ class TopicQos /** * Getter for LivelinessQosPolicy + * * @return LivelinessQos reference */ LivelinessQosPolicy& liveliness() @@ -223,6 +241,7 @@ class TopicQos /** * Setter for LivelinessQosPolicy + * * @param liveliness new value for the LivelinessQosPolicy */ void liveliness( @@ -233,6 +252,7 @@ class TopicQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQos reference */ const ReliabilityQosPolicy& reliability() const @@ -242,6 +262,7 @@ class TopicQos /** * Getter for ReliabilityQosPolicy + * * @return ReliabilityQos reference */ ReliabilityQosPolicy& reliability() @@ -251,6 +272,7 @@ class TopicQos /** * Setter for ReliabilityQosPolicy + * * @param reliability new value for the ReliabilityQosPolicy */ void reliability( @@ -261,6 +283,7 @@ class TopicQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQos reference */ const DestinationOrderQosPolicy& destination_order() const @@ -270,6 +293,7 @@ class TopicQos /** * Getter for DestinationOrderQosPolicy + * * @return DestinationOrderQos reference */ DestinationOrderQosPolicy& destination_order() @@ -279,6 +303,7 @@ class TopicQos /** * Setter for DestinationOrderQosPolicy + * * @param destination_order new value for the DestinationOrderQosPolicy */ void destination_order( @@ -289,6 +314,7 @@ class TopicQos /** * Getter for HistoryQosPolicy + * * @return HistoryQos reference */ const HistoryQosPolicy& history() const @@ -298,6 +324,7 @@ class TopicQos /** * Getter for HistoryQosPolicy + * * @return HistoryQos reference */ HistoryQosPolicy& history() @@ -307,6 +334,7 @@ class TopicQos /** * Setter for HistoryQosPolicy + * * @param history new value for the HistoryQosPolicy */ void history( @@ -317,6 +345,7 @@ class TopicQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQos reference */ const ResourceLimitsQosPolicy& resource_limits() const @@ -326,6 +355,7 @@ class TopicQos /** * Getter for ResourceLimitsQosPolicy + * * @return ResourceLimitsQos reference */ ResourceLimitsQosPolicy& resource_limits() @@ -335,6 +365,7 @@ class TopicQos /** * Setter for ResourceLimitsQosPolicy + * * @param resource_limits new value for the ResourceLimitsQosPolicy */ void resource_limits( @@ -345,6 +376,7 @@ class TopicQos /** * Getter for TransportPriorityQosPolicy + * * @return TransportPriorityQos reference */ const TransportPriorityQosPolicy& transport_priority() const @@ -354,6 +386,7 @@ class TopicQos /** * Getter for TransportPriorityQosPolicy + * * @return TransportPriorityQos reference */ TransportPriorityQosPolicy& transport_priority() @@ -363,6 +396,7 @@ class TopicQos /** * Setter for TransportPriorityQosPolicy + * * @param transport_priority new value for the TransportPriorityQosPolicy */ void transport_priority( @@ -373,6 +407,7 @@ class TopicQos /** * Getter for LifespanQosPolicy + * * @return LifespanQos reference */ const LifespanQosPolicy& lifespan() const @@ -382,6 +417,7 @@ class TopicQos /** * Getter for LifespanQosPolicy + * * @return LifespanQos reference */ LifespanQosPolicy& lifespan() @@ -391,6 +427,7 @@ class TopicQos /** * Setter for LifespanQosPolicy + * * @param lifespan new value for the LifespanQosPolicy */ void lifespan( @@ -401,6 +438,7 @@ class TopicQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQos reference */ const OwnershipQosPolicy& ownership() const @@ -410,6 +448,7 @@ class TopicQos /** * Getter for OwnershipQosPolicy + * * @return OwnershipQos reference */ OwnershipQosPolicy& ownership() @@ -419,6 +458,7 @@ class TopicQos /** * Setter for OwnershipQosPolicy + * * @param ownership new value for the OwnershipQosPolicy */ void ownership( @@ -429,6 +469,7 @@ class TopicQos /** * Getter for DataRepresentationQosPolicy + * * @return DataRepresentationQosPolicy reference */ const DataRepresentationQosPolicy& representation() const @@ -438,6 +479,7 @@ class TopicQos /** * Getter for DataRepresentationQosPolicy + * * @return DataRepresentationQosPolicy reference */ DataRepresentationQosPolicy& representation() @@ -447,6 +489,7 @@ class TopicQos /** * Setter for DataRepresentationQosPolicy + * * @param representation new value for the DataRepresentationQosPolicy */ void representation( diff --git a/ThirdParty/ros/include/fastdds/rtps/Endpoint.h b/ThirdParty/ros/include/fastdds/rtps/Endpoint.h index c2a268768..e33588c0b 100644 --- a/ThirdParty/ros/include/fastdds/rtps/Endpoint.h +++ b/ThirdParty/ros/include/fastdds/rtps/Endpoint.h @@ -51,6 +51,8 @@ class Endpoint protected: + Endpoint() = default; + Endpoint( RTPSParticipantImpl* pimpl, const GUID_t& guid, diff --git a/ThirdParty/ros/include/fastdds/rtps/RTPSDomain.h b/ThirdParty/ros/include/fastdds/rtps/RTPSDomain.h index a8b3b0e37..05a206f47 100644 --- a/ThirdParty/ros/include/fastdds/rtps/RTPSDomain.h +++ b/ThirdParty/ros/include/fastdds/rtps/RTPSDomain.h @@ -19,15 +19,14 @@ #ifndef _FASTDDS_RTPS_DOMAIN_H_ #define _FASTDDS_RTPS_DOMAIN_H_ -#include -#include - -#include - #include #include #include +#include +#include +#include + namespace eprosima { namespace fastrtps { namespace rtps { @@ -47,7 +46,7 @@ class RTPSDomainImpl; /** * Class RTPSDomain,it manages the creation and destruction of RTPSParticipant RTPSWriter and RTPSReader. It stores - * a list of all created RTPSParticipant. Is has only static methods. + * a list of all created RTPSParticipant. It has only static methods. * @ingroup RTPS_MODULE */ class RTPSDomain @@ -61,6 +60,9 @@ class RTPSDomain * Method to shut down all RTPSParticipants, readers, writers, etc. * It must be called at the end of the process to avoid memory leaks. * It also shut downs the DomainRTPSParticipant. + * + * \post After this call, all the pointers to RTPS entities are invalidated and their use may + * result in undefined behaviour. */ RTPS_DllAPI static void stopAll(); @@ -70,6 +72,9 @@ class RTPSDomain * @param attrs RTPSParticipant Attributes. * @param plisten Pointer to the ParticipantListener. * @return Pointer to the RTPSParticipant. + * + * \warning The returned pointer is invalidated after a call to removeRTPSParticipant() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSParticipant* createParticipant( uint32_t domain_id, @@ -83,6 +88,9 @@ class RTPSDomain * @param attrs RTPSParticipant Attributes. * @param plisten Pointer to the ParticipantListener. * @return Pointer to the RTPSParticipant. + * + * \warning The returned pointer is invalidated after a call to removeRTPSParticipant() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSParticipant* createParticipant( uint32_t domain_id, @@ -97,6 +105,9 @@ class RTPSDomain * @param hist Pointer to the WriterHistory. * @param listen Pointer to the WriterListener. * @return Pointer to the created RTPSWriter. + * + * \warning The returned pointer is invalidated after a call to removeRTPSWriter() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSWriter* createRTPSWriter( RTPSParticipant* p, @@ -112,6 +123,9 @@ class RTPSDomain * @param hist Pointer to the WriterHistory. * @param listen Pointer to the WriterListener. * @return Pointer to the created RTPSWriter. + * + * \warning The returned pointer is invalidated after a call to removeRTPSWriter() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSWriter* createRTPSWriter( RTPSParticipant* p, @@ -120,6 +134,27 @@ class RTPSDomain WriterHistory* hist, WriterListener* listen = nullptr); + /** + * Create a RTPSWriter in a participant. + * @param p Pointer to the RTPSParticipant. + * @param entity_id Specific entity id to use for the created writer. + * @param watt Writer Attributes. + * @param payload_pool Shared pointer to the IPayloadPool + * @param hist Pointer to the WriterHistory. + * @param listen Pointer to the WriterListener. + * @return Pointer to the created RTPSWriter. + * + * \warning The returned pointer is invalidated after a call to removeRTPSWriter() or stopAll(), + * so its use may result in undefined behaviour. + */ + RTPS_DllAPI static RTPSWriter* createRTPSWriter( + RTPSParticipant* p, + const EntityId_t& entity_id, + WriterAttributes& watt, + const std::shared_ptr& payload_pool, + WriterHistory* hist, + WriterListener* listen = nullptr); + /** * Remove a RTPSWriter. * @param writer Pointer to the writer you want to remove. @@ -135,6 +170,9 @@ class RTPSDomain * @param hist Pointer to the ReaderHistory. * @param listen Pointer to the ReaderListener. * @return Pointer to the created RTPSReader. + * + * \warning The returned pointer is invalidated after a call to removeRTPSReader() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSReader* createRTPSReader( RTPSParticipant* p, @@ -143,16 +181,40 @@ class RTPSDomain ReaderListener* listen = nullptr); /** - * Create a RTPSWriter in a participant using a custom payload pool. + * Create a RTPReader in a participant using a custom payload pool. + * @param p Pointer to the RTPSParticipant. + * @param ratt Reader Attributes. + * @param payload_pool Shared pointer to the IPayloadPool + * @param hist Pointer to the ReaderHistory. + * @param listen Pointer to the ReaderListener. + * @return Pointer to the created RTPSReader. + * + * \warning The returned pointer is invalidated after a call to removeRTPSReader() or stopAll(), + * so its use may result in undefined behaviour. + */ + RTPS_DllAPI static RTPSReader* createRTPSReader( + RTPSParticipant* p, + ReaderAttributes& ratt, + const std::shared_ptr& payload_pool, + ReaderHistory* hist, + ReaderListener* listen = nullptr); + + /** + * Create a RTPSReader in a participant using a custom payload pool. * @param p Pointer to the RTPSParticipant. + * @param entity_id Specific entity id to use for the created reader. * @param ratt Reader Attributes. * @param payload_pool Shared pointer to the IPayloadPool * @param hist Pointer to the ReaderHistory. * @param listen Pointer to the ReaderListener. * @return Pointer to the created RTPSReader. + * + * \warning The returned pointer is invalidated after a call to removeRTPSReader() or stopAll(), + * so its use may result in undefined behaviour. */ RTPS_DllAPI static RTPSReader* createRTPSReader( RTPSParticipant* p, + const EntityId_t& entity_id, ReaderAttributes& ratt, const std::shared_ptr& payload_pool, ReaderHistory* hist, @@ -191,6 +253,9 @@ class RTPSDomain * @param attrs RTPSParticipant Attributes. * @param listen Pointer to the ParticipantListener. * @return Pointer to the RTPSParticipant. + * + * \warning The returned pointer is invalidated after a call to removeRTPSParticipant() or stopAll(), + * so its use may result in undefined behaviour. */ static RTPSParticipant* clientServerEnvironmentCreationOverride( uint32_t domain_id, diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/EndpointAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/EndpointAttributes.h index e350bcac3..3f9cb8a0c 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/EndpointAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/EndpointAttributes.h @@ -20,6 +20,7 @@ #define _FASTDDS_ENDPOINTATTRIBUTES_H_ #include +#include #include #include @@ -77,6 +78,7 @@ class EndpointAttributes , m_userDefinedID(-1) , m_entityID(-1) { + datasharing_.off(); } virtual ~EndpointAttributes() @@ -106,7 +108,7 @@ class EndpointAttributes * @param id User defined ID to be set */ inline void setUserDefinedID( - uint8_t id) + int16_t id) { m_userDefinedID = id; } @@ -116,11 +118,30 @@ class EndpointAttributes * @param id Entity ID to be set */ inline void setEntityID( - uint8_t id) + int16_t id) { m_entityID = id; } + /** + * Set the DataSharing configuration + * @param cfg Configuration to be set + */ + inline void set_data_sharing_configuration( + DataSharingQosPolicy cfg) + { + datasharing_ = cfg; + } + + /** + * Get the DataSharing configuration + * @return Configuration of data sharing + */ + inline const DataSharingQosPolicy& data_sharing_configuration() const + { + return datasharing_; + } + #if HAVE_SECURITY const security::EndpointSecurityAttributes& security_attributes() const { @@ -145,6 +166,8 @@ class EndpointAttributes #if HAVE_SECURITY security::EndpointSecurityAttributes security_attributes_; #endif // HAVE_SECURITY + + DataSharingQosPolicy datasharing_; }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/HistoryAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/HistoryAttributes.h index 6e6e1b136..221bc735f 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/HistoryAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/HistoryAttributes.h @@ -25,66 +25,106 @@ #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { /** * Class HistoryAttributes, to specify the attributes of a WriterHistory or a ReaderHistory. * This class is only intended to be used with the RTPS API. - * The Publsiher-Subscriber API has other fields to define this values (HistoryQosPolicy and ResourceLimitsQosPolicy). + * The Publisher-Subscriber API has other fields to define this values (HistoryQosPolicy and ResourceLimitsQosPolicy). * @ingroup RTPS_ATTRIBUTES_MODULE */ class RTPS_DllAPI HistoryAttributes { - public: - //!Memory management policy. - MemoryManagementPolicy_t memoryPolicy; - - //!Maximum payload size of the history, default value 500. - uint32_t payloadMaxSize; - - //!Number of the initial Reserved Caches, default value 500. - int32_t initialReservedCaches; - - /** - * Maximum number of reserved caches. Default value is 0 that indicates to keep reserving until something - * breaks. - */ - int32_t maximumReservedCaches; - - //! Default constructor - HistoryAttributes() - : memoryPolicy(PREALLOCATED_MEMORY_MODE) - , payloadMaxSize(500) - , initialReservedCaches(500) - , maximumReservedCaches(0) - {} - - /** Constructor - * @param memoryPolicy Set wether memory can be dynamically reallocated or not - * @param payload Maximum payload size. It is used when memory management polycy is - * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. - * @param initial Initial reserved caches. It is used when memory management policy is - * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. - * @param maxRes Maximum reserved caches. - */ - HistoryAttributes( - MemoryManagementPolicy_t memoryPolicy, - uint32_t payload, - int32_t initial, - int32_t maxRes) - : memoryPolicy(memoryPolicy) - , payloadMaxSize(payload) - , initialReservedCaches(initial) - , maximumReservedCaches(maxRes) - {} - - virtual ~HistoryAttributes(){} +public: + + //!Memory management policy. + MemoryManagementPolicy_t memoryPolicy; + + //!Maximum payload size of the history, default value 500. + uint32_t payloadMaxSize; + + //!Number of the initial Reserved Caches, default value 500. + int32_t initialReservedCaches; + + /** + * Maximum number of reserved caches. Default value is 0 that indicates to keep reserving until something + * breaks. + */ + int32_t maximumReservedCaches; + + /** + * Number of extra caches that can be reserved for other purposes than the history. + * For example, on a full history, the writer could give as many as these to be used by the application + * but they will not be able to be inserted in the history unless some cache from the history is released. + * + * Default value is 1. + */ + int32_t extraReservedCaches; + + //! Default constructor + HistoryAttributes() + : memoryPolicy(PREALLOCATED_MEMORY_MODE) + , payloadMaxSize(500) + , initialReservedCaches(500) + , maximumReservedCaches(0) + , extraReservedCaches(1) + { + } + + /** Constructor + * @param memoryPolicy Set whether memory can be dynamically reallocated or not + * @param payload Maximum payload size. It is used when memory management policy is + * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. + * @param initial Initial reserved caches. It is used when memory management policy is + * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. + * @param maxRes Maximum reserved caches. + */ + HistoryAttributes( + MemoryManagementPolicy_t memoryPolicy, + uint32_t payload, + int32_t initial, + int32_t maxRes) + : memoryPolicy(memoryPolicy) + , payloadMaxSize(payload) + , initialReservedCaches(initial) + , maximumReservedCaches(maxRes) + , extraReservedCaches(1) + { + } + + /** Constructor + * @param memoryPolicy Set whether memory can be dynamically reallocated or not + * @param payload Maximum payload size. It is used when memory management policy is + * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. + * @param initial Initial reserved caches. It is used when memory management policy is + * PREALLOCATED_MEMORY_MODE or PREALLOCATED_WITH_REALLOC_MEMORY_MODE. + * @param maxRes Maximum reserved caches. + * @param extra Extra reserved caches. + */ + HistoryAttributes( + MemoryManagementPolicy_t memoryPolicy, + uint32_t payload, + int32_t initial, + int32_t maxRes, + int32_t extra) + : memoryPolicy(memoryPolicy) + , payloadMaxSize(payload) + , initialReservedCaches(initial) + , maximumReservedCaches(maxRes) + , extraReservedCaches(extra) + { + } + + virtual ~HistoryAttributes() + { + } + }; -} -} -} +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima #endif /* _FASTDDS_HISTORYATTRIBUTES_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp b/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp index 0b897da98..5472aefad 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAllocationAttributes.hpp @@ -19,6 +19,8 @@ #ifndef _FASTDDS_RTPS_RTPSPARTICIPANTALLOCATIONATTRIBUTES_HPP_ #define _FASTDDS_RTPS_RTPSPARTICIPANTALLOCATIONATTRIBUTES_HPP_ +#include + #include namespace eprosima { @@ -81,7 +83,7 @@ struct SendBuffersAllocationAttributes * * This attribute controls how the buffer manager behaves when a send buffer is not * available. When true, a new buffer will be created. When false, it will wait for a - * buffer to be returned. This is a tradeoff between latency and dynamic allocations. + * buffer to be returned. This is a trade-off between latency and dynamic allocations. */ bool dynamic = false; }; @@ -96,7 +98,8 @@ struct VariableLengthDataLimits { return (this->max_properties == b.max_properties) && (this->max_user_data == b.max_user_data) && - (this->max_partitions == b.max_partitions); + (this->max_partitions == b.max_partitions) && + (this->max_datasharing_domains == b.max_datasharing_domains); } //! Defines the maximum size (in octets) of properties data in the local or remote participant @@ -105,6 +108,8 @@ struct VariableLengthDataLimits size_t max_user_data = 0; //! Defines the maximum size (in octets) of partitions data size_t max_partitions = 0; + //! Defines the maximum size (in elements) of the list of data sharing domain IDs + size_t max_datasharing_domains = 0; }; /** @@ -124,6 +129,8 @@ struct RTPSParticipantAllocationAttributes SendBuffersAllocationAttributes send_buffers; //! Holds limits for variable-length data VariableLengthDataLimits data_limits; + //! Defines the allocation behavior of content filter discovery information + fastdds::rtps::ContentFilterProperty::AllocationConfiguration content_filter; //! @return the allocation config for the total of readers in the system (participants * readers) ResourceLimitedContainerConfig total_readers() const diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h index 0cefd9ee3..f6d4ec94e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/RTPSParticipantAttributes.h @@ -29,11 +29,36 @@ #include #include #include +#include #include #include namespace eprosima { + +namespace fastdds { + +namespace rtps { + +/** + * Struct to define participant types to set participant type parameter property + *@ingroup DISCOVERY_MODULE + */ +struct ParticipantType +{ + static constexpr const char* SIMPLE = "SIMPLE"; + static constexpr const char* SERVER = "SERVER"; + static constexpr const char* CLIENT = "CLIENT"; + static constexpr const char* SUPER_CLIENT = "SUPER_CLIENT"; + static constexpr const char* BACKUP = "BACKUP"; + static constexpr const char* NONE = "NONE"; + static constexpr const char* EXTERNAL = "EXTERNAL"; + static constexpr const char* UNKNOWN = "UNKNOWN"; +}; + +} /* namespace rtps */ +} /* namespace fastdds */ + namespace fastrtps { namespace rtps { @@ -68,6 +93,39 @@ typedef enum DiscoveryProtocol } DiscoveryProtocol_t; +inline std::ostream& operator <<( + std::ostream& output, + const DiscoveryProtocol& discovery_protocol) +{ + switch (discovery_protocol) + { + case DiscoveryProtocol::NONE: + output << fastdds::rtps::ParticipantType::NONE; + break; + case DiscoveryProtocol::SIMPLE: + output << fastdds::rtps::ParticipantType::SIMPLE; + break; + case DiscoveryProtocol::EXTERNAL: + output << fastdds::rtps::ParticipantType::EXTERNAL; + break; + case DiscoveryProtocol::CLIENT: + output << fastdds::rtps::ParticipantType::CLIENT; + break; + case DiscoveryProtocol::SUPER_CLIENT: + output << fastdds::rtps::ParticipantType::SUPER_CLIENT; + break; + case DiscoveryProtocol::SERVER: + output << fastdds::rtps::ParticipantType::SERVER; + break; + case DiscoveryProtocol::BACKUP: + output << fastdds::rtps::ParticipantType::BACKUP; + break; + default: + output << fastdds::rtps::ParticipantType::UNKNOWN; + } + return output; +} + //!Filtering flags when discovering participants typedef enum ParticipantFilteringFlags : uint32_t { @@ -235,7 +293,7 @@ class DiscoverySettings (this->leaseDuration_announcementperiod == b.leaseDuration_announcementperiod) && (this->initial_announcements == b.initial_announcements) && (this->m_simpleEDP == b.m_simpleEDP) && - (this->m_staticEndpointXMLFilename == b.m_staticEndpointXMLFilename) && + (this->static_edp_xml_config_ == b.static_edp_xml_config_) && (this->m_DiscoveryServers == b.m_DiscoveryServers) && (this->ignoreParticipantFlags == b.ignoreParticipantFlags); } @@ -244,25 +302,50 @@ class DiscoverySettings * Get the static endpoint XML filename * @return Static endpoint XML filename */ + FASTRTPS_DEPRECATED("Use static_edp_xml_config()") const char* getStaticEndpointXMLFilename() const { - return m_staticEndpointXMLFilename.c_str(); + return static_edp_xml_config(); } /** * Set the static endpoint XML filename * @param str Static endpoint XML filename + * @deprecated */ + FASTRTPS_DEPRECATED("Use static_edp_xml_config()") void setStaticEndpointXMLFilename( const char* str) { - m_staticEndpointXMLFilename = std::string(str); + static_edp_xml_config_ = "file://" + std::string(str); + } + + /** + * Set the static endpoint XML configuration. + * @param str URI specifying the static endpoint XML configuration. + * The string could contain a filename (file://) or the XML content directly (data://). + */ + void static_edp_xml_config( + const char* str) + { + static_edp_xml_config_ = str; + } + + /** + * Get the static endpoint XML configuration. + * @return URI specifying the static endpoint XML configuration. + * The string could contain a filename (file://) or the XML content directly (data://). + */ + const char* static_edp_xml_config() const + { + return static_edp_xml_config_.c_str(); } private: - //! StaticEDP XML filename, only necessary if use_STATIC_EndpointDiscoveryProtocol=true - std::string m_staticEndpointXMLFilename = ""; + //! URI specifying the static EDP XML configuration, only necessary if use_STATIC_EndpointDiscoveryProtocol=true + //! This string could contain a filename or the XML content directly. + std::string static_edp_xml_config_ = ""; }; /** @@ -356,6 +439,8 @@ class BuiltinAttributes */ class RTPSParticipantAttributes { + using FlowControllerDescriptorList = std::vector>; + public: RTPSParticipantAttributes() @@ -385,8 +470,9 @@ class RTPSParticipantAttributes (this->participantID == b.participantID) && (this->throughputController == b.throughputController) && (this->useBuiltinTransports == b.useBuiltinTransports) && - (this->properties == b.properties && - (this->prefix == b.prefix)); + (this->properties == b.properties) && + (this->prefix == b.prefix) && + (this->flow_controllers == b.flow_controllers); } /** @@ -433,7 +519,11 @@ class RTPSParticipantAttributes //!Participant ID int32_t participantID; - //!Throughput controller parameters. Leave default for uncontrolled flow. + /** + * @brief Throughput controller parameters. Leave default for uncontrolled flow. + * + * @deprecated Use flow_controllers on RTPSParticipantAttributes + */ ThroughputControllerDescriptor throughputController; //!User defined transports to use alongside or in place of builtins. @@ -460,6 +550,9 @@ class RTPSParticipantAttributes return name.c_str(); } + //! Flow controllers. + FlowControllerDescriptorList flow_controllers; + private: //!Name of the participant. diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/ReaderAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/ReaderAttributes.h index ef923645c..d7431f057 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/ReaderAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/ReaderAttributes.h @@ -42,13 +42,15 @@ class ReaderTimes ReaderTimes() { - initialAcknackDelay.nanosec = 70*1000*1000; - heartbeatResponseDelay.nanosec = 5*1000*1000; + initialAcknackDelay.nanosec = 70 * 1000 * 1000; + heartbeatResponseDelay.nanosec = 5 * 1000 * 1000; } - virtual ~ReaderTimes() {} + virtual ~ReaderTimes() + { + } - bool operator==( + bool operator ==( const ReaderTimes& b) const { return (this->initialAcknackDelay == b.initialAcknackDelay) && @@ -57,7 +59,7 @@ class ReaderTimes //!Initial AckNack delay. Default value 70ms. Duration_t initialAcknackDelay; - //!Delay to be applied when a hearbeat message is received, default value 5ms. + //!Delay to be applied when a HEARTBEAT message is received, default value 5ms. Duration_t heartbeatResponseDelay; }; @@ -78,9 +80,11 @@ class ReaderAttributes endpoint.endpointKind = READER; endpoint.durabilityKind = VOLATILE; endpoint.reliabilityKind = BEST_EFFORT; - }; + } - virtual ~ReaderAttributes() {}; + virtual ~ReaderAttributes() + { + } //!Attributes of the associated endpoint. EndpointAttributes endpoint; diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/ServerAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/ServerAttributes.h index 183bc70e8..07562705d 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/ServerAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/ServerAttributes.h @@ -68,11 +68,21 @@ class RemoteServerAttributes RTPS_DllAPI fastrtps::rtps::GUID_t GetPDPReader() const; RTPS_DllAPI fastrtps::rtps::GUID_t GetPDPWriter() const; +#ifndef DOXYGEN_SHOULD_SKIP_THIS + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::rtps:GetEDPPublicationsReader()", + "Not implemented nor used functions.") RTPS_DllAPI fastrtps::rtps::GUID_t GetEDPPublicationsReader() const; + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::rtps:GetEDPSubscriptionsWriter()", + "Not implemented nor used functions.") RTPS_DllAPI fastrtps::rtps::GUID_t GetEDPSubscriptionsWriter() const; + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::rtps:GetEDPPublicationsWriter()", + "Not implemented nor used functions.") RTPS_DllAPI fastrtps::rtps::GUID_t GetEDPPublicationsWriter() const; + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::rtps:GetEDPSubscriptionsReader()", + "Not implemented nor used functions.") RTPS_DllAPI fastrtps::rtps::GUID_t GetEDPSubscriptionsReader() const; +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS RTPS_DllAPI inline bool ReadguidPrefix( const char* pfx) @@ -81,9 +91,9 @@ class RemoteServerAttributes } //!Metatraffic Unicast Locator List - fastrtps::rtps::LocatorList_t metatrafficUnicastLocatorList; + LocatorList metatrafficUnicastLocatorList; //!Metatraffic Multicast Locator List. - fastrtps::rtps::LocatorList_t metatrafficMulticastLocatorList; + LocatorList metatrafficMulticastLocatorList; //!Guid prefix fastrtps::rtps::GuidPrefix_t guidPrefix; @@ -99,20 +109,57 @@ constexpr uint16_t DEFAULT_ROS2_SERVER_PORT = 11811; // default server base guidPrefix const char* const DEFAULT_ROS2_SERVER_GUIDPREFIX = "44.53.00.5f.45.50.52.4f.53.49.4d.41"; +/* Environment variable to specify a semicolon-separated list of UDPv4 locators (ip:port) that define remote server + * locators. + * The position in the list is used as a "server id" to extrapolate the server's GUID prefix. + * For the variable to take any effect, the following pre-conditions must be met: + * 1. The server's GUID prefix must be compliant with the schema + * "44.53..5f.45.50.52.4f.53.49.4d.41", which is the schema followed by the prefixes generated + * when creating server using fastdds cli, being DEFAULT_ROS2_SERVER_GUIDPREFIX the prefix for ID=0. + * 1. The discovery protocol must be either SIMPLE or SERVER. + * 1. In the case of SIMPLE, the participant is created as a CLIENT instead. + * 1. In the case of SERVER, the participant is created as a SERVER, using the DEFAULT_ROS2_MASTER_URI list to + * expand the list of remote servers. + */ +const char* const DEFAULT_ROS2_MASTER_URI = "ROS_DISCOVERY_SERVER"; + /** - * Retrieves a ; separated list of locators from an environment variable and + * Retrieves a semicolon-separated list of locators from a string, and * populates a RemoteServerList_t mapping list position to default guid. - * @param list servers listening locator list provided. - * @param attributes referenct to a RemoteServerList_t to populate. - * @return true if parsing succeeds + * @param[in] list servers listening locator list. + * @param[out] attributes reference to a RemoteServerList_t to populate. + * @return true if parsing succeeds, false otherwise (or if the list is empty) */ RTPS_DllAPI bool load_environment_server_info( std::string list, RemoteServerList_t& attributes); + +/** + * Retrieves a semicolon-separated list of locators from DEFAULT_ROS2_MASTER_URI environment variable, and + * populates a RemoteServerList_t mapping list position to default guid. + * + * The environment variable can be read from an environment file (which allows runtime modification of the remote + * servers list) or directly from the environment. + * The value contained in the file takes precedence over the environment value (if both are set). + * This is to avoid conflicts because only new servers can be added to the list (containing thus all the previously + * known servers). + * + * @param[out] attributes reference to a RemoteServerList_t to populate. + * @return true if parsing succeeds, false otherwise + */ +RTPS_DllAPI bool load_environment_server_info( + RemoteServerList_t& attributes); + +/** + * Get the value of environment variable DEFAULT_ROS2_MASTER_URI + * @return The value of environment variable DEFAULT_ROS2_MASTER_URI. Empty string if the variable is not defined. + */ +RTPS_DllAPI const std::string& ros_discovery_server_env(); + /** - * returns the guidPrefix associated to the default server id given - * @param id of the default server whose guidPrefix we want to retrieve - * @param guid reference to the guidPrefix to modify + * Returns the guidPrefix associated to the given server id + * @param[in] id of the default server whose guidPrefix we want to retrieve + * @param[out] guid reference to the guidPrefix to modify * @return true if the server guid can be delivered */ RTPS_DllAPI bool get_server_client_default_guidPrefix( @@ -130,7 +177,9 @@ using fastdds::rtps::RemoteServerAttributes; using fastdds::rtps::RemoteServerList_t; using fastdds::rtps::DEFAULT_ROS2_SERVER_PORT; using fastdds::rtps::DEFAULT_ROS2_SERVER_GUIDPREFIX; +using fastdds::rtps::DEFAULT_ROS2_MASTER_URI; using fastdds::rtps::load_environment_server_info; +using fastdds::rtps::ros_discovery_server_env; using fastdds::rtps::get_server_client_default_guidPrefix; } // fastrtps diff --git a/ThirdParty/ros/include/fastdds/rtps/attributes/WriterAttributes.h b/ThirdParty/ros/include/fastdds/rtps/attributes/WriterAttributes.h index de6a65a34..7c9dd2d5a 100644 --- a/ThirdParty/ros/include/fastdds/rtps/attributes/WriterAttributes.h +++ b/ThirdParty/ros/include/fastdds/rtps/attributes/WriterAttributes.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -32,8 +33,6 @@ namespace eprosima { namespace fastrtps { namespace rtps { -class ReaderProxyData; - typedef enum RTPSWriterPublishMode : octet { SYNCHRONOUS_WRITER, @@ -124,7 +123,11 @@ class WriterAttributes //!Indicates if the Writer is synchronous or asynchronous RTPSWriterPublishMode mode; - // Throughput controller, always the last one to apply + /** + * @brief Throughput controller, always the last one to apply + * + * @deprecated Use flow_controllers on RTPSParticipantAttributes + */ ThroughputControllerDescriptor throughputController; //! Disable the sending of heartbeat piggybacks. @@ -138,6 +141,9 @@ class WriterAttributes //! Keep duration to keep a sample before considering it has been acked Duration_t keep_duration; + + //! Flow controller name. Default: fastdds::rtps::FASTDDS_FLOW_CONTROLLER_DEFAULT. + const char* flow_controller_name = fastdds::rtps::FASTDDS_FLOW_CONTROLLER_DEFAULT; }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/BuiltinProtocols.h b/ThirdParty/ros/include/fastdds/rtps/builtin/BuiltinProtocols.h index 8da014736..59540cb1c 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/BuiltinProtocols.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/BuiltinProtocols.h @@ -24,6 +24,7 @@ #include #include +#include #include namespace eprosima { @@ -78,6 +79,11 @@ class BuiltinProtocols RTPSParticipantImpl* p_part, BuiltinAttributes& attributes); + /** + * Enable the builtin protocols + */ + void enable(); + /** * Update the metatraffic locatorlist after it was created. Because when you create * the EDP readers you are not sure the selected endpoints can be used. @@ -127,15 +133,18 @@ class BuiltinProtocols const fastdds::dds::WriterQos& wqos); /** * Add a local Reader to the BuiltinProtocols. - * @param R Pointer to the RTPSReader. - * @param topicAtt Attributes of the associated topic - * @param rqos QoS policies dictated by the subscriber + * @param R Pointer to the RTPSReader. + * @param topicAtt Attributes of the associated topic + * @param rqos QoS policies dictated by the subscriber + * @param content_filter Optional content filtering information. * @return True if correct. */ bool addLocalReader( RTPSReader* R, const TopicAttributes& topicAtt, - const fastdds::dds::ReaderQos& rqos); + const fastdds::dds::ReaderQos& rqos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); + /** * Update a local Writer QOS * @param W Writer to update @@ -149,15 +158,17 @@ class BuiltinProtocols const fastdds::dds::WriterQos& wqos); /** * Update a local Reader QOS - * @param R Reader to update - * @param topicAtt Attributes of the associated topic - * @param qos New Reader QoS + * @param R Reader to update + * @param topicAtt Attributes of the associated topic + * @param qos New Reader QoS + * @param content_filter Optional content filtering information. * @return */ bool updateLocalReader( RTPSReader* R, const TopicAttributes& topicAtt, - const fastdds::dds::ReaderQos& qos); + const fastdds::dds::ReaderQos& qos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); /** * Remove a local Writer from the builtinProtocols. * @param W Pointer to the writer. diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/data/ContentFilterProperty.hpp b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ContentFilterProperty.hpp new file mode 100644 index 000000000..2a23a32d2 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ContentFilterProperty.hpp @@ -0,0 +1,82 @@ +// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file ContentFilterProperty.hpp + */ + +#ifndef FASTDDS_RTPS_BUILTIN_DATA_CONTENTFILTERPROPERTY_HPP_ +#define FASTDDS_RTPS_BUILTIN_DATA_CONTENTFILTERPROPERTY_HPP_ + +#include + +#include +#include +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/** + * Information about the content filter being applied by a reader. + * @ingroup BUILTIN_MODULE + */ +class ContentFilterProperty +{ +public: + + /** + * Allocation configuration for a ContentFilterProperty. + * @ingroup BUILTIN_MODULE + */ + struct AllocationConfiguration + { + /// Preallocated size of the filter expression + size_t expression_initial_size = 0; + /// Allocation configuration for the list of expression parameters + fastrtps::ResourceLimitedContainerConfig expression_parameters{ 0, 100, 1 }; + }; + + /** + * Construct a ContentFilterProperty. + * + * @param config Allocation configuration for the new object. + */ + explicit ContentFilterProperty( + const AllocationConfiguration& config) + : expression_parameters(config.expression_parameters) + { + filter_expression.reserve(config.expression_initial_size); + } + + /// Name of the content filtered topic on which the reader was created + fastrtps::string_255 content_filtered_topic_name; + /// Name of the related topic being filtered + fastrtps::string_255 related_topic_name; + /// Class name of the filter being used. + /// May be empty to indicate the ContentFilterProperty is not present. + fastrtps::string_255 filter_class_name; + /// Filter expression indicating which content the reader wants to receive. + /// May be empty to indicate the ContentFilterProperty is not present. + std::string filter_expression; + /// List of values for the parameters present on the filter expression + fastrtps::ResourceLimitedVector expression_parameters; +}; + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif // FASTDDS_RTPS_BUILTIN_DATA_CONTENTFILTERPROPERTY_HPP_ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/data/ParticipantProxyData.h b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ParticipantProxyData.h index b516fec4b..cee957404 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/data/ParticipantProxyData.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ParticipantProxyData.h @@ -167,7 +167,7 @@ class ParticipantProxyData bool write_encapsulation); /** - * Read the parameter list from a recevied CDRMessage_t + * Read the parameter list from a received CDRMessage_t * @return True on success */ bool readFromCDRMessage( diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/data/ReaderProxyData.h b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ReaderProxyData.h index fb15b4e8f..352bac890 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/data/ReaderProxyData.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/data/ReaderProxyData.h @@ -26,12 +26,13 @@ #include #include +#include +#include #if HAVE_SECURITY #include #endif // if HAVE_SECURITY -#include namespace eprosima { namespace fastrtps { @@ -51,12 +52,14 @@ class ReaderProxyData RTPS_DllAPI ReaderProxyData( const size_t max_unicast_locators, - const size_t max_multicast_locators); + const size_t max_multicast_locators, + const fastdds::rtps::ContentFilterProperty::AllocationConfiguration& content_filter_limits = {}); RTPS_DllAPI ReaderProxyData( const size_t max_unicast_locators, const size_t max_multicast_locators, - const VariableLengthDataLimits& data_limits); + const VariableLengthDataLimits& data_limits, + const fastdds::rtps::ContentFilterProperty::AllocationConfiguration& content_filter_limits = {}); RTPS_DllAPI virtual ~ReaderProxyData(); @@ -227,6 +230,28 @@ class ReaderProxyData return m_userDefinedId; } + RTPS_DllAPI void content_filter( + const fastdds::rtps::ContentFilterProperty& filter) + { + content_filter_ = filter; + } + + RTPS_DllAPI void content_filter( + fastdds::rtps::ContentFilterProperty&& filter) + { + content_filter_ = std::move(filter); + } + + RTPS_DllAPI const fastdds::rtps::ContentFilterProperty& content_filter() const + { + return content_filter_; + } + + RTPS_DllAPI fastdds::rtps::ContentFilterProperty& content_filter() + { + return content_filter_; + } + RTPS_DllAPI void isAlive( bool isAlive) { @@ -378,10 +403,11 @@ class ReaderProxyData bool write_encapsulation) const; /** - * Read the information from a CDRMessage_t. The position of the message must be in the beggining on the parameter list. + * Read the information from a CDRMessage_t. The position of the message must be in the beginning on the + * parameter list. * @param msg Pointer to the message. * @param network Reference to network factory for locator validation and transformation - * @param is_shm_transport_available Indicates wether the Reader is reachable by SHM. + * @param is_shm_transport_available Indicates whether the Reader is reachable by SHM. * @return true on success */ RTPS_DllAPI bool readFromCDRMessage( @@ -417,7 +443,7 @@ class ReaderProxyData /** * Update the information (only certain fields will be updated). - * @param rdata Poitner to the object from which we are going to update. + * @param rdata Pointer to the object from which we are going to update. */ void update( ReaderProxyData* rdata); @@ -457,6 +483,8 @@ class ReaderProxyData xtypes::TypeInformation* m_type_information; //! ParameterPropertyList_t m_properties; + //!Information on the content filter applied by the reader. + fastdds::rtps::ContentFilterProperty content_filter_; }; } // namespace rtps diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDP.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDP.h index dd196397b..b57ad891f 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDP.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDP.h @@ -21,13 +21,15 @@ #define _FASTDDS_RTPS_EDP_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC +#include +#include +#include #include +#include #include #include #include -#include -#include -#include +#include #include #include @@ -114,9 +116,9 @@ class EDP (void) pdata; } - //! Verify if the given participant EDP enpoints are matched with us + //! Verify whether the given participant EDP endpoints are matched with us virtual bool areRemoteEndpointsMatched( - const ParticipantProxyData* ) + const ParticipantProxyData*) { return false; } @@ -158,15 +160,17 @@ class EDP /** * Create a new ReaderPD for a local Reader. - * @param R Pointer to the RTPSReader. - * @param att Attributes of the associated topic - * @param qos QoS policies dictated by the subscriber + * @param R Pointer to the RTPSReader. + * @param att Attributes of the associated topic + * @param qos QoS policies dictated by the subscriber + * @param content_filter Optional content filtering information. * @return True if correct. */ bool newLocalReaderProxyData( RTPSReader* R, const TopicAttributes& att, - const ReaderQos& qos); + const ReaderQos& qos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); /** * Create a new ReaderPD for a local Writer. * @param W Pointer to the RTPSWriter. @@ -180,15 +184,17 @@ class EDP const WriterQos& qos); /** * A previously created Reader has been updated - * @param R Pointer to the reader; - * @param att Attributes of the associated topic - * @param qos QoS policies dictated by the subscriber + * @param R Pointer to the reader + * @param att Attributes of the associated topic + * @param qos QoS policies dictated by the subscriber + * @param content_filter Optional content filtering information. * @return True if correctly updated */ bool updatedLocalReader( RTPSReader* R, const TopicAttributes& att, - const ReaderQos& qos); + const ReaderQos& qos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); /** * A previously created Writer has been updated * @param W Pointer to the Writer @@ -225,8 +231,8 @@ class EDP * Check the validity of a matching between a local RTPSWriter and a ReaderProxyData object. * @param wdata Pointer to the WriterProxyData object of the local RTPSWriter. * @param rdata Pointer to the ReaderProxyData object. - * @param reason[out] On return will specify the reason of failed matching (if any). - * @param incompatible_qos[out] On return will specify all the QoS values that were incompatible (if any). + * @param [out] reason On return will specify the reason of failed matching (if any). + * @param [out] incompatible_qos On return will specify all the QoS values that were incompatible (if any). * @return True if the two can be matched. */ bool valid_matching( @@ -239,8 +245,8 @@ class EDP * Check the validity of a matching between a local RTPSReader and a WriterProxyData object. * @param rdata Pointer to the ReaderProxyData object of the local RTPSReader. * @param wdata Pointer to the WriterProxyData object. - * @param error_mask[out] On return will specify the reason of failed matching (if any). - * @param incompatible_qos[out] On return will specify all the QoS values that were incompatible (if any). + * @param [out] reason On return will specify the reason of failed matching (if any). + * @param [out] incompatible_qos On return will specify all the QoS values that were incompatible (if any). * @return True if the two can be matched. */ bool valid_matching( @@ -342,6 +348,18 @@ class EDP //! Pointer to the RTPSParticipant. RTPSParticipantImpl* mp_RTPSParticipant; + /** + * Access the temporary proxy pool for reader proxies + * @return pool reference + */ + ProxyPool& get_temporary_reader_proxies_pool(); + + /** + * Access the temporary proxy pool for writer proxies + * @return pool reference + */ + ProxyPool& get_temporary_writer_proxies_pool(); + private: /** @@ -391,9 +409,6 @@ class EDP const WriterProxyData* wdata, const ReaderProxyData* rdata) const; - ReaderProxyData temp_reader_proxy_data_; - WriterProxyData temp_writer_proxy_data_; - using pool_allocator_t = foonathan::memory::memory_pool; diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPClient.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPClient.h deleted file mode 100644 index b6e0a4807..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPClient.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file EDPClient.h - * - */ - -#ifndef _FASTDDS_RTPS_EDPCLIENT_H_ -#define _FASTDDS_RTPS_EDPCLIENT_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -/** - * Class EDPClient, extends the EDPSimple functionality to accommodate client side needs - *@ingroup DISCOVERY_MODULE - */ -class EDPClient : public EDPSimple -{ -public: - - /** - * Constructor. - * @param p Pointer to the PDP - * @param part Pointer to the RTPSParticipantImpl - */ - EDPClient( - PDP* p, - RTPSParticipantImpl* part) - : EDPSimple(p, part) - { - } - - /** - * This method generates the corresponding change in the subscription writer and send it to all known remote endpoints. - * @param reader Pointer to the Reader object. - * @param rdata Pointer to the ReaderProxyData object. - * @return true if correct. - */ - bool processLocalReaderProxyData( - RTPSReader* reader, - ReaderProxyData* rdata) override; - /** - * This method generates the corresponding change in the publciations writer and send it to all known remote endpoints. - * @param writer Pointer to the Writer object. - * @param wdata Pointer to the WriterProxyData object. - * @return true if correct. - */ - bool processLocalWriterProxyData( - RTPSWriter* writer, - WriterProxyData* wdata) override; - /** - * This methods generates the change disposing of the local Reader and calls the unpairing and removal methods of the base class. - * @param R Pointer to the RTPSReader object. - * @return True if correct. - */ - bool removeLocalReader( - RTPSReader*R) override; - /** - * This methods generates the change disposing of the local Writer and calls the unpairing and removal methods of the base class. - * @param W Pointer to the RTPSWriter object. - * @return True if correct. - */ - bool removeLocalWriter( - RTPSWriter*W) override; - -}; - -} -} /* namespace rtps */ -} /* namespace eprosima */ - -#endif -#endif /* _FASTDDS_RTPS_EDPCLIENT_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPServer.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPServer.h deleted file mode 100644 index 2911f6ce4..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPServer.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file EDPServer.h - * - */ - -#ifndef _FASTDDS_RTPS_EDPSERVER_H_ -#define _FASTDDS_RTPS_EDPSERVER_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include -#include -#include - -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class EDPServerPUBListener; -class EDPServerSUBListener; - -/** - * Class EDPServer, implements the Endpoint Discovery Protocol for server participants - * Inherits from EDPSimple class. - *@ingroup DISCOVERY_MODULE - */ -class EDPServer : public EDPSimple -{ - friend class EDPServerPUBListener; - friend class EDPServerSUBListener; - - //! Keys to wipe out from WriterHistory because its related Participants have been removed - key_list _PUBdemises, _SUBdemises; - - //! TRANSIENT or TRANSIENT_LOCAL durability; - DurabilityKind_t _durability; - -public: - - /** - * Constructor. - * @param p Pointer to the PDP - * @param part Pointer to the RTPSParticipantImpl - * @param durability_kind the kind of persistence we want for the discovery data - */ - EDPServer( - PDP* p, - RTPSParticipantImpl* part, - DurabilityKind_t durability_kind) - : EDPSimple(p, part) - , _durability(durability_kind) - { - } - - ~EDPServer() override - { - } - - /** - * This method generates the corresponding change in the subscription writer and send it to all known remote endpoints. - * @param reader Pointer to the Reader object. - * @param rdata Pointer to the ReaderProxyData object. - * @return true if correct. - */ - bool processLocalReaderProxyData( - RTPSReader* reader, - ReaderProxyData* rdata) override; - /** - * This method generates the corresponding change in the publciations writer and send it to all known remote endpoints. - * @param writer Pointer to the Writer object. - * @param wdata Pointer to the WriterProxyData object. - * @return true if correct. - */ - bool processLocalWriterProxyData( - RTPSWriter* writer, - WriterProxyData* wdata) override; - /** - * This methods generates the change disposing of the local Reader and calls the unpairing and removal methods of the base class. - * @param R Pointer to the RTPSReader object. - * @return True if correct. - */ - bool removeLocalReader( - RTPSReader* R) override; - /** - * This methods generates the change disposing of the local Writer and calls the unpairing and removal methods of the base class. - * @param W Pointer to the RTPSWriter object. - * @return True if correct. - */ - bool removeLocalWriter( - RTPSWriter* W) override; - - /** - * Some History data is flagged for deferred removal till every client - * acknowledges reception - * @return True if trimming must be done - */ - inline bool pendingHistoryCleaning() - { - return !(_PUBdemises.empty() && _SUBdemises.empty()); - } - - //! Callback to remove unnecesary WriterHistory info - bool trimPUBWriterHistory(); - bool trimSUBWriterHistory(); - - //! returns true if loading info from persistency database - bool ongoingDeserialization(); - - //! Process the info recorded in the persistence database - void processPersistentData(); - - /** - * Trigger the participant CacheChange_t removal system - * @return True if successfully modified WriterHistory - */ - void removePublisherFromHistory( - const InstanceHandle_t&); - void removeSubscriberFromHistory( - const InstanceHandle_t&); - - /** - * Add participant CacheChange_ts from reader to writer - * @return True if successfully modified WriterHistory - */ - bool addPublisherFromHistory( - CacheChange_t& c); - - bool addSubscriberFromHistory( - CacheChange_t& c); - -private: - - /** - * Callback to remove unnecesary WriterHistory info common implementation - * @return True if trim is finished - */ - template - bool trimWriterHistory( - key_list& _demises, - StatefulWriter& writer, - WriterHistory& history, - ProxyCont* ParticipantProxyData::* pCont); - - //! addPublisherFromHistory and addSubscriberFromHistory common implementation - template - bool addEndpointFromHistory( - StatefulWriter& writer, - WriterHistory& history, - CacheChange_t& c); - - /** - * Create local SEDP Endpoints based on the DiscoveryAttributes. - * @return True if correct. - */ - virtual bool createSEDPEndpoints() override; - -}; - -} /* namespace rtps */ -} /* namespace fastrtps */ -} /* namespace eprosima */ - -#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* _FASTDDS_RTPS_EDPSERVER_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPSimple.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPSimple.h index 1a1475aa2..1ba0399b9 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPSimple.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPSimple.h @@ -112,7 +112,7 @@ class EDPSimple : public EDP void removeRemoteEndpoints( ParticipantProxyData* pdata) override; - //! Verify if the given participant EDP enpoints are matched with us + //! Verify whether the given participant EDP endpoints are matched with us bool areRemoteEndpointsMatched( const ParticipantProxyData* pdata) override; @@ -263,12 +263,6 @@ class EDPSimple : public EDP const GUID_t& local_writer, const ReaderProxyData& remote_reader_data) override; #endif // if HAVE_SECURITY - -protected: - - std::mutex temp_data_lock_; - ReaderProxyData temp_reader_proxy_data_; - WriterProxyData temp_writer_proxy_data_; }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPStatic.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPStatic.h index c8c015295..d949588ec 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPStatic.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/endpoint/EDPStatic.h @@ -24,84 +24,65 @@ #include namespace eprosima { -namespace fastrtps{ -namespace xmlparser{ - class XMLEndpointParser; -} -namespace rtps { +namespace fastrtps { +namespace xmlparser { +class XMLEndpointParser; +} // namespace xmlparser -/** - * Class EDPStaticProperty, used to read and write the strings from the properties used to transmit the EntityId_t. - *@ingroup DISCOVERY_MODULE - */ -class EDPStaticProperty -{ -public: - EDPStaticProperty():m_userId(0){}; - ~EDPStaticProperty(){}; - //!Endpoint type - std::string m_endpointType; - //!Status - std::string m_status; - //!User ID as string - std::string m_userIdStr; - //!User ID - uint16_t m_userId; - //!Entity ID - EntityId_t m_entityId; - /** - * Convert information to a property - * @param type Type of endpoint - * @param status Status of the endpoint - * @param id User Id - * @param ent EntityId - * @return Pair of two strings. - */ - static std::pair toProperty(std::string type,std::string status,uint16_t id,const EntityId_t& ent); - /** - * @param in_property Input property- - * @return True if correctly read - */ - bool fromProperty(std::pair in_property); -}; +namespace rtps { /** * Class EDPStatic, implements a static endpoint discovery module. * @ingroup DISCOVERYMODULE */ -class EDPStatic : public EDP { +class EDPStatic : public EDP +{ public: + + //! Different exchange formats supported by Static Discovery. + enum class ExchangeFormat : uint32_t + { + v1, //! Standard exchange format for Static Discovery. + v1_Reduced //! Exchange format that reduces the used network bandwidth. + }; + /** - * Constructor. - * @param p Pointer to the PDPSimple. - * @param part Pointer to the RTPSParticipantImpl. - */ - EDPStatic(PDP* p,RTPSParticipantImpl* part); + * Constructor. + * @param p Pointer to the PDPSimple. + * @param part Pointer to the RTPSParticipantImpl. + */ + EDPStatic( + PDP* p, + RTPSParticipantImpl* part); virtual ~EDPStatic(); /** * Abstract method to initialize the EDP. * @param attributes DiscoveryAttributes structure. * @return True if correct. */ - bool initEDP(BuiltinAttributes& attributes) override; + bool initEDP( + BuiltinAttributes& attributes) override; /** * Abstract method that assigns remote endpoints when a new RTPSParticipantProxyData is discovered. * @param pdata Pointer to the ParticipantProxyData. */ - void assignRemoteEndpoints(const ParticipantProxyData& pdata) override; + void assignRemoteEndpoints( + const ParticipantProxyData& pdata) override; /** * Abstract method that removes a local Reader from the discovery method * @param R Pointer to the Reader to remove. * @return True if correctly removed. */ - bool removeLocalReader(RTPSReader* R) override; + bool removeLocalReader( + RTPSReader* R) override; /** * Abstract method that removes a local Writer from the discovery method * @param W Pointer to the Writer to remove. * @return True if correctly removed. */ - bool removeLocalWriter(RTPSWriter*W) override; + bool removeLocalWriter( + RTPSWriter* W) override; /** * After a new local ReaderProxyData has been created some processing is needed (depends on the implementation). @@ -109,14 +90,18 @@ class EDPStatic : public EDP { * @param rdata Pointer to the ReaderProxyData object. * @return True if correct. */ - bool processLocalReaderProxyData(RTPSReader* reader, ReaderProxyData* rdata) override; + bool processLocalReaderProxyData( + RTPSReader* reader, + ReaderProxyData* rdata) override; /** * After a new local WriterProxyData has been created some processing is needed (depends on the implementation). * @param writer Pointer to the RTPSWriter object. * @param wdata Pointer to the Writer ProxyData object. * @return True if correct. */ - bool processLocalWriterProxyData(RTPSWriter* writer, WriterProxyData* wdata) override; + bool processLocalWriterProxyData( + RTPSWriter* writer, + WriterProxyData* wdata) override; /** * New Remote Writer has been found and this method process it and calls the pairing methods. @@ -124,13 +109,15 @@ class EDPStatic : public EDP { * @param participant_name Name of the participant. * @param user_id User Id. * @param ent_id Entity Id. + * @param persistence_guid GUID used for persistence. * @return True if correct. */ bool newRemoteWriter( const GUID_t& participant_guid, const string_255& participant_name, uint16_t user_id, - EntityId_t ent_id = c_EntityId_Unknown); + EntityId_t ent_id = c_EntityId_Unknown, + const GUID_t& persistence_guid = GUID_t::unknown()); /** * New Remote Reader has been found and this method process it and calls the pairing methods. * @param participant_guid GUID of the participant. @@ -146,25 +133,32 @@ class EDPStatic : public EDP { EntityId_t ent_id = c_EntityId_Unknown); /** - * This method checks the provided entityId against the topic type to see if it matches - * @param rdata Pointer to the readerProxyData - * @return True if its correct. - **/ - bool checkEntityId(ReaderProxyData* rdata); + * This method checks the provided entityId against the topic type to see if it matches + * @param rdata Pointer to the readerProxyData + * @return True if its correct. + **/ + bool checkEntityId( + ReaderProxyData* rdata); /** - * This method checks the provided entityId against the topic type to see if it matches - * @param wdata Pointer to the writerProxyData - * @return True if its correct. - **/ - bool checkEntityId(WriterProxyData* wdata); + * This method checks the provided entityId against the topic type to see if it matches + * @param wdata Pointer to the writerProxyData + * @return True if its correct. + **/ + bool checkEntityId( + WriterProxyData* wdata); + private: + xmlparser::XMLEndpointParser* mp_edpXML; + BuiltinAttributes m_attributes; + + ExchangeFormat exchange_format_ = ExchangeFormat::v1; }; -} +} // namespace rtps } /* namespace rtps */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_EDPSTATIC_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDP.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDP.h index 61ca6fff3..8b0263ca7 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDP.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDP.h @@ -21,36 +21,25 @@ #define _FASTDDS_RTPS_PDP_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC +#include #include #include -#include #include #include #include +#include +#include #include +#include #include -#include namespace eprosima { namespace fastdds { namespace rtps { -class PDPServerListener2; - -/** - * Struct to define participant types to set participant type parameter property - *@ingroup DISCOVERY_MODULE - */ -struct ParticipantType -{ - static const char SIMPLE[]; - static const char SERVER[]; - static const char CLIENT[]; - static const char BACKUP[]; - static const char SUPER_CLIENT[]; -}; +class PDPServerListener; } // namespace rtps } // namespace fastdds @@ -84,7 +73,7 @@ class PDP { friend class PDPListener; friend class PDPServerListener; - friend class fastdds::rtps::PDPServerListener2; + friend class fastdds::rtps::PDPServerListener; public: @@ -110,6 +99,11 @@ class PDP bool initPDP( RTPSParticipantImpl* part); + /** + * @brief Enable the Participant Discovery Protocol + * + * @return true if enabled correctly, or if already enabled; false otherwise + */ bool enable(); virtual bool init( @@ -364,6 +358,24 @@ class PDP */ std::list& remote_server_attributes(); + /** + * Access the temporary proxy pool for reader proxies + * @return pool reference + */ + ProxyPool& get_temporary_reader_proxies_pool() + { + return temp_reader_proxies_; + } + + /** + * Access the temporary proxy pool for writer proxies + * @return pool reference + */ + ProxyPool& get_temporary_writer_proxies_pool() + { + return temp_writer_proxies_; + } + protected: //!Pointer to the builtin protocols object. @@ -404,16 +416,16 @@ class PDP ReaderHistory* mp_PDPReaderHistory; //!Reader payload pool std::shared_ptr reader_payload_pool_; - //!ReaderProxyData to allow preallocation of remote locators - ReaderProxyData temp_reader_data_; - //!WriterProxyData to allow preallocation of remote locators - WriterProxyData temp_writer_data_; - //!To protect temp_writer_data_ and temp_reader_data_ - std::mutex temp_data_lock_; + //! ProxyPool for temporary reader proxies + ProxyPool temp_reader_proxies_; + //! ProxyPool for temporary writer proxies + ProxyPool temp_writer_proxies_; //!Participant data atomic access assurance std::recursive_mutex* mp_mutex; //!To protect callbacks (ParticipantProxyData&) std::mutex callback_mtx_; + //!Tell if object is enabled + std::atomic enabled_ {false}; /** * Adds an entry to the collection of participant proxy information. @@ -421,12 +433,14 @@ class PDP * * @param participant_guid GUID of the participant for which to create the proxy object. * @param with_lease_duration indicates whether lease duration event should be created. + * @param participant_proxy_data The participant proxy data from which the copy is made (if provided) * * @return pointer to the currently inserted entry, nullptr if allocation limits were reached. */ ParticipantProxyData* add_participant_proxy_data( const GUID_t& participant_guid, - bool with_lease_duration); + bool with_lease_duration, + const ParticipantProxyData* participant_proxy_data = nullptr); /** * Gets the key of a participant proxy data. diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPClient.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPClient.h deleted file mode 100644 index edabc9e41..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPClient.h +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPClient.h - * - */ - -#ifndef _FASTDDS_RTPS_PDPCLIENT_H_ -#define _FASTDDS_RTPS_PDPCLIENT_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include -#include -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class StatefulWriter; -class StatefulReader; - -/** - * Class PDPClient manages client side of the discovery server mechanism - *@ingroup DISCOVERY_MODULE - */ -class PDPClient : public PDP -{ - friend class DSClientEvent; - -public: - - /** - * Constructor - * @param builtin Pointer to the BuiltinProcols object. - * @param allocation Participant allocation parameters. - */ - PDPClient( - BuiltinProtocols* builtin, - const RTPSParticipantAllocationAttributes& allocation, - bool super_client = false); - ~PDPClient(); - - void initializeParticipantProxyData( - ParticipantProxyData* participant_data) override; - - /** - * Initialize the PDP. - * @param part Pointer to the RTPSParticipant. - * @return True on success - */ - bool init( - RTPSParticipantImpl* part) override; - - /** - * Creates an initializes a new participant proxy from a DATA(p) raw info - * @param p from DATA msg deserialization - * @param writer_guid GUID of originating writer - * @return new ParticipantProxyData * or nullptr on failure - */ - ParticipantProxyData* createParticipantProxyData( - const ParticipantProxyData& p, - const GUID_t& writer_guid) override; - - /** - * Create the SPDP Writer and Reader - * @return True if correct. - */ - bool createPDPEndpoints() override; - - /** - * Check if all servers have acknowledge the client PDP data - * This method must be called from a mutex protected context. - * @return True if all can reach the client - */ - bool all_servers_acknowledge_PDP(); - - /** - * Check if we have our PDP received data updated - * This method must be called from a mutex protected context. - * @return True if we known all the participants the servers are aware of - */ - bool is_all_servers_PDPdata_updated(); - - /** - * Force the sending of our local PDP to all servers - * @param new_change If true a new change (with new seqNum) is created and sent; - * if false the last change is re-sent - * @param dispose Sets change kind to NOT_ALIVE_DISPOSED_UNREGISTERED - * @param wparams allows to identify the change - */ - void announceParticipantState( - bool new_change, - bool dispose = false, - WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override; - - /** - * These methods wouldn't be needed under perfect server operation - * (no need of dynamic endpoint allocation) but must be implemented - * to solve server shutdown situations. - * @param pdata Pointer to the RTPSParticipantProxyData object. - */ - void assignRemoteEndpoints( - ParticipantProxyData* pdata) override; - void removeRemoteEndpoints( - ParticipantProxyData* pdata) override; - void notifyAboveRemoteEndpoints( - const ParticipantProxyData& pdata) override; - - /** - * This method removes a remote RTPSParticipant and all its writers and readers. - * @param participant_guid GUID_t of the remote RTPSParticipant. - * @param reason Why the participant is being removed (dropped vs removed) - * @return true if correct. - */ - bool remove_remote_participant( - const GUID_t& participant_guid, - ParticipantDiscoveryInfo::DISCOVERY_STATUS reason) override; - - /** - * Matching server EDP endpoints - * @return true if all servers have been discovered - */ - bool match_servers_EDP_endpoints(); - - /* - * Update the list of remote servers - */ - void update_remote_servers_list(); - -protected: - - /** - * Manually match the local PDP reader with the PDP writer of a given server. The function is - * not thread safe (nts) in the sense that it does not take the PDP mutex. It does however take - * temp_data_lock_ - */ - void match_pdp_writer_nts_( - const eprosima::fastdds::rtps::RemoteServerAttributes& server_att); - - /** - * Manually match the local PDP writer with the PDP reader of a given server. The function is - * not thread safe (nts) in the sense that it does not take the PDP mutex. It does however take - * temp_data_lock_ - */ - void match_pdp_reader_nts_( - const eprosima::fastdds::rtps::RemoteServerAttributes& server_att); - -private: - - /** - * TimedEvent for server synchronization: - * first stage: periodically resend the local RTPSParticipant information until - * all servers have acknowledge reception - * second stage: waiting PDP info is up to date before allowing EDP matching - */ - DSClientEvent* mp_sync; - - //! flag to hightlight we need a server ping announcement - bool _serverPing; - - //! flag to know this client must use super client participant type - bool _super_client; -}; - -} // namespace rtps -} /* namespace fastrtps */ -} /* namespace eprosima */ -#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* _FASTDDS_RTPS_PDPCLIENT_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServer.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServer.h deleted file mode 100644 index 3510e10c3..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServer.h +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPServer.h - * - */ - -#ifndef _FASTDDS_RTPS_PDPSERVER_H_ -#define _FASTDDS_RTPS_PDPSERVER_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include -#include -#include - -// TODO: remove when the Writer API issue is resolved -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class StatefulWriter; -class StatefulReader; -class RemoteWriterAttributes; - -/** - * Class PDPServer manages server side of the discovery server mechanism - *@ingroup DISCOVERY_MODULE - */ -class PDPServer : public PDP -{ - friend class DServerEvent; - friend class PDPServerListener; - - typedef std::set pending_matches_list; - typedef std::set key_list; - - //! EDP pending matches - pending_matches_list _p2match; - - //! Keys to wipe out from WriterHistory because its related Participants have been removed - key_list _demises; - - //! TRANSIENT or TRANSIENT_LOCAL durability; - DurabilityKind_t _durability; - - //! Temporary locator list to solve new Writer API issue - // TODO: remove when the Writer API issue is resolved - std::map clients_; - -public: - - /** - * Constructor - * @param builtin Pointer to the BuiltinProcols object. - * @param allocation participant's allocation settings - * @param durability_kind the kind of persistence we want for the discovery data - */ - PDPServer( - BuiltinProtocols* builtin, - const RTPSParticipantAllocationAttributes& allocation, - DurabilityKind_t durability_kind = TRANSIENT_LOCAL); - ~PDPServer(); - - void initializeParticipantProxyData( - ParticipantProxyData* participant_data) override; - - /** - * Initialize the PDP. - * @param part Pointer to the RTPSParticipant. - * @return True on success - */ - bool init( - RTPSParticipantImpl* part) override; - - /** - * Creates an initializes a new participant proxy from a DATA(p) raw info - * @param p ParticipantProxyData from DATA msg deserialization - * @param writer_guid GUID of originating writer - * @return new ParticipantProxyData * or nullptr on failure - */ - ParticipantProxyData* createParticipantProxyData( - const ParticipantProxyData& p, - const GUID_t& writer_guid) override; - - /** - * Create the SPDP Writer and Reader - * @return True if correct. - */ - bool createPDPEndpoints() override; - - /** - * This method removes a remote RTPSParticipant and all its writers and readers. - * @param participant_guid GUID_t of the remote RTPSParticipant. - * @param reason Why the participant is being removed (dropped vs removed) - * @return true if correct. - */ - bool remove_remote_participant( - const GUID_t& participant_guid, - ParticipantDiscoveryInfo::DISCOVERY_STATUS reason) override; - - /** - * Methods to update WriterHistory with reader information - */ - - /** - * Some History data is flag for defer removal till every client - * acknowledges reception - * @return True if trimming must be done - */ - bool pendingHistoryCleaning(); - - /** - *! Callback to remove unnecesary WriterHistory info from PDP and EDP - * @return True if trimming is completed - */ - bool trimWriterHistory(); - - /** - * Add participant CacheChange_ts from reader to writer - * @param c metatraffic CacheChange_t - * @return True if successfully modified WriterHistory - */ - bool addRelayedChangeToHistory( - CacheChange_t& c); - - /** - * Trigger the participant CacheChange_t removal system - * @param h instanceHandle associated with participants CacheChange_ts - * @return True if successfully modified WriterHistory - */ - void removeParticipantFromHistory( - const InstanceHandle_t& h); - - /** - * Methods to synchronize EDP matching - */ - - /** - * Add a participant to the queue of pending participants to EDP matching - * @param p ParticipantProxyData associated with the new participant - */ - void queueParticipantForEDPMatch( - const ParticipantProxyData* p); - - /** - * Remove a participant from the queue of pending participants to EDP matching - * @param guid GUID associated with the new participant - */ - void removeParticipantForEDPMatch( - const GUID_t& guid); - - /** - * Check if all client have acknowledge the server PDP data - * @return True if all clients known each other - */ - bool all_clients_acknowledge_PDP(); - - /** - * Check if there are pending matches. - * @return True if all participants EDP endpoints are already matched - */ - inline bool pendingEDPMatches() - { - std::lock_guard guardPDP(*mp_mutex); - - return !_p2match.empty(); - } - - //! Matches all clients EDP endpoints - void match_all_clients_EDP_endpoints(); - - /** - * Methods to synchronize with another servers - */ - - /** - * Check if all servers have acknowledge this server PDP data - * This method must be called from a mutex protected context. - * @return True if all can reach the client - */ - bool all_servers_acknowledge_PDP(); - - /** - * Check if we have our PDP received data updated - * This method must be called from a mutex protected context. - * @return True if we known all the participants the servers are aware of - */ - bool is_all_servers_PDPdata_updated(); - - /** - * Matching server EDP endpoints - * @return true if all servers have been discovered - */ - bool match_servers_EDP_endpoints(); - - /** - * Force the sending of our local PDP to all servers - * @param new_change If true a new change (with new seqNum) is created and sent; if false the last change is re-sent - * @param dispose Sets change kind to NOT_ALIVE_DISPOSED_UNREGISTERED - * @param wparams allows to identify the change - */ - void announceParticipantState( - bool new_change, - bool dispose = false, - WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override; - - /** - * These methods wouldn't be needed under perfect server operation (no need of dynamic endpoint allocation) - * but must be implemented to solve server shutdown situations. - * @param pdata Pointer to the RTPSParticipantProxyData object. - */ - void assignRemoteEndpoints( - ParticipantProxyData* pdata) override; - void removeRemoteEndpoints( - ParticipantProxyData* pdata) override; - void notifyAboveRemoteEndpoints( - const ParticipantProxyData& pdata) override; - -#if HAVE_SQLITE3 - //! Get filename for persistence database file - std::string GetPersistenceFileName(); -#endif // if HAVE_SQLITE3 - - //! returns true if loading info from persistency database - bool ongoingDeserialization(); - - //! Process the info recorded in the persistence database - void processPersistentData(); - - //! adds identity info to DATA(p[UD])s in order to keep it through persistance serialization process - static bool set_data_disposal_payload( - CDRMessage_t* msg, - const SampleIdentity& sid); - - //! returns the DATA(p[UD])s size to hint payload allocation - static uint32_t get_data_disposal_payload_serialized_size(); - - //! Wakes up the DServerEvent for new matching or trimming - void awakeServerThread() - { - mp_sync->restart_timer(); - } - -private: - - /** - * Callback to remove unnecesary WriterHistory info from PDP alone - * @return True if trimming is completed - */ - bool trimPDPWriterHistory(); - - /** - * TimedEvent for server synchronization: - * first stage: periodically resend the local RTPSParticipant information until all servers have acknowledge reception - * second stage: waiting PDP info is up to date before allowing EDP matching - */ - DServerEvent* mp_sync; -}; - -} // namespace rtps -} /* namespace rtps */ -} /* namespace eprosima */ -#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* _FASTDDS_RTPS_PDPSERVER_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServerListener.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServerListener.h deleted file mode 100644 index eec0fc03a..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/PDPServerListener.h +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPServerListener.h - * - */ - -#ifndef _FASTDDS_RTPS_PDPSERVERLISTENER_H_ -#define _FASTDDS_RTPS_PDPSERVERLISTENER_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class PDPServer; - -/** - * Class PDPServerListener, specification used by the PDP to perform the History check when a new message is received. - * This class is implemented in order to use the same structure than with any other RTPSReader. - *@ingroup DISCOVERY_MODULE - */ -class PDPServerListener: public PDPListener -{ -public: - /** - * @param in_PDP - */ - PDPServerListener(PDPServer* in_PDP); - - ~PDPServerListener() override = default; - - //!Pointer to the associated mp_SPDP; - PDPServer* parent_server_pdp_; - - /** - * New added cache - * @param reader - * @param change - */ - void onNewCacheChangeAdded( - RTPSReader* reader, - const CacheChange_t* const change) override; -}; - - -} /* namespace rtps */ -} /* namespace fastrtps */ -} /* namespace eprosima */ - -#endif -#endif /* _FASTDDS_RTPS_PDPSERVERLISTENER_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h deleted file mode 100644 index c613926b2..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file DSClientEvent.h - * - */ - -#ifndef _FASTDDS_RTPS_DSCLIENTEVENT_H_ -#define _FASTDDS_RTPS_DSCLIENTEVENT_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class PDPClient; -class EDPClient; - -/** - * Class DSClientEvent, TimedEvent used to synchronize discover-server clients - *@ingroup DISCOVERY_MODULE - */ -class DSClientEvent : public TimedEvent -{ -public: - - /** - * Constructor. - * @param p_PDP Pointer to the PDPClient. - * @param interval Interval in ms. - */ - DSClientEvent( - PDPClient* p_PDP, - double interval); - ~DSClientEvent(); - - /** - * Method invoked when the event occurs. - * This temporal event: - + resends the client RTPSParticipantProxyData to all remote servers. - + matches the EDP endpoints when the servers are all aware of this client existence - */ - bool event(); - - //!Pointer to the PDPServer object. - PDPClient* mp_PDP; - - //!Pointer to the EDPServer object. - EDPClient* mp_EDP; -}; -} // namespace rtps -} /* namespace rtps */ -} /* namespace eprosima */ -#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* _FASTDDS_RTPS_DSCLIENTEVENT_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DServerEvent.h b/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DServerEvent.h deleted file mode 100644 index 840650e5b..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/discovery/participant/timedevent/DServerEvent.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file DServerEvent.h - * - */ - -#ifndef _FASTDDS_RTPS_DSERVEREVENT_H_ -#define _FASTDDS_RTPS_DSERVEREVENT_H_ -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include - -namespace eprosima { -namespace fastrtps{ -namespace rtps { - -class PDPServer; - -/** - * Class DServerEvent, TimedEvent used to synchronize discover-server servers - *@ingroup DISCOVERY_MODULE - */ -class DServerEvent : public TimedEvent { -public: - - /** - * Constructor. - * @param p_PDP Pointer to the PDPServer. - * @param interval Interval in ms. - */ - DServerEvent(PDPServer* p_PDP, - double interval); - ~DServerEvent(); - - /** - * Method invoked when the event occurs. - * This temporal event: - + resends the client RTPSParticipantProxyData to all remote servers. - + matches the EDP endpoints when the servers are all aware of this client existence - */ - bool event(); - - //!Pointer to the PDPServer object. - PDPServer* mp_PDP; - //!Initialize PDP reception when first run - bool messages_enabled_; -}; -} -} /* namespace rtps */ -} /* namespace eprosima */ -#endif -#endif /* _FASTDDS_RTPS_DSERVEREVENT_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/builtin/liveliness/WLP.h b/ThirdParty/ros/include/fastdds/rtps/builtin/liveliness/WLP.h index da5a269bc..3602fc56a 100644 --- a/ThirdParty/ros/include/fastdds/rtps/builtin/liveliness/WLP.h +++ b/ThirdParty/ros/include/fastdds/rtps/builtin/liveliness/WLP.h @@ -74,7 +74,7 @@ class WLP /** * Initialize the WLP protocol. * @param p Pointer to the RTPS participant implementation. - * @return true if the initialziacion was succesful. + * @return true if the initialziacion was successful. */ bool initWL( RTPSParticipantImpl* p); diff --git a/ThirdParty/ros/include/fastdds/rtps/common/CacheChange.h b/ThirdParty/ros/include/fastdds/rtps/common/CacheChange.h index e0f2cc3c3..0acc9169d 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/CacheChange.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/CacheChange.h @@ -35,6 +35,34 @@ namespace eprosima { namespace fastrtps { namespace rtps { +/*! + * Specific information for a writer. + */ +struct CacheChangeWriterInfo_t +{ + //!Number of DATA / DATA_FRAG submessages sent to the transport (only used in Writers) + size_t num_sent_submessages = 0; + //! Used to link with previous node in a list. Used by FlowControllerImpl. + //! Cannot be cached because there are several comparisons without locking. + CacheChange_t* volatile previous = nullptr; + //! Used to link with next node in a list. Used by FlowControllerImpl. + //! Cannot be cached because there are several comparisons without locking. + CacheChange_t* volatile next = nullptr; +}; + +/*! + * Specific information for a reader. + */ +struct CacheChangeReaderInfo_t +{ + //!Reception TimeStamp (only used in Readers) + Time_t receptionTimestamp; + //! Disposed generation of the instance when this entry was added to it + int32_t disposed_generation_count; + //! No-writers generation of the instance when this entry was added to it + int32_t no_writers_generation_count; +}; + /** * Structure CacheChange_t, contains information on a specific CacheChange. * @ingroup COMMON_MODULE @@ -44,28 +72,37 @@ struct RTPS_DllAPI CacheChange_t //!Kind of change, default value ALIVE. ChangeKind_t kind = ALIVE; //!GUID_t of the writer that generated this change. - GUID_t writerGUID; - //!Handle of the data associated wiht this change. - InstanceHandle_t instanceHandle; + GUID_t writerGUID{}; + //!Handle of the data associated with this change. + InstanceHandle_t instanceHandle{}; //!SequenceNumber of the change - SequenceNumber_t sequenceNumber; + SequenceNumber_t sequenceNumber{}; //!Serialized Payload associated with the change. - SerializedPayload_t serializedPayload; + SerializedPayload_t serializedPayload{}; + //!CDR serialization of inlined QoS for this change. + SerializedPayload_t inline_qos{}; //!Indicates if the cache has been read (only used in READERS) bool isRead = false; - //!Source TimeStamp (only used in Readers) - Time_t sourceTimestamp; - //!Reception TimeStamp (only used in Readers) - Time_t receptionTimestamp; + //!Source TimeStamp + Time_t sourceTimestamp{}; + union + { + CacheChangeReaderInfo_t reader_info; + CacheChangeWriterInfo_t writer_info; + }; - WriteParams write_params; + WriteParams write_params{}; bool is_untyped_ = true; /*! * @brief Default constructor. * Creates an empty CacheChange_t. */ - CacheChange_t() = default; + CacheChange_t() + : writer_info() + { + inline_qos.encapsulation = DEFAULT_ENDIAN == LITTLEEND ? PL_CDR_LE : PL_CDR_BE; + } CacheChange_t( const CacheChange_t&) = delete; @@ -98,6 +135,7 @@ struct RTPS_DllAPI CacheChange_t instanceHandle = ch_ptr->instanceHandle; sequenceNumber = ch_ptr->sequenceNumber; sourceTimestamp = ch_ptr->sourceTimestamp; + reader_info.receptionTimestamp = ch_ptr->reader_info.receptionTimestamp; write_params = ch_ptr->write_params; isRead = ch_ptr->isRead; fragment_size_ = ch_ptr->fragment_size_; @@ -120,6 +158,7 @@ struct RTPS_DllAPI CacheChange_t instanceHandle = ch_ptr->instanceHandle; sequenceNumber = ch_ptr->sequenceNumber; sourceTimestamp = ch_ptr->sourceTimestamp; + reader_info.receptionTimestamp = ch_ptr->reader_info.receptionTimestamp; write_params = ch_ptr->write_params; isRead = ch_ptr->isRead; diff --git a/ThirdParty/ros/include/fastdds/rtps/common/EntityId_t.hpp b/ThirdParty/ros/include/fastdds/rtps/common/EntityId_t.hpp index 87a8884b9..08a7ea6f7 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/EntityId_t.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/common/EntityId_t.hpp @@ -73,7 +73,7 @@ struct RTPS_DllAPI EntityId_t { static constexpr unsigned int size = 4; octet value[size]; - //! Default constructor. Uknown entity. + //! Default constructor. Unknown entity. EntityId_t() { *this = ENTITYID_UNKNOWN; @@ -154,17 +154,75 @@ struct RTPS_DllAPI EntityId_t #endif // if !FASTDDS_IS_BIG_ENDIAN_TARGET + /*! + * @brief conversion to uint32_t + * @return uint32_t representation + */ + uint32_t to_uint32() const + { + uint32_t res = *reinterpret_cast(value); + +#if !FASTDDS_IS_BIG_ENDIAN_TARGET + res = ( res >> 24 ) | + (0x0000ff00 & ( res >> 8)) | + (0x00ff0000 & ( res << 8)) | + ( res << 24 ); +#endif // if !FASTDDS_IS_BIG_ENDIAN_TARGET + + return res; + } + static EntityId_t unknown() { return EntityId_t(); } + bool is_reader() const + { + // RTPS Standard table 9.1 + return 0x4u & to_uint32(); + } + + bool is_writer() const + { + // RTPS Standard table 9.1 + return 0x2u & to_uint32() && !is_reader(); + } + + /** + * Entity Id minor operator + * @param other Second entity id to compare + * @return True if \c other is higher than this + */ + bool operator <( + const EntityId_t& other) const + { + return std::memcmp(value, other.value, size) < 0; + } + + /** + * Entity Id compare static method. + * + * @param entity1 First entity id to compare + * @param entity2 Second entity id to compare + * + * @return 0 if \c entity1 is equal to \c entity2 . + * @return < 0 if \c entity1 is lower than \c entity2 . + * @return > 0 if \c entity1 is higher than \c entity2 . + */ + static int cmp( + const EntityId_t& entity1, + const EntityId_t& entity2) + { + return std::memcmp(entity1.value, entity2.value, size); + } + }; #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC /** - * Guid prefix comparison operator + * Entity Id comparison operator * @param id1 EntityId to compare * @param id2 ID prefix to compare * @return True if equal @@ -184,7 +242,7 @@ inline bool operator ==( } /** - * Guid prefix comparison operator + * Entity Id comparison operator * @param id1 First EntityId to compare * @param id2 Second EntityId to compare * @return True if equal @@ -193,14 +251,7 @@ inline bool operator ==( const EntityId_t& id1, const EntityId_t& id2) { - for (uint8_t i = 0; i < 4; ++i) - { - if (id1.value[i] != id2.value[i]) - { - return false; - } - } - return true; + return EntityId_t::cmp(id1, id2) == 0; } /** @@ -213,14 +264,9 @@ inline bool operator !=( const EntityId_t& id1, const EntityId_t& id2) { - for (uint8_t i = 0; i < 4; ++i) - { - if (id1.value[i] != id2.value[i]) - { - return true; - } - } - return false; + // Use == operator as it is faster enough. + // NOTE: this could be done comparing the entities backwards (starting in [3]) as it would probably be faster. + return !(operator ==(id1, id2)); } #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC @@ -331,21 +377,9 @@ struct hash std::size_t operator ()( const eprosima::fastrtps::rtps::EntityId_t& k) const { - // recover the participant entity counter - eprosima::fastrtps::rtps::octet value[4]; - -#if FASTDDS_IS_BIG_ENDIAN_TARGET - value[3] = k.value[2]; - value[2] = k.value[1]; - value[1] = k.value[0]; - value[0] = 0; -#else - value[3] = 0; - value[2] = k.value[0]; - value[1] = k.value[1]; - value[0] = k.value[2]; -#endif // if FASTDDS_IS_BIG_ENDIAN_TARGET - return static_cast(*reinterpret_cast(&value)); + return (static_cast(k.value[0]) << 16) | + (static_cast(k.value[1]) << 8) | + static_cast(k.value[2]); } }; diff --git a/ThirdParty/ros/include/fastdds/rtps/common/Guid.h b/ThirdParty/ros/include/fastdds/rtps/common/Guid.h index 4fdb35a28..a105b1279 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/Guid.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/Guid.h @@ -121,7 +121,6 @@ struct RTPS_DllAPI GUID_t { return *reinterpret_cast(this); } - }; #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC @@ -170,29 +169,19 @@ inline bool operator <( const GUID_t& g1, const GUID_t& g2) { - for (uint8_t i = 0; i < 12; ++i) + auto prefix_cmp = GuidPrefix_t::cmp(g1.guidPrefix, g2.guidPrefix); + if (prefix_cmp < 0) { - if (g1.guidPrefix.value[i] < g2.guidPrefix.value[i]) - { - return true; - } - else if (g1.guidPrefix.value[i] > g2.guidPrefix.value[i]) - { - return false; - } + return true; } - for (uint8_t i = 0; i < 4; ++i) + else if (prefix_cmp > 0) { - if (g1.entityId.value[i] < g2.entityId.value[i]) - { - return true; - } - else if (g1.entityId.value[i] > g2.entityId.value[i]) - { - return false; - } + return false; + } + else + { + return g1.entityId < g2.entityId; } - return false; } #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC diff --git a/ThirdParty/ros/include/fastdds/rtps/common/GuidPrefix_t.hpp b/ThirdParty/ros/include/fastdds/rtps/common/GuidPrefix_t.hpp index 7bcbfb3b9..06f84c6f3 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/GuidPrefix_t.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/common/GuidPrefix_t.hpp @@ -76,7 +76,7 @@ struct RTPS_DllAPI GuidPrefix_t /** * Guid prefix minor operator * @param prefix Second guid prefix to compare - * @return True if prefix is higher + * @return True if prefix is higher than this */ bool operator <( const GuidPrefix_t& prefix) const @@ -84,6 +84,23 @@ struct RTPS_DllAPI GuidPrefix_t return std::memcmp(value, prefix.value, size) < 0; } + /** + * Guid Prefix compare static method. + * + * @param prefix1 First guid prefix to compare + * @param prefix2 Second guid prefix to compare + * + * @return 0 if \c prefix1 is equal to \c prefix2 . + * @return < 0 if \c prefix1 is lower than \c prefix2 . + * @return > 0 if \c prefix1 is higher than \c prefix2 . + */ + static int cmp( + const GuidPrefix_t& prefix1, + const GuidPrefix_t& prefix2) + { + return std::memcmp(prefix1.value, prefix2.value, size); + } + #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC }; @@ -142,6 +159,7 @@ inline std::istream& operator >>( } catch (std::ios_base::failure& ) { + guiP = GuidPrefix_t::unknown(); } input.exceptions(excp_mask); diff --git a/ThirdParty/ros/include/fastdds/rtps/common/InstanceHandle.h b/ThirdParty/ros/include/fastdds/rtps/common/InstanceHandle.h index 7a58e28c9..4adbe9f38 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/InstanceHandle.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/InstanceHandle.h @@ -19,6 +19,8 @@ #ifndef _FASTDDS_RTPS_INSTANCEHANDLE_H_ #define _FASTDDS_RTPS_INSTANCEHANDLE_H_ +#include + #include #include #include @@ -27,6 +29,121 @@ namespace eprosima { namespace fastrtps { namespace rtps { +using KeyHash_t = std::array; + +struct RTPS_DllAPI InstanceHandleValue_t +{ + /** + * Write access indexing operator. + * + * Provides a reference to the byte value at position @c i. + * + * @param [in] i index of the byte to return. + * + * @post Method has_been_set() returns @c true. + * + * @remark Do not use this method to check if this value has been set. + * Use method has_been_set() instead. + */ + template + octet& operator [] ( + T i) noexcept + { + has_been_set_ = true; + return value_[i]; + } + + /** + * Read access indexing operator. + * + * Provides the byte value at position @c i. + * + * @param [in] i index of the byte to return. + * + * @remark Do not use this method to check if this value has been set. + * Use method has_been_set() instead. + */ + template + octet operator [] ( + T i) const noexcept + { + return value_[i]; + } + + /** + * Write access pointer cast operator. + * + * Provides a pointer to the start of the raw data. + * + * @post Method has_been_set() returns @c true. + * + * @remark Do not use this method to check if this value has been set. + * Use method has_been_set() instead. + */ + operator octet* () noexcept + { + has_been_set_ = true; + return value_.data(); + } + + /** + * Read access pointer cast operator. + * + * Provides a pointer to the start of the raw data. + * + * @remark Do not use this method to check if this value has been set. + * Use method has_been_set() instead. + */ + operator const octet* () const noexcept + { + return value_.data(); + } + + /** + * Return whether any of the write access operators of this value has been used. + */ + bool has_been_set() const noexcept + { + return has_been_set_; + } + + void clear() noexcept + { + value_.fill(0); + has_been_set_ = false; + } + + /** + * Equality comparison operator. + */ + bool operator == ( + const InstanceHandleValue_t& other) const noexcept + { + return (has_been_set_ == other.has_been_set_) && (value_ == other.value_); + } + + /** + * Less than comparisor operator. + */ + bool operator < ( + const InstanceHandleValue_t& other) const noexcept + { + if (has_been_set_) + { + return other.has_been_set_ && value_ < other.value_; + } + + return other.has_been_set_; + } + +private: + + //! Hash value + KeyHash_t value_ {}; + //! Flag indicating if value_ has been modified since the creation of this object + bool has_been_set_ = false; +}; + /** * Struct InstanceHandle_t, used to contain the key for WITH_KEY topics. * @ingroup COMMON_MODULE @@ -34,73 +151,36 @@ namespace rtps { struct RTPS_DllAPI InstanceHandle_t { //!Value - octet value[16]; - InstanceHandle_t() - { - for (uint8_t i = 0; i < 16; i++) - { - value[i] = 0; - } - } + InstanceHandleValue_t value; + + InstanceHandle_t() noexcept = default; InstanceHandle_t( - const InstanceHandle_t& ihandle) - { - for (uint8_t i = 0; i < 16; i++) - { - value[i] = ihandle.value[i]; - } - } + const InstanceHandle_t& ihandle) noexcept = default; InstanceHandle_t( - const GUID_t& guid) + const GUID_t& guid) noexcept { - for (uint8_t i = 0; i < 16; ++i) - { - if (i < 12) - { - value[i] = guid.guidPrefix.value[i]; - } - else - { - value[i] = guid.entityId.value[i - 12]; - } - } + *this = guid; } /** - * Assingment operator + * Assignment operator * @param ihandle Instance handle to copy the data from */ InstanceHandle_t& operator =( - const InstanceHandle_t& ihandle) - { - - for (uint8_t i = 0; i < 16; i++) - { - value[i] = ihandle.value[i]; - } - return *this; - } + const InstanceHandle_t& ihandle) noexcept = default; /** - * Assingment operator + * Assignment operator * @param guid GUID to copy the data from */ InstanceHandle_t& operator =( - const GUID_t& guid) + const GUID_t& guid) noexcept { - for (uint8_t i = 0; i < 16; i++) - { - if (i < 12) - { - value[i] = guid.guidPrefix.value[i]; - } - else - { - value[i] = guid.entityId.value[i - 12]; - } - } + octet* dst = value; + memcpy(dst, guid.guidPrefix.value, 12); + memcpy(&dst[12], guid.entityId.value, 4); return *this; } @@ -108,20 +188,18 @@ struct RTPS_DllAPI InstanceHandle_t * Know if the instance handle is defined * @return True if the values are not zero. */ - bool isDefined() const + bool isDefined() const noexcept { - for (uint8_t i = 0; i < 16; ++i) - { - if (value[i] != 0) - { - return true; - } - } - return false; + return value.has_been_set(); + } + + void clear() noexcept + { + value.clear(); } // TODO Review this conversion once InstanceHandle_t is implemented as DDS standard defines - explicit operator const GUID_t&() const + explicit operator const GUID_t&() const noexcept { return *reinterpret_cast(this); } @@ -140,21 +218,21 @@ const InstanceHandle_t c_InstanceHandle_Unknown; */ inline bool operator ==( const InstanceHandle_t& ihandle1, - const InstanceHandle_t& ihandle2) + const InstanceHandle_t& ihandle2) noexcept { - for (uint8_t i = 0; i < 16; ++i) - { - if (ihandle1.value[i] != ihandle2.value[i]) - { - return false; - } - } - return true; + return ihandle1.value == ihandle2.value; } +/** + * @brief Comparison operator + * + * @param ihandle1 First InstanceHandle_t to compare + * @param ihandle2 Second InstanceHandle_t to compare + * @return True if not equal + */ inline bool operator !=( const InstanceHandle_t& ihandle1, - const InstanceHandle_t& ihandle2) + const InstanceHandle_t& ihandle2) noexcept { return !(ihandle1 == ihandle2); } @@ -168,20 +246,11 @@ inline bool operator !=( */ inline void iHandle2GUID( GUID_t& guid, - const InstanceHandle_t& ihandle) + const InstanceHandle_t& ihandle) noexcept { - for (uint8_t i = 0; i < 16; ++i) - { - if (i < 12) - { - guid.guidPrefix.value[i] = ihandle.value[i]; - } - else - { - guid.entityId.value[i - 12] = ihandle.value[i]; - } - } - return; + const octet* value = ihandle.value; + memcpy(guid.guidPrefix.value, value, 12); + memcpy(guid.entityId.value, &value[12], 4); } /** @@ -190,36 +259,35 @@ inline void iHandle2GUID( * @return GUID_t */ inline GUID_t iHandle2GUID( - const InstanceHandle_t& ihandle) + const InstanceHandle_t& ihandle) noexcept { GUID_t guid; - for (uint8_t i = 0; i < 16; ++i) - { - if (i < 12) - { - guid.guidPrefix.value[i] = ihandle.value[i]; - } - else - { - guid.entityId.value[i - 12] = ihandle.value[i]; - } - } + iHandle2GUID(guid, ihandle); return guid; } +/** + * @brief Comparison operator: checks if a InstanceHandle_t is less than another. + * + * @param h1 First InstanceHandle_t to compare. + * @param h2 Second InstanceHandle_t to compare. + * @return True if the first InstanceHandle_t is less than the second. + */ inline bool operator <( const InstanceHandle_t& h1, - const InstanceHandle_t& h2) + const InstanceHandle_t& h2) noexcept { - return memcmp(h1.value, h2.value, 16) < 0; + return h1.value < h2.value; } #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC /** + * Stream operator: print an InstanceHandle_t. * - * @param output - * @param iHandle + * @param output Output stream. + * @param iHandle InstanceHandle_t to print. + * @return Stream operator. */ inline std::ostream& operator <<( std::ostream& output, @@ -235,9 +303,11 @@ inline std::ostream& operator <<( } /** + * Stream operator: retrieve an InstanceHandle_t. * - * @param input - * @param iHandle + * @param input Input stream. + * @param iHandle InstanceHandle_t that will receive the input as its new value. + * @return Stream operator. */ inline std::istream& operator >>( std::istream& input, diff --git a/ThirdParty/ros/include/fastdds/rtps/common/Locator.h b/ThirdParty/ros/include/fastdds/rtps/common/Locator.h index ae69a17ba..10a8578a0 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/Locator.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/Locator.h @@ -22,6 +22,9 @@ #include #include +#include + +#include #include #include @@ -34,40 +37,61 @@ namespace eprosima { namespace fastrtps { namespace rtps { +/// Initialize locator with invalid values #define LOCATOR_INVALID(loc) {loc.kind = LOCATOR_KIND_INVALID; loc.port = LOCATOR_PORT_INVALID; \ LOCATOR_ADDRESS_INVALID(loc.address); \ } +/// Invalid locator kind #define LOCATOR_KIND_INVALID -1 +/// Set locator IP address to 0 #define LOCATOR_ADDRESS_INVALID(a) {std::memset(a, 0x00, 16 * sizeof(octet));} + +/// Invalid locator port #define LOCATOR_PORT_INVALID 0 + +/// Reserved locator kind #define LOCATOR_KIND_RESERVED 0 +/// UDP over IPv4 locator kind #define LOCATOR_KIND_UDPv4 1 +/// UDP over IPv6 locator kind #define LOCATOR_KIND_UDPv6 2 +/// TCP over IPv4 kind #define LOCATOR_KIND_TCPv4 4 +/// TCP over IPv6 locator kind #define LOCATOR_KIND_TCPv6 8 +/// Shared memory locator kind #define LOCATOR_KIND_SHM 16 -//!@brief Class Locator_t, uniquely identifies a communication channel for a particular transport. -//For example, an address+port combination in the case of UDP. -//!@ingroup COMMON_MODULE +/** + * @brief Class Locator_t, uniquely identifies a communication channel for a particular transport. + * For example, an address + port combination in the case of UDP. + * @ingroup COMMON_MODULE + */ class RTPS_DllAPI Locator_t { public: - /*! + /** * @brief Specifies the locator type. Valid values are: + * * LOCATOR_KIND_UDPv4 + * * LOCATOR_KIND_UDPv6 + * * LOCATOR_KIND_TCPv4 + * * LOCATOR_KIND_TCPv6 + * * LOCATOR_KIND_SHM */ int32_t kind; + /// Network port uint32_t port; + /// IP address octet address[16]; - //!Default constructor + /// Default constructor Locator_t() : kind(LOCATOR_KIND_UDPv4) { @@ -75,7 +99,7 @@ class RTPS_DllAPI Locator_t LOCATOR_ADDRESS_INVALID(address); } - //!Move constructor + /// Move constructor Locator_t( Locator_t&& loc) : kind(loc.kind) @@ -84,7 +108,7 @@ class RTPS_DllAPI Locator_t std::memcpy(address, loc.address, 16 * sizeof(octet)); } - //!Copy constructor + /// Copy constructor Locator_t( const Locator_t& loc) : kind(loc.kind) @@ -93,7 +117,7 @@ class RTPS_DllAPI Locator_t std::memcpy(address, loc.address, 16 * sizeof(octet)); } - //!Port constructor + /// Port constructor Locator_t( uint32_t portin) : kind(LOCATOR_KIND_UDPv4) @@ -102,7 +126,7 @@ class RTPS_DllAPI Locator_t LOCATOR_ADDRESS_INVALID(address); } - //!Kind and port constructor + /// Kind and port constructor Locator_t( int32_t kindin, uint32_t portin) @@ -112,6 +136,7 @@ class RTPS_DllAPI Locator_t LOCATOR_ADDRESS_INVALID(address); } + /// Copy assignment Locator_t& operator =( const Locator_t& loc) { @@ -121,6 +146,12 @@ class RTPS_DllAPI Locator_t return *this; } + /** + * @brief Set the locator IP address using another locator. + * + * @param other Locator which IP address is used to set this locator IP address. + * @return always true. + */ bool set_address( const Locator_t& other) { @@ -128,17 +159,31 @@ class RTPS_DllAPI Locator_t return true; } + /** + * @brief Getter for the locator IP address. + * + * @return IP address as octet pointer. + */ octet* get_address() { return address; } + /** + * @brief Getter for a specific field of the locator IP address. + * + * @param field IP address element to be accessed. + * @return Octet value for the specific IP address element. + */ octet get_address( uint16_t field) const { return address[field]; } + /** + * @brief Automatic setter for setting locator IP address to invalid address (0). + */ void set_Invalid_Address() { LOCATOR_ADDRESS_INVALID(address); @@ -146,7 +191,13 @@ class RTPS_DllAPI Locator_t }; - +/** + * @brief Auxiliary method to check that IP address is not invalid (0). + * + * @param loc Locator which IP address is going to be checked. + * @return true if IP address is defined (not 0). + * @return false otherwise. + */ inline bool IsAddressDefined( const Locator_t& loc) { @@ -173,12 +224,27 @@ inline bool IsAddressDefined( return false; } +/** + * @brief Auxiliary method to check that locator kind is not LOCATOR_KIND_INVALID (-1). + * + * @param loc Locator to be checked. + * @return true if the locator kind is not LOCATOR_KIND_INVALID. + * @return false otherwise. + */ inline bool IsLocatorValid( const Locator_t& loc) { return (0 <= loc.kind); } +/** + * @brief Less than operator. + * + * @param loc1 Left hand side locator being compared. + * @param loc2 Right hand side locator being compared. + * @return true if \c loc1 is less than \c loc2. + * @return false otherwise. + */ inline bool operator <( const Locator_t& loc1, const Locator_t& loc2) @@ -186,6 +252,14 @@ inline bool operator <( return memcmp(&loc1, &loc2, sizeof(Locator_t)) < 0; } +/** + * @brief Equal to operator. + * + * @param loc1 Left hand side locator being compared. + * @param loc2 Right hand side locator being compared. + * @return true if \c loc1 is equal to \c loc2. + * @return false otherwise. + */ inline bool operator ==( const Locator_t& loc1, const Locator_t& loc2) @@ -205,6 +279,14 @@ inline bool operator ==( return true; } +/** + * @brief Not equal to operator. + * + * @param loc1 Left hand side locator being compared. + * @param loc2 Right hand side locator being compared. + * @return true if \c loc1 is not equal to \c loc2. + * @return false otherwise. + */ inline bool operator !=( const Locator_t& loc1, const Locator_t& loc2) @@ -212,49 +294,104 @@ inline bool operator !=( return !(loc1 == loc2); } -/* - * kind : address[N] . address[1] . ... . address[16] : port - * N = 0 if IPv6 - * N = 12 if IPv4 +/** + * @brief Insertion operator: serialize a locator + * The serialization format is kind:[address]:port + * \c kind must be one of the following: + * - UDPv4 + * - UDPv6 + * - TCPv4 + * - TCPv6 + * - SHM + * \c address IP address unless \c kind is SHM + * \c port number + * + * @param output Output stream where the serialized locator is appended. + * @param loc Locator to be serialized/inserted. + * @return \c std::ostream& Reference to the output stream with the serialized locator appended. */ inline std::ostream& operator <<( std::ostream& output, const Locator_t& loc) { - output << loc.kind << ":"; + // Stream Locator kind + switch (loc.kind) + { + case LOCATOR_KIND_TCPv4: + { + output << "TCPv4:["; + break; + } + case LOCATOR_KIND_UDPv4: + { + output << "UDPv4:["; + break; + } + case LOCATOR_KIND_TCPv6: + { + output << "TCPv6:["; + break; + } + case LOCATOR_KIND_UDPv6: + { + output << "UDPv6:["; + break; + } + case LOCATOR_KIND_SHM: + { + output << "SHM:["; + break; + } + default: + { + output << "Invalid_locator:[_]:0"; + return output; + } + } + + // Stream address if (loc.kind == LOCATOR_KIND_UDPv4 || loc.kind == LOCATOR_KIND_TCPv4) { - output << (int)loc.address[12] << "." << (int)loc.address[13] - << "." << (int)loc.address[14] << "." << (int)loc.address[15] - << ":" << loc.port; + output << IPLocator::toIPv4string(loc); } else if (loc.kind == LOCATOR_KIND_UDPv6 || loc.kind == LOCATOR_KIND_TCPv6) { - for (uint8_t i = 0; i < 16; ++i) - { - output << (int)loc.address[i]; - if (i < 15) - { - output << "."; - } - } - output << ":" << loc.port; + output << IPLocator::toIPv6string(loc); } else if (loc.kind == LOCATOR_KIND_SHM) { if (loc.address[0] == 'M') { - output << "SHM:M:" << loc.port; + output << "M"; } else { - output << "SHM::" << loc.port; + output << "_"; } } + // Stream port + output << "]:" << loc.port; + return output; } +/** + * @brief Extraction operator: deserialize a locator + * The deserialization format is kind:[address]:port + * \c kind must be one of the following: + * - UDPv4 + * - UDPv6 + * - TCPv4 + * - TCPv6 + * - SHM + * \c address must be either a name which can be resolved by DNS or the IP address unless \c kind is SHM + * \c port number + * + * @param input Input stream where the locator to be deserialized is located. + * @param loc Locator where the deserialized locator is saved. + * @return \c std::istream& Reference to the input stream after extracting the locator. + */ inline std::istream& operator >>( std::istream& input, Locator_t& loc) @@ -263,419 +400,131 @@ inline std::istream& operator >>( if (s) { - char punctuation; - unsigned short kind; - unsigned short value; std::ios_base::iostate excp_mask = input.exceptions(); try { input.exceptions(excp_mask | std::ios_base::failbit | std::ios_base::badbit); - input >> kind >> punctuation; - loc.kind = kind; + // Locator info + int32_t kind; + uint32_t port; + std::string address; + + // Deserialization variables + std::stringbuf sb_kind; + std::stringbuf sb_address; + std::string str_kind; + char punct; - if (kind == LOCATOR_KIND_SHM) + // Check the locator kind + input.get(sb_kind, ':'); + str_kind = sb_kind.str(); + + if (str_kind == "SHM") { - // ignore till second : - input.ignore(16, ':'); - input.get(punctuation); - if (punctuation == 'M') - { - loc.address[0] = 'M'; - input.get(punctuation); - } + kind = LOCATOR_KIND_SHM; } - else if (kind == LOCATOR_KIND_UDPv4 || kind == LOCATOR_KIND_TCPv4) + else if (str_kind == "TCPv4") { - for (int i = 12; i < 15; ++i) - { - input >> value >> punctuation; - if ( punctuation != '.' || value > 255 ) - { - input.setstate(std::ios_base::failbit); - } - loc.address[i] = static_cast(value); - } - - // last value - input >> value >> punctuation; - if ( punctuation != ':' || value > 255 ) - { - input.setstate(std::ios_base::failbit); - } - loc.address[15] = static_cast(value); - + kind = LOCATOR_KIND_TCPv4; } - else if (kind == LOCATOR_KIND_UDPv6 || kind == LOCATOR_KIND_TCPv6) + else if (str_kind == "TCPv6") { - input >> std::hex; - for (int i = 0; i < 15; ++i) - { - input >> value >> punctuation; - if ( punctuation != '.' || value > 255 ) - { - input.setstate(std::ios_base::failbit); - } - loc.address[i] = static_cast(value); - } - - input >> value >> punctuation; - if ( punctuation != ':' || value > 255 ) - { - input.setstate(std::ios_base::failbit); - } - loc.address[15] = static_cast(value); - - input >> std::dec; + kind = LOCATOR_KIND_TCPv6; } - else + else if (str_kind == "UDPv4") { - input.setstate(std::ios_base::failbit); + kind = LOCATOR_KIND_UDPv4; } - input >> value; - loc.port = value; - } - catch (std::ios_base::failure& ) - { - } - - input.exceptions(excp_mask); - } - - return input; -} - -typedef std::vector::iterator LocatorListIterator; -typedef std::vector::const_iterator LocatorListConstIterator; - -/** - * Provides a Locator's iterator interface that can be used by different Locator's - * containers - */ -class LocatorsIterator -{ -public: - - virtual LocatorsIterator& operator ++() = 0; - virtual bool operator ==( - const LocatorsIterator& other) const = 0; - virtual bool operator !=( - const LocatorsIterator& other) const = 0; - virtual const Locator_t& operator *() const = 0; -}; - -/** - * Adapter class that provides a LocatorsIterator interface from a LocatorListConstIterator - */ -class Locators : public LocatorsIterator -{ -public: - - Locators( - const LocatorListConstIterator& it) - : it_(it) - { - } - - Locators( - const Locators& other) - : it_(other.it_) - { - } - - LocatorsIterator& operator ++() - { - ++it_; - return *this; - } - - bool operator ==( - const LocatorsIterator& other) const - { - return it_ == static_cast(other).it_; - } - - bool operator !=( - const LocatorsIterator& other) const - { - return it_ != static_cast(other).it_; - } - - const Locator_t& operator *() const - { - return (*it_); - } - -private: - - LocatorListConstIterator it_; -}; - - -/** - * Class LocatorList_t, a Locator_t vector that doesn't avoid duplicates. - * @ingroup COMMON_MODULE - */ -class LocatorList_t -{ -public: - - RTPS_DllAPI LocatorList_t() - { - } - - RTPS_DllAPI ~LocatorList_t() - { - } - - RTPS_DllAPI LocatorList_t( - const LocatorList_t& list) - : m_locators(list.m_locators) - { - } - - RTPS_DllAPI LocatorList_t( - LocatorList_t&& list) - : m_locators(std::move(list.m_locators)) - { - } - - RTPS_DllAPI LocatorList_t& operator =( - const LocatorList_t& list) - { - m_locators = list.m_locators; - return *this; - } - - RTPS_DllAPI LocatorList_t& operator =( - LocatorList_t&& list) - { - m_locators = std::move(list.m_locators); - return *this; - } - - RTPS_DllAPI bool operator ==( - const LocatorList_t& locator_list) const - { - if (locator_list.m_locators.size() == m_locators.size()) - { - bool returnedValue = true; - - for (auto it = locator_list.m_locators.begin(); returnedValue && - it != locator_list.m_locators.end(); ++it) + else if (str_kind == "UDPv6") { - returnedValue = false; - - for (auto it2 = m_locators.begin(); !returnedValue && it2 != m_locators.end(); ++it2) - { - if (*it == *it2) - { - returnedValue = true; - } - } + kind = LOCATOR_KIND_UDPv6; } - - return returnedValue; - } - - return false; - } - - RTPS_DllAPI LocatorListIterator begin() - { - return m_locators.begin(); - } - - RTPS_DllAPI LocatorListIterator end() - { - return m_locators.end(); - } - - RTPS_DllAPI LocatorListConstIterator begin() const - { - return m_locators.begin(); - } - - RTPS_DllAPI LocatorListConstIterator end() const - { - return m_locators.end(); - } - - RTPS_DllAPI size_t size() const - { - return m_locators.size(); - } - - RTPS_DllAPI LocatorList_t& assign( - const LocatorList_t& list) - { - if (!(*this == list)) - { - m_locators = list.m_locators; - } - return *this; - } - - RTPS_DllAPI void clear() - { - return m_locators.clear(); - } - - RTPS_DllAPI void reserve( - size_t num) - { - return m_locators.reserve(num); - } - - RTPS_DllAPI void resize( - size_t num) - { - return m_locators.resize(num); - } - - RTPS_DllAPI void push_back( - const Locator_t& loc) - { - bool already = false; - for (LocatorListIterator it = this->begin(); it != this->end(); ++it) - { - if (loc == *it) + else { - already = true; - break; + kind = LOCATOR_KIND_INVALID; } - } - if (!already) - { - m_locators.push_back(loc); - } - } - RTPS_DllAPI void push_back( - const LocatorList_t& locList) - { - for (auto it = locList.m_locators.begin(); it != locList.m_locators.end(); ++it) - { - this->push_back(*it); - } - } + // Get chars :[ + input >> punct >> punct; - RTPS_DllAPI bool empty() const - { - return m_locators.empty(); - } + // Get address in string + input.get(sb_address, ']'); + address = sb_address.str(); - RTPS_DllAPI void erase( - const Locator_t& loc) - { - auto it = std::find(m_locators.begin(), m_locators.end(), loc); - if (it != m_locators.end()) - { - m_locators.erase(it); - } - } - - RTPS_DllAPI bool contains( - const Locator_t& loc) - { - for (LocatorListIterator it = this->begin(); it != this->end(); ++it) - { - if (IsAddressDefined(*it)) + // check if this is a valid IPv4 or IPv6 and call DNS if not + if ((kind == LOCATOR_KIND_UDPv4 || kind == LOCATOR_KIND_TCPv4) && + !IPLocator::isIPv4(address)) { - if (loc == *it) + auto addresses = IPLocator::resolveNameDNS(address); + if (addresses.first.empty()) { - return true; + loc.kind = LOCATOR_KIND_INVALID; + logWarning(LOCATOR, "Error deserializing Locator"); + return input; } + address = *addresses.first.begin(); } - else + if ((kind == LOCATOR_KIND_UDPv6 || kind == LOCATOR_KIND_TCPv6) && + !IPLocator::isIPv6(address)) { - if (loc.kind == (*it).kind && loc.port == (*it).port) + auto addresses = IPLocator::resolveNameDNS(address); + if (addresses.second.empty()) { - return true; + loc.kind = LOCATOR_KIND_INVALID; + logWarning(LOCATOR, "Error deserializing Locator"); + return input; } + address = *addresses.second.begin(); } - } - return false; - } + // Get char ]: + input >> punct >> punct; - RTPS_DllAPI bool isValid() const - { - for (LocatorListConstIterator it = this->begin(); it != this->end(); ++it) + // Get port + input >> port; + + IPLocator::createLocator(kind, address, port, loc); + } + catch (std::ios_base::failure& ) { - if (!IsLocatorValid(*it)) - { - return false; - } + loc.kind = LOCATOR_KIND_INVALID; + logWarning(LOCATOR, "Error deserializing Locator"); } - return true; - } - RTPS_DllAPI void swap( - LocatorList_t& locatorList) - { - this->m_locators.swap(locatorList.m_locators); - } - - friend std::ostream& operator <<( - std::ostream& output, - const LocatorList_t& loc); - -private: - - std::vector m_locators; -}; - -inline std::ostream& operator <<( - std::ostream& output, - const LocatorList_t& locList) -{ - for (auto it = locList.m_locators.begin(); it != locList.m_locators.end(); ++it) - { - output << *it << ","; + input.exceptions(excp_mask); } - return output; + return input; } -inline std::istream& operator >>( - std::istream& input, - LocatorList_t& locList) -{ - std::istream::sentry s(input); +typedef std::vector::iterator LocatorListIterator; +typedef std::vector::const_iterator LocatorListConstIterator; - if (s) - { - char coma; - Locator_t l; - std::ios_base::iostate excp_mask = input.exceptions(); +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima - try - { - input.exceptions(excp_mask | std::ios_base::failbit | std::ios_base::badbit); +namespace eprosima { +namespace fastdds { +namespace rtps { - input >> l; - locList.push_back(l); +using Locator = eprosima::fastrtps::rtps::Locator_t; - for (int i = 1; i < 12; ++i) - { - input >> coma >> l; - if ( coma != ',' ) - { - input.setstate(std::ios_base::failbit); - } - locList.push_back(l); - } - } - catch (std::ios_base::failure& ) - { - } +} // namespace rtps +} // namespace fastdds +} // namespace eprosima - input.exceptions(excp_mask); - } +#include +#include - return input; -} +namespace eprosima { +namespace fastrtps { +namespace rtps { + +using LocatorsIterator = eprosima::fastdds::rtps::LocatorsIterator; +using Locators = eprosima::fastdds::rtps::Locators; +using LocatorList_t = eprosima::fastdds::rtps::LocatorList; } // namespace rtps } // namespace fastrtps diff --git a/ThirdParty/ros/include/fastdds/rtps/common/LocatorList.hpp b/ThirdParty/ros/include/fastdds/rtps/common/LocatorList.hpp new file mode 100644 index 000000000..a5fb67b94 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/common/LocatorList.hpp @@ -0,0 +1,472 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LocatorList.hpp + */ + +#ifndef _FASTDDS_RTPS_COMMON_LOCATORLIST_HPP_ +#define _FASTDDS_RTPS_COMMON_LOCATORLIST_HPP_ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/// Iterator to iterate over a vector of locators. +typedef std::vector::iterator LocatorListIterator; +/// Constant iterator to iterate over a vector of locators. +typedef std::vector::const_iterator LocatorListConstIterator; + +/** + * Adapter class that provides a LocatorsIterator interface from a LocatorListConstIterator + */ +class Locators : public LocatorsIterator +{ +public: + + /// Constructor + Locators( + const LocatorListConstIterator& it) + : it_(it) + { + } + + /// Copy constructor + Locators( + const Locators& other) + : it_(other.it_) + { + } + + LocatorsIterator& operator ++() + { + ++it_; + return *this; + } + + bool operator ==( + const LocatorsIterator& other) const + { + return it_ == static_cast(other).it_; + } + + bool operator !=( + const LocatorsIterator& other) const + { + return it_ != static_cast(other).it_; + } + + const Locator& operator *() const + { + return (*it_); + } + +private: + + LocatorListConstIterator it_; +}; + +/** + * Class LocatorList, a Locator vector that doesn't allow duplicates. + * @ingroup COMMON_MODULE + */ +class LocatorList +{ +public: + + /// Constructor + RTPS_DllAPI LocatorList() + { + } + + /// Destructor + RTPS_DllAPI ~LocatorList() + { + } + + /// Copy constructor + RTPS_DllAPI LocatorList( + const LocatorList& list) + : m_locators(list.m_locators) + { + } + + /// Move constructor + RTPS_DllAPI LocatorList( + LocatorList&& list) + : m_locators(std::move(list.m_locators)) + { + } + + /// Copy assignment + RTPS_DllAPI LocatorList& operator =( + const LocatorList& list) + { + m_locators = list.m_locators; + return *this; + } + + /// Move assignment + RTPS_DllAPI LocatorList& operator =( + LocatorList&& list) + { + m_locators = std::move(list.m_locators); + return *this; + } + + /// Equal to operator + RTPS_DllAPI bool operator ==( + const LocatorList& locator_list) const + { + if (locator_list.m_locators.size() == m_locators.size()) + { + bool returnedValue = true; + + for (auto it = locator_list.m_locators.begin(); returnedValue && + it != locator_list.m_locators.end(); ++it) + { + returnedValue = false; + + for (auto it2 = m_locators.begin(); !returnedValue && it2 != m_locators.end(); ++it2) + { + if (*it == *it2) + { + returnedValue = true; + } + } + } + + return returnedValue; + } + + return false; + } + + /** + * @brief Return an iterator to the beginning. + * + * @return LocatorListIterator iterator to the first locator. + */ + RTPS_DllAPI LocatorListIterator begin() + { + return m_locators.begin(); + } + + /** + * @brief Return an iterator to the end. + * + * @return LocatorListIterator iterator to the element following the last element. + */ + RTPS_DllAPI LocatorListIterator end() + { + return m_locators.end(); + } + + /** + * @brief Return a constant iterator to the beginning. + * + * @return LocatorListConstIterator iterator to the first locator. + */ + RTPS_DllAPI LocatorListConstIterator begin() const + { + return m_locators.begin(); + } + + /** + * @brief Return a constant iterator to the end. + * + * @return LocatorListConstIterator iterator to the element following the last element. + */ + RTPS_DllAPI LocatorListConstIterator end() const + { + return m_locators.end(); + } + + /** + * @brief Return the number of locators. + * + * @return size_t The number of locators in the container. + */ + RTPS_DllAPI size_t size() const + { + return m_locators.size(); + } + + /** + * @brief Replace the contents of the container. + * + * @param list New content to be saved into the container. + * @return LocatorList& reference to the container with the replaced content. + */ + RTPS_DllAPI LocatorList& assign( + const LocatorList& list) + { + if (!(*this == list)) + { + m_locators = list.m_locators; + } + return *this; + } + + /** + * @brief Erase all locators from the container. + */ + RTPS_DllAPI void clear() + { + return m_locators.clear(); + } + + /** + * @brief Reserve storage increasing the capacity of the vector. + * + * @param num new capacity of the vector, in number of elements. + */ + RTPS_DllAPI void reserve( + size_t num) + { + return m_locators.reserve(num); + } + + /** + * @brief Resize the container to contain @c num locators. + * If the current size is greater than @c num, the container is reduced to its first @c num locators. + * If the current size is less than count, additional default-inserted locators are appended. + * + * @param num new size of the container. + */ + RTPS_DllAPI void resize( + size_t num) + { + return m_locators.resize(num); + } + + /** + * @brief Add locator to the end if not found within the list. + * + * @param loc locator to be appended. + */ + RTPS_DllAPI void push_back( + const Locator& loc) + { + bool already = false; + for (LocatorListIterator it = this->begin(); it != this->end(); ++it) + { + if (loc == *it) + { + already = true; + break; + } + } + if (!already) + { + m_locators.push_back(loc); + } + } + + /** + * @brief Add several locators to the end if not already present within the list. + * + * @param locList LocatorList with the locators to be appended. + */ + RTPS_DllAPI void push_back( + const LocatorList& locList) + { + for (auto it = locList.m_locators.begin(); it != locList.m_locators.end(); ++it) + { + this->push_back(*it); + } + } + + /** + * @brief Check that the container has no locators. + * + * @return true if the container is empty. False otherwise. + */ + RTPS_DllAPI bool empty() const + { + return m_locators.empty(); + } + + /** + * @brief Erase the specified locator from the container. + * + * @param loc Locator to be removed. + */ + RTPS_DllAPI void erase( + const Locator& loc) + { + auto it = std::find(m_locators.begin(), m_locators.end(), loc); + if (it != m_locators.end()) + { + m_locators.erase(it); + } + } + + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::rtps::LocatorList::contains(const Locator&)", + "Unused method.") + RTPS_DllAPI bool contains( + const Locator& loc) + { + for (LocatorListIterator it = this->begin(); it != this->end(); ++it) + { + if (IsAddressDefined(*it)) + { + if (loc == *it) + { + return true; + } + } + else + { + if (loc.kind == (*it).kind && loc.port == (*it).port) + { + return true; + } + } + } + + return false; + } + + /** + * @brief Check that every locator contained in the list is not LOCATOR_KIND_INVALID. + * + * @return true if all locators are valid. False otherwise. + */ + RTPS_DllAPI bool isValid() const + { + for (LocatorListConstIterator it = this->begin(); it != this->end(); ++it) + { + if (!IsLocatorValid(*it)) + { + return false; + } + } + return true; + } + + /** + * @brief exchange the content of the container. + * + * @param locatorList container to exchange the contents with. + */ + RTPS_DllAPI void swap( + LocatorList& locatorList) + { + this->m_locators.swap(locatorList.m_locators); + } + +private: + + std::vector m_locators; +}; + +/** + * @brief Insertion operator: serialize a locator list. + * The deserialization format is [locator1,locator2,...,locatorN]. + * Each individual locator within the list must follow the serialization format explained in the locator insertion + * operator. + * + * @param output Output stream where the serialized locator list is appended. + * @param locList Locator list to be serialized/inserted. + * @return \c std::ostream& Reference to the output stream with the serialized locator list appended. + */ +inline std::ostream& operator <<( + std::ostream& output, + const LocatorList& locList) +{ + output << "["; + if (!locList.empty()) + { + output << *(locList.begin()); + for (auto it = locList.begin() + 1; it != locList.end(); ++it) + { + output << "," << *it; + } + } + else + { + output << "_"; + } + output << "]"; + return output; +} + +/** + * @brief Extraction operator: deserialize a list of locators. + * The serialization format is [locator1,locator2,...,locatorN]. + * Each individual locator within the list must follow the deserialization format explained in the locator + * extraction operator. + * + * @param input Input stream where the locator list to be deserialized is located. + * @param locList Locator list where the deserialized locators are saved. + * @return \c std::istream& Reference to the input stream after extracting the locator list. + */ +inline std::istream& operator >>( + std::istream& input, + LocatorList& locList) +{ + std::istream::sentry s(input); + locList = LocatorList(); + + if (s) + { + char punct; + Locator loc; + std::ios_base::iostate excp_mask = input.exceptions(); + + try + { + input.exceptions(excp_mask | std::ios_base::failbit | std::ios_base::badbit); + + // Get [ + input >> punct; + + while (punct != ']') + { + input >> loc >> punct; + if (loc.kind != LOCATOR_KIND_INVALID) + { + locList.push_back(loc); + } + } + } + catch (std::ios_base::failure& ) + { + locList.clear(); + logWarning(LOCATOR_LIST, "Error deserializing LocatorList"); + } + + input.exceptions(excp_mask); + } + + return input; +} + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif /* _FASTDDS_RTPS_COMMON_LOCATORLIST_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/common/LocatorListComparisons.hpp b/ThirdParty/ros/include/fastdds/rtps/common/LocatorListComparisons.hpp index bfe5f440b..baf0456d8 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/LocatorListComparisons.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/common/LocatorListComparisons.hpp @@ -27,6 +27,14 @@ namespace eprosima { namespace fastrtps { namespace rtps { +/** + * @brief Equal to operator to compare two locator lists. + * + * @param lhs Locator list to be compared. + * @param rhs Other locator list to be compared. + * @return true if the list are equal. + * @return false otherwise. + */ static inline bool operator == ( const ResourceLimitedVector& lhs, const ResourceLimitedVector& rhs) diff --git a/ThirdParty/ros/include/fastdds/rtps/common/LocatorSelectorEntry.hpp b/ThirdParty/ros/include/fastdds/rtps/common/LocatorSelectorEntry.hpp index abbd2cb5a..0196adf84 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/LocatorSelectorEntry.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/common/LocatorSelectorEntry.hpp @@ -33,7 +33,7 @@ namespace rtps { * An entry for the @ref LocatorSelector. * * This class holds the locators of a remote endpoint along with data required for the locator selection algorithm. - * Can be easyly integrated inside other classes, such as @ref ReaderProxyData and @ref WriterProxyData. + * Can be easily integrated inside other classes, such as @ref ReaderProxyData and @ref WriterProxyData. */ struct LocatorSelectorEntry { @@ -85,7 +85,8 @@ struct LocatorSelectorEntry * * @param should_enable Whether this entry should be enabled. */ - void enable(bool should_enable) + void enable( + bool should_enable) { enabled = should_enable && remote_guid != c_Guid_Unknown; } diff --git a/ThirdParty/ros/include/fastdds/rtps/common/LocatorsIterator.hpp b/ThirdParty/ros/include/fastdds/rtps/common/LocatorsIterator.hpp new file mode 100644 index 000000000..b9480237f --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/common/LocatorsIterator.hpp @@ -0,0 +1,70 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file LocatorsIterator.hpp + */ + +#ifndef _FASTDDS_RTPS_COMMON_LOCATORSITERATOR_HPP_ +#define _FASTDDS_RTPS_COMMON_LOCATORSITERATOR_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/** + * Provides a Locator's iterator interface that can be used by different Locator's + * containers + */ +struct LocatorsIterator +{ + /** + * @brief Increment operator. + * + * @return LocatorsIterator& reference to the next LocatorsIterator. + */ + virtual LocatorsIterator& operator ++() = 0; + /** + * @brief Equal to operator. + * + * @param other LocatorsIterator to compare. + * @return true if equal. + * @return false otherwise. + */ + virtual bool operator ==( + const LocatorsIterator& other) const = 0; + /** + * @brief Not equal to operator. + * + * @param other LocatorsIterator to compare. + * @return true if not equal. + * @return false otherwise. + */ + virtual bool operator !=( + const LocatorsIterator& other) const = 0; + /** + * @brief Dereference operator. + * + * @return const Locator& Reference to the locator pointed by the LocatorsIterator. + */ + virtual const Locator& operator *() const = 0; +}; + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif /* _FASTDDS_RTPS_COMMON_LOCATORSITERATOR_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/common/PortParameters.h b/ThirdParty/ros/include/fastdds/rtps/common/PortParameters.h index aa9280410..8bee52bf3 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/PortParameters.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/PortParameters.h @@ -23,7 +23,7 @@ #include namespace eprosima { -namespace fastrtps{ +namespace fastrtps { namespace rtps { /** @@ -33,19 +33,24 @@ namespace rtps { class PortParameters { public: + PortParameters() - : portBase(7400), - domainIDGain(250), - participantIDGain(2), - offsetd0(0), - offsetd1(10), - offsetd2(1), - offsetd3(11) - {} - - virtual ~PortParameters(){} - - bool operator==(const PortParameters& b) const + : portBase(7400) + , domainIDGain(250) + , participantIDGain(2) + , offsetd0(0) + , offsetd1(10) + , offsetd2(1) + , offsetd3(11) + { + } + + virtual ~PortParameters() + { + } + + bool operator ==( + const PortParameters& b) const { return (this->portBase == b.portBase) && (this->domainIDGain == b.domainIDGain) && @@ -62,39 +67,43 @@ class PortParameters * @param domainId Domain ID. * @return Multicast port */ - inline uint32_t getMulticastPort(uint32_t domainId) const + inline uint32_t getMulticastPort( + uint32_t domainId) const { uint32_t port = portBase + domainIDGain * domainId + offsetd0; if (port > 65535) { logError(RTPS, "Calculated port number is too high. Probably the domainId is over 232 " - << "or portBase is too high."); + << "or portBase is too high."); std::cout << "Calculated port number is too high. Probably the domainId is over 232 " - << "or portBase is too high." << std::endl; + << "or portBase is too high." << std::endl; std::cout.flush(); exit(EXIT_FAILURE); } return port; } + /** - * Get a unicast port baes on the domain ID and the participant ID. + * Get a unicast port based on the domain ID and the participant ID. * * @param domainId Domain ID. * @param RTPSParticipantID Participant ID. * @return Unicast port */ - inline uint32_t getUnicastPort(uint32_t domainId,uint32_t RTPSParticipantID) const + inline uint32_t getUnicastPort( + uint32_t domainId, + uint32_t RTPSParticipantID) const { - uint32_t port = portBase + domainIDGain * domainId + offsetd1 + participantIDGain * RTPSParticipantID; + uint32_t port = portBase + domainIDGain * domainId + offsetd1 + participantIDGain * RTPSParticipantID; if (port > 65535) { logError(RTPS, "Calculated port number is too high. Probably the domainId is over 232, there are " - << "too much participants created or portBase is too high."); + << "too much participants created or portBase is too high."); std::cout << "Calculated port number is too high. Probably the domainId is over 232, there are " - << "too much participants created or portBase is too high." << std::endl; + << "too much participants created or portBase is too high." << std::endl; std::cout.flush(); exit(EXIT_FAILURE); } @@ -103,6 +112,7 @@ class PortParameters } public: + //!PortBase, default value 7400. uint16_t portBase; //!DomainID gain, default value 250. @@ -119,7 +129,7 @@ class PortParameters uint16_t offsetd3; }; -} +} // namespace rtps } /* namespace rtps */ } /* namespace eprosima */ diff --git a/ThirdParty/ros/include/fastdds/rtps/common/RemoteLocators.hpp b/ThirdParty/ros/include/fastdds/rtps/common/RemoteLocators.hpp index 932c3c5ed..d19d5afa1 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/RemoteLocators.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/common/RemoteLocators.hpp @@ -21,6 +21,7 @@ #include #include +#include namespace eprosima { namespace fastrtps { @@ -138,19 +139,31 @@ inline std::ostream& operator <<( std::ostream& output, const RemoteLocatorList& remote_locators) { - output << remote_locators.multicast.max_size() << ","; - output << remote_locators.multicast.size() << ","; - output << remote_locators.unicast.max_size() << ","; - output << remote_locators.unicast.size() << "("; - for (auto it = remote_locators.multicast.begin(); it != remote_locators.multicast.end(); ++it) + // Stored multicast locators + output << "{"; + if (!remote_locators.multicast.empty()) { - output << *it << ","; + output << "MULTICAST:["; + output << remote_locators.multicast[0]; + for (auto it = remote_locators.multicast.begin() + 1; it != remote_locators.multicast.end(); ++it) + { + output << "," << *it; + } + output << "]"; } - for (auto it = remote_locators.unicast.begin(); it != remote_locators.unicast.end(); ++it) + + // Stored unicast locators + if (!remote_locators.unicast.empty()) { - output << *it << ","; + output << "UNICAST:["; + output << remote_locators.unicast[0]; + for (auto it = remote_locators.unicast.begin() + 1; it != remote_locators.unicast.end(); ++it) + { + output << "," << *it; + } + output << "]"; } - output << ")"; + output << "}"; return output; } @@ -159,46 +172,59 @@ inline std::istream& operator >>( RemoteLocatorList& locList) { std::istream::sentry s(input); + locList = RemoteLocatorList(); if (s) { - unsigned long size_m, size_m_max, size_u, size_u_max; - char coma; + char punct; + char letter; Locator_t l; std::ios_base::iostate excp_mask = input.exceptions(); try { input.exceptions(excp_mask | std::ios_base::failbit | std::ios_base::badbit); + std::stringbuf sb_aux; + Locator_t locator; - input >> size_m_max >> coma >> size_m >> coma; - input >> size_u_max >> coma >> size_u >> coma; // last coma is ( + // Read {_ + input >> punct >> letter; - // locList = RemoteLocatorList(size_u_max, size_m_max); - - for (unsigned int i = 0; i < size_m; ++i) + if (letter == 'M') { - input >> l >> coma; - if ( coma != ',') + input.get(sb_aux, '['); + + // Read every locator + while (punct != ']') { - input.setstate(std::ios_base::failbit); + input >> locator; + locList.add_multicast_locator(locator); + input >> punct; } - locList.add_multicast_locator(l); + + input >> letter; } - for (unsigned int i = 0; i < size_u; ++i) + if (letter == 'U') { - input >> l >> coma; - if ( coma != ',') + input >> punct; + + // Read every locator + while (punct != ']') { - input.setstate(std::ios_base::failbit); + input >> locator; + locList.add_unicast_locator(locator); + input >> punct; } - locList.add_unicast_locator(l); + + input >> letter; } - input >> coma; // read ) } catch (std::ios_base::failure& ) { + locList.unicast.clear(); + locList.multicast.clear(); + logWarning(REMOTE_LOCATOR_LIST, "Error deserializing RemoteLocatorList"); } input.exceptions(excp_mask); diff --git a/ThirdParty/ros/include/fastdds/rtps/common/SequenceNumber.h b/ThirdParty/ros/include/fastdds/rtps/common/SequenceNumber.h index 1155f4e2f..90f737a1a 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/SequenceNumber.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/SequenceNumber.h @@ -18,14 +18,16 @@ #ifndef _FASTDDS_RPTS_ELEM_SEQNUM_H_ #define _FASTDDS_RPTS_ELEM_SEQNUM_H_ -#include -#include -#include #include #include +#include #include +#include +#include +#include + namespace eprosima { namespace fastrtps { namespace rtps { @@ -84,6 +86,7 @@ struct RTPS_DllAPI SequenceNumber_t ++low; if (low == 0) { + assert(std::numeric_limits::max() > high); ++high; } @@ -112,6 +115,7 @@ struct RTPS_DllAPI SequenceNumber_t if (low < aux_low) { // Being the type of the parameter an 'int', the increment of 'high' will be as much as 1. + assert(std::numeric_limits::max() > high); ++high; } @@ -228,8 +232,8 @@ inline bool operator <=( /** * Subtract one uint32_t from a SequenceNumber_t * @param seq Base SequenceNumber_t - * @param inc uint32_t to substract - * @return Result of the substraction + * @param inc uint32_t to subtract + * @return Result of the subtraction */ inline SequenceNumber_t operator -( const SequenceNumber_t& seq, @@ -240,6 +244,7 @@ inline SequenceNumber_t operator -( if (inc > seq.low) { // Being the type of the parameter an 'uint32_t', the decrement of 'high' will be as much as 1. + assert(0 < res.high); --res.high; } @@ -261,6 +266,7 @@ inline SequenceNumber_t operator +( if (res.low < seq.low) { // Being the type of the parameter an 'uint32_t', the increment of 'high' will be as much as 1. + assert(std::numeric_limits::max() > res.high); ++res.high; } @@ -282,6 +288,7 @@ inline SequenceNumber_t operator -( if (minuend.low < subtrahend.low) { + assert(0 < res.high); --res.high; } @@ -290,7 +297,7 @@ inline SequenceNumber_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -const SequenceNumber_t c_SequenceNumber_Unknown(-1, 0); +const SequenceNumber_t c_SequenceNumber_Unknown{-1, 0}; #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC diff --git a/ThirdParty/ros/include/fastdds/rtps/common/SerializedPayload.h b/ThirdParty/ros/include/fastdds/rtps/common/SerializedPayload.h index e8198fb90..17e2aeea6 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/SerializedPayload.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/SerializedPayload.h @@ -53,6 +53,9 @@ namespace rtps { //!@ingroup COMMON_MODULE struct RTPS_DllAPI SerializedPayload_t { + //!Size in bytes of the representation header as specified in the RTPS 2.3 specification chapter 10. + static constexpr size_t representation_header_size = 4u; + //!Encapsulation of the data as suggested in the RTPS 2.1 specification chapter 10. uint16_t encapsulation; //!Actual length of the data @@ -121,6 +124,10 @@ struct RTPS_DllAPI SerializedPayload_t } } encapsulation = serData->encapsulation; + if (length == 0) + { + return true; + } memcpy(data, serData->data, length); return true; } diff --git a/ThirdParty/ros/include/fastdds/rtps/common/Time_t.h b/ThirdParty/ros/include/fastdds/rtps/common/Time_t.h index 63499877e..a7d325731 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/Time_t.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/Time_t.h @@ -23,10 +23,6 @@ #include #include -// defines to avoid the "static initialization order fiasco" -#define TIME_T_INFINITE_SECONDS 0x7fffffff -#define TIME_T_INFINITE_NANOSECONDS 0xffffffff - namespace eprosima { namespace fastrtps { @@ -36,6 +32,9 @@ namespace fastrtps { */ struct RTPS_DllAPI Time_t { + static constexpr int32_t INFINITE_SECONDS = 0x7fffffff; + static constexpr uint32_t INFINITE_NANOSECONDS = 0xffffffffu; + int32_t seconds; uint32_t nanosec; @@ -66,6 +65,11 @@ struct RTPS_DllAPI Time_t */ int64_t to_ns() const; + inline bool is_infinite() const noexcept + { + return is_infinite(*this); + } + /** * Fills a Time_t struct with a representation of the current time. * @@ -73,6 +77,13 @@ struct RTPS_DllAPI Time_t */ static void now( Time_t& ret); + + static inline constexpr bool is_infinite( + const Time_t& t) noexcept + { + return (INFINITE_SECONDS == t.seconds) || (INFINITE_NANOSECONDS == t.nanosec); + } + }; using Duration_t = Time_t; @@ -88,7 +99,7 @@ class RTPS_DllAPI Time_t public: //! Default constructor. Sets values to zero. - Time_t(); + Time_t() = default; /** * @param sec Seconds @@ -115,6 +126,12 @@ class RTPS_DllAPI Time_t */ int64_t to_ns() const; + /** + * @param nanosecs Stores given time as nanoseconds (including seconds) + */ + void from_ns( + int64_t nanosecs); + /** * Retrieve the seconds field. */ @@ -147,6 +164,11 @@ class RTPS_DllAPI Time_t */ uint32_t fraction() const; + /** + * Retrieve the fraction field by ref. + */ + uint32_t& fraction(); + /** * Sets fraction field and updates the nanoseconds. */ @@ -169,13 +191,13 @@ class RTPS_DllAPI Time_t private: //!Seconds - int32_t seconds_; + int32_t seconds_ = 0; //!Fraction of second (1 fraction = 1/(2^32) seconds) - uint32_t fraction_; + uint32_t fraction_ = 0; //!Nanoseconds - uint32_t nanosec_; + uint32_t nanosec_ = 0; void set_fraction( uint32_t frac); @@ -260,10 +282,10 @@ static inline bool operator <( } /** - * Checks if a Time_t is greather than other. + * Checks if a Time_t is greater than other. * @param t1 First Time_t to compare * @param t2 Second Time_t to compare - * @return True if the first Time_t is greather than the second + * @return True if the first Time_t is greater than the second */ static inline bool operator >( const Time_t& t1, @@ -322,10 +344,10 @@ static inline bool operator <=( } /** - * Checks if a Time_t is greather or equal than other. + * Checks if a Time_t is greater or equal than other. * @param t1 First Time_t to compare * @param t2 Second Time_t to compare - * @return True if the first Time_t is greather or equal than the second + * @return True if the first Time_t is greater or equal than the second */ static inline bool operator >=( const Time_t& t1, @@ -417,9 +439,9 @@ static inline Time_t operator +( } /** - * Substracts two Time_t. - * @param ta First Time_t to substract - * @param tb Second Time_t to substract + * Subtracts two Time_t. + * @param ta First Time_t to subtract + * @param tb Second Time_t to subtract * @return A new Time_t with the result. */ static inline Time_t operator -( @@ -436,9 +458,9 @@ static inline Time_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -const Time_t c_RTPSTimeInfinite(0x7fffffff, 0xffffffff); -const Time_t c_RTPSTimeZero(0, 0); -const Time_t c_RTPSTimeInvalid(-1, 0xffffffff); +const Time_t c_RTPSTimeInfinite{0x7fffffff, 0xffffffff}; +const Time_t c_RTPSTimeZero{0, 0}; +const Time_t c_RTPSTimeInvalid{-1, 0xffffffff}; } // namespace rtps @@ -518,10 +540,10 @@ static inline bool operator <( } /** - * Checks if a Time_t is greather than other. + * Checks if a Time_t is greater than other. * @param t1 First Time_t to compare * @param t2 Second Time_t to compare - * @return True if the first Time_t is greather than the second + * @return True if the first Time_t is greater than the second */ static inline bool operator >( const Time_t& t1, @@ -580,10 +602,10 @@ static inline bool operator <=( } /** - * Checks if a Time_t is greather or equal than other. + * Checks if a Time_t is greater or equal than other. * @param t1 First Time_t to compare * @param t2 Second Time_t to compare - * @return True if the first Time_t is greather or equal than the second + * @return True if the first Time_t is greater or equal than the second */ static inline bool operator >=( const Time_t& t1, @@ -637,9 +659,9 @@ static inline Time_t operator +( } /** - * Substracts two Time_t. - * @param ta First Time_t to substract - * @param tb Second Time_t to substract + * Subtracts two Time_t. + * @param ta First Time_t to subtract + * @param tb Second Time_t to subtract * @return A new Time_t with the result. */ static inline Time_t operator -( @@ -657,13 +679,17 @@ static inline Time_t operator -( #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC //! Time_t (Duration_t) representing an infinite time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeInfinite(TIME_T_INFINITE_SECONDS, TIME_T_INFINITE_NANOSECONDS); +const Time_t c_TimeInfinite{Time_t::INFINITE_SECONDS, Time_t::INFINITE_NANOSECONDS}; //! Time_t (Duration_t) representing a zero time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeZero(0, 0); +const Time_t c_TimeZero{0, 0}; //! Time_t (Duration_t) representing an invalid time. DONT USE IT IN CONSTRUCTORS -const Time_t c_TimeInvalid(-1, TIME_T_INFINITE_NANOSECONDS); +const Time_t c_TimeInvalid{-1, Time_t::INFINITE_NANOSECONDS}; } // namespace fastrtps } // namespace eprosima +// defines to avoid the "static initialization order fiasco" +#define TIME_T_INFINITE_SECONDS (eprosima::fastrtps::Time_t::INFINITE_SECONDS) +#define TIME_T_INFINITE_NANOSECONDS (eprosima::fastrtps::Time_t::INFINITE_NANOSECONDS) + #endif /* _FASTDDS_RTPS_TIME_T_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/common/Types.h b/ThirdParty/ros/include/fastdds/rtps/common/Types.h index c770ad04d..c0ba598d1 100644 --- a/ThirdParty/ros/include/fastdds/rtps/common/Types.h +++ b/ThirdParty/ros/include/fastdds/rtps/common/Types.h @@ -108,8 +108,8 @@ struct RTPS_DllAPI ProtocolVersion_t octet m_minor; ProtocolVersion_t(): #if HAVE_SECURITY - // As imposed by DDSSEC11-93 - ProtocolVersion_t(2, 3) + // As imposed by DDSSEC11-93 + ProtocolVersion_t(2, 3) #else ProtocolVersion_t(2, 2) #endif // if HAVE_SECURITY @@ -153,10 +153,10 @@ inline std::ostream& operator <<( return output << static_cast(pv.m_major) << "." << static_cast(pv.m_minor); } -const ProtocolVersion_t c_ProtocolVersion_2_0(2, 0); -const ProtocolVersion_t c_ProtocolVersion_2_1(2, 1); -const ProtocolVersion_t c_ProtocolVersion_2_2(2, 2); -const ProtocolVersion_t c_ProtocolVersion_2_3(2, 3); +const ProtocolVersion_t c_ProtocolVersion_2_0{2, 0}; +const ProtocolVersion_t c_ProtocolVersion_2_1{2, 1}; +const ProtocolVersion_t c_ProtocolVersion_2_2{2, 2}; +const ProtocolVersion_t c_ProtocolVersion_2_3{2, 3}; const ProtocolVersion_t c_ProtocolVersion; diff --git a/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerConsts.hpp b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerConsts.hpp new file mode 100644 index 000000000..88ceb6cb2 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerConsts.hpp @@ -0,0 +1,33 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERCONSTS_HPP +#define FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERCONSTS_HPP + +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +//! Name of the default flow controller. +extern RTPS_DllAPI const char* const FASTDDS_FLOW_CONTROLLER_DEFAULT; +//! Name of the default flow controller for statistics writers. +extern RTPS_DllAPI const char* const FASTDDS_STATISTICS_FLOW_CONTROLLER_DEFAULT; + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif // FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERCONSTS_HPP diff --git a/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerDescriptor.hpp b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerDescriptor.hpp new file mode 100644 index 000000000..8e5c489eb --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerDescriptor.hpp @@ -0,0 +1,59 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERDESCRIPTOR_HPP +#define FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERDESCRIPTOR_HPP + +#include "FlowControllerConsts.hpp" +#include "FlowControllerSchedulerPolicy.hpp" + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/*! + * Configuration values for creating flow controllers. + * + * This descriptor is used to define the configuration applied in the creation of a flow controller. + * @since 2.4.0 + */ +struct FlowControllerDescriptor +{ + //! Name of the flow controller. + const char* name = nullptr; + + //! Scheduler policy used by the flow controller. + //! + //! Default value: FlowControllerScheduler::FIFO_SCHEDULER + FlowControllerSchedulerPolicy scheduler = FlowControllerSchedulerPolicy::FIFO; + + //! Maximum number of bytes to be sent to network per period. + //! + //! Range of bytes: [1, 2147483647]; + //! 0 value means no limit. + //! Default value: 0 + int32_t max_bytes_per_period = 0; + + //! Period time in milliseconds. + //! + //! Period of time on which the flow controller is allowed to send max_bytes_per_period. + //! Default value: 100ms. + uint64_t period_ms = 100; +}; + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif // FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERDESCRIPTOR_HPP diff --git a/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerSchedulerPolicy.hpp b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerSchedulerPolicy.hpp new file mode 100644 index 000000000..1e2f8c437 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/FlowControllerSchedulerPolicy.hpp @@ -0,0 +1,47 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERSCHEDULERPOLICY_HPP +#define FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERSCHEDULERPOLICY_HPP + +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/*! + * Supported scheduler policy by a flow controller. + * + * A flow controller's scheduler policy takes the decision of which samples are the next ones to be sent to the network. + * Fast DDS flow controller supports several scheduler policies listed in this enumeration. + */ +enum class FlowControllerSchedulerPolicy : int32_t +{ + //! FIFO scheduler policy: first written sample by user, first sample scheduled to be sent to network. + FIFO, + //! Round Robin scheduler policy: schedules one sample of each DataWriter in circular order. + ROUND_ROBIN, + //! High priority scheduler policy: samples with highest priority are scheduled first to be sent to network. + HIGH_PRIORITY, + //! Priority with reservation scheduler policy: guarantee each DataWriter's minimum reservation of throughput. + //! Samples not fitting the reservation are scheduled by priority. + PRIORITY_WITH_RESERVATION +}; + +} // namespace rtps +} // namespace fastdds +} // namespace eprosima + +#endif // FASTDDS_RTPS_FLOWCONTROL_FLOWCONTROLLERSCHEDULERPOLICY_HPP diff --git a/ThirdParty/ros/include/fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h index 9f826c51c..aa51c0770 100644 --- a/ThirdParty/ros/include/fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/flowcontrol/ThroughputControllerDescriptor.h @@ -18,14 +18,15 @@ #include #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { /** * Descriptor for a Throughput Controller, containing all constructor information * for it. * @ingroup NETWORK_MODULE + * @deprecated Use FlowControllerDescriptor */ struct ThroughputControllerDescriptor { @@ -35,13 +36,17 @@ struct ThroughputControllerDescriptor uint32_t periodMillisecs; RTPS_DllAPI ThroughputControllerDescriptor(); - RTPS_DllAPI ThroughputControllerDescriptor(uint32_t size, uint32_t time); + RTPS_DllAPI ThroughputControllerDescriptor( + uint32_t size, + uint32_t time); - bool operator==(const ThroughputControllerDescriptor& b) const + bool operator ==( + const ThroughputControllerDescriptor& b) const { return (this->bytesPerPeriod == b.bytesPerPeriod) && (this->periodMillisecs == b.periodMillisecs); } + }; } // namespace rtps diff --git a/ThirdParty/ros/include/fastdds/rtps/history/History.h b/ThirdParty/ros/include/fastdds/rtps/history/History.h index 9d733da17..2b0779c1c 100644 --- a/ThirdParty/ros/include/fastdds/rtps/history/History.h +++ b/ThirdParty/ros/include/fastdds/rtps/history/History.h @@ -181,6 +181,7 @@ class History RTPS_DllAPI virtual bool matches_change( const CacheChange_t* ch_inner, CacheChange_t* ch_outer); + /** * Remove a specific change from the history. * @param removal iterator to the CacheChange_t to remove. diff --git a/ThirdParty/ros/include/fastdds/rtps/history/ReaderHistory.h b/ThirdParty/ros/include/fastdds/rtps/history/ReaderHistory.h index 2d579b388..84a3f08e9 100644 --- a/ThirdParty/ros/include/fastdds/rtps/history/ReaderHistory.h +++ b/ThirdParty/ros/include/fastdds/rtps/history/ReaderHistory.h @@ -50,18 +50,53 @@ class ReaderHistory : public History */ RTPS_DllAPI ReaderHistory( const HistoryAttributes& att); - RTPS_DllAPI virtual ~ReaderHistory() override; + RTPS_DllAPI ~ReaderHistory() override; + + /** + * Check if a new change can be added to this history. + * + * @param [in] writer_guid GUID of the writer where the change came from. + * @param [in] total_payload_size Total payload size of the incoming change. + * @param [in] unknown_missing_changes_up_to The number of changes from the same writer with a lower sequence + * number that could potentially be received in the future. + * @param [out] will_never_be_accepted When the method returns @c false, this parameter will inform + * whether the change could be accepted in the future or not. + * + * @pre change should not be present in the history + * + * @return Whether a call to received_change will succeed when called with the same arguments. + */ + RTPS_DllAPI virtual bool can_change_be_added_nts( + const GUID_t& writer_guid, + uint32_t total_payload_size, + size_t unknown_missing_changes_up_to, + bool& will_never_be_accepted) const; /** * Virtual method that is called when a new change is received. - * In this implementation this method just calls add_change. The suer can overload this method in case + * In this implementation this method just calls add_change. The user can overload this method in case * he needs to perform additional checks before adding the change. * @param change Pointer to the change + * @param unknown_missing_changes_up_to The number of changes from the same writer with a lower sequence number that + * could potentially be received in the future. * @return True if added. */ RTPS_DllAPI virtual bool received_change( CacheChange_t* change, - size_t); + size_t unknown_missing_changes_up_to); + + /** + * Called when a fragmented change is received completely by the Subscriber. Will find its instance and store it. + * @pre Change should be already present in the history. + * @param[in] change The received change + * @return + */ + RTPS_DllAPI bool virtual completed_change( + rtps::CacheChange_t* change) + { + (void)change; + return true; + } /** * Add a CacheChange_t to the ReaderHistory. @@ -98,7 +133,7 @@ class ReaderHistory : public History /** * Remove all changes from the History that have a certain guid. * @param a_guid Pointer to the target guid to search for. - * @return True if succesful, even if no changes have been removed. + * @return True if successful, even if no changes have been removed. * */ RTPS_DllAPI bool remove_changes_with_guid( const GUID_t& a_guid); @@ -107,7 +142,7 @@ class ReaderHistory : public History * Remove all fragmented changes from certain writer up to certain sequence number. * @param seq_num First SequenceNumber_t not to be removed. * @param writer_guid GUID of the writer for which changes should be looked for. - * @return True if succesful, even if no changes have been removed. + * @return True if successful, even if no changes have been removed. */ bool remove_fragmented_changes_until( const SequenceNumber_t& seq_num, @@ -117,6 +152,19 @@ class ReaderHistory : public History CacheChange_t** min_change, const GUID_t& writerGuid); + /** + * Called when a writer is unmatched from the reader holding this history. + * + * This method will remove all the changes on the history that came from the writer being unmatched and which have + * not yet been notified to the user. + * + * @param writer_guid GUID of the writer being unmatched. + * @param last_notified_seq Last sequence number from the specified writer that was notified to the user. + */ + RTPS_DllAPI virtual void writer_unmatched( + const GUID_t& writer_guid, + const SequenceNumber_t& last_notified_seq); + protected: RTPS_DllAPI bool do_reserve_cache( @@ -126,6 +174,28 @@ class ReaderHistory : public History RTPS_DllAPI void do_release_cache( CacheChange_t* ch) override; + template + inline void remove_changes_with_pred( + Pred pred) + { + assert(nullptr != mp_reader); + assert(nullptr != mp_mutex); + + std::lock_guard guard(*mp_mutex); + std::vector::iterator chit = m_changes.begin(); + while (chit != m_changes.end()) + { + if (pred(*chit)) + { + chit = remove_change_nts(chit); + } + else + { + ++chit; + } + } + } + //!Pointer to the reader RTPSReader* mp_reader; diff --git a/ThirdParty/ros/include/fastdds/rtps/history/WriterHistory.h b/ThirdParty/ros/include/fastdds/rtps/history/WriterHistory.h index 08fd54140..dcd584a93 100644 --- a/ThirdParty/ros/include/fastdds/rtps/history/WriterHistory.h +++ b/ThirdParty/ros/include/fastdds/rtps/history/WriterHistory.h @@ -21,6 +21,7 @@ #define _FASTDDS_RTPS_WRITERHISTORY_H_ #include +#include namespace eprosima { namespace fastrtps { @@ -37,6 +38,7 @@ class WriterHistory : public rtps::History { friend class RTPSWriter; friend class PersistentWriter; + friend class IPersistenceService; WriterHistory( WriterHistory&&) = delete; @@ -123,16 +125,103 @@ class WriterHistory : public rtps::History RTPS_DllAPI void do_release_cache( CacheChange_t* ch) override; + /** + * Introduce a change into the history, and let the associated writer send it. + * + * @param [in,out] a_change The change to be added. + * Its @c sequenceNumber and sourceTimestamp will be filled by this method. + * Its @c wparams will be filled from parameter @c wparams. + * @param [in,out] wparams On input, it holds the WriteParams to be copied into @c a_change. + * On output, will be filled with the sample identity assigned to @c a_change. + * @param [in] max_blocking_time Maximum time point the writer is allowed to be blocked till the change is put + * into the wire or the sending queue. + * + * @return whether @c a_change could be added to the history. + */ bool add_change_( CacheChange_t* a_change, WriteParams& wparams, std::chrono::time_point max_blocking_time = std::chrono::steady_clock::now() + std::chrono::hours(24)); + /** + * Introduce a change into the history, and let the associated writer send it. + * + * @param [in,out] a_change The change to be added. + * Its @c sequenceNumber and sourceTimestamp will be filled by this method. + * Its @c wparams will be filled from parameter @c wparams. + * @param [in,out] wparams On input, it holds the WriteParams to be copied into @c a_change. + * On output, will be filled with the sample identity assigned to @c a_change. + * @param [in] pre_commit Functor called after @c a_change has been added to the history, and its + * information has been filled, but before the writer is notified of the insertion. + * @param [in] max_blocking_time Maximum time point the writer is allowed to be blocked till the change is put + * into the wire or the sending queue. + * + * @return whether @c a_change could be added to the history. + */ + template + bool add_change_with_commit_hook( + CacheChange_t* a_change, + WriteParams& wparams, + PreCommitHook pre_commit, + std::chrono::time_point max_blocking_time) + { + if (mp_writer == nullptr || mp_mutex == nullptr) + { + logError(RTPS_WRITER_HISTORY, "You need to create a Writer with this History before adding any changes"); + return false; + } + + std::lock_guard guard(*mp_mutex); + if (!prepare_and_add_change(a_change, wparams)) + { + return false; + } + + pre_commit(*a_change); + notify_writer(a_change, max_blocking_time); + + return true; + } + //!Last CacheChange Sequence Number added to the History. SequenceNumber_t m_lastCacheChangeSeqNum; //!Pointer to the associated RTPSWriter; RTPSWriter* mp_writer; + + uint32_t high_mark_for_frag_ = 0; + +private: + + /** + * Introduce a change into the history. + * + * @param [in,out] a_change The change to be added. + * Its @c sequenceNumber and sourceTimestamp will be filled by this method. + * Its @c wparams will be filled from parameter @c wparams. + * @param [in,out] wparams On input, it holds the WriteParams to be copied into @c a_change. + * On output, will be filled with the sample identity assigned to @c a_change. + * + * @return whether @c a_change could be added to the history. + */ + bool prepare_and_add_change( + CacheChange_t* a_change, + WriteParams& wparams); + + /** + * Notifies the RTPS writer associated with this history that a change has been added. + * Depending on the publish mode, it will be directly sent to the wire, or put into a sending queue. + * + * @param [in] a_change The change that has just been added to the history. + * @param [in] max_blocking_time Maximum time point the writer is allowed to be blocked till the change is put + * into the wire or the sending queue. + */ + void notify_writer( + CacheChange_t* a_change, + const std::chrono::time_point& max_blocking_time); + + void set_fragments( + CacheChange_t* change); }; } // namespace rtps diff --git a/ThirdParty/ros/include/fastdds/rtps/interfaces/IReaderDataFilter.hpp b/ThirdParty/ros/include/fastdds/rtps/interfaces/IReaderDataFilter.hpp new file mode 100644 index 000000000..4173af8e0 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/interfaces/IReaderDataFilter.hpp @@ -0,0 +1,55 @@ +// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file IReaderDataFilter.hpp + * + */ + +#ifndef _FASTDDS_RTPS_IREADERDATAFILTER_HPP_ +#define _FASTDDS_RTPS_IREADERDATAFILTER_HPP_ + +#include +#include + + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/** + * Abstract class IReaderDataFilter that acts as virtual interface for data filters in ReaderProxy. + * @ingroup RTPS_MODULE + */ +class IReaderDataFilter +{ +public: + + /** + * This method checks whether a CacheChange_t is relevant for the specified reader + * This callback should return always the same result given the same arguments + * @param change The CacheChange_t to be evaluated + * @param reader_guid remote reader GUID_t + * @return true if relevant, false otherwise. + */ + virtual bool is_relevant( + const fastrtps::rtps::CacheChange_t& change, + const fastrtps::rtps::GUID_t& reader_guid) const = 0; +}; + +} /* namespace rtps */ +} /* namespace fastdds */ +} /* namespace eprosima */ + +#endif /* _FASTDDS_RTPS_IREADERDATAFILTER_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.h b/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.h index 7d81ce4ca..7856906f3 100644 --- a/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.h +++ b/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.h @@ -83,6 +83,10 @@ inline bool readInt64( CDRMessage_t* msg, int64_t* lolo); +inline bool readUInt64( + CDRMessage_t* msg, + uint64_t* lolo); + inline bool readSequenceNumber( CDRMessage_t* msg, SequenceNumber_t* sn); @@ -225,6 +229,10 @@ inline bool addInt64( CDRMessage_t* msg, int64_t lo); +inline bool addUInt64( + CDRMessage_t* msg, + uint64_t lo); + inline bool addEntityId( CDRMessage_t* msg, const EntityId_t* id); @@ -315,5 +323,5 @@ inline bool addParticipantGenericMessage( #include #endif /* DOXYGEN_SHOULD_SKIP_THIS */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_CDRMESSAGE_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.hpp b/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.hpp index be5c17a33..f2f8d0b72 100644 --- a/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/messages/CDRMessage.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -204,6 +205,33 @@ inline bool CDRMessage::readInt64( return true; } +inline bool CDRMessage::readUInt64( + CDRMessage_t* msg, + uint64_t* ulolo) +{ + if (msg->pos + 8 > msg->length) + { + return false; + } + + octet* dest = (octet*)ulolo; + if (msg->msg_endian == DEFAULT_ENDIAN) + { + for (uint8_t i = 0; i < 8; ++i) + { + dest[i] = msg->buffer[msg->pos + i]; + } + + msg->pos += 8; + } + else + { + readDataReversed(msg, dest, 8); + } + + return true; +} + inline bool CDRMessage::readSequenceNumber( CDRMessage_t* msg, SequenceNumber_t* sn) @@ -221,13 +249,17 @@ inline SequenceNumberSet_t CDRMessage::readSequenceNumberSet( CDRMessage_t* msg) { bool valid = true; - SequenceNumberSet_t sns(c_SequenceNumber_Unknown); SequenceNumber_t seqNum; valid &= CDRMessage::readSequenceNumber(msg, &seqNum); uint32_t numBits = 0; valid &= CDRMessage::readUInt32(msg, &numBits); valid &= (numBits <= 256u); + valid &= (seqNum.high >= 0); + if (valid && std::numeric_limits::max() == seqNum.high) + { + numBits = (std::min)(numBits, std::numeric_limits::max() - seqNum.low); + } uint32_t n_longs = (numBits + 31u) / 32u; uint32_t bitmap[8]; @@ -238,11 +270,12 @@ inline SequenceNumberSet_t CDRMessage::readSequenceNumberSet( if (valid) { - sns.base(seqNum); + SequenceNumberSet_t sns(seqNum, numBits); sns.bitmap_set(numBits, bitmap); + return sns; } - return sns; + return SequenceNumberSet_t (c_SequenceNumber_Unknown); } inline bool CDRMessage::readFragmentNumberSet( @@ -583,6 +616,34 @@ inline bool CDRMessage::addInt64( return true; } +inline bool CDRMessage::addUInt64( + CDRMessage_t* msg, + uint64_t ulolo) +{ + octet* o = (octet*)&ulolo; + if (msg->pos + 8 > msg->max_size) + { + return false; + } + if (msg->msg_endian == DEFAULT_ENDIAN) + { + for (uint8_t i = 0; i < 8; i++) + { + msg->buffer[msg->pos + i] = *(o + i); + } + } + else + { + for (uint8_t i = 0; i < 8; i++) + { + msg->buffer[msg->pos + i] = *(o + 7 - i); + } + } + msg->pos += 8; + msg->length += 8; + return true; +} + inline bool CDRMessage::addOctetVector( CDRMessage_t* msg, const std::vector* ocvec, diff --git a/ThirdParty/ros/include/fastdds/rtps/messages/MessageReceiver.h b/ThirdParty/ros/include/fastdds/rtps/messages/MessageReceiver.h index a6da5239f..508f2f5cd 100644 --- a/ThirdParty/ros/include/fastdds/rtps/messages/MessageReceiver.h +++ b/ThirdParty/ros/include/fastdds/rtps/messages/MessageReceiver.h @@ -20,11 +20,11 @@ #define _FASTDDS_RTPS_MESSAGERECEIVER_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include - -#include -#include #include +#include + +#include +#include namespace eprosima { namespace fastrtps { @@ -56,11 +56,13 @@ class MessageReceiver /** * Process a new CDR message. - * @param[in] loc Locator indicating the sending address. - * @param[in] msg Pointer to the message + * @param [in] source_locator Locator indicating the sending address. + * @param [in] reception_locator Locator indicating the listening address. + * @param [in] msg Pointer to the message */ void processCDRMsg( - const Locator_t& loc, + const Locator_t& source_locator, + const Locator_t& reception_locator, CDRMessage_t* msg); // Functions to associate/remove associatedendpoints @@ -71,7 +73,7 @@ class MessageReceiver private: - std::mutex mtx_; + mutable eprosima::shared_mutex mtx_; std::vector associated_writers_; std::unordered_map> associated_readers_; @@ -128,7 +130,7 @@ class MessageReceiver */ bool readSubmessageHeader( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; /** * Find if there is a reader (in associated_readers_) that will accept a msg directed @@ -136,7 +138,7 @@ class MessageReceiver */ bool willAReaderAcceptMsgDirectedTo( const EntityId_t& readerID, - RTPSReader*& first_reader); + RTPSReader*& first_reader) const; /** * Find all readers (in associated_readers_), with the given entity ID, and call the @@ -145,7 +147,7 @@ class MessageReceiver template void findAllReaders( const EntityId_t& readerID, - const Functor& callback); + const Functor& callback) const; /**@name Processing methods. * These methods are designed to read a part of the message @@ -167,19 +169,19 @@ class MessageReceiver */ bool proc_Submsg_Data( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; bool proc_Submsg_DataFrag( CDRMessage_t* msg, - SubmessageHeader_t* smh); - bool proc_Submsg_Acknack( - CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; bool proc_Submsg_Heartbeat( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; + bool proc_Submsg_Acknack( + CDRMessage_t* msg, + SubmessageHeader_t* smh) const; bool proc_Submsg_Gap( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; bool proc_Submsg_InfoTS( CDRMessage_t* msg, SubmessageHeader_t* smh); @@ -191,10 +193,10 @@ class MessageReceiver SubmessageHeader_t* smh); bool proc_Submsg_NackFrag( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; bool proc_Submsg_HeartbeatFrag( CDRMessage_t* msg, - SubmessageHeader_t* smh); + SubmessageHeader_t* smh) const; ///@} @@ -243,6 +245,21 @@ class MessageReceiver uint32_t fragment_starting_num, uint16_t fragments_in_submessage); ///@} + + /** + * Looks for the statistics specific submessage and notifies statistics related to the received message. + * + * @param [in] source_locator Locator indicating the sending address. + * @param [in] reception_locator Locator indicating the listening address. + * @param [in] msg Pointer to the message + * + * @pre The message header has already been read and validated. + */ + void notify_network_statistics( + const Locator_t& source_locator, + const Locator_t& reception_locator, + CDRMessage_t* msg) const; + }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageGroup.h b/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageGroup.h index 58eeb51e0..6b7c97d5e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageGroup.h +++ b/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageGroup.h @@ -47,30 +47,62 @@ class RTPSMessageGroup { public: + /*! + * Exception thrown when a operation exceeds the maximum blocking time. + */ class timeout : public std::runtime_error { public: timeout() - : std::runtime_error("timeout") {} + : std::runtime_error("timeout") + { + } virtual ~timeout() = default; }; + /*! + * Exception thrown when a operation exceeds the maximum bytes this object can process in the current period of + * time. + */ + class limit_exceeded : public std::runtime_error + { + public: + + limit_exceeded() + : std::runtime_error("limit_exceeded") + { + } + + virtual ~limit_exceeded() = default; + }; + + /** + * Basic constructor. + * Constructs a RTPSMessageGroup allowing to allocate its own buffer. + * @param participant Pointer to the participant sending data. + * @param internal_buffer true indicates this object to allocate its own buffer. false indicates to get a buffer + * from the participant. + */ + RTPSMessageGroup( + RTPSParticipantImpl* participant, + bool internal_buffer = false); + /** * Basic constructor. * Constructs a RTPSMessageGroup allowing the destination endpoints to change. * @param participant Pointer to the participant sending data. * @param endpoint Pointer to the endpoint sending data. - * @param msg_sender Reference to message sender interface. + * @param msg_sender Pointer to message sender interface. * @param max_blocking_time_point Future time point where blocking send should end. */ RTPSMessageGroup( RTPSParticipantImpl* participant, Endpoint* endpoint, - const RTPSMessageSenderInterface& msg_sender, + RTPSMessageSenderInterface* msg_sender, std::chrono::steady_clock::time_point max_blocking_time_point = - std::chrono::steady_clock::now() + std::chrono::hours(24)); + std::chrono::steady_clock::now() + std::chrono::hours(24)); ~RTPSMessageGroup() noexcept(false); @@ -166,11 +198,6 @@ class RTPSMessageGroup FragmentNumberSet_t fn_state, int32_t count); - inline uint32_t get_current_bytes_processed() const - { - return currentBytesSent_ + full_msg_->length; - } - /** * To be used whenever destination locators/guids change between two add_xxx calls. * Automatically called inside add_xxx calls if destinations_have_changed() method of @@ -180,6 +207,28 @@ class RTPSMessageGroup */ void flush_and_reset(); + /*! + * Change dynamically the sender of next RTPS submessages. + * + * @param endpoint Pointer to next Endpoint sender. nullptr resets object to initial state. + * @param msg_sender Pointer to the RTPSMessageSenderInterface will be used to send next RTPS messages.. + * nullptr resets object to initial state. + * @pre (endpoint != nullptr && msg_sender != nullptr) || (endpoint == nullptr && msg_sender == nullptr) + */ + void sender( + Endpoint* endpoint, + RTPSMessageSenderInterface* msg_sender) + { + assert((endpoint != nullptr && msg_sender != nullptr) || (endpoint == nullptr && msg_sender == nullptr)); + if (endpoint != endpoint_ || msg_sender != sender_) + { + flush_and_reset(); + } + + endpoint_ = endpoint; + sender_ = msg_sender; + } + //! Maximum fragment size minus the headers static inline constexpr uint32_t get_max_fragment_payload_size() { @@ -187,6 +236,22 @@ class RTPSMessageGroup return std::numeric_limits::max() - data_frag_header_size_ - max_inline_qos_size_ - 3; } + void set_sent_bytes_limitation( + uint32_t limit) + { + sent_bytes_limitation_ = limit; + } + + void reset_current_bytes_processed() + { + current_sent_bytes_ = 0; + } + + inline uint32_t get_current_bytes_processed() const + { + return current_sent_bytes_ + full_msg_->length; + } + private: static constexpr uint32_t data_frag_header_size_ = 28; @@ -200,7 +265,7 @@ class RTPSMessageGroup void check_and_maybe_flush() { - check_and_maybe_flush(sender_.destination_guid_prefix()); + check_and_maybe_flush(sender_->destination_guid_prefix()); } void check_and_maybe_flush( @@ -209,7 +274,7 @@ class RTPSMessageGroup bool insert_submessage( bool is_big_submessage) { - return insert_submessage(sender_.destination_guid_prefix(), is_big_submessage); + return insert_submessage(sender_->destination_guid_prefix(), is_big_submessage); } bool insert_submessage( @@ -228,34 +293,40 @@ class RTPSMessageGroup const SequenceNumberSet_t& gap_bitmap, const EntityId_t& reader_id); - const RTPSMessageSenderInterface& sender_; + RTPSMessageSenderInterface* sender_ = nullptr; - Endpoint* endpoint_; + Endpoint* endpoint_ = nullptr; - CDRMessage_t* full_msg_; + CDRMessage_t* full_msg_ = nullptr; - CDRMessage_t* submessage_msg_; - - uint32_t currentBytesSent_; + CDRMessage_t* submessage_msg_ = nullptr; GuidPrefix_t current_dst_; - RTPSParticipantImpl* participant_; + RTPSParticipantImpl* participant_ = nullptr; + + #if HAVE_SECURITY -#if HAVE_SECURITY - - CDRMessage_t* encrypt_msg_; - -#endif + CDRMessage_t* encrypt_msg_ = nullptr; + + #endif // if HAVE_SECURITY std::chrono::steady_clock::time_point max_blocking_time_point_; + bool max_blocking_time_is_set_ = false; + std::unique_ptr send_buffer_; + + bool internal_buffer_ = false; + + uint32_t sent_bytes_limitation_ = 0; + + uint32_t current_sent_bytes_ = 0; }; -} /* namespace rtps */ +} /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_RTPSMESSAGEGROUP_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp b/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp index 826e6081f..219594bd0 100644 --- a/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp @@ -37,55 +37,67 @@ namespace rtps { */ class RTPSMessageSenderInterface { - public: - - virtual ~RTPSMessageSenderInterface() = default; - - /** - * Check if the destinations managed by this sender interface have changed. - * - * @return true if destinations have changed, false otherwise. - */ - virtual bool destinations_have_changed() const = 0; - - /** - * Get a GUID prefix representing all destinations. - * - * @return When all the destinations share the same prefix (i.e. belong to the same participant) - * that prefix is returned. When there are no destinations, or they belong to different - * participants, c_GuidPrefix_Unknown is returned. - */ - virtual GuidPrefix_t destination_guid_prefix() const = 0; - - /** - * Get the GUID prefix of all the destination participants. - * - * @return a const reference to a vector with the GUID prefix of all destination participants. - */ - virtual const std::vector& remote_participants() const = 0; - - /** - * Get the GUID of all destinations. - * - * @return a const reference to a vector with the GUID of all destinations. - */ - virtual const std::vector& remote_guids() const = 0; - - /** - * Send a message through this interface. - * - * @param message Pointer to the buffer with the message already serialized. - * @param max_blocking_time_point Future timepoint where blocking send should end. - */ - virtual bool send( - CDRMessage_t* message, - std::chrono::steady_clock::time_point& max_blocking_time_point) const = 0; +public: + + virtual ~RTPSMessageSenderInterface() = default; + + /** + * Check if the destinations managed by this sender interface have changed. + * + * @return true if destinations have changed, false otherwise. + */ + virtual bool destinations_have_changed() const = 0; + + /** + * Get a GUID prefix representing all destinations. + * + * @return When all the destinations share the same prefix (i.e. belong to the same participant) + * that prefix is returned. When there are no destinations, or they belong to different + * participants, c_GuidPrefix_Unknown is returned. + */ + virtual GuidPrefix_t destination_guid_prefix() const = 0; + + /** + * Get the GUID prefix of all the destination participants. + * + * @return a const reference to a vector with the GUID prefix of all destination participants. + */ + virtual const std::vector& remote_participants() const = 0; + + /** + * Get the GUID of all destinations. + * + * @return a const reference to a vector with the GUID of all destinations. + */ + virtual const std::vector& remote_guids() const = 0; + + /** + * Send a message through this interface. + * + * @param message Pointer to the buffer with the message already serialized. + * @param max_blocking_time_point Future timepoint where blocking send should end. + */ + virtual bool send( + CDRMessage_t* message, + std::chrono::steady_clock::time_point max_blocking_time_point) const = 0; + + /*! + * Lock the object. + */ + virtual void lock() = 0; + + /*! + * Lock the object. + */ + virtual void unlock() = 0; + + }; } /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_MESSAGES_RTPSMESSAGESENDERINTERFACE_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/network/NetworkFactory.h b/ThirdParty/ros/include/fastdds/rtps/network/NetworkFactory.h index d67a9bc97..38caa3c9e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/network/NetworkFactory.h +++ b/ThirdParty/ros/include/fastdds/rtps/network/NetworkFactory.h @@ -15,13 +15,15 @@ #ifndef _FASTDDS_RTPS_NETWORK_FACTORY_HPP #define _FASTDDS_RTPS_NETWORK_FACTORY_HPP -#include +#include +#include + +#include #include +#include #include #include -#include -#include -#include +#include namespace eprosima { namespace fastrtps { @@ -43,7 +45,7 @@ class NetworkFactory NetworkFactory(); /** - * Allows registration of a transport statically, by specifying the transport type and + * Allow registration of a transport statically, by specifying the transport type and * its associated descriptor type. This is particularly useful for user-defined transports. */ template @@ -58,15 +60,17 @@ class NetworkFactory } /** - * Allows registration of a transport dynamically. Only the transports built into FastRTPS - * are supported here (although it can be easily extended at NetworkFactory.cpp) + * Allow registration of a transport dynamically. + * * @param descriptor Structure that defines all initial configuration for a given transport. + * @param properties Optional policy to specify additional parameters for the created transport. */ bool RegisterTransport( - const fastdds::rtps::TransportDescriptorInterface* descriptor); + const fastdds::rtps::TransportDescriptorInterface* descriptor, + const fastrtps::rtps::PropertyPolicy* properties = nullptr); /** - * Walks over the list of transports, opening every possible channel that can send through + * Walk over the list of transports, opening every possible channel that can send through * the given locator and returning a vector of Sender Resources associated with it. * @param locator Locator through which to send. */ @@ -75,7 +79,7 @@ class NetworkFactory const Locator_t& locator); /** - * Walks over the list of transports, opening every possible channel that we can listen to + * Walk over the list of transports, opening every possible channel that we can listen to * from the given locator, and returns a vector of Receiver Resources for this goal. * @param local Locator from which to listen. * @param returned_resources_list List that will be filled with the created ReceiverResources. @@ -90,7 +94,7 @@ class NetworkFactory LocatorList_t& locators); /** - * Transforms a remote locator into a locator optimized for local communications. + * Transform a remote locator into a locator optimized for local communications. * * If the remote locator corresponds to one of the local interfaces, it is converted * to the corresponding local address. @@ -106,7 +110,7 @@ class NetworkFactory Locator_t& result_locator) const; /** - * Performs the locator selection algorithm. + * Perform the locator selection algorithm. * * It basically consists of the following steps * - selector.selection_start is called @@ -133,7 +137,7 @@ class NetworkFactory } /** - * Fills ret_locators with the list of all possible locators in the local machine at the given + * Fill ret_locators with the list of all possible locators in the local machine at the given * physical_port of the locator_kind. * Return if found any. * */ @@ -149,35 +153,35 @@ class NetworkFactory LocatorList_t& defaultLocators); /** - * Adds locators to the metatraffic multicast list. + * Add locators to the metatraffic multicast list. * */ bool getDefaultMetatrafficMulticastLocators( LocatorList_t& locators, uint32_t metatraffic_multicast_port) const; /** - * Adds locators to the metatraffic unicast list. + * Add locators to the metatraffic unicast list. * */ bool getDefaultMetatrafficUnicastLocators( LocatorList_t& locators, uint32_t metatraffic_unicast_port) const; /** - * Fills the locator with the metatraffic multicast configuration. + * Fill the locator with the metatraffic multicast configuration. * */ bool fillMetatrafficMulticastLocator( Locator_t& locator, uint32_t metatraffic_multicast_port) const; /** - * Fills the locator with the metatraffic unicast configuration. + * Fill the locator with the metatraffic unicast configuration. * */ bool fillMetatrafficUnicastLocator( Locator_t& locator, uint32_t metatraffic_unicast_port) const; /** - * Configures the locator with the initial peer configuration. + * Configure the locator with the initial peer configuration. * */ bool configureInitialPeerLocator( uint32_t domain_id, @@ -185,7 +189,7 @@ class NetworkFactory RTPSParticipantAttributes& m_att) const; /** - * Adds locators to the default unicast configuration. + * Add locators to the default unicast configuration. * */ bool getDefaultUnicastLocators( uint32_t domain_id, @@ -193,7 +197,7 @@ class NetworkFactory const RTPSParticipantAttributes& m_att) const; /** - * Fills the locator with the default unicast configuration. + * Fill the locator with the default unicast configuration. * */ bool fill_default_locator_port( uint32_t domain_id, @@ -206,6 +210,11 @@ class NetworkFactory */ void Shutdown(); + /** + * Re-scan network interfaces + */ + void update_network_interfaces(); + private: std::vector> mRegisteredTransports; @@ -215,7 +224,7 @@ class NetworkFactory uint32_t minSendBufferSize_; /** - * Calculates well-known ports. + * Calculate well-known ports. */ uint16_t calculate_well_known_port( uint32_t domain_id, diff --git a/ThirdParty/ros/include/fastdds/rtps/network/SenderResource.h b/ThirdParty/ros/include/fastdds/rtps/network/SenderResource.h index 956a3f138..9cc71a9f7 100644 --- a/ThirdParty/ros/include/fastdds/rtps/network/SenderResource.h +++ b/ThirdParty/ros/include/fastdds/rtps/network/SenderResource.h @@ -15,17 +15,20 @@ #ifndef _FASTDDS_RTPS_SENDER_RESOURCE_H #define _FASTDDS_RTPS_SENDER_RESOURCE_H +#include + #include #include #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +#include + +namespace eprosima { +namespace fastrtps { +namespace rtps { class RTPSParticipantImpl; class MessageReceiver; -class Locator_t; /** * RAII object that encapsulates the Send operation over one chanel in an unknown transport. @@ -49,17 +52,18 @@ class SenderResource * @return Success of the send operation. */ bool send( - const octet* data, - uint32_t dataLength, - LocatorsIterator* destination_locators_begin, - LocatorsIterator* destination_locators_end, - const std::chrono::steady_clock::time_point& max_blocking_time_point) + const octet* data, + uint32_t dataLength, + LocatorsIterator* destination_locators_begin, + LocatorsIterator* destination_locators_end, + const std::chrono::steady_clock::time_point& max_blocking_time_point) { bool returned_value = false; if (send_lambda_) { - returned_value = send_lambda_(data, dataLength, destination_locators_begin, destination_locators_end, max_blocking_time_point); + returned_value = send_lambda_(data, dataLength, destination_locators_begin, destination_locators_end, + max_blocking_time_point); } return returned_value; @@ -69,7 +73,8 @@ class SenderResource * Resources can only be transfered through move semantics. Copy, assignment, and * construction outside of the factory are forbidden. */ - SenderResource(SenderResource&& rValueResource) + SenderResource( + SenderResource&& rValueResource) { clean_up.swap(rValueResource.clean_up); send_lambda_.swap(rValueResource.send_lambda_); @@ -77,27 +82,47 @@ class SenderResource virtual ~SenderResource() = default; - int32_t kind() const { return transport_kind_; } + int32_t kind() const + { + return transport_kind_; + } + + /** + * Add locators representing the local endpoints managed by this sender resource. + * + * @param [in,out] locators List where locators will be added. + */ + virtual void add_locators_to_list( + LocatorList_t& locators) const + { + (void)locators; + } protected: - SenderResource(int32_t transport_kind) : transport_kind_(transport_kind) {} + SenderResource( + int32_t transport_kind) + : transport_kind_(transport_kind) + { + } int32_t transport_kind_; std::function clean_up; std::function send_lambda_; + const octet*, + uint32_t, + LocatorsIterator* destination_locators_begin, + LocatorsIterator* destination_locators_end, + const std::chrono::steady_clock::time_point&)> send_lambda_; private: SenderResource() = delete; - SenderResource(const SenderResource&) = delete; - SenderResource& operator=(const SenderResource&) = delete; + SenderResource( + const SenderResource&) = delete; + SenderResource& operator =( + const SenderResource&) = delete; }; } // namespace rtps diff --git a/ThirdParty/ros/include/fastdds/rtps/participant/RTPSParticipant.h b/ThirdParty/ros/include/fastdds/rtps/participant/RTPSParticipant.h index f1a04da86..49f4b70e1 100644 --- a/ThirdParty/ros/include/fastdds/rtps/participant/RTPSParticipant.h +++ b/ThirdParty/ros/include/fastdds/rtps/participant/RTPSParticipant.h @@ -21,10 +21,12 @@ #include #include + #include #include -#include #include +#include +#include #include #include @@ -52,6 +54,9 @@ class RTPSWriter; class RTPSReader; class WriterProxyData; class ReaderProxyData; +class EndpointAttributes; +class WriterAttributes; +class ReaderAttributes; class ResourceEvent; class WLP; @@ -136,15 +141,24 @@ class RTPS_DllAPI RTPSParticipant /** * Register a RTPSReader in the builtin Protocols. - * @param Reader Pointer to the RTPSReader. - * @param topicAtt Topic Attributes where you want to register it. - * @param rqos ReaderQos. + * @param Reader Pointer to the RTPSReader. + * @param topicAtt Topic Attributes where you want to register it. + * @param rqos ReaderQos. + * @param content_filter Optional content filtering information. * @return True if correctly registered. */ bool registerReader( RTPSReader* Reader, const TopicAttributes& topicAtt, - const ReaderQos& rqos); + const ReaderQos& rqos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); + + /** + * Update participant attributes. + * @param patt New participant attributes. + */ + void update_attributes( + const RTPSParticipantAttributes& patt); /** * Update writer QOS @@ -160,15 +174,17 @@ class RTPS_DllAPI RTPSParticipant /** * Update reader QOS - * @param Reader to update - * @param topicAtt Topic Attributes where you want to register it. - * @param rqos New reader QoS + * @param Reader Pointer to the RTPSReader to update + * @param topicAtt Topic Attributes where you want to register it. + * @param rqos New reader QoS + * @param content_filter Optional content filtering information. * @return true on success */ bool updateReader( RTPSReader* Reader, const TopicAttributes& topicAtt, - const ReaderQos& rqos); + const ReaderQos& rqos, + const fastdds::rtps::ContentFilterProperty* content_filter = nullptr); /** * Returns a list with the participant names. @@ -238,13 +254,58 @@ class RTPS_DllAPI RTPSParticipant */ void enable(); +#if HAVE_SECURITY + + /** + * @brief Checks whether the writer has security attributes enabled + * @param writer_attributes Attributes of the writer as given to the RTPSParticipantImpl::create_writer + */ + + bool is_security_enabled_for_writer( + const WriterAttributes& writer_attributes); + + /** + * @brief Checks whether the reader has security attributes enabled + * @param reader_attributes Attributes of the reader as given to the RTPSParticipantImpl::create_reader + */ + + bool is_security_enabled_for_reader( + const ReaderAttributes& reader_attributes); + +#endif // if HAVE_SECURITY + +#ifdef FASTDDS_STATISTICS + + /* + * Add a listener to receive statistics backend callbacks + * @param listener + * @param kind combination of fastdds::statistics::EventKind flags used as a mask. Events to notify. + * @return true if successfully added + */ + bool add_statistics_listener( + std::shared_ptr listener, + uint32_t kind); + + /* + * Remove a listener from receiving statistics backend callbacks + * @param listener + * @param kind combination of fastdds::statistics::EventKind flags used as a mask. Events to ignore. + * @return true if successfully removed + */ + bool remove_statistics_listener( + std::shared_ptr listener, + uint32_t kind); + +#endif // FASTDDS_STATISTICS + private: //!Pointer to the implementation. RTPSParticipantImpl* mp_impl; + }; -} +} // namespace rtps } /* namespace rtps */ } /* namespace eprosima */ diff --git a/ThirdParty/ros/include/fastdds/rtps/reader/RTPSReader.h b/ThirdParty/ros/include/fastdds/rtps/reader/RTPSReader.h index 2c1bd1098..a2e083ae1 100644 --- a/ThirdParty/ros/include/fastdds/rtps/reader/RTPSReader.h +++ b/ThirdParty/ros/include/fastdds/rtps/reader/RTPSReader.h @@ -19,14 +19,19 @@ #ifndef _FASTDDS_RTPS_READER_RTPSREADER_H_ #define _FASTDDS_RTPS_READER_RTPSREADER_H_ +#include + #include #include +#include #include -#include #include -#include +#include +#include +#include #include -#include "../history/ReaderHistory.h" + +#include namespace eprosima { namespace fastrtps { @@ -39,12 +44,15 @@ class WriterProxy; struct CacheChange_t; struct ReaderHistoryState; class WriterProxyData; +class IDataSharingListener; /** * Class RTPSReader, manages the reception of data from its matched writers. * @ingroup READER_MODULE */ -class RTPSReader : public Endpoint +class RTPSReader + : public Endpoint + , public fastdds::statistics::StatisticsReaderImpl { friend class ReaderHistory; friend class RTPSParticipantImpl; @@ -173,7 +181,7 @@ class RTPSReader : public Endpoint WriterProxy* prox = nullptr) = 0; /** - * Get the associated listener, secondary attached Listener in case it is of coumpound type + * Get the associated listener, secondary attached Listener in case it is of compound type * @return Pointer to the associated reader listener. */ RTPS_DllAPI ReaderListener* getListener() const; @@ -230,6 +238,9 @@ class RTPSReader : public Endpoint RTPS_DllAPI uint64_t get_unread_count() const; + RTPS_DllAPI uint64_t get_unread_count( + bool mark_as_read); + /** * @return True if the reader expects Inline QOS. */ @@ -244,6 +255,22 @@ class RTPSReader : public Endpoint return mp_history; } + //! @return The content filter associated to this reader. + RTPS_DllAPI eprosima::fastdds::rtps::IReaderDataFilter* get_content_filter() const + { + std::lock_guard guard(mp_mutex); + return data_filter_; + } + + //! Set the content filter associated to this reader. + //! @param filter Pointer to the content filter to associate to this reader. + RTPS_DllAPI void set_content_filter( + eprosima::fastdds::rtps::IReaderDataFilter* filter) + { + std::lock_guard guard(mp_mutex); + data_filter_ = filter; + } + /*! * @brief Returns there is a clean state with all Writers. * It occurs when the Reader received all samples sent by Writers. In other words, @@ -268,6 +295,90 @@ class RTPSReader : public Endpoint m_trustedWriterEntityId = writer; } + /** + * Assert the liveliness of a matched writer. + * @param writer GUID of the writer to assert. + */ + virtual void assert_writer_liveliness( + const GUID_t& writer) = 0; + + /** + * Called just before a change is going to be deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [out] wp Writer proxy the @c change belongs to. + * @param [out] is_future_change Whether the change is in the future (i.e. there are + * earlier unreceived changes from the same writer). + * + * @return Whether the change is still valid or not. + */ + virtual bool begin_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool& is_future_change) = 0; + + /** + * Called after the change has been deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [in] wp Writer proxy the @c change belongs to. + * @param [in] mark_as_read Whether the @c change should be marked as read or not. + */ + virtual void end_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool mark_as_read) = 0; + + /** + * Called when the user has retrieved a change from the history. + * @param change Pointer to the change to ACK + * @param writer Writer proxy of the \c change. + * @param mark_as_read Whether the \c change should be marked as read or not + */ + virtual void change_read_by_user( + CacheChange_t* change, + WriterProxy* writer, + bool mark_as_read = true) = 0; + + /** + * Checks whether the sample is still valid or is corrupted. + * + * @param data Pointer to the sample data to check. + * If it does not belong to the payload pool passed to the + * reader on construction, it yields undefined behavior. + * @param writer GUID of the writer that sent \c data. + * @param sn Sequence number related to \c data. + * + * @return true if the sample is valid + */ + RTPS_DllAPI bool is_sample_valid( + const void* data, + const GUID_t& writer, + const SequenceNumber_t& sn) const; + + const std::unique_ptr& datasharing_listener() const + { + return datasharing_listener_; + } + +#ifdef FASTDDS_STATISTICS + + /* + * Add a listener to receive statistics backend callbacks + * @param listener + * @return true if successfully added + */ + RTPS_DllAPI bool add_statistics_listener( + std::shared_ptr listener); + + /* + * Remove a listener from receiving statistics backend callbacks + * @param listener + * @return true if successfully removed + */ + RTPS_DllAPI bool remove_statistics_listener( + std::shared_ptr listener); + +#endif // FASTDDS_STATISTICS + protected: virtual bool may_remove_history_record( @@ -341,6 +452,17 @@ class RTPSReader : public Endpoint CacheChange_t** change, History::const_iterator hint) const; + /** + * Creates the listener for the datasharing notifications + * + * @param limits Resource limits for the number of matched datasharing writers + */ + void create_datasharing_listener( + ResourceLimitedContainerConfig limits); + + bool is_datasharing_compatible_with( + const WriterProxyData& wdata); + //!ReaderHistory ReaderHistory* mp_history; //!Listener @@ -366,6 +488,13 @@ class RTPSReader : public Endpoint //! The liveliness lease duration of this reader Duration_t liveliness_lease_duration_; + //! Whether the writer is datasharing compatible or not + bool is_datasharing_compatible_ = false; + //! The listener for the datasharing notifications + std::unique_ptr datasharing_listener_; + + eprosima::fastdds::rtps::IReaderDataFilter* data_filter_ = nullptr; + private: RTPSReader& operator =( @@ -373,7 +502,8 @@ class RTPSReader : public Endpoint void init( const std::shared_ptr& payload_pool, - const std::shared_ptr& change_pool); + const std::shared_ptr& change_pool, + const ReaderAttributes& att); }; diff --git a/ThirdParty/ros/include/fastdds/rtps/reader/ReaderListener.h b/ThirdParty/ros/include/fastdds/rtps/reader/ReaderListener.h index 449b785a1..3e1a43a8c 100644 --- a/ThirdParty/ros/include/fastdds/rtps/reader/ReaderListener.h +++ b/ThirdParty/ros/include/fastdds/rtps/reader/ReaderListener.h @@ -20,12 +20,12 @@ #ifndef _FASTDDS_RTPS_READERLISTENER_H_ #define _FASTDDS_RTPS_READERLISTENER_H_ -#include -#include +#include #include -#include - -#include +#include +#include +#include +#include namespace eprosima { namespace fastrtps { @@ -56,8 +56,8 @@ class RTPS_DllAPI ReaderListener RTPSReader* reader, MatchingInfo& info) { - (void)reader; - (void)info; + static_cast(reader); + static_cast(info); } /** @@ -69,8 +69,8 @@ class RTPS_DllAPI ReaderListener RTPSReader* reader, const fastdds::dds::SubscriptionMatchedStatus& info) { - (void)reader; - (void)info; + static_cast(reader); + static_cast(info); } /** @@ -85,21 +85,21 @@ class RTPS_DllAPI ReaderListener RTPSReader* reader, const CacheChange_t* const change) { - (void)reader; - (void)change; + static_cast(reader); + static_cast(change); } /** - * @brief Method called when the livelivess of a reader changes + * @brief Method called when the liveliness of a reader changes * @param reader The reader * @param status The liveliness changed status */ virtual void on_liveliness_changed( RTPSReader* reader, - const LivelinessChangedStatus& status) + const eprosima::fastdds::dds::LivelinessChangedStatus& status) { - (void)reader; - (void)status; + static_cast(reader); + static_cast(status); } /** @@ -113,8 +113,43 @@ class RTPS_DllAPI ReaderListener RTPSReader* reader, eprosima::fastdds::dds::PolicyMask qos) { - (void)reader; - (void)qos; + static_cast(reader); + static_cast(qos); + } + + /** + * This method is called when the reader detects that one or more samples have been lost. + * + * @param reader Pointer to the RTPSReader. + * @param sample_lost_since_last_update The number of samples that were lost since the last time this + * method was called for the same reader. + */ + virtual void on_sample_lost( + RTPSReader* reader, + int32_t sample_lost_since_last_update) + { + static_cast(reader); + static_cast(sample_lost_since_last_update); + } + + /** + * @brief Method called when the discovery information of a writer regarding a reader changes. + * + * @param reader The reader. + * @param reason The reason motivating this method to be called. + * @param writer_guid The GUID of the writer for which the discovery information changed. + * @param writer_info Discovery information about the writer. Will be @c nullptr for reason @c REMOVED_WRITER. + */ + virtual void on_writer_discovery( + RTPSReader* reader, + WriterDiscoveryInfo::DISCOVERY_STATUS reason, + const GUID_t& writer_guid, + const WriterProxyData* writer_info) + { + static_cast(reader); + static_cast(reason); + static_cast(writer_guid); + static_cast(writer_info); } }; diff --git a/ThirdParty/ros/include/fastdds/rtps/reader/StatefulReader.h b/ThirdParty/ros/include/fastdds/rtps/reader/StatefulReader.h index df8c97d53..58a65137e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/reader/StatefulReader.h +++ b/ThirdParty/ros/include/fastdds/rtps/reader/StatefulReader.h @@ -86,6 +86,7 @@ class StatefulReader : public RTPSReader /** * Remove a WriterProxyData from the matached writers. * @param writer_guid GUID of the writer to remove. + * @param removed_by_lease true it the writer was removed due to lease duration. * @return True if correct. */ bool matched_writer_remove( @@ -166,11 +167,14 @@ class StatefulReader : public RTPSReader * and depending on the implementation performs different actions. * @param a_change Pointer of the change to add. * @param prox Pointer to the WriterProxy that adds the Change. + * @param unknown_missing_changes_up_to The number of changes from the same writer with a lower sequence number that + * could potentially be received in the future. * @return True if added. */ bool change_received( CacheChange_t* a_change, - WriterProxy* prox); + WriterProxy* prox, + size_t unknown_missing_changes_up_to); /** * Get the RTPS participant @@ -245,7 +249,7 @@ class StatefulReader : public RTPSReader void send_acknack( const WriterProxy* writer, const SequenceNumberSet_t& sns, - const RTPSMessageSenderInterface& sender, + RTPSMessageSenderInterface* sender, bool is_final); /** @@ -256,7 +260,7 @@ class StatefulReader : public RTPSReader */ void send_acknack( const WriterProxy* writer, - const RTPSMessageSenderInterface& sender, + RTPSMessageSenderInterface* sender, bool heartbeat_was_final); /** @@ -272,6 +276,49 @@ class StatefulReader : public RTPSReader const Locators& locators_end, std::chrono::steady_clock::time_point& max_blocking_time_point); + /** + * Assert the livelines of a matched writer. + * @param writer GUID of the writer to assert. + */ + void assert_writer_liveliness( + const GUID_t& writer) override; + + /** + * Called just before a change is going to be deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [out] wp Writer proxy the @c change belongs to. + * @param [out] is_future_change Whether the change is in the future (i.e. there are + * earlier unreceived changes from the same writer). + * + * @return Whether the change is still valid or not. + */ + bool begin_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool& is_future_change) override; + + /** + * Called after the change has been deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [in] wp Writer proxy the @c change belongs to. + * @param [in] mark_as_read Whether the @c change should be marked as read or not. + */ + void end_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool mark_as_read) override; + + /** + * Called when the user has retrieved a change from the history. + * @param change Pointer to the change to ACK + * @param writer Writer proxy of the \c change. + * @param mark_as_read Whether the \c change should be marked as read or not + */ + void change_read_by_user( + CacheChange_t* change, + WriterProxy* writer, + bool mark_as_read = true) override; + private: void init( @@ -292,6 +339,10 @@ class StatefulReader : public RTPSReader void NotifyChanges( WriterProxy* wp); + void remove_changes_from( + const GUID_t& writerGUID, + bool is_payload_pool_lost = false); + //! Acknack Count uint32_t acknack_count_; //! NACKFRAG Count diff --git a/ThirdParty/ros/include/fastdds/rtps/reader/StatelessReader.h b/ThirdParty/ros/include/fastdds/rtps/reader/StatelessReader.h index 95b8e9c29..b0a56a4ad 100644 --- a/ThirdParty/ros/include/fastdds/rtps/reader/StatelessReader.h +++ b/ThirdParty/ros/include/fastdds/rtps/reader/StatelessReader.h @@ -83,6 +83,7 @@ class StatelessReader : public RTPSReader /** * Remove a WriterProxyData from the matached writers. * @param writer_guid GUID of the writer to remove. + * @param removed_by_lease true it the writer was removed due to lease duration. * @return True if correct. */ bool matched_writer_remove( @@ -206,6 +207,49 @@ class StatelessReader : public RTPSReader return mp_RTPSParticipant; } + /** + * @brief Assert liveliness of remote writer + * @param guid The guid of the remote writer + */ + void assert_writer_liveliness( + const GUID_t& guid) override; + + /** + * Called just before a change is going to be deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [out] wp Writer proxy the @c change belongs to. + * @param [out] is_future_change Whether the change is in the future (i.e. there are + * earlier unreceived changes from the same writer). + * + * @return Whether the change is still valid or not. + */ + bool begin_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool& is_future_change) override; + + /** + * Called after the change has been deserialized. + * @param [in] change Pointer to the change being accessed. + * @param [in] wp Writer proxy the @c change belongs to. + * @param [in] mark_as_read Whether the @c change should be marked as read or not. + */ + void end_sample_access_nts( + CacheChange_t* change, + WriterProxy*& wp, + bool mark_as_read) override; + + /** + * Called when the user has retrieved a change from the history. + * @param change Pointer to the change to ACK + * @param writer Writer proxy of the \c change. + * @param mark_as_read Whether the \c change should be marked as read or not + */ + void change_read_by_user( + CacheChange_t* change, + WriterProxy* writer, + bool mark_as_read = true) override; + private: struct RemoteWriterInfo_t @@ -214,6 +258,7 @@ class StatelessReader : public RTPSReader GUID_t persistence_guid; bool has_manual_topic_liveliness = false; CacheChange_t* fragmented_change = nullptr; + bool is_datasharing = false; }; bool acceptMsgFrom( @@ -224,13 +269,6 @@ class StatelessReader : public RTPSReader const GUID_t& guid, const SequenceNumber_t& seq); - /** - * @brief Assert liveliness of remote writer - * @param guid The guid of the remote writer - */ - void assert_writer_liveliness( - const GUID_t& guid); - /** * @brief A method to check if a matched writer has manual_by_topic liveliness * @param guid The guid of the remote writer @@ -239,6 +277,11 @@ class StatelessReader : public RTPSReader bool writer_has_manual_liveliness( const GUID_t& guid); + void remove_changes_from( + const GUID_t& writerGUID, + bool is_payload_pool_lost = false); + + //!List of GUID_t os matched writers. //!Is only used in the Discovery, to correctly notify the user using SubscriptionListener::onSubscriptionMatched(); ResourceLimitedVector matched_writers_; diff --git a/ThirdParty/ros/include/fastdds/rtps/resources/AsyncInterestTree.h b/ThirdParty/ros/include/fastdds/rtps/resources/AsyncInterestTree.h deleted file mode 100644 index 5e6edf6f8..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/resources/AsyncInterestTree.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ -#define _FASTDDS_RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ - -#include -#include -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -/*! - * Used by AsyncWriterThread to manage a double queue. - * One queue is being processed by AsyncWriterThread's internal thread while in the other one other threads can register - * RTPSWriter pointers that need to send samples asynchronously. - */ -class AsyncInterestTree -{ - friend class AsyncWriterThread; - -public: - - /*! - * @brief Registers a writer in a hidden queue. - * @param writer Pointer to the writer. - * @return true if the writer was queued or false if it already is queued. - */ - bool register_interest( - RTPSWriter* writer); - - /*! - * @brief Registers a writer in a hidden queue. - * @param writer Pointer to the writer. - * @param max_blocking_time Time point until the function must be blocked. - * @return true if the writer was queued or false if it already is queued. - * @note This method is blocked for a period of time. - */ - bool register_interest( - RTPSWriter* writer, - const std::chrono::time_point& max_blocking_time); - - /*! - * @brief Unregister a writer from both queues. - * @param writer Pointer to the writer. - * @return true if both queues remain empty. - */ - bool unregister_interest( - RTPSWriter* writer); - - /*! - * @brief Clears the visible queue and swaps with the hidden set. - */ - void swap(); - - /*! - * @brief Remove next writer from visible queue and returns it. - * @return Next writer. - */ - RTPSWriter* next_active_nts(); - -private: - - bool register_interest_nts( - RTPSWriter* writer); - - mutable std::timed_mutex mMutexActive, mMutexHidden; - - RTPSWriter* active_front_ = nullptr; - - RTPSWriter* hidden_front_ = nullptr; - - int active_pos_ = 0; - - int hidden_pos_ = 1; -}; - -} /* namespace rtps */ -} /* namespace fastrtps */ -} /* namespace eprosima */ - -#endif // _FASTDDS_RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/resources/AsyncWriterThread.h b/ThirdParty/ros/include/fastdds/rtps/resources/AsyncWriterThread.h deleted file mode 100644 index 498c00a05..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/resources/AsyncWriterThread.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file AsyncWriterThread.h - * - */ -#ifndef _FASTDDS_RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ -#define _FASTDDS_RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ - -#include -#include -#include - -#include -#include -#include - -namespace eprosima { -namespace fastrtps { -namespace rtps { - -class RTPSWriter; - -/** - * @brief This static class owns a thread that manages asynchronous writes. - * Asynchronous writes happen directly (when using an async writer) and - * indirectly (when responding to a NACK). - * @ingroup COMMON_MODULE - */ -class AsyncWriterThread -{ -public: - - AsyncWriterThread() = default; - - ~AsyncWriterThread(); - - /*! - * @brief Unregister a writer if it is waiting to be processed. - * @param writer Asynchronous writer to be removed. - * @return Result of the operation. - * @note Always call this function from writer's destructor. - */ - void unregister_writer( - RTPSWriter* writer); - - /*! - * Wakes the thread up and starts processing async writers. - * @param interested_writer The writer interested in an async write. - */ - void wake_up( - RTPSWriter* interested_writer); - - /*! - * Wakes the thread up and starts processing async writers. - * @param interested_writer The writer interested in an async write. - * @param max_blocking_time Time point until the function must be blocked. - * @note This method is blocked for a period of time. - */ - void wake_up( - RTPSWriter* interested_writer, - const std::chrono::time_point& max_blocking_time); - -private: - - AsyncWriterThread(const AsyncWriterThread&) = delete; - const AsyncWriterThread& operator=(const AsyncWriterThread&) = delete; - - //! @brief runs main method - void run(); - - std::thread* thread_ = nullptr; - RecursiveTimedMutex condition_variable_mutex_; - - //! List of asynchronous writers. - AsyncInterestTree interestTree_; - - bool running_ = false; - bool run_scheduled_ = false; - TimedConditionVariable cv_; -}; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _FASTDDS_RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/resources/ResourceEvent.h b/ThirdParty/ros/include/fastdds/rtps/resources/ResourceEvent.h index 9ad271a95..e39f8b147 100644 --- a/ThirdParty/ros/include/fastdds/rtps/resources/ResourceEvent.h +++ b/ThirdParty/ros/include/fastdds/rtps/resources/ResourceEvent.h @@ -22,18 +22,16 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include -#include #include +#include + #include +#include #include -namespace eprosima -{ -namespace fastrtps -{ -namespace rtps -{ +namespace eprosima { +namespace fastrtps { +namespace rtps { class TimedEventImpl; @@ -44,6 +42,7 @@ class TimedEventImpl; class ResourceEvent { public: + ResourceEvent() = default; ~ResourceEvent(); @@ -53,13 +52,16 @@ class ResourceEvent */ void init_thread(); + void stop_thread(); + /*! * @brief This method informs that a TimedEventImpl has been created. * * This method has to be called when creating a TimedEventImpl object. * @param event TimedEventImpl object that has been created. */ - void register_timer(TimedEventImpl* event); + void register_timer( + TimedEventImpl* event); /*! * @brief This method removes a TimedEventImpl object in case it is waiting to be processed by ResourceEvent's @@ -70,7 +72,8 @@ class ResourceEvent * Then it avoids the situation of the execution thread calling the event handler when it was previously removed. * @param event TimedEventImpl object that will be deleted and we have to be sure all its operations are cancelled. */ - void unregister_timer(TimedEventImpl* event); + void unregister_timer( + TimedEventImpl* event); /*! * @brief This method notifies to ResourceEvent that the TimedEventImpl object has operations to be scheduled. @@ -78,7 +81,8 @@ class ResourceEvent * These operations can be the cancellation of the timer or starting another async_wait. * @param event TimedEventImpl object that has operations to be scheduled. */ - void notify(TimedEventImpl* event); + void notify( + TimedEventImpl* event); /*! * @brief This method notifies to ResourceEvent that the TimedEventImpl object has operations to be scheduled. @@ -88,11 +92,14 @@ class ResourceEvent * @param event TimedEventImpl object that has operations to be scheduled. * @param timeout Maximum blocking time of the method. */ - void notify(TimedEventImpl* event, const std::chrono::steady_clock::time_point& timeout); + void notify( + TimedEventImpl* event, + const std::chrono::steady_clock::time_point& timeout); private: + //! Warns the internal thread can stop. - std::atomic stop_{false}; + std::atomic stop_{ false }; //! Protects internal data. TimedMutex mutex_; @@ -130,7 +137,8 @@ class ResourceEvent * @param event Event to be added in the queue. * @return True value if the insertion was successful. In other case, it return False. */ - bool register_timer_nts(TimedEventImpl* event); + bool register_timer_nts( + TimedEventImpl* event); //! Method called by the internal thread. void event_service(); @@ -150,12 +158,13 @@ class ResourceEvent pending_timers_.reserve(timers_count_); active_timers_.reserve(timers_count_); } + }; } /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ -#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC +#endif //DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif //_FASTDDS_RTPS_RESOURCES_RESOURCEEVENT_H_ +#endif //_FASTDDS_RTPS_RESOURCES_RESOURCEEVENT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/security/accesscontrol/AccessControl.h b/ThirdParty/ros/include/fastdds/rtps/security/accesscontrol/AccessControl.h index 20fdfafe2..8fd6f8825 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/accesscontrol/AccessControl.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/accesscontrol/AccessControl.h @@ -51,7 +51,6 @@ class AccessControl const RTPSParticipantAttributes& participant_attr, SecurityException& exception) = 0; - virtual bool get_permissions_token( PermissionsToken** permissions_token, const PermissionsHandle& handle, @@ -70,6 +69,9 @@ class AccessControl PermissionsCredentialToken* token, SecurityException& exception) = 0; + virtual PermissionsHandle* get_permissions_handle( + SecurityException& exception) = 0; + virtual bool return_permissions_handle( PermissionsHandle* permissions_handle, SecurityException& exception) = 0; diff --git a/ThirdParty/ros/include/fastdds/rtps/security/authentication/Authentication.h b/ThirdParty/ros/include/fastdds/rtps/security/authentication/Authentication.h index 54e5bdf0d..d4b8bdac0 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/authentication/Authentication.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/authentication/Authentication.h @@ -50,200 +50,223 @@ class Authentication; class AuthenticationListener { - virtual bool on_revoke_identity(Authentication& plugin, + virtual bool on_revoke_identity( + Authentication& plugin, const IdentityHandle& handle, SecurityException& exception) = 0; }; class Authentication { - public: - - virtual ~Authentication() = default; - - /*! - * @brief Validates the identity of the local RTPSParticipant. - * @param local_identity_handle (out) A handle that can be used to locally refer to the Authenticated - * Participant in subsequent interactions with the Authentication plugin. - * @param adjusted_participant_key (out) The GUID_t that the implementation shall use to uniquely identify the - * RTPSParticipant on the network. - * @param domain_id The Domain Id of the RTPSParticipant. - * @param participant_attr The RTPSParticipantAttributes of the RTPSParticipant. - * @param candidate_participant_key The GUID_t that the DDS implementation would have used to uniquely identify - * the RTPSParticipant if the Security plugins were not enabled. - * @param exception (out) A SecurityException object. - * @return Validation status. - */ - virtual ValidationResult_t validate_local_identity(IdentityHandle** local_identity_handle, - GUID_t& adjusted_participant_key, - const uint32_t domain_id, - const RTPSParticipantAttributes& participant_attr, - const GUID_t& candidate_participant_key, - SecurityException& exception) = 0; - - /*! - * @brief Initiates the process of validating the identity of the discovered remote RTPSParticipant, represented - * as an IdentityToken object. - * @param remote_identity_handle (out) A handle that can be used to locally refer to the remote Authenticated - * Participant in subsequent interactions with the AuthenticationPlugin. - * @param local_identity_handle A handle to the local RTPSParticipant requesting the remote participant to be - * validate. - * @param remote_identity_token A token received as part of ParticipantProxyData, representing the - * identity of the remote DomainParticipant. - * @param remote_participant_key - * @param exception (out) A SecurityException object. - * @result Validation status. - */ - virtual ValidationResult_t validate_remote_identity(IdentityHandle** remote_identity_handle, - const IdentityHandle& local_identity_handle, - const IdentityToken& remote_identity_token, - const GUID_t& remote_participant_key, - SecurityException& exception) = 0; - - /*! - * @brief This operation is used to initiate a handshake. - * @param handshake_handle (out) A handle returned by the Authentication plugin used to keep the state of the - * handshake. - * @param handshake_message (out) A HandshakeMessageToken to be sent using the BuiltinParticipantMessageWriter. - * @param initiator_identity_handle Handle to the local participant that originated the handshake. - * @param replier_identity_handle Handle to the remote participant whose identity is being validated. - * @param cdr_participant_data Participant's data. - * @param exception (out) A SecurityException object. - * @result Validation status. - */ - virtual ValidationResult_t begin_handshake_request(HandshakeHandle** handshake_handle, - HandshakeMessageToken** handshake_message, - const IdentityHandle& initiator_identity_handle, - IdentityHandle& replier_identity_handle, - const CDRMessage_t& cdr_participant_data, - SecurityException& exception) = 0; - - /*! - * @brief This operation shall be invoked by the implementation in reaction to the reception of the initial - * handshake message that originated on a RTPSParticipant that called the begin_handshake_request operation. - * @param handshake_handle (out) A handle returned by the Authentication Plugin used to keep the state of the - * handshake. - * @param handshake_message_out (out) A HandshakeMessageToken containing a message to be sent using the - * BuiltinParticipantMessageWriter. - * @param handshake_message_in A HandshakeMessageToken containing a message received from the - * BuiltinParticipantMessageReader. - * @param initiator_identity_handle Handle to the remote participant that originated the handshake. - * @param replier_identity_handle Handle to the local participant that is initiaing the handshake. - * @param cdr_participant_data Participant's CDRMessage. - * @param exception A SecurityException object. - * @result Validation status. - */ - virtual ValidationResult_t begin_handshake_reply( - HandshakeHandle** handshake_handle, - HandshakeMessageToken** handshake_message_out, - HandshakeMessageToken&& handshake_message_in, - IdentityHandle& initiator_identity_handle, - const IdentityHandle& replier_identity_handle, - const CDRMessage_t& cdr_participant_data, - SecurityException& exception) = 0; - - /*! - * @brief This operation is used to continue a handshake. - * @param handshake_message_out (out) A HandshakeMessageToken containing the message_data that should be - * place in a ParticipantStatelessMessage to be sent using the BuiltinParticipantMessageWriter. - * @param handshake_message_in The HandshakeMessageToken contained in the message_data attribute of the - * ParticipantStatelessMessage received. - * @param handshake_handle Handle returned by a correspoing previous call to begin_handshake_request or - * begin_handshake_reply. - * @param exception A SecurityException object. - * @return Validation status. - */ - virtual ValidationResult_t process_handshake( - HandshakeMessageToken** handshake_message_out, - HandshakeMessageToken&& handshake_message_in, - HandshakeHandle& handshake_handle, - SecurityException& exception) = 0; - - /*! - * @brief Retrieve the SharedSecretHandle resulting with a successfully completed handshake. - * @param handshake_handle Handle returned bu a corresponding previous call to begin_handshake_request or - * begin_handshake_reply, which has successfully complete the handshake operations. - * @param exception SecurityException object - * @return SharedSecretHandle. - */ - virtual SharedSecretHandle* get_shared_secret( - const HandshakeHandle& handshake_handle, - SecurityException& exception) = 0; - - /*! - * @brief Sets the AuthenticationListener that the Authentication plugin will use to notify the infrastructure - * of events relevant to the Authentication of RTPSParticipants. - * @param listener An AuthenticationListener object to be attached to the Authentication object. - * @param exception (out) A SecurityException object. - */ - virtual bool set_listener(AuthenticationListener* listener, - SecurityException& exception) = 0; - - virtual bool get_identity_token(IdentityToken** identity_token, - const IdentityHandle& handle, - SecurityException& exception) = 0; - - /*! - * @brief Returns the IdentityToken object to the plugin so it can be disposed of. - * @param token An IdentityToken issued by the plugin on a prior call to get_identity_token. - * @param exception (out) A SecurityException object. - */ - virtual bool return_identity_token(IdentityToken* token, - SecurityException& exception) = 0; - - /*! - * @brief Returns the Handshakehandle object to the plugin so it can be disposed of. - * @param handshake_handle A HandshakeHandle issued by the plugin on a prior call to begin_handshake_request or - * begin_handshake_reply. - * @param exception (out) A SecurityException object. - */ - virtual bool return_handshake_handle(HandshakeHandle* handshake_handle, - SecurityException& exception) = 0; - - /*! - * @brief Returns the IdentityHandle object to the plugin so it can be disposed of. - * @param identity_handle An IdentityHandle issued by the plugin on a prior call to validate_local_identity or - * validate_remote_identity. - * @param exception (out) A SecurityException object. - */ - virtual bool return_identity_handle(IdentityHandle* identity_handle, - SecurityException& exception) = 0; - - /*! - * @brief Returns the SharedSecretHandle object to the plugin so it can be disposed of. - * @param sharedsecret_handle An SharedSecretHandle issued by the plugin on a prior call to get_shared_secret. - * @param exception (out) A SecurityException object. - */ - virtual bool return_sharedsecret_handle(SharedSecretHandle* sharedsecret_handle, - SecurityException& exception) = 0; - - virtual bool set_permissions_credential_and_token(IdentityHandle& identity_handle, - PermissionsCredentialToken& permissions_credential_token, - SecurityException& ex) = 0; - - virtual bool get_authenticated_peer_credential_token(PermissionsCredentialToken **token, - const IdentityHandle& identity_handle, SecurityException& exception) = 0; - - virtual bool return_authenticated_peer_credential_token(PermissionsCredentialToken* token, - SecurityException& ex) = 0; - - bool set_logger(Logging* logger, - SecurityException& /*exception*/) - { - logger_ = logger; - return true; - } - - protected: - - const Logging* get_logger() const - { - return logger_; - } - - private: - - Logging* logger_ = nullptr; +public: + + virtual ~Authentication() = default; + + /*! + * @brief Validates the identity of the local RTPSParticipant. + * @param local_identity_handle (out) A handle that can be used to locally refer to the Authenticated + * Participant in subsequent interactions with the Authentication plugin. + * @param adjusted_participant_key (out) The GUID_t that the implementation shall use to uniquely identify the + * RTPSParticipant on the network. + * @param domain_id The Domain Id of the RTPSParticipant. + * @param participant_attr The RTPSParticipantAttributes of the RTPSParticipant. + * @param candidate_participant_key The GUID_t that the DDS implementation would have used to uniquely identify + * the RTPSParticipant if the Security plugins were not enabled. + * @param exception (out) A SecurityException object. + * @return Validation status. + */ + virtual ValidationResult_t validate_local_identity( + IdentityHandle** local_identity_handle, + GUID_t& adjusted_participant_key, + const uint32_t domain_id, + const RTPSParticipantAttributes& participant_attr, + const GUID_t& candidate_participant_key, + SecurityException& exception) = 0; + + /*! + * @brief Initiates the process of validating the identity of the discovered remote RTPSParticipant, represented + * as an IdentityToken object. + * @param remote_identity_handle (out) A handle that can be used to locally refer to the remote Authenticated + * Participant in subsequent interactions with the AuthenticationPlugin. + * @param local_identity_handle A handle to the local RTPSParticipant requesting the remote participant to be + * validate. + * @param remote_identity_token A token received as part of ParticipantProxyData, representing the + * identity of the remote DomainParticipant. + * @param remote_participant_key + * @param exception (out) A SecurityException object. + * @result Validation status. + */ + virtual ValidationResult_t validate_remote_identity( + IdentityHandle** remote_identity_handle, + const IdentityHandle& local_identity_handle, + const IdentityToken& remote_identity_token, + const GUID_t& remote_participant_key, + SecurityException& exception) = 0; + + /*! + * @brief This operation is used to initiate a handshake. + * @param handshake_handle (out) A handle returned by the Authentication plugin used to keep the state of the + * handshake. + * @param handshake_message (out) A HandshakeMessageToken to be sent using the BuiltinParticipantMessageWriter. + * @param initiator_identity_handle Handle to the local participant that originated the handshake. + * @param replier_identity_handle Handle to the remote participant whose identity is being validated. + * @param cdr_participant_data Participant's data. + * @param exception (out) A SecurityException object. + * @result Validation status. + */ + virtual ValidationResult_t begin_handshake_request( + HandshakeHandle** handshake_handle, + HandshakeMessageToken** handshake_message, + const IdentityHandle& initiator_identity_handle, + IdentityHandle& replier_identity_handle, + const CDRMessage_t& cdr_participant_data, + SecurityException& exception) = 0; + + /*! + * @brief This operation shall be invoked by the implementation in reaction to the reception of the initial + * handshake message that originated on a RTPSParticipant that called the begin_handshake_request operation. + * @param handshake_handle (out) A handle returned by the Authentication Plugin used to keep the state of the + * handshake. + * @param handshake_message_out (out) A HandshakeMessageToken containing a message to be sent using the + * BuiltinParticipantMessageWriter. + * @param handshake_message_in A HandshakeMessageToken containing a message received from the + * BuiltinParticipantMessageReader. + * @param initiator_identity_handle Handle to the remote participant that originated the handshake. + * @param replier_identity_handle Handle to the local participant that is initiaing the handshake. + * @param cdr_participant_data Participant's CDRMessage. + * @param exception A SecurityException object. + * @result Validation status. + */ + virtual ValidationResult_t begin_handshake_reply( + HandshakeHandle** handshake_handle, + HandshakeMessageToken** handshake_message_out, + HandshakeMessageToken&& handshake_message_in, + IdentityHandle& initiator_identity_handle, + const IdentityHandle& replier_identity_handle, + const CDRMessage_t& cdr_participant_data, + SecurityException& exception) = 0; + + /*! + * @brief This operation is used to continue a handshake. + * @param handshake_message_out (out) A HandshakeMessageToken containing the message_data that should be + * place in a ParticipantStatelessMessage to be sent using the BuiltinParticipantMessageWriter. + * @param handshake_message_in The HandshakeMessageToken contained in the message_data attribute of the + * ParticipantStatelessMessage received. + * @param handshake_handle Handle returned by a correspoing previous call to begin_handshake_request or + * begin_handshake_reply. + * @param exception A SecurityException object. + * @return Validation status. + */ + virtual ValidationResult_t process_handshake( + HandshakeMessageToken** handshake_message_out, + HandshakeMessageToken&& handshake_message_in, + HandshakeHandle& handshake_handle, + SecurityException& exception) = 0; + + /*! + * @brief Retrieve the SecretHandle resulting with a successfully completed handshake. + * @param handshake_handle Handle returned bu a corresponding previous call to begin_handshake_request or + * begin_handshake_reply, which has successfully complete the handshake operations. + * @param exception SecurityException object + * @return SecretHandle. + */ + virtual std::shared_ptr get_shared_secret( + const HandshakeHandle& handshake_handle, + SecurityException& exception) const = 0; + + /*! + * @brief Sets the AuthenticationListener that the Authentication plugin will use to notify the infrastructure + * of events relevant to the Authentication of RTPSParticipants. + * @param listener An AuthenticationListener object to be attached to the Authentication object. + * @param exception (out) A SecurityException object. + */ + virtual bool set_listener( + AuthenticationListener* listener, + SecurityException& exception) = 0; + + virtual bool get_identity_token( + IdentityToken** identity_token, + const IdentityHandle& handle, + SecurityException& exception) = 0; + + /*! + * @brief Returns the IdentityToken object to the plugin so it can be disposed of. + * @param token An IdentityToken issued by the plugin on a prior call to get_identity_token. + * @param exception (out) A SecurityException object. + */ + virtual bool return_identity_token( + IdentityToken* token, + SecurityException& exception) = 0; + + /*! + * @brief Returns the Handshakehandle object to the plugin so it can be disposed of. + * @param handshake_handle A HandshakeHandle issued by the plugin on a prior call to begin_handshake_request or + * begin_handshake_reply. + * @param exception (out) A SecurityException object. + */ + virtual bool return_handshake_handle( + HandshakeHandle* handshake_handle, + SecurityException& exception) = 0; + + /*! + * @brief Creates and IdentityHandle for the handshake process + * @param exception (out) A SecurityException object. + * @return the new handle or nullptr on failure + */ + virtual IdentityHandle* get_identity_handle( + SecurityException& exception) = 0; + + /*! + * @brief Returns the IdentityHandle object to the plugin so it can be disposed of. + * @param identity_handle An IdentityHandle issued by the plugin on a prior call to validate_local_identity or + * validate_remote_identity. + * @param exception (out) A SecurityException object. + */ + virtual bool return_identity_handle( + IdentityHandle* identity_handle, + SecurityException& exception) = 0; + + /*! + * @brief Returns the SecretHandle object to the plugin so it can be disposed of. + * @param sharedsecret_handle An SharedSecretHandle issued by the plugin on a prior call to get_shared_secret. + * @param exception (out) A SecurityException object. + */ + virtual bool return_sharedsecret_handle( + std::shared_ptr& sharedsecret_handle, + SecurityException& exception) const = 0; + + virtual bool set_permissions_credential_and_token( + IdentityHandle& identity_handle, + PermissionsCredentialToken& permissions_credential_token, + SecurityException& ex) = 0; + + virtual bool get_authenticated_peer_credential_token( + PermissionsCredentialToken** token, + const IdentityHandle& identity_handle, + SecurityException& exception) = 0; + + virtual bool return_authenticated_peer_credential_token( + PermissionsCredentialToken* token, + SecurityException& ex) = 0; + + bool set_logger( + Logging* logger, + SecurityException& /*exception*/) + { + logger_ = logger; + return true; + } + +protected: + + const Logging* get_logger() const + { + return logger_; + } + +private: + + Logging* logger_ = nullptr; }; } //namespace security diff --git a/ThirdParty/ros/include/fastdds/rtps/security/common/Handle.h b/ThirdParty/ros/include/fastdds/rtps/security/common/Handle.h index f3d9ff29e..7efb54ab6 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/common/Handle.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/common/Handle.h @@ -26,100 +26,132 @@ namespace fastrtps { namespace rtps { namespace security { -class Handle +class Handle : public std::enable_shared_from_this { - public: +public: - const std::string& get_class_id() const - { - return class_id_; - } + const std::string& get_class_id() const + { + return class_id_; + } - virtual bool nil() const = 0; + virtual bool nil() const = 0; - protected: +protected: - Handle(const std::string& class_id) : class_id_(class_id) {}; + Handle( + const std::string& class_id) + : class_id_(class_id) + { + } - virtual ~Handle(){} + virtual ~Handle() + { + } - private: +private: - std::string class_id_; + std::string class_id_; }; -template +template class HandleImpl : public Handle { - public: + friend F; - typedef T type; +protected: - HandleImpl() : Handle(T::class_id_), impl_(new T) {} + HandleImpl() + : Handle(T::class_id_) + , impl_(new T) + { + } - virtual ~HandleImpl() = default; + virtual ~HandleImpl() = default; - static HandleImpl& narrow(Handle& handle) - { - if(handle.get_class_id().compare(T::class_id_) == 0) - return reinterpret_cast&>(handle); +public: - return HandleImpl::nil_handle; - } + typedef T type; - static const HandleImpl& narrow(const Handle& handle) + static HandleImpl& narrow( + Handle& handle) + { + if (handle.get_class_id().compare(T::class_id_) == 0) { - if(handle.get_class_id().compare(T::class_id_) == 0) - return reinterpret_cast&>(handle); - - return HandleImpl::nil_handle; + return reinterpret_cast&>(handle); } - bool nil() const override - { - return impl_ ? false : true; - } + return HandleImpl::nil_handle; + } - T* operator*() + static const HandleImpl& narrow( + const Handle& handle) + { + if (handle.get_class_id().compare(T::class_id_) == 0) { - return impl_.get(); + return reinterpret_cast&>(handle); } - const T* operator*() const - { - return impl_.get(); - } + return HandleImpl::nil_handle; + } - T* operator->() - { - return impl_.get(); - } + bool nil() const override + { + return impl_ ? false : true; + } - const T* operator->() const - { - return impl_.get(); - } + T* operator *() + { + return impl_.get(); + } + + const T* operator *() const + { + return impl_.get(); + } + + T* operator ->() + { + return impl_.get(); + } - static HandleImpl nil_handle; + const T* operator ->() const + { + return impl_.get(); + } - private: + static HandleImpl nil_handle; - explicit HandleImpl(bool) : Handle(T::class_id_) {} +private: - std::unique_ptr impl_; + explicit HandleImpl( + bool) + : Handle(T::class_id_) + { + } + + std::unique_ptr impl_; }; -template -HandleImpl HandleImpl::nil_handle(true); + +template +HandleImpl HandleImpl::nil_handle(true); class NilHandle : public Handle { - public: +public: - NilHandle() : Handle("nil_handle") {} + NilHandle() + : Handle("nil_handle") + { + } - virtual ~NilHandle() = default; + virtual ~NilHandle() = default; + + bool nil() const override + { + return true; + } - bool nil() const override { return true; } }; @@ -128,6 +160,8 @@ typedef Handle IdentityHandle; typedef Handle PermissionsHandle; +typedef Handle SecretHandle; + typedef Handle ParticipantCryptoHandle; typedef Handle EntityCryptoHandle; typedef Handle DatawriterCryptoHandle; diff --git a/ThirdParty/ros/include/fastdds/rtps/security/common/SharedSecretHandle.h b/ThirdParty/ros/include/fastdds/rtps/security/common/SharedSecretHandle.h index 2d468aced..cd4b4ffaa 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/common/SharedSecretHandle.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/common/SharedSecretHandle.h @@ -29,105 +29,129 @@ namespace security { class SharedSecret { +public: + + class BinaryData + { public: - class BinaryData + BinaryData() + { + } + + BinaryData( + const BinaryData& data) + : name_(data.name_) + , value_(data.value_) + { + } + + BinaryData( + BinaryData&& data) + : name_(std::move(data.name_)) + , value_(std::move(data.value_)) + { + } + + BinaryData( + const std::string& name, + const std::vector& value) + : name_(name) + , value_(value) + { + } + + BinaryData( + std::string&& name, + std::vector&& value) + : name_(std::move(name)) + , value_(std::move(value)) + { + } + + BinaryData& operator =( + const BinaryData& data) + { + name_ = data.name_; + value_ = data.value_; + return *this; + } + + BinaryData& operator =( + BinaryData&& data) + { + name_ = std::move(data.name_); + value_ = std::move(data.value_); + return *this; + } + + void name( + const std::string& name) + { + name_ = name; + } + + void name( + std::string&& name) + { + name_ = std::move(name); + } + + const std::string& name() const { - public: - - BinaryData() {} - - BinaryData(const BinaryData& data) : - name_(data.name_), - value_(data.value_) {} - - BinaryData(BinaryData&& data) : - name_(std::move(data.name_)), - value_(std::move(data.value_)) {} - - BinaryData(const std::string& name, - const std::vector& value) : - name_(name), value_(value) {} - - BinaryData(std::string&& name, - std::vector&& value) : - name_(std::move(name)), value_(std::move(value)) {} - - BinaryData& operator=(const BinaryData& data) - { - name_ = data.name_; - value_ = data.value_; - return *this; - } - - BinaryData& operator=(BinaryData&& data) - { - name_ = std::move(data.name_); - value_ = std::move(data.value_); - return *this; - } - - void name(const std::string& name) - { - name_ = name; - } - - void name(std::string&& name) - { - name_ = std::move(name); - } - - const std::string& name() const - { - return name_; - } - - std::string& name() - { - return name_; - } - - void value(const std::vector& value) - { - value_ = value; - } - - void value(std::vector&& value) - { - value_ = std::move(value); - } - - const std::vector& value() const - { - return value_; - } - - std::vector& value() - { - return value_; - } - - private: - - std::string name_; - - std::vector value_; - }; - - static const char* const class_id_; - - std::vector data_; + return name_; + } + + std::string& name() + { + return name_; + } + + void value( + const std::vector& value) + { + value_ = value; + } + + void value( + std::vector&& value) + { + value_ = std::move(value); + } + + const std::vector& value() const + { + return value_; + } + + std::vector& value() + { + return value_; + } + + private: + + std::string name_; + + std::vector value_; + }; + + static const char* const class_id_; + + std::vector data_; }; -typedef HandleImpl SharedSecretHandle; +class PKIDH; + +typedef HandleImpl SharedSecretHandle; class SharedSecretHelper { - public: - - static std::vector* find_data_value(SharedSecret& sharedsecret, const std::string& name); +public: - static const std::vector* find_data_value(const SharedSecret& sharedsecret, const std::string& name); + static const std::vector* find_data_value( + const SecretHandle& sharedsecret, + const std::string& name); }; } //namespace security diff --git a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoKeyFactory.h b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoKeyFactory.h index 02c5e631e..907bb3987 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoKeyFactory.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoKeyFactory.h @@ -22,6 +22,8 @@ #include #include +#include + namespace eprosima { namespace fastrtps { namespace rtps { @@ -29,135 +31,191 @@ namespace security { class CryptoKeyFactory { - public: - - virtual ~CryptoKeyFactory(){} - /** - * Register a local, already authenticated Participant with the Cryptographic Plugin. - * Creates Crypto material needed to encrypt messages directed to other Participants - * @param participant_identity Made by a prior call to validate_local_identity - * @param participant_permissions Made by a prior call to validate_local_permissions - * @param participant_properties Combination of PropertyQoSPolicy and contents of AccessControl - * @param participant_security_attributes ParticipantSecurity Attributes. - * @param exception (out) Security exception - * @return ParticipantCryptoHandle with generated key material - */ - virtual ParticipantCryptoHandle * register_local_participant( - const IdentityHandle &participant_identity, - const PermissionsHandle &participant_permissions, - const PropertySeq &participant_properties, - const ParticipantSecurityAttributes &participant_security_attributes, - SecurityException &exception) = 0; - - /** - * Register a remote, already authenticated Participant with the Cryptographic Plugin. - * Creates key material to decrypt messages coming from and aimed at it. - * @param local_participant_crypto_handle Returned by a prior call to register_local_participant - * @param remote_participant_identity Returned by a prior call to validate_remote_identity - * @param remote_participant_permissions Returned by a prior call to validate_remote_permissions - * @param shared_secret Returned by a prior call to get_shared_secret (Auth Handshake) - * @param exception (out) Security exception - * @return ParticipantCryptoHandle with generated key material - */ - virtual ParticipantCryptoHandle * register_matched_remote_participant( - const ParticipantCryptoHandle& local_participant_crypto_handle, - const IdentityHandle& remote_participant_identity, - const PermissionsHandle& remote_participant_permissions, - const SharedSecretHandle& shared_secret, - SecurityException &exception) = 0; - - /** - * Register a local DataWriter belonging to an authenticated Pariticipant. - * Creates cryptomaterial for use with incoming/outgoing messages - * @param participant_crypto returned by a prior call to register_local_participant - * @param datawriter_prop Combination of PropertyWosPolicy and contents of AccessControl - * @param datawriter_sec_attr EndpointSecurity Attributes. - * @param exception (out) Security exception - * @return CryptoHandle to be used with operations related to the DataWriter - */ - virtual DatawriterCryptoHandle * register_local_datawriter( - ParticipantCryptoHandle &participant_crypto, - const PropertySeq &datawriter_prop, - const EndpointSecurityAttributes &datawriter_sec_attr, - SecurityException &exception) = 0; - - /** - * Register a remote DataReader that has been granted permission to match with the local DataWriter. - * Creates cryptographic material to encript/decrypt messages from and towards that DataReader. - * @param local_datawriter_crypto_handle Returned by a prior call to register_local_datawriter - * @param remote_participant_crypto Returned by a prior call to register_matched_remote_participant. - * @param shared_secret Obtained as a result of the Authentication Handshake. - * @param relay_only If FALSE it generates material for both a submessage and serialized payload. Submessages only if TRUE. - * @param exception (out) Security exception. - * @return Crypto Handle to the generated key material. - */ - virtual DatareaderCryptoHandle * register_matched_remote_datareader( - DatawriterCryptoHandle &local_datawriter_crypto_handle, - ParticipantCryptoHandle &remote_participant_crypto, - const SharedSecretHandle &shared_secret, - const bool relay_only, - SecurityException &exception) = 0; - - /** - * Register a local DataReader (belonging to an authenticated and authorized Participant) with the Cryptographic Plugin. - * Creates crypto material to encode messages when the encryption is independent of the targeted DataWriter - * @param participant_crypto Returned by a prior call to register_local_participant - * @param datareader_properties Combination of PropertyQosPolicy and the contents of AccessControl - * @param datareader_security_attributes EndpointSecurity Attributes. - * @param exception (out) Security exception - * @return Crypto Handle to the generated key material - */ - virtual DatareaderCryptoHandle * register_local_datareader( - ParticipantCryptoHandle &participant_crypto, - const PropertySeq &datareader_properties, - const EndpointSecurityAttributes &datareader_security_attributes, - SecurityException &exception) = 0; - - /** - * Register a remote DataWriter that has been granted permission to match with a local DataReader. - * Creates crypto material to decrypt messages coming from and encode messages going towards that datareader - * @param local_datareader_crypto_handle - * @param remote_participant_crypt - * @param shared_secret - * @param exception (out) Security exception - * @return Crypto handle to the generated key material - */ - virtual DatawriterCryptoHandle * register_matched_remote_datawriter( - DatareaderCryptoHandle &local_datareader_crypto_handle, - ParticipantCryptoHandle &remote_participant_crypt, - const SharedSecretHandle &shared_secret, - SecurityException &exception) = 0; - - /** - * Releases resources associated with a Participant. The Crypto Handle becomes unusable after this - * @param participant_crypto_handle Belonging to the Participant that awaits termination - * @param exception (out) Security exception - * @return TRUE is succesful - */ - virtual bool unregister_participant( - ParticipantCryptoHandle* participant_crypto_handle, - SecurityException &exception) = 0; - - /** - * Releases resources associated with a DataWriter. The Crypto Handle becomes unusable after this - * @param datawriter_crypto_handle Belonging to the DataWriter that awaits termination - * @param exception (out) Security exception - * @return TRUE is succesful - */ - virtual bool unregister_datawriter( - DatawriterCryptoHandle *datawriter_crypto_handle, - SecurityException &exception) = 0; - - /** - * Releases resources associated with a DataReader. The Crypto Handle becomes unusable after this - * @param datareader_crypto_handle Belonging to the DataReader that awaits termination - * @param exception (out) Security exception - * @return TRUE is succesful - */ - virtual bool unregister_datareader( - DatareaderCryptoHandle *datareader_crypto_handle, - SecurityException &exception) = 0; - +public: + + virtual ~CryptoKeyFactory() + { + } + + /** + * Register a local, already authenticated Participant with the Cryptographic Plugin. + * Creates Crypto material needed to encrypt messages directed to other Participants + * @param participant_identity Made by a prior call to validate_local_identity + * @param participant_permissions Made by a prior call to validate_local_permissions + * @param participant_properties Combination of PropertyQoSPolicy and contents of AccessControl + * @param participant_security_attributes ParticipantSecurity Attributes. + * @param exception (out) Security exception + * @return ParticipantCryptoHandle with generated key material + */ + virtual std::shared_ptr register_local_participant( + const IdentityHandle& participant_identity, + const PermissionsHandle& participant_permissions, + const PropertySeq& participant_properties, + const ParticipantSecurityAttributes& participant_security_attributes, + SecurityException& exception) = 0; + + /** + * Register a remote, already authenticated Participant with the Cryptographic Plugin. + * Creates key material to decrypt messages coming from and aimed at it. + * @param local_participant_crypto_handle Returned by a prior call to register_local_participant + * @param remote_participant_identity Returned by a prior call to validate_remote_identity + * @param remote_participant_permissions Returned by a prior call to validate_remote_permissions + * @param shared_secret Returned by a prior call to get_shared_secret (Auth Handshake) + * @param exception (out) Security exception + * @return ParticipantCryptoHandle with generated key material + */ + virtual std::shared_ptr register_matched_remote_participant( + const ParticipantCryptoHandle& local_participant_crypto_handle, + const IdentityHandle& remote_participant_identity, + const PermissionsHandle& remote_participant_permissions, + const SecretHandle& shared_secret, + SecurityException& exception) = 0; + + /** + * Register a local DataWriter belonging to an authenticated Pariticipant. + * Creates cryptomaterial for use with incoming/outgoing messages + * @param participant_crypto returned by a prior call to register_local_participant + * @param datawriter_prop Combination of PropertyWosPolicy and contents of AccessControl + * @param datawriter_sec_attr EndpointSecurity Attributes. + * @param exception (out) Security exception + * @return CryptoHandle to be used with operations related to the DataWriter + */ + virtual DatawriterCryptoHandle* register_local_datawriter( + ParticipantCryptoHandle& participant_crypto, + const PropertySeq& datawriter_prop, + const EndpointSecurityAttributes& datawriter_sec_attr, + SecurityException& exception) = 0; + + /** + * Register a remote DataReader that has been granted permission to match with the local DataWriter. + * Creates cryptographic material to encript/decrypt messages from and towards that DataReader. + * @param local_datawriter_crypto_handle Returned by a prior call to register_local_datawriter + * @param remote_participant_crypto Returned by a prior call to register_matched_remote_participant. + * @param shared_secret Obtained as a result of the Authentication Handshake. + * @param relay_only If FALSE it generates material for both a submessage and serialized payload. Submessages only if TRUE. + * @param exception (out) Security exception. + * @return Crypto Handle to the generated key material. + */ + virtual DatareaderCryptoHandle* register_matched_remote_datareader( + DatawriterCryptoHandle& local_datawriter_crypto_handle, + ParticipantCryptoHandle& remote_participant_crypto, + const SecretHandle& shared_secret, + const bool relay_only, + SecurityException& exception) = 0; + + /** + * Register a local DataReader (belonging to an authenticated and authorized Participant) with the Cryptographic Plugin. + * Creates crypto material to encode messages when the encryption is independent of the targeted DataWriter + * @param participant_crypto Returned by a prior call to register_local_participant + * @param datareader_properties Combination of PropertyQosPolicy and the contents of AccessControl + * @param datareader_security_attributes EndpointSecurity Attributes. + * @param exception (out) Security exception + * @return Crypto Handle to the generated key material + */ + virtual DatareaderCryptoHandle* register_local_datareader( + ParticipantCryptoHandle& participant_crypto, + const PropertySeq& datareader_properties, + const EndpointSecurityAttributes& datareader_security_attributes, + SecurityException& exception) = 0; + + /** + * Register a remote DataWriter that has been granted permission to match with a local DataReader. + * Creates crypto material to decrypt messages coming from and encode messages going towards that datareader + * @param local_datareader_crypto_handle + * @param remote_participant_crypt + * @param shared_secret + * @param exception (out) Security exception + * @return Crypto handle to the generated key material + */ + virtual DatawriterCryptoHandle* register_matched_remote_datawriter( + DatareaderCryptoHandle& local_datareader_crypto_handle, + ParticipantCryptoHandle& remote_participant_crypt, + const SecretHandle& shared_secret, + SecurityException& exception) = 0; + + /** + * Releases resources associated with a Participant. The Crypto Handle becomes unusable after this + * @param participant_crypto_handle Belonging to the Participant that awaits termination + * @param exception (out) Security exception + * @return TRUE is successful + */ + virtual bool unregister_participant( + std::shared_ptr& participant_crypto_handle, + SecurityException& exception) = 0; + + /** + * Releases resources associated with a DataWriter. The Crypto Handle may become unusable after this + * @param datawriter_crypto_handle Belonging to the DataWriter that awaits termination + * @param exception (out) Security exception + * @return TRUE is successful + */ + virtual bool unregister_datawriter( + std::shared_ptr& datawriter_crypto_handle, + SecurityException& exception) = 0; + + /** + * Convenient override for raw pointers arguments. + * @param datawriter_crypto_handle Belonging to the DataWriter that awaits termination + * @param exception (out) Security exception + * @return TRUE is successful + */ + bool unregister_datawriter( + DatawriterCryptoHandle* datawriter_crypto_handle, + SecurityException& exception) + { + + if (nullptr == datawriter_crypto_handle) + { + return false; + } + + try + { + auto temp = datawriter_crypto_handle->shared_from_this(); + return unregister_datawriter(temp, exception); + } + catch (std::bad_weak_ptr&) + { + return false; + } + } + + /** + * Releases resources associated with a DataReader. The Crypto Handle may become unusable after this + * @param datareader_crypto_handle Belonging to the DataReader that awaits termination + * @param exception (out) Security exception + * @return TRUE is successful + */ + virtual bool unregister_datareader( + std::shared_ptr& datareader_crypto_handle, + SecurityException& exception) = 0; + + /** + * Convenient override for raw pointers arguments. + * @param datareader_crypto_handle Belonging to the DataWriter that awaits termination + * @param exception (out) Security exception + * @return TRUE is successful + */ + bool unregister_datareader( + DatareaderCryptoHandle* datareader_crypto_handle, + SecurityException& exception) + { + + if (nullptr == datareader_crypto_handle) + { + return false; + } + + try + { + auto temp = datareader_crypto_handle->shared_from_this(); + return unregister_datareader(temp, exception); + } + catch (std::bad_weak_ptr&) + { + return false; + } + } }; diff --git a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoTransform.h b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoTransform.h index b0e2df3af..da4f93e1a 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoTransform.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/CryptoTransform.h @@ -18,6 +18,8 @@ #ifndef _FASTDDS_RTPS_SECURITY_CRYPTOGRAPHY_CRYPTOTRANSFORM_H_ #define _FASTDDS_RTPS_SECURITY_CRYPTOGRAPHY_CRYPTOTRANSFORM_H_ +#include + #include #include #include @@ -29,163 +31,169 @@ namespace security { class CryptoTransform { - public: - - virtual ~CryptoTransform(){} - /** - * Serializes the payload sent by the user with a Datawriter. - * @param encoded_payload (out) Result of the encryption - * @param extra_inline_qos (out) Contains additional parameters to be added to the inlineQos of the submessage - * @param payload Plain input buffer - * @param sending_datawriter_crypto Returned by a prior call to register_local_datawriter - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool encode_serialized_payload( - SerializedPayload_t& encoded_payload, - std::vector& extra_inline_qos, - const SerializedPayload_t& payload, - DatawriterCryptoHandle& sending_datawriter_crypto, - SecurityException& exception) = 0; - /** - * Encodes a Data, DataFrag, Gap, Heartbeat or HeartBeatFrag - * @param encoded_rtps_submessage (out) Result of the encryption - * @param plain_rtps_submessage Plain input buffer - * @param sending_datawriter_crypto Crypto of the datawriter that sends the message - * @param receiving_datareader_crypto_list Crypto of the datareaders the message is aimed at - * @param exception (out) Security exception - * @return TRUE is successful - */ - virtual bool encode_datawriter_submessage( - CDRMessage_t& encoded_rtps_submessage, - const CDRMessage_t& plain_rtps_submessage, - DatawriterCryptoHandle& sending_datawriter_crypto, - std::vector& receiving_datareader_crypto_list, - SecurityException& exception) = 0; - - /** - * Encodes an AckNack or NackFrag - * @param encoded_rtps_submessage (out) Result of the encryption - * @param plain_rtps_submessage Plain input buffer - * @param sending_datareader_crypto Crypto of the sending datareader - * @param receiving_datawriter_crypto_list List with Crypto of the intended datawriter recipients - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool encode_datareader_submessage( - CDRMessage_t& encoded_rtps_submessage, - const CDRMessage_t& plain_rtps_submessage, - DatareaderCryptoHandle& sending_datareader_crypto, - std::vector& receiving_datawriter_crypto_list, - SecurityException& exception) = 0; - - /** - * Encodes a full rtps message - * @param encoded_rtps_message (out) Result of the encryption - * @param plain_rtps_message Plain input buffer - * @param sending_crypto Crypto of the Participant where the message originates from - * @param receiving_crypto_list Crypto of the Partipants the message is intended towards - * @param exception (out) Security expcetion - * @return TRUE if successful - */ - virtual bool encode_rtps_message( - CDRMessage_t& encoded_rtps_message, - const CDRMessage_t& plain_rtps_message, - ParticipantCryptoHandle &sending_crypto, - std::vector &receiving_crypto_list, - SecurityException &exception) = 0; - - /** - * Reverses the transformation performed by encode_rtps_message. Decrypts the contents and veryfies MACs or digital signatures. - * @param plain_buffer (out) Decoded message - * @param encoded_buffer Encoded message - * @param receiving_crypto Crypto of the Participant that receives the message - * @param sending_crypto Crypto of the Participant that wrote the message - * @param exception (out) Security exception - * @return TRUE is successful - */ - virtual bool decode_rtps_message( - CDRMessage_t& plain_buffer, - const CDRMessage_t& encoded_buffer, - const ParticipantCryptoHandle &receiving_crypto, - const ParticipantCryptoHandle &sending_crypto, - SecurityException &exception) = 0; - - /** - * Determines whether the secure submessage comes from a datawriter or a data reader and extracts the required CryptoHandle to decode it. - * @param datawriter_crypto (out) Crypto of the sending datawriter, if applicable - * @param datareader_crypto (out) Crypto of the sending datareader, if applicable - * @param secure_submessage_category (out) Specifies wether the message comes from a datawriter or from a datareader - * @param encoded_rtps_submessage encoded input submessage - * @param receiving_crypto Crypto of the Participant that receives the message - * @param sending_crypto Crypto of the Participant that sent the message - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool preprocess_secure_submsg( - DatawriterCryptoHandle **datawriter_crypto, - DatareaderCryptoHandle **datareader_crypto, - SecureSubmessageCategory_t &secure_submessage_category, - const CDRMessage_t& encoded_rtps_submessage, - ParticipantCryptoHandle &receiving_crypto, - ParticipantCryptoHandle &sending_crypto, - SecurityException &exception) = 0; - - /** - * Called after prprocess_secure_submessage when the submessage category is DATAWRITER_SUBMESSAGE - * @param plain_rtps_submessage (out) Result of the decryption - * @param encoded_rtps_submessage Encoded message - * @param receiving_datareader_crypto Crypto of the target datareader - * @param sending_datawriter_crypto Crypto of the datawriter that sent the message - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool decode_datawriter_submessage( - CDRMessage_t& plain_rtps_submessage, - CDRMessage_t& encoded_rtps_submessage, - DatareaderCryptoHandle &receiving_datareader_crypto, - DatawriterCryptoHandle &sending_datawriter_crypto, - SecurityException &exception) = 0; - - /** - * Called after preprocess_secure_submessage when the submessage category is DATAREADER_SUBMESSAGE - * @param plain_rtps_submessage (out) Result of the decryption - * @param encoded_rtps_submessage Encoded message - * @param receiving_datawriter_crypto Crypto of the target datawriter - * @param sending_datareader_crypto Crypto of the datareader that sent the message - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool decode_datareader_submessage( - CDRMessage_t& plain_rtps_submessage, - CDRMessage_t& encoded_rtps_submessage, - DatawriterCryptoHandle &receiving_datawriter_crypto, - DatareaderCryptoHandle &sending_datareader_crypto, - SecurityException &exception) = 0; - - /** - * Undoes the decryption transformation made on the writer side. - * @param plain_payload (out) Result of the decryption - * @param encoded_payload Encoded input buffer - * @param inline_qos Coming from the data message that carries the target payload - * @param receiving_datareader_crypto Crypto of the target datareader - * @param sending_datawriter_crypto Crypto of the datawriter that sent the message - * @param exception (out) Security exception - * @return TRUE if successful - */ - virtual bool decode_serialized_payload( - SerializedPayload_t& plain_payload, - const SerializedPayload_t& encoded_payload, - const std::vector& inline_qos, - DatareaderCryptoHandle& receiving_datareader_crypto, - DatawriterCryptoHandle& sending_datawriter_crypto, - SecurityException& exception) = 0; - - virtual uint32_t calculate_extra_size_for_rtps_message(uint32_t number_discovered_participants) const = 0; - - virtual uint32_t calculate_extra_size_for_rtps_submessage(uint32_t number_discovered_readers) const = 0; - - virtual uint32_t calculate_extra_size_for_encoded_payload(uint32_t number_discovered_readers) const = 0; +public: + + virtual ~CryptoTransform() + { + } + + /** + * Serializes the payload sent by the user with a Datawriter. + * @param encoded_payload (out) Result of the encryption + * @param extra_inline_qos (out) Contains additional parameters to be added to the inlineQos of the submessage + * @param payload Plain input buffer + * @param sending_datawriter_crypto Returned by a prior call to register_local_datawriter + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool encode_serialized_payload( + SerializedPayload_t& encoded_payload, + std::vector& extra_inline_qos, + const SerializedPayload_t& payload, + DatawriterCryptoHandle& sending_datawriter_crypto, + SecurityException& exception) = 0; + /** + * Encodes a Data, DataFrag, Gap, Heartbeat or HeartBeatFrag + * @param encoded_rtps_submessage (out) Result of the encryption + * @param plain_rtps_submessage Plain input buffer + * @param sending_datawriter_crypto Crypto of the datawriter that sends the message + * @param receiving_datareader_crypto_list Crypto of the datareaders the message is aimed at + * @param exception (out) Security exception + * @return TRUE is successful + */ + virtual bool encode_datawriter_submessage( + CDRMessage_t& encoded_rtps_submessage, + const CDRMessage_t& plain_rtps_submessage, + DatawriterCryptoHandle& sending_datawriter_crypto, + std::vector>& receiving_datareader_crypto_list, + SecurityException& exception) = 0; + + /** + * Encodes an AckNack or NackFrag + * @param encoded_rtps_submessage (out) Result of the encryption + * @param plain_rtps_submessage Plain input buffer + * @param sending_datareader_crypto Crypto of the sending datareader + * @param receiving_datawriter_crypto_list List with Crypto of the intended datawriter recipients + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool encode_datareader_submessage( + CDRMessage_t& encoded_rtps_submessage, + const CDRMessage_t& plain_rtps_submessage, + DatareaderCryptoHandle& sending_datareader_crypto, + std::vector>& receiving_datawriter_crypto_list, + SecurityException& exception) = 0; + + /** + * Encodes a full rtps message + * @param encoded_rtps_message (out) Result of the encryption + * @param plain_rtps_message Plain input buffer + * @param sending_crypto Crypto of the Participant where the message originates from + * @param receiving_crypto_list Crypto of the Partipants the message is intended towards + * @param exception (out) Security expcetion + * @return TRUE if successful + */ + virtual bool encode_rtps_message( + CDRMessage_t& encoded_rtps_message, + const CDRMessage_t& plain_rtps_message, + ParticipantCryptoHandle& sending_crypto, + std::vector>& receiving_crypto_list, + SecurityException& exception) = 0; + + /** + * Reverses the transformation performed by encode_rtps_message. Decrypts the contents and veryfies MACs or digital signatures. + * @param plain_buffer (out) Decoded message + * @param encoded_buffer Encoded message + * @param receiving_crypto Crypto of the Participant that receives the message + * @param sending_crypto Crypto of the Participant that wrote the message + * @param exception (out) Security exception + * @return TRUE is successful + */ + virtual bool decode_rtps_message( + CDRMessage_t& plain_buffer, + const CDRMessage_t& encoded_buffer, + const ParticipantCryptoHandle& receiving_crypto, + const ParticipantCryptoHandle& sending_crypto, + SecurityException& exception) = 0; + + /** + * Determines whether the secure submessage comes from a datawriter or a data reader and extracts the required CryptoHandle to decode it. + * @param datawriter_crypto (out) Crypto of the sending datawriter, if applicable + * @param datareader_crypto (out) Crypto of the sending datareader, if applicable + * @param secure_submessage_category (out) Specifies whether the message comes from a datawriter or from a datareader + * @param encoded_rtps_submessage encoded input submessage + * @param receiving_crypto Crypto of the Participant that receives the message + * @param sending_crypto Crypto of the Participant that sent the message + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool preprocess_secure_submsg( + DatawriterCryptoHandle** datawriter_crypto, + DatareaderCryptoHandle** datareader_crypto, + SecureSubmessageCategory_t& secure_submessage_category, + const CDRMessage_t& encoded_rtps_submessage, + ParticipantCryptoHandle& receiving_crypto, + ParticipantCryptoHandle& sending_crypto, + SecurityException& exception) = 0; + + /** + * Called after prprocess_secure_submessage when the submessage category is DATAWRITER_SUBMESSAGE + * @param plain_rtps_submessage (out) Result of the decryption + * @param encoded_rtps_submessage Encoded message + * @param receiving_datareader_crypto Crypto of the target datareader + * @param sending_datawriter_crypto Crypto of the datawriter that sent the message + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool decode_datawriter_submessage( + CDRMessage_t& plain_rtps_submessage, + CDRMessage_t& encoded_rtps_submessage, + DatareaderCryptoHandle& receiving_datareader_crypto, + DatawriterCryptoHandle& sending_datawriter_crypto, + SecurityException& exception) = 0; + + /** + * Called after preprocess_secure_submessage when the submessage category is DATAREADER_SUBMESSAGE + * @param plain_rtps_submessage (out) Result of the decryption + * @param encoded_rtps_submessage Encoded message + * @param receiving_datawriter_crypto Crypto of the target datawriter + * @param sending_datareader_crypto Crypto of the datareader that sent the message + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool decode_datareader_submessage( + CDRMessage_t& plain_rtps_submessage, + CDRMessage_t& encoded_rtps_submessage, + DatawriterCryptoHandle& receiving_datawriter_crypto, + DatareaderCryptoHandle& sending_datareader_crypto, + SecurityException& exception) = 0; + + /** + * Undoes the decryption transformation made on the writer side. + * @param plain_payload (out) Result of the decryption + * @param encoded_payload Encoded input buffer + * @param inline_qos Coming from the data message that carries the target payload + * @param receiving_datareader_crypto Crypto of the target datareader + * @param sending_datawriter_crypto Crypto of the datawriter that sent the message + * @param exception (out) Security exception + * @return TRUE if successful + */ + virtual bool decode_serialized_payload( + SerializedPayload_t& plain_payload, + const SerializedPayload_t& encoded_payload, + const std::vector& inline_qos, + DatareaderCryptoHandle& receiving_datareader_crypto, + DatawriterCryptoHandle& sending_datawriter_crypto, + SecurityException& exception) = 0; + + virtual uint32_t calculate_extra_size_for_rtps_message( + uint32_t number_discovered_participants) const = 0; + + virtual uint32_t calculate_extra_size_for_rtps_submessage( + uint32_t number_discovered_readers) const = 0; + + virtual uint32_t calculate_extra_size_for_encoded_payload( + uint32_t number_discovered_readers) const = 0; }; } //namespace eprosima diff --git a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/Cryptography.h b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/Cryptography.h index 36dab03ce..8fe0de33d 100644 --- a/ThirdParty/ros/include/fastdds/rtps/security/cryptography/Cryptography.h +++ b/ThirdParty/ros/include/fastdds/rtps/security/cryptography/Cryptography.h @@ -34,17 +34,13 @@ class Cryptography { public: - Cryptography(): m_cryptokeyexchange(nullptr), m_cryptokeyfactory(nullptr), - m_cryptotransform(nullptr), m_logger(nullptr) {} + Cryptography() = default; + virtual ~Cryptography() = default; - virtual ~Cryptography() {} - - /* Specializations should add functions to access the private members */ - CryptoKeyExchange* cryptkeyexchange() { return m_cryptokeyexchange; } - - CryptoKeyFactory* cryptokeyfactory() { return m_cryptokeyfactory; } - - CryptoTransform* cryptotransform() { return m_cryptotransform; } + /* Specializations should add functions to access the different modules */ + virtual CryptoKeyExchange* cryptokeyexchange() = 0; + virtual CryptoKeyFactory* cryptokeyfactory() = 0; + virtual CryptoTransform* cryptotransform() = 0; bool set_logger( Logging* logger, @@ -61,13 +57,9 @@ class Cryptography return m_logger; } - CryptoKeyExchange *m_cryptokeyexchange; - CryptoKeyFactory *m_cryptokeyfactory; - CryptoTransform *m_cryptotransform; - private: - Logging *m_logger; + Logging* m_logger; }; } //namespace security diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransport.h b/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransport.h new file mode 100644 index 000000000..8864e6e18 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransport.h @@ -0,0 +1,350 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORT_H_ +#define _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORT_H_ + +#include + +#include "TransportInterface.h" +#include "ChainingTransportDescriptor.h" + +namespace eprosima { +namespace fastdds { +namespace rtps { + +class ChainingReceiverResource; + +/** + * This is the base class for chaining adapter transports. + * - Directly proxies all operations except Send and Receive + * + * - Has a pointer to the low level transport + * @ingroup TRANSPORT_MODULE + */ +class ChainingTransport : public TransportInterface +{ + +public: + + //! Constructor + RTPS_DllAPI ChainingTransport( + const ChainingTransportDescriptor& t) + : TransportInterface(0) + , low_level_transport_(t.low_level_descriptor->create_transport()) + { + transport_kind_ = low_level_transport_->kind(); + } + + //! Destructor + RTPS_DllAPI virtual ~ChainingTransport() = default; + + /*! + * Initialize the low-level transport. This method will prepare all the internals of the transport. + * @param properties Optional policy to specify additional parameters of the created transport. + * @return True when the transport was correctly initialized. + */ + RTPS_DllAPI bool init( + const fastrtps::rtps::PropertyPolicy* properties = nullptr) override + { + return low_level_transport_->init(properties); + } + + /*! + * Call the low-level transport `IsInputChannelOpen()`. + * Must report whether the input channel associated to this locator is open. Channels must either be + * fully closed or fully open, so that "open" and "close" operations are whole and definitive. + */ + RTPS_DllAPI bool IsInputChannelOpen( + const fastrtps::rtps::Locator_t& loc) const override + { + return low_level_transport_->IsInputChannelOpen(loc); + } + + /*! + * Call the low-level transport `IsLocatorSupported()`. + * Must report whether the given locator is supported by this transport (typically inspecting its "kind" value). + */ + RTPS_DllAPI bool IsLocatorSupported( + const fastrtps::rtps::Locator_t& loc) const override + { + return low_level_transport_->IsLocatorSupported(loc); + } + + /*! + * Call the low-level transport `RemoteToMainLocal()`. + * Returns the locator describing the main (most general) channel that can write to the provided remote locator. + */ + RTPS_DllAPI fastrtps::rtps::Locator_t RemoteToMainLocal( + const fastrtps::rtps::Locator_t& loc) const override + { + return low_level_transport_->RemoteToMainLocal(loc); + } + + /*! + * Call the low-level transport `OpenInputChannel()`. + * Opens an input channel to receive incoming connections. + * If there is an existing channel it registers the receiver interface. + */ + RTPS_DllAPI bool OpenInputChannel( + const fastrtps::rtps::Locator_t& loc, + TransportReceiverInterface* receiver_interface, + uint32_t max_message_size) override; + + /*! + * Call the low-level transport `OpenOutputChannel()`. + * Must open the channel that maps to/from the given locator. This method must allocate, reserve and mark + * any resources that are needed for said channel. + */ + RTPS_DllAPI bool OpenOutputChannel( + SendResourceList& sender_resource_list, + const fastrtps::rtps::Locator_t& loc) override; + + /*! + * Call the low-level transport `CloseInputChannel()`. + * Must close the channel that maps to/from the given locator. + * IMPORTANT: It MUST be safe to call this method even during a Receive operation on another thread. You must implement + * any necessary mutual exclusion and timeout mechanisms to make sure the channel can be closed without damage. + */ + RTPS_DllAPI bool CloseInputChannel( + const fastrtps::rtps::Locator_t& loc) override + { + return low_level_transport_->CloseInputChannel(loc); + } + + /*! + * Call the low-level transport `NormalizeLocator()`. + * Performs locator normalization (assign valid IP if not defined by user) + */ + RTPS_DllAPI fastrtps::rtps::LocatorList_t NormalizeLocator( + const fastrtps::rtps::Locator_t& locator) override + { + return low_level_transport_->NormalizeLocator(locator); + } + + /*! + * Call the low-level transport `is_local_locator()`. + * Must report whether the given locator is from the local host + */ + RTPS_DllAPI bool is_local_locator( + const fastrtps::rtps::Locator_t& locator) const override + { + return low_level_transport_->is_local_locator(locator); + } + + /*! + * Call the low-level transport `is_locator_allowed()`. + * Must report whether the given locator is allowed by this transport. + */ + RTPS_DllAPI bool is_locator_allowed( + const fastrtps::rtps::Locator_t& locator) const override + { + return low_level_transport_->is_locator_allowed(locator); + } + + /*! + * Call the low-level transport `DoInputLocatorsMatch()`. + * Must report whether two locators map to the same internal channel. + */ + RTPS_DllAPI bool DoInputLocatorsMatch( + const fastrtps::rtps::Locator_t& locator_1, + const fastrtps::rtps::Locator_t& locator_2) const override + { + return low_level_transport_->DoInputLocatorsMatch(locator_1, locator_2); + } + + /*! + * Call the low-level transport `select_locators()`. + * Performs the locator selection algorithm for this transport. + */ + RTPS_DllAPI void select_locators( + fastrtps::rtps::LocatorSelector& selector) const override + { + return low_level_transport_->select_locators(selector); + } + + /*! + * Call the low-level transport `AddDefaultOutputLocator()`. + * Add default output locator to the locator list + */ + RTPS_DllAPI void AddDefaultOutputLocator( + fastrtps::rtps::LocatorList_t& defaultList) override + { + return low_level_transport_->AddDefaultOutputLocator(defaultList); + } + + /*! + * Call the low-level transport `getDefaultMetatrafficMulticastLocators()`. + * Add metatraffic multicast locator with the given port + */ + RTPS_DllAPI bool getDefaultMetatrafficMulticastLocators( + fastrtps::rtps::LocatorList_t& locators, + uint32_t metatraffic_multicast_port) const override + { + return low_level_transport_->getDefaultMetatrafficMulticastLocators(locators, metatraffic_multicast_port); + } + + /*! + * Call the low-level transport `getDefaultMetatrafficUnicastLocators()`. + * Add metatraffic unicast locator with the given port + */ + RTPS_DllAPI bool getDefaultMetatrafficUnicastLocators( + fastrtps::rtps::LocatorList_t& locators, + uint32_t metatraffic_unicast_port) const override + { + return low_level_transport_->getDefaultMetatrafficUnicastLocators(locators, metatraffic_unicast_port); + } + + /*! + * Call the low-level transport `getDefaultUnicastLocators()`. + * Add unicast locator with the given port + */ + RTPS_DllAPI bool getDefaultUnicastLocators( + fastrtps::rtps::LocatorList_t& locators, + uint32_t unicast_port) const override + { + return low_level_transport_->getDefaultUnicastLocators(locators, unicast_port); + } + + /*! + * Call the low-level transport `fillMetatrafficMulticastLocator()`. + * Assign port to the given metatraffic multicast locator if not already defined + */ + RTPS_DllAPI bool fillMetatrafficMulticastLocator( + fastrtps::rtps::Locator_t& locator, + uint32_t metatraffic_multicast_port) const override + { + return low_level_transport_->fillMetatrafficMulticastLocator(locator, metatraffic_multicast_port); + } + + /*! + * Call the low-level transport `fillMetatrafficUnicastLocator()`. + * Assign port to the given metatraffic unicast locator if not already defined + */ + RTPS_DllAPI bool fillMetatrafficUnicastLocator( + fastrtps::rtps::Locator_t& locator, + uint32_t metatraffic_unicast_port) const override + { + return low_level_transport_->fillMetatrafficUnicastLocator(locator, metatraffic_unicast_port); + } + + /*! + * Call the low-level transport `configureInitialPeerLocator()`. + * Configure the initial peer locators list + */ + RTPS_DllAPI bool configureInitialPeerLocator( + fastrtps::rtps::Locator_t& locator, + const fastrtps::rtps::PortParameters& port_params, + uint32_t domainId, + fastrtps::rtps::LocatorList_t& list) const override + { + return low_level_transport_->configureInitialPeerLocator(locator, port_params, domainId, list); + } + + /*! + * Call the low-level transport `fillUnicastLocator()`. + * Assign port to the given unicast locator if not already defined + */ + RTPS_DllAPI bool fillUnicastLocator( + fastrtps::rtps::Locator_t& locator, + uint32_t well_known_port) const override + { + return low_level_transport_->fillUnicastLocator(locator, well_known_port); + } + + //! Call the low-level transport `transform_remote_locator()`. + //! Transforms a remote locator into a locator optimized for local communications. + RTPS_DllAPI bool transform_remote_locator( + const fastrtps::rtps::Locator_t& remote_locator, + fastrtps::rtps::Locator_t& result_locator) const override + { + return low_level_transport_->transform_remote_locator(remote_locator, result_locator); + } + + /** + * Call the low-level transport `max_recv_buffer_size()`. + * @return The maximum datagram size for reception supported by the transport + */ + RTPS_DllAPI uint32_t max_recv_buffer_size() const override + { + return low_level_transport_->max_recv_buffer_size(); + } + + /** + * Blocking Send through the specified channel. It may perform operations on the output buffer. + * At the end the function must call to the low-level transport's `send()` function. + * @code{.cpp} + // Example of calling the low-level transport `send()` function. + return low_sender_resource->send(send_buffer, send_buffer_size, destination_locators_begin, + destination_locators_end, timeout); + @endcode + * @param low_sender_resource SenderResource generated by the lower transport. + * @param send_buffer Slice into the raw data to send. + * @param send_buffer_size Size of the raw data. It will be used as a bounds check for the previous argument. + * It must not exceed the \c sendBufferSize fed to this class during construction. + * @param destination_locators_begin First iterator of the list of Locators describing the remote destinations + * we're sending to. + * @param destination_locators_end End iterator of the list of Locators describing the remote destinations + * we're sending to. + * @param timeout Maximum blocking time. + */ + RTPS_DllAPI virtual bool send( + fastrtps::rtps::SenderResource* low_sender_resource, + const fastrtps::rtps::octet* send_buffer, + uint32_t send_buffer_size, + fastrtps::rtps::LocatorsIterator* destination_locators_begin, + fastrtps::rtps::LocatorsIterator* destination_locators_end, + const std::chrono::steady_clock::time_point& timeout) = 0; + + /*! + * Blocking Receive from the specified channel. It may perform operations on the input buffer. + * At the end the function must call to the `next_receiver`'s `OnDataReceived` function. + * @code{.cpp} + // Example of calling the `next_receiver`'s `OnDataReceived` function. + next_receiver->OnDataReceived(receive_buffer, receive_buffer_size, local_locator, remote_locator); + @endcode + * @param next_receiver Next resource receiver to be called. + * @param receive_buffer vector with enough capacity (not size) to accommodate a full receive buffer. That + * capacity must not be less than the \c receiveBufferSize supplied to this class during construction. + * @param receive_buffer_size Size of the raw data. It will be used as bounds check for the previous argument. + * It must not exceed the \c receiveBufferSize fed to this class during construction. + * @param local_locator Locator mapping to the local channel we're listening to. + * @param[out] remote_locator Locator describing the remote destination we received a packet from. + */ + RTPS_DllAPI virtual void receive( + TransportReceiverInterface* next_receiver, + const fastrtps::rtps::octet* receive_buffer, + uint32_t receive_buffer_size, + const fastrtps::rtps::Locator_t& local_locator, + const fastrtps::rtps::Locator_t& remote_locator) = 0; + + RTPS_DllAPI void update_network_interfaces() override + { + low_level_transport_->update_network_interfaces(); + } + +protected: + + std::unique_ptr low_level_transport_; + +private: + + std::map receiver_resources_; +}; + +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima + +#endif // _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransportDescriptor.h new file mode 100644 index 000000000..dad7bf748 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/transport/ChainingTransportDescriptor.h @@ -0,0 +1,75 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORTDESCRIPTOR_H_ +#define _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORTDESCRIPTOR_H_ + +#include +#include + +#include "TransportInterface.h" + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/** + * Base class for the descriptors of chaining transports. A chaining transport + * allows for the manipulation of data before sending or after receiving from + * another transport. + * + * Transport configuration: + * + * - low_level_descriptor: Descriptor for lower level transport. + * @ingroup TRANSPORT_MODULE + */ +typedef struct ChainingTransportDescriptor : public TransportDescriptorInterface +{ + RTPS_DllAPI ChainingTransportDescriptor( + std::shared_ptr low_level) + : TransportDescriptorInterface(low_level->maxMessageSize, low_level->maxInitialPeersRange) + , low_level_descriptor(low_level) + { + } + + RTPS_DllAPI ChainingTransportDescriptor( + const ChainingTransportDescriptor& t) + : TransportDescriptorInterface(t) + , low_level_descriptor(t.low_level_descriptor) + { + } + + //! Returns the minimum size required for a send operation. + RTPS_DllAPI virtual uint32_t min_send_buffer_size() const override + { + return low_level_descriptor->min_send_buffer_size(); + } + + //! Returns the maximum size expected for received messages. + RTPS_DllAPI virtual uint32_t max_message_size() const override + { + return low_level_descriptor->max_message_size(); + } + + RTPS_DllAPI virtual ~ChainingTransportDescriptor() = default; + + //! Descriptor for lower level transport + std::shared_ptr low_level_descriptor; +} ChainingTransportDescriptor; + +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima + +#endif // _FASTDDS_RTPS_TRANSPORT_CHAININGTRANSPORTDESCRIPTOR_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/ChannelResource.h b/ThirdParty/ros/include/fastdds/rtps/transport/ChannelResource.h deleted file mode 100644 index 4af140504..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/ChannelResource.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_CHANNEL_RESOURCE_INFO_ -#define _FASTDDS_CHANNEL_RESOURCE_INFO_ - -#include -#include -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class ChannelResource -{ -public: - ChannelResource(); - ChannelResource(ChannelResource&& channelResource); - ChannelResource(uint32_t rec_buffer_size); - virtual ~ChannelResource(); - - virtual void clear(); - - inline void thread(std::thread&& pThread) - { - if(thread_.joinable()) - { - thread_.join(); - } - - thread_.swap(pThread); - } - - inline bool alive() const - { - return alive_.load(); - } - - inline virtual void disable() - { - alive_.store(false); - } - - inline fastrtps::rtps::CDRMessage_t& message_buffer() - { - return message_buffer_; - } - -protected: - //!Received message - fastrtps::rtps::CDRMessage_t message_buffer_; - - std::atomic alive_; - std::thread thread_; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_CHANNEL_RESOURCE_INFO_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/SocketTransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/SocketTransportDescriptor.h index 87ecc50c1..2ca5cb4d6 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/SocketTransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/SocketTransportDescriptor.h @@ -17,26 +17,33 @@ #include -#ifdef _WIN32 #include -#endif #include #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { -class TransportInterface; - -static const uint8_t s_defaultTTL = 1; +//! Default time to live (TTL) +constexpr uint8_t s_defaultTTL = 1; /** * Virtual base class for the data type used to define configuration of transports using sockets. + * + * - \c sendBufferSize: size of the sending buffer of the socket (in octets). + * + * - \c receiveBufferSize: size of the receiving buffer of the socket (in octets). + * + * - \c interfaceWhiteList: list of allowed interfaces. + * + * - \c TTL: time to live, in number of hops. + * * @ingroup RTPS_MODULE * */ struct SocketTransportDescriptor : public TransportDescriptorInterface { + //! Constructor SocketTransportDescriptor( uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange) @@ -44,18 +51,35 @@ struct SocketTransportDescriptor : public TransportDescriptorInterface , sendBufferSize(0) , receiveBufferSize(0) , TTL(s_defaultTTL) - {} + { + } + + //! Copy constructor + SocketTransportDescriptor( + const SocketTransportDescriptor& t) = default; + + //! Copy assignment + SocketTransportDescriptor& operator =( + const SocketTransportDescriptor& t) = default; - SocketTransportDescriptor(const SocketTransportDescriptor& t) - : TransportDescriptorInterface(t) - , sendBufferSize(t.sendBufferSize) - , receiveBufferSize(t.receiveBufferSize) - , TTL(t.TTL) - {} + //! Destructor + virtual ~SocketTransportDescriptor() = default; - virtual ~SocketTransportDescriptor(){} + virtual uint32_t min_send_buffer_size() const override + { + return sendBufferSize; + } - virtual uint32_t min_send_buffer_size() const override { return sendBufferSize; } + //! Comparison operator + bool operator ==( + const SocketTransportDescriptor& t) const + { + return (this->sendBufferSize == t.min_send_buffer_size() && + this->receiveBufferSize == t.receiveBufferSize && + this->interfaceWhiteList == t.interfaceWhiteList && + this->TTL == t.TTL && + TransportDescriptorInterface::operator ==(t)); + } //! Length of the send buffer. uint32_t sendBufferSize; diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptor.h deleted file mode 100644 index e2f8a9701..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptor.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_ACCEPTOR_BASE_ -#define _FASTDDS_TCP_ACCEPTOR_BASE_ - -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class TCPTransportInterface; - -/** - * Common class to wrap ASIO acceptors. - */ -class TCPAcceptor -{ -protected: - asio::ip::tcp::acceptor acceptor_; - fastrtps::rtps::Locator_t locator_; - asio::ip::tcp::endpoint endpoint_; - std::vector pending_out_locators_; - asio::io_service* io_service_; - -public: - TCPAcceptor( - asio::io_service& io_service, - TCPTransportInterface* parent, - const fastrtps::rtps::Locator_t& locator); - - TCPAcceptor( - asio::io_service& io_service, - const std::string& interface, - const fastrtps::rtps::Locator_t& locator); - - const fastrtps::rtps::Locator_t& locator() const - { - return locator_; - } - - fastrtps::rtps::Locator_t& locator() - { - return locator_; - } - - virtual ~TCPAcceptor() = default; -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_ACCEPTOR_BASE_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorBasic.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorBasic.h deleted file mode 100644 index 39554ee99..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorBasic.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_ACCEPTOR_BASIC_ -#define _FASTDDS_TCP_ACCEPTOR_BASIC_ - -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -/** - * Plain TCP Socket acceptor wrapper class. - */ -class TCPAcceptorBasic : public TCPAcceptor -{ -public: - /** - * Constructor - * @param io_service Reference to the ASIO service. - * @param parent Pointer to the transport that is going to manage the acceptor. - * @param locator Locator with the information about where to accept connections. - */ - TCPAcceptorBasic( - asio::io_service& io_service, - TCPTransportInterface* parent, - const fastrtps::rtps::Locator_t& locator); - - /** - * Constructor - * @param io_service Reference to the ASIO service. - * @param interface Network interface to bind the socket - * @param locator Locator with the information about where to accept connections. - */ - TCPAcceptorBasic( - asio::io_service& io_service, - const std::string& interface, - const fastrtps::rtps::Locator_t& locator); - - /** - * Destructor - */ - virtual ~TCPAcceptorBasic() - { - acceptor_.cancel(); - acceptor_.close(); - } - - //! Method to start the accepting process. - void accept(TCPTransportInterface* parent); - -private: - asio::ip::tcp::socket socket_; -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_ACCEPTOR_BASIC_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorSecure.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorSecure.h deleted file mode 100644 index 72a843735..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPAcceptorSecure.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_ACCEPTOR_SECURE_ -#define _FASTDDS_TCP_ACCEPTOR_SECURE_ - -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -/** - * TLS TCP Socket acceptor wrapper class. - */ -class TCPAcceptorSecure : public TCPAcceptor -{ -public: - /** - * Constructor - * @param io_service Reference to the ASIO service. - * @param parent Pointer to the transport that is going to manage the acceptor. - * @param locator Locator with the information about where to accept connections. - */ - TCPAcceptorSecure( - asio::io_service& io_service, - TCPTransportInterface* parent, - const fastrtps::rtps::Locator_t& locator); - - /** - * Constructor - * @param io_service Reference to the ASIO service. - * @param interface Network interface to bind the socket - * @param locator Locator with the information about where to accept connections. - */ - TCPAcceptorSecure( - asio::io_service& io_service, - const std::string& interface, - const fastrtps::rtps::Locator_t& locator); - - /** - * Destructor - */ - virtual ~TCPAcceptorSecure() - { - acceptor_.cancel(); - acceptor_.close(); - } - - //! Method to start the accepting process. - void accept( - TCPTransportInterface* parent, - asio::ssl::context&); - -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_ACCEPTOR_SECURE_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResource.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResource.h deleted file mode 100644 index a97695090..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResource.h +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_CHANNEL_RESOURCE_BASE_ -#define _FASTDDS_TCP_CHANNEL_RESOURCE_BASE_ - -#include -#include -#include -#include -#include - -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -class TCPConnector; -class TCPTransportInterface; - -enum eSocketErrorCodes -{ - eNoError, - eBrokenPipe, - eAsioError, - eSystemError, - eException, - eConnectionAborted = 125 -}; - -class TCPChannelResource : public ChannelResource -{ - -protected: - - enum TCPConnectionType - { - TCP_ACCEPT_TYPE = 0, - TCP_CONNECT_TYPE = 1 - }; - - enum eConnectionStatus - { - eDisconnected = 0, - eConnecting, // Output -> Trying connection. - eConnected, // Output -> Send bind message. - eWaitingForBind, // Input -> Waiting for the bind message. - eWaitingForBindResponse, // Output -> Waiting for the bind response message. - eEstablished, - eUnbinding - }; - - TCPTransportInterface* parent_; - fastrtps::rtps::Locator_t locator_; - bool waiting_for_keep_alive_; - // Must be accessed after lock pending_logical_mutex_ - std::map negotiating_logical_ports_; - std::map last_checked_logical_port_; - std::vector pending_logical_output_ports_; // Must be accessed after lock pending_logical_mutex_ - std::vector logical_output_ports_; - std::mutex read_mutex_; - std::recursive_mutex pending_logical_mutex_; - std::atomic connection_status_; - -public: - - void add_logical_port( - uint16_t port, - RTCPMessageManager* rtcp_manager); - - void set_logical_port_pending( - uint16_t port); - - bool remove_logical_port( - uint16_t port); - - virtual void disable() override; - - bool is_logical_port_opened( - uint16_t port); - - bool is_logical_port_added( - uint16_t port); - - bool connection_established() - { - return connection_status_ == eConnectionStatus::eEstablished; - } - - eConnectionStatus connection_status() - { - return connection_status_; - } - - inline const fastrtps::rtps::Locator_t& locator() const - { - return locator_; - } - - ResponseCode process_bind_request( - const fastrtps::rtps::Locator_t& locator); - - // Socket related methods - virtual void connect( - const std::shared_ptr& myself) = 0; - - virtual void disconnect() = 0; - - virtual uint32_t read( - fastrtps::rtps::octet* buffer, - std::size_t size, - asio::error_code& ec) = 0; - - virtual size_t send( - const fastrtps::rtps::octet* header, - size_t header_size, - const fastrtps::rtps::octet* buffer, - size_t size, - asio::error_code& ec) = 0; - - virtual asio::ip::tcp::endpoint remote_endpoint() const = 0; - - virtual asio::ip::tcp::endpoint local_endpoint() const = 0; - - virtual void set_options( - const TCPTransportDescriptor* options) = 0; - - virtual void cancel() = 0; - - virtual void close() = 0; - - virtual void shutdown( - asio::socket_base::shutdown_type what) = 0; - - TCPConnectionType tcp_connection_type() const - { - return tcp_connection_type_; - } - -protected: - - // Constructor called when trying to connect to a remote server - TCPChannelResource( - TCPTransportInterface* parent, - const fastrtps::rtps::Locator_t& locator, - uint32_t maxMsgSize); - - // Constructor called when local server accepted connection - TCPChannelResource( - TCPTransportInterface* parent, - uint32_t maxMsgSize); - - inline eConnectionStatus change_status( - eConnectionStatus s, - RTCPMessageManager* rtcp_manager = nullptr) - { - eConnectionStatus old = connection_status_.exchange(s); - - if (old != s) - { - if (s == eEstablished) - { - assert(rtcp_manager != nullptr); - send_pending_open_logical_ports(rtcp_manager); - } - } - - return old; - } - - void add_logical_port_response( - const TCPTransactionId& id, - bool success, - RTCPMessageManager* rtcp_manager); - - void process_check_logical_ports_response( - const TCPTransactionId& transactionId, - const std::vector& availablePorts, - RTCPMessageManager* rtcp_manager); - - TCPConnectionType tcp_connection_type_; - - friend class TCPTransportInterface; - friend class RTCPMessageManager; - -private: - - void prepare_send_check_logical_ports_req( - uint16_t closedPort, - RTCPMessageManager* rtcp_manager); - - void send_pending_open_logical_ports( - RTCPMessageManager* rtcp_manager); - - void set_all_ports_pending(); - - TCPChannelResource( - const TCPChannelResource&) = delete; - - TCPChannelResource& operator =( - const TCPChannelResource&) = delete; -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_CHANNEL_RESOURCE_BASE_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceBasic.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceBasic.h deleted file mode 100644 index 3c4f56f4a..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceBasic.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_CHANNEL_RESOURCE_BASIC_ -#define _FASTDDS_TCP_CHANNEL_RESOURCE_BASIC_ - -#include -#include -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -class TCPChannelResourceBasic : public TCPChannelResource -{ - asio::io_service& service_; - - std::mutex send_mutex_; - std::shared_ptr socket_; - -public: - - // Constructor called when trying to connect to a remote server - TCPChannelResourceBasic( - TCPTransportInterface* parent, - asio::io_service& service, - const fastrtps::rtps::Locator_t& locator, - uint32_t maxMsgSize); - - // Constructor called when local server accepted connection - TCPChannelResourceBasic( - TCPTransportInterface* parent, - asio::io_service& service, - std::shared_ptr socket, - uint32_t maxMsgSize); - - virtual ~TCPChannelResourceBasic(); - - void connect( - const std::shared_ptr& myself) override; - - void disconnect() override; - - uint32_t read( - fastrtps::rtps::octet* buffer, - std::size_t size, - asio::error_code& ec) override; - - size_t send( - const fastrtps::rtps::octet* header, - size_t header_size, - const fastrtps::rtps::octet* data, - size_t size, - asio::error_code& ec) override; - - asio::ip::tcp::endpoint remote_endpoint() const override; - asio::ip::tcp::endpoint local_endpoint() const override; - - void set_options( - const TCPTransportDescriptor* options) override; - - void cancel() override; - void close() override; - void shutdown( - asio::socket_base::shutdown_type what) override; - - inline std::shared_ptr socket() - { - return socket_; - } - -private: - - TCPChannelResourceBasic( - const TCPChannelResourceBasic&) = delete; - TCPChannelResourceBasic& operator =( - const TCPChannelResourceBasic&) = delete; -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_CHANNEL_RESOURCE_BASIC_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceSecure.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceSecure.h deleted file mode 100644 index 48bd0b5f2..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPChannelResourceSecure.h +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_CHANNEL_RESOURCE_SECURE_ -#define _FASTDDS_TCP_CHANNEL_RESOURCE_SECURE_ - -#include -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class TCPChannelResourceSecure : public TCPChannelResource -{ - public: - // Constructor called when trying to connect to a remote server (secure version) - TCPChannelResourceSecure( - TCPTransportInterface* parent, - asio::io_service& service, - asio::ssl::context& ssl_context, - const fastrtps::rtps::Locator_t& locator, - uint32_t maxMsgSize); - - // Constructor called when local server accepted connection (secure version) - TCPChannelResourceSecure( - TCPTransportInterface* parent, - asio::io_service& service, - asio::ssl::context& ssl_context, - std::shared_ptr> socket, - uint32_t maxMsgSize); - - virtual ~TCPChannelResourceSecure(); - - void connect( - const std::shared_ptr& myself) override; - - void disconnect() override; - - uint32_t read( - fastrtps::rtps::octet* buffer, - std::size_t size, - asio::error_code& ec) override; - - size_t send( - const fastrtps::rtps::octet* header, - size_t header_size, - const fastrtps::rtps::octet* data, - size_t size, - asio::error_code& ec) override; - - asio::ip::tcp::endpoint remote_endpoint() const override; - asio::ip::tcp::endpoint local_endpoint() const override; - - void set_options(const TCPTransportDescriptor* options) override; - - void set_tls_verify_mode(const TCPTransportDescriptor* options); - - void cancel() override; - void close() override; - void shutdown(asio::socket_base::shutdown_type what) override; - - inline std::shared_ptr> secure_socket() - { - return secure_socket_; - } - - private: - - TCPChannelResourceSecure(const TCPChannelResource&) = delete; - TCPChannelResourceSecure& operator=(const TCPChannelResource&) = delete; - - asio::io_service& service_; - asio::ssl::context& ssl_context_; - asio::io_service::strand strand_read_; - asio::io_service::strand strand_write_; - std::shared_ptr> secure_socket_; -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_CHANNEL_RESOURCE_SECURE_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportDescriptor.h index e2f8c2982..9ceeff847 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportDescriptor.h @@ -19,18 +19,89 @@ #include #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { /** -* Transport configuration -* @ingroup TRANSPORT_MODULE -*/ -typedef struct TCPTransportDescriptor : public SocketTransportDescriptor + * TCP Transport configuration + * + * - \c listening_ports: list of ports to listen as server. + * + * - \c keep_alive_frequency_ms: frequency of RTCP keep alive requests (in ms). + * + * - \c keep_alive_timeout_ms: time since sending the last keep alive request to consider a connection as broken (in ms). + * + * - \c max_logical_port: maximum number of logical ports to try during RTCP negotiation. + * + * - \c logical_port_range: maximum number of logical ports per request to try during RTCP negotiation. + * + * - \c logical_port_increment: increment between logical ports to try during RTCP negotiation. + * + * - \c enable_tcp_nodelay: enables the TCP_NODELAY socket option. + * + * - \c calculate_crc: true to calculate and send CRC on message headers. + * + * - \c check_crc: true to check the CRC of incoming message headers. + * + * - \c apply_security: true to use TLS (Transport Layer Security). + * + * - \c tls_config: Configuration for TLS. + * + * @ingroup TRANSPORT_MODULE + */ +struct TCPTransportDescriptor : public SocketTransportDescriptor { + /** + * TLS Configuration + * + * - \c password: password of the \c private_key_file or \c rsa_private_key_file. + * + * - \c private_key_file: path to the private key certificate file. + * + * - \c rsa_private_key_file: path to the private key RSA certificate file. + * + * - \c cert_chain_file: path to the public certificate chain file. + * + * - \c tmp_dh_file: path to the Diffie-Hellman parameters file. + * + * - \c verify_file: path to the CA (Certification-Authority) file. + * + * - \c verify_mode: establishes the verification mode mask. + * + * - \c options: establishes the SSL Context options mask. + * + * - \c verify_paths: paths where the system will look for verification files. + * + * - \c default_verify_path: look for verification files on the default paths. + * + * - \c handshake_role: role that the transport will take on handshaking. + * + */ struct TLSConfig { + /** + * Supported TLS features. + * Several options can be combined in the same TransportDescriptor using the add_option() member function. + * + * - DEFAULT_WORKAROUNDS: implement various bug workarounds. + * + * - NO_COMPRESSION: disable compression. + * + * - NO_SSLV2: disable SSL v2. + * + * - NO_SSLV3: disable SSL v3. + * + * - NO_TLSV1: disable TLS v1. + * + * - NO_TLSV1_1: disable TLS v1.1. + * + * - NO_TLSV1_2: disable TLS v1.2. + * + * - NO_TLSV1_3: disable TLS v1.3. + * + * - SINGLE_DH_USE: always create a new key using Diffie-Hellman parameters. + */ enum TLSOptions : uint32_t { NONE = 0, // 0000 0000 0000 @@ -45,6 +116,21 @@ typedef struct TCPTransportDescriptor : public SocketTransportDescriptor SINGLE_DH_USE = 1 << 8 // 0001 0000 0000 }; + /** + * Peer node verification options. + * Several verification options can be combined in the same TransportDescriptor using the add_verify_mode() + * member function. + * + * - VERIFY_NONE: perform no verification. + * + * - VERIFY_PEER: perform verification of the peer. + * + * - VERIFY_FAIL_IF_NO_PEER_CERT: fail verification if the peer has no certificate. Ignored unless VERIFY_PEER + * is also set. + * + * - VERIFY_CLIENT_ONCE: do not request client certificate on renegotiation. Ignored unless VERIFY_PEER is also + * set. + */ enum TLSVerifyMode : uint8_t { UNUSED = 0, // 0000 0000 @@ -54,6 +140,15 @@ typedef struct TCPTransportDescriptor : public SocketTransportDescriptor VERIFY_CLIENT_ONCE = 1 << 3 // 0000 1000 }; + /** + * Role that the transport will take on handshaking. + * + * - DEFAULT: configured as client if connector, and as server if acceptor. + * + * - CLIENT: configured as client. + * + * - SERVER: configured as server. + */ enum TLSHandShakeRole : uint8_t { DEFAULT = 0, // 0000 0000 @@ -61,125 +156,136 @@ typedef struct TCPTransportDescriptor : public SocketTransportDescriptor SERVER = 1 << 1 // 0000 0010 }; + //! Password of the \c private_key_file or \c rsa_private_key_file std::string password; - uint32_t options; + //! SSL context options mask + uint32_t options = TLSOptions::NONE; + //! Path to the public certificate chain file std::string cert_chain_file; + //! Path to the private key certificate file std::string private_key_file; + //! Path to the Diffie-Hellman parameters file std::string tmp_dh_file; + //! Path to the CA (Certification-Authority) file. std::string verify_file; - uint8_t verify_mode; + //! Verification mode mask + uint8_t verify_mode = TLSVerifyMode::UNUSED; + //! Paths where the system will look for verification files std::vector verify_paths; - bool default_verify_path = false; // don't invoque - int32_t verify_depth = -1; // don't override + //! Look for verification files on the default paths. + bool default_verify_path = false; + //! Maximum allowed depth for verifying intermediate certificates. Do not override + int32_t verify_depth = -1; + //! Path to the private key RSA certificate file std::string rsa_private_key_file; - TLSHandShakeRole handshake_role; + //! Role that the transport will take on handshaking + TLSHandShakeRole handshake_role = TLSHandShakeRole::DEFAULT; - void add_verify_mode(const TLSVerifyMode verify) + //! Add verification modes to the verification mode mask + void add_verify_mode( + const TLSVerifyMode verify) { verify_mode |= verify; } - bool get_verify_mode(const TLSVerifyMode verify) const + //! Get the verification mode mask + bool get_verify_mode( + const TLSVerifyMode verify) const { return (verify_mode & verify) == verify; } - void add_option(const TLSOptions option) + //! Add TLS features to the SSL Context options mask + void add_option( + const TLSOptions option) { options |= option; } - bool get_option(const TLSOptions option) const + //! Get the SSL Context options mask + bool get_option( + const TLSOptions option) const { return (options & option) == option; } - TLSConfig() - : options(TCPTransportDescriptor::TLSConfig::TLSOptions::NONE) - , verify_mode(TCPTransportDescriptor::TLSConfig::TLSVerifyMode::UNUSED) - , handshake_role(DEFAULT) + //! Comparison operator + bool operator ==( + const TLSConfig& t) const { + return (this->password == t.password && + this->options == t.options && + this->cert_chain_file == t.cert_chain_file && + this->private_key_file == t.private_key_file && + this->tmp_dh_file == t.tmp_dh_file && + this->verify_file == t.verify_file && + this->verify_mode == t.verify_mode && + this->verify_paths == t.verify_paths && + this->default_verify_path == t.default_verify_path && + this->verify_depth == t.verify_depth && + this->rsa_private_key_file == t.rsa_private_key_file && + this->handshake_role == t.handshake_role); } - TLSConfig(const TLSConfig& t) - : password(t.password) - , options(t.options) - , cert_chain_file(t.cert_chain_file) - , private_key_file(t.private_key_file) - , tmp_dh_file(t.tmp_dh_file) - , verify_file(t.verify_file) - , verify_mode(t.verify_mode) - , verify_paths(t.verify_paths) - , default_verify_path(t.default_verify_path) - , verify_depth(t.verify_depth) - , rsa_private_key_file(t.rsa_private_key_file) - , handshake_role(t.handshake_role) - { - } - - TLSConfig(TLSConfig&& t) - : password(std::move(t.password)) - , options(std::move(t.options)) - , cert_chain_file(std::move(t.cert_chain_file)) - , private_key_file(std::move(t.private_key_file)) - , tmp_dh_file(std::move(t.tmp_dh_file)) - , verify_file(std::move(t.verify_file)) - , verify_mode(std::move(t.verify_mode)) - , verify_paths(std::move(t.verify_paths)) - , default_verify_path(std::move(t.default_verify_path)) - , verify_depth(std::move(t.verify_depth)) - , rsa_private_key_file(std::move(t.rsa_private_key_file)) - , handshake_role(std::move(t.handshake_role)) - { - } - - TLSConfig& operator=(const TLSConfig& t) - { - password = t.password; - options = t.options; - cert_chain_file = t.cert_chain_file; - private_key_file = t.private_key_file; - tmp_dh_file = t.tmp_dh_file; - verify_file = t.verify_file; - verify_mode = t.verify_mode; - verify_paths = t.verify_paths; - default_verify_path = t.default_verify_path; - verify_depth = t.verify_depth; - rsa_private_key_file = t.rsa_private_key_file; - handshake_role = t.handshake_role; - - return *this; - } }; + //! List of ports to listen as server std::vector listening_ports; + //! Frequency of RTCP keep alive requests (ms) uint32_t keep_alive_frequency_ms; + //! Time since sending the last keep alive request to consider a connection as broken (ms) uint32_t keep_alive_timeout_ms; + //! Maximum number of logical ports to try during RTCP negotiation uint16_t max_logical_port; + //! Maximum number of logical ports per request to try during RTCP negotiation uint16_t logical_port_range; + //! Increment between logical ports to try during RTCP negotiation uint16_t logical_port_increment; + + FASTDDS_TODO_BEFORE(3, 0, "Eliminate tcp_negotiation_timeout, variable not in use.") uint32_t tcp_negotiation_timeout; + + //! Enables the TCP_NODELAY socket option bool enable_tcp_nodelay; + + FASTDDS_TODO_BEFORE(3, 0, "Eliminate wait_for_tcp_negotiation, variable not in use.") bool wait_for_tcp_negotiation; + + //! Enables the calculation and sending of CRC on message headers bool calculate_crc; + //! Enables checking the CRC of incoming message headers bool check_crc; + //! Enables the use of TLS (Transport Layer Security) bool apply_security; + //! Configuration of the TLS (Transport Layer Security) TLSConfig tls_config; - void add_listener_port(uint16_t port) + //! Add listener port to the listening_ports list + void add_listener_port( + uint16_t port) { listening_ports.push_back(port); } + //! Constructor RTPS_DllAPI TCPTransportDescriptor(); - RTPS_DllAPI TCPTransportDescriptor(const TCPTransportDescriptor& t); + //! Copy constructor + RTPS_DllAPI TCPTransportDescriptor( + const TCPTransportDescriptor& t); + + //! Copy assignment + RTPS_DllAPI TCPTransportDescriptor& operator =( + const TCPTransportDescriptor& t); - RTPS_DllAPI TCPTransportDescriptor& operator=(const TCPTransportDescriptor& t); + //! Destructor + virtual ~TCPTransportDescriptor() = default; - virtual ~TCPTransportDescriptor() {} -} TCPTransportDescriptor; + //! Comparison operator + RTPS_DllAPI bool operator ==( + const TCPTransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportInterface.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportInterface.h deleted file mode 100644 index 233c1a4d3..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPTransportInterface.h +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCP_TRANSPORT_INTERFACE_H_ -#define _FASTDDS_TCP_TRANSPORT_INTERFACE_H_ - -#include -#include -#include -#include -#include -#include -#if TLS_FOUND -#include -#include -#endif - - -#include -#include -#include -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class RTCPMessageManager; -class TCPChannelResource; - -/** - * This is a default TCP Interface implementation. - * - Opening an output channel by passing a remote locator will try to open a TCP conection with the endpoint. - * If there is created a connection with the same endpoint, the transport will use the same one. - * - * - It is possible to provide a white list at construction, which limits the interfaces the transport - * will ever be able to interact with. If left empty, all interfaces are allowed. - * - * - Opening an input channel by passing a locator will open a socket listening on the given physical port on every - * whitelisted interface, it will wait for incomming connections until the receiver closes the channel. - * Several endpoints can connect to other to the same physical port, because the OS creates a connection socket - * after each establishment. - * @ingroup TRANSPORT_MODULE - */ -class TCPTransportInterface : public TransportInterface -{ - class ReceiverInUseCV - { - public: - - bool in_use = false; - - std::condition_variable cv; - }; - - std::atomic alive_; - -protected: - - std::vector current_interfaces_; - asio::io_service io_service_; - asio::io_service io_service_timers_; -#if TLS_FOUND - asio::ssl::context ssl_context_; -#endif - std::shared_ptr io_service_thread_; - std::shared_ptr io_service_timers_thread_; - std::shared_ptr rtcp_message_manager_; - std::mutex rtcp_message_manager_mutex_; - std::condition_variable rtcp_message_manager_cv_; - mutable std::mutex sockets_map_mutex_; - mutable std::mutex unbound_map_mutex_; - - std::map> channel_resources_; // The key is the "Physical locator" - std::vector> unbound_channel_resources_; - // The key is the logical port - std::map> receiver_resources_; - - std::vector> sockets_timestamp_; - - asio::steady_timer keep_alive_event_; - - std::map> acceptors_; - - TCPTransportInterface(int32_t transport_kind); - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const = 0; - - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const = 0; - - virtual void fill_local_ip(fastrtps::rtps::Locator_t& loc) const = 0; - - //! Methods to manage the TCP headers and their CRC values. - bool check_crc( - const TCPHeader &header, - const fastrtps::rtps::octet *data, - uint32_t size) const; - - void calculate_crc( - TCPHeader &header, - const fastrtps::rtps::octet *data, - uint32_t size) const; - - void fill_rtcp_header( - TCPHeader& header, - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - uint16_t logical_port) const; - - //! Closes the given p_channel_resource and unbind it from every resource. - void close_tcp_socket(std::shared_ptr& channel); - - //! Creates a TCP acceptor to wait for incomming connections by the given locator. - bool create_acceptor_socket(const fastrtps::rtps::Locator_t& locator); - - virtual void get_ips( - std::vector& loc_names, - bool return_loopback = false) const = 0; - - bool is_input_port_open(uint16_t port) const; - - //! Functions to be called from new threads, which takes cares of performing a blocking receive - void perform_listen_operation( - std::weak_ptr channel, - std::weak_ptr rtcp_manager); - - bool read_body( - fastrtps::rtps::octet* receive_buffer, - uint32_t receive_buffer_capacity, - uint32_t* bytes_received, - std::shared_ptr& channel, - std::size_t body_size); - - virtual void set_receive_buffer_size(uint32_t size) = 0; - virtual void set_send_buffer_size(uint32_t size) = 0; - - void clean(); // Must be called on childs destructors! - - virtual void endpoint_to_locator( - const asio::ip::tcp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) const = 0; - - /** - * Shutdown method to close the connections of the transports. - */ - virtual void shutdown() override; - - /** - * Applies TLS configuration to ssl_context - */ - void apply_tls_config(); - - /** - * Aux method to retrieve cert password as a callback - */ - std::string get_password() const; - - /** - * Send a buffer to a destination - */ - bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - std::shared_ptr& channel, - const fastrtps::rtps::Locator_t& remote_locator); - -public: - friend class RTCPMessageManager; - - virtual ~TCPTransportInterface(); - - //! Stores the binding between the given locator and the given TCP socket. Server side. - void bind_socket(std::shared_ptr&); - - //! Removes the listening socket for the specified port. - virtual bool CloseInputChannel(const fastrtps::rtps::Locator_t&) override; - - //! Removes all outbound sockets on the given port. - void CloseOutputChannel(std::shared_ptr& channel); - - //! Reports whether Locators correspond to the same port. - virtual bool DoInputLocatorsMatch( - const fastrtps::rtps::Locator_t&, - const fastrtps::rtps::Locator_t&) const override; - - virtual asio::ip::tcp::endpoint generate_endpoint(uint16_t port) const = 0; - - virtual asio::ip::tcp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) const = 0; - - virtual asio::ip::tcp::endpoint generate_local_endpoint( - fastrtps::rtps::Locator_t& loc, - uint16_t port) const = 0; - - virtual asio::ip::tcp generate_protocol() const = 0; - - virtual asio::ip::tcp get_protocol_type() const = 0; - - virtual uint16_t GetLogicalPortIncrement() const = 0; - - virtual uint16_t GetLogicalPortRange() const = 0; - - virtual uint16_t GetMaxLogicalPort() const = 0; - - bool init() override; - - //! Checks whether there are open and bound sockets for the given port. - virtual bool IsInputChannelOpen(const fastrtps::rtps::Locator_t&) const override; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const = 0; - - /** - * Checks if the given locator is allowed by the white list. - * @param loc locator to check. - * @return True if the locator passes the white list. - */ - virtual bool is_interface_allowed(const fastrtps::rtps::Locator_t& loc) const = 0; - - virtual bool is_interface_allowed(const std::string& interface) const = 0; - - //! Checks for TCP kinds. - virtual bool IsLocatorSupported(const fastrtps::rtps::Locator_t&) const override; - - //! Checks whether there are open and bound sockets for the given port. - bool is_output_channel_open_for(const fastrtps::rtps::Locator_t&) const; - - /** Opens an input channel to receive incomming connections. - * If there is an existing channel it registers the receiver resource. - */ - virtual bool OpenInputChannel( - const fastrtps::rtps::Locator_t&, - TransportReceiverInterface*, uint32_t) override; - - //! Opens a socket on the given address and port (as long as they are white listed). - virtual bool OpenOutputChannel( - SendResourceList& send_resource_list, - const fastrtps::rtps::Locator_t&) override; - - /** - * Converts a given remote locator (that is, a locator referring to a remote - * destination) to the main local locator whose channel can write to that - * destination. In this case it will return a 0.0.0.0 address on that port. - */ - virtual fastrtps::rtps::Locator_t RemoteToMainLocal(const fastrtps::rtps::Locator_t&) const override; - - /** - * Transforms a remote locator into a locator optimized for local communications. - * - * If the remote locator corresponds to one of the local interfaces, it is converted - * to the corresponding local address. - * - * @param [in] remote_locator Locator to be converted. - * @param [out] result_locator Converted locator. - * - * @return false if the input locator is not supported/allowed by this transport, true otherwise. - */ - virtual bool transform_remote_locator( - const fastrtps::rtps::Locator_t& remote_locator, - fastrtps::rtps::Locator_t& result_locator) const override; - - /** - * Blocking Receive from the specified channel. - * @param rtcp_manager pointer to the RTCP Manager. - * @param channel pointer to the socket where the method is going to read the messages. - * @param receive_buffer vector with enough capacity (not size) to accomodate a full receive buffer. That - * capacity must not be less than the receive_buffer_size supplied to this class during construction. - * @param receive_buffer_capacity maximum size of the buffer. - * @param[out] receive_buffer_size Size of the packet received. - * @param[out] remote_locator associated remote locator. - */ - bool Receive( - std::weak_ptr& rtcp_manager, - std::shared_ptr& channel, - fastrtps::rtps::octet* receive_buffer, - uint32_t receive_buffer_capacity, - uint32_t& receive_buffer_size, - fastrtps::rtps::Locator_t& remote_locator); - - /** - * Blocking Send through the specified channel. - * @param send_buffer Slice into the raw data to send. - * @param send_buffer_size Size of the raw data. It will be used as a bounds check for the previous argument. - * It must not exceed the send_buffer_size fed to this class during construction. - * @param channel channel we're sending from. - * @param destination_locators_begin pointer to destination locators iterator begin, the iterator can be advanced inside this fuction - * so should not be reuse. - * @param destination_locators_end pointer to destination locators iterator end, the iterator can be advanced inside this fuction - * so should not be reuse. - */ - bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - std::shared_ptr& channel, - fastrtps::rtps::LocatorsIterator* destination_locators_begin, - fastrtps::rtps::LocatorsIterator* destination_locators_end); - - /** - * Performs the locator selection algorithm for this transport. - * - * It basically consists of the following steps - * - selector.transport_starts is called - * - transport handles the selection state of each locator - * - if a locator from an entry is selected, selector.select is called for that entry - * - * In the case of TCP, multicast locators are never selected. All TCPv6 unicast locators - * are selected. For TCPv4, only locators on the same WAN as the transport or with the - * WAN address of a connected channel are selected. - * - * @param [in, out] selector Locator selector. - */ - virtual void select_locators(fastrtps::rtps::LocatorSelector& selector) const override; - - //! Callback called each time that an incomming connection is accepted. - void SocketAccepted( - std::shared_ptr socket, - const fastrtps::rtps::Locator_t& locator, - const asio::error_code& error); - -#if TLS_FOUND - //! Callback called each time that an incomming connection is accepted (secure). - void SecureSocketAccepted( - std::shared_ptr> socket, - const fastrtps::rtps::Locator_t& locator, - const asio::error_code& error); -#endif - - //! Callback called each time that an outgoing connection is established. - void SocketConnected( - const std::weak_ptr& channel, - const asio::error_code& error); - - /** - * Method to get a list of binding interfaces. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() = 0; - - virtual bool getDefaultMetatrafficMulticastLocators( - fastrtps::rtps::LocatorList_t &locators, - uint32_t metatraffic_multicast_port) const override; - - virtual bool getDefaultMetatrafficUnicastLocators( - fastrtps::rtps::LocatorList_t &locators, - uint32_t metatraffic_unicast_port) const override; - - bool getDefaultUnicastLocators( - fastrtps::rtps::LocatorList_t &locators, - uint32_t unicast_port) const override; - - virtual bool fillMetatrafficMulticastLocator( - fastrtps::rtps::Locator_t &locator, - uint32_t metatraffic_multicast_port) const override; - - virtual bool fillMetatrafficUnicastLocator( - fastrtps::rtps::Locator_t &locator, - uint32_t metatraffic_unicast_port) const override; - - virtual bool configureInitialPeerLocator( - fastrtps::rtps::Locator_t &locator, - const fastrtps::rtps::PortParameters &port_params, - uint32_t domainId, - fastrtps::rtps::LocatorList_t& list) const override; - - virtual bool fillUnicastLocator( - fastrtps::rtps::Locator_t &locator, - uint32_t well_known_port) const override; - - virtual uint32_t max_recv_buffer_size() const override - { - return configuration()->maxMessageSize; - } - - void DeleteSocket(TCPChannelResource *channelResource); - - virtual const TCPTransportDescriptor* configuration() const = 0; - - virtual TCPTransportDescriptor* configuration() = 0; - - void keep_alive(); -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCP_TRANSPORT_INTERFACE_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4Transport.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4Transport.h deleted file mode 100644 index 008a4ab10..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4Transport.h +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCPV4_TRANSPORT_H_ -#define _FASTDDS_TCPV4_TRANSPORT_H_ - -#include -#include -#include -#include - - -#include -#include -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -/** - * This is a default TCPv4 implementation. - * - Opening an output channel by passing a remote locator will try to open a TCP conection with the endpoint. - * If there is created a connection with the same endpoint, the transport will use the same one. - * - * - It is possible to provide a white list at construction, which limits the interfaces the transport - * will ever be able to interact with. If left empty, all interfaces are allowed. - * - * - Opening an input channel by passing a locator will open a socket listening on the given physical port on every - * whitelisted interface, it will wait for incomming connections until the receiver closes the channel. - * Several endpoints can connect to other to the same physical port, because the OS creates a connection socket - * after each establishment. - * @ingroup TRANSPORT_MODULE - */ -class TCPv4Transport : public TCPTransportInterface -{ -protected: - TCPv4TransportDescriptor configuration_; - std::vector interface_whitelist_; - - //! Constructor with no descriptor is necessary for implementations derived from this class. - TCPv4Transport(); - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual void fill_local_ip(fastrtps::rtps::Locator_t& loc) const override; - - virtual asio::ip::tcp::endpoint generate_endpoint(uint16_t port) const override; - - virtual asio::ip::tcp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) const override; - - virtual asio::ip::tcp::endpoint generate_local_endpoint( - fastrtps::rtps::Locator_t& loc, - uint16_t port) const override; - - virtual asio::ip::tcp generate_protocol() const override; - - virtual asio::ip::tcp get_protocol_type() const override { return asio::ip::tcp::v4(); } - - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) const override; - - /** - * Method to get a list of interfaces to bind the socket associated to the given locator. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() override; - - bool is_locator_allowed(const fastrtps::rtps::Locator_t& locator) const override; - - //! Checks if the given ip has been included in the white list to use it. - virtual bool is_interface_allowed(const std::string& interface) const override; - - //! Checks if the given interface is allowed by the white list. - bool is_interface_allowed(const asio::ip::address_v4& ip) const; - - //! Checks if the given interface is allowed by the white list. - virtual bool is_interface_allowed(const fastrtps::rtps::Locator_t& loc) const override; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const override; - - virtual void set_receive_buffer_size(uint32_t size) override; - virtual void set_send_buffer_size(uint32_t size) override; - - virtual void endpoint_to_locator( - const asio::ip::tcp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) const override; - -public: - RTPS_DllAPI TCPv4Transport(const TCPv4TransportDescriptor&); - - virtual ~TCPv4Transport() override; - - virtual const TCPTransportDescriptor* configuration() const override; - - virtual TCPTransportDescriptor* configuration() override; - - virtual fastrtps::rtps::LocatorList_t NormalizeLocator(const fastrtps::rtps::Locator_t& locator) override; - - virtual bool is_local_locator(const fastrtps::rtps::Locator_t& locator) const override; - - TransportDescriptorInterface* get_configuration() override { return &configuration_; } - - virtual void AddDefaultOutputLocator(fastrtps::rtps::LocatorList_t&) override; - - virtual uint16_t GetLogicalPortIncrement() const override; - - virtual uint16_t GetLogicalPortRange() const override; - - virtual uint16_t GetMaxLogicalPort() const override; - - virtual bool fillMetatrafficUnicastLocator( - fastrtps::rtps::Locator_t &locator, - uint32_t metatraffic_unicast_port) const override; - - virtual bool fillUnicastLocator( - fastrtps::rtps::Locator_t &locator, - uint32_t well_known_port) const override; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TCPV4_TRANSPORT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4TransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4TransportDescriptor.h index bb91abb14..7af849116 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4TransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv4TransportDescriptor.h @@ -15,36 +15,52 @@ #ifndef _FASTDDS_TCPV4_TRANSPORT_DESCRIPTOR_ #define _FASTDDS_TCPV4_TRANSPORT_DESCRIPTOR_ +#include + #include #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { -class TCPTransportInterface; /** - * Transport configuration + * TCPv4 Transport configuration. + * The kind value for TCPv4TransportDescriptor is given by \c eprosima::fastrtps::rtps::LOCATOR_KIND_TCPv4. + * + * - \c wan_addr: Public IP address. Peers on a different LAN will use this IP for communications with this host. + * * @ingroup TRANSPORT_MODULE */ -typedef struct TCPv4TransportDescriptor: public TCPTransportDescriptor { - virtual ~TCPv4TransportDescriptor(){} +struct TCPv4TransportDescriptor : public TCPTransportDescriptor +{ + //! Destructor + virtual ~TCPv4TransportDescriptor() = default; virtual TransportInterface* create_transport() const override; + //! Public IP address fastrtps::rtps::octet wan_addr[4]; - void set_WAN_address(fastrtps::rtps::octet o1,fastrtps::rtps::octet o2,fastrtps::rtps::octet o3,fastrtps::rtps::octet o4){ + //! Set the public IP address + void set_WAN_address( + fastrtps::rtps::octet o1, + fastrtps::rtps::octet o2, + fastrtps::rtps::octet o3, + fastrtps::rtps::octet o4) + { wan_addr[0] = o1; wan_addr[1] = o2; wan_addr[2] = o3; wan_addr[3] = o4; } - void set_WAN_address(const std::string& in_address) + //! Set the public IP address + void set_WAN_address( + const std::string& in_address) { std::stringstream ss(in_address); - int a,b,c,d; //to store the 4 ints + int a, b, c, d; //to store the 4 ints char ch; //to temporarily store the '.' ss >> a >> ch >> b >> ch >> c >> ch >> d; wan_addr[0] = (fastrtps::rtps::octet)a; @@ -53,11 +69,21 @@ typedef struct TCPv4TransportDescriptor: public TCPTransportDescriptor { wan_addr[3] = (fastrtps::rtps::octet)d; } + //! Constructor RTPS_DllAPI TCPv4TransportDescriptor(); - RTPS_DllAPI TCPv4TransportDescriptor(const TCPv4TransportDescriptor& t); - RTPS_DllAPI TCPv4TransportDescriptor& operator=(const TCPv4TransportDescriptor& t); -} TCPv4TransportDescriptor; + //! Copy constructor + RTPS_DllAPI TCPv4TransportDescriptor( + const TCPv4TransportDescriptor& t); + + //! Copy assignment + RTPS_DllAPI TCPv4TransportDescriptor& operator =( + const TCPv4TransportDescriptor& t); + + //! Comparison operator + RTPS_DllAPI bool operator ==( + const TCPv4TransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6Transport.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6Transport.h deleted file mode 100644 index c0eac704d..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6Transport.h +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TCPV6_TRANSPORT_H_ -#define _FASTDDS_TCPV6_TRANSPORT_H_ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -/** - * This is a default TCPv6 implementation. - * - Opening an output channel by passing a remote locator will try to open a TCP conection with the endpoint. - * If there is created a connection with the same endpoint, the transport will use the same one. - * - * - It is possible to provide a white list at construction, which limits the interfaces the transport - * will ever be able to interact with. If left empty, all interfaces are allowed. - * - * - Opening an input channel by passing a locator will open a socket listening on the given physical port on every - * whitelisted interface, it will wait for incomming connections until the receiver closes the channel. - * Several endpoints can connect to other to the same physical port, because the OS creates a connection socket - * after each establishment. - * @ingroup TRANSPORT_MODULE - */ -class TCPv6Transport : public TCPTransportInterface -{ - -protected: - - TCPv6TransportDescriptor configuration_; - std::vector interface_whitelist_; - - //! Constructor with no descriptor is necessary for implementations derived from this class. - TCPv6Transport(); - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual void fill_local_ip(fastrtps::rtps::Locator_t& loc) const override; - - virtual asio::ip::tcp::endpoint generate_endpoint(uint16_t port) const override; - - virtual asio::ip::tcp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) const override; - - virtual asio::ip::tcp::endpoint generate_local_endpoint( - fastrtps::rtps::Locator_t& loc, - uint16_t port) const override; - - virtual asio::ip::tcp generate_protocol() const override; - - virtual asio::ip::tcp get_protocol_type() const override { return asio::ip::tcp::v6(); } - - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) const override; - - /** - * Method to get a list of interfaces to bind the socket associated to the given locator. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() override; - - bool is_locator_allowed(const fastrtps::rtps::Locator_t& locator) const override; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const override; - - //! Checks if the given interface is allowed by the white list. - virtual bool is_interface_allowed(const std::string& interface) const override; - - //! Checks if the given interface is allowed by the white list. - bool is_interface_allowed(const asio::ip::address_v6& ip) const; - - virtual bool is_interface_allowed(const fastrtps::rtps::Locator_t& loc) const override; - - virtual void set_receive_buffer_size(uint32_t size) override; - - virtual void set_send_buffer_size(uint32_t size) override; - - virtual void endpoint_to_locator( - const asio::ip::tcp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) const override; - -public: - RTPS_DllAPI TCPv6Transport(const TCPv6TransportDescriptor&); - - virtual ~TCPv6Transport() override; - - virtual fastrtps::rtps::LocatorList_t NormalizeLocator(const fastrtps::rtps::Locator_t& locator) override; - - virtual bool is_local_locator(const fastrtps::rtps::Locator_t& locator) const override; - - TransportDescriptorInterface* get_configuration() override { return &configuration_; } - - virtual void AddDefaultOutputLocator(fastrtps::rtps::LocatorList_t&) override; - - virtual uint16_t GetLogicalPortIncrement() const override; - - virtual uint16_t GetLogicalPortRange() const override; - - virtual uint16_t GetMaxLogicalPort() const override; - - virtual const TCPTransportDescriptor* configuration() const override; - - virtual TCPTransportDescriptor* configuration() override; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // FASTDDS_TCPV6_TRANSPORT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6TransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6TransportDescriptor.h index fdac3922b..43513cde0 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6TransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TCPv6TransportDescriptor.h @@ -17,32 +17,38 @@ #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class TCPTransportInterface; +namespace eprosima { +namespace fastdds { +namespace rtps { /** - * Transport configuration - * - * - bufferSize: length of the buffers used for transmission. Passing - * a buffer of different size will cause transmission to - * fail. + * TCPv6 Transport configuration + * The kind value for TCPv6TransportDescriptor is given by \c eprosima::fastrtps::rtps::LOCATOR_KIND_TCPv6. * - * - interfaceWhiteList: Lists the allowed interfaces. * @ingroup TRANSPORT_MODULE */ -typedef struct TCPv6TransportDescriptor: public TCPTransportDescriptor +struct TCPv6TransportDescriptor : public TCPTransportDescriptor { - virtual ~TCPv6TransportDescriptor(){} + //! Destructor + virtual ~TCPv6TransportDescriptor() = default; virtual TransportInterface* create_transport() const override; + //! Constructor RTPS_DllAPI TCPv6TransportDescriptor(); - RTPS_DllAPI TCPv6TransportDescriptor(const TCPv6TransportDescriptor& t); -} TCPv6TransportDescriptor; + //! Copy constructor + RTPS_DllAPI TCPv6TransportDescriptor( + const TCPv6TransportDescriptor& t); + + //! Copy assignment + RTPS_DllAPI TCPv6TransportDescriptor& operator =( + const TCPv6TransportDescriptor& t) = default; + + //! Comparison operator + RTPS_DllAPI bool operator ==( + const TCPv6TransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TransportDescriptorInterface.h b/ThirdParty/ros/include/fastdds/rtps/transport/TransportDescriptorInterface.h index 5046df9fd..149707736 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TransportDescriptorInterface.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TransportDescriptorInterface.h @@ -15,35 +15,53 @@ #ifndef _FASTDDS_TRANSPORT_DESCRIPTOR_INTERFACE_H_ #define _FASTDDS_TRANSPORT_DESCRIPTOR_INTERFACE_H_ +#include + #ifdef _WIN32 #include -#endif +#endif // ifdef _WIN32 #include #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { class TransportInterface; /** * Virtual base class for the data type used to define transport configuration. + * It acts as a builder for a given transport meaning that it allows to configure + * the transport, and then a new Transport can be built according to this configuration + * using its create_transport() factory member function. + * + * - maxMessageSize: maximum size of a single message in the transport. + * + * - maxInitialPeersRange: number of channels opened with each initial remote peer. + * * @ingroup RTPS_MODULE * */ -struct TransportDescriptorInterface +struct RTPS_DllAPI TransportDescriptorInterface { - TransportDescriptorInterface(uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange) + //! Constructor + TransportDescriptorInterface( + uint32_t maximumMessageSize, + uint32_t maximumInitialPeersRange) : maxMessageSize(maximumMessageSize) , maxInitialPeersRange(maximumInitialPeersRange) - {} + { + } + + //! Copy constructor + TransportDescriptorInterface( + const TransportDescriptorInterface& t) = default; - TransportDescriptorInterface(const TransportDescriptorInterface& t) - : maxMessageSize(t.maxMessageSize) - , maxInitialPeersRange(t.maxInitialPeersRange) - {} + //! Copy assignment + TransportDescriptorInterface& operator =( + const TransportDescriptorInterface& t) = default; - virtual ~TransportDescriptorInterface(){} + //! Destructor + virtual ~TransportDescriptorInterface() = default; /** * Factory method pattern. It will create and return a TransportInterface @@ -52,16 +70,35 @@ struct TransportDescriptorInterface */ virtual TransportInterface* create_transport() const = 0; - //! Returns the minimum size required for a send operation. + //! Returns the minimum size required for a send operation. virtual uint32_t min_send_buffer_size() const = 0; //! Returns the maximum size expected for received messages. - virtual uint32_t max_message_size() const { return maxMessageSize; } + virtual uint32_t max_message_size() const + { + return maxMessageSize; + } + + /** Returns the maximum number of opened channels for each initial remote peer + * (maximum number of guessed initial peers to try to connect) + */ + virtual uint32_t max_initial_peers_range() const + { + return maxInitialPeersRange; + } - virtual uint32_t max_initial_peers_range() const { return maxInitialPeersRange; } + //! Comparison operator + bool operator ==( + const TransportDescriptorInterface& t) const + { + return (this->maxMessageSize == t.max_message_size() && + this->maxInitialPeersRange == t.max_initial_peers_range()); + } + //! Maximum size of a single message in the transport uint32_t maxMessageSize; + //! Number of channels opened with each initial remote peer. uint32_t maxInitialPeersRange; }; diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TransportInterface.h b/ThirdParty/ros/include/fastdds/rtps/transport/TransportInterface.h index 8c77e8702..5f6abca88 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TransportInterface.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TransportInterface.h @@ -23,21 +23,25 @@ #include #include #include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -static const uint32_t s_maximumMessageSize = 65500; -static const uint32_t s_maximumInitialPeersRange = 4; -static const uint32_t s_minimumSocketBuffer = 65536; +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +//! Default maximum message size +constexpr uint32_t s_maximumMessageSize = 65500; +//! Default maximum initial peers range +constexpr uint32_t s_maximumInitialPeersRange = 4; +//! Default minimum socket buffer +constexpr uint32_t s_minimumSocketBuffer = 65536; +//! Default IPv4 address static const std::string s_IPv4AddressAny = "0.0.0.0"; +//! Default IPv6 address static const std::string s_IPv6AddressAny = "::"; using SendResourceList = std::vector>; -class ChannelResource; - /** * Interface against which to implement a transport layer, decoupled from FastRTPS internals. * TransportInterface expects the user to implement a logical equivalence between Locators and protocol-specific "channels". @@ -45,42 +49,64 @@ class ChannelResource; * locators can map to the same port, and hence the same channel. * @ingroup TRANSPORT_MODULE * */ -class TransportInterface +class RTPS_DllAPI TransportInterface { public: /** - * Aside from the API defined here, an user-defined Transport must define a descriptor data type and a constructor that - * expects a constant reference to such descriptor. e.g: - * - * class MyTransport: - * public: - * typedef struct { ... } MyTransportDescriptor; - * MyTransport(const MyTransportDescriptor&); - * ... - */ + * Aside from the API defined here, an user-defined Transport must define a descriptor data type and a constructor that + * expects a constant reference to such descriptor. e.g: + * + * class MyTransport: + * public: + * typedef struct { ... } MyTransportDescriptor; + * MyTransport(const MyTransportDescriptor&); + * ... + */ virtual ~TransportInterface() = default; + //! Copy constructor + TransportInterface( + const TransportInterface& t) = delete; + + //! Copy assignment + TransportInterface& operator =( + const TransportInterface& t) = delete; + + //! Move constructor + TransportInterface( + TransportInterface&& t) = delete; + + //! Move assignment + TransportInterface& operator =( + TransportInterface&& t) = delete; + /** - * Initialize this transport. This method will prepare all the internals of the transport. - * @return True when the transport was correctly intialized. - */ - virtual bool init() = 0; + * Initialize this transport. This method will prepare all the internals of the transport. + * @param properties Optional policy to specify additional parameters of the created transport. + * @return True when the transport was correctly initialized. + */ + virtual bool init( + const fastrtps::rtps::PropertyPolicy* properties = nullptr) = 0; /** - * Must report whether the input channel associated to this locator is open. Channels must either be - * fully closed or fully open, so that "open" and "close" operations are whole and definitive. - */ - virtual bool IsInputChannelOpen(const fastrtps::rtps::Locator_t&) const = 0; + * Must report whether the input channel associated to this locator is open. Channels must either be + * fully closed or fully open, so that "open" and "close" operations are whole and definitive. + */ + virtual bool IsInputChannelOpen( + const Locator&) const = 0; //! Must report whether the given locator is supported by this transport (typically inspecting its "kind" value). - virtual bool IsLocatorSupported(const fastrtps::rtps::Locator_t&) const = 0; + virtual bool IsLocatorSupported( + const Locator&) const = 0; //! Must report whether the given locator is allowed by this transport. - virtual bool is_locator_allowed(const fastrtps::rtps::Locator_t&) const = 0; + virtual bool is_locator_allowed( + const Locator&) const = 0; //! Returns the locator describing the main (most general) channel that can write to the provided remote locator. - virtual fastrtps::rtps::Locator_t RemoteToMainLocal(const fastrtps::rtps::Locator_t& remote) const = 0; + virtual Locator RemoteToMainLocal( + const Locator& remote) const = 0; /** * Transforms a remote locator into a locator optimized for local communications. @@ -94,8 +120,8 @@ class TransportInterface * @return false if the input locator is not supported/allowed by this transport, true otherwise. */ virtual bool transform_remote_locator( - const fastrtps::rtps::Locator_t& remote_locator, - fastrtps::rtps::Locator_t& result_locator) const + const Locator& remote_locator, + Locator& result_locator) const { (void)remote_locator; (void)result_locator; @@ -106,23 +132,32 @@ class TransportInterface //! any resources that are needed for said channel. virtual bool OpenOutputChannel( SendResourceList& sender_resource_list, - const fastrtps::rtps::Locator_t&) = 0; + const Locator&) = 0; + /** Opens an input channel to receive incoming connections. + * If there is an existing channel it registers the receiver interface. + */ virtual bool OpenInputChannel( - const fastrtps::rtps::Locator_t&, - TransportReceiverInterface*, uint32_t) = 0; + const Locator&, + TransportReceiverInterface*, + uint32_t) = 0; /** - * Must close the channel that maps to/from the given locator. - * IMPORTANT: It MUST be safe to call this method even during a Receive operation on another thread. You must implement - * any necessary mutual exclusion and timeout mechanisms to make sure the channel can be closed without damage. - */ - virtual bool CloseInputChannel(const fastrtps::rtps::Locator_t&) = 0; + * Must close the channel that maps to/from the given locator. + * IMPORTANT: It MUST be safe to call this method even during a Receive operation on another thread. You must implement + * any necessary mutual exclusion and timeout mechanisms to make sure the channel can be closed without damage. + */ + virtual bool CloseInputChannel( + const Locator&) = 0; //! Must report whether two locators map to the same internal channel. - virtual bool DoInputLocatorsMatch(const fastrtps::rtps::Locator_t&, const fastrtps::rtps::Locator_t&) const = 0; + virtual bool DoInputLocatorsMatch( + const Locator&, + const Locator&) const = 0; - virtual fastrtps::rtps::LocatorList_t NormalizeLocator(const fastrtps::rtps::Locator_t& locator) = 0; + //! Performs locator normalization (assign valid IP if not defined by user) + virtual LocatorList NormalizeLocator( + const Locator& locator) = 0; /** * Performs the locator selection algorithm for this transport. @@ -134,43 +169,56 @@ class TransportInterface * * @param [in, out] selector Locator selector. */ - virtual void select_locators(fastrtps::rtps::LocatorSelector& selector) const = 0; + virtual void select_locators( + fastrtps::rtps::LocatorSelector& selector) const = 0; - virtual bool is_local_locator(const fastrtps::rtps::Locator_t& locator) const = 0; + //! Must report whether the given locator is from the local host + virtual bool is_local_locator( + const Locator& locator) const = 0; + //! Return the transport configuration (Transport Descriptor) virtual TransportDescriptorInterface* get_configuration() = 0; - virtual void AddDefaultOutputLocator(fastrtps::rtps::LocatorList_t &defaultList) = 0; + //! Add default output locator to the locator list + virtual void AddDefaultOutputLocator( + LocatorList& defaultList) = 0; + //! Add metatraffic multicast locator with the given port virtual bool getDefaultMetatrafficMulticastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_multicast_port) const = 0; + LocatorList& locators, + uint32_t metatraffic_multicast_port) const = 0; + //! Add metatraffic unicast locator with the given port virtual bool getDefaultMetatrafficUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_unicast_port) const = 0; + LocatorList& locators, + uint32_t metatraffic_unicast_port) const = 0; + //! Add unicast locator with the given port virtual bool getDefaultUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t unicast_port) const = 0; + LocatorList& locators, + uint32_t unicast_port) const = 0; + //! Assign port to the given metatraffic multicast locator if not already defined virtual bool fillMetatrafficMulticastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t metatraffic_multicast_port) const = 0; + Locator& locator, + uint32_t metatraffic_multicast_port) const = 0; + //! Assign port to the given metatraffic unicast locator if not already defined virtual bool fillMetatrafficUnicastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t metatraffic_unicast_port) const = 0; + Locator& locator, + uint32_t metatraffic_unicast_port) const = 0; + //! Configure the initial peer locators list virtual bool configureInitialPeerLocator( - fastrtps::rtps::Locator_t& locator, - const fastrtps::rtps::PortParameters &port_params, - uint32_t domainId, - fastrtps::rtps::LocatorList_t& list) const = 0; + Locator& locator, + const fastrtps::rtps::PortParameters& port_params, + uint32_t domainId, + LocatorList& list) const = 0; + //! Assign port to the given unicast locator if not already defined virtual bool fillUnicastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t well_known_port) const = 0; + Locator& locator, + uint32_t well_known_port) const = 0; /** * @return The maximum datagram size for reception supported by the transport @@ -179,15 +227,31 @@ class TransportInterface /** * Shutdown method to close the connections of the transports. - */ - virtual void shutdown() {}; + */ + virtual void shutdown() + { + } + + /** + * @brief Update network interfaces. + */ + virtual void update_network_interfaces() + { + } - int32_t kind() const { return transport_kind_; } + //! Return the transport kind + int32_t kind() const + { + return transport_kind_; + } protected: - TransportInterface(int32_t transport_kind) - : transport_kind_(transport_kind) {} + TransportInterface( + int32_t transport_kind) + : transport_kind_(transport_kind) + { + } int32_t transport_kind_; }; diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/TransportReceiverInterface.h b/ThirdParty/ros/include/fastdds/rtps/transport/TransportReceiverInterface.h index 91bd38bd3..779266a31 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/TransportReceiverInterface.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/TransportReceiverInterface.h @@ -25,21 +25,25 @@ namespace rtps { * Interface against which to implement a data receiver, decoupled from transport internals. * @ingroup TRANSPORT_MODULE * */ -class TransportReceiverInterface +class RTPS_DllAPI TransportReceiverInterface { public: + //! Destructor virtual ~TransportReceiverInterface() = default; /** * Method to be called by the transport when receiving data. * @param data Pointer to the received data. * @param size Number of bytes received. - * @param localLocator Locator identifying the local endpoint. + * @param local_locator Locator identifying the local endpoint. * @param remote_locator Locator identifying the remote endpoint. */ - virtual void OnDataReceived(const fastrtps::rtps::octet* data, const uint32_t size, - const fastrtps::rtps::Locator_t& localLocator, const fastrtps::rtps::Locator_t& remote_locator) = 0; + virtual void OnDataReceived( + const fastrtps::rtps::octet* data, + const uint32_t size, + const Locator& local_locator, + const Locator& remote_locator) = 0; }; } // namespace rtps diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPChannelResource.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPChannelResource.h deleted file mode 100644 index 3ec88f0ee..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPChannelResource.h +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_UDP_CHANNEL_RESOURCE_INFO_ -#define _FASTDDS_UDP_CHANNEL_RESOURCE_INFO_ - -#include -#include -#include - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -class TransportReceiverInterface; -class UDPTransportInterface; - -#if defined(ASIO_HAS_MOVE) - // Typedefs - typedef asio::ip::udp::socket eProsimaUDPSocket; - typedef eProsimaUDPSocket& eProsimaUDPSocketRef; - - // UDP - inline eProsimaUDPSocket* getSocketPtr(eProsimaUDPSocket &socket) - { - return &socket; - } - inline eProsimaUDPSocket moveSocket(eProsimaUDPSocket &socket) - { - return std::move(socket); - } - inline eProsimaUDPSocket createUDPSocket(asio::io_service& io_service) - { - return asio::ip::udp::socket(io_service); - } - inline eProsimaUDPSocket& getRefFromPtr(eProsimaUDPSocket* socket) - { - return *socket; - } -#else - // Typedefs - typedef std::shared_ptr eProsimaUDPSocket; - typedef eProsimaUDPSocket eProsimaUDPSocketRef; - - // UDP - inline eProsimaUDPSocket getSocketPtr(eProsimaUDPSocket socket) - { - return socket; - } - inline eProsimaUDPSocket moveSocket(eProsimaUDPSocket socket) - { - return socket; - } - inline eProsimaUDPSocket createUDPSocket(asio::io_service& io_service) - { - return std::make_shared(io_service); - } - inline eProsimaUDPSocket getRefFromPtr(eProsimaUDPSocket socket) - { - return socket; - } -#endif - -class UDPChannelResource : public ChannelResource -{ -public: - - UDPChannelResource( - UDPTransportInterface* transport, - eProsimaUDPSocket& socket, - uint32_t maxMsgSize, - const fastrtps::rtps::Locator_t& locator, - const std::string& sInterface, - TransportReceiverInterface* receiver); - - virtual ~UDPChannelResource() override; - - UDPChannelResource& operator=(UDPChannelResource&& channelResource) - { - socket_ = moveSocket(channelResource.socket_); - return *this; - } - - void only_multicast_purpose(const bool value) - { - only_multicast_purpose_ = value; - } - - bool& only_multicast_purpose() - { - return only_multicast_purpose_; - } - - bool only_multicast_purpose() const - { - return only_multicast_purpose_; - } - -#if defined(ASIO_HAS_MOVE) - inline eProsimaUDPSocket* socket() -#else - inline eProsimaUDPSocket socket() -#endif - { - return getSocketPtr(socket_); - } - - inline void interface(const std::string& interface) - { - interface_ = interface; - } - - inline const std::string& interface() const - { - return interface_; - } - - inline void message_receiver(TransportReceiverInterface* receiver) - { - message_receiver_ = receiver; - } - - inline TransportReceiverInterface* message_receiver() - { - return message_receiver_; - } - - inline virtual void disable() override - { - ChannelResource::disable(); - } - - void release(); - -protected: - /** - * Function to be called from a new thread, which takes cares of performing a blocking receive - * operation on the ReceiveResource - * @param input_locator - Locator that triggered the creation of the resource - */ - void perform_listen_operation( - fastrtps::rtps::Locator_t input_locator); - - /** - * Blocking Receive from the specified channel. - * @param receive_buffer vector with enough capacity (not size) to accomodate a full receive buffer. That - * capacity must not be less than the receive_buffer_size supplied to this class during construction. - * @param receive_buffer_capacity Maximum size of the receive_buffer. - * @param[out] receive_buffer_size Size of the received buffer. - * @param[out] remote_locator Locator describing the remote restination we received a packet from. - */ - bool Receive( - fastrtps::rtps::octet* receive_buffer, - uint32_t receive_buffer_capacity, - uint32_t& receive_buffer_size, - fastrtps::rtps::Locator_t& remote_locator); - -private: - - TransportReceiverInterface* message_receiver_; //Associated Readers/Writers inside of MessageReceiver - eProsimaUDPSocket socket_; - bool only_multicast_purpose_; - std::string interface_; - UDPTransportInterface* transport_; - - UDPChannelResource(const UDPChannelResource&) = delete; - UDPChannelResource& operator=(const UDPChannelResource&) = delete; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_UDP_CHANNEL_RESOURCE_INFO_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportDescriptor.h index 3b5bf5503..18efac612 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportDescriptor.h @@ -16,44 +16,59 @@ #define _FASTDDS_UDP_TRANSPORT_DESCRIPTOR_ #include +#include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { /** * UDP Transport configuration * - * - bufferSize: length of the buffers used for transmission. Passing - * a buffer of different size will cause transmission to - * fail. + * - \c m_output_udp_socket: source port to use for outgoing datagrams. + * + * - \c non_blocking_send: do not block on send operations. When it is set to true, send operations will return + * immediately if the buffer is full, but no error will be returned to the upper layer. This means that the + * application will behave as if the datagram is sent and lost. * - * - interfaceWhiteList: Lists the allowed interfaces. * @ingroup TRANSPORT_MODULE */ -typedef struct UDPTransportDescriptor: public SocketTransportDescriptor +struct UDPTransportDescriptor : public SocketTransportDescriptor { - virtual ~UDPTransportDescriptor(){} - - RTPS_DllAPI UDPTransportDescriptor(); - - RTPS_DllAPI UDPTransportDescriptor(const UDPTransportDescriptor& t); - - uint16_t m_output_udp_socket; - - /** - * Whether to use non-blocking calls to send_to(). - * - * When set to true, calls to send_to() will return inmediately if the buffer is full, but - * no error will be returned to the upper layer. This means that the application will behave - * as if the datagram is sent but lost (i.e. throughput may be reduced). This value is - * specially useful on high-frequency best-effort writers. - * - * When set to false, calls to send_to() will block until the network buffer has space for the - * datagram. This may hinder performance on high-frequency writers. - */ - bool non_blocking_send = false; -} UDPTransportDescriptor; + //! Destructor + virtual ~UDPTransportDescriptor() = default; + + //! Constructor + RTPS_DllAPI UDPTransportDescriptor(); + + //! Copy constructor + RTPS_DllAPI UDPTransportDescriptor( + const UDPTransportDescriptor& t) = default; + + //! Copy assignment + RTPS_DllAPI UDPTransportDescriptor& operator =( + const UDPTransportDescriptor& t) = default; + + //! Comparison operator + RTPS_DllAPI bool operator ==( + const UDPTransportDescriptor& t) const; + + //! Source port to use for outgoing datagrams + uint16_t m_output_udp_socket; + + /** + * Whether to use non-blocking calls to send_to(). + * + * When set to true, calls to send_to() will return immediately if the buffer is full, but + * no error will be returned to the upper layer. This means that the application will behave + * as if the datagram is sent but lost (i.e. throughput may be reduced). This value is + * specially useful on high-frequency best-effort writers. + * + * When set to false, calls to send_to() will block until the network buffer has space for the + * datagram. This may hinder performance on high-frequency writers. + */ + bool non_blocking_send = false; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportInterface.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportInterface.h deleted file mode 100644 index 08ee27f3d..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPTransportInterface.h +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_UDP_TRANSPORT_INTERFACE_H_ -#define _FASTDDS_UDP_TRANSPORT_INTERFACE_H_ - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -class UDPTransportInterface : public TransportInterface -{ -public: - - virtual ~UDPTransportInterface() override; - - void clean(); - - //! Removes the listening socket for the specified port. - virtual bool CloseInputChannel( - const fastrtps::rtps::Locator_t&) override; - - //! Removes all outbound sockets on the given port. - void CloseOutputChannel( - eProsimaUDPSocket& socket); - - //! Reports whether Locators correspond to the same port. - virtual bool DoInputLocatorsMatch( - const fastrtps::rtps::Locator_t&, - const fastrtps::rtps::Locator_t&) const override; - - virtual const UDPTransportDescriptor* configuration() const = 0; - - bool init() override; - - //! Checks whether there are open and bound sockets for the given port. - virtual bool IsInputChannelOpen( - const fastrtps::rtps::Locator_t&) const override; - - //! Checks for TCP kinds. - virtual bool IsLocatorSupported( - const fastrtps::rtps::Locator_t&) const override; - - //! Opens a socket on the given address and port (as long as they are white listed). - virtual bool OpenOutputChannel( - SendResourceList& sender_resource_list, - const fastrtps::rtps::Locator_t&) override; - - /** - * Converts a given remote locator (that is, a locator referring to a remote - * destination) to the main local locator whose channel can write to that - * destination. In this case it will return a 0.0.0.0 address on that port. - */ - virtual fastrtps::rtps::Locator_t RemoteToMainLocal( - const fastrtps::rtps::Locator_t&) const override; - - /** - * Transforms a remote locator into a locator optimized for local communications. - * - * If the remote locator corresponds to one of the local interfaces, it is converted - * to the corresponding local address. - * - * @param [in] remote_locator Locator to be converted. - * @param [out] result_locator Converted locator. - * - * @return false if the input locator is not supported/allowed by this transport, true otherwise. - */ - virtual bool transform_remote_locator( - const fastrtps::rtps::Locator_t& remote_locator, - fastrtps::rtps::Locator_t& result_locator) const override; - - /** - * Blocking Send through the specified channel. In both modes, using a localLocator of 0.0.0.0 will - * send through all whitelisted interfaces provided the channel is open. - * @param send_buffer Slice into the raw data to send. - * @param send_buffer_size Size of the raw data. It will be used as a bounds check for the previous argument. - * It must not exceed the send_buffer_size fed to this class during construction. - * @param socket channel we're sending from. - * @param destination_locators_begin pointer to destination locators iterator begin, the iterator can be advanced inside this fuction - * so should not be reuse. - * @param destination_locators_end pointer to destination locators iterator end, the iterator can be advanced inside this fuction - * so should not be reuse. - * @param only_multicast_purpose - * @param max_blocking_time_point maximum blocking time. - */ - virtual bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - eProsimaUDPSocket& socket, - fastrtps::rtps::LocatorsIterator* destination_locators_begin, - fastrtps::rtps::LocatorsIterator* destination_locators_end, - bool only_multicast_purpose, - const std::chrono::steady_clock::time_point& max_blocking_time_point); - - /** - * Performs the locator selection algorithm for this transport. - * - * It basically consists of the following steps - * - selector.transport_starts is called - * - transport handles the selection state of each locator - * - if a locator from an entry is selected, selector.select is called for that entry - * - * In the case of UDP, multicast locators are selected when present in more than one entry, - * otherwise unicast locators are selected. - * - * @param [in, out] selector Locator selector. - */ - virtual void select_locators( - fastrtps::rtps::LocatorSelector& selector) const override; - - virtual bool fillMetatrafficMulticastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t metatraffic_multicast_port) const override; - - virtual bool fillMetatrafficUnicastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t metatraffic_unicast_port) const override; - - virtual bool configureInitialPeerLocator( - fastrtps::rtps::Locator_t& locator, - const fastrtps::rtps::PortParameters& port_params, - uint32_t domainId, - fastrtps::rtps::LocatorList_t& list) const override; - - virtual bool fillUnicastLocator( - fastrtps::rtps::Locator_t& locator, - uint32_t well_known_port) const override; - - virtual uint32_t max_recv_buffer_size() const override - { - return configuration()->maxMessageSize; - } - -protected: - - friend class UDPChannelResource; - - // For UDPv6, the notion of channel corresponds to a port + direction tuple. - asio::io_service io_service_; - std::vector currentInterfaces; - - mutable std::recursive_mutex mInputMapMutex; - std::map> mInputSockets; - - uint32_t mSendBufferSize; - uint32_t mReceiveBufferSize; - - UDPTransportInterface( - int32_t transport_kind); - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const = 0; - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const = 0; - - virtual void endpoint_to_locator( - asio::ip::udp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) = 0; - virtual void fill_local_ip( - fastrtps::rtps::Locator_t& loc) const = 0; - - virtual asio::ip::udp::endpoint GenerateAnyAddressEndpoint( - uint16_t port) = 0; - virtual asio::ip::udp::endpoint generate_endpoint( - uint16_t port) = 0; - virtual asio::ip::udp::endpoint generate_endpoint( - const std::string& sIp, - uint16_t port) = 0; - virtual asio::ip::udp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) = 0; - virtual asio::ip::udp::endpoint generate_local_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) = 0; - virtual asio::ip::udp generate_protocol() const = 0; - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) = 0; - virtual const std::string& localhost_name() = 0; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const = 0; - - //! Checks if the given interface is allowed by the white list. - virtual bool is_interface_allowed( - const std::string& interface) const = 0; - - /** - * Method to get a list of interfaces to bind the socket associated to the given locator. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() = 0; - - bool OpenAndBindInputSockets( - const fastrtps::rtps::Locator_t& locator, - TransportReceiverInterface* receiver, - bool is_multicast, - uint32_t maxMsgSize); - UDPChannelResource* CreateInputChannelResource( - const std::string& sInterface, - const fastrtps::rtps::Locator_t& locator, - bool is_multicast, - uint32_t maxMsgSize, - TransportReceiverInterface* receiver); - virtual eProsimaUDPSocket OpenAndBindInputSocket( - const std::string& sIp, - uint16_t port, - bool is_multicast) = 0; - eProsimaUDPSocket OpenAndBindUnicastOutputSocket( - const asio::ip::udp::endpoint& endpoint, - uint16_t& port); - - virtual void set_receive_buffer_size( - uint32_t size) = 0; - virtual void set_send_buffer_size( - uint32_t size) = 0; - virtual void SetSocketOutboundInterface( - eProsimaUDPSocket&, - const std::string&) = 0; - - /** - * Send a buffer to a destination - */ - bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - eProsimaUDPSocket& socket, - const fastrtps::rtps::Locator_t& remote_locator, - bool only_multicast_purpose, - const std::chrono::microseconds& timeout); -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_UDP_TRANSPORT_INTERFACE_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4Transport.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4Transport.h deleted file mode 100644 index 14a208a2c..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4Transport.h +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_UDPV4_TRANSPORT_H -#define _FASTDDS_UDPV4_TRANSPORT_H - -#include -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -/** - * This is a default UDPv4 implementation. - * - Opening an output channel by passing a locator will open a socket per interface on the given port. - * This collection of sockets constitute the "outbound channel". In other words, a channel corresponds - * to a port + a direction. - * - * - It is possible to provide a white list at construction, which limits the interfaces the transport - * will ever be able to interact with. If left empty, all interfaces are allowed. - * - * - Opening an input channel by passing a locator will open a socket listening on the given port on every - * whitelisted interface, and join the multicast channel specified by the locator address. Hence, any locator - * that does not correspond to the multicast range will simply open the port without a subsequent join. Joining - * multicast groups late is supported by attempting to open the channel again with the same port + a - * multicast address (the OpenInputChannel function will fail, however, because no new channel has been - * opened in a strict sense). - * @ingroup TRANSPORT_MODULE - */ -class UDPv4Transport : public UDPTransportInterface -{ -public: - - RTPS_DllAPI UDPv4Transport( - const UDPv4TransportDescriptor&); - - virtual ~UDPv4Transport() override; - - virtual const UDPTransportDescriptor* configuration() const override; - - /** - * Starts listening on the specified port, and if the specified address is in the - * multicast range, it joins the specified multicast group, - */ - virtual bool OpenInputChannel( - const fastrtps::rtps::Locator_t&, - TransportReceiverInterface*, - uint32_t) override; - - virtual fastrtps::rtps::LocatorList_t NormalizeLocator( - const fastrtps::rtps::Locator_t& locator) override; - - virtual bool is_local_locator( - const fastrtps::rtps::Locator_t& locator) const override; - - TransportDescriptorInterface* get_configuration() override - { - return &configuration_; - } - - virtual void AddDefaultOutputLocator( - fastrtps::rtps::LocatorList_t& defaultList) override; - - virtual bool getDefaultMetatrafficMulticastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_multicast_port) const override; - - virtual bool getDefaultMetatrafficUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_unicast_port) const override; - - bool getDefaultUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t unicast_port) const override; - -protected: - - //! Constructor with no descriptor is necessary for implementations derived from this class. - UDPv4Transport(); - UDPv4TransportDescriptor configuration_; - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual void endpoint_to_locator( - asio::ip::udp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) override; - virtual void fill_local_ip( - fastrtps::rtps::Locator_t& loc) const override; - - virtual asio::ip::udp::endpoint GenerateAnyAddressEndpoint( - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - const std::string& sIp, - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_local_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) override; - virtual asio::ip::udp generate_protocol() const override; - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) override; - virtual const std::string& localhost_name() override; - eProsimaUDPSocket OpenAndBindInputSocket( - const std::string& sIp, - uint16_t port, - bool is_multicast) override; - - //! Checks if the given interface is allowed by the white list. - virtual bool is_interface_allowed( - const std::string& interface) const override; - - /** - * Method to get a list of interfaces to bind the socket associated to the given locator. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() override; - - //! Checks for whether locator is allowed. - virtual bool is_locator_allowed( - const fastrtps::rtps::Locator_t&) const override; - - //! Checks if the given interface is allowed by the white list. - bool is_interface_allowed( - const asio::ip::address_v4& ip) const; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const override; - std::vector interface_whitelist_; - - virtual void set_receive_buffer_size( - uint32_t size) override; - virtual void set_send_buffer_size( - uint32_t size) override; - virtual void SetSocketOutboundInterface( - eProsimaUDPSocket&, - const std::string&) override; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_UDPV4_TRANSPORT_H diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4TransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4TransportDescriptor.h index 571fc64c5..d43f81160 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4TransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv4TransportDescriptor.h @@ -17,31 +17,37 @@ #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { /** - * Transport configuration + * UDPv4 Transport configuration + * The kind value for UDPv4TransportDescriptor is given by \c eprosima::fastrtps::rtps::LOCATOR_KIND_UDPv4. * - * - bufferSize: length of the buffers used for transmission. Passing - * a buffer of different size will cause transmission to - * fail. - * - * - interfaceWhiteList: Lists the allowed interfaces. * @ingroup TRANSPORT_MODULE */ -typedef struct UDPv4TransportDescriptor: public UDPTransportDescriptor +struct UDPv4TransportDescriptor : public UDPTransportDescriptor { - virtual ~UDPv4TransportDescriptor(){} + //! Destructor + virtual ~UDPv4TransportDescriptor() = default; + + virtual TransportInterface* create_transport() const override; - virtual TransportInterface* create_transport() const override; + //! Constructor + RTPS_DllAPI UDPv4TransportDescriptor(); - RTPS_DllAPI UDPv4TransportDescriptor(); + //! Copy constructor + RTPS_DllAPI UDPv4TransportDescriptor( + const UDPv4TransportDescriptor& t) = default; - RTPS_DllAPI UDPv4TransportDescriptor(const UDPv4TransportDescriptor& t); + //! Copy assignment + RTPS_DllAPI UDPv4TransportDescriptor& operator =( + const UDPv4TransportDescriptor& t) = default; -} UDPv4TransportDescriptor; + RTPS_DllAPI bool operator ==( + const UDPv4TransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6Transport.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6Transport.h deleted file mode 100644 index 19688ed59..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6Transport.h +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_UDPV6_TRANSPORT_H_ -#define _FASTDDS_UDPV6_TRANSPORT_H_ - -#include -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -/** - * This is a default UDPv6 implementation. - * - Opening an output channel by passing a locator will open a socket per interface on the given port. - * This collection of sockets constitute the "outbound channel". In other words, a channel corresponds - * to a port + a direction. - * - * - It is possible to provide a white list at construction, which limits the interfaces the transport - * will ever be able to interact with. If left empty, all interfaces are allowed. - * - * - Opening an input channel by passing a locator will open a socket listening on the given port on every - * whitelisted interface, and join the multicast channel specified by the locator address. Hence, any locator - * that does not correspond to the multicast range will simply open the port without a subsequent join. Joining - * multicast groups late is supported by attempting to open the channel again with the same port + a - * multicast address (the OpenInputChannel function will fail, however, because no new channel has been - * opened in a strict sense). - * @ingroup TRANSPORT_MODULE - */ -class UDPv6Transport : public UDPTransportInterface -{ -public: - - RTPS_DllAPI UDPv6Transport( - const UDPv6TransportDescriptor&); - - virtual ~UDPv6Transport() override; - - virtual const UDPTransportDescriptor* configuration() const override; - - /** - * Starts listening on the specified port, and if the specified address is in the - * multicast range, it joins the specified multicast group, - */ - virtual bool OpenInputChannel( - const fastrtps::rtps::Locator_t&, - TransportReceiverInterface*, - uint32_t) override; - - virtual fastrtps::rtps::LocatorList_t NormalizeLocator( - const fastrtps::rtps::Locator_t& locator) override; - - virtual bool is_local_locator( - const fastrtps::rtps::Locator_t& locator) const override; - - TransportDescriptorInterface* get_configuration() override - { - return &configuration_; - } - - virtual bool getDefaultMetatrafficMulticastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_multicast_port) const override; - - virtual bool getDefaultMetatrafficUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t metatraffic_unicast_port) const override; - - bool getDefaultUnicastLocators( - fastrtps::rtps::LocatorList_t& locators, - uint32_t unicast_port) const override; - - virtual void AddDefaultOutputLocator( - fastrtps::rtps::LocatorList_t& defaultList) override; - -protected: - - //! Constructor with no descriptor is necessary for implementations derived from this class. - UDPv6Transport(); - UDPv6TransportDescriptor configuration_; - - virtual bool compare_locator_ip( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - virtual bool compare_locator_ip_and_port( - const fastrtps::rtps::Locator_t& lh, - const fastrtps::rtps::Locator_t& rh) const override; - - virtual void endpoint_to_locator( - asio::ip::udp::endpoint& endpoint, - fastrtps::rtps::Locator_t& locator) override; - virtual void fill_local_ip( - fastrtps::rtps::Locator_t& loc) const override; - - virtual asio::ip::udp::endpoint GenerateAnyAddressEndpoint( - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - const std::string& sIp, - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) override; - virtual asio::ip::udp::endpoint generate_local_endpoint( - const fastrtps::rtps::Locator_t& loc, - uint16_t port) override; - virtual asio::ip::udp generate_protocol() const override; - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) override; - virtual const std::string& localhost_name() override; - eProsimaUDPSocket OpenAndBindInputSocket( - const std::string& sIp, - uint16_t port, - bool is_multicast) override; - - //! Checks for whether locator is allowed. - virtual bool is_locator_allowed( - const fastrtps::rtps::Locator_t&) const override; - - /** - * Method to get a list of interfaces to bind the socket associated to the given locator. - * @return Vector of interfaces in string format. - */ - virtual std::vector get_binding_interfaces_list() override; - - //! Checks if the given interface is allowed by the white list. - virtual bool is_interface_allowed( - const std::string& interface) const override; - - //! Checks if the given interface is allowed by the white list. - bool is_interface_allowed( - const asio::ip::address_v6& ip) const; - - //! Checks if the interfaces white list is empty. - virtual bool is_interface_whitelist_empty() const override; - std::vector interface_whitelist_; - - virtual void set_receive_buffer_size( - uint32_t size) override; - virtual void set_send_buffer_size( - uint32_t size) override; - virtual void SetSocketOutboundInterface( - eProsimaUDPSocket&, - const std::string&) override; -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_UDPV6_TRANSPORT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6TransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6TransportDescriptor.h index 2554c5dbb..2fa2e7306 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6TransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/UDPv6TransportDescriptor.h @@ -17,33 +17,39 @@ #include -namespace eprosima{ -namespace fastdds{ -namespace rtps{ +namespace eprosima { +namespace fastdds { +namespace rtps { class TransportInterface; /** - * Transport configuration + * UDPv6 Transport configuration + * The kind value for UDPv6TransportDescriptor is given by \c eprosima::fastrtps::rtps::LOCATOR_KIND_UDPv6. * - * - bufferSize: length of the buffers used for transmission. Passing - * a buffer of different size will cause transmission to - * fail. - * - * - interfaceWhiteList: Lists the allowed interfaces. * @ingroup TRANSPORT_MODULE */ -typedef struct UDPv6TransportDescriptor : public UDPTransportDescriptor +struct UDPv6TransportDescriptor : public UDPTransportDescriptor { - virtual ~UDPv6TransportDescriptor() {} + //! Destructor + virtual ~UDPv6TransportDescriptor() = default; virtual TransportInterface* create_transport() const override; + //! Constructor RTPS_DllAPI UDPv6TransportDescriptor(); - RTPS_DllAPI UDPv6TransportDescriptor(const UDPv6TransportDescriptor& t); + //! Copy constructor + RTPS_DllAPI UDPv6TransportDescriptor( + const UDPv6TransportDescriptor& t) = default; + + //! Copy assignment + RTPS_DllAPI UDPv6TransportDescriptor& operator =( + const UDPv6TransportDescriptor& t) = default; -} UDPv6TransportDescriptor; + RTPS_DllAPI bool operator ==( + const UDPv6TransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h index a7ff8b300..9152efc08 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h @@ -24,83 +24,112 @@ namespace rtps { class TransportInterface; /** - * Shared memory transport configuration + * Shared memory transport configuration. + * The kind value for SharedMemTransportDescriptor is given by eprosima::fastrtps::rtps::LOCATOR_KIND_SHM. + * + * - segment_size_: size of the shared memory segment (in octets). + * + * - port_queue_capacity_: size of the listening port (in messages). + * + * - healthy_check_timeout_ms_: timeout for the health check of ports (ms). + * + * - rtps_dump_file_: full path of the protocol dump file. * * @ingroup TRANSPORT_MODULE */ -typedef struct SharedMemTransportDescriptor : public TransportDescriptorInterface +struct SharedMemTransportDescriptor : public TransportDescriptorInterface { - virtual ~SharedMemTransportDescriptor() - { - - } + //! Destructor + virtual ~SharedMemTransportDescriptor() = default; virtual TransportInterface* create_transport() const override; + + //! Minimum size of the send buffer uint32_t min_send_buffer_size() const override { return segment_size_; } + //! Constructor RTPS_DllAPI SharedMemTransportDescriptor(); + //! Copy constructor RTPS_DllAPI SharedMemTransportDescriptor( - const SharedMemTransportDescriptor& t); + const SharedMemTransportDescriptor& t) = default; + //! Copy assignment + RTPS_DllAPI SharedMemTransportDescriptor& operator =( + const SharedMemTransportDescriptor& t) = default; + + //! Return the size of the shared memory segment RTPS_DllAPI uint32_t segment_size() const { return segment_size_; } + //! Set the size of the shared memory segment RTPS_DllAPI void segment_size( uint32_t segment_size) { segment_size_ = segment_size; } + //! Return the maximum size of a single message in the transport (in octets) virtual uint32_t max_message_size() const override { return maxMessageSize; } + //! Set the maximum size of a single message in the transport (in octets) RTPS_DllAPI void max_message_size( uint32_t max_message_size) { maxMessageSize = max_message_size; } + //! Return the size of the listening port (in messages) RTPS_DllAPI uint32_t port_queue_capacity() const { return port_queue_capacity_; } + //! Set the size of the listening port (in messages) RTPS_DllAPI void port_queue_capacity( uint32_t port_queue_capacity) { port_queue_capacity_ = port_queue_capacity; } + //! Return the timeout for the health check of ports (ms) RTPS_DllAPI uint32_t healthy_check_timeout_ms() const { return healthy_check_timeout_ms_; } + //! Set the timeout for the health check of ports (ms) RTPS_DllAPI void healthy_check_timeout_ms( uint32_t healthy_check_timeout_ms) { healthy_check_timeout_ms_ = healthy_check_timeout_ms; } + //! Return the full path of the protocol dump file RTPS_DllAPI std::string rtps_dump_file() const { return rtps_dump_file_; } + //! Set the full path of the protocol dump file RTPS_DllAPI void rtps_dump_file( const std::string& rtps_dump_file) { rtps_dump_file_ = rtps_dump_file; } + //! Comparison operator + RTPS_DllAPI bool operator ==( + const SharedMemTransportDescriptor& t) const; + private: uint32_t segment_size_; @@ -108,7 +137,7 @@ typedef struct SharedMemTransportDescriptor : public TransportDescriptorInterfac uint32_t healthy_check_timeout_ms_; std::string rtps_dump_file_; -}SharedMemTransportDescriptor; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPHeader.h b/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPHeader.h deleted file mode 100644 index edf0eeb88..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPHeader.h +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_RTCP_HEADER_H_ -#define _FASTDDS_RTCP_HEADER_H_ - -#include -#include -#include -#include - -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -#define TCPHEADER_SIZE 14 - -// TCP Header structs and enums. -struct TCPHeader -{ - char rtcp[4]; - uint32_t length; - uint32_t crc; - uint16_t logical_port; - - TCPHeader() - : length(TCPHEADER_SIZE) - , crc(0) - , logical_port(0) - { - // There isn't a explicit constructor because VS2013 doesn't support it. - rtcp[0] = 'R'; - rtcp[1] = 'T'; - rtcp[2] = 'C'; - rtcp[3] = 'P'; - } - - const fastrtps::rtps::octet* address() const - { - return reinterpret_cast(this); - } - - fastrtps::rtps::octet* address() - { - return (fastrtps::rtps::octet*)this; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @return Maximum serialized size. - */ - static inline size_t size() - { - return TCPHEADER_SIZE; - } - -}; - -union TCPTransactionId -{ - uint32_t ints[3]; - fastrtps::rtps::octet octets[12]; - - TCPTransactionId() - { - memset(ints, 0, 3 * sizeof(uint32_t)); - } - - TCPTransactionId(const TCPTransactionId& t) - { - memcpy(ints, t.ints, 3 * sizeof(uint32_t)); - } - - TCPTransactionId& operator ++() - { - if (ints[0] == 0xffffffff) - { - if (ints[1] == 0xffffffff) - { - if (ints[2] == 0xffffffff) - { - memset(ints, 0, 3 * sizeof(uint32_t)); - } - else - { - ints[2] += 1; - } - } - else - { - ints[1] += 1; - } - } - else - { - ints[0] += 1; - } - return *this; - } - - TCPTransactionId operator ++( - int) - { - TCPTransactionId prev = *this; - ++(*this); - return prev; - } - - TCPTransactionId& operator =( - const TCPTransactionId& t) - { - memcpy(ints, t.ints, 3 * sizeof(uint32_t)); - return *this; - } - - TCPTransactionId& operator =( - const fastrtps::rtps::octet* id) - { - memcpy(octets, id, 12 * sizeof(fastrtps::rtps::octet)); - return *this; - } - - TCPTransactionId& operator =( - const char* id) - { - memcpy(octets, id, 12 * sizeof(fastrtps::rtps::octet)); - return *this; - } - - TCPTransactionId& operator =( - const uint32_t* id) - { - memcpy(ints, id, 3 * sizeof(uint32_t)); - return *this; - } - - TCPTransactionId& operator =( - uint32_t id) - { - ints[0] = id; - ints[1] = 0; - ints[2] = 0; - return *this; - } - - TCPTransactionId& operator =( - uint64_t id) - { - memset(ints, 0, sizeof(uint32_t) * 3); - memcpy(ints, &id, sizeof(uint64_t)); - return *this; - } - - bool operator ==( - const TCPTransactionId& t) const - { - return memcmp(ints, t.ints, 3 * sizeof(uint32_t)) == 0; - } - - bool operator <( - const TCPTransactionId& t) const - { - return memcmp(ints, t.ints, 3 * sizeof(uint32_t)) < 0; - } - -}; - -inline std::ostream& operator <<( - std::ostream& output, - const TCPTransactionId& t) -{ - bool printed = false; // Don't skip cases like 99 0 34 - for (int i = 2; i >= 0; --i) - { - if (printed || i == 0 || t.ints[i] > 0) - { - output << t.ints[i]; - printed = true; - } - } - return output; -} - -enum TCPCPMKind : fastrtps::rtps::octet -{ - BIND_CONNECTION_REQUEST = 0xD1, - BIND_CONNECTION_RESPONSE = 0xE1, - OPEN_LOGICAL_PORT_REQUEST = 0xD2, - OPEN_LOGICAL_PORT_RESPONSE = 0xE2, - CHECK_LOGICAL_PORT_REQUEST = 0xD3, - CHECK_LOGICAL_PORT_RESPONSE = 0xE3, - KEEP_ALIVE_REQUEST = 0xD4, - KEEP_ALIVE_RESPONSE = 0xE4, - LOGICAL_PORT_IS_CLOSED_REQUEST = 0xD5, - UNBIND_CONNECTION_REQUEST = 0xD6 -}; - -class TCPControlMsgHeader -{ - TCPCPMKind kind_; // 1 byte - fastrtps::rtps::octet flags_; // 1 byte - uint16_t length_; // 2 bytes - TCPTransactionId transaction_id_; // 12 bytes - -public: - - TCPControlMsgHeader() - { - kind_ = static_cast(0x00); - flags_ = static_cast(0x00); - length_ = 0; - } - - void kind( - TCPCPMKind kind) - { - kind_ = kind; - } - - TCPCPMKind kind() const - { - return kind_; - } - - TCPCPMKind& kind() - { - return kind_; - } - - void length( - uint16_t length) - { - length_ = length; - } - - uint16_t length() const - { - return length_; - } - - uint16_t& length() - { - return length_; - } - - void transaction_id( - TCPTransactionId transaction_id) - { - transaction_id_ = transaction_id; - } - - TCPTransactionId transaction_id() const - { - return transaction_id_; - } - - TCPTransactionId& transaction_id() - { - return transaction_id_; - } - - void flags( - bool endianess, - bool payload, - bool requires_response) - { - //TODO: Optimize receiving a Endianness_t - fastrtps::rtps::octet e = (endianess) ? BIT(1) : 0x00; - fastrtps::rtps::octet p = (payload) ? BIT(2) : 0x00; - fastrtps::rtps::octet r = (requires_response) ? BIT(3) : 0x00; - flags_ = e | p | r; - } - - void endianess( - fastrtps::rtps::Endianness_t endianess) - { - // Endianess flag has inverse logic than Endianness_t :-/ - if (endianess == fastrtps::rtps::Endianness_t::BIGEND) - { - flags_ &= 0xFE; - } - else - { - flags_ |= BIT(1); - } - } - - void payload( - bool payload) - { - if (payload) - { - flags_ |= BIT(2); - } - else - { - flags_ &= 0xFD; - } - } - - void requires_response( - bool requires_response) - { - if (requires_response) - { - flags_ |= BIT(3); - } - else - { - flags_ &= 0xFB; - } - } - - bool endianess() - { - return (flags_ & BIT(1)) != 0; - } - - bool payload() - { - return (flags_ & BIT(2)) != 0; - } - - bool requires_response() - { - return (flags_ & BIT(3)) != 0; - } - - static inline size_t size() - { - return 16; - } - -}; - - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_RTCP_HEADER_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPMessageManager.h b/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPMessageManager.h deleted file mode 100644 index 2dd300084..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/RTCPMessageManager.h +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file RTCPMessageManager.h - */ -#ifndef _FASTDDS_RTCP_MESSAGEMANAGER_H_ -#define _FASTDDS_RTCP_MESSAGEMANAGER_H_ - -#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - -#include -#include -#include -#include -#include - -#include -#include - -namespace eprosima { -namespace fastdds{ -namespace rtps { - -class TCPChannelResource; -class TCPTransportInterface; - -const fastrtps::rtps::ProtocolVersion_t c_rtcpProtocolVersion = {1, 0}; - -/** - * Class RTCPMessageManager, process the received TCP messages. - * @ingroup MANAGEMENT_MODULE - */ -class RTCPMessageManager -{ - std::atomic alive_; -public: - - RTCPMessageManager(TCPTransportInterface* pTransport) : alive_(true), mTransport(pTransport) {} - virtual ~RTCPMessageManager(); - - /** @name Send RTCP Message Methods. - * These methods create RTPS messages for different types - */ - TCPTransactionId sendConnectionRequest(std::shared_ptr& channel); - - TCPTransactionId sendOpenLogicalPortRequest( - TCPChannelResource* channel, - OpenLogicalPortRequest_t &request); - - TCPTransactionId sendOpenLogicalPortRequest( - TCPChannelResource* channel, - uint16_t port); - - TCPTransactionId sendCheckLogicalPortsRequest( - TCPChannelResource* channel, - CheckLogicalPortsRequest_t &request); - - TCPTransactionId sendCheckLogicalPortsRequest( - TCPChannelResource* channel, - std::vector &ports); - - TCPTransactionId sendKeepAliveRequest( - std::shared_ptr& channel, - KeepAliveRequest_t &request); - - TCPTransactionId sendKeepAliveRequest(std::shared_ptr& channel); - - TCPTransactionId sendLogicalPortIsClosedRequest( - std::shared_ptr& channel, - LogicalPortIsClosedRequest_t& request); - - TCPTransactionId sendLogicalPortIsClosedRequest( - std::shared_ptr& channel, - uint16_t port); - - TCPTransactionId sendUnbindConnectionRequest(std::shared_ptr& channel); - - /** @name Process RTCP Message Methods. - * These methods create RTPS messages for different types - */ - ResponseCode processBindConnectionRequest( - std::shared_ptr& channel, - const ConnectionRequest_t &request, - const TCPTransactionId &transactionId, - fastrtps::rtps::Locator_t &localLocator); - - virtual ResponseCode processOpenLogicalPortRequest( - std::shared_ptr& channel, - const OpenLogicalPortRequest_t &request, - const TCPTransactionId &transactionId); - - void processCheckLogicalPortsRequest( - std::shared_ptr& channel, - const CheckLogicalPortsRequest_t &request, - const TCPTransactionId &transactionId); - - ResponseCode processKeepAliveRequest( - std::shared_ptr& channel, - const KeepAliveRequest_t &request, - const TCPTransactionId &transactionId); - - void processLogicalPortIsClosedRequest( - std::shared_ptr& channel, - const LogicalPortIsClosedRequest_t &request, - const TCPTransactionId &transactionId); - - ResponseCode processBindConnectionResponse( - std::shared_ptr& channel, - const BindConnectionResponse_t &response, - const TCPTransactionId &transactionId); - - ResponseCode processCheckLogicalPortsResponse( - std::shared_ptr& channel, - const CheckLogicalPortsResponse_t &response, - const TCPTransactionId &transactionId); - - ResponseCode processOpenLogicalPortResponse( - std::shared_ptr& channel, - ResponseCode respCode, - const TCPTransactionId &transactionId); - - ResponseCode processKeepAliveResponse( - std::shared_ptr& channel, - ResponseCode respCode, - const TCPTransactionId &transactionId); - - ResponseCode processRTCPMessage( - std::shared_ptr& channel, - fastrtps::rtps::octet* receive_buffer, - size_t receivedSize); - - static uint32_t& addToCRC(uint32_t &crc, fastrtps::rtps::octet data); - - void dispose() - { - alive_.store(false); - } - -protected: - TCPTransportInterface* mTransport; - std::set mUnconfirmedTransactions; - TCPTransactionId myTransId; - std::recursive_mutex mutex; - - TCPTransactionId getTransactionId() - { - std::unique_lock scopedLock(mutex); - return myTransId++; - } - - bool findTransactionId(const TCPTransactionId& transactionId) - { - std::unique_lock scopedLock(mutex); - auto it = mUnconfirmedTransactions.find(transactionId); - return it != mUnconfirmedTransactions.end(); - } - - void addTransactionId(const TCPTransactionId& transactionId) - { - std::unique_lock scopedLock(mutex); - mUnconfirmedTransactions.emplace(transactionId); - } - - bool removeTransactionId(const TCPTransactionId& transactionId) - { - std::unique_lock scopedLock(mutex); - auto it = mUnconfirmedTransactions.find(transactionId); - if (it != mUnconfirmedTransactions.end()) - { - mUnconfirmedTransactions.erase(it); - return true; - } - else - { - return false; - } - } - - //void prepareAndSendCheckLogicalPortsRequest(TCPChannelResource *p_channel_resource); - - size_t sendMessage( - TCPChannelResource* channel, - const fastrtps::rtps::CDRMessage_t &msg) const; - - bool sendData( - std::shared_ptr& channel, - TCPCPMKind kind, - const TCPTransactionId &transactionId, - const fastrtps::rtps::SerializedPayload_t *payload = nullptr, - const ResponseCode respCode = RETCODE_VOID); - - bool sendData( - TCPChannelResource* channel, - TCPCPMKind kind, - const TCPTransactionId &transactionId, - const fastrtps::rtps::SerializedPayload_t *payload = nullptr, - const ResponseCode respCode = RETCODE_VOID); - - void fillHeaders(TCPCPMKind kind, const TCPTransactionId &transactionId, TCPControlMsgHeader &retCtrlHeader, - TCPHeader &header, const fastrtps::rtps::SerializedPayload_t *payload = nullptr, const ResponseCode *respCode = nullptr); - - bool isCompatibleProtocol(const fastrtps::rtps::ProtocolVersion_t &protocol) const; - - inline bool alive() const - { - return alive_.load(); - } -}; -} /* namespace rtps */ -} /* namespace fastdds */ -} /* namespace eprosima */ -#endif -#endif /* _FASTDDS_RTCP_MESSAGEMANAGER_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/TCPControlMessage.h b/ThirdParty/ros/include/fastdds/rtps/transport/tcp/TCPControlMessage.h deleted file mode 100644 index c2458d942..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/tcp/TCPControlMessage.h +++ /dev/null @@ -1,1755 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! - * @file TCPControlMessage.h - * This header file contains the declaration of the described types in the IDL file. - * - * This file was generated by the tool gen. - */ - -#ifndef _FASTDDS_TCP_CONTROL_MESSAGE_H_ -#define _FASTDDS_TCP_CONTROL_MESSAGE_H_ - -#include -#include - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#define eProsima_user_DllExport __declspec( dllexport ) -#else -#define eProsima_user_DllExport -#endif -#else -#define eProsima_user_DllExport -#endif - -#if defined(_WIN32) -#if defined(EPROSIMA_USER_DLL_EXPORT) -#if defined(tcp_idl_SOURCE) -#define tcp_idl_DllAPI __declspec( dllexport ) -#else -#define tcp_idl_DllAPI __declspec( dllimport ) -#endif // tcp_idl_SOURCE -#else -#define tcp_idl_DllAPI -#endif -#else -#define tcp_idl_DllAPI -#endif // _WIN32 - -namespace eprosima -{ - namespace fastcdr - { - class Cdr; - } -} - - -namespace eprosima{ -namespace fastdds{ -namespace rtps{ - -/*! - * @brief This class represents the enumeration TCPCommonKind defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -enum TCPCommonKind : uint32_t -{ - BIND_CONNECTION, - OPEN_LOGICAL_PORT, - CHECK_LOGICAL_PORT, - KEEP_ALIVE, - UNBIND_CONNECTION, - LOGICAL_PORT_IS_CLOSED -}; -/*! - * @brief This class represents the structure ConnectionRequest_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class ConnectionRequest_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ConnectionRequest_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ConnectionRequest_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ConnectionRequest_t that will be copied. - */ - eProsima_user_DllExport ConnectionRequest_t(const ConnectionRequest_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ConnectionRequest_t that will be copied. - */ - eProsima_user_DllExport ConnectionRequest_t(ConnectionRequest_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object ConnectionRequest_t that will be copied. - */ - eProsima_user_DllExport ConnectionRequest_t& operator=(const ConnectionRequest_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ConnectionRequest_t that will be copied. - */ - eProsima_user_DllExport ConnectionRequest_t& operator=(ConnectionRequest_t &&x); - - /*! - * @brief This function sets a value in member protocolVersion - * @param _protocolVersion New value for member protocolVersion - */ - inline eProsima_user_DllExport void protocolVersion(const fastrtps::rtps::ProtocolVersion_t& _protocolVersion) - { - m_protocolVersion = _protocolVersion; - } - - /*! - * @brief This function returns the value of member protocolVersion - * @return Value of member protocolVersion - */ - inline eProsima_user_DllExport fastrtps::rtps::ProtocolVersion_t protocolVersion() const - { - return m_protocolVersion; - } - - /*! - * @brief This function returns a reference to member protocolVersion - * @return Reference to member protocolVersion - */ - inline eProsima_user_DllExport fastrtps::rtps::ProtocolVersion_t& protocolVersion() - { - return m_protocolVersion; - } - /*! - * @brief This function sets a value in member vendorId - * @param _vendorId New value for member vendorId - */ - inline eProsima_user_DllExport void vendorId(const fastrtps::rtps::VendorId_t& _vendorId) - { - m_vendorId = _vendorId; - } - - /*! - * @brief This function returns the value of member vendorId - * @return Value of member vendorId - */ - inline eProsima_user_DllExport fastrtps::rtps::VendorId_t vendorId() const - { - return m_vendorId; - } - - /*! - * @brief This function returns a reference to member vendorId - * @return Reference to member vendorId - */ - inline eProsima_user_DllExport fastrtps::rtps::VendorId_t& vendorId() - { - return m_vendorId; - } - /*! - * @brief This function sets a value in member transportLocator - * @param _transportLocator New value for member transportLocator - */ - inline eProsima_user_DllExport void transportLocator(const fastrtps::rtps::Locator_t& _transportLocator) - { - m_transportLocator = _transportLocator; - } - - /*! - * @brief This function returns the value of member transportLocator - * @return Value of member transportLocator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t transportLocator() const - { - return m_transportLocator; - } - - /*! - * @brief This function returns a reference to member transportLocator - * @return Reference to member transportLocator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t& transportLocator() - { - return m_transportLocator; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const ConnectionRequest_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const ConnectionRequest_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - fastrtps::rtps::ProtocolVersion_t m_protocolVersion; - fastrtps::rtps::VendorId_t m_vendorId; - fastrtps::rtps::Locator_t m_transportLocator; -}; -/*! - * @brief This class represents the structure OpenLogicalPortRequest_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class OpenLogicalPortRequest_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~OpenLogicalPortRequest_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object OpenLogicalPortRequest_t that will be copied. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t(const OpenLogicalPortRequest_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object OpenLogicalPortRequest_t that will be copied. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t(OpenLogicalPortRequest_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object OpenLogicalPortRequest_t that will be copied. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t& operator=(const OpenLogicalPortRequest_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object OpenLogicalPortRequest_t that will be copied. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t& operator=(OpenLogicalPortRequest_t &&x); - - /*! - * @brief This function sets a value in member logicalPort - * @param _logicalPort New value for member logicalPort - */ - inline eProsima_user_DllExport void logicalPort(uint16_t _logicalPort) - { - m_logicalPort = _logicalPort; - } - - /*! - * @brief This function returns the value of member logicalPort - * @return Value of member logicalPort - */ - inline eProsima_user_DllExport uint16_t logicalPort() const - { - return m_logicalPort; - } - - /*! - * @brief This function returns a reference to member logicalPort - * @return Reference to member logicalPort - */ - inline eProsima_user_DllExport uint16_t& logicalPort() - { - return m_logicalPort; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const OpenLogicalPortRequest_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const OpenLogicalPortRequest_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - uint16_t m_logicalPort; -}; -/*! - * @brief This class represents the structure CheckLogicalPortsRequest_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class CheckLogicalPortsRequest_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~CheckLogicalPortsRequest_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object CheckLogicalPortsRequest_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t(const CheckLogicalPortsRequest_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object CheckLogicalPortsRequest_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t(CheckLogicalPortsRequest_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object CheckLogicalPortsRequest_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t& operator=(const CheckLogicalPortsRequest_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object CheckLogicalPortsRequest_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t& operator=(CheckLogicalPortsRequest_t &&x); - - /*! - * @brief This function copies the value in member logicalPortsRange - * @param _logicalPortsRange New value to be copied in member logicalPortsRange - */ - inline eProsima_user_DllExport void logicalPortsRange(const std::vector &_logicalPortsRange) - { - m_logicalPortsRange = _logicalPortsRange; - } - - /*! - * @brief This function moves the value in member logicalPortsRange - * @param _logicalPortsRange New value to be moved in member logicalPortsRange - */ - inline eProsima_user_DllExport void logicalPortsRange(std::vector &&_logicalPortsRange) - { - m_logicalPortsRange = std::move(_logicalPortsRange); - } - - /*! - * @brief This function returns a constant reference to member logicalPortsRange - * @return Constant reference to member logicalPortsRange - */ - inline eProsima_user_DllExport const std::vector& logicalPortsRange() const - { - return m_logicalPortsRange; - } - - /*! - * @brief This function returns a reference to member logicalPortsRange - * @return Reference to member logicalPortsRange - */ - inline eProsima_user_DllExport std::vector& logicalPortsRange() - { - return m_logicalPortsRange; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const CheckLogicalPortsRequest_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const CheckLogicalPortsRequest_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - std::vector m_logicalPortsRange; -}; -/*! - * @brief This class represents the structure KeepAliveRequest_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class KeepAliveRequest_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport KeepAliveRequest_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~KeepAliveRequest_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object KeepAliveRequest_t that will be copied. - */ - eProsima_user_DllExport KeepAliveRequest_t(const KeepAliveRequest_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object KeepAliveRequest_t that will be copied. - */ - eProsima_user_DllExport KeepAliveRequest_t(KeepAliveRequest_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object KeepAliveRequest_t that will be copied. - */ - eProsima_user_DllExport KeepAliveRequest_t& operator=(const KeepAliveRequest_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object KeepAliveRequest_t that will be copied. - */ - eProsima_user_DllExport KeepAliveRequest_t& operator=(KeepAliveRequest_t &&x); - - /*! - * @brief This function sets a value in member locator - * @param _locator New value for member locator - */ - inline eProsima_user_DllExport void locator(const fastrtps::rtps::Locator_t& _locator) - { - m_locator = _locator; - } - - /*! - * @brief This function returns the value of member locator - * @return Value of member locator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t locator() const - { - return m_locator; - } - - /*! - * @brief This function returns a reference to member locator - * @return Reference to member locator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t& locator() - { - return m_locator; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const KeepAliveRequest_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const KeepAliveRequest_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - fastrtps::rtps::Locator_t m_locator; -}; -/*! - * @brief This class represents the structure LogicalPortIsClosedRequest_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class LogicalPortIsClosedRequest_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~LogicalPortIsClosedRequest_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object LogicalPortIsClosedRequest_t that will be copied. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t(const LogicalPortIsClosedRequest_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object LogicalPortIsClosedRequest_t that will be copied. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t(LogicalPortIsClosedRequest_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object LogicalPortIsClosedRequest_t that will be copied. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t& operator=(const LogicalPortIsClosedRequest_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object LogicalPortIsClosedRequest_t that will be copied. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t& operator=(LogicalPortIsClosedRequest_t &&x); - - /*! - * @brief This function sets a value in member logicalPort - * @param _logicalPort New value for member logicalPort - */ - inline eProsima_user_DllExport void logicalPort(uint16_t _logicalPort) - { - m_logicalPort = _logicalPort; - } - - /*! - * @brief This function returns the value of member logicalPort - * @return Value of member logicalPort - */ - inline eProsima_user_DllExport uint16_t logicalPort() const - { - return m_logicalPort; - } - - /*! - * @brief This function returns a reference to member logicalPort - * @return Reference to member logicalPort - */ - inline eProsima_user_DllExport uint16_t& logicalPort() - { - return m_logicalPort; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const LogicalPortIsClosedRequest_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const LogicalPortIsClosedRequest_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - uint16_t m_logicalPort; -}; -/*! - * @brief This class represents the union RequestData defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class RequestData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport RequestData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~RequestData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object RequestData that will be copied. - */ - eProsima_user_DllExport RequestData(const RequestData &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object RequestData that will be copied. - */ - eProsima_user_DllExport RequestData(RequestData &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object RequestData that will be copied. - */ - eProsima_user_DllExport RequestData& operator=(const RequestData &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object RequestData that will be copied. - */ - eProsima_user_DllExport RequestData& operator=(RequestData &&x); - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d(TCPCommonKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport TCPCommonKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport TCPCommonKind& _d(); - - /*! - * @brief This function copies the value in member connectionRequest - * @param _connectionRequest New value to be copied in member connectionRequest - */ - eProsima_user_DllExport void connectionRequest(const ConnectionRequest_t &_connectionRequest); - - /*! - * @brief This function moves the value in member connectionRequest - * @param _connectionRequest New value to be moved in member connectionRequest - */ - eProsima_user_DllExport void connectionRequest(ConnectionRequest_t &&_connectionRequest); - - /*! - * @brief This function returns a constant reference to member connectionRequest - * @return Constant reference to member connectionRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const ConnectionRequest_t& connectionRequest() const; - - /*! - * @brief This function returns a reference to member connectionRequest - * @return Reference to member connectionRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport ConnectionRequest_t& connectionRequest(); - /*! - * @brief This function copies the value in member openLogicalPortRequest - * @param _openLogicalPortRequest New value to be copied in member openLogicalPortRequest - */ - eProsima_user_DllExport void openLogicalPortRequest(const OpenLogicalPortRequest_t &_openLogicalPortRequest); - - /*! - * @brief This function moves the value in member openLogicalPortRequest - * @param _openLogicalPortRequest New value to be moved in member openLogicalPortRequest - */ - eProsima_user_DllExport void openLogicalPortRequest(OpenLogicalPortRequest_t &&_openLogicalPortRequest); - - /*! - * @brief This function returns a constant reference to member openLogicalPortRequest - * @return Constant reference to member openLogicalPortRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const OpenLogicalPortRequest_t& openLogicalPortRequest() const; - - /*! - * @brief This function returns a reference to member openLogicalPortRequest - * @return Reference to member openLogicalPortRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport OpenLogicalPortRequest_t& openLogicalPortRequest(); - /*! - * @brief This function copies the value in member checkLogicalPortsRequest - * @param _checkLogicalPortsRequest New value to be copied in member checkLogicalPortsRequest - */ - eProsima_user_DllExport void checkLogicalPortsRequest(const CheckLogicalPortsRequest_t &_checkLogicalPortsRequest); - - /*! - * @brief This function moves the value in member checkLogicalPortsRequest - * @param _checkLogicalPortsRequest New value to be moved in member checkLogicalPortsRequest - */ - eProsima_user_DllExport void checkLogicalPortsRequest(CheckLogicalPortsRequest_t &&_checkLogicalPortsRequest); - - /*! - * @brief This function returns a constant reference to member checkLogicalPortsRequest - * @return Constant reference to member checkLogicalPortsRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const CheckLogicalPortsRequest_t& checkLogicalPortsRequest() const; - - /*! - * @brief This function returns a reference to member checkLogicalPortsRequest - * @return Reference to member checkLogicalPortsRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport CheckLogicalPortsRequest_t& checkLogicalPortsRequest(); - /*! - * @brief This function copies the value in member keepAliveRequest - * @param _keepAliveRequest New value to be copied in member keepAliveRequest - */ - eProsima_user_DllExport void keepAliveRequest(const KeepAliveRequest_t &_keepAliveRequest); - - /*! - * @brief This function moves the value in member keepAliveRequest - * @param _keepAliveRequest New value to be moved in member keepAliveRequest - */ - eProsima_user_DllExport void keepAliveRequest(KeepAliveRequest_t &&_keepAliveRequest); - - /*! - * @brief This function returns a constant reference to member keepAliveRequest - * @return Constant reference to member keepAliveRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const KeepAliveRequest_t& keepAliveRequest() const; - - /*! - * @brief This function returns a reference to member keepAliveRequest - * @return Reference to member keepAliveRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport KeepAliveRequest_t& keepAliveRequest(); - /*! - * @brief This function copies the value in member logicalPortIsClosedRequest - * @param _logicalPortIsClosedRequest New value to be copied in member logicalPortIsClosedRequest - */ - eProsima_user_DllExport void logicalPortIsClosedRequest(const LogicalPortIsClosedRequest_t &_logicalPortIsClosedRequest); - - /*! - * @brief This function moves the value in member logicalPortIsClosedRequest - * @param _logicalPortIsClosedRequest New value to be moved in member logicalPortIsClosedRequest - */ - eProsima_user_DllExport void logicalPortIsClosedRequest(LogicalPortIsClosedRequest_t &&_logicalPortIsClosedRequest); - - /*! - * @brief This function returns a constant reference to member logicalPortIsClosedRequest - * @return Constant reference to member logicalPortIsClosedRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const LogicalPortIsClosedRequest_t& logicalPortIsClosedRequest() const; - - /*! - * @brief This function returns a reference to member logicalPortIsClosedRequest - * @return Reference to member logicalPortIsClosedRequest - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport LogicalPortIsClosedRequest_t& logicalPortIsClosedRequest(); - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const RequestData& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const RequestData& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - -private: - TCPCommonKind m__d; - - ConnectionRequest_t m_connectionRequest; - OpenLogicalPortRequest_t m_openLogicalPortRequest; - CheckLogicalPortsRequest_t m_checkLogicalPortsRequest; - KeepAliveRequest_t m_keepAliveRequest; - LogicalPortIsClosedRequest_t m_logicalPortIsClosedRequest; -}; -/*! - * @brief This class represents the structure ControlProtocolRequestData defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class ControlProtocolRequestData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ControlProtocolRequestData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ControlProtocolRequestData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ControlProtocolRequestData that will be copied. - */ - eProsima_user_DllExport ControlProtocolRequestData(const ControlProtocolRequestData &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ControlProtocolRequestData that will be copied. - */ - eProsima_user_DllExport ControlProtocolRequestData(ControlProtocolRequestData &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object ControlProtocolRequestData that will be copied. - */ - eProsima_user_DllExport ControlProtocolRequestData& operator=(const ControlProtocolRequestData &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ControlProtocolRequestData that will be copied. - */ - eProsima_user_DllExport ControlProtocolRequestData& operator=(ControlProtocolRequestData &&x); - - /*! - * @brief This function copies the value in member requestData - * @param _requestData New value to be copied in member requestData - */ - inline eProsima_user_DllExport void requestData(const RequestData &_requestData) - { - m_requestData = _requestData; - } - - /*! - * @brief This function moves the value in member requestData - * @param _requestData New value to be moved in member requestData - */ - inline eProsima_user_DllExport void requestData(RequestData &&_requestData) - { - m_requestData = std::move(_requestData); - } - - /*! - * @brief This function returns a constant reference to member requestData - * @return Constant reference to member requestData - */ - inline eProsima_user_DllExport const RequestData& requestData() const - { - return m_requestData; - } - - /*! - * @brief This function returns a reference to member requestData - * @return Reference to member requestData - */ - inline eProsima_user_DllExport RequestData& requestData() - { - return m_requestData; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const ControlProtocolRequestData& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const ControlProtocolRequestData& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - -private: - RequestData m_requestData; -}; -/*! - * @brief This class represents the enumeration ResponseCode defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -enum ResponseCode : uint32_t -{ - RETCODE_VOID = (uint32_t)(-1), - RETCODE_OK = 0, - RETCODE_BAD_REQUEST, - RETCODE_EXISTING_CONNECTION, - RETCODE_INVALID_PORT, - RETCODE_UNKNOWN_LOCATOR, - RETCODE_INCOMPATIBLE_VERSION, - RETCODE_SERVER_ERROR -}; -/*! - * @brief This class represents the structure BindConnectionResponse_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class BindConnectionResponse_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport BindConnectionResponse_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~BindConnectionResponse_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object BindConnectionResponse_t that will be copied. - */ - eProsima_user_DllExport BindConnectionResponse_t(const BindConnectionResponse_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object BindConnectionResponse_t that will be copied. - */ - eProsima_user_DllExport BindConnectionResponse_t(BindConnectionResponse_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object BindConnectionResponse_t that will be copied. - */ - eProsima_user_DllExport BindConnectionResponse_t& operator=(const BindConnectionResponse_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object BindConnectionResponse_t that will be copied. - */ - eProsima_user_DllExport BindConnectionResponse_t& operator=(BindConnectionResponse_t &&x); - - /*! - * @brief This function sets a value in member locator - * @param _locator New value for member locator - */ - inline eProsima_user_DllExport void locator(const fastrtps::rtps::Locator_t& _locator) - { - m_locator = _locator; - } - - /*! - * @brief This function returns the value of member locator - * @return Value of member locator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t locator() const - { - return m_locator; - } - - /*! - * @brief This function returns a reference to member locator - * @return Reference to member locator - */ - inline eProsima_user_DllExport fastrtps::rtps::Locator_t& locator() - { - return m_locator; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const BindConnectionResponse_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const BindConnectionResponse_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - fastrtps::rtps::Locator_t m_locator; -}; -/*! - * @brief This class represents the structure CheckLogicalPortsResponse_t defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class CheckLogicalPortsResponse_t -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport CheckLogicalPortsResponse_t(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~CheckLogicalPortsResponse_t(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object CheckLogicalPortsResponse_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsResponse_t(const CheckLogicalPortsResponse_t &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object CheckLogicalPortsResponse_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsResponse_t(CheckLogicalPortsResponse_t &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object CheckLogicalPortsResponse_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsResponse_t& operator=(const CheckLogicalPortsResponse_t &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object CheckLogicalPortsResponse_t that will be copied. - */ - eProsima_user_DllExport CheckLogicalPortsResponse_t& operator=(CheckLogicalPortsResponse_t &&x); - - /*! - * @brief This function copies the value in member availableLogicalPorts - * @param _availableLogicalPorts New value to be copied in member availableLogicalPorts - */ - inline eProsima_user_DllExport void availableLogicalPorts(const std::vector &_availableLogicalPorts) - { - m_availableLogicalPorts = _availableLogicalPorts; - } - - /*! - * @brief This function moves the value in member availableLogicalPorts - * @param _availableLogicalPorts New value to be moved in member availableLogicalPorts - */ - inline eProsima_user_DllExport void availableLogicalPorts(std::vector &&_availableLogicalPorts) - { - m_availableLogicalPorts = std::move(_availableLogicalPorts); - } - - /*! - * @brief This function returns a constant reference to member availableLogicalPorts - * @return Constant reference to member availableLogicalPorts - */ - inline eProsima_user_DllExport const std::vector& availableLogicalPorts() const - { - return m_availableLogicalPorts; - } - - /*! - * @brief This function returns a reference to member availableLogicalPorts - * @return Reference to member availableLogicalPorts - */ - inline eProsima_user_DllExport std::vector& availableLogicalPorts() - { - return m_availableLogicalPorts; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const CheckLogicalPortsResponse_t& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const CheckLogicalPortsResponse_t& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - - bool serialize(fastrtps::rtps::SerializedPayload_t *payload); - bool deserialize(fastrtps::rtps::SerializedPayload_t *payload); - -private: - std::vector m_availableLogicalPorts; -}; -/*! - * @brief This class represents the union ResponseData defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class ResponseData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ResponseData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ResponseData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ResponseData that will be copied. - */ - eProsima_user_DllExport ResponseData(const ResponseData &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ResponseData that will be copied. - */ - eProsima_user_DllExport ResponseData(ResponseData &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object ResponseData that will be copied. - */ - eProsima_user_DllExport ResponseData& operator=(const ResponseData &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ResponseData that will be copied. - */ - eProsima_user_DllExport ResponseData& operator=(ResponseData &&x); - - /*! - * @brief This function sets the discriminator value. - * @param __d New value for the discriminator. - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. - */ - eProsima_user_DllExport void _d(TCPCommonKind __d); - - /*! - * @brief This function returns the value of the discriminator. - * @return Value of the discriminator - */ - eProsima_user_DllExport TCPCommonKind _d() const; - - /*! - * @brief This function returns a reference to the discriminator. - * @return Reference to the discriminator. - */ - eProsima_user_DllExport TCPCommonKind& _d(); - - /*! - * @brief This function copies the value in member bindConnectionResponse - * @param _bindConnectionResponse New value to be copied in member bindConnectionResponse - */ - eProsima_user_DllExport void bindConnectionResponse(const BindConnectionResponse_t &_bindConnectionResponse); - - /*! - * @brief This function moves the value in member bindConnectionResponse - * @param _bindConnectionResponse New value to be moved in member bindConnectionResponse - */ - eProsima_user_DllExport void bindConnectionResponse(BindConnectionResponse_t &&_bindConnectionResponse); - - /*! - * @brief This function returns a constant reference to member bindConnectionResponse - * @return Constant reference to member bindConnectionResponse - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport const BindConnectionResponse_t& bindConnectionResponse() const; - - /*! - * @brief This function returns a reference to member bindConnectionResponse - * @return Reference to member bindConnectionResponse - * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. - */ - eProsima_user_DllExport BindConnectionResponse_t& bindConnectionResponse(); - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const ResponseData& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const ResponseData& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - -private: - TCPCommonKind m__d; - - BindConnectionResponse_t m_bindConnectionResponse; -}; -/*! - * @brief This class represents the structure ControlProtocolResponseData defined by the user in the IDL file. - * @ingroup TCP_IDL.1 - */ -class ControlProtocolResponseData -{ -public: - - /*! - * @brief Default constructor. - */ - eProsima_user_DllExport ControlProtocolResponseData(); - - /*! - * @brief Default destructor. - */ - eProsima_user_DllExport ~ControlProtocolResponseData(); - - /*! - * @brief Copy constructor. - * @param x Reference to the object ControlProtocolResponseData that will be copied. - */ - eProsima_user_DllExport ControlProtocolResponseData(const ControlProtocolResponseData &x); - - /*! - * @brief Move constructor. - * @param x Reference to the object ControlProtocolResponseData that will be copied. - */ - eProsima_user_DllExport ControlProtocolResponseData(ControlProtocolResponseData &&x); - - /*! - * @brief Copy assignment. - * @param x Reference to the object ControlProtocolResponseData that will be copied. - */ - eProsima_user_DllExport ControlProtocolResponseData& operator=(const ControlProtocolResponseData &x); - - /*! - * @brief Move assignment. - * @param x Reference to the object ControlProtocolResponseData that will be copied. - */ - eProsima_user_DllExport ControlProtocolResponseData& operator=(ControlProtocolResponseData &&x); - - /*! - * @brief This function sets a value in member responseCode - * @param _responseCode New value for member responseCode - */ - inline eProsima_user_DllExport void responseCode(ResponseCode _responseCode) - { - m_responseCode = _responseCode; - } - - /*! - * @brief This function returns the value of member responseCode - * @return Value of member responseCode - */ - inline eProsima_user_DllExport ResponseCode responseCode() const - { - return m_responseCode; - } - - /*! - * @brief This function returns a reference to member responseCode - * @return Reference to member responseCode - */ - inline eProsima_user_DllExport ResponseCode& responseCode() - { - return m_responseCode; - } - /*! - * @brief This function copies the value in member responseData - * @param _responseData New value to be copied in member responseData - */ - inline eProsima_user_DllExport void responseData(const ResponseData &_responseData) - { - m_responseData = _responseData; - } - - /*! - * @brief This function moves the value in member responseData - * @param _responseData New value to be moved in member responseData - */ - inline eProsima_user_DllExport void responseData(ResponseData &&_responseData) - { - m_responseData = std::move(_responseData); - } - - /*! - * @brief This function returns a constant reference to member responseData - * @return Constant reference to member responseData - */ - inline eProsima_user_DllExport const ResponseData& responseData() const - { - return m_responseData; - } - - /*! - * @brief This function returns a reference to member responseData - * @return Reference to member responseData - */ - inline eProsima_user_DllExport ResponseData& responseData() - { - return m_responseData; - } - - /*! - * @brief This function returns the maximum serialized size of an object - * depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getBufferCdrSerializedSize( - const ControlProtocolResponseData& data, - size_t current_alignment = 0); - - /*! - * @brief This function returns the serialized size of a data depending on the buffer alignment. - * @param data Data which is calculated its serialized size. - * @param current_alignment Buffer alignment. - * @return Serialized size. - */ - eProsima_user_DllExport static size_t getCdrSerializedSize(const ControlProtocolResponseData& data, size_t current_alignment = 0); - - - /*! - * @brief This function serializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const; - - /*! - * @brief This function deserializes an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr); - - - - /*! - * @brief This function returns the maximum serialized size of the Key of an object - * depending on the buffer alignment. - * @param current_alignment Buffer alignment. - * @return Maximum serialized size. - */ - eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0); - - /*! - * @brief This function tells you if the Key has been defined for this type - */ - eProsima_user_DllExport static bool isKeyDefined(); - - /*! - * @brief This function serializes the key members of an object using CDR serialization. - * @param cdr CDR serialization object. - */ - eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const; - -private: - ResponseCode m_responseCode; - ResponseData m_responseData; -}; - -} -} -} // Namespaces - -#endif // _FASTDDS_TCP_CONTROL_MESSAGE_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4Transport.h b/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4Transport.h deleted file mode 100644 index 09c2cf859..000000000 --- a/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4Transport.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _FASTDDS_TEST_UDPV4_TRANSPORT_H_ -#define _FASTDDS_TEST_UDPV4_TRANSPORT_H_ - -#include -#include -#include -#include -#include - -#include - -namespace eprosima { -namespace fastdds { -namespace rtps { - -/* - * This transport acts as a shim over UDPv4, allowing - * packets to be dropped under certain criteria. - */ - -class test_UDPv4Transport : public UDPv4Transport -{ -public: - - test_UDPv4Transport( - const test_UDPv4TransportDescriptor& descriptor); - - virtual bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - eProsimaUDPSocket& socket, - fastrtps::rtps::LocatorsIterator* destination_locators_begin, - fastrtps::rtps::LocatorsIterator* destination_locators_end, - bool only_multicast_purpose, - const std::chrono::steady_clock::time_point& max_blocking_time_point) override; - - RTPS_DllAPI static bool test_UDPv4Transport_ShutdownAllNetwork; - // Handle to a persistent log of dropped packets. Defaults to length 0 (no logging) to prevent wasted resources. - RTPS_DllAPI static std::vector> test_UDPv4Transport_DropLog; - RTPS_DllAPI static uint32_t test_UDPv4Transport_DropLogLength; - RTPS_DllAPI static bool always_drop_participant_builtin_topic_data; - RTPS_DllAPI static bool simulate_no_interfaces; - -protected: - - virtual void get_ips( - std::vector& locNames, - bool return_loopback = false) override; - -private: - - struct PercentageData - { - PercentageData( - uint8_t percent) - : percentage(percent) - , accumulator(0) - { - } - - uint8_t percentage; - uint8_t accumulator; - }; - - typedef std::function filter; - - PercentageData drop_data_messages_percentage_; - test_UDPv4TransportDescriptor::filter drop_data_messages_filter_; - bool drop_participant_builtin_topic_data_; - bool drop_publication_builtin_topic_data_; - bool drop_subscription_builtin_topic_data_; - PercentageData drop_data_frag_messages_percentage_; - test_UDPv4TransportDescriptor::filter drop_data_frag_messages_filter_; - PercentageData drop_heartbeat_messages_percentage_; - test_UDPv4TransportDescriptor::filter drop_heartbeat_messages_filter_; - PercentageData drop_ack_nack_messages_percentage_; - test_UDPv4TransportDescriptor::filter drop_ack_nack_messages_filter_; - PercentageData drop_gap_messages_percentage_; - test_UDPv4TransportDescriptor::filter drop_gap_messages_filter_; - PercentageData percentage_of_messages_to_drop_; - test_UDPv4TransportDescriptor::filter messages_filter_; - std::vector sequence_number_data_messages_to_drop_; - - - bool log_drop( - const fastrtps::rtps::octet* buffer, - uint32_t size); - bool packet_should_drop( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size); - bool random_chance_drop(); - bool should_be_dropped( - PercentageData* percentage); - - bool send( - const fastrtps::rtps::octet* send_buffer, - uint32_t send_buffer_size, - eProsimaUDPSocket& socket, - const fastrtps::rtps::Locator_t& remote_locator, - bool only_multicast_purpose, - const std::chrono::microseconds& timeout); -}; - -} // namespace rtps -} // namespace fastdds -} // namespace eprosima - -#endif // _FASTDDS_TEST_UDPV4_TRANSPORT_H_ diff --git a/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h b/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h index b567caa43..054a1bbbe 100644 --- a/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h +++ b/ThirdParty/ros/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h @@ -15,46 +15,91 @@ #ifndef _FASTDDS_TEST_UDPV4_TRANSPORT_DESCRIPTOR_ #define _FASTDDS_TEST_UDPV4_TRANSPORT_DESCRIPTOR_ +#include + #include #include -#include +#include + +namespace eprosima { +namespace fastdds { +namespace rtps { + +/** + * UDP v4 Test Transport configuration + * @ingroup TRANSPORT_MODULE + */ +struct test_UDPv4TransportDescriptor : public SocketTransportDescriptor +{ + //! Custom message filtering functions + typedef std::function filter; + //! Locator filtering function + typedef std::function DestinationLocatorFilter; + + //! Test shim parameters + //! Percentage of data messages being dropped + uint8_t dropDataMessagesPercentage; + //! Filtering function for dropping data messages + filter drop_data_messages_filter_; + //! Flag to enable dropping of discovery Participant DATA(P) messages + bool dropParticipantBuiltinTopicData; + //! Flag to enable dropping of discovery Writer DATA(W) messages + bool dropPublicationBuiltinTopicData; + //! Flag to enable dropping of discovery Reader DATA(R) messages + bool dropSubscriptionBuiltinTopicData; + //! Percentage of data fragments being dropped + uint8_t dropDataFragMessagesPercentage; + //! Filtering function for dropping data fragments messages + filter drop_data_frag_messages_filter_; + //! Percentage of heartbeats being dropped + uint8_t dropHeartbeatMessagesPercentage; + //! Filtering function for dropping heartbeat messages + filter drop_heartbeat_messages_filter_; + //! Percentage of AckNacks being dropped + uint8_t dropAckNackMessagesPercentage; + //! Filtering function for dropping AckNacks + filter drop_ack_nack_messages_filter_; + //! Percentage of gap messages being dropped + uint8_t dropGapMessagesPercentage; + //! Filtering function for dropping gap messages + filter drop_gap_messages_filter_; + + // General drop percentage (indiscriminate) + uint8_t percentageOfMessagesToDrop; + // General filtering function for all kind of messages (indiscriminate) + filter messages_filter_; -namespace eprosima{ -namespace fastdds{ -namespace rtps{ + //! Filtering function for dropping messages to specific destinations + DestinationLocatorFilter locator_filter_; -typedef struct test_UDPv4TransportDescriptor : public SocketTransportDescriptor{ + //! Vector containing the message's sequence numbers being dropped + std::vector sequenceNumberDataMessagesToDrop; - typedef std::function filter; + //! Log dropped packets + uint32_t dropLogLength; - // Test shim parameters - uint8_t dropDataMessagesPercentage; - filter drop_data_messages_filter_; - bool dropParticipantBuiltinTopicData; - bool dropPublicationBuiltinTopicData; - bool dropSubscriptionBuiltinTopicData; - uint8_t dropDataFragMessagesPercentage; - filter drop_data_frag_messages_filter_; - uint8_t dropHeartbeatMessagesPercentage; - filter drop_heartbeat_messages_filter_; - uint8_t dropAckNackMessagesPercentage; - filter drop_ack_nack_messages_filter_; - uint8_t dropGapMessagesPercentage; - filter drop_gap_messages_filter_; + //! Constructor + RTPS_DllAPI test_UDPv4TransportDescriptor(); - // General drop percentage (indescriminate) - uint8_t percentageOfMessagesToDrop; - filter messages_filter_; + //! Destructor + virtual ~test_UDPv4TransportDescriptor() = default; - std::vector sequenceNumberDataMessagesToDrop; + //! Create transport using the parameters defined within the Descriptor + virtual TransportInterface* create_transport() const override; - uint32_t dropLogLength; // logs dropped packets. + //! Copy constructor + RTPS_DllAPI test_UDPv4TransportDescriptor( + const test_UDPv4TransportDescriptor& t) = default; - RTPS_DllAPI test_UDPv4TransportDescriptor(); - virtual ~test_UDPv4TransportDescriptor(){} + //! Copy assignment + RTPS_DllAPI test_UDPv4TransportDescriptor& operator =( + const test_UDPv4TransportDescriptor& t) = default; - virtual TransportInterface* create_transport() const override; -} test_UDPv4TransportDescriptor; + //! Comparison operator + // Filters are not included + RTPS_DllAPI bool operator ==( + const test_UDPv4TransportDescriptor& t) const; +}; } // namespace rtps } // namespace fastdds diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/ChangeForReader.h b/ThirdParty/ros/include/fastdds/rtps/writer/ChangeForReader.h index 961afc4e0..010088317 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/ChangeForReader.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/ChangeForReader.h @@ -23,6 +23,8 @@ #include #include +#include + namespace eprosima { namespace fastrtps { namespace rtps { @@ -52,29 +54,9 @@ class ChangeForReader_t public: - ChangeForReader_t() - : status_(UNSENT) - , is_relevant_(true) - , change_(nullptr) - { - } - - ChangeForReader_t( - const ChangeForReader_t& ch) - : status_(ch.status_) - , is_relevant_(ch.is_relevant_) - , seq_num_(ch.seq_num_) - , change_(ch.change_) - , unsent_fragments_(ch.unsent_fragments_) - { - } - - //TODO(Ricardo) Temporal - //ChangeForReader_t(const CacheChange_t* change) : status_(UNSENT), - ChangeForReader_t( + explicit ChangeForReader_t( CacheChange_t* change) : status_(UNSENT) - , is_relevant_(true) , seq_num_(change->sequenceNumber) , change_(change) { @@ -85,36 +67,10 @@ class ChangeForReader_t } } - ChangeForReader_t( - const SequenceNumber_t& seq_num) - : status_(UNSENT) - , is_relevant_(true) - , seq_num_(seq_num) - , change_(nullptr) - { - } - - ~ChangeForReader_t() - { - } - - ChangeForReader_t& operator =( - const ChangeForReader_t& ch) - { - status_ = ch.status_; - is_relevant_ = ch.is_relevant_; - seq_num_ = ch.seq_num_; - change_ = ch.change_; - unsent_fragments_ = ch.unsent_fragments_; - return *this; - } - /** * Get the cache change * @return Cache change */ - // TODO(Ricardo) Temporal - //const CacheChange_t* getChange() const CacheChange_t* getChange() const { return change_; @@ -131,33 +87,19 @@ class ChangeForReader_t return status_; } - void setRelevance( - const bool relevance) - { - is_relevant_ = relevance; - } - - bool isRelevant() const - { - return is_relevant_; - } - const SequenceNumber_t getSequenceNumber() const { return seq_num_; } - //! Set change as not valid - void notValid() + FragmentNumber_t get_next_unsent_fragment() const { - is_relevant_ = false; - change_ = nullptr; - } + if (unsent_fragments_.empty()) + { + return change_->getFragmentCount() + 1; + } - //! Set change as valid - bool isValid() const - { - return change_ != nullptr; + return unsent_fragments_.min(); } FragmentNumberSet_t getUnsentFragments() const @@ -167,7 +109,9 @@ class ChangeForReader_t void markAllFragmentsAsUnsent() { - if (change_ != nullptr && change_->getFragmentSize() != 0) + assert(nullptr != change_); + + if (change_->getFragmentSize() != 0) { unsent_fragments_.base(1u); unsent_fragments_.add_range(1u, change_->getFragmentCount() + 1u); @@ -179,7 +123,9 @@ class ChangeForReader_t { unsent_fragments_.remove(sentFragment); - if (!unsent_fragments_.empty() && unsent_fragments_.max() < change_->getFragmentCount()) + // We only use the running window mechanism during the first stage, until all fragments have been delivered + // once, and we consider the whole change as delivered. + if (!delivered_ && !unsent_fragments_.empty() && (unsent_fragments_.max() < change_->getFragmentCount())) { FragmentNumber_t base = unsent_fragments_.base(); FragmentNumber_t max = unsent_fragments_.max(); @@ -197,17 +143,41 @@ class ChangeForReader_t void markFragmentsAsUnsent( const FragmentNumberSet_t& unsentFragments) { - FragmentNumber_t other_base = unsentFragments.base(); - if (other_base < unsent_fragments_.base()) + // Ignore NACK_FRAG messages during the first stage, until all fragments have been delivered once, and we + // consider the whole change as delivered. + if (delivered_) { - unsent_fragments_.base_update(other_base); - } - unsentFragments.for_each( - [this]( - FragmentNumber_t element) + if (unsent_fragments_.empty()) { - unsent_fragments_.add(element); - }); + // Current window is empty, so we can set it to the received one. + unsent_fragments_ = unsentFragments; + } + else + { + // Update window to send the lowest possible requested fragments first. + FragmentNumber_t other_base = unsentFragments.base(); + if (other_base < unsent_fragments_.base()) + { + unsent_fragments_.base_update(other_base); + } + unsentFragments.for_each( + [this]( + FragmentNumber_t element) + { + unsent_fragments_.add(element); + }); + } + } + } + + bool has_been_delivered() const + { + return delivered_; + } + + void set_delivered() + { + delivered_ = true; } private: @@ -215,17 +185,15 @@ class ChangeForReader_t //!Status ChangeForReaderStatus_t status_; - //!Boolean specifying if this change is relevant - bool is_relevant_; - //!Sequence number SequenceNumber_t seq_num_; - // TODO(Ricardo) Temporal - //const CacheChange_t* change_; CacheChange_t* change_; FragmentNumberSet_t unsent_fragments_; + + //! Indicates if was delivered at least once. + bool delivered_ = false; }; struct ChangeForReaderCmp diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/DeliveryRetCode.hpp b/ThirdParty/ros/include/fastdds/rtps/writer/DeliveryRetCode.hpp new file mode 100644 index 000000000..6aac55727 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/writer/DeliveryRetCode.hpp @@ -0,0 +1,21 @@ +#ifndef _FASTDDS_RTPS_WRITER_DELIVERYRETCODE_HPP_ +#define _FASTDDS_RTPS_WRITER_DELIVERYRETCODE_HPP_ + +#include + +namespace eprosima { +namespace fastrtps { +namespace rtps { + +enum class DeliveryRetCode : uint32_t +{ + DELIVERED, + NOT_DELIVERED, + EXCEEDED_LIMIT +}; + +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima + +#endif // _FASTDDS_RTPS_WRITER_DELIVERYRETCODE_HPP_ diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/IReaderDataFilter.hpp b/ThirdParty/ros/include/fastdds/rtps/writer/IReaderDataFilter.hpp index 14e29b04e..36834a22b 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/IReaderDataFilter.hpp +++ b/ThirdParty/ros/include/fastdds/rtps/writer/IReaderDataFilter.hpp @@ -14,48 +14,9 @@ /** * @file IReaderDataFilter.hpp - * */ -#ifndef _FASTDDS_RTPS_IREADERDATA_FILTER_H_ -#define _FASTDDS_RTPS_IREADERDATA_FILTER_H_ +// This file was moved as part of the implementation of content filtered topics +#include -#include -#include - - -namespace eprosima { -namespace fastdds { -namespace rtps { - -/** - * Abstract class IReaderDataFilter that acts as virtual interface for data filters in ReaderProxy. - *@ingroup WRITER_MODULE - */ -class IReaderDataFilter -{ -public: - - /** - * This method checks whether a CacheChange_t is relevant for the remote reader - * This callback should return always the same result given the same arguments - * @param change The CacheChange_t to be evaluated - * @param reader_guid remote reader GUID_t - * @return true if relevant, false otherwise. - */ - virtual bool is_relevant( - const fastrtps::rtps::CacheChange_t& change, - const fastrtps::rtps::GUID_t& reader_guid) const - { - (void)change; - (void)reader_guid; - return true; - } - -}; - -} /* namespace rtps */ -} /* namespace fastdds */ -} /* namespace eprosima */ - -#endif /* _FASTDDS_RTPS_IREADERDATA_FILTER_H_ */ +FASTDDS_TODO_BEFORE(3, 0, "This header should be removed") diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/LivelinessManager.h b/ThirdParty/ros/include/fastdds/rtps/writer/LivelinessManager.h index c39e6b064..d99db0f6e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/LivelinessManager.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/LivelinessManager.h @@ -18,9 +18,10 @@ #ifndef _FASTDDS_RTPS_LIVELINESS_MANAGER_H_ #define _FASTDDS_RTPS_LIVELINESS_MANAGER_H_ +#include #include #include -#include +#include #include @@ -28,12 +29,12 @@ namespace eprosima { namespace fastrtps { namespace rtps { -using LivelinessCallback = std::function; +using LivelinessCallback = std::function; /** * @brief A class managing the liveliness of a set of writers. Writers are represented by their LivelinessData @@ -64,7 +65,8 @@ class LivelinessManager * @brief LivelinessManager * @param other */ - LivelinessManager(const LivelinessManager& other) = delete; + LivelinessManager( + const LivelinessManager& other) = delete; /** * @brief Adds a writer to the set @@ -107,65 +109,61 @@ class LivelinessManager * @param kind Liveliness kind * @return True if liveliness was successfully asserted */ - bool assert_liveliness(LivelinessQosPolicyKind kind); + bool assert_liveliness( + LivelinessQosPolicyKind kind); /** * @brief A method to check any writer of the given kind is alive * @param kind The liveliness kind to check for * @return True if at least one writer of this kind is alive. False otherwise */ - bool is_any_alive(LivelinessQosPolicyKind kind); + bool is_any_alive( + LivelinessQosPolicyKind kind); /** * @brief A method to return liveliness data * @details Should only be used for testing purposes * @return Vector of liveliness data */ - const ResourceLimitedVector &get_liveliness_data() const; + const ResourceLimitedVector& get_liveliness_data() const; private: - //! @brief A method responsible for invoking the callback when liveliness is asserted - //! @param writer The liveliness data of the writer asserting liveliness - //! - void assert_writer_liveliness(LivelinessData& writer); + /** + * @brief A method responsible for invoking the callback when liveliness is asserted + * @param writer The liveliness data of the writer asserting liveliness + * @pre The collection shared_mutex must be taken for reading + */ + void assert_writer_liveliness( + LivelinessData& writer); /** * @brief A method to calculate the time when the next writer is going to lose liveliness * @details This method is public for testing purposes but it should not be used from outside this class + * @pre std::mutex_ should not be taken on calling this method to avoid deadlock. * @return True if at least one writer is alive */ bool calculate_next(); - //! @brief A method to find a writer from a guid, liveliness kind and lease duration - //! @param guid The guid of the writer - //! @param kind The liveliness kind - //! @param lease_duration The lease duration - //! @param wit_out Returns an iterator to the writer liveliness data - //! @return Returns true if writer was found, false otherwise - bool find_writer( - const GUID_t &guid, - const LivelinessQosPolicyKind &kind, - const Duration_t &lease_duration, - ResourceLimitedVector::iterator* wit_out); - - //! @brief A method called if the timer expires //! @return True if the timer should be restarted bool timer_expired(); //! A callback to inform outside classes that a writer changed its liveliness status - LivelinessCallback callback_; + const LivelinessCallback callback_; //! A boolean indicating whether we are managing writers with automatic liveliness - bool manage_automatic_; + const bool manage_automatic_; //! A vector of liveliness data ResourceLimitedVector writers_; - //! A mutex to protect the liveliness data + //! A mutex to protect the liveliness data included LivelinessData objects std::mutex mutex_; + //! A mutex devoted to protect the writers_ collection + eprosima::shared_mutex col_mutex_; + //! The timer owner, i.e. the writer which is next due to lose its liveliness LivelinessData* timer_owner_; diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/LocatorSelectorSender.hpp b/ThirdParty/ros/include/fastdds/rtps/writer/LocatorSelectorSender.hpp new file mode 100644 index 000000000..5bc365993 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/rtps/writer/LocatorSelectorSender.hpp @@ -0,0 +1,114 @@ +#ifndef _FASTDDS_RTPS_WRITER_LOCATORSELECTORSENDER_HPP_ +#define _FASTDDS_RTPS_WRITER_LOCATORSELECTORSENDER_HPP_ + +#include +#include +#include + +#include + +namespace eprosima { +namespace fastrtps { +namespace rtps { + +class RTPSWriter; + +/*! + * Class used by writers to inform a RTPSMessageGroup object which remote participants will be addressees of next RTPS + * submessages. + */ +class LocatorSelectorSender : public RTPSMessageSenderInterface +{ +public: + + LocatorSelectorSender( + RTPSWriter& writer, + ResourceLimitedContainerConfig matched_readers_allocation + ) + : locator_selector(matched_readers_allocation) + , all_remote_readers(matched_readers_allocation) + , all_remote_participants(matched_readers_allocation) + , writer_(writer) + { + } + + bool destinations_have_changed() const override + { + return false; + } + + /*! + * Get a GUID prefix representing all destinations. + * + * @return If only one remote participant is an addressee, return its GUIDPrefix_t. c_GuidPrefix_Unknown otherwise. + */ + GuidPrefix_t destination_guid_prefix() const override + { + return all_remote_participants.size() == 1 ? all_remote_participants.at(0) : c_GuidPrefix_Unknown; + } + + /*! + * Get the GUID prefix of all the destination participants. + * + * @return a const reference to a vector with the GUID prefix of all destination participants. + */ + const std::vector& remote_participants() const override + { + return all_remote_participants; + } + + /*! + * Get the GUID of all destinations. + * + * @return a const reference to a vector with the GUID of all destinations. + */ + const std::vector& remote_guids() const override + { + return all_remote_readers; + } + + /*! + * Send a message through this interface. + * + * @param message Pointer to the buffer with the message already serialized. + * @param max_blocking_time_point Future timepoint where blocking send should end. + */ + bool send( + CDRMessage_t* message, + std::chrono::steady_clock::time_point max_blocking_time_point) const override; + + /*! + * Lock the object. + * + * This kind of object needs to be locked because could be used outside the writer's mutex. + */ + void lock() override + { + mutex_.lock(); + } + + /*! + * Unlock the object. + */ + void unlock() override + { + mutex_.unlock(); + } + + fastrtps::rtps::LocatorSelector locator_selector; + + ResourceLimitedVector all_remote_readers; + + ResourceLimitedVector all_remote_participants; + +private: + + RTPSWriter& writer_; + + std::recursive_mutex mutex_; +}; + +} // namespace rtps +} // namespace fastrtps +} // namespace eprosima +#endif // _FASTDDS_RTPS_WRITER_LOCATORSELECTORSENDER_HPP_ diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/RTPSWriter.h b/ThirdParty/ros/include/fastdds/rtps/writer/RTPSWriter.h index ecb4c4ef8..fc4d13955 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/RTPSWriter.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/RTPSWriter.h @@ -19,40 +19,60 @@ #ifndef _FASTDDS_RTPS_RTPSWRITER_H_ #define _FASTDDS_RTPS_RTPSWRITER_H_ +#include +#include +#include +#include +#include + #include -#include #include #include +#include +#include +#include +#include "DeliveryRetCode.hpp" +#include "LocatorSelectorSender.hpp" #include -#include -#include -#include -#include -#include -#include -#include -#include +#include namespace eprosima { + +namespace fastdds { +namespace rtps { + +class FlowController; + +} // namespace rtps + +namespace dds { + +class DataWriterImpl; + +} // namespace dds +} // namespace fastdds + namespace fastrtps { namespace rtps { class WriterListener; class WriterHistory; -class FlowController; +class DataSharingNotifier; struct CacheChange_t; /** * Class RTPSWriter, manages the sending of data to the readers. Is always associated with a HistoryCache. * @ingroup WRITER_MODULE */ -class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface +class RTPSWriter + : public Endpoint + , public fastdds::statistics::StatisticsWriterImpl { friend class WriterHistory; friend class RTPSParticipantImpl; friend class RTPSMessageGroup; - friend class AsyncInterestTree; + friend class fastdds::dds::DataWriterImpl; protected: @@ -60,6 +80,7 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface RTPSParticipantImpl* impl, const GUID_t& guid, const WriterAttributes& att, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -68,6 +89,7 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface const GUID_t& guid, const WriterAttributes& att, const std::shared_ptr& payload_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -77,6 +99,7 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface const WriterAttributes& att, const std::shared_ptr& payload_pool, const std::shared_ptr& change_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -108,6 +131,10 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface ChangeKind_t changeKind, InstanceHandle_t handle = c_InstanceHandle_Unknown); + RTPS_DllAPI CacheChange_t* new_change( + ChangeKind_t changeKind, + InstanceHandle_t handle = c_InstanceHandle_Unknown); + /** * Release a change when it is not being used anymore. * @@ -148,6 +175,25 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface RTPS_DllAPI virtual bool matched_reader_is_matched( const GUID_t& reader_guid) = 0; + /** + * @brief Set a content filter to perform content filtering on this writer. + * + * This method sets a content filter that will be used to check whether a cache change is relevant + * for a reader or not. + * + * @param filter The content filter to use on this writer. May be @c nullptr to remove the content filter + * (i.e. treat all samples as relevant). + */ + RTPS_DllAPI virtual void reader_data_filter( + fastdds::rtps::IReaderDataFilter* filter) = 0; + + /** + * @brief Get the content filter used to perform content filtering on this writer. + * + * @return The content filter used on this writer. + */ + RTPS_DllAPI virtual const fastdds::rtps::IReaderDataFilter* reader_data_filter() const = 0; + /** * Check if a specific change has been acknowledged by all Readers. * Is only useful in reliable Writer. In BE Writers returns false when pending to be sent. @@ -176,12 +222,6 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface RTPS_DllAPI virtual void updateAttributes( const WriterAttributes& att) = 0; - /** - * This method triggers the send operation for unsent changes. - * @return number of messages sent - */ - RTPS_DllAPI virtual void send_any_unsent_changes() = 0; - /** * Get Min Seq Num in History. * @return Minimum sequence number in history @@ -250,12 +290,37 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface const std::chrono::steady_clock::time_point& max_blocking_time_point, std::unique_lock& lock) = 0; + /** + * Waits till a change has been acknowledged. + * @param seq Sequence number to wait for acknowledgement. + * @param max_blocking_time_point Maximum time to wait for. + * @param lock Lock of the Change list. + * @return true when change was acknowledged, false when timeout is reached. + */ + virtual bool wait_for_acknowledgement( + const SequenceNumber_t& seq, + const std::chrono::steady_clock::time_point& max_blocking_time_point, + std::unique_lock& lock) = 0; + +#ifdef FASTDDS_STATISTICS + /* - * Adds a flow controller that will apply to this writer exclusively. - * @param controller + * Add a listener to receive statistics backend callbacks + * @param listener + * @return true if successfully added */ - virtual void add_flow_controller( - std::unique_ptr controller) = 0; + RTPS_DllAPI bool add_statistics_listener( + std::shared_ptr listener); + + /* + * Remove a listener from receiving statistics backend callbacks + * @param listener + * @return true if successfully removed + */ + RTPS_DllAPI bool remove_statistics_listener( + std::shared_ptr listener); + +#endif // FASTDDS_STATISTICS /** * Get RTPS participant @@ -278,7 +343,7 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface } /** - * Inform if data is sent to readers separatedly + * Inform if data is sent to readers separately * @return true if separate sending is enabled */ bool get_separate_sending () const @@ -338,18 +403,21 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface /** * @brief A method to retrieve the liveliness kind + * * @return Liveliness kind */ const LivelinessQosPolicyKind& get_liveliness_kind() const; /** * @brief A method to retrieve the liveliness lease duration - * @return Lease durtation + * + * @return Lease duration */ const Duration_t& get_liveliness_lease_duration() const; /** * @brief A method to return the liveliness announcement period + * * @return The announcement period */ const Duration_t& get_liveliness_announcement_period() const; @@ -358,49 +426,53 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface LivelinessLostStatus liveliness_lost_status_; /** - * Check if the destinations managed by this sender interface have changed. - * - * @return true if destinations have changed, false otherwise. + * @return Whether the writer is data sharing compatible or not */ - bool destinations_have_changed() const override; + bool is_datasharing_compatible() const; - /** - * Get a GUID prefix representing all destinations. + /*! + * Tells writer the sample can be sent to the network. + * This function should be used by a fastdds::rtps::FlowController. * - * @return When all the destinations share the same prefix (i.e. belong to the same participant) - * that prefix is returned. When there are no destinations, or they belong to different - * participants, c_GuidPrefix_Unknown is returned. - */ - GuidPrefix_t destination_guid_prefix() const override; + * @param cache_change Pointer to the CacheChange_t that represents the sample which can be sent. + * @param group RTPSMessageGroup reference uses for generating the RTPS message. + * @param locator_selector RTPSMessageSenderInterface reference uses for selecting locators. The reference has to + * be a member of this RTPSWriter object. + * @param max_blocking_time Future timepoint where blocking send should end. + * @return Return code. + * @note Must be non-thread safe. + */ + virtual DeliveryRetCode deliver_sample_nts( + CacheChange_t* cache_change, + RTPSMessageGroup& group, + LocatorSelectorSender& locator_selector, + const std::chrono::time_point& max_blocking_time) = 0; - /** - * Get the GUID prefix of all the destination participants. - * - * @return a const reference to a vector with the GUID prefix of all destination participants. - */ - const std::vector& remote_participants() const override; + virtual LocatorSelectorSender& get_general_locator_selector() = 0; - /** - * Get the GUID of all destinations. - * - * @return a const reference to a vector with the GUID of all destinations. - */ - const std::vector& remote_guids() const override; + virtual LocatorSelectorSender& get_async_locator_selector() = 0; /** * Send a message through this interface. * * @param message Pointer to the buffer with the message already serialized. + * @param locator_selector RTPSMessageSenderInterface reference uses for selecting locators. The reference has to + * be a member of this RTPSWriter object. * @param max_blocking_time_point Future timepoint where blocking send should end. */ - bool send( + virtual bool send_nts( CDRMessage_t* message, - std::chrono::steady_clock::time_point& max_blocking_time_point) const override; + const LocatorSelectorSender& locator_selector, + std::chrono::steady_clock::time_point& max_blocking_time_point) const; protected: //!Is the data sent directly or announced by HB and THEN sent to the ones who ask for it?. bool m_pushMode = true; + + //! Flow controller. + fastdds::rtps::FlowController* flow_controller_; + //!WriterHistory WriterHistory* mp_history = nullptr; //!Listener @@ -410,11 +482,6 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface //!Separate sending activated bool m_separateSendingEnabled = false; - LocatorSelector locator_selector_; - - ResourceLimitedVector all_remote_readers_; - ResourceLimitedVector all_remote_participants_; - //! The liveliness kind of this writer LivelinessQosPolicyKind liveliness_kind_; //! The liveliness lease duration of this writer @@ -423,11 +490,14 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface Duration_t liveliness_announcement_period_; void add_guid( + LocatorSelectorSender& locator_selector, const GUID_t& remote_guid); - void compute_selected_guids(); + void compute_selected_guids( + LocatorSelectorSender& locator_selector); - void update_cached_info_nts(); + void update_cached_info_nts( + LocatorSelectorSender& locator_selector); /** * Add a change to the unsent list. @@ -446,14 +516,73 @@ class RTPSWriter : public Endpoint, public RTPSMessageSenderInterface virtual bool change_removed_by_history( CacheChange_t* a_change) = 0; + bool is_datasharing_compatible_with( + const ReaderProxyData& rdata) const; + + bool is_pool_initialized() const; + + template + bool send_data_or_fragments( + RTPSMessageGroup& group, + CacheChange_t* change, + bool inline_qos, + Functor sent_fun) + { + bool sent_ok = true; + + uint32_t n_fragments = change->getFragmentCount(); + if (n_fragments > 0) + { + for (FragmentNumber_t frag = 1; frag <= n_fragments; frag++) + { + sent_ok &= group.add_data_frag(*change, frag, inline_qos); + if (sent_ok) + { + sent_fun(change, frag); + } + else + { + logError(RTPS_WRITER, "Error sending fragment (" << change->sequenceNumber << ", " << frag << ")"); + break; + } + } + } + else + { + sent_ok = group.add_data(*change, inline_qos); + if (sent_ok) + { + sent_fun(change, 0); + } + else + { + logError(RTPS_WRITER, "Error sending change " << change->sequenceNumber); + } + } + + return sent_ok; + } + + void add_statistics_sent_submessage( + CacheChange_t* change, + size_t num_locators); + + void deinit(); + private: + RecursiveTimedMutex& get_mutex() + { + return mp_mutex; + } + RTPSWriter& operator =( const RTPSWriter&) = delete; void init( const std::shared_ptr& payload_pool, - const std::shared_ptr& change_pool); + const std::shared_ptr& change_pool, + const WriterAttributes& att); RTPSWriter* next_[2] = { nullptr, nullptr }; diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/ReaderLocator.h b/ThirdParty/ros/include/fastdds/rtps/writer/ReaderLocator.h index 81d598647..bfead3e3e 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/ReaderLocator.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/ReaderLocator.h @@ -34,6 +34,7 @@ namespace rtps { class RTPSParticipantImpl; class RTPSWriter; class RTPSReader; +class IDataSharingNotifier; /** * Class ReaderLocator, contains information about a remote reader, without saving its state. @@ -44,7 +45,7 @@ class ReaderLocator : public RTPSMessageSenderInterface { public: - virtual ~ReaderLocator() = default; + virtual ~ReaderLocator(); /** * Construct a ReaderLocator. @@ -93,6 +94,7 @@ class ReaderLocator : public RTPSMessageSenderInterface * @param unicast_locators Unicast locators of the remote reader. * @param multicast_locators Multicast locators of the remote reader. * @param expects_inline_qos Whether remote reader expects to receive inline QoS. + * @param is_datasharing Whether remote reader can be reached through datasharing. * * @return false when this object was already started, true otherwise. */ @@ -100,7 +102,8 @@ class ReaderLocator : public RTPSMessageSenderInterface const GUID_t& remote_guid, const ResourceLimitedVector& unicast_locators, const ResourceLimitedVector& multicast_locators, - bool expects_inline_qos); + bool expects_inline_qos, + bool is_datasharing = false); /** * Try to update information of this object. @@ -126,6 +129,11 @@ class ReaderLocator : public RTPSMessageSenderInterface bool stop( const GUID_t& remote_guid); + /** + * Try to stop using this object for an unmatched reader. + */ + void stop(); + /** * Check if the destinations managed by this sender interface have changed. * @@ -176,7 +184,68 @@ class ReaderLocator : public RTPSMessageSenderInterface */ bool send( CDRMessage_t* message, - std::chrono::steady_clock::time_point& max_blocking_time_point) const override; + std::chrono::steady_clock::time_point max_blocking_time_point) const override; + + /** + * Check if the reader is datasharing compatible with this writer + * @return true if the reader datasharing compatible with this writer + */ + bool is_datasharing_reader() const; + + /** + * @return The datasharing notifier for this reader or nullptr if the reader is not datasharing. + */ + IDataSharingNotifier* datasharing_notifier() + { + return datasharing_notifier_; + } + + /** + * @return The datasharing notifier for this reader or nullptr if the reader is not datasharing. + */ + const IDataSharingNotifier* datasharing_notifier() const + { + return datasharing_notifier_; + } + + /** + * Performs datasharing notification of changes on the state of a writer to the reader represented by this class. + */ + void datasharing_notify(); + + size_t locators_size() const + { + if (locator_info_.remote_guid != c_Guid_Unknown && !is_local_reader_) + { + if (locator_info_.unicast.size() > 0) + { + return locator_info_.unicast.size(); + } + else + { + return locator_info_.multicast.size(); + } + } + + return 0; + + } + + /* + * Do nothing. + * This object always is protected by writer's mutex. + */ + void lock() override + { + } + + /* + * Do nothing. + * This object always is protected by writer's mutex. + */ + void unlock() override + { + } private: @@ -188,11 +257,12 @@ class ReaderLocator : public RTPSMessageSenderInterface RTPSReader* local_reader_; std::vector guid_prefix_as_vector_; std::vector guid_as_vector_; + IDataSharingNotifier* datasharing_notifier_; }; } /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_READERLOCATOR_H_ */ diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/ReaderProxy.h b/ThirdParty/ros/include/fastdds/rtps/writer/ReaderProxy.h index 2d4b49506..20f487a1d 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/ReaderProxy.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/ReaderProxy.h @@ -48,6 +48,7 @@ namespace rtps { class StatefulWriter; class TimedEvent; class RTPSReader; +class IDataSharingNotifier; class RTPSGapBuilder; /** @@ -74,9 +75,11 @@ class ReaderProxy /** * Activate this proxy associating it to a remote reader. * @param reader_attributes ReaderProxyData of the reader for which to keep state. + * @param is_datasharing whether the reader is datasharing compatible with the writer or not. */ void start( - const ReaderProxyData& reader_attributes); + const ReaderProxyData& reader_attributes, + bool is_datasharing = false); /** * Update information about the remote reader. @@ -94,14 +97,17 @@ class ReaderProxy /** * Called when a change is added to the writer's history. * @param change Information regarding the change added. + * @param is_relevant Specify if change is relevant for this remote reader. * @param restart_nack_supression Whether nack-supression event should be restarted. */ void add_change( const ChangeForReader_t& change, + bool is_relevant, bool restart_nack_supression); void add_change( const ChangeForReader_t& change, + bool is_relevant, bool restart_nack_supression, const std::chrono::time_point& max_blocking_time); @@ -121,13 +127,23 @@ class ReaderProxy /** * Check if a specific change is marked to be sent to this reader. + * * @param[in] seq_num Sequence number of the change to be checked. - * @param[out] is_irrelevant Will be forced to true if change is irrelevant for this reader. - * @return true when the change is marked to be sent, false otherwise. + * @param[out] next_unsent_frag Return next fragment to be sent. + * @param[out] gap_seq Return, when it is its first delivery (should be relevant seq_num), the sequence number of + * the first sequence of the gap [first, seq_num). Otherwise return SequenceNumber_t::unknown(). + * @param[in] min_seq Minimum sequence number managed by the History. It could be SequenceNumber_t::unknown() if + * history is empty. + * @param[out] need_reactivate_periodic_heartbeat Indicates if the heartbeat period event has to be restarted. + * + * @return true if the change is marked to be sent. False otherwise. */ bool change_is_unsent( const SequenceNumber_t& seq_num, - bool& is_irrelevant) const; + FragmentNumber_t& next_unsent_frag, + SequenceNumber_t& gap_seq, + const SequenceNumber_t& min_seq, + bool& need_reactivate_periodic_heartbeat) const; /** * Mark all changes up to the one indicated by seq_num as Acknowledged. @@ -142,79 +158,35 @@ class ReaderProxy * @param seq_num_set Bitmap of sequence numbers. * @param gap_builder RTPSGapBuilder reference uses for adding each requested change that is irrelevant for the * requester. + * @param[in] min_seq_in_history Minimum SequenceNumber_t in the writer's history. If writer's history is empty, + * SequenceNumber_t::unknown() is expected. * @return true if at least one change has been marked as REQUESTED, false otherwise. */ bool requested_changes_set( const SequenceNumberSet_t& seq_num_set, - RTPSGapBuilder& gap_builder); + RTPSGapBuilder& gap_builder, + const SequenceNumber_t& min_seq_in_history); /** * Performs processing of preemptive acknack + * @param func functor called, if the requester is a local reader, for each changes moved to UNSENT status. * @return true if a heartbeat should be sent, false otherwise. */ - bool process_initial_acknack(); - - /** - * Applies the given function object to every unsent change. - * @param max_seq Maximum sequence number to be considered without including it. - * @param f Function to apply. - * Will receive a SequenceNumber_t and a ChangeForReader_t*. - * The second argument may be nullptr for irrelevant changes. - */ - template - void for_each_unsent_change( - const SequenceNumber_t& max_seq, - BinaryFunction f) const - { - if (!changes_for_reader_.empty()) - { - SequenceNumber_t current_seq = changes_low_mark_ + 1; - ChangeConstIterator it = changes_for_reader_.begin(); - while (it != changes_for_reader_.end()) - { - // Holes before this change are informed as irrelevant. - SequenceNumber_t change_seq = it->getSequenceNumber(); - for (; current_seq < change_seq; ++current_seq) - { - f(current_seq, nullptr); - } - - // We then inform of this change if it is unsent, and go to the next one. - if (it->getStatus() == UNSENT) - { - f(current_seq, &(*it)); - } - ++current_seq; - ++it; - } - - // After the last change has been checked, there may be a hole at the end. - for (; current_seq < max_seq; ++current_seq) - { - f(current_seq, nullptr); - } - } - else - { - // This may be entered if all changes where removed before being acknowledged. - for (SequenceNumber_t seq = changes_low_mark_ + 1; seq < max_seq; ++seq) - { - f(seq, nullptr); - } - } - } + bool process_initial_acknack( + const std::function& func); /*! * @brief Sets a change to a particular status (if present in the ReaderProxy) * @param seq_num Sequence number of the change to update. * @param status Status to apply. * @param restart_nack_supression Whether nack supression event should be restarted or not. - * @return true when a status has changed, false otherwise. + * @param delivered true if change was able to be delivered to its addressees. false otherwise. */ - bool set_change_to_status( + void from_unsent_to_status( const SequenceNumber_t& seq_num, ChangeForReaderStatus_t status, - bool restart_nack_supression); + bool restart_nack_supression, + bool delivered = true); /** * @brief Mark a particular fragment as sent. @@ -230,15 +202,19 @@ class ReaderProxy /** * Turns all UNDERWAY changes into UNACKNOWLEDGED. + * * @return true if at least one change changed its status, false otherwise. */ bool perform_nack_supression(); /** * Turns all REQUESTED changes into UNSENT. - * @return true if at least one change changed its status, false otherwise. + * + * @param func Function executed for each change which changes its status. + * @return the number of changes that changed its status. */ - bool perform_acknack_response(); + uint32_t perform_acknack_response( + const std::function& func); /** * Call this to inform a change was removed from history. @@ -249,9 +225,11 @@ class ReaderProxy /*! * @brief Returns there is some UNACKNOWLEDGED change. + * @param first_seq_in_history Minimum sequence number in the writer history. * @return There is some UNACKNOWLEDGED change. */ - bool has_unacknowledged() const; + bool has_unacknowledged( + const SequenceNumber_t& first_seq_in_history) const; /** * Get the GUID of the reader represented by this proxy. @@ -300,7 +278,7 @@ class ReaderProxy */ inline bool is_remote_and_reliable() const { - return !locator_info_.is_local_reader() && is_reliable_; + return !locator_info_.is_local_reader() && !locator_info_.is_datasharing_reader() && is_reliable_; } /** @@ -369,12 +347,6 @@ class ReaderProxy return changes_low_mark_; } - /** - * Get the first relevant sequence number of the changes for this reader. - * @return the first relevant sequence number of the changes for this reader. - */ - SequenceNumber_t first_relevant_sequence_number() const; - /** * Change the interval of nack-supression event. * @param interval Time from data sending to acknack processing. @@ -382,30 +354,50 @@ class ReaderProxy void update_nack_supression_interval( const Duration_t& interval); - /** - * Check if there are gaps in the list of ChangeForReader_t. - * @return True if there are gaps, else false. - */ - bool are_there_gaps(); + LocatorSelectorEntry* locator_selector_entry() + { + return locator_info_.locator_selector_entry(); + } - /** - * Adds gaps to message group if there are holes / irrelevant changes on this proxy. + RTPSMessageSenderInterface* message_sender() + { + return &locator_info_; + } - * @param group Message group where gaps will be added. - * @param next_seq Sequence number of next sample to be added to history. - */ - void send_gaps( - RTPSMessageGroup& group, - SequenceNumber_t next_seq); + bool is_datasharing_reader() const + { + return locator_info_.is_datasharing_reader(); + } - LocatorSelectorEntry* locator_selector_entry() + IDataSharingNotifier* datasharing_notifier() { - return locator_info_.locator_selector_entry(); + return locator_info_.datasharing_notifier(); } - const RTPSMessageSenderInterface& message_sender() const + const IDataSharingNotifier* datasharing_notifier() const { - return locator_info_; + return locator_info_.datasharing_notifier(); + } + + void datasharing_notify() + { + locator_info_.datasharing_notify(); + } + + size_t locators_size() const + { + return locator_info_.locators_size(); + } + + bool active() const + { + return active_; + } + + void active( + bool active) + { + active_ = active; } private: @@ -438,6 +430,8 @@ class ReaderProxy SequenceNumber_t changes_low_mark_; + bool active_ = false; + using ChangeIterator = ResourceLimitedVector::iterator; using ChangeConstIterator = ResourceLimitedVector::const_iterator; @@ -447,11 +441,13 @@ class ReaderProxy * Converts all changes with a given status to a different status. * @param previous Status to change. * @param next Status to adopt. - * @return true when at least one change has been modified, false otherwise. + * @param func Function executed for each change which changes its status. + * @return the number of changes that have been modified. */ - bool convert_status_on_all_changes( + uint32_t convert_status_on_all_changes( ChangeForReaderStatus_t previous, - ChangeForReaderStatus_t next); + ChangeForReaderStatus_t next, + const std::function& func = {}); /*! * @brief Adds requested fragments. These fragments will be sent in next NackResponseDelay. @@ -464,7 +460,8 @@ class ReaderProxy const FragmentNumberSet_t& frag_set); void add_change( - const ChangeForReader_t& change); + const ChangeForReader_t& change, + bool is_relevant); /** * @brief Find a change with the specified sequence number. diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/StatefulPersistentWriter.h b/ThirdParty/ros/include/fastdds/rtps/writer/StatefulPersistentWriter.h index f2dc6c361..016ffdddd 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/StatefulPersistentWriter.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/StatefulPersistentWriter.h @@ -41,6 +41,7 @@ class StatefulPersistentWriter : public StatefulWriter, private PersistentWriter RTPSParticipantImpl*, const GUID_t& guid, const WriterAttributes& att, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); @@ -50,6 +51,7 @@ class StatefulPersistentWriter : public StatefulWriter, private PersistentWriter const GUID_t& guid, const WriterAttributes& att, const std::shared_ptr& payload_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); @@ -60,6 +62,7 @@ class StatefulPersistentWriter : public StatefulWriter, private PersistentWriter const WriterAttributes& att, const std::shared_ptr& payload_pool, const std::shared_ptr& change_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/StatefulWriter.h b/ThirdParty/ros/include/fastdds/rtps/writer/StatefulWriter.h index 42b1c0dbd..5bb64d4c4 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/StatefulWriter.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/StatefulWriter.h @@ -22,7 +22,7 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include -#include +#include #include #include #include @@ -57,6 +57,7 @@ class StatefulWriter : public RTPSWriter RTPSParticipantImpl* impl, const GUID_t& guid, const WriterAttributes& att, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -65,6 +66,7 @@ class StatefulWriter : public RTPSWriter const GUID_t& guid, const WriterAttributes& att, const std::shared_ptr& payload_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -74,6 +76,7 @@ class StatefulWriter : public RTPSWriter const WriterAttributes& att, const std::shared_ptr& payload_pool, const std::shared_ptr& change_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -106,8 +109,8 @@ class StatefulWriter : public RTPSWriter //!WriterTimes WriterTimes m_times; - //! Vector containing all the active ReaderProxies. - ResourceLimitedVector matched_readers_; + //! Vector containing all the remote ReaderProxies. + ResourceLimitedVector matched_remote_readers_; //! Vector containing all the inactive, ready for reuse, ReaderProxies. ResourceLimitedVector matched_readers_pool_; @@ -145,11 +148,6 @@ class StatefulWriter : public RTPSWriter bool change_removed_by_history( CacheChange_t* a_change) override; - /** - * Method to indicate that there are changes not sent in some of all ReaderProxy. - */ - void send_any_unsent_changes() override; - /** * Sends a change directly to a intraprocess reader. */ @@ -159,7 +157,16 @@ class StatefulWriter : public RTPSWriter bool intraprocess_gap( ReaderProxy* reader_proxy, - const SequenceNumber_t& seq_num); + const SequenceNumber_t& seq_num) + { + SequenceNumber_t last_seq = seq_num + 1; + return intraprocess_gap(reader_proxy, seq_num, last_seq); + } + + bool intraprocess_gap( + ReaderProxy* reader_proxy, + const SequenceNumber_t& first_seq, + const SequenceNumber_t& last_seq); bool intraprocess_heartbeat( ReaderProxy* reader_proxy, @@ -168,7 +175,7 @@ class StatefulWriter : public RTPSWriter //!Increment the HB count. inline void incrementHBCount() { - ++m_heartbeatCount; + on_heartbeat(++m_heartbeatCount); } /** @@ -204,7 +211,15 @@ class StatefulWriter : public RTPSWriter { // we cannot directly pass iterators neither const_iterators to matched_readers_ because then the functor would // be able to modify ReaderProxy elements - for ( const ReaderProxy* rp : matched_readers_ ) + for ( const ReaderProxy* rp : matched_local_readers_ ) + { + f(rp); + } + for ( const ReaderProxy* rp : matched_datasharing_readers_ ) + { + f(rp); + } + for ( const ReaderProxy* rp : matched_remote_readers_ ) { f(rp); } @@ -225,6 +240,11 @@ class StatefulWriter : public RTPSWriter const std::chrono::steady_clock::time_point& max_blocking_time_point, std::unique_lock& lock) override; + bool wait_for_acknowledgement( + const SequenceNumber_t& seq, + const std::chrono::steady_clock::time_point& max_blocking_time_point, + std::unique_lock& lock) override; + /** * Update the Attributes of the Writer. * @param att New attributes @@ -266,11 +286,14 @@ class StatefulWriter : public RTPSWriter inline size_t getMatchedReadersSize() const { std::lock_guard guard(mp_mutex); - return matched_readers_.size(); + return matched_remote_readers_.size() + + matched_local_readers_.size() + + matched_datasharing_readers_.size(); } /** * @brief Returns true if disable positive ACKs QoS is enabled + * * @return True if positive acks are disabled, false otherwise */ inline bool get_disable_positive_acks() const @@ -285,15 +308,14 @@ class StatefulWriter : public RTPSWriter void updateTimes( const WriterTimes& times); - void add_flow_controller( - std::unique_ptr controller) override; - SequenceNumber_t next_sequence_number() const; /** * @brief Sends a periodic heartbeat + * * @param final Final flag * @param liveliness Liveliness flag + * * @return True on success */ bool send_periodic_heartbeat( @@ -302,6 +324,7 @@ class StatefulWriter : public RTPSWriter /*! * @brief Sends a heartbeat to a remote reader. + * * @remarks This function is non thread-safe. */ void send_heartbeat_to_nts( @@ -353,25 +376,68 @@ class StatefulWriter : public RTPSWriter bool& result) override; /** - * @brief Set a reader data filter to filter data in ReaderProxies - * @param reader_data_filter The reader data filter + * @brief Set a content filter to perform content filtering on this writer. + * + * This method sets a content filter that will be used to check whether a cache change is relevant + * for a reader or not. + * + * @param filter The content filter to use on this writer. May be @c nullptr to remove the content filter + * (i.e. treat all samples as relevant). */ void reader_data_filter( - fastdds::rtps::IReaderDataFilter* reader_data_filter); + fastdds::rtps::IReaderDataFilter* filter) final; /** - * @brief Get the reader data filter used to filter data in ReaderProxies + * @brief Get the content filter used to perform content filtering on this writer. + * + * @return The content filter used on this writer. */ - const fastdds::rtps::IReaderDataFilter* reader_data_filter() const; + const fastdds::rtps::IReaderDataFilter* reader_data_filter() const final; + + /*! + * Tells writer the sample can be sent to the network. + * This function should be used by a fastdds::rtps::FlowController. + * + * @param cache_change Pointer to the CacheChange_t that represents the sample which can be sent. + * @param group RTPSMessageGroup reference uses for generating the RTPS message. + * @param locator_selector RTPSMessageSenderInterface reference uses for selecting locators. The reference has to + * be a member of this RTPSWriter object. + * @param max_blocking_time Future timepoint where blocking send should end. + * @return Return code. + * @note Must be non-thread safe. + */ + DeliveryRetCode deliver_sample_nts( + CacheChange_t* cache_change, + RTPSMessageGroup& group, + LocatorSelectorSender& locator_selector, + const std::chrono::time_point& max_blocking_time) override; + + LocatorSelectorSender& get_general_locator_selector() override + { + return locator_selector_general_; + } + + LocatorSelectorSender& get_async_locator_selector() override + { + return locator_selector_async_; + } private: + bool is_acked_by_all( + const SequenceNumber_t seq) const; + void update_reader_info( + LocatorSelectorSender& locator_selector, bool create_sender_resources); + void select_all_readers_nts( + RTPSMessageGroup& group, + LocatorSelectorSender& locator_selector); + void send_heartbeat_piggyback_nts_( - ReaderProxy* reader, RTPSMessageGroup& message_group, + LocatorSelectorSender& locator_selector, uint32_t& last_bytes_processed); void send_heartbeat_nts_( @@ -384,32 +450,34 @@ class StatefulWriter : public RTPSWriter /** * @brief A method called when the ack timer expires + * * @details Only used if disable positive ACKs QoS is enabled */ bool ack_timer_expired(); void send_heartbeat_to_all_readers(); - void send_changes_separatedly( - SequenceNumber_t max_sequence, - bool& activateHeartbeatPeriod); + void deliver_sample_to_intraprocesses( + CacheChange_t* change); - void send_all_intraprocess_changes( - SequenceNumber_t max_sequence); + void deliver_sample_to_datasharing( + CacheChange_t* change); - void send_all_unsent_changes( - SequenceNumber_t max_sequence, - bool& activateHeartbeatPeriod); + DeliveryRetCode deliver_sample_to_network( + CacheChange_t* change, + RTPSMessageGroup& group, + LocatorSelectorSender& locator_selector, + const std::chrono::time_point& max_blocking_time); - void send_unsent_changes_with_flow_control( - SequenceNumber_t max_sequence, - bool& activateHeartbeatPeriod); + void prepare_datasharing_delivery( + CacheChange_t* change); - bool send_hole_gaps_to_group( - RTPSMessageGroup& group); - - void select_all_readers_with_lowmark_below( - SequenceNumber_t seq, + /** + * Check the StatefulWriter's sequence numbers and add the required GAP messages to the provided message group. + * + * @param group Reference to the Message Group to which the GAP messages are to be added. + */ + void add_gaps_for_holes_in_history_( RTPSMessageGroup& group); //! True to disable piggyback heartbeats @@ -427,8 +495,6 @@ class StatefulWriter : public RTPSWriter int32_t currentUsageSendBufferSize_; - std::vector> m_controllers; - bool there_are_remote_readers_ = false; bool there_are_local_readers_ = false; @@ -437,6 +503,15 @@ class StatefulWriter : public RTPSWriter //! The filter for the reader fastdds::rtps::IReaderDataFilter* reader_data_filter_ = nullptr; + //! Vector containing all the active ReaderProxies for intraprocess delivery. + ResourceLimitedVector matched_local_readers_; + //! Vector containing all the active ReaderProxies for datasharing delivery. + ResourceLimitedVector matched_datasharing_readers_; + bool there_are_datasharing_readers_ = false; + + LocatorSelectorSender locator_selector_general_; + + LocatorSelectorSender locator_selector_async_; }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/StatelessPersistentWriter.h b/ThirdParty/ros/include/fastdds/rtps/writer/StatelessPersistentWriter.h index ceada17bf..c92536e0a 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/StatelessPersistentWriter.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/StatelessPersistentWriter.h @@ -41,6 +41,7 @@ class StatelessPersistentWriter : public StatelessWriter, private PersistentWrit RTPSParticipantImpl*, const GUID_t& guid, const WriterAttributes& att, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); @@ -50,6 +51,7 @@ class StatelessPersistentWriter : public StatelessWriter, private PersistentWrit const GUID_t& guid, const WriterAttributes& att, const std::shared_ptr& payload_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); @@ -60,6 +62,7 @@ class StatelessPersistentWriter : public StatelessWriter, private PersistentWrit const WriterAttributes& att, const std::shared_ptr& payload_pool, const std::shared_ptr& change_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr, IPersistenceService* persistence = nullptr); diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/StatelessWriter.h b/ThirdParty/ros/include/fastdds/rtps/writer/StatelessWriter.h index cb7182ceb..6ec5c1f1c 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/StatelessWriter.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/StatelessWriter.h @@ -23,13 +23,16 @@ #include #include #include +#include #include #include #include #include +#include #include #include +#include namespace eprosima { namespace fastrtps { @@ -50,6 +53,7 @@ class StatelessWriter : public RTPSWriter RTPSParticipantImpl* participant, const GUID_t& guid, const WriterAttributes& attributes, + fastdds::rtps::FlowController* flow_controller, WriterHistory* history, WriterListener* listener = nullptr); @@ -58,6 +62,7 @@ class StatelessWriter : public RTPSWriter const GUID_t& guid, const WriterAttributes& att, const std::shared_ptr& payload_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -67,6 +72,7 @@ class StatelessWriter : public RTPSWriter const WriterAttributes& att, const std::shared_ptr& payload_pool, const std::shared_ptr& change_pool, + fastdds::rtps::FlowController* flow_controller, WriterHistory* hist, WriterListener* listen = nullptr); @@ -116,9 +122,29 @@ class StatelessWriter : public RTPSWriter const GUID_t& reader_guid) override; /** - * Method to indicate that there are changes not sent in some of all ReaderProxy. + * @brief Set a content filter to perform content filtering on this writer. + * + * This method sets a content filter that will be used to check whether a cache change is relevant + * for a reader or not. + * + * @param filter The content filter to use on this writer. May be @c nullptr to remove the content filter + * (i.e. treat all samples as relevant). */ - void send_any_unsent_changes() override; + void reader_data_filter( + fastdds::rtps::IReaderDataFilter* filter) final + { + reader_data_filter_ = filter; + } + + /** + * @brief Get the content filter used to perform content filtering on this writer. + * + * @return The content filter used on this writer. + */ + const fastdds::rtps::IReaderDataFilter* reader_data_filter() const final + { + return reader_data_filter_; + } /** * Update the Attributes of the Writer. @@ -134,10 +160,6 @@ class StatelessWriter : public RTPSWriter bool set_fixed_locators( const LocatorList_t& locator_list); - void update_unsent_changes( - const SequenceNumber_t& seq_num, - const FragmentNumber_t& frag_num); - //!Reset the unsent changes. void unsent_changes_reset(); @@ -148,19 +170,64 @@ class StatelessWriter : public RTPSWriter const std::chrono::steady_clock::time_point&, std::unique_lock&) override; - void add_flow_controller( - std::unique_ptr controller) override; + bool wait_for_acknowledgement( + const SequenceNumber_t& seq, + const std::chrono::steady_clock::time_point& max_blocking_time_point, + std::unique_lock& lock) override; /** * Send a message through this interface. * * @param message Pointer to the buffer with the message already serialized. + * @param locator_selector RTPSMessageSenderInterface reference uses for selecting locators. The reference has to + * be a member of this RTPSWriter object. * @param max_blocking_time_point Future timepoint where blocking send should end. */ - bool send( + bool send_nts( CDRMessage_t* message, + const LocatorSelectorSender& locator_selector, std::chrono::steady_clock::time_point& max_blocking_time_point) const override; + /** + * Get the number of matched readers + * @return Number of the matched readers + */ + inline size_t getMatchedReadersSize() const + { + std::lock_guard guard(mp_mutex); + return matched_remote_readers_.size() + + matched_local_readers_.size() + + matched_datasharing_readers_.size(); + } + + /*! + * Tells writer the sample can be sent to the network. + * This function should be used by a fastdds::rtps::FlowController. + * + * @param cache_change Pointer to the CacheChange_t that represents the sample which can be sent. + * @param group RTPSMessageGroup reference uses for generating the RTPS message. + * @param locator_selector RTPSMessageSenderInterface reference uses for selecting locators. The reference has to + * be a member of this RTPSWriter object. + * @param max_blocking_time Future timepoint where blocking send should end. + * @return Return code. + * @note Must be non-thread safe. + */ + DeliveryRetCode deliver_sample_nts( + CacheChange_t* cache_change, + RTPSMessageGroup& group, + LocatorSelectorSender& locator_selector, + const std::chrono::time_point& max_blocking_time) override; + + LocatorSelectorSender& get_general_locator_selector() override + { + return locator_selector_; + } + + LocatorSelectorSender& get_async_locator_selector() override + { + return locator_selector_; + } + private: void init( @@ -174,26 +241,32 @@ class StatelessWriter : public RTPSWriter void update_reader_info( bool create_sender_resources); + bool datasharing_delivery( + CacheChange_t* change); + bool intraprocess_delivery( CacheChange_t* change, ReaderLocator& reader_locator); - void send_all_unsent_changes(); - - void send_unsent_changes_with_flow_control(); - bool is_inline_qos_expected_ = false; LocatorList_t fixed_locators_; - ResourceLimitedVector matched_readers_; + ResourceLimitedVector> matched_remote_readers_; + + std::condition_variable_any unsent_changes_cond_; + + uint64_t current_sequence_number_sent_ = 0; + + FragmentNumber_t current_fragment_sent_ = 0; + + uint64_t last_sequence_number_sent_ = 0; + + ResourceLimitedVector> matched_local_readers_; + ResourceLimitedVector> matched_datasharing_readers_; + ResourceLimitedVector> matched_readers_pool_; - ResourceLimitedVector late_joiner_guids_; - SequenceNumber_t first_seq_for_all_readers_; - bool ignore_fixed_locators_ = false; + LocatorSelectorSender locator_selector_; - ResourceLimitedVector unsent_changes_; - std::vector> flow_controllers_; - uint64_t last_intraprocess_sequence_number_; - bool there_are_remote_readers_ = false; + fastdds::rtps::IReaderDataFilter* reader_data_filter_ = nullptr; }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastdds/rtps/writer/WriterListener.h b/ThirdParty/ros/include/fastdds/rtps/writer/WriterListener.h index e642ad1f6..ededdc5cf 100644 --- a/ThirdParty/ros/include/fastdds/rtps/writer/WriterListener.h +++ b/ThirdParty/ros/include/fastdds/rtps/writer/WriterListener.h @@ -18,10 +18,13 @@ #ifndef _FASTDDS_RTPS_WRITERLISTENER_H_ #define _FASTDDS_RTPS_WRITERLISTENER_H_ -#include -#include +#include #include #include +#include +#include +#include +#include namespace eprosima { namespace fastrtps { @@ -51,8 +54,8 @@ class RTPS_DllAPI WriterListener RTPSWriter* writer, MatchingInfo& info) { - (void)writer; - (void)info; + static_cast(writer); + static_cast(info); } /** @@ -64,8 +67,8 @@ class RTPS_DllAPI WriterListener RTPSWriter* writer, const eprosima::fastdds::dds::PublicationMatchedStatus& info) { - (void)writer; - (void)info; + static_cast(writer); + static_cast(info); } /** @@ -79,8 +82,8 @@ class RTPS_DllAPI WriterListener RTPSWriter* writer, eprosima::fastdds::dds::PolicyMask qos) { - (void)writer; - (void)qos; + static_cast(writer); + static_cast(qos); } /** @@ -93,12 +96,13 @@ class RTPS_DllAPI WriterListener RTPSWriter* writer, CacheChange_t* change) { - (void)writer; - (void)change; + static_cast(writer); + static_cast(change); } /** - * @brief Method called when the livelivess of a writer is lost + * @brief Method called when the liveliness of a writer is lost + * * @param writer The writer * @param status The liveliness lost status */ @@ -106,13 +110,33 @@ class RTPS_DllAPI WriterListener RTPSWriter* writer, const LivelinessLostStatus& status) { - (void)writer; - (void)status; + static_cast(writer); + static_cast(status); + } + + /** + * @brief Method called when the discovery information of a reader regarding a writer changes. + * + * @param writer The writer. + * @param reason The reason motivating this method to be called. + * @param reader_guid The GUID of the reader for which the discovery information changed. + * @param reader_info Discovery information about the reader. Will be @c nullptr for reason @c REMOVED_READER. + */ + virtual void on_reader_discovery( + RTPSWriter* writer, + ReaderDiscoveryInfo::DISCOVERY_STATUS reason, + const GUID_t& reader_guid, + const ReaderProxyData* reader_info) + { + static_cast(writer); + static_cast(reason); + static_cast(reader_guid); + static_cast(reader_info); } }; -} /* namespace rtps */ +} /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ diff --git a/ThirdParty/ros/include/fastdds/statistics/IListeners.hpp b/ThirdParty/ros/include/fastdds/statistics/IListeners.hpp new file mode 100644 index 000000000..c3f5b829d --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/IListeners.hpp @@ -0,0 +1,44 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file IListeners.hpp + * + */ + +#ifndef _FASTDDS_STATISTICS_ILISTENERS_HPP_ +#define _FASTDDS_STATISTICS_ILISTENERS_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace statistics { + +class Data; +enum EventKind : uint32_t; + +struct IListener +{ + virtual ~IListener() = default; + + virtual void on_statistics_data( + const Data& statistics_data) = 0; +}; + +} // statistics +} // fastdds +} // eprosima + +#endif // _FASTDDS_STATISTICS_ILISTENERS_HPP_ diff --git a/ThirdParty/ros/include/fastdds/statistics/dds/domain/DomainParticipant.hpp b/ThirdParty/ros/include/fastdds/statistics/dds/domain/DomainParticipant.hpp new file mode 100644 index 000000000..306e20c3f --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/dds/domain/DomainParticipant.hpp @@ -0,0 +1,98 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file DomainParticipant.hpp + * + */ + +#ifndef _FASTDDS_STATISTICS_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_ +#define _FASTDDS_STATISTICS_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_ + +#include + +#include +#include +#include +#include + +using eprosima::fastrtps::types::ReturnCode_t; + +namespace eprosima { +namespace fastdds { +namespace statistics { +namespace dds { + +/** + * Class DomainParticipant: extends standard DDS DomainParticipant class to include specific methods for the Statistics + * module + * @ingroup STATISTICS_MODULE + */ +class DomainParticipant : public eprosima::fastdds::dds::DomainParticipant +{ + DomainParticipant() = delete; + +public: + + /** + * @brief This operation enables a Statistics DataWriter + * @param topic_name Name of the topic associated to the Statistics DataWriter + * @param dwqos DataWriterQos to be set + * @return RETCODE_UNSUPPORTED if the FASTDDS_STATISTICS CMake option has not been set, + * RETCODE_BAD_PARAMETER if the topic name provided does not correspond to any Statistics DataWriter, + * RETCODE_INCONSISTENT_POLICY if the DataWriterQos provided is inconsistent, + * RETCODE_OK if the DataWriter has been created or if it has been created previously, + * and RETCODE_ERROR otherwise + */ + RTPS_DllAPI ReturnCode_t enable_statistics_datawriter( + const std::string& topic_name, + const eprosima::fastdds::dds::DataWriterQos& dwqos); + + /** + * @brief This operation disables a Statistics DataWriter + * @param topic_name Name of the topic associated to the Statistics DataWriter + * @return RETCODE_UNSUPPORTED if the FASTDDS_STATISTICS CMake option has not been set, + * RETCODE_BAD_PARAMETER if the topic name provided does not correspond to any Statistics DataWriter, + * RETCODE_OK if the DataWriter has been correctly deleted or does not exist, + * and RETCODE_ERROR otherwise + */ + RTPS_DllAPI ReturnCode_t disable_statistics_datawriter( + const std::string& topic_name); + + /** + * @brief This operation narrows the DDS DomainParticipant to the Statistics DomainParticipant + * @param domain_participant Reference to the DDS DomainParticipant + * @return Reference to the Statistics DomainParticipant if successful. + * nullptr otherwise. + */ + RTPS_DllAPI static DomainParticipant* narrow( + eprosima::fastdds::dds::DomainParticipant* domain_participant); + + /** + * @brief This operation narrows the DDS DomainParticipant to the Statistics DomainParticipant + * @param domain_participant Constant reference to the DDS DomainParticipant + * @return Constant reference to the Statistics DomainParticipant if successful. + * nullptr otherwise. + */ + RTPS_DllAPI static const DomainParticipant* narrow( + const eprosima::fastdds::dds::DomainParticipant* domain_participant); + +}; + +} // namespace dds +} // namespace statistics +} // namespace fastdds +} // namespace eprosima + +#endif /* _FASTDDS_STATISTICS_DDS_DOMAIN_DOMAINPARTICIPANT_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/statistics/dds/publisher/qos/DataWriterQos.hpp b/ThirdParty/ros/include/fastdds/statistics/dds/publisher/qos/DataWriterQos.hpp new file mode 100644 index 000000000..2e286b326 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/dds/publisher/qos/DataWriterQos.hpp @@ -0,0 +1,53 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file DataWriterQos.hpp + */ + +#ifndef _FASTDDS_STATISTICS_DDS_PUBLISHER_QOS_DATAWRITERQOS_HPP_ +#define _FASTDDS_STATISTICS_DDS_PUBLISHER_QOS_DATAWRITERQOS_HPP_ + +#include +#include + +namespace eprosima { +namespace fastdds { +namespace statistics { +namespace dds { + +/** + * Class DataWriterQos: extends standard DDS DataWriterQos class to include specific default constructor for the + * recommended DataWriterQos profile. + * @ingroup STATISTICS_MODULE + */ +class DataWriterQos : public eprosima::fastdds::dds::DataWriterQos +{ +public: + + /** + * @brief Constructor + */ + RTPS_DllAPI DataWriterQos(); +}; + +//! Constant to access default Statistics DataWriter Qos +const eprosima::fastdds::statistics::dds::DataWriterQos STATISTICS_DATAWRITER_QOS; + +} // dds +} // statistics +} // fastdds +} // eprosima + +#endif /* _FASTDDS_STATISTICS_DDS_PUBLISHER_QOS_DATAWRITERQOS_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/statistics/dds/subscriber/qos/DataReaderQos.hpp b/ThirdParty/ros/include/fastdds/statistics/dds/subscriber/qos/DataReaderQos.hpp new file mode 100644 index 000000000..cbdf8700f --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/dds/subscriber/qos/DataReaderQos.hpp @@ -0,0 +1,52 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file DataReaderQos.hpp + */ + +#ifndef _FASTDDS_STATISTICS_DDS_SUBSCRIBER_QOS_DATAREADERQOS_HPP_ +#define _FASTDDS_STATISTICS_DDS_SUBSCRIBER_QOS_DATAREADERQOS_HPP_ + +#include + +namespace eprosima { +namespace fastdds { +namespace statistics { +namespace dds { + +/** + * Class DataReaderQos: extends standard DDS DataReaderQos class to include specific default constructor for the + * recommended DataReaderQos profile. + * @ingroup STATISTICS_MODULE + */ +class DataReaderQos : public eprosima::fastdds::dds::DataReaderQos +{ +public: + + /** + * @brief Constructor + */ + RTPS_DllAPI DataReaderQos(); +}; + +//! Constant to access default Statistics DataReader Qos +const eprosima::fastdds::statistics::dds::DataReaderQos STATISTICS_DATAREADER_QOS; + +} // dds +} // statistics +} // fastdds +} // eprosima + +#endif /* _FASTDDS_STATISTICS_DDS_SUBSCRIBER_QOS_DATAREADERQOS_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/statistics/rtps/StatisticsCommon.hpp b/ThirdParty/ros/include/fastdds/statistics/rtps/StatisticsCommon.hpp new file mode 100644 index 000000000..5c2699991 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/rtps/StatisticsCommon.hpp @@ -0,0 +1,382 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file StatisticsCommon.hpp + */ + +#ifndef _FASTDDS_STATISTICS_RTPS_STATISTICSCOMMON_HPP_ +#define _FASTDDS_STATISTICS_RTPS_STATISTICSCOMMON_HPP_ + +#include +#include + +#include +#include +#include +#include +#include + + +namespace eprosima { + +namespace fastrtps { +namespace rtps { + +class RTPSMessageGroup; + +} // rtps +} // fastrtps + +namespace fastdds { +namespace statistics { + +#ifdef FASTDDS_STATISTICS + +// Members are private details +struct StatisticsAncillary; + +class StatisticsListenersImpl +{ + std::unique_ptr members_; + +protected: + + /** + * Create a class A auxiliary structure + * @return true if successfully created + */ + template + void init_statistics() + { + static_assert( + std::is_base_of::value, + "Auxiliary structure must derive from StatisticsAncillary"); + + if (!members_) + { + members_.reset(new A); + } + } + + /** + * Returns the auxiliary members + * @return The specialized auxiliary structure for each class + */ + StatisticsAncillary* get_aux_members() const; + + /** + * Add a listener to receive statistics backend callbacks + * @param listener + * @return true if successfully added + */ + bool add_statistics_listener_impl( + std::shared_ptr listener); + + /** + * Remove a listener from receiving statistics backend callbacks + * @param listener + * @return true if successfully removed + */ + bool remove_statistics_listener_impl( + std::shared_ptr listener); + + /** + * Lambda function to traverse the listener collection + * @param f function object to apply to each listener + * @return function object after being applied to each listener + */ + template + Function for_each_listener( + Function f); + + /** + * Retrieve endpoint mutexes from derived class + * @return defaults to the endpoint mutex + */ + virtual fastrtps::RecursiveTimedMutex& get_statistics_mutex() = 0; + + /** + * Retrieve the GUID_t from derived class + * @return endpoint GUID_t + */ + virtual const fastrtps::rtps::GUID_t& get_guid() const = 0; +}; + +// Members are private details +struct StatisticsWriterAncillary; + +class StatisticsWriterImpl + : protected StatisticsListenersImpl +{ + + /** + * Create the auxiliary structure + * @return nullptr on failure + */ + StatisticsWriterAncillary* get_members() const; + + /** + * Retrieve endpoint mutexes from derived class + * @return defaults to the endpoint mutex + */ + fastrtps::RecursiveTimedMutex& get_statistics_mutex() final; + + /** + * Retrieve the GUID_t from derived class + * @return endpoint GUID_t + */ + const fastrtps::rtps::GUID_t& get_guid() const final; + +protected: + + /** + * Constructor. Mandatory member initialization. + */ + StatisticsWriterImpl(); + + // TODO: methods for listeners callbacks + + /** + * @brief Report a change on the number of DATA / DATAFRAG submessages sent for a specific sample. + * @param sample_identity SampleIdentity of the affected sample. + * @param num_sent_submessages Current total number of submessages sent for the affected sample. + */ + void on_sample_datas( + const fastrtps::rtps::SampleIdentity& sample_identity, + size_t num_sent_submessages); + + /** + * @brief Report that a HEARTBEAT message is sent + * @param current count of heartbeats + */ + void on_heartbeat( + uint32_t count); + + /** + * @brief Report that a DATA / DATA_FRAG message is generated + * @param num_destinations number of locators to which the message will be sent + */ + void on_data_generated( + size_t num_destinations); + + /// Notify listeners of DATA / DATA_FRAG counts + void on_data_sent(); + + /** + * @brief Reports publication throughtput based on last added sample to writer's history + * @param payload size of the message sent + */ + void on_publish_throughput( + uint32_t payload); + + /// Report that a GAP message is sent + void on_gap(); + + /* + * @brief Report that several changes are marked for redelivery + * @param number of changes to redeliver + */ + void on_resent_data( + uint32_t to_send); +}; + +// Members are private details +struct StatisticsReaderAncillary; + +class StatisticsReaderImpl + : protected StatisticsListenersImpl +{ + friend class fastrtps::rtps::RTPSMessageGroup; + + /** + * Create the auxiliary structure + * @return nullptr on failure + */ + StatisticsReaderAncillary* get_members() const; + + /** + * Retrieve endpoint mutexes from derived class + * @return defaults to the endpoint mutex + */ + fastrtps::RecursiveTimedMutex& get_statistics_mutex() final; + + /** + * Retrieve the GUID_t from derived class + * @return endpoint GUID_t + */ + const fastrtps::rtps::GUID_t& get_guid() const final; + +protected: + + /** + * Constructor. Mandatory member initialization. + */ + StatisticsReaderImpl(); + + // TODO: methods for listeners callbacks + + /** + * @brief Report that a sample has been notified to the user. + * @param writer_guid GUID of the writer from where the sample was received. + * @param source_timestamp Source timestamp received from the writer for the sample being notified. + */ + void on_data_notify( + const fastrtps::rtps::GUID_t& writer_guid, + const fastrtps::rtps::Time_t& source_timestamp); + + /** + * @brief Report that an ACKNACK message is sent + * @param count current count of ACKNACKs + */ + void on_acknack( + int32_t count); + + /** + * @brief Report that a NACKFRAG message is sent + * @param count current count of NACKFRAGs + */ + void on_nackfrag( + int32_t count); + + /** + * @brief Reports subscription throughtput based on last added sample to reader's history + * @param payload size of the message received + */ + void on_subscribe_throughput( + uint32_t payload); +}; + +#else // when FASTDDS_STATISTICS is not defined a dummy implementation is used + +class StatisticsWriterImpl +{ +protected: + + // TODO: methods for listeners callbacks + + /** + * @brief Report a change on the number of DATA / DATAFRAG submessages sent for a specific sample. + * Parameter: SampleIdentity of the affected sample. + * Parameter: Current total number of submessages sent for the affected sample. + */ + inline void on_sample_datas( + const fastrtps::rtps::SampleIdentity&, + size_t) + { + } + + /** + * @brief Report that a HEARTBEAT message is sent + * Parameter: current count of heartbeats + */ + inline void on_heartbeat( + uint32_t) + { + } + + /** + * @brief Report that a DATA / DATA_FRAG message is generated + * Parameter: number of locators to which the message will be sent + */ + inline void on_data_generated( + size_t) + { + } + + /// Notify listeners of DATA / DATA_FRAG counts + inline void on_data_sent() + { + } + + /** + * @brief Reports publication throughtput based on last added sample to writer's history + * Parameter: size of the message sent + */ + inline void on_publish_throughput( + uint32_t) + { + } + + /// Report that a GAP message is sent + inline void on_gap() + { + } + + /* + * @brief Report that several changes are marked for redelivery + * Parameter: number of changes to redeliver + */ + inline void on_resent_data( + uint32_t) + { + } + +}; + +class StatisticsReaderImpl +{ + friend class fastrtps::rtps::RTPSMessageGroup; + +protected: + + // TODO: methods for listeners callbacks + + /** + * @brief Report that a sample has been notified to the user. + * Parameter: GUID of the writer from where the sample was received. + * Parameter: Source timestamp received from the writer for the sample being notified. + */ + inline void on_data_notify( + const fastrtps::rtps::GUID_t&, + const fastrtps::rtps::Time_t&) + { + } + + /** + * @brief Report that an ACKNACK message is sent + * Parameter: current count of ACKNACKs + */ + inline void on_acknack( + int32_t) + { + } + + /** + * @brief Report that a NACKFRAG message is sent + * Parameter: current count of NACKFRAGs + */ + inline void on_nackfrag( + int32_t) + { + } + + /** + * @brief Reports subscription throughtput based on last added sample to reader's history + * Parameter: size of the message received + */ + inline void on_subscribe_throughput( + uint32_t) + { + } + +}; + +#endif // FASTDDS_STATISTICS + +} // namespace statistics +} // namespace fastdds +} // namespace eprosima + +#endif // _FASTDDS_STATISTICS_RTPS_STATISTICSCOMMON_HPP_ diff --git a/ThirdParty/ros/include/fastdds/statistics/topic_names.hpp b/ThirdParty/ros/include/fastdds/statistics/topic_names.hpp new file mode 100644 index 000000000..801b04029 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/topic_names.hpp @@ -0,0 +1,67 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file topic_names.hpp + */ + +#ifndef _FASTDDS_STATISTICS_TOPIC_NAMES_HPP_ +#define _FASTDDS_STATISTICS_TOPIC_NAMES_HPP_ + +namespace eprosima { +namespace fastdds { +namespace statistics { + +//! Statistic topic that reports the write-to-notification latency between any two pairs of matched +//! DataWriter-DataReader histories +constexpr const char* HISTORY_LATENCY_TOPIC = "_fastdds_statistics_history2history_latency"; +//! Statistics topic that reports the network latency (message group to message receiver) between any two communicating +//! locators +constexpr const char* NETWORK_LATENCY_TOPIC = "_fastdds_statistics_network_latency"; +//! Statistic topic that reports the publication's throughput (amount of data sent) for every DataWriter +constexpr const char* PUBLICATION_THROUGHPUT_TOPIC = "_fastdds_statistics_publication_throughput"; +//! Statistics topic that reports the subscription's throughput (amount of data received) for every DataReader +constexpr const char* SUBSCRIPTION_THROUGHPUT_TOPIC = "_fastdds_statistics_subscription_throughput"; +//! Statistics topic that reports the number of RTPS packets and bytes sent to each locator +constexpr const char* RTPS_SENT_TOPIC = "_fastdds_statistics_rtps_sent"; +//! Statistics topic that reports the number of RTPS packets and bytes that have been lost in the network +constexpr const char* RTPS_LOST_TOPIC = "_fastdds_statistics_rtps_lost"; +//! Statistics topic that reports the number of DATA/DATAFRAG sub-messages resent +constexpr const char* RESENT_DATAS_TOPIC = "_fastdds_statistics_resent_datas"; +//! Statistics topic that reports the number of HEARTBEATs that each non discovery DataWriter sends +constexpr const char* HEARTBEAT_COUNT_TOPIC = "_fastdds_statistics_heartbeat_count"; +//! Statistics topic that reports the number of ACKNACKs that each non discovery DataReader sends +constexpr const char* ACKNACK_COUNT_TOPIC = "_fastdds_statistics_acknack_count"; +//! Statistics topic that reports the number of NACKFRAGs that each non discovery DataReader sends +constexpr const char* NACKFRAG_COUNT_TOPIC = "_fastdds_statistics_nackfrag_count"; +//! Statistics topic that reports the number of GAPs that each non discovery DataWriter sends +constexpr const char* GAP_COUNT_TOPIC = "_fastdds_statistics_gap_count"; +//! Statistics topic that reports the number of DATA/DATAFRAG sub-messages that each non discovery DataWriter sends +constexpr const char* DATA_COUNT_TOPIC = "_fastdds_statistics_data_count"; +//! Statistics topic that reports the number of PDP discovery traffic RTPS packets transmitted by each DDS participant +constexpr const char* PDP_PACKETS_TOPIC = "_fastdds_statistics_pdp_packets"; +//! Statistics topic that reports the number of EDP discovery traffic RTPS packets transmitted by each DDS participant +constexpr const char* EDP_PACKETS_TOPIC = "_fastdds_statistics_edp_packets"; +//! Statistics topic that reports when new entities are discovered +constexpr const char* DISCOVERY_TOPIC = "_fastdds_statistics_discovered_entity"; +//! Statistics topic that reports the number of DATA/DATAFRAG sub-messages needed to send a single sample +constexpr const char* SAMPLE_DATAS_TOPIC = "_fastdds_statistics_sample_datas"; +//! Statistics topic that reports the host, user and process where the module is running +constexpr const char* PHYSICAL_DATA_TOPIC = "_fastdds_statistics_physical_data"; + +} // statistics +} // fastdds +} // eprosima + +#endif /* _FASTDDS_STATISTICS_TOPIC_NAMES_HPP_ */ diff --git a/ThirdParty/ros/include/fastdds/statistics/types.idl b/ThirdParty/ros/include/fastdds/statistics/types.idl new file mode 100644 index 000000000..907a62d25 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/statistics/types.idl @@ -0,0 +1,175 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file include/fastdds/statistics/types.idl + */ + +module eprosima { +module fastdds { +module statistics { + + module detail + { + + struct EntityId_s + { + octet value[4]; + }; + + struct GuidPrefix_s + { + octet value[12]; + }; + + struct GUID_s + { + GuidPrefix_s guidPrefix; + EntityId_s entityId; + }; + + struct SequenceNumber_s + { + long high; + unsigned long low; + }; + + struct SampleIdentity_s + { + GUID_s writer_guid; + SequenceNumber_s sequence_number; + }; + + struct Locator_s + { + long kind; + unsigned long port; + octet address[16]; + }; + + }; // namespace detail + +struct DiscoveryTime +{ + @Key detail::GUID_s local_participant_guid; + @Key detail::GUID_s remote_entity_guid; + unsigned long long time; + string host; + string user; + string process; +}; + +struct EntityCount +{ + @Key detail::GUID_s guid; + unsigned long long count; +}; + +struct SampleIdentityCount +{ + @Key detail::SampleIdentity_s sample_id; + unsigned long long count; +}; + +struct Entity2LocatorTraffic +{ + @Key detail::GUID_s src_guid; + @Key detail::Locator_s dst_locator; + unsigned long long packet_count; + unsigned long long byte_count; + short byte_magnitude_order; +}; + +struct WriterReaderData +{ + @Key detail::GUID_s writer_guid; + @Key detail::GUID_s reader_guid; + float data; +}; + +struct Locator2LocatorData +{ + @Key detail::Locator_s src_locator; + @Key detail::Locator_s dst_locator; + float data; +}; + +struct EntityData +{ + @Key detail::GUID_s guid; + float data; +}; + +struct PhysicalData +{ + @Key detail::GUID_s participant_guid; + string host; + string user; + string process; +}; + +@bit_bound(32) +bitmask EventKind +{ + @position(0) HISTORY2HISTORY_LATENCY, + @position(1) NETWORK_LATENCY, + @position(2) PUBLICATION_THROUGHPUT, + @position(3) SUBSCRIPTION_THROUGHPUT, + @position(4) RTPS_SENT, + @position(5) RTPS_LOST, + @position(6) RESENT_DATAS, + @position(7) HEARTBEAT_COUNT, + @position(8) ACKNACK_COUNT, + @position(9) NACKFRAG_COUNT, + @position(10) GAP_COUNT, + @position(11) DATA_COUNT, + @position(12) PDP_PACKETS, + @position(13) EDP_PACKETS, + @position(14) DISCOVERED_ENTITY, + @position(15) SAMPLE_DATAS, + @position(16) PHYSICAL_DATA +}; + +union Data switch(EventKind) +{ + case HISTORY2HISTORY_LATENCY: + WriterReaderData writer_reader_data; + case NETWORK_LATENCY: + Locator2LocatorData locator2locator_data; + case PUBLICATION_THROUGHPUT: + case SUBSCRIPTION_THROUGHPUT: + EntityData entity_data; + case RTPS_SENT: + case RTPS_LOST: + Entity2LocatorTraffic entity2locator_traffic; + case RESENT_DATAS: + case HEARTBEAT_COUNT: + case ACKNACK_COUNT: + case NACKFRAG_COUNT: + case GAP_COUNT: + case DATA_COUNT: + case PDP_PACKETS: + case EDP_PACKETS: + EntityCount entity_count; + case DISCOVERED_ENTITY: + DiscoveryTime discovery_time; + case SAMPLE_DATAS: + SampleIdentityCount sample_identity_count; + case PHYSICAL_DATA: + PhysicalData physical_data; +}; + +}; // namespace statistics +}; // namespace fastdds +}; // namespace eprosima diff --git a/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser.hpp b/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser.hpp new file mode 100644 index 000000000..537bff610 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser.hpp @@ -0,0 +1,42 @@ +// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @file optionparser.hpp + * + */ + +#ifndef FASTDDS_OPTIONPARSER_HPP_ +#define FASTDDS_OPTIONPARSER_HPP_ + +namespace eprosima { + +#ifdef OPTIONPARSER_H_ +#define NESTED_OPTIONPARSER_H_INCLUDED_ +// allow including again the header because is in another namespace +#undef OPTIONPARSER_H_ +#endif + +#include "./optionparser/optionparser.h" + +#ifndef NESTED_OPTIONPARSER_H_INCLUDED_ +// restore original state +#undef OPTIONPARSER_H_ +#else +#undef NESTED_OPTIONPARSER_H_INCLUDED_ +#endif + +} // namespace eprosima + +#endif // FASTDDS_OPTIONPARSER_HPP_ diff --git a/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser/optionparser.h b/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser/optionparser.h new file mode 100644 index 000000000..23149e787 --- /dev/null +++ b/ThirdParty/ros/include/fastdds/thirdparty/optionparser/optionparser/optionparser.h @@ -0,0 +1,2867 @@ +/* + * The Lean Mean C++ Option Parser + * + * Copyright (C) 2012-2017 Matthias S. Benkmann + * + * The "Software" in the following 2 paragraphs refers to this file containing + * the code to The Lean Mean C++ Option Parser. + * The "Software" does NOT refer to any other files which you + * may have received alongside this file (e.g. as part of a larger project that + * incorporates The Lean Mean C++ Option Parser). + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software, to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to permit + * persons to whom the Software is furnished to do so, subject to the following + * conditions: + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * NOTE: It is recommended that you read the processed HTML doxygen documentation + * rather than this source. If you don't know doxygen, it's like javadoc for C++. + * If you don't want to install doxygen you can find a copy of the processed + * documentation at + * + * http://optionparser.sourceforge.net/ + * + */ + +/** + * @file + * + * @brief This is the only file required to use The Lean Mean C++ Option Parser. + * Just \#include it and you're set. + * + * The Lean Mean C++ Option Parser handles the program's command line arguments + * (argc, argv). + * It supports the short and long option formats of getopt(), getopt_long() + * and getopt_long_only() but has a more convenient interface. + * + * @par Feedback: + * Send questions, bug reports, feature requests etc. to: optionparser-feedback(a)lists.sourceforge.net + * + * @par Highlights: + *
    + *
  • It is a header-only library. Just \#include "optionparser.h" and you're set. + *
  • It is freestanding. There are no dependencies whatsoever, not even the + * C or C++ standard library. + *
  • It has a usage message formatter that supports column alignment and + * line wrapping. This aids localization because it adapts to + * translated strings that are shorter or longer (even if they contain + * Asian wide characters). + *
  • Unlike getopt() and derivatives it doesn't force you to loop through + * options sequentially. Instead you can access options directly like this: + *
      + *
    • Test for presence of a switch in the argument vector: + * @code if ( options[QUIET] ) ... @endcode + *
    • Evaluate --enable-foo/--disable-foo pair where the last one used wins: + * @code if ( options[FOO].last()->type() == DISABLE ) ... @endcode + *
    • Cumulative option (-v verbose, -vv more verbose, -vvv even more verbose): + * @code int verbosity = options[VERBOSE].count(); @endcode + *
    • Iterate over all --file=<fname> arguments: + * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) + * fname = opt->arg; ... @endcode + *
    • If you really want to, you can still process all arguments in order: + * @code + * for (int i = 0; i < p.optionsCount(); ++i) { + * Option& opt = buffer[i]; + * switch(opt.index()) { + * case HELP: ... + * case VERBOSE: ... + * case FILE: fname = opt.arg; ... + * case UNKNOWN: ... + * @endcode + *
    + *
@n + * Despite these features the code size remains tiny. + * It is smaller than uClibc's GNU getopt() and just a + * couple 100 bytes larger than uClibc's SUSv3 getopt(). @n + * (This does not include the usage formatter, of course. But you don't have to use that.) + * + * @par Download: + * Tarball with examples and test programs: + * optionparser-1.7.tar.gz @n + * Just the header (this is all you really need): + * optionparser.h + * + * @par Changelog: + * Version 1.7: Work on const-correctness. @n + * Version 1.6: Fix for MSC compiler. @n + * Version 1.5: Fixed 2 warnings about potentially uninitialized variables. @n + * Added const version of Option::next(). @n + * Version 1.4: Fixed 2 printUsage() bugs that messed up output with small COLUMNS values. @n + * Version 1.3: Compatible with Microsoft Visual C++. @n + * Version 1.2: Added @ref option::Option::namelen "Option::namelen" and removed the extraction + * of short option characters into a special buffer. @n + * Changed @ref option::Arg::Optional "Arg::Optional" to accept arguments if they are attached + * rather than separate. This is what GNU getopt() does and how POSIX recommends + * utilities should interpret their arguments.@n + * Version 1.1: Optional mode with argument reordering as done by GNU getopt(), so that + * options and non-options can be mixed. See + * @ref option::Parser::parse() "Parser::parse()". + * + * + * @par Example program: + * (Note: @c option::* identifiers are links that take you to their documentation.) + * @code + * #error EXAMPLE SHORTENED FOR READABILITY. BETTER EXAMPLES ARE IN THE .TAR.GZ! + * #include + * #include "optionparser.h" + * + * enum optionIndex { UNKNOWN, HELP, PLUS }; + * const option::Descriptor usage[] = + * { + * {UNKNOWN, 0,"" , "" ,option::Arg::None, "USAGE: example [options]\n\n" + * "Options:" }, + * {HELP, 0,"" , "help",option::Arg::None, " --help \tPrint usage and exit." }, + * {PLUS, 0,"p", "plus",option::Arg::None, " --plus, -p \tIncrement count." }, + * {UNKNOWN, 0,"" , "" ,option::Arg::None, "\nExamples:\n" + * " example --unknown -- --this_is_no_option\n" + * " example -unk --plus -ppp file1 file2\n" }, + * {0,0,0,0,0,0} + * }; + * + * int main(int argc, char* argv[]) + * { + * argc-=(argc>0); argv+=(argc>0); // skip program name argv[0] if present + * option::Stats stats(usage, argc, argv); + * option::Option options[stats.options_max], buffer[stats.buffer_max]; + * option::Parser parse(usage, argc, argv, options, buffer); + * + * if (parse.error()) + * return 1; + * + * if (options[HELP] || argc == 0) { + * option::printUsage(std::cout, usage); + * return 0; + * } + * + * std::cout << "--plus count: " << + * options[PLUS].count() << "\n"; + * + * for (option::Option* opt = options[UNKNOWN]; opt; opt = opt->next()) + * std::cout << "Unknown option: " << opt->name << "\n"; + * + * for (int i = 0; i < parse.nonOptionsCount(); ++i) + * std::cout << "Non-option #" << i << ": " << parse.nonOption(i) << "\n"; + * } + * @endcode + * + * @par Option syntax: + * @li The Lean Mean C++ Option Parser follows POSIX getopt() conventions and supports + * GNU-style getopt_long() long options as well as Perl-style single-minus + * long options (getopt_long_only()). + * @li short options have the format @c -X where @c X is any character that fits in a char. + * @li short options can be grouped, i.e. -X -Y is equivalent to @c -XY. + * @li a short option may take an argument either separate (-X foo) or + * attached (@c -Xfoo). You can make the parser accept the additional format @c -X=foo by + * registering @c X as a long option (in addition to being a short option) and + * enabling single-minus long options. + * @li an argument-taking short option may be grouped if it is the last in the group, e.g. + * @c -ABCXfoo or -ABCX foo (@c foo is the argument to the @c -X option). + * @li a lone minus character @c '-' is not treated as an option. It is customarily used where + * a file name is expected to refer to stdin or stdout. + * @li long options have the format @c --option-name. + * @li the option-name of a long option can be anything and include any characters. + * Even @c = characters will work, but don't do that. + * @li [optional] long options may be abbreviated as long as the abbreviation is unambiguous. + * You can set a minimum length for abbreviations. + * @li [optional] long options may begin with a single minus. The double minus form is always + * accepted, too. + * @li a long option may take an argument either separate ( --option arg ) or + * attached ( --option=arg ). In the attached form the equals sign is mandatory. + * @li an empty string can be passed as an attached long option argument: --option-name= . + * Note the distinction between an empty string as argument and no argument at all. + * @li an empty string is permitted as separate argument to both long and short options. + * @li Arguments to both short and long options may start with a @c '-' character. E.g. + * -X-X , -X -X or --long-X=-X . If @c -X + * and @c --long-X take an argument, that argument will be @c "-X" in all 3 cases. + * @li If using the built-in @ref option::Arg::Optional "Arg::Optional", optional arguments must + * be attached. + * @li the special option @c -- (i.e. without a name) terminates the list of + * options. Everything that follows is a non-option argument, even if it starts with + * a @c '-' character. The @c -- itself will not appear in the parse results. + * @li the first argument that doesn't start with @c '-' or @c '--' and does not belong to + * a preceding argument-taking option, will terminate the option list and is the + * first non-option argument. All following command line arguments are treated as + * non-option arguments, even if they start with @c '-' . @n + * NOTE: This behaviour is mandated by POSIX, but GNU getopt() only honours this if it is + * explicitly requested (e.g. by setting POSIXLY_CORRECT). @n + * You can enable the GNU behaviour by passing @c true as first argument to + * e.g. @ref option::Parser::parse() "Parser::parse()". + * @li Arguments that look like options (i.e. @c '-' followed by at least 1 character) but + * aren't, are NOT treated as non-option arguments. They are treated as unknown options and + * are collected into a list of unknown options for error reporting. @n + * This means that in order to pass a first non-option + * argument beginning with the minus character it is required to use the + * @c -- special option, e.g. + * @code + * program -x -- --strange-filename + * @endcode + * In this example, @c --strange-filename is a non-option argument. If the @c -- + * were omitted, it would be treated as an unknown option. @n + * See @ref option::Descriptor::longopt for information on how to collect unknown options. + * + */ + +#ifndef OPTIONPARSER_H_ +#define OPTIONPARSER_H_ + +#ifdef _MSC_VER +#include +#pragma intrinsic(_BitScanReverse) +#endif + +/** @brief The namespace of The Lean Mean C++ Option Parser. */ +namespace option +{ + +#ifdef _MSC_VER +struct MSC_Builtin_CLZ +{ + static int builtin_clz(unsigned x) + { + unsigned long index; + _BitScanReverse(&index, x); + return 32-index; // int is always 32bit on Windows, even for target x64 + } +}; +#define __builtin_clz(x) MSC_Builtin_CLZ::builtin_clz(x) +#endif + +class Option; + +/** + * @brief Possible results when checking if an argument is valid for a certain option. + * + * In the case that no argument is provided for an option that takes an + * optional argument, return codes @c ARG_OK and @c ARG_IGNORE are equivalent. + */ +enum ArgStatus +{ + //! The option does not take an argument. + ARG_NONE, + //! The argument is acceptable for the option. + ARG_OK, + //! The argument is not acceptable but that's non-fatal because the option's argument is optional. + ARG_IGNORE, + //! The argument is not acceptable and that's fatal. + ARG_ILLEGAL +}; + +/** + * @brief Signature of functions that check if an argument is valid for a certain type of option. + * + * Every Option has such a function assigned in its Descriptor. + * @code + * Descriptor usage[] = { {UNKNOWN, 0, "", "", Arg::None, ""}, ... }; + * @endcode + * + * A CheckArg function has the following signature: + * @code ArgStatus CheckArg(const Option& option, bool msg); @endcode + * + * It is used to check if a potential argument would be acceptable for the option. + * It will even be called if there is no argument. In that case @c option.arg will be @c NULL. + * + * If @c msg is @c true and the function determines that an argument is not acceptable and + * that this is a fatal error, it should output a message to the user before + * returning @ref ARG_ILLEGAL. If @c msg is @c false the function should remain silent (or you + * will get duplicate messages). + * + * See @ref ArgStatus for the meaning of the return values. + * + * While you can provide your own functions, + * often the following pre-defined checks (which never return @ref ARG_ILLEGAL) will suffice: + * + * @li @c Arg::None @copybrief Arg::None + * @li @c Arg::Optional @copybrief Arg::Optional + * + */ +typedef ArgStatus (*CheckArg)(const Option& option, bool msg); + +/** + * @brief Describes an option, its help text (usage) and how it should be parsed. + * + * The main input when constructing an option::Parser is an array of Descriptors. + + * @par Example: + * @code + * enum OptionIndex {CREATE, ...}; + * enum OptionType {DISABLE, ENABLE, OTHER}; + * + * const option::Descriptor usage[] = { + * { CREATE, // index + * OTHER, // type + * "c", // shortopt + * "create", // longopt + * Arg::None, // check_arg + * "--create Tells the program to create something." // help + * } + * , ... + * }; + * @endcode + */ +struct Descriptor +{ + /** + * @brief Index of this option's linked list in the array filled in by the parser. + * + * Command line options whose Descriptors have the same index will end up in the same + * linked list in the order in which they appear on the command line. If you have + * multiple long option aliases that refer to the same option, give their descriptors + * the same @c index. + * + * If you have options that mean exactly opposite things + * (e.g. @c --enable-foo and @c --disable-foo ), you should also give them the same + * @c index, but distinguish them through different values for @ref type. + * That way they end up in the same list and you can just take the last element of the + * list and use its type. This way you get the usual behaviour where switches later + * on the command line override earlier ones without having to code it manually. + * + * @par Tip: + * Use an enum rather than plain ints for better readability, as shown in the example + * at Descriptor. + */ + const unsigned index; + + /** + * @brief Used to distinguish between options with the same @ref index. + * See @ref index for details. + * + * It is recommended that you use an enum rather than a plain int to make your + * code more readable. + */ + const int type; + + /** + * @brief Each char in this string will be accepted as a short option character. + * + * The string must not include the minus character @c '-' or you'll get undefined + * behaviour. + * + * If this Descriptor should not have short option characters, use the empty + * string "". NULL is not permitted here! + * + * See @ref longopt for more information. + */ + const char* const shortopt; + + /** + * @brief The long option name (without the leading @c -- ). + * + * If this Descriptor should not have a long option name, use the empty + * string "". NULL is not permitted here! + * + * While @ref shortopt allows multiple short option characters, each + * Descriptor can have only a single long option name. If you have multiple + * long option names referring to the same option use separate Descriptors + * that have the same @ref index and @ref type. You may repeat + * short option characters in such an alias Descriptor but there's no need to. + * + * @par Dummy Descriptors: + * You can use dummy Descriptors with an + * empty string for both @ref shortopt and @ref longopt to add text to + * the usage that is not related to a specific option. See @ref help. + * The first dummy Descriptor will be used for unknown options (see below). + * + * @par Unknown Option Descriptor: + * The first dummy Descriptor in the list of Descriptors, + * whose @ref shortopt and @ref longopt are both the empty string, will be used + * as the Descriptor for unknown options. An unknown option is a string in + * the argument vector that is not a lone minus @c '-' but starts with a minus + * character and does not match any Descriptor's @ref shortopt or @ref longopt. @n + * Note that the dummy descriptor's @ref check_arg function @e will be called and + * its return value will be evaluated as usual. I.e. if it returns @ref ARG_ILLEGAL + * the parsing will be aborted with Parser::error()==true. @n + * if @c check_arg does not return @ref ARG_ILLEGAL the descriptor's + * @ref index @e will be used to pick the linked list into which + * to put the unknown option. @n + * If there is no dummy descriptor, unknown options will be dropped silently. + * + */ + const char* const longopt; + + /** + * @brief For each option that matches @ref shortopt or @ref longopt this function + * will be called to check a potential argument to the option. + * + * This function will be called even if there is no potential argument. In that case + * it will be passed @c NULL as @c arg parameter. Do not confuse this with the empty + * string. + * + * See @ref CheckArg for more information. + */ + const CheckArg check_arg; + + /** + * @brief The usage text associated with the options in this Descriptor. + * + * You can use option::printUsage() to format your usage message based on + * the @c help texts. You can use dummy Descriptors where + * @ref shortopt and @ref longopt are both the empty string to add text to + * the usage that is not related to a specific option. + * + * See option::printUsage() for special formatting characters you can use in + * @c help to get a column layout. + * + * @attention + * Must be UTF-8-encoded. If your compiler supports C++11 you can use the "u8" + * prefix to make sure string literals are properly encoded. + */ + const char* help; +}; + +/** + * @brief A parsed option from the command line together with its argument if it has one. + * + * The Parser chains all parsed options with the same Descriptor::index together + * to form a linked list. This allows you to easily implement all of the common ways + * of handling repeated options and enable/disable pairs. + * + * @li Test for presence of a switch in the argument vector: + * @code if ( options[QUIET] ) ... @endcode + * @li Evaluate --enable-foo/--disable-foo pair where the last one used wins: + * @code if ( options[FOO].last()->type() == DISABLE ) ... @endcode + * @li Cumulative option (-v verbose, -vv more verbose, -vvv even more verbose): + * @code int verbosity = options[VERBOSE].count(); @endcode + * @li Iterate over all --file=<fname> arguments: + * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) + * fname = opt->arg; ... @endcode + */ +class Option +{ + Option* next_; + Option* prev_; +public: + /** + * @brief Pointer to this Option's Descriptor. + * + * Remember that the first dummy descriptor (see @ref Descriptor::longopt) is used + * for unknown options. + * + * @attention + * @c desc==NULL signals that this Option is unused. This is the default state of + * elements in the result array. You don't need to test @c desc explicitly. You + * can simply write something like this: + * @code + * if (options[CREATE]) + * { + * ... + * } + * @endcode + * This works because of operator const Option*() . + */ + const Descriptor* desc; + + /** + * @brief The name of the option as used on the command line. + * + * The main purpose of this string is to be presented to the user in messages. + * + * In the case of a long option, this is the actual @c argv pointer, i.e. the first + * character is a '-'. In the case of a short option this points to the option + * character within the @c argv string. + * + * Note that in the case of a short option group or an attached option argument, this + * string will contain additional characters following the actual name. Use @ref namelen + * to filter out the actual option name only. + * + */ + const char* name; + + /** + * @brief Pointer to this Option's argument (if any). + * + * NULL if this option has no argument. Do not confuse this with the empty string which + * is a valid argument. + */ + const char* arg; + + /** + * @brief The length of the option @ref name. + * + * Because @ref name points into the actual @c argv string, the option name may be + * followed by more characters (e.g. other short options in the same short option group). + * This value is the number of bytes (not characters!) that are part of the actual name. + * + * For a short option, this length is always 1. For a long option this length is always + * at least 2 if single minus long options are permitted and at least 3 if they are disabled. + * + * @note + * In the pathological case of a minus within a short option group (e.g. @c -xf-z), this + * length is incorrect, because this case will be misinterpreted as a long option and the + * name will therefore extend to the string's 0-terminator or a following '=" character + * if there is one. This is irrelevant for most uses of @ref name and @c namelen. If you + * really need to distinguish the case of a long and a short option, compare @ref name to + * the @c argv pointers. A long option's @c name is always identical to one of them, + * whereas a short option's is never. + */ + int namelen; + + /** + * @brief Returns Descriptor::type of this Option's Descriptor, or 0 if this Option + * is invalid (unused). + * + * Because this method (and last(), too) can be used even on unused Options with desc==0, you can (provided + * you arrange your types properly) switch on type() without testing validity first. + * @code + * enum OptionType { UNUSED=0, DISABLED=0, ENABLED=1 }; + * enum OptionIndex { FOO }; + * const Descriptor usage[] = { + * { FOO, ENABLED, "", "enable-foo", Arg::None, 0 }, + * { FOO, DISABLED, "", "disable-foo", Arg::None, 0 }, + * { 0, 0, 0, 0, 0, 0 } }; + * ... + * switch(options[FOO].last()->type()) // no validity check required! + * { + * case ENABLED: ... + * case DISABLED: ... // UNUSED==DISABLED ! + * } + * @endcode + */ + int type() const + { + return desc == 0 ? 0 : desc->type; + } + + /** + * @brief Returns Descriptor::index of this Option's Descriptor, or -1 if this Option + * is invalid (unused). + */ + int index() const + { + return desc == 0 ? -1 : (int)desc->index; + } + + /** + * @brief Returns the number of times this Option (or others with the same Descriptor::index) + * occurs in the argument vector. + * + * This corresponds to the number of elements in the linked list this Option is part of. + * It doesn't matter on which element you call count(). The return value is always the same. + * + * Use this to implement cumulative options, such as -v, -vv, -vvv for + * different verbosity levels. + * + * Returns 0 when called for an unused/invalid option. + */ + int count() const + { + int c = (desc == 0 ? 0 : 1); + const Option* p = first(); + while (!p->isLast()) + { + ++c; + p = p->next_; + }; + return c; + } + + /** + * @brief Returns true iff this is the first element of the linked list. + * + * The first element in the linked list is the first option on the command line + * that has the respective Descriptor::index value. + * + * Returns true for an unused/invalid option. + */ + bool isFirst() const + { + return isTagged(prev_); + } + + /** + * @brief Returns true iff this is the last element of the linked list. + * + * The last element in the linked list is the last option on the command line + * that has the respective Descriptor::index value. + * + * Returns true for an unused/invalid option. + */ + bool isLast() const + { + return isTagged(next_); + } + + /** + * @brief Returns a pointer to the first element of the linked list. + * + * Use this when you want the first occurrence of an option on the command line to + * take precedence. Note that this is not the way most programs handle options. + * You should probably be using last() instead. + * + * @note + * This method may be called on an unused/invalid option and will return a pointer to the + * option itself. + */ + Option* first() + { + Option* p = this; + while (!p->isFirst()) + p = p->prev_; + return p; + } + + /** + * const version of Option::first(). + */ + const Option* first() const + { + return const_cast(this)->first(); + } + + /** + * @brief Returns a pointer to the last element of the linked list. + * + * Use this when you want the last occurrence of an option on the command line to + * take precedence. This is the most common way of handling conflicting options. + * + * @note + * This method may be called on an unused/invalid option and will return a pointer to the + * option itself. + * + * @par Tip: + * If you have options with opposite meanings (e.g. @c --enable-foo and @c --disable-foo), you + * can assign them the same Descriptor::index to get them into the same list. Distinguish them by + * Descriptor::type and all you have to do is check last()->type() to get + * the state listed last on the command line. + */ + Option* last() + { + return first()->prevwrap(); + } + + /** + * const version of Option::last(). + */ + const Option* last() const + { + return first()->prevwrap(); + } + + /** + * @brief Returns a pointer to the previous element of the linked list or NULL if + * called on first(). + * + * If called on first() this method returns NULL. Otherwise it will return the + * option with the same Descriptor::index that precedes this option on the command + * line. + */ + Option* prev() + { + return isFirst() ? 0 : prev_; + } + + /** + * @brief Returns a pointer to the previous element of the linked list with wrap-around from + * first() to last(). + * + * If called on first() this method returns last(). Otherwise it will return the + * option with the same Descriptor::index that precedes this option on the command + * line. + */ + Option* prevwrap() + { + return untag(prev_); + } + + /** + * const version of Option::prevwrap(). + */ + const Option* prevwrap() const + { + return untag(prev_); + } + + /** + * @brief Returns a pointer to the next element of the linked list or NULL if called + * on last(). + * + * If called on last() this method returns NULL. Otherwise it will return the + * option with the same Descriptor::index that follows this option on the command + * line. + */ + Option* next() + { + return isLast() ? 0 : next_; + } + + /** + * const version of Option::next(). + */ + const Option* next() const + { + return isLast() ? 0 : next_; + } + + /** + * @brief Returns a pointer to the next element of the linked list with wrap-around from + * last() to first(). + * + * If called on last() this method returns first(). Otherwise it will return the + * option with the same Descriptor::index that follows this option on the command + * line. + */ + Option* nextwrap() + { + return untag(next_); + } + + /** + * @brief Makes @c new_last the new last() by chaining it into the list after last(). + * + * It doesn't matter which element you call append() on. The new element will always + * be appended to last(). + * + * @attention + * @c new_last must not yet be part of a list, or that list will become corrupted, because + * this method does not unchain @c new_last from an existing list. + */ + void append(Option* new_last) + { + Option* p = last(); + Option* f = first(); + p->next_ = new_last; + new_last->prev_ = p; + new_last->next_ = tag(f); + f->prev_ = tag(new_last); + } + + /** + * @brief Casts from Option to const Option* but only if this Option is valid. + * + * If this Option is valid (i.e. @c desc!=NULL), returns this. + * Otherwise returns NULL. This allows testing an Option directly + * in an if-clause to see if it is used: + * @code + * if (options[CREATE]) + * { + * ... + * } + * @endcode + * It also allows you to write loops like this: + * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) + * fname = opt->arg; ... @endcode + */ + operator const Option*() const + { + return desc ? this : 0; + } + + /** + * @brief Casts from Option to Option* but only if this Option is valid. + * + * If this Option is valid (i.e. @c desc!=NULL), returns this. + * Otherwise returns NULL. This allows testing an Option directly + * in an if-clause to see if it is used: + * @code + * if (options[CREATE]) + * { + * ... + * } + * @endcode + * It also allows you to write loops like this: + * @code for (Option* opt = options[FILE]; opt; opt = opt->next()) + * fname = opt->arg; ... @endcode + */ + operator Option*() + { + return desc ? this : 0; + } + + /** + * @brief Creates a new Option that is a one-element linked list and has NULL + * @ref desc, @ref name, @ref arg and @ref namelen. + */ + Option() : + desc(0), name(0), arg(0), namelen(0) + { + prev_ = tag(this); + next_ = tag(this); + } + + /** + * @brief Creates a new Option that is a one-element linked list and has the given + * values for @ref desc, @ref name and @ref arg. + * + * If @c name_ points at a character other than '-' it will be assumed to refer to a + * short option and @ref namelen will be set to 1. Otherwise the length will extend to + * the first '=' character or the string's 0-terminator. + */ + Option(const Descriptor* desc_, const char* name_, const char* arg_) + { + init(desc_, name_, arg_); + } + + /** + * @brief Makes @c *this a copy of @c orig except for the linked list pointers. + * + * After this operation @c *this will be a one-element linked list. + */ + void operator=(const Option& orig) + { + init(orig.desc, orig.name, orig.arg); + } + + /** + * @brief Makes @c *this a copy of @c orig except for the linked list pointers. + * + * After this operation @c *this will be a one-element linked list. + */ + Option(const Option& orig) + { + init(orig.desc, orig.name, orig.arg); + } + +private: + /** + * @internal + * @brief Sets the fields of this Option to the given values (extracting @c name if necessary). + * + * If @c name_ points at a character other than '-' it will be assumed to refer to a + * short option and @ref namelen will be set to 1. Otherwise the length will extend to + * the first '=' character or the string's 0-terminator. + */ + void init(const Descriptor* desc_, const char* name_, const char* arg_) + { + desc = desc_; + name = name_; + arg = arg_; + prev_ = tag(this); + next_ = tag(this); + namelen = 0; + if (name == 0) + return; + namelen = 1; + if (name[0] != '-') + return; + while (name[namelen] != 0 && name[namelen] != '=') + ++namelen; + } + + static Option* tag(Option* ptr) + { + return (Option*) ((unsigned long long) ptr | 1); + } + + static Option* untag(Option* ptr) + { + return (Option*) ((unsigned long long) ptr & ~1ull); + } + + static bool isTagged(Option* ptr) + { + return ((unsigned long long) ptr & 1); + } +}; + +/** + * @brief Functions for checking the validity of option arguments. + * + * @copydetails CheckArg + * + * The following example code + * can serve as starting place for writing your own more complex CheckArg functions: + * @code + * struct Arg: public option::Arg + * { + * static void printError(const char* msg1, const option::Option& opt, const char* msg2) + * { + * fprintf(stderr, "ERROR: %s", msg1); + * fwrite(opt.name, opt.namelen, 1, stderr); + * fprintf(stderr, "%s", msg2); + * } + * + * static option::ArgStatus Unknown(const option::Option& option, bool msg) + * { + * if (msg) printError("Unknown option '", option, "'\n"); + * return option::ARG_ILLEGAL; + * } + * + * static option::ArgStatus Required(const option::Option& option, bool msg) + * { + * if (option.arg != 0) + * return option::ARG_OK; + * + * if (msg) printError("Option '", option, "' requires an argument\n"); + * return option::ARG_ILLEGAL; + * } + * + * static option::ArgStatus NonEmpty(const option::Option& option, bool msg) + * { + * if (option.arg != 0 && option.arg[0] != 0) + * return option::ARG_OK; + * + * if (msg) printError("Option '", option, "' requires a non-empty argument\n"); + * return option::ARG_ILLEGAL; + * } + * + * static option::ArgStatus Numeric(const option::Option& option, bool msg) + * { + * char* endptr = 0; + * if (option.arg != 0 && strtol(option.arg, &endptr, 10)){}; + * if (endptr != option.arg && *endptr == 0) + * return option::ARG_OK; + * + * if (msg) printError("Option '", option, "' requires a numeric argument\n"); + * return option::ARG_ILLEGAL; + * } + * }; + * @endcode + */ +struct Arg +{ + //! @brief For options that don't take an argument: Returns ARG_NONE. + static ArgStatus None(const Option&, bool) + { + return ARG_NONE; + } + + //! @brief Returns ARG_OK if the argument is attached and ARG_IGNORE otherwise. + static ArgStatus Optional(const Option& option, bool) + { + if (option.arg && option.name[option.namelen] != 0) + return ARG_OK; + else + return ARG_IGNORE; + } + + //! @brief Returns ARG_OK if the argument is present and ARG_IGNORE otherwise. + static ArgStatus OptionalAny(const Option& option, bool) + { + if (option.arg) + return ARG_OK; + else + return ARG_IGNORE; + } +}; + +/** + * @brief Determines the minimum lengths of the buffer and options arrays used for Parser. + * + * Because Parser doesn't use dynamic memory its output arrays have to be pre-allocated. + * If you don't want to use fixed size arrays (which may turn out too small, causing + * command line arguments to be dropped), you can use Stats to determine the correct sizes. + * Stats work cumulative. You can first pass in your default options and then the real + * options and afterwards the counts will reflect the union. + */ +struct Stats +{ + /** + * @brief Number of elements needed for a @c buffer[] array to be used for + * @ref Parser::parse() "parsing" the same argument vectors that were fed + * into this Stats object. + * + * @note + * This number is always 1 greater than the actual number needed, to give + * you a sentinel element. + */ + unsigned buffer_max; + + /** + * @brief Number of elements needed for an @c options[] array to be used for + * @ref Parser::parse() "parsing" the same argument vectors that were fed + * into this Stats object. + * + * @note + * @li This number is always 1 greater than the actual number needed, to give + * you a sentinel element. + * @li This number depends only on the @c usage, not the argument vectors, because + * the @c options array needs exactly one slot for each possible Descriptor::index. + */ + unsigned options_max; + + /** + * @brief Creates a Stats object with counts set to 1 (for the sentinel element). + */ + Stats() : + buffer_max(1), options_max(1) // 1 more than necessary as sentinel + { + } + + /** + * @brief Creates a new Stats object and immediately updates it for the + * given @c usage and argument vector. You may pass 0 for @c argc and/or @c argv, + * if you just want to update @ref options_max. + * + * @note + * The calls to Stats methods must match the later calls to Parser methods. + * See Parser::parse() for the meaning of the arguments. + */ + Stats(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) : + buffer_max(1), options_max(1) // 1 more than necessary as sentinel + { + add(gnu, usage, argc, argv, min_abbr_len, single_minus_longopt); + } + + //! @brief Stats(...) with non-const argv. + Stats(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) : + buffer_max(1), options_max(1) // 1 more than necessary as sentinel + { + add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + } + + //! @brief POSIX Stats(...) (gnu==false). + Stats(const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) : + buffer_max(1), options_max(1) // 1 more than necessary as sentinel + { + add(false, usage, argc, argv, min_abbr_len, single_minus_longopt); + } + + //! @brief POSIX Stats(...) (gnu==false) with non-const argv. + Stats(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) : + buffer_max(1), options_max(1) // 1 more than necessary as sentinel + { + add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + } + + /** + * @brief Updates this Stats object for the + * given @c usage and argument vector. You may pass 0 for @c argc and/or @c argv, + * if you just want to update @ref options_max. + * + * @note + * The calls to Stats methods must match the later calls to Parser methods. + * See Parser::parse() for the meaning of the arguments. + */ + void add(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false); + + //! @brief add() with non-const argv. + void add(bool gnu, const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) + { + add(gnu, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + } + + //! @brief POSIX add() (gnu==false). + void add(const Descriptor usage[], int argc, const char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) + { + add(false, usage, argc, argv, min_abbr_len, single_minus_longopt); + } + + //! @brief POSIX add() (gnu==false) with non-const argv. + void add(const Descriptor usage[], int argc, char** argv, int min_abbr_len = 0, // + bool single_minus_longopt = false) + { + add(false, usage, argc, (const char**) argv, min_abbr_len, single_minus_longopt); + } +private: + class CountOptionsAction; +}; + +/** + * @brief Checks argument vectors for validity and parses them into data + * structures that are easier to work with. + * + * @par Example: + * @code + * int main(int argc, char* argv[]) + * { + * argc-=(argc>0); argv+=(argc>0); // skip program name argv[0] if present + * option::Stats stats(usage, argc, argv); + * option::Option options[stats.options_max], buffer[stats.buffer_max]; + * option::Parser parse(usage, argc, argv, options, buffer); + * + * if (parse.error()) + * return 1; + * + * if (options[HELP]) + * ... + * @endcode + */ +class Parser +{ + int op_count; //!< @internal @brief see optionsCount() + int nonop_count; //!< @internal @brief see nonOptionsCount() + const char** nonop_args; //!< @internal @brief see nonOptions() + bool err; //!< @internal @brief see error() +public: + + /** + * @brief Creates a new Parser. + */ + Parser() : + op_count(0), nonop_count(0), nonop_args(0), err(false) + { + } + + /** + * @brief Creates a new Parser and immediately parses the given argument vector. + * @copydetails parse() + */ + Parser(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : + op_count(0), nonop_count(0), nonop_args(0), err(false) + { + parse(gnu, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + //! @brief Parser(...) with non-const argv. + Parser(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) : + op_count(0), nonop_count(0), nonop_args(0), err(false) + { + parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + //! @brief POSIX Parser(...) (gnu==false). + Parser(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], int min_abbr_len = 0, + bool single_minus_longopt = false, int bufmax = -1) : + op_count(0), nonop_count(0), nonop_args(0), err(false) + { + parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + //! @brief POSIX Parser(...) (gnu==false) with non-const argv. + Parser(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, + bool single_minus_longopt = false, int bufmax = -1) : + op_count(0), nonop_count(0), nonop_args(0), err(false) + { + parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + /** + * @brief Parses the given argument vector. + * + * @param gnu if true, parse() will not stop at the first non-option argument. Instead it will + * reorder arguments so that all non-options are at the end. This is the default behaviour + * of GNU getopt() but is not conforming to POSIX. @n + * Note, that once the argument vector has been reordered, the @c gnu flag will have + * no further effect on this argument vector. So it is enough to pass @c gnu==true when + * creating Stats. + * @param usage Array of Descriptor objects that describe the options to support. The last entry + * of this array must have 0 in all fields. + * @param argc The number of elements from @c argv that are to be parsed. If you pass -1, the number + * will be determined automatically. In that case the @c argv list must end with a NULL + * pointer. + * @param argv The arguments to be parsed. If you pass -1 as @c argc the last pointer in the @c argv + * list must be NULL to mark the end. + * @param options Each entry is the first element of a linked list of Options. Each new option + * that is parsed will be appended to the list specified by that Option's + * Descriptor::index. If an entry is not yet used (i.e. the Option is invalid), + * it will be replaced rather than appended to. @n + * The minimum length of this array is the greatest Descriptor::index value that + * occurs in @c usage @e PLUS ONE. + * @param buffer Each argument that is successfully parsed (including unknown arguments, if they + * have a Descriptor whose CheckArg does not return @ref ARG_ILLEGAL) will be stored in this + * array. parse() scans the array for the first invalid entry and begins writing at that + * index. You can pass @c bufmax to limit the number of options stored. + * @param min_abbr_len Passing a value min_abbr_len > 0 enables abbreviated long + * options. The parser will match a prefix of a long option as if it was + * the full long option (e.g. @c --foob=10 will be interpreted as if it was + * @c --foobar=10 ), as long as the prefix has at least @c min_abbr_len characters + * (not counting the @c -- ) and is unambiguous. + * @n Be careful if combining @c min_abbr_len=1 with @c single_minus_longopt=true + * because the ambiguity check does not consider short options and abbreviated + * single minus long options will take precedence over short options. + * @param single_minus_longopt Passing @c true for this option allows long options to begin with + * a single minus. The double minus form will still be recognized. Note that + * single minus long options take precedence over short options and short option + * groups. E.g. @c -file would be interpreted as @c --file and not as + * -f -i -l -e (assuming a long option named @c "file" exists). + * @param bufmax The greatest index in the @c buffer[] array that parse() will write to is + * @c bufmax-1. If there are more options, they will be processed (in particular + * their CheckArg will be called) but not stored. @n + * If you used Stats::buffer_max to dimension this array, you can pass + * -1 (or not pass @c bufmax at all) which tells parse() that the buffer is + * "large enough". + * @attention + * Remember that @c options and @c buffer store Option @e objects, not pointers. Therefore it + * is not possible for the same object to be in both arrays. For those options that are found in + * both @c buffer[] and @c options[] the respective objects are independent copies. And only the + * objects in @c options[] are properly linked via Option::next() and Option::prev(). + * You can iterate over @c buffer[] to + * process all options in the order they appear in the argument vector, but if you want access to + * the other Options with the same Descriptor::index, then you @e must access the linked list via + * @c options[]. You can get the linked list in options from a buffer object via something like + * @c options[buffer[i].index()]. + */ + void parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1); + + //! @brief parse() with non-const argv. + void parse(bool gnu, const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + { + parse(gnu, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + //! @brief POSIX parse() (gnu==false). + void parse(const Descriptor usage[], int argc, const char** argv, Option options[], Option buffer[], + int min_abbr_len = 0, bool single_minus_longopt = false, int bufmax = -1) + { + parse(false, usage, argc, argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + //! @brief POSIX parse() (gnu==false) with non-const argv. + void parse(const Descriptor usage[], int argc, char** argv, Option options[], Option buffer[], int min_abbr_len = 0, + bool single_minus_longopt = false, int bufmax = -1) + { + parse(false, usage, argc, (const char**) argv, options, buffer, min_abbr_len, single_minus_longopt, bufmax); + } + + /** + * @brief Returns the number of valid Option objects in @c buffer[]. + * + * @note + * @li The returned value always reflects the number of Options in the buffer[] array used for + * the most recent call to parse(). + * @li The count (and the buffer[]) includes unknown options if they are collected + * (see Descriptor::longopt). + */ + int optionsCount() + { + return op_count; + } + + /** + * @brief Returns the number of non-option arguments that remained at the end of the + * most recent parse() that actually encountered non-option arguments. + * + * @note + * A parse() that does not encounter non-option arguments will leave this value + * as well as nonOptions() undisturbed. This means you can feed the Parser a + * default argument vector that contains non-option arguments (e.g. a default filename). + * Then you feed it the actual arguments from the user. If the user has supplied at + * least one non-option argument, all of the non-option arguments from the default + * disappear and are replaced by the user's non-option arguments. However, if the + * user does not supply any non-option arguments the defaults will still be in + * effect. + */ + int nonOptionsCount() + { + return nonop_count; + } + + /** + * @brief Returns a pointer to an array of non-option arguments (only valid + * if nonOptionsCount() >0 ). + * + * @note + * @li parse() does not copy arguments, so this pointer points into the actual argument + * vector as passed to parse(). + * @li As explained at nonOptionsCount() this pointer is only changed by parse() calls + * that actually encounter non-option arguments. A parse() call that encounters only + * options, will not change nonOptions(). + */ + const char** nonOptions() + { + return nonop_args; + } + + /** + * @brief Returns nonOptions()[i] (@e without checking if i is in range!). + */ + const char* nonOption(int i) + { + return nonOptions()[i]; + } + + /** + * @brief Returns @c true if an unrecoverable error occurred while parsing options. + * + * An illegal argument to an option (i.e. CheckArg returns @ref ARG_ILLEGAL) is an + * unrecoverable error that aborts the parse. Unknown options are only an error if + * their CheckArg function returns @ref ARG_ILLEGAL. Otherwise they are collected. + * In that case if you want to exit the program if either an illegal argument + * or an unknown option has been passed, use code like this + * + * @code + * if (parser.error() || options[UNKNOWN]) + * exit(1); + * @endcode + * + */ + bool error() + { + return err; + } + +private: + friend struct Stats; + class StoreOptionAction; + struct Action; + + /** + * @internal + * @brief This is the core function that does all the parsing. + * @retval false iff an unrecoverable error occurred. + */ + static bool workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, + bool single_minus_longopt, bool print_errors, int min_abbr_len); + + /** + * @internal + * @brief Returns true iff @c st1 is a prefix of @c st2 and + * in case @c st2 is longer than @c st1, then + * the first additional character is '='. + * + * @par Examples: + * @code + * streq("foo", "foo=bar") == true + * streq("foo", "foobar") == false + * streq("foo", "foo") == true + * streq("foo=bar", "foo") == false + * @endcode + */ + static bool streq(const char* st1, const char* st2) + { + while (*st1 != 0) + if (*st1++ != *st2++) + return false; + return (*st2 == 0 || *st2 == '='); + } + + /** + * @internal + * @brief Like streq() but handles abbreviations. + * + * Returns true iff @c st1 and @c st2 have a common + * prefix with the following properties: + * @li (if min > 0) its length is at least @c min characters or the same length as @c st1 (whichever is smaller). + * @li (if min <= 0) its length is the same as that of @c st1 + * @li within @c st2 the character following the common prefix is either '=' or end-of-string. + * + * Examples: + * @code + * streqabbr("foo", "foo=bar",) == true + * streqabbr("foo", "fo=bar" , 2) == true + * streqabbr("foo", "fo" , 2) == true + * streqabbr("foo", "fo" , 0) == false + * streqabbr("foo", "f=bar" , 2) == false + * streqabbr("foo", "f" , 2) == false + * streqabbr("fo" , "foo=bar",) == false + * streqabbr("foo", "foobar" ,) == false + * streqabbr("foo", "fobar" ,) == false + * streqabbr("foo", "foo" ,) == true + * @endcode + */ + static bool streqabbr(const char* st1, const char* st2, long long min) + { + const char* st1start = st1; + while (*st1 != 0 && (*st1 == *st2)) + { + ++st1; + ++st2; + } + + return (*st1 == 0 || (min > 0 && (st1 - st1start) >= min)) && (*st2 == 0 || *st2 == '='); + } + + /** + * @internal + * @brief Returns true iff character @c ch is contained in the string @c st. + * + * Returns @c true for @c ch==0 . + */ + static bool instr(char ch, const char* st) + { + while (*st != 0 && *st != ch) + ++st; + return *st == ch; + } + + /** + * @internal + * @brief Rotates args[-count],...,args[-1],args[0] to become + * args[0],args[-count],...,args[-1]. + */ + static void shift(const char** args, int count) + { + for (int i = 0; i > -count; --i) + { + const char* temp = args[i]; + args[i] = args[i - 1]; + args[i - 1] = temp; + } + } +}; + +/** + * @internal + * @brief Interface for actions Parser::workhorse() should perform for each Option it + * parses. + */ +struct Parser::Action +{ + /** + * @brief Called by Parser::workhorse() for each Option that has been successfully + * parsed (including unknown + * options if they have a Descriptor whose Descriptor::check_arg does not return + * @ref ARG_ILLEGAL. + * + * Returns @c false iff a fatal error has occured and the parse should be aborted. + */ + virtual bool perform(Option&) + { + return true; + } + + /** + * @brief Called by Parser::workhorse() after finishing the parse. + * @param numargs the number of non-option arguments remaining + * @param args pointer to the first remaining non-option argument (if numargs > 0). + * + * @return + * @c false iff a fatal error has occurred. + */ + virtual bool finished(int numargs, const char** args) + { + (void) numargs; + (void) args; + return true; + } +}; + +/** + * @internal + * @brief An Action to pass to Parser::workhorse() that will increment a counter for + * each parsed Option. + */ +class Stats::CountOptionsAction: public Parser::Action +{ + unsigned* buffer_max; +public: + /** + * Creates a new CountOptionsAction that will increase @c *buffer_max_ for each + * parsed Option. + */ + CountOptionsAction(unsigned* buffer_max_) : + buffer_max(buffer_max_) + { + } + + bool perform(Option&) + { + if (*buffer_max == 0x7fffffff) + return false; // overflow protection: don't accept number of options that doesn't fit signed int + ++*buffer_max; + return true; + } +}; + +/** + * @internal + * @brief An Action to pass to Parser::workhorse() that will store each parsed Option in + * appropriate arrays (see Parser::parse()). + */ +class Parser::StoreOptionAction: public Parser::Action +{ + Parser& parser; + Option* options; + Option* buffer; + int bufmax; //! Number of slots in @c buffer. @c -1 means "large enough". +public: + /** + * @brief Creates a new StoreOption action. + * @param parser_ the parser whose op_count should be updated. + * @param options_ each Option @c o is chained into the linked list @c options_[o.desc->index] + * @param buffer_ each Option is appended to this array as long as there's a free slot. + * @param bufmax_ number of slots in @c buffer_. @c -1 means "large enough". + */ + StoreOptionAction(Parser& parser_, Option options_[], Option buffer_[], int bufmax_) : + parser(parser_), options(options_), buffer(buffer_), bufmax(bufmax_) + { + // find first empty slot in buffer (if any) + int bufidx = 0; + while ((bufmax < 0 || bufidx < bufmax) && buffer[bufidx]) + ++bufidx; + + // set parser's optionCount + parser.op_count = bufidx; + } + + bool perform(Option& option) + { + if (bufmax < 0 || parser.op_count < bufmax) + { + if (parser.op_count == 0x7fffffff) + return false; // overflow protection: don't accept number of options that doesn't fit signed int + + buffer[parser.op_count] = option; + int idx = buffer[parser.op_count].desc->index; + if (options[idx]) + options[idx].append(buffer[parser.op_count]); + else + options[idx] = buffer[parser.op_count]; + ++parser.op_count; + } + return true; // NOTE: an option that is discarded because of a full buffer is not fatal + } + + bool finished(int numargs, const char** args) + { + // only overwrite non-option argument list if there's at least 1 + // new non-option argument. Otherwise we keep the old list. This + // makes it easy to use default non-option arguments. + if (numargs > 0) + { + parser.nonop_count = numargs; + parser.nonop_args = args; + } + + return true; + } +}; + +inline void Parser::parse(bool gnu, const Descriptor usage[], int argc, const char** argv, Option options[], + Option buffer[], int min_abbr_len, bool single_minus_longopt, int bufmax) +{ + StoreOptionAction action(*this, options, buffer, bufmax); + err = !workhorse(gnu, usage, argc, argv, action, single_minus_longopt, true, min_abbr_len); +} + +inline void Stats::add(bool gnu, const Descriptor usage[], int argc, const char** argv, int min_abbr_len, + bool single_minus_longopt) +{ + // determine size of options array. This is the greatest index used in the usage + 1 + int i = 0; + while (usage[i].shortopt != 0) + { + if (usage[i].index + 1 >= options_max) + options_max = (usage[i].index + 1) + 1; // 1 more than necessary as sentinel + + ++i; + } + + CountOptionsAction action(&buffer_max); + Parser::workhorse(gnu, usage, argc, argv, action, single_minus_longopt, false, min_abbr_len); +} + +inline bool Parser::workhorse(bool gnu, const Descriptor usage[], int numargs, const char** args, Action& action, + bool single_minus_longopt, bool print_errors, int min_abbr_len) +{ + // protect against NULL pointer + if (args == 0) + numargs = 0; + + int nonops = 0; + + while (numargs != 0 && *args != 0) + { + const char* param = *args; // param can be --long-option, -srto or non-option argument + + // in POSIX mode the first non-option argument terminates the option list + // a lone minus character is a non-option argument + if (param[0] != '-' || param[1] == 0) + { + if (gnu) + { + ++nonops; + ++args; + if (numargs > 0) + --numargs; + continue; + } + else + break; + } + + // -- terminates the option list. The -- itself is skipped. + if (param[1] == '-' && param[2] == 0) + { + shift(args, nonops); + ++args; + if (numargs > 0) + --numargs; + break; + } + + bool handle_short_options; + const char* longopt_name; + if (param[1] == '-') // if --long-option + { + handle_short_options = false; + longopt_name = param + 2; + } + else + { + handle_short_options = true; + longopt_name = param + 1; //for testing a potential -long-option + } + + bool try_single_minus_longopt = single_minus_longopt; + bool have_more_args = (numargs > 1 || numargs < 0); // is referencing argv[1] valid? + + do // loop over short options in group, for long options the body is executed only once + { + int idx = 0; + + const char* optarg = 0; + + /******************** long option **********************/ + if (handle_short_options == false || try_single_minus_longopt) + { + idx = 0; + while (usage[idx].longopt != 0 && !streq(usage[idx].longopt, longopt_name)) + ++idx; + + if (usage[idx].longopt == 0 && min_abbr_len > 0) // if we should try to match abbreviated long options + { + int i1 = 0; + while (usage[i1].longopt != 0 && !streqabbr(usage[i1].longopt, longopt_name, min_abbr_len)) + ++i1; + if (usage[i1].longopt != 0) + { // now test if the match is unambiguous by checking for another match + int i2 = i1 + 1; + while (usage[i2].longopt != 0 && !streqabbr(usage[i2].longopt, longopt_name, min_abbr_len)) + ++i2; + + if (usage[i2].longopt == 0) // if there was no second match it's unambiguous, so accept i1 as idx + idx = i1; + } + } + + // if we found something, disable handle_short_options (only relevant if single_minus_longopt) + if (usage[idx].longopt != 0) + handle_short_options = false; + + try_single_minus_longopt = false; // prevent looking for longopt in the middle of shortopt group + + optarg = longopt_name; + while (*optarg != 0 && *optarg != '=') + ++optarg; + if (*optarg == '=') // attached argument + ++optarg; + else + // possibly detached argument + optarg = (have_more_args ? args[1] : 0); + } + + /************************ short option ***********************************/ + if (handle_short_options) + { + if (*++param == 0) // point at the 1st/next option character + break; // end of short option group + + idx = 0; + while (usage[idx].shortopt != 0 && !instr(*param, usage[idx].shortopt)) + ++idx; + + if (param[1] == 0) // if the potential argument is separate + optarg = (have_more_args ? args[1] : 0); + else + // if the potential argument is attached + optarg = param + 1; + } + + const Descriptor* descriptor = &usage[idx]; + + if (descriptor->shortopt == 0) /************** unknown option ********************/ + { + // look for dummy entry (shortopt == "" and longopt == "") to use as Descriptor for unknown options + idx = 0; + while (usage[idx].shortopt != 0 && (usage[idx].shortopt[0] != 0 || usage[idx].longopt[0] != 0)) + ++idx; + descriptor = (usage[idx].shortopt == 0 ? 0 : &usage[idx]); + } + + if (descriptor != 0) + { + Option option(descriptor, param, optarg); + switch (descriptor->check_arg(option, print_errors)) + { + case ARG_ILLEGAL: + return false; // fatal + case ARG_OK: + // skip one element of the argument vector, if it's a separated argument + if (optarg != 0 && have_more_args && optarg == args[1]) + { + shift(args, nonops); + if (numargs > 0) + --numargs; + ++args; + } + + // No further short options are possible after an argument + handle_short_options = false; + + break; + case ARG_IGNORE: + case ARG_NONE: + option.arg = 0; + break; + } + + if (!action.perform(option)) + return false; + } + + } while (handle_short_options); + + shift(args, nonops); + ++args; + if (numargs > 0) + --numargs; + + } // while + + if (numargs > 0 && *args == 0) // It's a bug in the caller if numargs is greater than the actual number + numargs = 0; // of arguments, but as a service to the user we fix this if we spot it. + + if (numargs < 0) // if we don't know the number of remaining non-option arguments + { // we need to count them + numargs = 0; + while (args[numargs] != 0) + ++numargs; + } + + return action.finished(numargs + nonops, args - nonops); +} + +/** + * @internal + * @brief The implementation of option::printUsage(). + */ +struct PrintUsageImplementation +{ + /** + * @internal + * @brief Interface for Functors that write (part of) a string somewhere. + */ + struct IStringWriter + { + /** + * @brief Writes the given number of chars beginning at the given pointer somewhere. + */ + virtual void operator()(const char*, int) + { + } + }; + + /** + * @internal + * @brief Encapsulates a function with signature func(string, size) where + * string can be initialized with a const char* and size with an int. + */ + template + struct FunctionWriter: public IStringWriter + { + Function* write; + + virtual void operator()(const char* str, int size) + { + (*write)(str, size); + } + + FunctionWriter(Function* w) : + write(w) + { + } + }; + + /** + * @internal + * @brief Encapsulates a reference to an object with a write(string, size) + * method like that of @c std::ostream. + */ + template + struct OStreamWriter: public IStringWriter + { + OStream& ostream; + + virtual void operator()(const char* str, int size) + { + ostream.write(str, size); + } + + OStreamWriter(OStream& o) : + ostream(o) + { + } + }; + + /** + * @internal + * @brief Like OStreamWriter but encapsulates a @c const reference, which is + * typically a temporary object of a user class. + */ + template + struct TemporaryWriter: public IStringWriter + { + const Temporary& userstream; + + virtual void operator()(const char* str, int size) + { + userstream.write(str, size); + } + + TemporaryWriter(const Temporary& u) : + userstream(u) + { + } + }; + + /** + * @internal + * @brief Encapsulates a function with the signature func(fd, string, size) (the + * signature of the @c write() system call) + * where fd can be initialized from an int, string from a const char* and size from an int. + */ + template + struct SyscallWriter: public IStringWriter + { + Syscall* write; + int fd; + + virtual void operator()(const char* str, int size) + { + (*write)(fd, str, size); + } + + SyscallWriter(Syscall* w, int f) : + write(w), fd(f) + { + } + }; + + /** + * @internal + * @brief Encapsulates a function with the same signature as @c std::fwrite(). + */ + template + struct StreamWriter: public IStringWriter + { + Function* fwrite; + Stream* stream; + + virtual void operator()(const char* str, int size) + { + (*fwrite)(str, size, 1, stream); + } + + StreamWriter(Function* w, Stream* s) : + fwrite(w), stream(s) + { + } + }; + + /** + * @internal + * @brief Sets i1 = max(i1, i2) + */ + static void upmax(int& i1, int i2) + { + i1 = (i1 >= i2 ? i1 : i2); + } + + /** + * @internal + * @brief Moves the "cursor" to column @c want_x assuming it is currently at column @c x + * and sets @c x=want_x . + * If x > want_x , a line break is output before indenting. + * + * @param write Spaces and possibly a line break are written via this functor to get + * the desired indentation @c want_x . + * @param[in,out] x the current indentation. Set to @c want_x by this method. + * @param want_x the desired indentation. + */ + static void indent(IStringWriter& write, int& x, int want_x) + { + int indent = want_x - x; + if (indent < 0) + { + write("\n", 1); + indent = want_x; + } + + if (indent > 0) + { + char space = ' '; + for (int i = 0; i < indent; ++i) + write(&space, 1); + x = want_x; + } + } + + /** + * @brief Returns true if ch is the unicode code point of a wide character. + * + * @note + * The following character ranges are treated as wide + * @code + * 1100..115F + * 2329..232A (just 2 characters!) + * 2E80..A4C6 except for 303F + * A960..A97C + * AC00..D7FB + * F900..FAFF + * FE10..FE6B + * FF01..FF60 + * FFE0..FFE6 + * 1B000...... + * @endcode + */ + static bool isWideChar(unsigned ch) + { + if (ch == 0x303F) + return false; + + return ((0x1100 <= ch && ch <= 0x115F) || (0x2329 <= ch && ch <= 0x232A) || (0x2E80 <= ch && ch <= 0xA4C6) + || (0xA960 <= ch && ch <= 0xA97C) || (0xAC00 <= ch && ch <= 0xD7FB) || (0xF900 <= ch && ch <= 0xFAFF) + || (0xFE10 <= ch && ch <= 0xFE6B) || (0xFF01 <= ch && ch <= 0xFF60) || (0xFFE0 <= ch && ch <= 0xFFE6) + || (0x1B000 <= ch)); + } + + /** + * @internal + * @brief Splits a @c Descriptor[] array into tables, rows, lines and columns and + * iterates over these components. + * + * The top-level organizational unit is the @e table. + * A table begins at a Descriptor with @c help!=NULL and extends up to + * a Descriptor with @c help==NULL. + * + * A table consists of @e rows. Due to line-wrapping and explicit breaks + * a row may take multiple lines on screen. Rows within the table are separated + * by \\n. They never cross Descriptor boundaries. This means a row ends either + * at \\n or the 0 at the end of the help string. + * + * A row consists of columns/cells. Columns/cells within a row are separated by \\t. + * Line breaks within a cell are marked by \\v. + * + * Rows in the same table need not have the same number of columns/cells. The + * extreme case are interjections, which are rows that contain neither \\t nor \\v. + * These are NOT treated specially by LinePartIterator, but they are treated + * specially by printUsage(). + * + * LinePartIterator iterates through the usage at 3 levels: table, row and part. + * Tables and rows are as described above. A @e part is a line within a cell. + * LinePartIterator iterates through 1st parts of all cells, then through the 2nd + * parts of all cells (if any),... @n + * Example: The row "1 \v 3 \t 2 \v 4" has 2 cells/columns and 4 parts. + * The parts will be returned in the order 1, 2, 3, 4. + * + * It is possible that some cells have fewer parts than others. In this case + * LinePartIterator will "fill up" these cells with 0-length parts. IOW, LinePartIterator + * always returns the same number of parts for each column. Note that this is different + * from the way rows and columns are handled. LinePartIterator does @e not guarantee that + * the same number of columns will be returned for each row. + * + */ + class LinePartIterator + { + const Descriptor* tablestart; //!< The 1st descriptor of the current table. + const Descriptor* rowdesc; //!< The Descriptor that contains the current row. + const char* rowstart; //!< Ptr to 1st character of current row within rowdesc->help. + const char* ptr; //!< Ptr to current part within the current row. + int col; //!< Index of current column. + int len; //!< Length of the current part (that ptr points at) in BYTES + int screenlen; //!< Length of the current part in screen columns (taking narrow/wide chars into account). + int max_line_in_block; //!< Greatest index of a line within the block. This is the number of \\v within the cell with the most \\vs. + int line_in_block; //!< Line index within the current cell of the current part. + int target_line_in_block; //!< Line index of the parts we should return to the user on this iteration. + bool hit_target_line; //!< Flag whether we encountered a part with line index target_line_in_block in the current cell. + + /** + * @brief Determines the byte and character lengths of the part at @ref ptr and + * stores them in @ref len and @ref screenlen respectively. + */ + void update_length() + { + screenlen = 0; + for (len = 0; ptr[len] != 0 && ptr[len] != '\v' && ptr[len] != '\t' && ptr[len] != '\n'; ++len) + { + ++screenlen; + unsigned ch = (unsigned char) ptr[len]; + if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte + { + // int __builtin_clz (unsigned int x) + // Returns the number of leading 0-bits in x, starting at the most significant bit + unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); + ch = ch & mask; // mask out length bits, we don't verify their correctness + while (((unsigned char) ptr[len + 1] ^ 0x80) <= 0x3F) // while next byte is continuation byte + { + ch = (ch << 6) ^ (unsigned char) ptr[len + 1] ^ 0x80; // add continuation to char code + ++len; + } + // ch is the decoded unicode code point + if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case + ++screenlen; + } + } + } + + public: + //! @brief Creates an iterator for @c usage. + LinePartIterator(const Descriptor usage[]) : + tablestart(usage), rowdesc(0), rowstart(0), ptr(0), col(-1), len(0), max_line_in_block(0), line_in_block(0), + target_line_in_block(0), hit_target_line(true) + { + } + + /** + * @brief Moves iteration to the next table (if any). Has to be called once on a new + * LinePartIterator to move to the 1st table. + * @retval false if moving to next table failed because no further table exists. + */ + bool nextTable() + { + // If this is NOT the first time nextTable() is called after the constructor, + // then skip to the next table break (i.e. a Descriptor with help == 0) + if (rowdesc != 0) + { + while (tablestart->help != 0 && tablestart->shortopt != 0) + ++tablestart; + } + + // Find the next table after the break (if any) + while (tablestart->help == 0 && tablestart->shortopt != 0) + ++tablestart; + + restartTable(); + return rowstart != 0; + } + + /** + * @brief Reset iteration to the beginning of the current table. + */ + void restartTable() + { + rowdesc = tablestart; + rowstart = tablestart->help; + ptr = 0; + } + + /** + * @brief Moves iteration to the next row (if any). Has to be called once after each call to + * @ref nextTable() to move to the 1st row of the table. + * @retval false if moving to next row failed because no further row exists. + */ + bool nextRow() + { + if (ptr == 0) + { + restartRow(); + return rowstart != 0; + } + + while (*ptr != 0 && *ptr != '\n') + ++ptr; + + if (*ptr == 0) + { + if ((rowdesc + 1)->help == 0) // table break + return false; + + ++rowdesc; + rowstart = rowdesc->help; + } + else // if (*ptr == '\n') + { + rowstart = ptr + 1; + } + + restartRow(); + return true; + } + + /** + * @brief Reset iteration to the beginning of the current row. + */ + void restartRow() + { + ptr = rowstart; + col = -1; + len = 0; + screenlen = 0; + max_line_in_block = 0; + line_in_block = 0; + target_line_in_block = 0; + hit_target_line = true; + } + + /** + * @brief Moves iteration to the next part (if any). Has to be called once after each call to + * @ref nextRow() to move to the 1st part of the row. + * @retval false if moving to next part failed because no further part exists. + * + * See @ref LinePartIterator for details about the iteration. + */ + bool next() + { + if (ptr == 0) + return false; + + if (col == -1) + { + col = 0; + update_length(); + return true; + } + + ptr += len; + while (true) + { + switch (*ptr) + { + case '\v': + upmax(max_line_in_block, ++line_in_block); + ++ptr; + break; + case '\t': + if (!hit_target_line) // if previous column did not have the targetline + { // then "insert" a 0-length part + update_length(); + hit_target_line = true; + return true; + } + + hit_target_line = false; + line_in_block = 0; + ++col; + ++ptr; + break; + case 0: + case '\n': + if (!hit_target_line) // if previous column did not have the targetline + { // then "insert" a 0-length part + update_length(); + hit_target_line = true; + return true; + } + + if (++target_line_in_block > max_line_in_block) + { + update_length(); + return false; + } + + hit_target_line = false; + line_in_block = 0; + col = 0; + ptr = rowstart; + continue; + default: + ++ptr; + continue; + } // switch + + if (line_in_block == target_line_in_block) + { + update_length(); + hit_target_line = true; + return true; + } + } // while + } + + /** + * @brief Returns the index (counting from 0) of the column in which + * the part pointed to by @ref data() is located. + */ + int column() + { + return col; + } + + /** + * @brief Returns the index (counting from 0) of the line within the current column + * this part belongs to. + */ + int line() + { + return target_line_in_block; // NOT line_in_block !!! It would be wrong if !hit_target_line + } + + /** + * @brief Returns the length of the part pointed to by @ref data() in raw chars (not UTF-8 characters). + */ + int length() + { + return len; + } + + /** + * @brief Returns the width in screen columns of the part pointed to by @ref data(). + * Takes multi-byte UTF-8 sequences and wide characters into account. + */ + int screenLength() + { + return screenlen; + } + + /** + * @brief Returns the current part of the iteration. + */ + const char* data() + { + return ptr; + } + }; + + /** + * @internal + * @brief Takes input and line wraps it, writing out one line at a time so that + * it can be interleaved with output from other columns. + * + * The LineWrapper is used to handle the last column of each table as well as interjections. + * The LineWrapper is called once for each line of output. If the data given to it fits + * into the designated width of the last column it is simply written out. If there + * is too much data, an appropriate split point is located and only the data up to this + * split point is written out. The rest of the data is queued for the next line. + * That way the last column can be line wrapped and interleaved with data from + * other columns. The following example makes this clearer: + * @code + * Column 1,1 Column 2,1 This is a long text + * Column 1,2 Column 2,2 that does not fit into + * a single line. + * @endcode + * + * The difficulty in producing this output is that the whole string + * "This is a long text that does not fit into a single line" is the + * 1st and only part of column 3. In order to produce the above + * output the string must be output piecemeal, interleaved with + * the data from the other columns. + */ + class LineWrapper + { + static const int bufmask = 15; //!< Must be a power of 2 minus 1. + /** + * @brief Ring buffer for length component of pair (data, length). + */ + int lenbuf[bufmask + 1]; + /** + * @brief Ring buffer for data component of pair (data, length). + */ + const char* datbuf[bufmask + 1]; + /** + * @brief The indentation of the column to which the LineBuffer outputs. LineBuffer + * assumes that the indentation has already been written when @ref process() + * is called, so this value is only used when a buffer flush requires writing + * additional lines of output. + */ + int x; + /** + * @brief The width of the column to line wrap. + */ + int width; + int head; //!< @brief index for next write + int tail; //!< @brief index for next read - 1 (i.e. increment tail BEFORE read) + + /** + * @brief Multiple methods of LineWrapper may decide to flush part of the buffer to + * free up space. The contract of process() says that only 1 line is output. So + * this variable is used to track whether something has output a line. It is + * reset at the beginning of process() and checked at the end to decide if + * output has already occurred or is still needed. + */ + bool wrote_something; + + bool buf_empty() + { + return ((tail + 1) & bufmask) == head; + } + + bool buf_full() + { + return tail == head; + } + + void buf_store(const char* data, int len) + { + lenbuf[head] = len; + datbuf[head] = data; + head = (head + 1) & bufmask; + } + + //! @brief Call BEFORE reading ...buf[tail]. + void buf_next() + { + tail = (tail + 1) & bufmask; + } + + /** + * @brief Writes (data,len) into the ring buffer. If the buffer is full, a single line + * is flushed out of the buffer into @c write. + */ + void output(IStringWriter& write, const char* data, int len) + { + if (buf_full()) + write_one_line(write); + + buf_store(data, len); + } + + /** + * @brief Writes a single line of output from the buffer to @c write. + */ + void write_one_line(IStringWriter& write) + { + if (wrote_something) // if we already wrote something, we need to start a new line + { + write("\n", 1); + int _ = 0; + indent(write, _, x); + } + + if (!buf_empty()) + { + buf_next(); + write(datbuf[tail], lenbuf[tail]); + } + + wrote_something = true; + } + public: + + /** + * @brief Writes out all remaining data from the LineWrapper using @c write. + * Unlike @ref process() this method indents all lines including the first and + * will output a \\n at the end (but only if something has been written). + */ + void flush(IStringWriter& write) + { + if (buf_empty()) + return; + int _ = 0; + indent(write, _, x); + wrote_something = false; + while (!buf_empty()) + write_one_line(write); + write("\n", 1); + } + + /** + * @brief Process, wrap and output the next piece of data. + * + * process() will output at least one line of output. This is not necessarily + * the @c data passed in. It may be data queued from a prior call to process(). + * If the internal buffer is full, more than 1 line will be output. + * + * process() assumes that the a proper amount of indentation has already been + * output. It won't write any further indentation before the 1st line. If + * more than 1 line is written due to buffer constraints, the lines following + * the first will be indented by this method, though. + * + * No \\n is written by this method after the last line that is written. + * + * @param write where to write the data. + * @param data the new chunk of data to write. + * @param len the length of the chunk of data to write. + */ + void process(IStringWriter& write, const char* data, int len) + { + wrote_something = false; + + while (len > 0) + { + if (len <= width) // quick test that works because utf8width <= len (all wide chars have at least 2 bytes) + { + output(write, data, len); + len = 0; + } + else // if (len > width) it's possible (but not guaranteed) that utf8len > width + { + int utf8width = 0; + int maxi = 0; + while (maxi < len && utf8width < width) + { + int charbytes = 1; + unsigned ch = (unsigned char) data[maxi]; + if (ch > 0xC1) // everything <= 0xC1 (yes, even 0xC1 itself) is not a valid UTF-8 start byte + { + // int __builtin_clz (unsigned int x) + // Returns the number of leading 0-bits in x, starting at the most significant bit + unsigned mask = (unsigned) -1 >> __builtin_clz(ch ^ 0xff); + ch = ch & mask; // mask out length bits, we don't verify their correctness + while ((maxi + charbytes < len) && // + (((unsigned char) data[maxi + charbytes] ^ 0x80) <= 0x3F)) // while next byte is continuation byte + { + ch = (ch << 6) ^ (unsigned char) data[maxi + charbytes] ^ 0x80; // add continuation to char code + ++charbytes; + } + // ch is the decoded unicode code point + if (ch >= 0x1100 && isWideChar(ch)) // the test for 0x1100 is here to avoid the function call in the Latin case + { + if (utf8width + 2 > width) + break; + ++utf8width; + } + } + ++utf8width; + maxi += charbytes; + } + + // data[maxi-1] is the last byte of the UTF-8 sequence of the last character that fits + // onto the 1st line. If maxi == len, all characters fit on the line. + + if (maxi == len) + { + output(write, data, len); + len = 0; + } + else // if (maxi < len) at least 1 character (data[maxi] that is) doesn't fit on the line + { + int i; + for (i = maxi; i >= 0; --i) + if (data[i] == ' ') + break; + + if (i >= 0) + { + output(write, data, i); + data += i + 1; + len -= i + 1; + } + else // did not find a space to split at => split before data[maxi] + { // data[maxi] is always the beginning of a character, never a continuation byte + output(write, data, maxi); + data += maxi; + len -= maxi; + } + } + } + } + if (!wrote_something) // if we didn't already write something to make space in the buffer + write_one_line(write); // write at most one line of actual output + } + + /** + * @brief Constructs a LineWrapper that wraps its output to fit into + * screen columns @c x1 (incl.) to @c x2 (excl.). + * + * @c x1 gives the indentation LineWrapper uses if it needs to indent. + */ + LineWrapper(int x1, int x2) : + x(x1), width(x2 - x1), head(0), tail(bufmask) + { + if (width < 2) // because of wide characters we need at least width 2 or the code breaks + width = 2; + } + }; + + /** + * @internal + * @brief This is the implementation that is shared between all printUsage() templates. + * Because all printUsage() templates share this implementation, there is no template bloat. + */ + static void printUsage(IStringWriter& write, const Descriptor usage[], int width = 80, // + int last_column_min_percent = 50, int last_column_own_line_max_percent = 75) + { + if (width < 1) // protect against nonsense values + width = 80; + + if (width > 10000) // protect against overflow in the following computation + width = 10000; + + int last_column_min_width = ((width * last_column_min_percent) + 50) / 100; + int last_column_own_line_max_width = ((width * last_column_own_line_max_percent) + 50) / 100; + if (last_column_own_line_max_width == 0) + last_column_own_line_max_width = 1; + + LinePartIterator part(usage); + while (part.nextTable()) + { + + /***************** Determine column widths *******************************/ + + const int maxcolumns = 8; // 8 columns are enough for everyone + int col_width[maxcolumns]; + int lastcolumn; + int leftwidth; + int overlong_column_threshold = 10000; + do + { + lastcolumn = 0; + for (int i = 0; i < maxcolumns; ++i) + col_width[i] = 0; + + part.restartTable(); + while (part.nextRow()) + { + while (part.next()) + { + if (part.column() < maxcolumns) + { + upmax(lastcolumn, part.column()); + if (part.screenLength() < overlong_column_threshold) + // We don't let rows that don't use table separators (\t or \v) influence + // the width of column 0. This allows the user to interject section headers + // or explanatory paragraphs that do not participate in the table layout. + if (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' + || part.data()[part.length()] == '\v') + upmax(col_width[part.column()], part.screenLength()); + } + } + } + + /* + * If the last column doesn't fit on the same + * line as the other columns, we can fix that by starting it on its own line. + * However we can't do this for any of the columns 0..lastcolumn-1. + * If their sum exceeds the maximum width we try to fix this by iteratively + * ignoring the widest line parts in the width determination until + * we arrive at a series of column widths that fit into one line. + * The result is a layout where everything is nicely formatted + * except for a few overlong fragments. + * */ + + leftwidth = 0; + overlong_column_threshold = 0; + for (int i = 0; i < lastcolumn; ++i) + { + leftwidth += col_width[i]; + upmax(overlong_column_threshold, col_width[i]); + } + + } while (leftwidth > width); + + /**************** Determine tab stops and last column handling **********************/ + + int tabstop[maxcolumns]; + tabstop[0] = 0; + for (int i = 1; i < maxcolumns; ++i) + tabstop[i] = tabstop[i - 1] + col_width[i - 1]; + + int rightwidth = width - tabstop[lastcolumn]; + bool print_last_column_on_own_line = false; + if (rightwidth < last_column_min_width && // if we don't have the minimum requested width for the last column + ( col_width[lastcolumn] == 0 || // and all last columns are > overlong_column_threshold + rightwidth < col_width[lastcolumn] // or there is at least one last column that requires more than the space available + ) + ) + { + print_last_column_on_own_line = true; + rightwidth = last_column_own_line_max_width; + } + + // If lastcolumn == 0 we must disable print_last_column_on_own_line because + // otherwise 2 copies of the last (and only) column would be output. + // Actually this is just defensive programming. It is currently not + // possible that lastcolumn==0 and print_last_column_on_own_line==true + // at the same time, because lastcolumn==0 => tabstop[lastcolumn] == 0 => + // rightwidth==width => rightwidth>=last_column_min_width (unless someone passes + // a bullshit value >100 for last_column_min_percent) => the above if condition + // is false => print_last_column_on_own_line==false + if (lastcolumn == 0) + print_last_column_on_own_line = false; + + LineWrapper lastColumnLineWrapper(width - rightwidth, width); + LineWrapper interjectionLineWrapper(0, width); + + part.restartTable(); + + /***************** Print out all rows of the table *************************************/ + + while (part.nextRow()) + { + int x = -1; + while (part.next()) + { + if (part.column() > lastcolumn) + continue; // drop excess columns (can happen if lastcolumn == maxcolumns-1) + + if (part.column() == 0) + { + if (x >= 0) + write("\n", 1); + x = 0; + } + + indent(write, x, tabstop[part.column()]); + + if ((part.column() < lastcolumn) + && (part.column() > 0 || part.line() > 0 || part.data()[part.length()] == '\t' + || part.data()[part.length()] == '\v')) + { + write(part.data(), part.length()); + x += part.screenLength(); + } + else // either part.column() == lastcolumn or we are in the special case of + // an interjection that doesn't contain \v or \t + { + // NOTE: This code block is not necessarily executed for + // each line, because some rows may have fewer columns. + + LineWrapper& lineWrapper = (part.column() == 0) ? interjectionLineWrapper : lastColumnLineWrapper; + + if (!print_last_column_on_own_line || part.column() != lastcolumn) + lineWrapper.process(write, part.data(), part.length()); + } + } // while + + if (print_last_column_on_own_line) + { + part.restartRow(); + while (part.next()) + { + if (part.column() == lastcolumn) + { + write("\n", 1); + int _ = 0; + indent(write, _, width - rightwidth); + lastColumnLineWrapper.process(write, part.data(), part.length()); + } + } + } + + write("\n", 1); + lastColumnLineWrapper.flush(write); + interjectionLineWrapper.flush(write); + } + } + } + +} +; + +/** + * @brief Outputs a nicely formatted usage string with support for multi-column formatting + * and line-wrapping. + * + * printUsage() takes the @c help texts of a Descriptor[] array and formats them into + * a usage message, wrapping lines to achieve the desired output width. + * + * Table formatting: + * + * Aside from plain strings which are simply line-wrapped, the usage may contain tables. Tables + * are used to align elements in the output. + * + * @code + * // Without a table. The explanatory texts are not aligned. + * -c, --create |Creates something. + * -k, --kill |Destroys something. + * + * // With table formatting. The explanatory texts are aligned. + * -c, --create |Creates something. + * -k, --kill |Destroys something. + * @endcode + * + * Table formatting removes the need to pad help texts manually with spaces to achieve + * alignment. To create a table, simply insert \\t (tab) characters to separate the cells + * within a row. + * + * @code + * const option::Descriptor usage[] = { + * {..., "-c, --create \tCreates something." }, + * {..., "-k, --kill \tDestroys something." }, ... + * @endcode + * + * Note that you must include the minimum amount of space desired between cells yourself. + * Table formatting will insert further spaces as needed to achieve alignment. + * + * You can insert line breaks within cells by using \\v (vertical tab). + * + * @code + * const option::Descriptor usage[] = { + * {..., "-c,\v--create \tCreates\vsomething." }, + * {..., "-k,\v--kill \tDestroys\vsomething." }, ... + * + * // results in + * + * -c, Creates + * --create something. + * -k, Destroys + * --kill something. + * @endcode + * + * You can mix lines that do not use \\t or \\v with those that do. The plain + * lines will not mess up the table layout. Alignment of the table columns will + * be maintained even across these interjections. + * + * @code + * const option::Descriptor usage[] = { + * {..., "-c, --create \tCreates something." }, + * {..., "----------------------------------" }, + * {..., "-k, --kill \tDestroys something." }, ... + * + * // results in + * + * -c, --create Creates something. + * ---------------------------------- + * -k, --kill Destroys something. + * @endcode + * + * You can have multiple tables within the same usage whose columns are + * aligned independently. Simply insert a dummy Descriptor with @c help==0. + * + * @code + * const option::Descriptor usage[] = { + * {..., "Long options:" }, + * {..., "--very-long-option \tDoes something long." }, + * {..., "--ultra-super-mega-long-option \tTakes forever to complete." }, + * {..., 0 }, // ---------- table break ----------- + * {..., "Short options:" }, + * {..., "-s \tShort." }, + * {..., "-q \tQuick." }, ... + * + * // results in + * + * Long options: + * --very-long-option Does something long. + * --ultra-super-mega-long-option Takes forever to complete. + * Short options: + * -s Short. + * -q Quick. + * + * // Without the table break it would be + * + * Long options: + * --very-long-option Does something long. + * --ultra-super-mega-long-option Takes forever to complete. + * Short options: + * -s Short. + * -q Quick. + * @endcode + * + * Output methods: + * + * Because TheLeanMeanC++Option parser is freestanding, you have to provide the means for + * output in the first argument(s) to printUsage(). Because printUsage() is implemented as + * a set of template functions, you have great flexibility in your choice of output + * method. The following example demonstrates typical uses. Anything that's similar enough + * will work. + * + * @code + * #include // write() + * #include // cout + * #include // ostringstream + * #include // fwrite() + * using namespace std; + * + * void my_write(const char* str, int size) { + * fwrite(str, size, 1, stdout); + * } + * + * struct MyWriter { + * void write(const char* buf, size_t size) const { + * fwrite(str, size, 1, stdout); + * } + * }; + * + * struct MyWriteFunctor { + * void operator()(const char* buf, size_t size) { + * fwrite(str, size, 1, stdout); + * } + * }; + * ... + * printUsage(my_write, usage); // custom write function + * printUsage(MyWriter(), usage); // temporary of a custom class + * MyWriter writer; + * printUsage(writer, usage); // custom class object + * MyWriteFunctor wfunctor; + * printUsage(&wfunctor, usage); // custom functor + * printUsage(write, 1, usage); // write() to file descriptor 1 + * printUsage(cout, usage); // an ostream& + * printUsage(fwrite, stdout, usage); // fwrite() to stdout + * ostringstream sstr; + * printUsage(sstr, usage); // an ostringstream& + * + * @endcode + * + * @par Notes: + * @li the @c write() method of a class that is to be passed as a temporary + * as @c MyWriter() is in the example, must be a @c const method, because + * temporary objects are passed as const reference. This only applies to + * temporary objects that are created and destroyed in the same statement. + * If you create an object like @c writer in the example, this restriction + * does not apply. + * @li a functor like @c MyWriteFunctor in the example must be passed as a pointer. + * This differs from the way functors are passed to e.g. the STL algorithms. + * @li All printUsage() templates are tiny wrappers around a shared non-template implementation. + * So there's no penalty for using different versions in the same program. + * @li printUsage() always interprets Descriptor::help as UTF-8 and always produces UTF-8-encoded + * output. If your system uses a different charset, you must do your own conversion. You + * may also need to change the font of the console to see non-ASCII characters properly. + * This is particularly true for Windows. + * @li @b Security @b warning: Do not insert untrusted strings (such as user-supplied arguments) + * into the usage. printUsage() has no protection against malicious UTF-8 sequences. + * + * @param prn The output method to use. See the examples above. + * @param usage the Descriptor[] array whose @c help texts will be formatted. + * @param width the maximum number of characters per output line. Note that this number is + * in actual characters, not bytes. printUsage() supports UTF-8 in @c help and will + * count multi-byte UTF-8 sequences properly. Asian wide characters are counted + * as 2 characters. + * @param last_column_min_percent (0-100) The minimum percentage of @c width that should be available + * for the last column (which typically contains the textual explanation of an option). + * If less space is available, the last column will be printed on its own line, indented + * according to @c last_column_own_line_max_percent. + * @param last_column_own_line_max_percent (0-100) If the last column is printed on its own line due to + * less than @c last_column_min_percent of the width being available, then only + * @c last_column_own_line_max_percent of the extra line(s) will be used for the + * last column's text. This ensures an indentation. See example below. + * + * @code + * // width=20, last_column_min_percent=50 (i.e. last col. min. width=10) + * --3456789 1234567890 + * 1234567890 + * + * // width=20, last_column_min_percent=75 (i.e. last col. min. width=15) + * // last_column_own_line_max_percent=75 + * --3456789 + * 123456789012345 + * 67890 + * + * // width=20, last_column_min_percent=75 (i.e. last col. min. width=15) + * // last_column_own_line_max_percent=33 (i.e. max. 5) + * --3456789 + * 12345 + * 67890 + * 12345 + * 67890 + * @endcode + */ +template +void printUsage(OStream& prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, + int last_column_own_line_max_percent = 75) +{ + PrintUsageImplementation::OStreamWriter write(prn); + PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); +} + +template +void printUsage(Function* prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, + int last_column_own_line_max_percent = 75) +{ + PrintUsageImplementation::FunctionWriter write(prn); + PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); +} + +template +void printUsage(const Temporary& prn, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, + int last_column_own_line_max_percent = 75) +{ + PrintUsageImplementation::TemporaryWriter write(prn); + PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); +} + +template +void printUsage(Syscall* prn, int fd, const Descriptor usage[], int width = 80, int last_column_min_percent = 50, + int last_column_own_line_max_percent = 75) +{ + PrintUsageImplementation::SyscallWriter write(prn, fd); + PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); +} + +template +void printUsage(Function* prn, Stream* stream, const Descriptor usage[], int width = 80, int last_column_min_percent = + 50, + int last_column_own_line_max_percent = 75) +{ + PrintUsageImplementation::StreamWriter write(prn, stream); + PrintUsageImplementation::printUsage(write, usage, width, last_column_min_percent, last_column_own_line_max_percent); +} + +} +// namespace option + +#endif /* OPTIONPARSER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/Domain.h b/ThirdParty/ros/include/fastrtps/Domain.h index cf1c49f3f..db99b55fc 100644 --- a/ThirdParty/ros/include/fastrtps/Domain.h +++ b/ThirdParty/ros/include/fastrtps/Domain.h @@ -31,13 +31,13 @@ #define DEPRECATED __declspec(deprecated) #else #define DEPRECATED /** --Deprecated-- */ -#endif +#endif // if defined(__GNUC__) || defined(__clang__) #else #define DEPRECATED -#endif +#endif // ifdef USE_DEPRECATION -namespace eprosima{ -namespace fastrtps{ +namespace eprosima { +namespace fastrtps { class ParticipantListener; class Participant; @@ -49,9 +49,9 @@ class Subscriber; class SubscriberAttributes; class SubscriberListener; -namespace types{ +namespace types { class DynamicPubSubType; -} +} // namespace types /** * Class Domain, use to interact with the Publisher Subscriber API of the Fast RTPS implementation. @@ -59,172 +59,190 @@ class DynamicPubSubType; */ class Domain { - public: - /** - * Create a Participant from a profile name. - * @param participant_profile Participant profile name. - * @param listen ParticipantListener Pointer. - * @return Participant pointer. (nullptr if not created.) - */ - RTPS_DllAPI DEPRECATED static Participant* createParticipant( - const std::string& participant_profile, - ParticipantListener* listen = nullptr); - - /** - * Create a Participant. - * @param att Participant Attributes. - * @param listen ParticipantListener Pointer. - * @return Participant pointer. (nullptr if not created.) - */ - RTPS_DllAPI DEPRECATED static Participant* createParticipant( - const ParticipantAttributes& att, - ParticipantListener* listen = nullptr); - - //!Fills participant_attributes with the default values. - RTPS_DllAPI static void getDefaultParticipantAttributes(ParticipantAttributes& participant_attributes); - - /** - * Create a Publisher in a Participant from a profile name. - * @param part Pointer to the participant where you want to create the Publisher. - * @param publisher_profile Publisher profile name. - * @param listen Pointer to the PublisherListener. - * @return Pointer to the created Publisher (nullptr if not created). - */ - RTPS_DllAPI static Publisher* createPublisher( - Participant* part, - const std::string& publisher_profile, - PublisherListener* listen = nullptr); - - /** - * Create a Publisher in a Participant. - * @param part Pointer to the participant where you want to create the Publisher. - * @param att PublisherAttributes. - * @param listen Pointer to the PublisherListener. - * @return Pointer to the created Publisher (nullptr if not created). - */ - RTPS_DllAPI static Publisher* createPublisher( - Participant* part, - const PublisherAttributes& att, - PublisherListener* listen = nullptr); - - //!Fills publisher_attributes with the default values. - RTPS_DllAPI static void getDefaultPublisherAttributes(PublisherAttributes& publisher_attributes); - - /** - * Create a Subscriber in a Participant from a profile name. - * @param part Pointer to the participant where you want to create the Publisher. - * @param subscriber_profile Subscriber profile name. - * @param listen Pointer to the SubscriberListener. - * @return Pointer to the created Subscriber (nullptr if not created). - */ - RTPS_DllAPI static Subscriber* createSubscriber( - Participant* part, - const std::string& subscriber_profile, - SubscriberListener* listen = nullptr); - - /** - * Create a Subscriber in a Participant. - * @param part Pointer to the participant where you want to create the Publisher. - * @param att SubscriberAttributes. - * @param listen Pointer to the SubscriberListener. - * @return Pointer to the created Subscriber (nullptr if not created). - */ - RTPS_DllAPI static Subscriber* createSubscriber( - Participant* part, - const SubscriberAttributes& att, - SubscriberListener* listen = nullptr); - - //!Fills subscriber_attributes with the default values. - RTPS_DllAPI static void getDefaultSubscriberAttributes(SubscriberAttributes& subscriber_attributes); - - /** - * Remove a Participant and all associated publishers and subscribers. - * @param part Pointer to the participant. - * @return True if correctly removed. - */ - RTPS_DllAPI static bool removeParticipant(Participant* part); - - /** - * Remove a Publisher. - * @param pub Pointer to the Publisher. - * @return True if correctly removed. - */ - RTPS_DllAPI static bool removePublisher(Publisher* pub); - - /** - * Remove a Subscriber. - * @param sub Pointer to the Subscriber. - * @return True if correctly removed. - */ - RTPS_DllAPI static bool removeSubscriber(Subscriber* sub); - - /** - * Return a registered type. - * @param part Pointer to the Participant. - * @param typeName Name of the type. - * @param type Returned type. - * @return True if type was found. - */ - RTPS_DllAPI static bool getRegisteredType( - Participant* part, - const char* typeName, - fastdds::dds::TopicDataType** type); - - /** - * Register a type in a participant. - * @param part Pointer to the Participant. - * @param type Pointer to the Type. - * @return True if correctly registered. - */ - RTPS_DllAPI static bool registerType( - Participant* part, - fastdds::dds::TopicDataType * type); - - /** - * Register a type in a participant. - * @param part Pointer to the Participant. - * @param type Pointer to the Type. - * @return True if correctly registered. - */ - RTPS_DllAPI static bool registerDynamicType( - Participant* part, - types::DynamicPubSubType* type); - - /** - * Unregister a type in a participant. - * @param part Pointer to the Participant. - * @param typeName Name of the type. - * @return True if correctly unregistered. - */ - RTPS_DllAPI static bool unregisterType( - Participant* part, - const char* typeName); - - /** - * Stop and remove all participants, publishers and subscribers in this Domain. - */ - RTPS_DllAPI static void stopAll(); - - /** - * Load profiles from XML file. - * @param xml_profile_file XML profile file. - * @return True if correctly loaded. - */ - RTPS_DllAPI static bool loadXMLProfilesFile(const std::string& xml_profile_file); - - private: - - typedef std::pair t_p_Participant; - - Domain(); - - virtual ~Domain(); - - static std::mutex m_mutex; - - static std::vector m_participants; - - static bool default_xml_profiles_loaded; +public: + + /** + * Create a Participant from a profile name. + * @param participant_profile Participant profile name. + * @param listen ParticipantListener Pointer. + * @return Participant pointer. (nullptr if not created.) + */ + RTPS_DllAPI DEPRECATED static Participant* createParticipant( + const std::string& participant_profile, + ParticipantListener* listen = nullptr); + + /** + * Create a Participant. + * @param att Participant Attributes. + * @param listen ParticipantListener Pointer. + * @return Participant pointer. (nullptr if not created.) + */ + RTPS_DllAPI DEPRECATED static Participant* createParticipant( + const ParticipantAttributes& att, + ParticipantListener* listen = nullptr); + + //!Fills participant_attributes with the default values. + RTPS_DllAPI static void getDefaultParticipantAttributes( + ParticipantAttributes& participant_attributes); + + /** + * Create a Publisher in a Participant from a profile name. + * @param part Pointer to the participant where you want to create the Publisher. + * @param publisher_profile Publisher profile name. + * @param listen Pointer to the PublisherListener. + * @return Pointer to the created Publisher (nullptr if not created). + */ + RTPS_DllAPI static Publisher* createPublisher( + Participant* part, + const std::string& publisher_profile, + PublisherListener* listen = nullptr); + + /** + * Create a Publisher in a Participant. + * @param part Pointer to the participant where you want to create the Publisher. + * @param att PublisherAttributes. + * @param listen Pointer to the PublisherListener. + * @return Pointer to the created Publisher (nullptr if not created). + */ + RTPS_DllAPI static Publisher* createPublisher( + Participant* part, + const PublisherAttributes& att, + PublisherListener* listen = nullptr); + + //!Fills publisher_attributes with the default values. + RTPS_DllAPI static void getDefaultPublisherAttributes( + PublisherAttributes& publisher_attributes); + + /** + * Create a Subscriber in a Participant from a profile name. + * @param part Pointer to the participant where you want to create the Publisher. + * @param subscriber_profile Subscriber profile name. + * @param listen Pointer to the SubscriberListener. + * @return Pointer to the created Subscriber (nullptr if not created). + */ + RTPS_DllAPI static Subscriber* createSubscriber( + Participant* part, + const std::string& subscriber_profile, + SubscriberListener* listen = nullptr); + + /** + * Create a Subscriber in a Participant. + * @param part Pointer to the participant where you want to create the Publisher. + * @param att SubscriberAttributes. + * @param listen Pointer to the SubscriberListener. + * @return Pointer to the created Subscriber (nullptr if not created). + */ + RTPS_DllAPI static Subscriber* createSubscriber( + Participant* part, + const SubscriberAttributes& att, + SubscriberListener* listen = nullptr); + + //!Fills subscriber_attributes with the default values. + RTPS_DllAPI static void getDefaultSubscriberAttributes( + SubscriberAttributes& subscriber_attributes); + + /** + * Remove a Participant and all associated publishers and subscribers. + * @param part Pointer to the participant. + * @return True if correctly removed. + */ + RTPS_DllAPI static bool removeParticipant( + Participant* part); + + /** + * Remove a Publisher. + * @param pub Pointer to the Publisher. + * @return True if correctly removed. + */ + RTPS_DllAPI static bool removePublisher( + Publisher* pub); + + /** + * Remove a Subscriber. + * @param sub Pointer to the Subscriber. + * @return True if correctly removed. + */ + RTPS_DllAPI static bool removeSubscriber( + Subscriber* sub); + + /** + * Return a registered type. + * @param part Pointer to the Participant. + * @param typeName Name of the type. + * @param type Returned type. + * @return True if type was found. + */ + RTPS_DllAPI static bool getRegisteredType( + Participant* part, + const char* typeName, + fastdds::dds::TopicDataType** type); + + /** + * Register a type in a participant. + * @param part Pointer to the Participant. + * @param type Pointer to the Type. + * @return True if correctly registered. + */ + RTPS_DllAPI static bool registerType( + Participant* part, + fastdds::dds::TopicDataType* type); + + /** + * Register a type in a participant. + * @param part Pointer to the Participant. + * @param type Pointer to the Type. + * @return True if correctly registered. + */ + RTPS_DllAPI static bool registerDynamicType( + Participant* part, + types::DynamicPubSubType* type); + + /** + * Unregister a type in a participant. + * @param part Pointer to the Participant. + * @param typeName Name of the type. + * @return True if correctly unregistered. + */ + RTPS_DllAPI static bool unregisterType( + Participant* part, + const char* typeName); + + /** + * Stop and remove all participants, publishers and subscribers in this Domain. + */ + RTPS_DllAPI static void stopAll(); + + /** + * Load profiles from XML file. + * @param xml_profile_file XML profile file. + * @return True if correctly loaded. + */ + RTPS_DllAPI static bool loadXMLProfilesFile( + const std::string& xml_profile_file); + + /** + * Load profiles from XML string. + * @param data buffer containing XML data. + * @param length length of data. + * @return True if correctly loaded. + */ + RTPS_DllAPI static bool loadXMLProfilesString( + const char* data, + size_t length); + +private: + + typedef std::pair t_p_Participant; + + Domain(); + + virtual ~Domain(); + + static std::mutex m_mutex; + + static std::vector m_participants; + + static bool default_xml_profiles_loaded; }; } /* namespace */ diff --git a/ThirdParty/ros/include/fastrtps/TopicDataType.h b/ThirdParty/ros/include/fastrtps/TopicDataType.h index 5d281a8c3..3129d74c0 100644 --- a/ThirdParty/ros/include/fastrtps/TopicDataType.h +++ b/ThirdParty/ros/include/fastrtps/TopicDataType.h @@ -20,9 +20,6 @@ #define TOPICDATATYPE_H_ #include -#include -#include -#include namespace eprosima { namespace fastrtps { diff --git a/ThirdParty/ros/include/fastrtps/attributes/ParticipantAttributes.h b/ThirdParty/ros/include/fastrtps/attributes/ParticipantAttributes.h index 95f6b00b3..2ba001c08 100644 --- a/ThirdParty/ros/include/fastrtps/attributes/ParticipantAttributes.h +++ b/ThirdParty/ros/include/fastrtps/attributes/ParticipantAttributes.h @@ -52,12 +52,12 @@ class ParticipantAttributes bool operator ==( const ParticipantAttributes& b) const { - return (this->rtps == b.rtps); + return (this->domainId == b.domainId && this->rtps == b.rtps); } }; -} -} +} // namespace fastrtps +} // namespace eprosima #endif /* PARTICIPANTATTRIBUTES_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/attributes/PublisherAttributes.h b/ThirdParty/ros/include/fastrtps/attributes/PublisherAttributes.h index 3dc5eb0f2..d267ddf66 100644 --- a/ThirdParty/ros/include/fastrtps/attributes/PublisherAttributes.h +++ b/ThirdParty/ros/include/fastrtps/attributes/PublisherAttributes.h @@ -30,7 +30,7 @@ #include namespace eprosima { -namespace fastrtps{ +namespace fastrtps { /** * Class PublisherAttributes, used by the user to define the attributes of a Publisher. @@ -39,15 +39,20 @@ namespace fastrtps{ class PublisherAttributes { public: + PublisherAttributes() : historyMemoryPolicy(rtps::PREALLOCATED_MEMORY_MODE) , m_userDefinedID(-1) , m_entityID(-1) - {} + { + } - virtual ~PublisherAttributes(){} + virtual ~PublisherAttributes() + { + } - bool operator==(const PublisherAttributes& b) const + bool operator ==( + const PublisherAttributes& b) const { return (this->m_userDefinedID == b.m_userDefinedID) && (this->m_entityID == b.m_entityID) && @@ -93,33 +98,49 @@ class PublisherAttributes * Get the user defined ID * @return User defined ID */ - inline int16_t getUserDefinedID() const { return m_userDefinedID; } + inline int16_t getUserDefinedID() const + { + return m_userDefinedID; + } /** * Get the entity defined ID * @return Entity ID */ - inline int16_t getEntityID() const { return m_entityID; } + inline int16_t getEntityID() const + { + return m_entityID; + } /** * Set the user defined ID * @param id User defined ID to be set */ - inline void setUserDefinedID(uint8_t id) { m_userDefinedID = id; } + inline void setUserDefinedID( + uint8_t id) + { + m_userDefinedID = id; + } /** * Set the entity ID * @param id Entity ID to be set */ - inline void setEntityID(uint8_t id) { m_entityID = id; } + inline void setEntityID( + uint8_t id) + { + m_entityID = id; + } + private: + //!User Defined ID, used for StaticEndpointDiscovery, default value -1. int16_t m_userDefinedID; //!Entity ID, if the user want to specify the EntityID of the enpoint, default value -1. int16_t m_entityID; }; -} +} // namespace fastrtps } /* namespace eprosima */ #endif /* PUBLISHERATTRIBUTES_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/config.h b/ThirdParty/ros/include/fastrtps/config.h index 09af300f4..d847d628a 100644 --- a/ThirdParty/ros/include/fastrtps/config.h +++ b/ThirdParty/ros/include/fastrtps/config.h @@ -16,68 +16,101 @@ #define _FASTRTPS_CONFIG_H_ #define FASTRTPS_VERSION_MAJOR 2 -#define FASTRTPS_VERSION_MINOR 1 -#define FASTRTPS_VERSION_MICRO 2 -#define FASTRTPS_VERSION_STR "2.1.2" +#define FASTRTPS_VERSION_MINOR 6 +#define FASTRTPS_VERSION_MICRO 4 +#define FASTRTPS_VERSION_STR "2.6.4" #define GEN_API_VER 1 +// C++20 support defines +#ifndef HAVE_CXX20 +#define HAVE_CXX20 0 +#endif /* ifndef HAVE_CXX20 */ + +// C++17 support defines +#ifndef HAVE_CXX17 +#define HAVE_CXX17 0 +#endif /* ifndef HAVE_CXX17 */ + // C++14 support defines #ifndef HAVE_CXX14 #define HAVE_CXX14 0 -#endif +#endif /* ifndef HAVE_CXX14 */ // C++1Y support defines #ifndef HAVE_CXX1Y #define HAVE_CXX1Y 0 -#endif +#endif /* ifndef HAVE_CXX1Y */ // C++11 support defines #ifndef HAVE_CXX11 #define HAVE_CXX11 1 -#endif +#endif /* ifndef HAVE_CXX11 */ // C++0x support defines #ifndef HAVE_CXX0X #define HAVE_CXX0X 1 -#endif +#endif /* ifndef HAVE_CXX0X */ // C++ constexpr support #ifndef HAVE_CXX_CONSTEXPR #define HAVE_CXX_CONSTEXPR 1 -#endif +#endif /* ifndef HAVE_CXX_CONSTEXPR */ #if HAVE_CXX_CONSTEXPR #define CONSTEXPR constexpr #else #define CONSTEXPR const -#endif +#endif /* if HAVE_CXX_CONSTEXPR */ // Endianness defines #ifndef FASTDDS_IS_BIG_ENDIAN_TARGET #define FASTDDS_IS_BIG_ENDIAN_TARGET 0 -#endif +#endif /* ifndef FASTDDS_IS_BIG_ENDIAN_TARGET */ // Security #ifndef HAVE_SECURITY #define HAVE_SECURITY 0 -#endif +#endif /* ifndef HAVE_SECURITY */ //Sqlite3 support #ifndef HAVE_SQLITE3 #define HAVE_SQLITE3 1 -#endif +#endif /* ifndef HAVE_SQLITE3 */ +// Using thirdparty shared_mutex +#define USE_THIRDPARTY_SHARED_MUTEX 1 // TLS support #ifndef TLS_FOUND #define TLS_FOUND 1 -#endif +#endif /* ifndef TLS_FOUND */ // Strict real-time #ifndef HAVE_STRICT_REALTIME #define HAVE_STRICT_REALTIME 0 -#endif +#endif /* ifndef HAVE_STRICT_REALTIME */ + +/* Log Macros */ + +// Log Info +/* #undef FASTDDS_ENFORCE_LOG_INFO */ +#ifndef HAVE_LOG_NO_INFO +#define HAVE_LOG_NO_INFO 1 +#endif /* ifndef HAVE_LOG_NO_INFO */ + +// Log Warning +#ifndef HAVE_LOG_NO_WARNING +#define HAVE_LOG_NO_WARNING 0 +#endif /* ifndef HAVE_LOG_NO_WARNING */ + +// Log Error +#ifndef HAVE_LOG_NO_ERROR +#define HAVE_LOG_NO_ERROR 0 +#endif /* ifndef HAVE_LOG_NO_ERROR */ + +// Statistics +/* #undef FASTDDS_STATISTICS */ // Deprecated macro #if __cplusplus >= 201402L @@ -88,6 +121,16 @@ #define FASTRTPS_DEPRECATED(msg) __declspec(deprecated(msg)) #else #define FASTRTPS_DEPRECATED(msg) -#endif +#endif /* if __cplusplus >= 201402L */ + +// Deprecation with version +#define FASTDDS_DEPRECATED_UNTIL(major, entity_name, msg) \ + static_assert(FASTRTPS_VERSION_MAJOR < major, #entity_name " reached deprecation version " #major); \ + FASTRTPS_DEPRECATED(#entity_name " has been deprecated and will be removed on major version " #major ". " msg) + +#define FASTDDS_TODO_BEFORE(major, minor, msg) \ + static_assert((FASTRTPS_VERSION_MAJOR < major) || \ + (FASTRTPS_VERSION_MAJOR == major && FASTRTPS_VERSION_MINOR < minor), \ + "TODO before version " #major "." #minor " : " #msg); #endif // _FASTRTPS_CONFIG_H_ diff --git a/ThirdParty/ros/include/fastrtps/config/doxygen_modules.h b/ThirdParty/ros/include/fastrtps/config/doxygen_modules.h index 0a3e4df5e..4aa8368b3 100644 --- a/ThirdParty/ros/include/fastrtps/config/doxygen_modules.h +++ b/ThirdParty/ros/include/fastrtps/config/doxygen_modules.h @@ -21,14 +21,14 @@ //Description of doxygen modules, not used in actual code. - /*! +/*! * @defgroup FASTRTPS_GENERAL_API eProsima Fast RTPS API Reference * @brief eProsima Fast RTPS API grouped in modules. */ - /*! +/*! * @defgroup RTPS_MODULE RTPS * @ingroup FASTRTPS_GENERAL_API * @brief RTPS API @@ -61,7 +61,7 @@ /** @defgroup NETWORK_MODULE Network Module * @ingroup RTPS_MODULE - * Includes the elements necessary to interface between the + * Includes the elements necessary to interface between the * transport layer and the FastRTPS library. */ @@ -108,8 +108,12 @@ * This module contains the classes associated with the Writer Liveliness Protocols. */ -#endif +/** @defgroup SECURITY_MODULE Security Module + * @ingroup MANAGEMENT_MODULE + * This module contains the classes associated with DDS Security (see https://www.omg.org/spec/DDS-SECURITY/) + */ +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC /** @defgroup UTILITIES_MODULE Shared Utilities * @ingroup FASTRTPS_GENERAL_API @@ -135,6 +139,6 @@ /** * @namespace eprosima::fastrtps::rtps::TimeConv Auxiliary methods to convert to Time_t to more manageable types. * @ingroup UTILITIES_MODULE - */ + */ #endif /* RTPS_DOXYGEN_MODULES_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/publisher/Publisher.h b/ThirdParty/ros/include/fastrtps/publisher/Publisher.h index 1450fcb4f..7f2ca22d8 100644 --- a/ThirdParty/ros/include/fastrtps/publisher/Publisher.h +++ b/ThirdParty/ros/include/fastrtps/publisher/Publisher.h @@ -34,7 +34,7 @@ namespace rtps { struct GUID_t; class WriteParams; class RTPSParticipant; -} +} // namespace rtps class Participant; class PublisherImpl; @@ -173,6 +173,14 @@ class RTPS_DllAPI Publisher void get_liveliness_lost_status( LivelinessLostStatus& status); + /** + * Get the list of locators from which this publisher may send data. + * + * @param [out] locators LocatorList_t where the list of locators will be stored. + */ + void get_sending_locators( + rtps::LocatorList_t& locators) const; + private: PublisherImpl* mp_impl; diff --git a/ThirdParty/ros/include/fastrtps/publisher/PublisherHistory.h b/ThirdParty/ros/include/fastrtps/publisher/PublisherHistory.h index 620e5d6d2..5a4059fc5 100644 --- a/ThirdParty/ros/include/fastrtps/publisher/PublisherHistory.h +++ b/ThirdParty/ros/include/fastrtps/publisher/PublisherHistory.h @@ -21,12 +21,16 @@ #define PUBLISHERHISTORY_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include +#include +#include +#include +#include #include -#include -#include +#include #include +#include +#include namespace eprosima { namespace fastrtps { @@ -44,7 +48,7 @@ class PublisherHistory : public rtps::WriterHistory * Constructor of the PublisherHistory. * @param topic_att TopicAttributed * @param payloadMax Maximum payload size. - * @param mempolicy Set wether the payloads ccan dynamically resized or not. + * @param mempolicy Set whether the payloads ccan dynamically resized or not. */ PublisherHistory( const TopicAttributes& topic_att, @@ -141,6 +145,18 @@ class PublisherHistory : public rtps::WriterHistory bool is_key_registered( const rtps::InstanceHandle_t& handle); + /** + * Waits till the last change in the instance history has been acknowledged. + * @param handle Instance's handle. + * @param lock Lock which should be unlock in case the operation has to wait. + * @param max_blocking_time Maximum time the operation should be waiting. + * @return true when the last change of the instance history is acknowleged, false when timeout is reached. + */ + bool wait_for_acknowledgement_last_change( + const rtps::InstanceHandle_t& handle, + std::unique_lock& lock, + const std::chrono::time_point& max_blocking_time); + private: typedef std::map t_m_Inst_Caches; @@ -165,6 +181,18 @@ class PublisherHistory : public rtps::WriterHistory bool find_or_add_key( const rtps::InstanceHandle_t& instance_handle, t_m_Inst_Caches::iterator* map_it); + + /** + * Add a change comming from the Publisher. + * @param change Pointer to the change + * @param lock + * @param max_blocking_time + * @return True if added. + */ + bool prepare_change( + rtps::CacheChange_t* change, + std::unique_lock& lock, + const std::chrono::time_point& max_blocking_time); }; } /* namespace fastrtps */ diff --git a/ThirdParty/ros/include/fastrtps/publisher/PublisherListener.h b/ThirdParty/ros/include/fastrtps/publisher/PublisherListener.h index 9b49a4b20..04107aa2d 100644 --- a/ThirdParty/ros/include/fastrtps/publisher/PublisherListener.h +++ b/ThirdParty/ros/include/fastrtps/publisher/PublisherListener.h @@ -36,8 +36,14 @@ class Publisher; class RTPS_DllAPI PublisherListener { public: - PublisherListener(){} - virtual ~PublisherListener(){} + + PublisherListener() + { + } + + virtual ~PublisherListener() + { + } /** * This method is called when the Publisher is matched (or unmatched) against an endpoint. @@ -66,7 +72,7 @@ class RTPS_DllAPI PublisherListener } /** - * @brief Method called when the livelivess of a publisher is lost + * @brief Method called when the liveliness of a publisher is lost * @param pub The publisher * @param status The liveliness lost status */ @@ -77,6 +83,7 @@ class RTPS_DllAPI PublisherListener (void)pub; (void)status; } + }; } /* namespace rtps */ diff --git a/ThirdParty/ros/include/fastrtps/qos/DeadlineMissedStatus.h b/ThirdParty/ros/include/fastrtps/qos/DeadlineMissedStatus.h index a669947af..a50117d9b 100644 --- a/ThirdParty/ros/include/fastrtps/qos/DeadlineMissedStatus.h +++ b/ThirdParty/ros/include/fastrtps/qos/DeadlineMissedStatus.h @@ -21,8 +21,6 @@ #include -#include - namespace eprosima { namespace fastrtps { diff --git a/ThirdParty/ros/include/fastrtps/qos/LivelinessChangedStatus.h b/ThirdParty/ros/include/fastrtps/qos/LivelinessChangedStatus.h index 97bed5d78..41e199395 100644 --- a/ThirdParty/ros/include/fastrtps/qos/LivelinessChangedStatus.h +++ b/ThirdParty/ros/include/fastrtps/qos/LivelinessChangedStatus.h @@ -21,8 +21,6 @@ #include -#include - namespace eprosima { namespace fastrtps { diff --git a/ThirdParty/ros/include/fastrtps/qos/QosPolicies.h b/ThirdParty/ros/include/fastrtps/qos/QosPolicies.h index 0fe61de2f..940371b8c 100644 --- a/ThirdParty/ros/include/fastrtps/qos/QosPolicies.h +++ b/ThirdParty/ros/include/fastrtps/qos/QosPolicies.h @@ -94,6 +94,11 @@ constexpr TypeConsistencyKind DISALLOW_TYPE_COERCION = TypeConsistencyKind::DISA constexpr TypeConsistencyKind ALLOW_TYPE_COERCION = TypeConsistencyKind::ALLOW_TYPE_COERCION; using TypeConsistencyEnforcementQosPolicy = fastdds::dds::TypeConsistencyEnforcementQosPolicy; using DisablePositiveACKsQosPolicy = fastdds::dds::DisablePositiveACKsQosPolicy; +using DataSharingQosPolicy = fastdds::dds::DataSharingQosPolicy; +using DataSharingKind = fastdds::dds::DataSharingKind; +constexpr DataSharingKind AUTO = DataSharingKind::AUTO; +constexpr DataSharingKind ON = DataSharingKind::ON; +constexpr DataSharingKind OFF = DataSharingKind::OFF; using TypeIdV1 = fastdds::dds::TypeIdV1; using TypeObjectV1 = fastdds::dds::TypeObjectV1; @@ -101,7 +106,7 @@ namespace xtypes { using TypeInformation = fastdds::dds::xtypes::TypeInformation; } //namespace xtypes -} -} +} // namespace fastrtps +} // namespace eprosima #endif /* QOS_POLICIES_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/qos/SampleRejectedStatus.hpp b/ThirdParty/ros/include/fastrtps/qos/SampleRejectedStatus.hpp index f6aa0d714..7990a9de9 100644 --- a/ThirdParty/ros/include/fastrtps/qos/SampleRejectedStatus.hpp +++ b/ThirdParty/ros/include/fastrtps/qos/SampleRejectedStatus.hpp @@ -21,8 +21,6 @@ #include -#include - namespace eprosima { namespace fastrtps { diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPClient.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPClient.h deleted file mode 100644 index b590e5d1e..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPClient.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file EDPClient.h - * - */ - -#ifndef EDPCLIENT_H_ -#define EDPCLIENT_H_ - -#include - -#endif /* EDPCLIENT_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPServer.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPServer.h deleted file mode 100644 index 925541e9b..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/endpoint/EDPServer.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file EDPServer.h - * - */ - -#ifndef EDPSERVER_H_ -#define EDPSERVER_H_ - -#include - -#endif /* EDPSERVER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPClient.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPClient.h deleted file mode 100644 index d85cf069c..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPClient.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPClient.h - * - */ - -#ifndef PDPCLIENT_H_ -#define PDPCLIENT_H_ - -#include - -#endif /* PDPCLIENT_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServer.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServer.h deleted file mode 100644 index 1602f4ec8..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServer.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPServer.h - * - */ - -#ifndef PDPSERVER_H_ -#define PDPSERVER_H_ - -#include - -#endif /* PDPSERVER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServerListener.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServerListener.h deleted file mode 100644 index 4d7d60578..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/PDPServerListener.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file PDPServerListener.h - * - */ - -#ifndef PDPSERVERLISTENER_H_ -#define PDPSERVERLISTENER_H_ - -#include - -#endif /* PDPSERVERLISTENER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h deleted file mode 100644 index fbc23becf..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DSClientEvent.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file DSClientEvent.h - * - */ - -#ifndef DSCLIENTEVENT_H_ -#define DSCLIENTEVENT_H_ - -#include - -#endif /* DSCLIENTEVENT_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DServerEvent.h b/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DServerEvent.h deleted file mode 100644 index f26f0c67f..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/builtin/discovery/participant/timedevent/DServerEvent.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file DServerEvent.h - * - */ - -#ifndef DSERVEREVENT_H_ -#define DSERVEREVENT_H_ - -#include - -#endif /* DSERVEREVENT_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/rtps/network/NetworkFactory.h b/ThirdParty/ros/include/fastrtps/rtps/network/NetworkFactory.h index 570b0b92c..be627150a 100644 --- a/ThirdParty/ros/include/fastrtps/rtps/network/NetworkFactory.h +++ b/ThirdParty/ros/include/fastrtps/rtps/network/NetworkFactory.h @@ -17,4 +17,4 @@ #include -#endif +#endif // ifndef NETWORK_FACTORY_HPP diff --git a/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncInterestTree.h b/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncInterestTree.h deleted file mode 100644 index c29e46aa5..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncInterestTree.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ -#define _RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ - -#include - -#endif // _RTPS_RESOURCES_ASYNC_INTEREST_TREE_H_ diff --git a/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncWriterThread.h b/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncWriterThread.h deleted file mode 100644 index 9523ac57c..000000000 --- a/ThirdParty/ros/include/fastrtps/rtps/resources/AsyncWriterThread.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file AsyncWriterThread.h - * - */ -#ifndef _RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ -#define _RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ - -#include - -#endif // _RTPS_RESOURCES_ASYNCWRITERTHREAD_H_ diff --git a/ThirdParty/ros/include/fastrtps/subscriber/Subscriber.h b/ThirdParty/ros/include/fastrtps/subscriber/Subscriber.h index 245b5aa23..30913ec7d 100644 --- a/ThirdParty/ros/include/fastrtps/subscriber/Subscriber.h +++ b/ThirdParty/ros/include/fastrtps/subscriber/Subscriber.h @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -168,6 +169,14 @@ class RTPS_DllAPI Subscriber void get_liveliness_changed_status( LivelinessChangedStatus& status); + /** + * Get the list of locators on which this subscriber is listening. + * + * @param [out] locators LocatorList_t where the list of locators will be stored. + */ + void get_listening_locators( + rtps::LocatorList_t& locators) const; + private: SubscriberImpl* mp_impl; diff --git a/ThirdParty/ros/include/fastrtps/subscriber/SubscriberHistory.h b/ThirdParty/ros/include/fastrtps/subscriber/SubscriberHistory.h index 1905d555b..be94ed6a2 100644 --- a/ThirdParty/ros/include/fastrtps/subscriber/SubscriberHistory.h +++ b/ThirdParty/ros/include/fastrtps/subscriber/SubscriberHistory.h @@ -50,7 +50,7 @@ class SubscriberHistory : public rtps::ReaderHistory * @param type TopicDataType. * @param qos ReaderQoS policy. * @param payloadMax Maximum payload size per change. - * @param mempolicy Set wether the payloads ccan dynamically resized or not. + * @param mempolicy Set whether the payloads ccan dynamically resized or not. */ SubscriberHistory( const TopicAttributes& topic_att, @@ -59,7 +59,38 @@ class SubscriberHistory : public rtps::ReaderHistory uint32_t payloadMax, rtps::MemoryManagementPolicy_t mempolicy); - virtual ~SubscriberHistory(); + ~SubscriberHistory() override; + + /** + * Remove a specific change from the history. + * No Thread Safe + * @param removal iterator to the CacheChange_t to remove. + * @param release defaults to true and hints if the CacheChange_t should return to the pool + * @return iterator to the next CacheChange_t or end iterator. + */ + iterator remove_change_nts( + const_iterator removal, + bool release = true) override; + + /** + * Check if a new change can be added to this history. + * + * @param [in] writer_guid GUID of the writer where the change came from. + * @param [in] total_payload_size Total payload size of the incoming change. + * @param [in] unknown_missing_changes_up_to The number of changes from the same writer with a lower sequence + * number that could potentially be received in the future. + * @param [out] will_never_be_accepted When the method returns @c false, this parameter will inform + * whether the change could be accepted in the future or not. + * + * @pre change should not be present in the history + * + * @return Whether a call to received_change will succeed when called with the same arguments. + */ + bool can_change_be_added_nts( + const rtps::GUID_t& writer_guid, + uint32_t total_payload_size, + size_t unknown_missing_changes_up_to, + bool& will_never_be_accepted) const override; /** * Called when a change is received by the Subscriber. Will add the change to the history. @@ -70,7 +101,16 @@ class SubscriberHistory : public rtps::ReaderHistory */ bool received_change( rtps::CacheChange_t* change, - size_t unknown_missing_changes_up_to); + size_t unknown_missing_changes_up_to) override; + + /** + * Called when a fragmented change is received completely by the Subscriber. Will find its instance and store it. + * @pre Change should be already present in the history. + * @param[in] change The received change + * @return + */ + bool completed_change( + rtps::CacheChange_t* change) override; /** @name Read or take data methods. * Methods to read or take data from the History. @@ -107,6 +147,16 @@ class SubscriberHistory : public rtps::ReaderHistory bool remove_change_sub( rtps::CacheChange_t* change); + /** + * This method is called to remove a change from the SubscriberHistory. + * @param [in] change Pointer to the CacheChange_t. + * @param [in,out] it Iterator pointing to change on input. Will point to next valid change on output. + * @return True if removed. + */ + bool remove_change_sub( + rtps::CacheChange_t* change, + iterator& it); + /** * @brief A method to set the next deadline for the given instance * @param handle The handle to the instance @@ -152,15 +202,18 @@ class SubscriberHistory : public rtps::ReaderHistory /// Function processing a received change std::function receive_fn_; + /// Function processing a completed fragmented change + std::function complete_fn_; + /** * @brief Method that finds a key in m_keyedChanges or tries to add it if not found * @param a_change The change to get the key from - * @param map_it A map iterator to the given key + * @param[out] map_it A map iterator to the given key * @return True if it was found or could be added to the map */ bool find_key( rtps::CacheChange_t* a_change, - t_m_Inst_Caches::iterator* map_it); + t_m_Inst_Caches::iterator& map_it); /** * @brief Method that finds a key in m_keyedChanges or tries to add it if not found @@ -195,6 +248,12 @@ class SubscriberHistory : public rtps::ReaderHistory bool received_change_keep_last_with_key( rtps::CacheChange_t* change, size_t unknown_missing_changes_up_to); + + bool completed_change_keep_all_with_key( + rtps::CacheChange_t* change); + + bool completed_change_keep_last_with_key( + rtps::CacheChange_t* change); ///@} bool add_received_change( @@ -214,6 +273,6 @@ class SubscriberHistory : public rtps::ReaderHistory } // namespace fastrtps } // namespace eprosima -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* SUBSCRIBERHISTORY_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/transport/ChannelResource.h b/ThirdParty/ros/include/fastrtps/transport/ChannelResource.h deleted file mode 100644 index 224be8d99..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/ChannelResource.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef CHANNEL_RESOURCE_INFO_ -#define CHANNEL_RESOURCE_INFO_ - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using ChannelResource = fastdds::rtps::ChannelResource; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // CHANNEL_RESOURCE_INFO_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptor.h b/ThirdParty/ros/include/fastrtps/transport/TCPAcceptor.h deleted file mode 100644 index b10d4f5d7..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptor.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_ACCEPTOR_BASE_ -#define _TCP_ACCEPTOR_BASE_ - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPAcceptor = fastdds::rtps::TCPAcceptor; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_ACCEPTOR_BASE_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorBasic.h b/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorBasic.h deleted file mode 100644 index 14a15e1cc..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorBasic.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_ACCEPTOR_BASIC_ -#define _TCP_ACCEPTOR_BASIC_ - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPAcceptorBasic = fastdds::rtps::TCPAcceptorBasic; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_ACCEPTOR_BASIC_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorSecure.h b/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorSecure.h deleted file mode 100644 index 9ab778f4b..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPAcceptorSecure.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_ACCEPTOR_SECURE_ -#define _TCP_ACCEPTOR_SECURE_ - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPAcceptorSecure = fastdds::rtps::TCPAcceptorSecure; - - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_ACCEPTOR_SECURE_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResource.h b/ThirdParty/ros/include/fastrtps/transport/TCPChannelResource.h deleted file mode 100644 index c80b4ed16..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResource.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_CHANNEL_RESOURCE_BASE_ -#define _TCP_CHANNEL_RESOURCE_BASE_ - -#include -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPChannelResource = fastdds::rtps::TCPChannelResource; - -using eSocketErrorCodes = fastdds::rtps::eSocketErrorCodes; - -constexpr eSocketErrorCodes eNoError = eSocketErrorCodes::eNoError; -constexpr eSocketErrorCodes eBrokenPipe = eSocketErrorCodes::eBrokenPipe; -constexpr eSocketErrorCodes eAsioError = eSocketErrorCodes::eAsioError; -constexpr eSocketErrorCodes eSystemError = eSocketErrorCodes::eSystemError; -constexpr eSocketErrorCodes eException = eSocketErrorCodes::eException; -constexpr eSocketErrorCodes eConnectionAborted = eSocketErrorCodes::eConnectionAborted; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_CHANNEL_RESOURCE_BASE_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceBasic.h b/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceBasic.h deleted file mode 100644 index a1ca19002..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceBasic.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_CHANNEL_RESOURCE_BASIC_ -#define _TCP_CHANNEL_RESOURCE_BASIC_ - -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPChannelResourceBasic = fastdds::rtps::TCPChannelResourceBasic; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_CHANNEL_RESOURCE_BASIC_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceSecure.h b/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceSecure.h deleted file mode 100644 index ea38d45c3..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPChannelResourceSecure.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _TCP_CHANNEL_RESOURCE_SECURE_ -#define _TCP_CHANNEL_RESOURCE_SECURE_ - -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPChannelResourceSecure = fastdds::rtps::TCPChannelResourceSecure; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // _TCP_CHANNEL_RESOURCE_SECURE_ diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPTransportInterface.h b/ThirdParty/ros/include/fastrtps/transport/TCPTransportInterface.h deleted file mode 100644 index 43dc69e6b..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPTransportInterface.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TCP_TRANSPORT_INTERFACE_H -#define TCP_TRANSPORT_INTERFACE_H - -#include -#include -#include -#include -#include - -#if TLS_FOUND -#include -#endif - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPTransportInterface = fastdds::rtps::TCPTransportInterface; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // TCP_TRANSPORT_INTERFACE_H diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPv4Transport.h b/ThirdParty/ros/include/fastrtps/transport/TCPv4Transport.h deleted file mode 100644 index 8364cd9cf..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPv4Transport.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TCPV4_TRANSPORT_H -#define TCPV4_TRANSPORT_H - -#include -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPv4Transport = fastdds::rtps::TCPv4Transport; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif diff --git a/ThirdParty/ros/include/fastrtps/transport/TCPv6Transport.h b/ThirdParty/ros/include/fastrtps/transport/TCPv6Transport.h deleted file mode 100644 index a10199f95..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/TCPv6Transport.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TCPV6_TRANSPORT_H -#define TCPV6_TRANSPORT_H - -#include -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using TCPv6Transport = fastdds::rtps::TCPv6Transport; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif diff --git a/ThirdParty/ros/include/fastrtps/transport/TransportInterface.h b/ThirdParty/ros/include/fastrtps/transport/TransportInterface.h index 6d17dbd05..9f0a5f887 100644 --- a/ThirdParty/ros/include/fastrtps/transport/TransportInterface.h +++ b/ThirdParty/ros/include/fastrtps/transport/TransportInterface.h @@ -20,9 +20,9 @@ #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { using SendResourceList = fastdds::rtps::SendResourceList; using TransportInterface = fastdds::rtps::TransportInterface; @@ -37,4 +37,4 @@ static const std::string s_IPv6AddressAny = fastdds::rtps::s_IPv6AddressAny; } // namespace fastrtps } // namespace eprosima -#endif +#endif // ifndef TRANSPORT_INTERFACE_H diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPChannelResource.h b/ThirdParty/ros/include/fastrtps/transport/UDPChannelResource.h deleted file mode 100644 index fa3206ec0..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/UDPChannelResource.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef UDP_CHANNEL_RESOURCE_INFO_ -#define UDP_CHANNEL_RESOURCE_INFO_ - -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using UDPChannelResource = fastdds::rtps::UDPChannelResource; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // UDP_CHANNEL_RESOURCE_INFO_ diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPTransportInterface.h b/ThirdParty/ros/include/fastrtps/transport/UDPTransportInterface.h deleted file mode 100644 index 4906614a4..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/UDPTransportInterface.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef UDP_TRANSPORT_INTERFACE_H -#define UDP_TRANSPORT_INTERFACE_H - -#include -#include -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using UDPTransportInterface = fastdds::rtps::UDPTransportInterface; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif // UDP_TRANSPORT_INTERFACE_H diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPv4Transport.h b/ThirdParty/ros/include/fastrtps/transport/UDPv4Transport.h deleted file mode 100644 index 1b89a97a8..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/UDPv4Transport.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef UDPV4_TRANSPORT_H -#define UDPV4_TRANSPORT_H - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using UDPv4Transport = fastdds::rtps::UDPv4Transport; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPv4TransportDescriptor.h b/ThirdParty/ros/include/fastrtps/transport/UDPv4TransportDescriptor.h index e10810af2..835c24c9c 100644 --- a/ThirdParty/ros/include/fastrtps/transport/UDPv4TransportDescriptor.h +++ b/ThirdParty/ros/include/fastrtps/transport/UDPv4TransportDescriptor.h @@ -19,9 +19,9 @@ #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { using UDPv4TransportDescriptor = fastdds::rtps::UDPv4TransportDescriptor; @@ -29,4 +29,4 @@ using UDPv4TransportDescriptor = fastdds::rtps::UDPv4TransportDescriptor; } // namespace fastrtps } // namespace eprosima -#endif +#endif // ifndef UDPV4_TRANSPORT_DESCRIPTOR diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPv6Transport.h b/ThirdParty/ros/include/fastrtps/transport/UDPv6Transport.h deleted file mode 100644 index 822e1b484..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/UDPv6Transport.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef UDPV6_TRANSPORT_H -#define UDPV6_TRANSPORT_H - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using UDPv6Transport = fastdds::rtps::UDPv6Transport; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif diff --git a/ThirdParty/ros/include/fastrtps/transport/UDPv6TransportDescriptor.h b/ThirdParty/ros/include/fastrtps/transport/UDPv6TransportDescriptor.h index 2f3ff3d66..546dc81d5 100644 --- a/ThirdParty/ros/include/fastrtps/transport/UDPv6TransportDescriptor.h +++ b/ThirdParty/ros/include/fastrtps/transport/UDPv6TransportDescriptor.h @@ -19,9 +19,9 @@ #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { using UDPv6TransportDescriptor = fastdds::rtps::UDPv6TransportDescriptor; @@ -29,4 +29,4 @@ using UDPv6TransportDescriptor = fastdds::rtps::UDPv6TransportDescriptor; } // namespace fastrtps } // namespace eprosima -#endif +#endif // ifndef UDPV6_TRANSPORT_DESCRIPTOR diff --git a/ThirdParty/ros/include/fastrtps/transport/test_UDPv4Transport.h b/ThirdParty/ros/include/fastrtps/transport/test_UDPv4Transport.h deleted file mode 100644 index bd10de541..000000000 --- a/ThirdParty/ros/include/fastrtps/transport/test_UDPv4Transport.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TEST_UDPV4_TRANSPORT_H -#define TEST_UDPV4_TRANSPORT_H - -#include -#include - -#include - -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ - -using test_UDPv4Transport = fastdds::rtps::test_UDPv4Transport; - -} // namespace rtps -} // namespace fastrtps -} // namespace eprosima - -#endif diff --git a/ThirdParty/ros/include/fastrtps/transport/test_UDPv4TransportDescriptor.h b/ThirdParty/ros/include/fastrtps/transport/test_UDPv4TransportDescriptor.h index 48c50e224..878fb671c 100644 --- a/ThirdParty/ros/include/fastrtps/transport/test_UDPv4TransportDescriptor.h +++ b/ThirdParty/ros/include/fastrtps/transport/test_UDPv4TransportDescriptor.h @@ -19,9 +19,9 @@ #include -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ +namespace eprosima { +namespace fastrtps { +namespace rtps { using test_UDPv4TransportDescriptor = fastdds::rtps::test_UDPv4TransportDescriptor; @@ -29,4 +29,4 @@ using test_UDPv4TransportDescriptor = fastdds::rtps::test_UDPv4TransportDescript } // namespace fastrtps } // namespace eprosima -#endif +#endif // ifndef TEST_UDPV4_TRANSPORT_DESCRIPTOR diff --git a/ThirdParty/ros/include/fastrtps/types/AnnotationParameterValue.h b/ThirdParty/ros/include/fastrtps/types/AnnotationParameterValue.h index e63082e2e..b56f44797 100644 --- a/ThirdParty/ros/include/fastrtps/types/AnnotationParameterValue.h +++ b/ThirdParty/ros/include/fastrtps/types/AnnotationParameterValue.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -66,39 +67,39 @@ class ExtendedAnnotationParameterValue /*! * @brief Default constructor. */ - ExtendedAnnotationParameterValue(); + RTPS_DllAPI ExtendedAnnotationParameterValue(); /*! * @brief Default destructor. */ - ~ExtendedAnnotationParameterValue(); + RTPS_DllAPI ~ExtendedAnnotationParameterValue(); /*! * @brief Copy constructor. * @param x Reference to the object ExtendedAnnotationParameterValue that will be copied. */ - ExtendedAnnotationParameterValue( + RTPS_DllAPI ExtendedAnnotationParameterValue( const ExtendedAnnotationParameterValue& x); /*! * @brief Move constructor. * @param x Reference to the object ExtendedAnnotationParameterValue that will be copied. */ - ExtendedAnnotationParameterValue( + RTPS_DllAPI ExtendedAnnotationParameterValue( ExtendedAnnotationParameterValue&& x); /*! * @brief Copy assignment. * @param x Reference to the object ExtendedAnnotationParameterValue that will be copied. */ - ExtendedAnnotationParameterValue& operator =( + RTPS_DllAPI ExtendedAnnotationParameterValue& operator =( const ExtendedAnnotationParameterValue& x); /*! * @brief Move assignment. * @param x Reference to the object ExtendedAnnotationParameterValue that will be copied. */ - ExtendedAnnotationParameterValue& operator =( + RTPS_DllAPI ExtendedAnnotationParameterValue& operator =( ExtendedAnnotationParameterValue&& x); /*! @@ -107,7 +108,7 @@ class ExtendedAnnotationParameterValue * @param current_alignment Buffer alignment. * @return Serialized size. */ - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const ExtendedAnnotationParameterValue& data, size_t current_alignment = 0); @@ -116,14 +117,14 @@ class ExtendedAnnotationParameterValue * @brief This function serializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void serialize( + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; /*! * @brief This function deserializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void deserialize( + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); @@ -134,22 +135,22 @@ class ExtendedAnnotationParameterValue * @param current_alignment Buffer alignment. * @return Maximum serialized size. */ - static size_t getKeyMaxCdrSerializedSize( + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); /*! * @brief This function tells you if the Key has been defined for this type */ - static bool isKeyDefined(); + RTPS_DllAPI static bool isKeyDefined(); /*! * @brief This function serializes the key members of an object using CDR serialization. * @param cdr CDR serialization object. */ - void serializeKey( + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const ExtendedAnnotationParameterValue&) const { return true; @@ -168,39 +169,39 @@ class AnnotationParameterValue /*! * @brief Default constructor. */ - AnnotationParameterValue(); + RTPS_DllAPI AnnotationParameterValue(); /*! * @brief Default destructor. */ - ~AnnotationParameterValue(); + RTPS_DllAPI ~AnnotationParameterValue(); /*! * @brief Copy constructor. * @param x Reference to the object AnnotationParameterValue that will be copied. */ - AnnotationParameterValue( + RTPS_DllAPI AnnotationParameterValue( const AnnotationParameterValue& x); /*! * @brief Move constructor. * @param x Reference to the object AnnotationParameterValue that will be copied. */ - AnnotationParameterValue( + RTPS_DllAPI AnnotationParameterValue( AnnotationParameterValue&& x); /*! * @brief Copy assignment. * @param x Reference to the object AnnotationParameterValue that will be copied. */ - AnnotationParameterValue& operator =( + RTPS_DllAPI AnnotationParameterValue& operator =( const AnnotationParameterValue& x); /*! * @brief Move assignment. * @param x Reference to the object AnnotationParameterValue that will be copied. */ - AnnotationParameterValue& operator =( + RTPS_DllAPI AnnotationParameterValue& operator =( AnnotationParameterValue&& x); /*! @@ -208,26 +209,26 @@ class AnnotationParameterValue * @param __d New value for the discriminator. * @exception eprosima::fastcdr::BadParamException This exception is thrown if the new value doesn't correspond to the selected union member. */ - void _d( + RTPS_DllAPI void _d( char __d); /*! * @brief This function returns the value of the discriminator. * @return Value of the discriminator */ - char _d() const; + RTPS_DllAPI char _d() const; /*! * @brief This function returns a reference to the discriminator. * @return Reference to the discriminator. */ - char& _d(); + RTPS_DllAPI char& _d(); /*! * @brief This function sets a value in member boolean_value * @param _boolean_value New value for member boolean_value */ - void boolean_value( + RTPS_DllAPI void boolean_value( bool _boolean_value); /*! @@ -235,19 +236,19 @@ class AnnotationParameterValue * @return Value of member boolean_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - bool boolean_value() const; + RTPS_DllAPI bool boolean_value() const; /*! * @brief This function returns a reference to member boolean_value * @return Reference to member boolean_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - bool& boolean_value(); + RTPS_DllAPI bool& boolean_value(); /*! * @brief This function sets a value in member byte_value * @param _byte_value New value for member byte_value */ - void byte_value( + RTPS_DllAPI void byte_value( uint8_t _byte_value); /*! @@ -255,19 +256,19 @@ class AnnotationParameterValue * @return Value of member byte_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint8_t byte_value() const; + RTPS_DllAPI uint8_t byte_value() const; /*! * @brief This function returns a reference to member byte_value * @return Reference to member byte_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint8_t& byte_value(); + RTPS_DllAPI uint8_t& byte_value(); /*! * @brief This function sets a value in member int16_value * @param _int16_value New value for member int16_value */ - void int16_value( + RTPS_DllAPI void int16_value( int16_t _int16_value); /*! @@ -275,19 +276,19 @@ class AnnotationParameterValue * @return Value of member int16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int16_t int16_value() const; + RTPS_DllAPI int16_t int16_value() const; /*! * @brief This function returns a reference to member int16_value * @return Reference to member int16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int16_t& int16_value(); + RTPS_DllAPI int16_t& int16_value(); /*! * @brief This function sets a value in member uint_16_value * @param _uint_16_value New value for member uint_16_value */ - void uint_16_value( + RTPS_DllAPI void uint_16_value( uint16_t _uint_16_value); /*! @@ -295,19 +296,19 @@ class AnnotationParameterValue * @return Value of member uint_16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint16_t uint_16_value() const; + RTPS_DllAPI uint16_t uint_16_value() const; /*! * @brief This function returns a reference to member uint_16_value * @return Reference to member uint_16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint16_t& uint_16_value(); + RTPS_DllAPI uint16_t& uint_16_value(); /*! * @brief This function sets a value in member int32_value * @param _int32_value New value for member int32_value */ - void int32_value( + RTPS_DllAPI void int32_value( int32_t _int32_value); /*! @@ -315,19 +316,19 @@ class AnnotationParameterValue * @return Value of member int32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int32_t int32_value() const; + RTPS_DllAPI int32_t int32_value() const; /*! * @brief This function returns a reference to member int32_value * @return Reference to member int32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int32_t& int32_value(); + RTPS_DllAPI int32_t& int32_value(); /*! * @brief This function sets a value in member uint32_value * @param _uint32_value New value for member uint32_value */ - void uint32_value( + RTPS_DllAPI void uint32_value( uint32_t _uint32_value); /*! @@ -335,19 +336,19 @@ class AnnotationParameterValue * @return Value of member uint32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint32_t uint32_value() const; + RTPS_DllAPI uint32_t uint32_value() const; /*! * @brief This function returns a reference to member uint32_value * @return Reference to member uint32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint32_t& uint32_value(); + RTPS_DllAPI uint32_t& uint32_value(); /*! * @brief This function sets a value in member int64_value * @param _int64_value New value for member int64_value */ - void int64_value( + RTPS_DllAPI void int64_value( int64_t _int64_value); /*! @@ -355,19 +356,20 @@ class AnnotationParameterValue * @return Value of member int64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int64_t int64_value() const; + RTPS_DllAPI int64_t int64_value() const; /*! * @brief This function returns a reference to member int64_value * @return Reference to member int64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int64_t& int64_value(); + RTPS_DllAPI int64_t& int64_value(); + /*! * @brief This function sets a value in member uint64_value * @param _uint64_value New value for member uint64_value */ - void uint64_value( + RTPS_DllAPI void uint64_value( uint64_t _uint64_value); /*! @@ -375,19 +377,19 @@ class AnnotationParameterValue * @return Value of member uint64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint64_t uint64_value() const; + RTPS_DllAPI uint64_t uint64_value() const; /*! * @brief This function returns a reference to member uint64_value * @return Reference to member uint64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - uint64_t& uint64_value(); + RTPS_DllAPI uint64_t& uint64_value(); /*! * @brief This function sets a value in member float32_value * @param _float32_value New value for member float32_value */ - void float32_value( + RTPS_DllAPI void float32_value( float _float32_value); /*! @@ -395,19 +397,19 @@ class AnnotationParameterValue * @return Value of member float32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - float float32_value() const; + RTPS_DllAPI float float32_value() const; /*! * @brief This function returns a reference to member float32_value * @return Reference to member float32_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - float& float32_value(); + RTPS_DllAPI float& float32_value(); /*! * @brief This function sets a value in member float64_value * @param _float64_value New value for member float64_value */ - void float64_value( + RTPS_DllAPI void float64_value( double _float64_value); /*! @@ -415,19 +417,20 @@ class AnnotationParameterValue * @return Value of member float64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - double float64_value() const; + RTPS_DllAPI double float64_value() const; /*! * @brief This function returns a reference to member float64_value * @return Reference to member float64_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - double& float64_value(); + RTPS_DllAPI double& float64_value(); + /*! * @brief This function sets a value in member float128_value * @param _float128_value New value for member float128_value */ - void float128_value( + RTPS_DllAPI void float128_value( long double _float128_value); /*! @@ -435,19 +438,19 @@ class AnnotationParameterValue * @return Value of member float128_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - long double float128_value() const; + RTPS_DllAPI long double float128_value() const; /*! * @brief This function returns a reference to member float128_value * @return Reference to member float128_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - long double& float128_value(); + RTPS_DllAPI long double& float128_value(); /*! * @brief This function sets a value in member char_value * @param _char_value New value for member char_value */ - void char_value( + RTPS_DllAPI void char_value( char _char_value); /*! @@ -455,19 +458,19 @@ class AnnotationParameterValue * @return Value of member char_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - char char_value() const; + RTPS_DllAPI char char_value() const; /*! * @brief This function returns a reference to member char_value * @return Reference to member char_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - char& char_value(); + RTPS_DllAPI char& char_value(); /*! * @brief This function sets a value in member wchar_value * @param _wchar_value New value for member wchar_value */ - void wchar_value( + RTPS_DllAPI void wchar_value( wchar_t _wchar_value); /*! @@ -475,19 +478,19 @@ class AnnotationParameterValue * @return Value of member wchar_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - wchar_t wchar_value() const; + RTPS_DllAPI wchar_t wchar_value() const; /*! * @brief This function returns a reference to member wchar_value * @return Reference to member wchar_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - wchar_t& wchar_value(); + RTPS_DllAPI wchar_t& wchar_value(); /*! * @brief This function sets a value in member enumerated_value * @param _enumerated_value New value for member enumerated_value */ - void enumerated_value( + RTPS_DllAPI void enumerated_value( int32_t _enumerated_value); /*! @@ -495,26 +498,26 @@ class AnnotationParameterValue * @return Value of member enumerated_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int32_t enumerated_value() const; + RTPS_DllAPI int32_t enumerated_value() const; /*! * @brief This function returns a reference to member enumerated_value * @return Reference to member enumerated_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - int32_t& enumerated_value(); + RTPS_DllAPI int32_t& enumerated_value(); /*! * @brief This function copies the value in member string8_value * @param _string8_value New value to be copied in member string8_value */ - void string8_value( + RTPS_DllAPI void string8_value( const std::string& _string8_value); /*! * @brief This function moves the value in member string8_value * @param _string8_value New value to be moved in member string8_value */ - void string8_value( + RTPS_DllAPI void string8_value( std::string&& _string8_value); /*! @@ -522,26 +525,26 @@ class AnnotationParameterValue * @return Constant reference to member string8_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - const std::string& string8_value() const; + RTPS_DllAPI const std::string& string8_value() const; /*! * @brief This function returns a reference to member string8_value * @return Reference to member string8_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - std::string& string8_value(); + RTPS_DllAPI std::string& string8_value(); /*! * @brief This function copies the value in member string16_value * @param _string16_value New value to be copied in member string16_value */ - void string16_value( + RTPS_DllAPI void string16_value( const std::wstring& _string16_value); /*! * @brief This function moves the value in member string16_value * @param _string16_value New value to be moved in member string16_value */ - void string16_value( + RTPS_DllAPI void string16_value( std::wstring&& _string16_value); /*! @@ -549,26 +552,27 @@ class AnnotationParameterValue * @return Constant reference to member string16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - const std::wstring& string16_value() const; + RTPS_DllAPI const std::wstring& string16_value() const; /*! * @brief This function returns a reference to member string16_value * @return Reference to member string16_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - std::wstring& string16_value(); + RTPS_DllAPI std::wstring& string16_value(); + /*! * @brief This function copies the value in member extended_value * @param _extended_value New value to be copied in member extended_value */ - void extended_value( + RTPS_DllAPI void extended_value( const ExtendedAnnotationParameterValue& _extended_value); /*! * @brief This function moves the value in member extended_value * @param _extended_value New value to be moved in member extended_value */ - void extended_value( + RTPS_DllAPI void extended_value( ExtendedAnnotationParameterValue&& _extended_value); /*! @@ -576,14 +580,14 @@ class AnnotationParameterValue * @return Constant reference to member extended_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - const ExtendedAnnotationParameterValue& extended_value() const; + RTPS_DllAPI const ExtendedAnnotationParameterValue& extended_value() const; /*! * @brief This function returns a reference to member extended_value * @return Reference to member extended_value * @exception eprosima::fastcdr::BadParamException This exception is thrown if the requested union member is not the current selection. */ - ExtendedAnnotationParameterValue& extended_value(); + RTPS_DllAPI ExtendedAnnotationParameterValue& extended_value(); /*! * @brief This function returns the serialized size of a data depending on the buffer alignment. @@ -591,7 +595,7 @@ class AnnotationParameterValue * @param current_alignment Buffer alignment. * @return Serialized size. */ - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const AnnotationParameterValue& data, size_t current_alignment = 0); @@ -600,14 +604,14 @@ class AnnotationParameterValue * @brief This function serializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void serialize( + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; /*! * @brief This function deserializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void deserialize( + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); @@ -618,28 +622,28 @@ class AnnotationParameterValue * @param current_alignment Buffer alignment. * @return Maximum serialized size. */ - static size_t getKeyMaxCdrSerializedSize( + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); /*! * @brief This function tells you if the Key has been defined for this type */ - static bool isKeyDefined(); + RTPS_DllAPI static bool isKeyDefined(); /*! * @brief This function serializes the key members of an object using CDR serialization. * @param cdr CDR serialization object. */ - void serializeKey( + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const AnnotationParameterValue& other) const; /** * Aux method to return value as its string representation. */ - std::string to_string() const + RTPS_DllAPI std::string to_string() const { switch (m__d) { @@ -686,7 +690,7 @@ class AnnotationParameterValue /** * Aux method to set value from its string representation. */ - void from_string( + RTPS_DllAPI void from_string( const std::string& value) { switch (m__d) @@ -806,6 +810,7 @@ class AnnotationParameterValue std::wstring m_string16_value; ExtendedAnnotationParameterValue m_extended_value; }; + /*! * @brief This class represents the structure AppliedAnnotationParameter defined by the user in the IDL file. * @ingroup ANNOTATIONPARAMETERVALUE @@ -817,39 +822,39 @@ class AppliedAnnotationParameter /*! * @brief Default constructor. */ - AppliedAnnotationParameter(); + RTPS_DllAPI AppliedAnnotationParameter(); /*! * @brief Default destructor. */ - ~AppliedAnnotationParameter(); + RTPS_DllAPI ~AppliedAnnotationParameter(); /*! * @brief Copy constructor. * @param x Reference to the object AppliedAnnotationParameter that will be copied. */ - AppliedAnnotationParameter( + RTPS_DllAPI AppliedAnnotationParameter( const AppliedAnnotationParameter& x); /*! * @brief Move constructor. * @param x Reference to the object AppliedAnnotationParameter that will be copied. */ - AppliedAnnotationParameter( + RTPS_DllAPI AppliedAnnotationParameter( AppliedAnnotationParameter&& x); /*! * @brief Copy assignment. * @param x Reference to the object AppliedAnnotationParameter that will be copied. */ - AppliedAnnotationParameter& operator =( + RTPS_DllAPI AppliedAnnotationParameter& operator =( const AppliedAnnotationParameter& x); /*! * @brief Move assignment. * @param x Reference to the object AppliedAnnotationParameter that will be copied. */ - AppliedAnnotationParameter& operator =( + RTPS_DllAPI AppliedAnnotationParameter& operator =( AppliedAnnotationParameter&& x); /*! @@ -934,7 +939,7 @@ class AppliedAnnotationParameter * @param current_alignment Buffer alignment. * @return Serialized size. */ - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const AppliedAnnotationParameter& data, size_t current_alignment = 0); @@ -943,14 +948,14 @@ class AppliedAnnotationParameter * @brief This function serializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void serialize( + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; /*! * @brief This function deserializes an object using CDR serialization. * @param cdr CDR serialization object. */ - void deserialize( + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); @@ -961,22 +966,22 @@ class AppliedAnnotationParameter * @param current_alignment Buffer alignment. * @return Maximum serialized size. */ - static size_t getKeyMaxCdrSerializedSize( + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); /*! * @brief This function tells you if the Key has been defined for this type */ - static bool isKeyDefined(); + RTPS_DllAPI static bool isKeyDefined(); /*! * @brief This function serializes the key members of an object using CDR serialization. * @param cdr CDR serialization object. */ - void serializeKey( + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const AppliedAnnotationParameter& other) const; private: @@ -1035,15 +1040,18 @@ class AppliedAnnotation { public: - AppliedAnnotation(); - ~AppliedAnnotation(); - AppliedAnnotation( + RTPS_DllAPI AppliedAnnotation(); + + RTPS_DllAPI ~AppliedAnnotation(); + + RTPS_DllAPI AppliedAnnotation( const AppliedAnnotation& x); - AppliedAnnotation( + + RTPS_DllAPI AppliedAnnotation( AppliedAnnotation&& x); - AppliedAnnotation& operator =( + RTPS_DllAPI AppliedAnnotation& operator =( const AppliedAnnotation& x); - AppliedAnnotation& operator =( + RTPS_DllAPI AppliedAnnotation& operator =( AppliedAnnotation&& x); inline void annotation_typeid( @@ -1090,20 +1098,20 @@ class AppliedAnnotation return m_param_seq; } - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const AppliedAnnotation& data, size_t current_alignment = 0); - void serialize( + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; - void deserialize( + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); - static size_t getKeyMaxCdrSerializedSize( + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); - static bool isKeyDefined(); - void serializeKey( + RTPS_DllAPI static bool isKeyDefined(); + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const AppliedAnnotation& other) const; private: @@ -1125,15 +1133,20 @@ class AppliedVerbatimAnnotation { public: - AppliedVerbatimAnnotation(); - ~AppliedVerbatimAnnotation(); - AppliedVerbatimAnnotation( + RTPS_DllAPI AppliedVerbatimAnnotation(); + + RTPS_DllAPI ~AppliedVerbatimAnnotation(); + + RTPS_DllAPI AppliedVerbatimAnnotation( const AppliedVerbatimAnnotation& x); - AppliedVerbatimAnnotation( + + RTPS_DllAPI AppliedVerbatimAnnotation( AppliedVerbatimAnnotation&& x); - AppliedVerbatimAnnotation& operator =( + + RTPS_DllAPI AppliedVerbatimAnnotation& operator =( const AppliedVerbatimAnnotation& x); - AppliedVerbatimAnnotation& operator =( + + RTPS_DllAPI AppliedVerbatimAnnotation& operator =( AppliedVerbatimAnnotation&& x); inline void placement( @@ -1202,20 +1215,25 @@ class AppliedVerbatimAnnotation return m_text; } - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const AppliedVerbatimAnnotation& data, size_t current_alignment = 0); - void serialize( + + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; - void deserialize( + + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); - static size_t getKeyMaxCdrSerializedSize( + + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); - static bool isKeyDefined(); - void serializeKey( + + RTPS_DllAPI static bool isKeyDefined(); + + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const AppliedVerbatimAnnotation& other) const; private: @@ -1237,15 +1255,20 @@ class AppliedBuiltinMemberAnnotations { public: - AppliedBuiltinMemberAnnotations(); - ~AppliedBuiltinMemberAnnotations(); - AppliedBuiltinMemberAnnotations( + RTPS_DllAPI AppliedBuiltinMemberAnnotations(); + + RTPS_DllAPI ~AppliedBuiltinMemberAnnotations(); + + RTPS_DllAPI AppliedBuiltinMemberAnnotations( const AppliedBuiltinMemberAnnotations& x); - AppliedBuiltinMemberAnnotations( + + RTPS_DllAPI AppliedBuiltinMemberAnnotations( AppliedBuiltinMemberAnnotations&& x); - AppliedBuiltinMemberAnnotations& operator =( + + RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =( const AppliedBuiltinMemberAnnotations& x); - AppliedBuiltinMemberAnnotations& operator =( + + RTPS_DllAPI AppliedBuiltinMemberAnnotations& operator =( AppliedBuiltinMemberAnnotations&& x); inline void unit( @@ -1336,20 +1359,25 @@ class AppliedBuiltinMemberAnnotations return m_hash_id; } - static size_t getCdrSerializedSize( + RTPS_DllAPI static size_t getCdrSerializedSize( const AppliedBuiltinMemberAnnotations& data, size_t current_alignment = 0); - void serialize( + + RTPS_DllAPI void serialize( eprosima::fastcdr::Cdr& cdr) const; - void deserialize( + + RTPS_DllAPI void deserialize( eprosima::fastcdr::Cdr& cdr); - static size_t getKeyMaxCdrSerializedSize( + + RTPS_DllAPI static size_t getKeyMaxCdrSerializedSize( size_t current_alignment = 0); - static bool isKeyDefined(); - void serializeKey( + + RTPS_DllAPI static bool isKeyDefined(); + + RTPS_DllAPI void serializeKey( eprosima::fastcdr::Cdr& cdr) const; - bool operator ==( + RTPS_DllAPI bool operator ==( const AppliedBuiltinMemberAnnotations& other) const; private: diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicData.h b/ThirdParty/ros/include/fastrtps/types/DynamicData.h index dd5359687..6020b4610 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicData.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicData.h @@ -21,6 +21,18 @@ //#define DYNAMIC_TYPES_CHECKING +namespace eprosima { +namespace fastdds { +namespace dds { +namespace DDSSQLFilter { + +class DDSFilterExpression; + +} // namespace DDSSQLFilter +} // namespace dds +} // namespace fastdds +} // namespace eprosima + namespace eprosima { namespace fastrtps { namespace types { @@ -31,9 +43,12 @@ class MemberDescriptor; class DynamicData { protected: + DynamicData(); - DynamicData(const DynamicData* pData); - DynamicData(DynamicType_ptr pType); + DynamicData( + const DynamicData* pData); + DynamicData( + DynamicType_ptr pType); ~DynamicData(); @@ -41,9 +56,11 @@ class DynamicData TypeKind kind, MemberId id); - void create_members(DynamicType_ptr pType); + void create_members( + DynamicType_ptr pType); - void create_members(const DynamicData* pData); + void create_members( + const DynamicData* pData); void clean(); @@ -58,13 +75,15 @@ class DynamicData void* left, void* right) const; - ReturnCode_t insert_array_data(MemberId indexId); + ReturnCode_t insert_array_data( + MemberId indexId); void serialize_empty_data( const DynamicType_ptr pType, eprosima::fastcdr::Cdr& cdr) const; - void set_default_value(MemberId id); + void set_default_value( + MemberId id); void get_value( std::string& sOutValue, @@ -74,20 +93,28 @@ class DynamicData const std::string& sValue, MemberId id = MEMBER_ID_INVALID); - void set_type_name(const std::string& name); + void set_type_name( + const std::string& name); + + MemberId get_union_id() const; - ReturnCode_t set_union_id(MemberId id); + ReturnCode_t set_union_id( + MemberId id); void update_union_discriminator(); - void sort_member_ids(MemberId startId); + void sort_member_ids( + MemberId startId); - void set_union_discriminator(DynamicData* pData); + void set_union_discriminator( + DynamicData* pData); // Serializes and deserializes the Dynamic Data. - bool deserialize(eprosima::fastcdr::Cdr& cdr); + bool deserialize( + eprosima::fastcdr::Cdr& cdr); - bool deserialize_discriminator(eprosima::fastcdr::Cdr& cdr); + bool deserialize_discriminator( + eprosima::fastcdr::Cdr& cdr); static size_t getCdrSerializedSize( const DynamicData* data, @@ -105,11 +132,14 @@ class DynamicData const DynamicType_ptr type, size_t current_alignment = 0); - void serialize(eprosima::fastcdr::Cdr& cdr) const; + void serialize( + eprosima::fastcdr::Cdr& cdr) const; - void serialize_discriminator(eprosima::fastcdr::Cdr& cdr) const; + void serialize_discriminator( + eprosima::fastcdr::Cdr& cdr) const; - void serializeKey(eprosima::fastcdr::Cdr& cdr) const; + void serializeKey( + eprosima::fastcdr::Cdr& cdr) const; DynamicType_ptr type_; std::map descriptors_; @@ -133,7 +163,7 @@ class DynamicData std::map complex_values_; #else std::map values_; -#endif +#endif // ifdef DYNAMIC_TYPES_CHECKING std::vector loaned_values_; bool key_element_; DynamicData* default_array_value_; @@ -145,6 +175,7 @@ class DynamicData friend class DynamicDataFactory; friend class DynamicPubSubType; friend class DynamicDataHelper; + friend class eprosima::fastdds::dds::DDSSQLFilter::DDSFilterExpression; public: @@ -160,9 +191,11 @@ class DynamicData RTPS_DllAPI ReturnCode_t clear_nonkey_values(); - RTPS_DllAPI ReturnCode_t clear_value(MemberId id); + RTPS_DllAPI ReturnCode_t clear_value( + MemberId id); - RTPS_DllAPI bool equals(const DynamicData* other) const; + RTPS_DllAPI bool equals( + const DynamicData* other) const; RTPS_DllAPI TypeKind get_kind() const; @@ -170,17 +203,23 @@ class DynamicData RTPS_DllAPI std::string get_name(); - RTPS_DllAPI MemberId get_member_id_by_name(const std::string& name) const; + RTPS_DllAPI MemberId get_member_id_by_name( + const std::string& name) const; - RTPS_DllAPI MemberId get_member_id_at_index(uint32_t index) const; + RTPS_DllAPI MemberId get_member_id_at_index( + uint32_t index) const; - RTPS_DllAPI DynamicData* loan_value(MemberId id); + RTPS_DllAPI DynamicData* loan_value( + MemberId id); - RTPS_DllAPI ReturnCode_t return_loaned_value(const DynamicData* value); + RTPS_DllAPI ReturnCode_t return_loaned_value( + const DynamicData* value); - RTPS_DllAPI MemberId get_array_index(const std::vector& position); + RTPS_DllAPI MemberId get_array_index( + const std::vector& position); - RTPS_DllAPI ReturnCode_t insert_sequence_data(MemberId& outId); + RTPS_DllAPI ReturnCode_t insert_sequence_data( + MemberId& outId); RTPS_DllAPI ReturnCode_t insert_int32_value( int32_t value, @@ -258,11 +297,13 @@ class DynamicData DynamicData_ptr value, MemberId& outId); - RTPS_DllAPI ReturnCode_t remove_sequence_data(MemberId id); + RTPS_DllAPI ReturnCode_t remove_sequence_data( + MemberId id); RTPS_DllAPI ReturnCode_t clear_data(); - RTPS_DllAPI ReturnCode_t clear_array_data(MemberId indexId); + RTPS_DllAPI ReturnCode_t clear_array_data( + MemberId indexId); RTPS_DllAPI ReturnCode_t insert_map_data( const DynamicData* key, @@ -287,7 +328,8 @@ class DynamicData MemberId& outKey, MemberId& outValue); - RTPS_DllAPI ReturnCode_t remove_map_data(MemberId keyId); + RTPS_DllAPI ReturnCode_t remove_map_data( + MemberId keyId); RTPS_DllAPI ReturnCode_t get_int32_value( int32_t& value, @@ -471,7 +513,8 @@ class DynamicData const uint32_t& value, MemberId id = MEMBER_ID_INVALID); - RTPS_DllAPI ReturnCode_t get_bitmask_value(uint64_t& value) const; + RTPS_DllAPI ReturnCode_t get_bitmask_value( + uint64_t& value) const; RTPS_DllAPI uint64_t get_bitmask_value() const { @@ -483,7 +526,8 @@ class DynamicData return value; } - RTPS_DllAPI ReturnCode_t set_bitmask_value(uint64_t value); + RTPS_DllAPI ReturnCode_t set_bitmask_value( + uint64_t value); RTPS_DllAPI ReturnCode_t get_complex_value( DynamicData** value, @@ -493,10 +537,12 @@ class DynamicData DynamicData* value, MemberId id = MEMBER_ID_INVALID); - RTPS_DllAPI ReturnCode_t get_union_label(uint64_t& value) const; + RTPS_DllAPI ReturnCode_t get_union_label( + uint64_t& value) const; // Basic types returns (copy) - RTPS_DllAPI int32_t get_int32_value(MemberId id) const + RTPS_DllAPI int32_t get_int32_value( + MemberId id) const { int32_t value; if (get_int32_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -506,7 +552,8 @@ class DynamicData return value; } - RTPS_DllAPI uint32_t get_uint32_value(MemberId id) const + RTPS_DllAPI uint32_t get_uint32_value( + MemberId id) const { uint32_t value; if (get_uint32_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -516,7 +563,8 @@ class DynamicData return value; } - RTPS_DllAPI int16_t get_int16_value(MemberId id) const + RTPS_DllAPI int16_t get_int16_value( + MemberId id) const { int16_t value; if (get_int16_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -526,7 +574,8 @@ class DynamicData return value; } - RTPS_DllAPI uint16_t get_uint16_value(MemberId id) const + RTPS_DllAPI uint16_t get_uint16_value( + MemberId id) const { uint16_t value; if (get_uint16_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -536,7 +585,8 @@ class DynamicData return value; } - RTPS_DllAPI int64_t get_int64_value(MemberId id) const + RTPS_DllAPI int64_t get_int64_value( + MemberId id) const { int64_t value; if (get_int64_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -546,7 +596,8 @@ class DynamicData return value; } - RTPS_DllAPI uint64_t get_uint64_value(MemberId id) const + RTPS_DllAPI uint64_t get_uint64_value( + MemberId id) const { uint64_t value; if (get_uint64_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -556,7 +607,8 @@ class DynamicData return value; } - RTPS_DllAPI float get_float32_value(MemberId id) const + RTPS_DllAPI float get_float32_value( + MemberId id) const { float value; if (get_float32_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -566,7 +618,8 @@ class DynamicData return value; } - RTPS_DllAPI double get_float64_value(MemberId id) const + RTPS_DllAPI double get_float64_value( + MemberId id) const { double value; if (get_float64_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -576,7 +629,8 @@ class DynamicData return value; } - RTPS_DllAPI long double get_float128_value(MemberId id) const + RTPS_DllAPI long double get_float128_value( + MemberId id) const { long double value; if (get_float128_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -586,7 +640,8 @@ class DynamicData return value; } - RTPS_DllAPI char get_char8_value(MemberId id) const + RTPS_DllAPI char get_char8_value( + MemberId id) const { char value; if (get_char8_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -596,7 +651,8 @@ class DynamicData return value; } - RTPS_DllAPI wchar_t get_char16_value(MemberId id) const + RTPS_DllAPI wchar_t get_char16_value( + MemberId id) const { wchar_t value; if (get_char16_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -606,7 +662,8 @@ class DynamicData return value; } - RTPS_DllAPI octet get_byte_value(MemberId id) const + RTPS_DllAPI octet get_byte_value( + MemberId id) const { octet value; if (get_byte_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -616,7 +673,8 @@ class DynamicData return value; } - RTPS_DllAPI int8_t get_int8_value(MemberId id) const + RTPS_DllAPI int8_t get_int8_value( + MemberId id) const { int8_t value; if (get_int8_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -626,7 +684,8 @@ class DynamicData return value; } - RTPS_DllAPI uint8_t get_uint8_value(MemberId id) const + RTPS_DllAPI uint8_t get_uint8_value( + MemberId id) const { uint8_t value; if (get_uint8_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -636,7 +695,8 @@ class DynamicData return value; } - RTPS_DllAPI bool get_bool_value(MemberId id) const + RTPS_DllAPI bool get_bool_value( + MemberId id) const { bool value; if (get_bool_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -646,7 +706,8 @@ class DynamicData return value; } - RTPS_DllAPI bool get_bool_value(const std::string& name) const + RTPS_DllAPI bool get_bool_value( + const std::string& name) const { MemberId id = get_member_id_by_name(name); bool value; @@ -657,7 +718,8 @@ class DynamicData return value; } - RTPS_DllAPI std::string get_string_value(MemberId id) const + RTPS_DllAPI std::string get_string_value( + MemberId id) const { std::string value; if (get_string_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -667,7 +729,8 @@ class DynamicData return value; } - RTPS_DllAPI std::wstring get_wstring_value(MemberId id) const + RTPS_DllAPI std::wstring get_wstring_value( + MemberId id) const { std::wstring value; if (get_wstring_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -677,7 +740,8 @@ class DynamicData return value; } - RTPS_DllAPI std::string get_enum_value(MemberId id) const + RTPS_DllAPI std::string get_enum_value( + MemberId id) const { std::string value; if (get_enum_value(value, id) != ReturnCode_t::RETCODE_OK) @@ -702,15 +766,18 @@ class DynamicData return discriminator_value_; } - RTPS_DllAPI void get_discriminator_value(uint64_t& outValue) const + RTPS_DllAPI void get_discriminator_value( + uint64_t& outValue) const { outValue = discriminator_value_; } - RTPS_DllAPI void set_discriminator_value(uint64_t value) + RTPS_DllAPI void set_discriminator_value( + uint64_t value) { discriminator_value_ = value; } + }; diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicPubSubType.h b/ThirdParty/ros/include/fastrtps/types/DynamicPubSubType.h index f43f38c02..f0d2d1b0a 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicPubSubType.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicPubSubType.h @@ -47,7 +47,7 @@ class DynamicPubSubType : public eprosima::fastdds::dds::TopicDataType RTPS_DllAPI void* createData() override; RTPS_DllAPI void deleteData ( - void * data) override; + void* data) override; RTPS_DllAPI bool deserialize ( eprosima::fastrtps::rtps::SerializedPayload_t* payload, diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicType.h b/ThirdParty/ros/include/fastrtps/types/DynamicType.h index b1f7d5557..ab2e81fa9 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicType.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicType.h @@ -37,6 +37,7 @@ class DynamicTypeBuilder; class DynamicType { protected: + friend class DynamicTypeBuilder; friend class DynamicTypeBuilderFactory; friend class MemberDescriptor; @@ -51,23 +52,29 @@ class DynamicType DynamicType(); - DynamicType(const TypeDescriptor* descriptor); + RTPS_DllAPI DynamicType( + const TypeDescriptor* descriptor); - DynamicType(const DynamicTypeBuilder* other); + DynamicType( + const DynamicTypeBuilder* other); - virtual ~DynamicType(); + RTPS_DllAPI virtual ~DynamicType(); - virtual void clear(); + RTPS_DllAPI virtual void clear(); - ReturnCode_t copy_from_builder(const DynamicTypeBuilder* other); + ReturnCode_t copy_from_builder( + const DynamicTypeBuilder* other); // Checks if there is a member with the given name. - bool exists_member_by_name(const std::string& name) const; + bool exists_member_by_name( + const std::string& name) const; // This method is used by Dynamic Data to override the name of the types based on ALIAS. - void set_name(const std::string& name); + void set_name( + const std::string& name); - ReturnCode_t apply_annotation(AnnotationDescriptor& descriptor); + ReturnCode_t apply_annotation( + AnnotationDescriptor& descriptor); ReturnCode_t apply_annotation( const std::string& annotation_name, @@ -114,17 +121,23 @@ class DynamicType bool is_key_defined_; public: - RTPS_DllAPI bool equals(const DynamicType* other) const; - RTPS_DllAPI ReturnCode_t get_all_members(std::map& members); + RTPS_DllAPI bool equals( + const DynamicType* other) const; + + RTPS_DllAPI ReturnCode_t get_all_members( + std::map& members); - RTPS_DllAPI ReturnCode_t get_all_members_by_name(std::map& members); + RTPS_DllAPI ReturnCode_t get_all_members_by_name( + std::map& members); - RTPS_DllAPI uint32_t get_bounds(uint32_t index = 0) const; + RTPS_DllAPI uint32_t get_bounds( + uint32_t index = 0) const; RTPS_DllAPI uint32_t get_bounds_size() const; - RTPS_DllAPI ReturnCode_t get_descriptor(TypeDescriptor* descriptor) const; + RTPS_DllAPI ReturnCode_t get_descriptor( + TypeDescriptor* descriptor) const; RTPS_DllAPI const TypeDescriptor* get_descriptor() const; diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderFactory.h b/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderFactory.h index 532977396..3fa52ea39 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderFactory.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderFactory.h @@ -39,11 +39,14 @@ class AnnotationParameterValue; class DynamicTypeBuilderFactory { protected: + DynamicTypeBuilderFactory(); - inline void add_builder_to_list(DynamicTypeBuilder* pBuilder); + inline void add_builder_to_list( + DynamicTypeBuilder* pBuilder); - DynamicType_ptr build_type(DynamicType_ptr other); + DynamicType_ptr build_type( + DynamicType_ptr other); void build_alias_type_code( const TypeDescriptor* descriptor, @@ -118,26 +121,31 @@ class DynamicTypeBuilderFactory #ifndef DISABLE_DYNAMIC_MEMORY_CHECK std::vector builders_list_; mutable std::recursive_mutex mutex_; -#endif +#endif // ifndef DISABLE_DYNAMIC_MEMORY_CHECK public: + RTPS_DllAPI static DynamicTypeBuilderFactory* get_instance(); RTPS_DllAPI static ReturnCode_t delete_instance(); ~DynamicTypeBuilderFactory(); - RTPS_DllAPI DynamicType_ptr get_primitive_type(TypeKind kind); + RTPS_DllAPI DynamicType_ptr get_primitive_type( + TypeKind kind); - RTPS_DllAPI ReturnCode_t delete_builder(DynamicTypeBuilder* builder); + RTPS_DllAPI ReturnCode_t delete_builder( + DynamicTypeBuilder* builder); - RTPS_DllAPI ReturnCode_t delete_type(DynamicType* type); + RTPS_DllAPI ReturnCode_t delete_type( + DynamicType* type); RTPS_DllAPI DynamicTypeBuilder* create_custom_builder( const TypeDescriptor* descriptor, const std::string& name = ""); - RTPS_DllAPI DynamicTypeBuilder* create_builder_copy(const DynamicTypeBuilder* type); + RTPS_DllAPI DynamicTypeBuilder* create_builder_copy( + const DynamicTypeBuilder* type); RTPS_DllAPI DynamicTypeBuilder* create_int32_builder(); @@ -165,9 +173,11 @@ class DynamicTypeBuilderFactory RTPS_DllAPI DynamicTypeBuilder* create_byte_builder(); - RTPS_DllAPI DynamicTypeBuilder* create_string_builder(uint32_t bound = MAX_STRING_LENGTH); + RTPS_DllAPI DynamicTypeBuilder* create_string_builder( + uint32_t bound = MAX_STRING_LENGTH); - RTPS_DllAPI DynamicTypeBuilder* create_wstring_builder(uint32_t bound = MAX_STRING_LENGTH); + RTPS_DllAPI DynamicTypeBuilder* create_wstring_builder( + uint32_t bound = MAX_STRING_LENGTH); RTPS_DllAPI DynamicTypeBuilder* create_sequence_builder( const DynamicTypeBuilder* element_type, @@ -195,7 +205,8 @@ class DynamicTypeBuilderFactory DynamicType_ptr value_type, uint32_t bound = MAX_ELEMENTS_COUNT); - RTPS_DllAPI DynamicTypeBuilder* create_bitmask_builder(uint32_t bound); + RTPS_DllAPI DynamicTypeBuilder* create_bitmask_builder( + uint32_t bound); RTPS_DllAPI DynamicTypeBuilder* create_bitset_builder(); @@ -211,19 +222,24 @@ class DynamicTypeBuilderFactory RTPS_DllAPI DynamicTypeBuilder* create_struct_builder(); - RTPS_DllAPI DynamicTypeBuilder* create_child_struct_builder(DynamicTypeBuilder* parent_type); + RTPS_DllAPI DynamicTypeBuilder* create_child_struct_builder( + DynamicTypeBuilder* parent_type); - RTPS_DllAPI DynamicTypeBuilder* create_union_builder(DynamicTypeBuilder* discriminator_type); + RTPS_DllAPI DynamicTypeBuilder* create_union_builder( + DynamicTypeBuilder* discriminator_type); - RTPS_DllAPI DynamicTypeBuilder* create_union_builder(DynamicType_ptr discriminator_type); + RTPS_DllAPI DynamicTypeBuilder* create_union_builder( + DynamicType_ptr discriminator_type); - RTPS_DllAPI DynamicType_ptr create_annotation_primitive(const std::string& name); + RTPS_DllAPI DynamicType_ptr create_annotation_primitive( + const std::string& name); RTPS_DllAPI DynamicType_ptr create_type( const TypeDescriptor* descriptor, const std::string& name = ""); - RTPS_DllAPI DynamicType_ptr create_type(const DynamicTypeBuilder* other); + RTPS_DllAPI DynamicType_ptr create_type( + const DynamicTypeBuilder* other); RTPS_DllAPI DynamicType_ptr create_alias_type( DynamicTypeBuilder* base_type, @@ -259,11 +275,14 @@ class DynamicTypeBuilderFactory RTPS_DllAPI DynamicType_ptr create_byte_type(); - RTPS_DllAPI DynamicType_ptr create_string_type(uint32_t bound = MAX_STRING_LENGTH); + RTPS_DllAPI DynamicType_ptr create_string_type( + uint32_t bound = MAX_STRING_LENGTH); - RTPS_DllAPI DynamicType_ptr create_wstring_type(uint32_t bound = MAX_STRING_LENGTH); + RTPS_DllAPI DynamicType_ptr create_wstring_type( + uint32_t bound = MAX_STRING_LENGTH); - RTPS_DllAPI DynamicType_ptr create_bitset_type(uint32_t bound); + RTPS_DllAPI DynamicType_ptr create_bitset_type( + uint32_t bound); RTPS_DllAPI void build_type_identifier( const DynamicType_ptr type, diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderPtr.h b/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderPtr.h index c94d75388..f3bb41e3f 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderPtr.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicTypeBuilderPtr.h @@ -29,19 +29,35 @@ class DynamicTypeBuilder_ptr : public std::shared_ptr typedef std::shared_ptr Base; - using Base::operator->; - using Base::operator*; + using Base::operator ->; + using Base::operator *; using Base::operator bool; RTPS_DllAPI DynamicTypeBuilder_ptr() { } - RTPS_DllAPI DynamicTypeBuilder_ptr(DynamicTypeBuilder* pType); + RTPS_DllAPI DynamicTypeBuilder_ptr( + DynamicTypeBuilder* pType); - RTPS_DllAPI DynamicTypeBuilder_ptr(DynamicTypeBuilder_ptr&& other) = default; + RTPS_DllAPI DynamicTypeBuilder_ptr( + DynamicTypeBuilder_ptr&& other) = default; + + RTPS_DllAPI DynamicTypeBuilder_ptr& operator =( + DynamicTypeBuilder_ptr&&) = default; + + RTPS_DllAPI bool operator !=( + std::nullptr_t) const + { + return bool(*this); + } + + RTPS_DllAPI bool operator ==( + std::nullptr_t) const + { + return !*this; + } - RTPS_DllAPI DynamicTypeBuilder_ptr& operator=(DynamicTypeBuilder_ptr&&) = default; }; } // namespace types diff --git a/ThirdParty/ros/include/fastrtps/types/DynamicTypePtr.h b/ThirdParty/ros/include/fastrtps/types/DynamicTypePtr.h index 2f60892f4..b37119ccf 100644 --- a/ThirdParty/ros/include/fastrtps/types/DynamicTypePtr.h +++ b/ThirdParty/ros/include/fastrtps/types/DynamicTypePtr.h @@ -29,8 +29,8 @@ class DynamicType_ptr : public std::shared_ptr typedef std::shared_ptr Base; - using Base::operator->; - using Base::operator*; + using Base::operator ->; + using Base::operator *; using Base::operator bool; DynamicType_ptr() @@ -54,6 +54,19 @@ class DynamicType_ptr : public std::shared_ptr RTPS_DllAPI DynamicType_ptr& operator =( DynamicType*); + + RTPS_DllAPI bool operator !=( + std::nullptr_t) const + { + return bool(*this); + } + + RTPS_DllAPI bool operator ==( + std::nullptr_t) const + { + return !*this; + } + }; } // namespace types diff --git a/ThirdParty/ros/include/fastrtps/types/TypeDescriptor.h b/ThirdParty/ros/include/fastrtps/types/TypeDescriptor.h index 51a2677f4..25270f5e9 100644 --- a/ThirdParty/ros/include/fastrtps/types/TypeDescriptor.h +++ b/ThirdParty/ros/include/fastrtps/types/TypeDescriptor.h @@ -15,8 +15,9 @@ #ifndef TYPES_TYPE_DESCRIPTOR_H #define TYPES_TYPE_DESCRIPTOR_H -#include +#include #include +#include class MemberDescriptor; class DynamicType; @@ -53,14 +54,14 @@ class TypeDescriptor TypeDescriptor(); - TypeDescriptor( + RTPS_DllAPI TypeDescriptor( const TypeDescriptor* other); - TypeDescriptor( + RTPS_DllAPI TypeDescriptor( const std::string& name, TypeKind kind); - ~TypeDescriptor(); + RTPS_DllAPI ~TypeDescriptor(); ReturnCode_t copy_from( const TypeDescriptor* descriptor); diff --git a/ThirdParty/ros/include/fastrtps/types/TypesBase.h b/ThirdParty/ros/include/fastrtps/types/TypesBase.h index 3562c881b..e9f346b8e 100644 --- a/ThirdParty/ros/include/fastrtps/types/TypesBase.h +++ b/ThirdParty/ros/include/fastrtps/types/TypesBase.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace eprosima { namespace fastdds { @@ -37,6 +38,9 @@ class Cdr; namespace fastrtps { namespace types { +//! A special value indicating an unlimited quantity +constexpr uint32_t BOUND_UNLIMITED = 0; + using eprosima::fastrtps::rtps::octet; using OctetSeq = std::vector; @@ -180,54 +184,40 @@ const uint16_t MemberFlagMinimalMask = 0x003f; /*! * @brief This class represents the enumeration ReturnCode_t. */ -/* - enum ReturnCode_t : uint32_t - { - RETCODE_OK = 0, - RETCODE_ERROR = 1, - RETCODE_UNSUPPORTED = 2, - RETCODE_BAD_PARAMETER = 3, - RETCODE_PRECONDITION_NOT_MET = 4, - RETCODE_OUT_OF_RESOURCES = 5, - RETCODE_NOT_ENABLED = 6, - RETCODE_IMMUTABLE_POLICY = 7, - RETCODE_INCONSISTENT_POLICY = 8, - RETCODE_ALREADY_DELETED = 9, - RETCODE_TIMEOUT = 10, - RETCODE_NO_DATA = 11, - RETCODE_ILLEGAL_OPERATION = 12 - }; - */ -class ReturnCode_t; class RTPS_DllAPI ReturnCode_t { + uint32_t value_; + public: - ReturnCode_t( - uint32_t value) + enum ReturnCodeValue { - value_ = value; - } + RETCODE_OK = 0, + RETCODE_ERROR = 1, + RETCODE_UNSUPPORTED = 2, + RETCODE_BAD_PARAMETER = 3, + RETCODE_PRECONDITION_NOT_MET = 4, + RETCODE_OUT_OF_RESOURCES = 5, + RETCODE_NOT_ENABLED = 6, + RETCODE_IMMUTABLE_POLICY = 7, + RETCODE_INCONSISTENT_POLICY = 8, + RETCODE_ALREADY_DELETED = 9, + RETCODE_TIMEOUT = 10, + RETCODE_NO_DATA = 11, + RETCODE_ILLEGAL_OPERATION = 12, + RETCODE_NOT_ALLOWED_BY_SECURITY = 13 + }; - ReturnCode_t( - const ReturnCode_t& code) + ReturnCode_t() + : value_(RETCODE_OK) { - value_ = code.value_; } - explicit operator bool() = delete; - - bool operator !() const - { - return value_ != ReturnCode_t::RETCODE_OK.value_; - } - - ReturnCode_t& operator =( - const ReturnCode_t& c) + ReturnCode_t( + uint32_t e) { - value_ = c.value_; - return *this; + value_ = e; } bool operator ==( @@ -242,30 +232,40 @@ class RTPS_DllAPI ReturnCode_t return value_ != c.value_; } + explicit operator bool() = delete; + uint32_t operator ()() const { return value_; } - static const ReturnCode_t RETCODE_OK; - static const ReturnCode_t RETCODE_ERROR; - static const ReturnCode_t RETCODE_UNSUPPORTED; - static const ReturnCode_t RETCODE_BAD_PARAMETER; - static const ReturnCode_t RETCODE_PRECONDITION_NOT_MET; - static const ReturnCode_t RETCODE_OUT_OF_RESOURCES; - static const ReturnCode_t RETCODE_NOT_ENABLED; - static const ReturnCode_t RETCODE_IMMUTABLE_POLICY; - static const ReturnCode_t RETCODE_INCONSISTENT_POLICY; - static const ReturnCode_t RETCODE_ALREADY_DELETED; - static const ReturnCode_t RETCODE_TIMEOUT; - static const ReturnCode_t RETCODE_NO_DATA; - static const ReturnCode_t RETCODE_ILLEGAL_OPERATION; - -private: + bool operator !() const + { + return value_ != 0; + } - uint32_t value_ = ReturnCode_t::RETCODE_OK.value_; }; +template +typename std::enable_if::value || std::is_enum::value, bool>::type +operator ==( + T a, + const ReturnCode_t& b) +{ + return b.operator ==( + a); +} + +template +typename std::enable_if::value || std::is_enum::value, bool>::type +operator !=( + T a, + const ReturnCode_t& b) +{ + return b.operator !=( + a); +} + // TODO Remove this alias when Fast-RTPS reaches version 2 using ResponseCode = ReturnCode_t; diff --git a/ThirdParty/ros/include/fastrtps/utils/IPFinder.h b/ThirdParty/ros/include/fastrtps/utils/IPFinder.h index b7e9c401d..d9958b869 100644 --- a/ThirdParty/ros/include/fastrtps/utils/IPFinder.h +++ b/ThirdParty/ros/include/fastrtps/utils/IPFinder.h @@ -36,66 +36,100 @@ namespace rtps { */ class IPFinder { - public: +public: + #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC - /** - * Enum IPTYPE, to define the type of IP obtained from the NICs. - */ - enum IPTYPE - { - IP4, //!< IP4 - IP6, //!< IP6 - IP4_LOCAL,//!< IP4_LOCAL - IP6_LOCAL //!< IP6_LOCAL - }; - /** - * Structure info_IP with information about a specific IP obtained from a NIC. - */ - typedef struct info_IP + /** + * Enum IPTYPE, to define the type of IP obtained from the NICs. + */ + enum IPTYPE + { + IP4, //!< IP4 + IP6, //!< IP6 + IP4_LOCAL, //!< IP4_LOCAL + IP6_LOCAL //!< IP6_LOCAL + }; + /** + * Structure info_IP with information about a specific IP obtained from a NIC. + */ + typedef struct info_IP + { + IPTYPE type; + std::string name; + std::string dev; + Locator_t locator; + }info_IP; + + /** + * Structure info_MAC with information about a specific MAC obtained from a NIC. + */ + typedef struct info_MAC + { + unsigned char address[6]; + + bool operator == ( + const info_MAC& other) { - IPTYPE type; - std::string name; - std::string dev; - Locator_t locator; - }info_IP; -#endif - IPFinder(); - virtual ~IPFinder(); - - RTPS_DllAPI static bool getIPs(std::vector* vec_name, bool return_loopback = false); - - /** - * Get the IP4Adresses in all interfaces. - * @param[out] locators List of locators to be populated with the IP4 addresses. - */ - RTPS_DllAPI static bool getIP4Address(LocatorList_t* locators); - /** - * Get the IP6Adresses in all interfaces. - * @param[out] locators List of locators to be populated with the IP6 addresses. - */ - RTPS_DllAPI static bool getIP6Address(LocatorList_t* locators); - /** - * Get all IP Adresses in all interfaces. - * @param[out] locators List of locators to be populated with the addresses. - */ - RTPS_DllAPI static bool getAllIPAddress(LocatorList_t* locators); - /** - * Parses an IP4 string, populating a info_IP with its value. - * @param[out] info info_IP to populate. - * */ - RTPS_DllAPI static bool parseIP4(info_IP& info); - /** - * Parses an IP6 string, populating a info_IP with its value. - * @param[out] info info_IP to populate. - * */ - RTPS_DllAPI static bool parseIP6(info_IP& info); - - RTPS_DllAPI static std::string getIPv4Address(const std::string &name); - RTPS_DllAPI static std::string getIPv6Address(const std::string &name); + return memcmp(address, other.address, 6) == 0; + } + + }info_MAC; + +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC + IPFinder(); + virtual ~IPFinder(); + + RTPS_DllAPI static bool getIPs( + std::vector* vec_name, + bool return_loopback = false); + + /** + * Get the IP4Adresses in all interfaces. + * @param[out] locators List of locators to be populated with the IP4 addresses. + */ + RTPS_DllAPI static bool getIP4Address( + LocatorList_t* locators); + /** + * Get the IP6Adresses in all interfaces. + * @param[out] locators List of locators to be populated with the IP6 addresses. + */ + RTPS_DllAPI static bool getIP6Address( + LocatorList_t* locators); + /** + * Get all IP Adresses in all interfaces. + * @param[out] locators List of locators to be populated with the addresses. + */ + RTPS_DllAPI static bool getAllIPAddress( + LocatorList_t* locators); + /** + * Parses an IP4 string, populating a info_IP with its value. + * @param[out] info info_IP to populate. + * */ + RTPS_DllAPI static bool parseIP4( + info_IP& info); + /** + * Parses an IP6 string, populating a info_IP with its value. + * @param[out] info info_IP to populate. + * */ + RTPS_DllAPI static bool parseIP6( + info_IP& info); + + RTPS_DllAPI static std::string getIPv4Address( + const std::string& name); + RTPS_DllAPI static std::string getIPv6Address( + const std::string& name); + + /** + * Get all MAC Adresses of all interfaces. + * Will return all unique MAC addresses for eadh of the interfaces returned by getAllIPAddress + * @param[out] macs List of MAC addresses. + */ + RTPS_DllAPI static bool getAllMACAddress( + std::vector* macs); }; -} -} +} // namespace rtps +} // namespace fastrtps } /* namespace eprosima */ #endif /* IPFINDER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/utils/IPLocator.h b/ThirdParty/ros/include/fastrtps/utils/IPLocator.h index 1fd35aed8..35257c877 100644 --- a/ThirdParty/ros/include/fastrtps/utils/IPLocator.h +++ b/ThirdParty/ros/include/fastrtps/utils/IPLocator.h @@ -20,219 +20,281 @@ #ifndef IP_LOCATOR_H_ #define IP_LOCATOR_H_ -#include -#include +#include +#include -#include +#include +#include +#include +#include namespace eprosima { namespace fastrtps { namespace rtps { + +class Locator_t; + /** * Class IPLocator, to provide helper functions to the IP based transports. * @ingroup UTILITIES_MODULE */ class IPLocator { - public: - /** - * Fills locator with the given parameters. - * @param kindin Kind of the locator. - * @param address IP Address of the locator as string. - * @param portin Port of the locator. - * @param locator Locator to be filled. - */ - RTPS_DllAPI static void createLocator( - int32_t kindin, - const std::string& address, - uint32_t portin, - Locator_t& locator); - - //! Sets locator's IPv4. - RTPS_DllAPI static bool setIPv4( - Locator_t& locator, - const unsigned char* addr); - - //! Sets locator's IPv4. - RTPS_DllAPI static bool setIPv4( - Locator_t& locator, - octet o1, - octet o2, - octet o3, - octet o4); - - //! Sets locator's IPv4. - RTPS_DllAPI static bool setIPv4( - Locator_t& locator, - const std::string& ipv4); - - //! Copies locator's IPv4. - RTPS_DllAPI static bool setIPv4( - Locator_t& destlocator, - const Locator_t& origlocator); - - //! Retrieves locator's IPv4 as octet array. - RTPS_DllAPI static const octet* getIPv4(const Locator_t& locator); - - //! Check if the locator has IPv4. - RTPS_DllAPI static bool hasIPv4(const Locator_t& locator); - - //! Returns a string representation of the locator's IPv4. - RTPS_DllAPI static std::string toIPv4string(const Locator_t& locator); - - //! Copies locator's IPv4. - RTPS_DllAPI static bool copyIPv4( - const Locator_t& locator, - unsigned char* dest); - - // IPv6 - //! Sets locator's IPv6. - RTPS_DllAPI static bool setIPv6( - Locator_t& locator, - const unsigned char* addr); - - //! Sets locator's IPv6. - RTPS_DllAPI static bool setIPv6( - Locator_t& locator, - uint16_t group0, - uint16_t group1, - uint16_t group2, - uint16_t group3, - uint16_t group4, - uint16_t group5, - uint16_t group6, - uint16_t group7); - - //! Sets locator's IPv6. - RTPS_DllAPI static bool setIPv6( - Locator_t& locator, - const std::string& ipv6); - - //! Copies locator's IPv6. - RTPS_DllAPI static bool setIPv6( - Locator_t& destlocator, - const Locator_t& origlocator); - - //! Retrieves locator's IPv6 as octet array. - RTPS_DllAPI static const octet* getIPv6(const Locator_t& locator); - - //! Check if the locator has IPv6. - RTPS_DllAPI static bool hasIPv6(const Locator_t& locator); - - //! Returns a string representation of the locator's IPv6. - RTPS_DllAPI static std::string toIPv6string(const Locator_t& locator); - - //! Copies locator's IPv6. - RTPS_DllAPI static bool copyIPv6( - const Locator_t& locator, - unsigned char* dest); - - //! Sets locator's IP - RTPS_DllAPI static bool ip( - Locator_t& locator, - const std::string& ip); - - //! Returns a string representation of the locator's IP. - RTPS_DllAPI static std::string ip_to_string(const Locator_t& locator); - - // TCP - //! Sets locator's logical port (as in RTCP protocol) - RTPS_DllAPI static bool setLogicalPort( - Locator_t& locator, - uint16_t port); - - //! Gets locator's logical port (as in RTCP protocol) - RTPS_DllAPI static uint16_t getLogicalPort(const Locator_t& locator); - - //! Sets locator's physical port (as in RTCP protocol) - RTPS_DllAPI static bool setPhysicalPort( - Locator_t& locator, - uint16_t port); - - //! Gets locator's physical port (as in RTCP protocol) - RTPS_DllAPI static uint16_t getPhysicalPort(const Locator_t& locator); - - // TCPv4 - //! Sets locator's WAN address (as in RTCP protocol) - RTPS_DllAPI static bool setWan( - Locator_t& locator, - octet o1, - octet o2, - octet o3, - octet o4); - - //! Sets locator's WAN address (as in RTCP protocol) - RTPS_DllAPI static bool setWan( - Locator_t& locator, - const std::string& wan); - - //! Gets locator's WAN address (as in RTCP protocol) - RTPS_DllAPI static const octet* getWan(const Locator_t& locator); - - //! Checks if the locator has WAN address (as in RTCP protocol) - RTPS_DllAPI static bool hasWan(const Locator_t& locator); - - //! Retrieves a string representation of the locator's WAN address (as in RTCP protocol) - RTPS_DllAPI static std::string toWanstring(const Locator_t& locator); - - //! Sets locator's LAN ID (as in RTCP protocol) - RTPS_DllAPI static bool setLanID( - Locator_t& locator, - const std::string& lanId); - - //! Gets locator's LAN ID (as in RTCP protocol) - RTPS_DllAPI static const octet* getLanID(const Locator_t& locator); - - //! Retrieves a string representation of the locator's LAN ID (as in RTCP protocol) - RTPS_DllAPI static std::string toLanIDstring(const Locator_t& locator); - - //! Returns a new locator without logical port (as in RTCP protocol). - RTPS_DllAPI static Locator_t toPhysicalLocator(const Locator_t& locator); - - //! Checks if a locator WAN address and IP address are the same (as in RTCP protocol). - RTPS_DllAPI static bool ip_equals_wan(const Locator_t& locator); - - // Common - //! Sets locator's RTPC port. Physical for UDP and logical for TCP (as in RTCP protocol) - RTPS_DllAPI static bool setPortRTPS( - Locator_t& locator, - uint16_t port); - - //! Gets locator's RTPC port. Physical for UDP and logical for TCP (as in RTCP protocol) - RTPS_DllAPI static uint16_t getPortRTPS(Locator_t& locator); - - //! Checks if a locator has local IP address. - RTPS_DllAPI static bool isLocal(const Locator_t& locator); - - //! Checks if a locator has any IP address. - RTPS_DllAPI static bool isAny(const Locator_t& locator); - - //! Checks if a both locators has the same IP address. - RTPS_DllAPI static bool compareAddress( - const Locator_t& loc1, - const Locator_t& loc2, - bool fullAddress = false); - - //! Checks if a both locators has the same IP address and physical port (as in RTCP protocol). - RTPS_DllAPI static bool compareAddressAndPhysicalPort( - const Locator_t& loc1, - const Locator_t& loc2); - - //! Returns a string representation of the given locator. - RTPS_DllAPI static std::string to_string(const Locator_t& locator); - - // UDP - //! Checks if the locator has a multicast IP address. - RTPS_DllAPI static bool isMulticast(const Locator_t& locator); - - private: - IPLocator(); - - virtual ~IPLocator(); +public: + + /** + * Fills locator with the given parameters. + * @param kindin Kind of the locator. + * @param address IP Address of the locator as string. + * @param portin Port of the locator. + * @param locator Locator to be filled. + */ + RTPS_DllAPI static void createLocator( + int32_t kindin, + const std::string& address, + uint32_t portin, + Locator_t& locator); + + //! Sets locator's IPv4. + RTPS_DllAPI static bool setIPv4( + Locator_t& locator, + const unsigned char* addr); + + //! Sets locator's IPv4. + RTPS_DllAPI static bool setIPv4( + Locator_t& locator, + octet o1, + octet o2, + octet o3, + octet o4); + + //! Sets locator's IPv4. + RTPS_DllAPI static bool setIPv4( + Locator_t& locator, + const std::string& ipv4); + + //! Copies locator's IPv4. + RTPS_DllAPI static bool setIPv4( + Locator_t& destlocator, + const Locator_t& origlocator); + + //! Copies locator's IPv4. + RTPS_DllAPI static bool setIPv4address( + Locator_t& destlocator, + const std::string& lan, + const std::string& wan, + const std::string& ipv4); + + //! Retrieves locator's IPv4 as octet array. + RTPS_DllAPI static const octet* getIPv4( + const Locator_t& locator); + + //! Check if the locator has IPv4. + RTPS_DllAPI static bool hasIPv4( + const Locator_t& locator); + + //! Returns a string representation of the locator's IPv4. + RTPS_DllAPI static std::string toIPv4string( + const Locator_t& locator); + + //! Copies locator's IPv4. + RTPS_DllAPI static bool copyIPv4( + const Locator_t& locator, + unsigned char* dest); + + // IPv6 + //! Sets locator's IPv6. + RTPS_DllAPI static bool setIPv6( + Locator_t& locator, + const unsigned char* addr); + + //! Sets locator's IPv6. + RTPS_DllAPI static bool setIPv6( + Locator_t& locator, + uint16_t group0, + uint16_t group1, + uint16_t group2, + uint16_t group3, + uint16_t group4, + uint16_t group5, + uint16_t group6, + uint16_t group7); + + //! Sets locator's IPv6. + RTPS_DllAPI static bool setIPv6( + Locator_t& locator, + const std::string& ipv6); + + //! Copies locator's IPv6. + RTPS_DllAPI static bool setIPv6( + Locator_t& destlocator, + const Locator_t& origlocator); + + //! Retrieves locator's IPv6 as octet array. + RTPS_DllAPI static const octet* getIPv6( + const Locator_t& locator); + + //! Check if the locator has IPv6. + RTPS_DllAPI static bool hasIPv6( + const Locator_t& locator); + + //! Returns a string representation of the locator's IPv6 following RFC 5952 recommendation. + RTPS_DllAPI static std::string toIPv6string( + const Locator_t& locator); + + //! Copies locator's IPv6. + RTPS_DllAPI static bool copyIPv6( + const Locator_t& locator, + unsigned char* dest); + + //! Sets locator's IP + RTPS_DllAPI static bool ip( + Locator_t& locator, + const std::string& ip); + + //! Returns a string representation of the locator's IP. + RTPS_DllAPI static std::string ip_to_string( + const Locator_t& locator); + + // TCP + //! Sets locator's logical port (as in RTCP protocol) + RTPS_DllAPI static bool setLogicalPort( + Locator_t& locator, + uint16_t port); + + //! Gets locator's logical port (as in RTCP protocol) + RTPS_DllAPI static uint16_t getLogicalPort( + const Locator_t& locator); + + //! Sets locator's physical port (as in RTCP protocol) + RTPS_DllAPI static bool setPhysicalPort( + Locator_t& locator, + uint16_t port); + + //! Gets locator's physical port (as in RTCP protocol) + RTPS_DllAPI static uint16_t getPhysicalPort( + const Locator_t& locator); + + // TCPv4 + //! Sets locator's WAN address (as in RTCP protocol) + RTPS_DllAPI static bool setWan( + Locator_t& locator, + octet o1, + octet o2, + octet o3, + octet o4); + + //! Sets locator's WAN address (as in RTCP protocol) + RTPS_DllAPI static bool setWan( + Locator_t& locator, + const std::string& wan); + + //! Gets locator's WAN address (as in RTCP protocol) + RTPS_DllAPI static const octet* getWan( + const Locator_t& locator); + + //! Checks if the locator has WAN address (as in RTCP protocol) + RTPS_DllAPI static bool hasWan( + const Locator_t& locator); + + //! Retrieves a string representation of the locator's WAN address (as in RTCP protocol) + RTPS_DllAPI static std::string toWanstring( + const Locator_t& locator); + + //! Sets locator's LAN ID (as in RTCP protocol) + RTPS_DllAPI static bool setLanID( + Locator_t& locator, + const std::string& lanId); + + //! Gets locator's LAN ID (as in RTCP protocol) + RTPS_DllAPI static const octet* getLanID( + const Locator_t& locator); + + //! Retrieves a string representation of the locator's LAN ID (as in RTCP protocol) + RTPS_DllAPI static std::string toLanIDstring( + const Locator_t& locator); + + //! Returns a new locator without logical port (as in RTCP protocol). + RTPS_DllAPI static Locator_t toPhysicalLocator( + const Locator_t& locator); + + //! Checks if a locator WAN address and IP address are the same (as in RTCP protocol). + RTPS_DllAPI static bool ip_equals_wan( + const Locator_t& locator); + + // Common + //! Sets locator's RTCP port. Physical for UDP and logical for TCP (as in RTCP protocol) + RTPS_DllAPI static bool setPortRTPS( + Locator_t& locator, + uint16_t port); + + //! Gets locator's RTCP port. Physical for UDP and logical for TCP (as in RTCP protocol) + RTPS_DllAPI static uint16_t getPortRTPS( + Locator_t& locator); + + //! Checks if a locator has local IP address. + RTPS_DllAPI static bool isLocal( + const Locator_t& locator); + + //! Checks if a locator has any IP address. + RTPS_DllAPI static bool isAny( + const Locator_t& locator); + + //! Checks if both locators has the same IP address. + RTPS_DllAPI static bool compareAddress( + const Locator_t& loc1, + const Locator_t& loc2, + bool fullAddress = false); + + //! Checks if a both locators has the same IP address and physical port (as in RTCP protocol). + RTPS_DllAPI static bool compareAddressAndPhysicalPort( + const Locator_t& loc1, + const Locator_t& loc2); + + //! Returns a string representation of the given locator. + RTPS_DllAPI static std::string to_string( + const Locator_t& locator); + + // UDP + //! Checks if the locator has a multicast IP address. + RTPS_DllAPI static bool isMulticast( + const Locator_t& locator); + + //! Resolve an address name by a DNS request and return the IP that this address references by a DNS server + RTPS_DllAPI static std::pair, std::set> resolveNameDNS( + const std::string& address_name); + + //! Check whether a string contains an IPv4 format + RTPS_DllAPI static bool isIPv4( + const std::string& address); + //! Check whether a string contains an IPv6 format + RTPS_DllAPI static bool isIPv6( + const std::string& address); + +protected: + + // Checks if the locator address is equal to 0 + // It checks the proper locator address depending on the locator kind + static bool isEmpty( + const Locator_t& locator); + + // Checks if the locator address from index till the end is equal to 0 + static bool isEmpty( + const Locator_t& locator, + uint16_t index); + + // Checks if a string matches an ipv6 address + static bool IPv6isCorrect( + const std::string& ipv6); + +private: + + IPLocator() = delete; + ~IPLocator() = delete; }; -} -} +} // namespace rtps +} // namespace fastrtps } /* namespace eprosima */ #endif /* IP_LOCATOR_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/utils/ProxyPool.hpp b/ThirdParty/ros/include/fastrtps/utils/ProxyPool.hpp new file mode 100644 index 000000000..6d812623d --- /dev/null +++ b/ThirdParty/ros/include/fastrtps/utils/ProxyPool.hpp @@ -0,0 +1,243 @@ +// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! + * @file ProxyPool.hpp + */ + +#ifndef FASTRTPS_UTILS_PROXY_POOL_HPP_ +#define FASTRTPS_UTILS_PROXY_POOL_HPP_ + +#include +#include +#include +#include +#include +#include + +#if defined(__has_include) && __has_include() +# include +#endif // if defined(__has_include) && __has_include() + +namespace eprosima { + +// unnamed namespace for isolation +namespace { + +// Detect if integer_sequence is availalbe +#if defined(__cpp_lib_integer_sequence) \ + && ((__cpp_lib_integer_sequence <= _MSVC_LANG) \ + || (__cpp_lib_integer_sequence <= __cplusplus)) + +// Array initialization usin C++14 +template +std::array make_array( + P&& i, + std::index_sequence is) +{ + return { (Ints == is.size() - 1 ? std::move(i) : i)...}; +} + +template +std::array make_array( + P&& i) +{ + return make_array

(std::move(i), std::make_index_sequence{}); +} + +#else // C++11 fallback + +template +std::array make_array( + P&& i, + Ts&&... args); + +template +struct make_array_choice +{ + template + static std::array res( + P&& i, + Ts&&... args) + { + P tmp(i); + return make_array(std::move(i), std::move(tmp), std::move(args)...); + } + +}; + +template +struct make_array_choice +{ + template + static std::array res( + P&& i, + Ts&&... args) + { + return {std::move(i), std::move(args)...}; + } + +}; + +template +std::array make_array( + P&& i, + Ts&&... args) +{ + return make_array_choice < N == (sizeof...(Ts) + 1), N, Ts ... > ::res(std::move(i), std::move(args)...); +} + +#endif // defined(__cpp_lib_integer_sequence) + +} // namespace + +template< class Proxy, std::size_t N = 4> +class ProxyPool +{ + mutable std::mutex mtx_; + std::condition_variable cv_; + std::array heap_; + std::bitset mask_; + + // unique_ptr deleters + class D + { + // Because ProxyPool will be destroy after all the proxies are returned + // this reference is always valid + ProxyPool& pool_; + + friend class ProxyPool; + + D( + ProxyPool* pool) + : pool_(*pool) + { + } + + public: + + void operator ()( + Proxy* p) const + { + pool_.set_back(p); + } + + } + deleter_; + + friend class D; + + /* + * Return an available proxy to the pool. + * @param p pointer to the proxy. + */ + void set_back( + Proxy* p) noexcept + { + std::size_t idx = p - heap_.data(); + + std::lock_guard _(mtx_); + + // check is not there + assert(!mask_.test(idx)); + + // return the resource + mask_.set(idx); + + // notify the resource is free + cv_.notify_one(); + } + +public: + + using smart_ptr = std::unique_ptr; + + /* + * Constructor of the pool object. + * @param init Initialization value for all the proxies. + */ + ProxyPool( + Proxy&& init) + : heap_(make_array(std::move(init))) + , deleter_(this) + { + // make all resources available + mask_.set(); + } + + /* + * Destructor for the pool object. + * It waits till all the proxies are back in the pool to prevent data races. + */ + ~ProxyPool() + { + std::unique_lock lock(mtx_); + cv_.wait(lock, [&]() + { + return mask_.all(); + }); + } + + /* + * Returns the number of proxies in the pool. + * @return pool size + */ + static constexpr std::size_t size() + { + return N; + } + + /* + * Returns the number of proxies available in the pool. + * @return available proxies + */ + std::size_t available() const noexcept + { + std::lock_guard _(mtx_); + return mask_.count(); + } + + /* + * Retrieve an available proxy from the pool. + * If not available a wait ensues. + * Note deleter is referenced not copied to avoid heap allocations on smart pointer construction + * @return unique_ptr referencing the proxy. On destruction the resource is returned. + */ + std::unique_ptr get() + { + std::unique_lock lock(mtx_); + + // wait for available resources + cv_.wait(lock, [&]() + { + return mask_.any(); + }); + + // find the first available + std::size_t idx = 0; + while (idx < mask_.size() && !mask_.test(idx)) + { + ++idx; + } + + // retrieve it + mask_.reset(idx); + return std::unique_ptr(&heap_[idx], deleter_); + } + +}; + +} // eprosima namespace + +#endif /* FASTRTPS_UTILS_PROXY_POOL_HPP_ */ diff --git a/ThirdParty/ros/include/fastrtps/utils/StringMatching.h b/ThirdParty/ros/include/fastrtps/utils/StringMatching.h index 5dcc83e67..ca892aff4 100644 --- a/ThirdParty/ros/include/fastrtps/utils/StringMatching.h +++ b/ThirdParty/ros/include/fastrtps/utils/StringMatching.h @@ -19,6 +19,13 @@ #ifndef STRINGMATCHING_H_ #define STRINGMATCHING_H_ + +#include + +#include +#include +#include + #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC namespace eprosima { namespace fastrtps { @@ -28,12 +35,14 @@ namespace rtps { section B.6). @ingroup UTILITIES_MODULE */ -class StringMatching +class RTPS_DllAPI StringMatching { public: StringMatching(); + virtual ~StringMatching(); + /** Static method to match two strings. * It checks if the input strings match. Any of the strings or both can be a pattern. */ @@ -48,8 +57,10 @@ class StringMatching const char* pattern, const char* input); }; + } // namespace rtps } /* namespace rtps */ } /* namespace eprosima */ + #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#endif /* STRINGMATCHING_H_ */ +#endif // ifndef STRINGMATCHING_H_ diff --git a/ThirdParty/ros/include/fastrtps/utils/System.h b/ThirdParty/ros/include/fastrtps/utils/System.h index 670e3f408..8a9e86b56 100644 --- a/ThirdParty/ros/include/fastrtps/utils/System.h +++ b/ThirdParty/ros/include/fastrtps/utils/System.h @@ -19,22 +19,26 @@ #ifndef _EPROSIMA_SYSTEM_UTILS_H #define _EPROSIMA_SYSTEM_UTILS_H + #include "../fastrtps_dll.h" namespace eprosima { namespace fastrtps { + /** * Class System, to provide helper functions to access system information. * @ingroup UTILITIES_MODULE */ class System { - public: - //! Returns current process identifier. - RTPS_DllAPI static int GetPID(); +public: + + //! Returns current process identifier. + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::System::GetPID", "") + RTPS_DllAPI static int GetPID(); }; -} +} /* namespace fastrtps */ } /* namespace eprosima */ #endif /* _EPROSIMA_SYSTEM_UTILS_H */ diff --git a/ThirdParty/ros/include/fastrtps/utils/TimedConditionVariable.hpp b/ThirdParty/ros/include/fastrtps/utils/TimedConditionVariable.hpp index ecacfa6dd..14291b5c3 100644 --- a/ThirdParty/ros/include/fastrtps/utils/TimedConditionVariable.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/TimedConditionVariable.hpp @@ -18,7 +18,7 @@ #ifndef _UTILS_TIMEDCONDITIONVARIABLE_HPP_ #define _UTILS_TIMEDCONDITIONVARIABLE_HPP_ -#include +#include /* NOTE: Windows implementation temporary disabled due to aleatory high CPU consumption when @@ -37,20 +37,22 @@ #define CV_T_ _Cnd_t extern int clock_gettime(int, struct timespec* tv); - #elif HAVE_STRICT_REALTIME && defined(__linux__) + #elif HAVE_STRICT_REALTIME && defined(__unix__) */ -#if HAVE_STRICT_REALTIME && defined(__linux__) +#if HAVE_STRICT_REALTIME && defined(__unix__) #include -#define CV_INIT_(x) pthread_cond_init(x, NULL); +#define CV_INIT_(x) pthread_condattr_init(&cv_attr_); \ + pthread_condattr_setclock(&cv_attr_, CLOCK_MONOTONIC); \ + pthread_cond_init(x, &cv_attr_); #define CV_WAIT_(cv, x) pthread_cond_wait(&cv, x) #define CV_TIMEDWAIT_(cv, x, y) pthread_cond_timedwait(&cv, x, y) #define CV_SIGNAL_(cv) pthread_cond_signal(&cv) #define CV_BROADCAST_(cv) pthread_cond_broadcast(&cv) -#define CV_T_ pthread_cond_t +#define CV_T_ pthread_condattr_t cv_attr_; pthread_cond_t #else #include -#endif // if HAVE_STRICT_REALTIME && defined(__linux__) +#endif // if HAVE_STRICT_REALTIME && defined(__unix__) #include #include @@ -59,7 +61,7 @@ namespace eprosima { namespace fastrtps { -#if HAVE_STRICT_REALTIME && (/*defined(_WIN32) ||*/ defined(__linux__)) +#if HAVE_STRICT_REALTIME && (/*defined(_WIN32) ||*/ defined(__unix__)) class TimedConditionVariable { @@ -99,7 +101,7 @@ class TimedConditionVariable struct timespec max_wait = { 0, 0 }; - clock_gettime(CLOCK_REALTIME, &max_wait); + clock_gettime(CLOCK_MONOTONIC, &max_wait); nsecs = nsecs + std::chrono::nanoseconds(max_wait.tv_nsec); auto secs = std::chrono::duration_cast(nsecs); nsecs -= secs; @@ -164,7 +166,7 @@ class TimedConditionVariable }; #else using TimedConditionVariable = std::condition_variable_any; -#endif // HAVE_STRICT_REALTIME && (/*defined(_WIN32)*/ || defined(__linux__)) +#endif // HAVE_STRICT_REALTIME && (/*defined(_WIN32)*/ || defined(__unix__)) } // namespace fastrtps } // namespace eprosima diff --git a/ThirdParty/ros/include/fastrtps/utils/TimedMutex.hpp b/ThirdParty/ros/include/fastrtps/utils/TimedMutex.hpp index 6331f3025..e4ff36a73 100644 --- a/ThirdParty/ros/include/fastrtps/utils/TimedMutex.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/TimedMutex.hpp @@ -37,8 +37,16 @@ namespace eprosima { namespace fastrtps { #if defined(_WIN32) + class TimedMutex { + // On MSVC 19.36.32528.95 `xtime` was changed into `_timespec64`. + // See https://github.com/eProsima/Fast-DDS/issues/3451 + // See https://github.com/microsoft/STL/pull/3594 +#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 193632528 + using xtime = _timespec64; +#endif // _MSC_FULL_VER check + public: TimedMutex() @@ -77,7 +85,7 @@ class TimedMutex bool try_lock_until( const std::chrono::time_point& abs_time) { - std::chrono::nanoseconds nsecs = abs_time - std::chrono::steady_clock::now(); + std::chrono::nanoseconds nsecs = abs_time - Clock::now(); if (0 < nsecs.count()) { @@ -137,6 +145,11 @@ class RecursiveTimedMutex _Mtx_unlock(mutex_); } + bool try_lock() + { + return (_Thrd_success == _Mtx_trylock(mutex_)); + } + template bool try_lock_for( const std::chrono::duration& rel_time) @@ -148,7 +161,7 @@ class RecursiveTimedMutex bool try_lock_until( const std::chrono::time_point& abs_time) { - std::chrono::nanoseconds nsecs = abs_time - std::chrono::steady_clock::now(); + std::chrono::nanoseconds nsecs = abs_time - Clock::now(); if (0 < nsecs.count()) { struct timespec max_wait = { @@ -177,7 +190,7 @@ class RecursiveTimedMutex _Mtx_t mutex_; }; -#elif _GTHREAD_USE_MUTEX_TIMEDLOCK || !defined(__linux__) +#elif _GTHREAD_USE_MUTEX_TIMEDLOCK || !defined(__unix__) using TimedMutex = std::timed_mutex; using RecursiveTimedMutex = std::recursive_timed_mutex; #else @@ -221,7 +234,7 @@ class TimedMutex bool try_lock_until( const std::chrono::time_point& abs_time) { - std::chrono::nanoseconds nsecs = abs_time - std::chrono::steady_clock::now(); + std::chrono::nanoseconds nsecs = abs_time - Clock::now(); struct timespec max_wait = { 0, 0 }; @@ -276,6 +289,11 @@ class RecursiveTimedMutex pthread_mutex_unlock(&mutex_); } + bool try_lock() + { + return (0 == pthread_mutex_trylock(&mutex_)); + } + template bool try_lock_for( const std::chrono::duration& rel_time) @@ -287,7 +305,7 @@ class RecursiveTimedMutex bool try_lock_until( const std::chrono::time_point& abs_time) { - std::chrono::nanoseconds nsecs = abs_time - std::chrono::steady_clock::now(); + std::chrono::nanoseconds nsecs = abs_time - Clock::now(); struct timespec max_wait = { 0, 0 }; diff --git a/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp b/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp index fed3490a8..1d762e2ba 100644 --- a/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedContainerConfig.hpp @@ -26,6 +26,8 @@ namespace eprosima { namespace fastrtps { +#define dummy_avoid_winmax + /** * Specifies the configuration of a resource limited collection. * @ingroup UTILITIES_MODULE @@ -35,7 +37,7 @@ struct ResourceLimitedContainerConfig ResourceLimitedContainerConfig( size_t ini = 0, - size_t max = (std::numeric_limits::max)(), + size_t max = std::numeric_limits::max dummy_avoid_winmax (), size_t inc = 1u) : initial(ini) , maximum(max) @@ -46,7 +48,7 @@ struct ResourceLimitedContainerConfig //! Number of elements to be preallocated in the collection. size_t initial = 0; //! Maximum number of elements allowed in the collection. - size_t maximum = (std::numeric_limits::max)(); + size_t maximum = std::numeric_limits::max dummy_avoid_winmax (); //! Number of items to add when capacity limit is reached. size_t increment = 1u; @@ -69,7 +71,8 @@ struct ResourceLimitedContainerConfig inline static ResourceLimitedContainerConfig dynamic_allocation_configuration( size_t increment = 1u) { - return ResourceLimitedContainerConfig(0u, (std::numeric_limits::max)(), increment ? increment : 1u); + return ResourceLimitedContainerConfig(0u, + std::numeric_limits::max dummy_avoid_winmax (), increment ? increment : 1u); } }; diff --git a/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedVector.hpp b/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedVector.hpp index 8270389e2..bd314c33a 100644 --- a/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedVector.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/collections/ResourceLimitedVector.hpp @@ -119,6 +119,48 @@ class ResourceLimitedVector return *this; } + /** + * Insert value before pos. + * + * @param pos iterator before which the content will be inserted. pos may be the end() iterator. + * @param value element value to insert. + * + * @return Iterator pointing to the inserted value. end() if insertion couldn't be done due to collection limits. + */ + iterator insert( + const_iterator pos, + const value_type& value) + { + auto dist = std::distance(collection_.cbegin(), pos); + if (!ensure_capacity()) + { + return end(); + } + + return collection_.insert(collection_.cbegin() + dist, value); + } + + /** + * Insert value before pos. + * + * @param pos iterator before which the content will be inserted. pos may be the end() iterator. + * @param value element value to insert. + * + * @return Iterator pointing to the inserted value. end() if insertion couldn't be done due to collection limits. + */ + iterator insert( + const_iterator pos, + value_type&& value) + { + auto dist = std::distance(collection_.cbegin(), pos); + if (!ensure_capacity()) + { + return end(); + } + + return collection_.insert(collection_.cbegin() + dist, std::move(value)); + } + /** * Add element at the end. * @@ -148,7 +190,17 @@ class ResourceLimitedVector pointer push_back( value_type&& val) { - return emplace_back(std::move(val)); + if (!ensure_capacity()) + { + // Indicate error by returning null pointer + return nullptr; + } + + // Move the element at the end of the collection + collection_.push_back(std::move(val)); + + // Return pointer to newly created element + return &collection_.back(); } /** @@ -506,7 +558,7 @@ class ResourceLimitedVector * Remove element. * * Removes the element pointed to by it. - * All iterators may become invalidated if this method returns true. + * All iterators may become invalidated. * This version doesn't keep the order of insertion, optimizing the number of copies performed. * * @param it Iterator pointing to the item to be removed. @@ -529,7 +581,7 @@ class ResourceLimitedVector * Remove element. * * Removes the element pointed to by it. - * All iterators may become invalidated if this method returns true. + * All iterators may become invalidated. * This version keeps the order of insertion, so when removing an item different from the last one, * part of the collection will be copied. * diff --git a/ThirdParty/ros/include/fastrtps/utils/collections/foonathan_memory_helpers.hpp b/ThirdParty/ros/include/fastrtps/utils/collections/foonathan_memory_helpers.hpp index 7dc5c4dff..e392513e0 100644 --- a/ThirdParty/ros/include/fastrtps/utils/collections/foonathan_memory_helpers.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/collections/foonathan_memory_helpers.hpp @@ -24,6 +24,7 @@ #include #include "ResourceLimitedContainerConfig.hpp" +#include namespace eprosima { namespace fastrtps { @@ -44,11 +45,9 @@ std::size_t memory_pool_block_size( std::size_t node_size, const ResourceLimitedContainerConfig& limits) { -#ifdef FOONATHAN_MEMORY_MEMORY_POOL_HAS_MIN_BLOCK_SIZE - - return MemoryPool::min_block_size(node_size, limits.initial ? limits.initial : 1); + FASTDDS_DEPRECATED_UNTIL(3, "eprosima::fastrtps::memory_pool_block_size", "You should not use this method") + namespace fm = foonathan::memory; -#else size_t num_elems = limits.increment > 0 ? limits.initial : limits.maximum; if (num_elems < 1u) { @@ -57,8 +56,15 @@ std::size_t memory_pool_block_size( return num_elems * ((node_size > MemoryPool::min_node_size ? node_size : MemoryPool::min_node_size) // Room for elements - * (foonathan::memory::detail::debug_fence_size ? 3 : 1)) // Room for debug info - + foonathan::memory::detail::memory_block_stack::implementation_offset; // Room for padding +#if FOONATHAN_MEMORY_DEBUG_DOUBLE_DEALLOC_CHECK + * (fm::detail::debug_fence_size ? 3 : 1)) // Room for debug info +#else + + (fm::detail::debug_fence_size ? 2 * fm::detail::max_alignment : 0)) // Room for debug info +#endif // if FOONATHAN_MEMORY_DEBUG_DOUBLE_DEALLOC_CHECK +#ifdef FOONATHAN_MEMORY_MEMORY_POOL_HAS_MIN_BLOCK_SIZE + + fm::detail::memory_block_stack::implementation_offset(); // Room for padding +#else + + fm::detail::memory_block_stack::implementation_offset; // Room for padding #endif // FOONATHAN_MEMORY_MEMORY_POOL_HAS_MIN_BLOCK_SIZE } diff --git a/ThirdParty/ros/include/fastrtps/utils/fixed_size_bitmap.hpp b/ThirdParty/ros/include/fastrtps/utils/fixed_size_bitmap.hpp index dbbbd03dc..40bbd627b 100644 --- a/ThirdParty/ros/include/fastrtps/utils/fixed_size_bitmap.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/fixed_size_bitmap.hpp @@ -101,8 +101,22 @@ class BitmapRange */ explicit BitmapRange( T base) noexcept + : BitmapRange(base, NBITS - 1) + { + } + + /** + * Range specific constructor. + * Constructs an empty range with specified base and maximum bits. + * + * @param base Specific base value for the created range. + * @param max_bits Specific maximum number of bits. + */ + BitmapRange( + T base, + uint32_t max_bits) noexcept : base_(base) - , range_max_(base + (NBITS - 1)) + , range_max_(base_ + (std::min)(max_bits, NBITS - 1)) , bitmap_() , num_bits_(0u) { @@ -134,6 +148,23 @@ class BitmapRange bitmap_.fill(0u); } + /** + * Set a new base and maximum bits for the range. + * This method resets the range and sets a new value for its base, as long as a maximum number of bits. + * + * @param base New base value to set. + * @param max_bits New maximum number of bits. + */ + void base( + T base, + uint32_t max_bits) noexcept + { + base_ = base; + range_max_ = base_ + (std::min)(max_bits, NBITS - 1); + num_bits_ = 0; + bitmap_.fill(0u); + } + /** * Set a new base for the range, keeping old values where possible. * This method implements a sliding window mechanism for changing the base of the range. @@ -385,7 +416,7 @@ class BitmapRange * This method is designed to be used when performing deserialization of a bitmap range. * * @param num_bits Number of significant bits in the input bitmap. - * @param bitmap Points to the begining of a uint32_t array holding the input bitmap. + * @param bitmap Points to the beginning of a uint32_t array holding the input bitmap. */ void bitmap_set( uint32_t num_bits, diff --git a/ThirdParty/ros/include/fastrtps/utils/fixed_size_string.hpp b/ThirdParty/ros/include/fastrtps/utils/fixed_size_string.hpp index 3e82eef76..a2b0aa970 100644 --- a/ThirdParty/ros/include/fastrtps/utils/fixed_size_string.hpp +++ b/ThirdParty/ros/include/fastrtps/utils/fixed_size_string.hpp @@ -27,7 +27,7 @@ #define MEMCCPY _memccpy #else #define MEMCCPY memccpy -#endif +#endif // ifdef _WIN32 #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC namespace eprosima { @@ -42,71 +42,151 @@ namespace fastrtps { template struct fixed_string { - public: - - static constexpr size_t max_size = MAX_CHARS; - - /// Default constructor. - fixed_string() noexcept +public: + + static constexpr size_t max_size = MAX_CHARS; + + /// Default constructor. + fixed_string() noexcept + { + memset(string_data, 0, sizeof(string_data)); + string_len = 0; + } + + // We don't need to define copy/move constructors/assignment operators as the default ones would be enough + + // Construct / assign from a char array + fixed_string( + const char* c_array, + size_t n_chars) noexcept + { + assign(c_array, n_chars); + } + + fixed_string& assign( + const char* c_array, + size_t n_chars) noexcept + { + string_len = (nullptr == c_array) ? 0 : + (MAX_CHARS < n_chars) ? MAX_CHARS : n_chars; + if (0 < string_len) { - memset(string_data, 0, sizeof(string_data) ); - string_len = 0; - } - - // We don't need to define copy/move constructors/assignment operators as the default ones would be enough - - // Construct / assign from a C string - fixed_string (const char* c_string) noexcept : fixed_string() - { - set(c_string != nullptr ? c_string : ""); + memcpy(string_data, c_array, string_len); } - - fixed_string& operator = (const char* c_string) noexcept - { - set(c_string != nullptr ? c_string : ""); - return *this; - } - - // Construct / assign from a std::string - fixed_string (const std::string& str) noexcept : fixed_string() { set(str.c_str()); } - fixed_string& operator = (const std::string& str) noexcept { set(str.c_str()); return *this; } - - // Assign from fixed_string of any size - template fixed_string& operator = (const fixed_string & rhs) noexcept { set(rhs.c_str()); return *this; } - - // Converters to standard types - const char* c_str() const noexcept { return string_data; } - std::string to_string() const { return std::string(string_data); } - - // Equality comparisons - bool operator == (const char* rhs) const noexcept { return strncmp(string_data, rhs, MAX_CHARS) == 0; } - bool operator == (const std::string& rhs) const noexcept { return strncmp(string_data, rhs.c_str(), MAX_CHARS) == 0; } - template bool operator == (const fixed_string & rhs) const noexcept { return strncmp(string_data, rhs.c_str(), MAX_CHARS) == 0; } - - // Inequality comparisons - bool operator != (const char* rhs) const noexcept { return strncmp(string_data, rhs, MAX_CHARS) != 0; } - bool operator != (const std::string& rhs) const noexcept { return strncmp(string_data, rhs.c_str(), MAX_CHARS) != 0; } - template bool operator != (const fixed_string & rhs) const noexcept { return strncmp(string_data, rhs.c_str(), MAX_CHARS) != 0; } - - operator const char* () const noexcept { return c_str(); } - - size_t size() const noexcept { return string_len; } - - private: - void set(const char* c_string) noexcept - { - char* result = (char*) MEMCCPY(string_data, c_string, '\0', MAX_CHARS); - string_len = (result == nullptr) ? MAX_CHARS : (size_t)(result - string_data) - 1u; - } - - char string_data[MAX_CHARS + 1]; ///< Holds string data, including ending null character. - size_t string_len; ///< Holds current string length. + return *this; + } + + // Construct / assign from a C string + fixed_string ( + const char* c_string) noexcept + : fixed_string() + { + set(c_string != nullptr ? c_string : ""); + } + + fixed_string& operator = ( + const char* c_string) noexcept + { + set(c_string != nullptr ? c_string : ""); + return *this; + } + + // Construct / assign from a std::string + fixed_string ( + const std::string& str) noexcept + : fixed_string() + { + set(str.c_str()); + } + + fixed_string& operator = ( + const std::string& str) noexcept + { + set(str.c_str()); return *this; + } + + // Assign from fixed_string of any size + template fixed_string& operator = ( + const fixed_string& rhs) noexcept + { + set(rhs.c_str()); return *this; + } + + // Converters to standard types + const char* c_str() const noexcept + { + return string_data; + } + + std::string to_string() const + { + return std::string(string_data); + } + + // Equality comparisons + bool operator == ( + const char* rhs) const noexcept + { + return strncmp(string_data, rhs, MAX_CHARS) == 0; + } + + bool operator == ( + const std::string& rhs) const noexcept + { + return strncmp(string_data, rhs.c_str(), MAX_CHARS) == 0; + } + + template bool operator == ( + const fixed_string& rhs) const noexcept + { + return strncmp(string_data, rhs.c_str(), MAX_CHARS) == 0; + } + + // Inequality comparisons + bool operator != ( + const char* rhs) const noexcept + { + return strncmp(string_data, rhs, MAX_CHARS) != 0; + } + + bool operator != ( + const std::string& rhs) const noexcept + { + return strncmp(string_data, rhs.c_str(), MAX_CHARS) != 0; + } + + template bool operator != ( + const fixed_string& rhs) const noexcept + { + return strncmp(string_data, rhs.c_str(), MAX_CHARS) != 0; + } + + operator const char* () const noexcept { + return c_str(); + } + + size_t size() const noexcept + { + return string_len; + } + +private: + + void set( + const char* c_string) noexcept + { + char* result = (char*) MEMCCPY(string_data, c_string, '\0', MAX_CHARS); + string_len = (result == nullptr) ? MAX_CHARS : (size_t)(result - string_data) - 1u; + } + + char string_data[MAX_CHARS + 1]; ///< Holds string data, including ending null character. + size_t string_len; ///< Holds current string length. }; using string_255 = fixed_string<255>; } /* namespace fastrtps */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* FASTRTPS_UTILS_FIXED_SIZE_STRING_HPP_ */ diff --git a/ThirdParty/ros/include/fastrtps/utils/shared_mutex.hpp b/ThirdParty/ros/include/fastrtps/utils/shared_mutex.hpp new file mode 100644 index 000000000..d6924144e --- /dev/null +++ b/ThirdParty/ros/include/fastrtps/utils/shared_mutex.hpp @@ -0,0 +1,655 @@ +/* + Copyright Howard Hinnant 2007-2010. Distributed under the Boost + Software License, Version 1.0. (see http://www.boost.org/LICENSE_1_0.txt) + The original implementation has been modified to support the POSIX priorities: + + PTHREAD_RWLOCK_PREFER_READER_NP + This is the default. A thread may hold multiple read + locks; that is, read locks are recursive. According to + The Single Unix Specification, the behavior is unspecified + when a reader tries to place a lock, and there is no write + lock but writers are waiting. Giving preference to the + reader, as is set by PTHREAD_RWLOCK_PREFER_READER_NP, + implies that the reader will receive the requested lock, + even if a writer is waiting. As long as there are + readers, the writer will be starved. + + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP + Setting the lock kind to this avoids writer starvation as + long as any read locking is not done in a recursive + fashion. + + The C++ Standard has not yet (C++20) imposed any requirements on shared_mutex implementation thus + each platform made its own choices: + Windows & Boost defaults to PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP. + Linux & Mac defaults to PTHREAD_RWLOCK_PREFER_READER_NP. + */ + +/** + * @file shared_mutex.hpp + */ + +#ifndef _UTILS_SHARED_MUTEX_HPP_ +#define _UTILS_SHARED_MUTEX_HPP_ + +#include +#include +#include +#include +#include +#include + +namespace eprosima { +namespace detail { + +// mimic POSIX Read-Write lock syntax +enum class shared_mutex_type +{ + PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP +}; + +class shared_mutex_base +{ + +protected: + + typedef std::mutex mutex_t; + typedef std::condition_variable cond_t; + typedef unsigned count_t; + + mutex_t mut_; + cond_t gate1_; + count_t state_; + + static const count_t write_entered_ = 1U << (sizeof(count_t) * CHAR_BIT - 1); + static const count_t n_readers_ = ~write_entered_; + +public: + + shared_mutex_base() + : state_(0) + { + } + + ~shared_mutex_base() + { + std::lock_guard _(mut_); + } + + shared_mutex_base( + const shared_mutex_base&) = delete; + shared_mutex_base& operator =( + const shared_mutex_base&) = delete; + + // Exclusive ownership + + bool try_lock() + { + std::lock_guard _(mut_); + if (state_ == 0) + { + state_ = write_entered_; + return true; + } + return false; + } + + void unlock() + { + std::lock_guard _(mut_); + state_ = 0; + gate1_.notify_all(); + } + + // Shared ownership + + void lock_shared() + { + std::unique_lock lk(mut_); + while ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) + { + gate1_.wait(lk); + } + count_t num_readers = (state_ & n_readers_) + 1; + state_ &= ~n_readers_; + state_ |= num_readers; + } + + bool try_lock_shared() + { + std::lock_guard _(mut_); + count_t num_readers = state_ & n_readers_; + if (!(state_ & write_entered_) && num_readers != n_readers_) + { + ++num_readers; + state_ &= ~n_readers_; + state_ |= num_readers; + return true; + } + return false; + } + +}; + +template +class shared_mutex; + +// original Hinnant implementation prioritizing writers + +template<> +class shared_mutex + : public shared_mutex_base +{ + cond_t gate2_; + +public: + + void lock() + { + std::unique_lock lk(mut_); + while (state_ & write_entered_) + { + gate1_.wait(lk); + } + state_ |= write_entered_; + while (state_ & n_readers_) + { + gate2_.wait(lk); + } + } + + void unlock_shared() + { + std::lock_guard _(mut_); + count_t num_readers = (state_ & n_readers_) - 1; + state_ &= ~n_readers_; + state_ |= num_readers; + if (state_ & write_entered_) + { + if (num_readers == 0) + { + gate2_.notify_one(); + } + } + else if (num_readers == n_readers_ - 1) + { + gate1_.notify_one(); + } + } + +}; + +// implementation not locking readers on behalf of writers + +template<> +class shared_mutex + : public shared_mutex_base +{ + count_t writer_waiting_ = 0; + +public: + + void lock() + { + std::unique_lock lk(mut_); + ++writer_waiting_; + while (state_ & n_readers_ || state_ & write_entered_) + { + gate1_.wait(lk); + } + state_ |= write_entered_; + --writer_waiting_; + } + + void unlock_shared() + { + std::lock_guard _(mut_); + count_t num_readers = (state_ & n_readers_) - 1; + state_ &= ~n_readers_; + state_ |= num_readers; + + if ((writer_waiting_ && num_readers == 0) + || (num_readers == n_readers_ - 1)) + { + gate1_.notify_one(); + } + } + +}; + +// Debugger wrapper class that provides insight +template +class debug_wrapper : public sm +{ + std::mutex wm_; + // Identity of the exclusive owner if any + std::thread::id exclusive_owner_ = {}; + // key_type thread_id, mapped_type number of locks + std::map shared_owners_; + +public: + + ~debug_wrapper() + { + std::lock_guard _(wm_); + } + + // Exclusive ownership + + void lock() + { + sm::lock(); + std::lock_guard _(wm_); + exclusive_owner_ = std::this_thread::get_id(); + } + + bool try_lock() + { + bool res = sm::try_lock(); + std::lock_guard _(wm_); + if (res) + { + exclusive_owner_ = std::this_thread::get_id(); + } + return res; + } + + void unlock() + { + sm::unlock(); + std::lock_guard _(wm_); + exclusive_owner_ = std::thread::id(); + } + + // Shared ownership + + void lock_shared() + { + sm::lock_shared(); + std::lock_guard _(wm_); + ++shared_owners_[std::this_thread::get_id()]; + } + + bool try_lock_shared() + { + bool res = sm::try_lock_shared(); + std::lock_guard _(wm_); + if (res) + { + ++shared_owners_[std::this_thread::get_id()]; + } + return res; + } + + void unlock_shared() + { + sm::unlock_shared(); + std::lock_guard _(wm_); + auto owner = shared_owners_.find(std::this_thread::get_id()); + if ( owner != shared_owners_.end() && 0 == --owner->second ) + { + shared_owners_.erase(owner); + } + } + +}; + +} // namespace detail +} // namespace eprosima + +#if defined(__has_include) && __has_include() +# include +#endif // if defined(__has_include) && __has_include() + +// Detect if the shared_lock feature is available +#if defined(__has_include) && __has_include() && !defined(__cpp_lib_shared_mutex) || \ + /* deprecated procedure if the good one is not available*/ \ + ( !(defined(__has_include) && __has_include()) && \ + !(defined(HAVE_CXX17) && HAVE_CXX17) && __cplusplus < 201703 ) + +namespace eprosima { + +template +class shared_lock +{ +public: + + typedef Mutex mutex_type; + +private: + + mutex_type* m_; + bool owns_; + + struct __nat + { + int _; + }; + +public: + + shared_lock() + : m_(nullptr) + , owns_(false) + { + } + + explicit shared_lock( + mutex_type& m) + : m_(&m) + , owns_(true) + { + m_->lock_shared(); + } + + shared_lock( + mutex_type& m, + std::defer_lock_t) + : m_(&m) + , owns_(false) + { + } + + shared_lock( + mutex_type& m, + std::try_to_lock_t) + : m_(&m) + , owns_(m.try_lock_shared()) + { + } + + shared_lock( + mutex_type& m, + std::adopt_lock_t) + : m_(&m) + , owns_(true) + { + } + + template + shared_lock( + mutex_type& m, + const std::chrono::time_point& abs_time) + : m_(&m) + , owns_(m.try_lock_shared_until(abs_time)) + { + } + + template + shared_lock( + mutex_type& m, + const std::chrono::duration& rel_time) + : m_(&m) + , owns_(m.try_lock_shared_for(rel_time)) + { + } + + ~shared_lock() + { + if (owns_) + { + m_->unlock_shared(); + } + } + + shared_lock( + shared_lock const&) = delete; + shared_lock& operator =( + shared_lock const&) = delete; + + shared_lock( + shared_lock&& sl) + : m_(sl.m_) + , owns_(sl.owns_) + { + sl.m_ = nullptr; sl.owns_ = false; + } + + shared_lock& operator =( + shared_lock&& sl) + { + if (owns_) + { + m_->unlock_shared(); + } + m_ = sl.m_; + owns_ = sl.owns_; + sl.m_ = nullptr; + sl.owns_ = false; + return *this; + } + + explicit shared_lock( + std::unique_lock&& ul) + : m_(ul.mutex()) + , owns_(ul.owns_lock()) + { + if (owns_) + { + m_->unlock_and_lock_shared(); + } + ul.release(); + } + + void lock(); + bool try_lock(); + template + bool try_lock_for( + const std::chrono::duration& rel_time) + { + return try_lock_until(std::chrono::steady_clock::now() + rel_time); + } + + template + bool + try_lock_until( + const std::chrono::time_point& abs_time); + void unlock(); + + void swap( + shared_lock&& u) + { + std::swap(m_, u.m_); + std::swap(owns_, u.owns_); + } + + mutex_type* release() + { + mutex_type* r = m_; + m_ = nullptr; + owns_ = false; + return r; + } + + bool owns_lock() const + { + return owns_; + } + + operator int __nat::* () const { + return owns_ ? &__nat::_ : 0; + } + mutex_type* mutex() const + { + return m_; + } + +}; + +template +void +shared_lock::lock() +{ + if (m_ == nullptr) + { + throw std::system_error(std::error_code(EPERM, std::system_category()), + "shared_lock::lock: references null mutex"); + } + if (owns_) + { + throw std::system_error(std::error_code(EDEADLK, std::system_category()), + "shared_lock::lock: already locked"); + } + m_->lock_shared(); + owns_ = true; +} + +template +bool +shared_lock::try_lock() +{ + if (m_ == nullptr) + { + throw std::system_error(std::error_code(EPERM, std::system_category()), + "shared_lock::try_lock: references null mutex"); + } + if (owns_) + { + throw std::system_error(std::error_code(EDEADLK, std::system_category()), + "shared_lock::try_lock: already locked"); + } + owns_ = m_->try_lock_shared(); + return owns_; +} + +template +template +bool +shared_lock::try_lock_until( + const std::chrono::time_point& abs_time) +{ + if (m_ == nullptr) + { + throw std::system_error(std::error_code(EPERM, std::system_category()), + "shared_lock::try_lock_until: references null mutex"); + } + if (owns_) + { + throw std::system_error(std::error_code(EDEADLK, std::system_category()), + "shared_lock::try_lock_until: already locked"); + } + owns_ = m_->try_lock_shared_until(abs_time); + return owns_; +} + +template +void +shared_lock::unlock() +{ + if (!owns_) + { + throw std::system_error(std::error_code(EPERM, std::system_category()), + "shared_lock::unlock: not locked"); + } + m_->unlock_shared(); + owns_ = false; +} + +template +inline +void +swap( + shared_lock& x, + shared_lock& y) +{ + x.swap(y); +} + +} //namespace eprosima + +#else // fallback to STL + +#include + +namespace eprosima { + +using std::shared_lock; +using std::swap; + +} //namespace eprosima + +#endif // shared_lock selection + +#ifndef USE_THIRDPARTY_SHARED_MUTEX +# if defined(_MSC_VER) && _MSVC_LANG < 202302L +# pragma message("warning: USE_THIRDPARTY_SHARED_MUTEX not defined. By default use framework version.") +# else +# warning "USE_THIRDPARTY_SHARED_MUTEX not defined. By default use framework version." +# endif // if defined(_MSC_VER) && _MSVC_LANG < 202302L +# define USE_THIRDPARTY_SHARED_MUTEX 0 +#endif // ifndef USE_THIRDPARTY_SHARED_MUTEX + +// Detect if the share_mutex feature is available or if the user forces it +#if defined(__has_include) && __has_include() && !defined(__cpp_lib_shared_mutex) || \ + /* allow users to ignore shared_mutex framework implementation */ \ + (~USE_THIRDPARTY_SHARED_MUTEX + 1) || \ + /* deprecated procedure if the good one is not available*/ \ + ( !(defined(__has_include) && __has_include()) && \ + !(defined(HAVE_CXX17) && HAVE_CXX17) && __cplusplus < 201703 ) + +/* + Fast-DDS defaults to PTHREAD_RWLOCK_PREFER_READER_NP for two main reasons: + + - It allows reader side recursiveness. If we have two threads (T1, T2) and + called S a shared lock and E and exclusive one. + + T1: S -> S + T2: E + + PTHREAD_RWLOCK_PREFER_READER_NP will never deadlock. The S locks are not + influenced by the E locks. + + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP will deadlock. before T1 + takes S twice. That happens because: + + T1's second S will wait for E (writer is prioritized) + + E will wait for T1's first S lock (writer needs atomic access) + + T1's first S cannot unlock because is blocked in the second S. + + Thus, shared_mutex is + non-recursive. + + - It prevents ABBA deadlocks with other mutexes. If we have three threads + (Ti) and P is an ordinary mutex: + + T1: P -> S + T2: S -> P + T3: E + + PTHREAD_RWLOCK_PREFER_READER_NP will never deadlock. The S locks are not + influenced by the E locks. Starvation issues can be managed in the user + code. + + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP will deadlock if T3 takes E + before T1 takes S. That happens because: + + T1's S will wait for E (writer is prioritized) + + E will wait for T2's S lock (writer needs atomic access) + + T2's S cannot unlock because is blocked in P (owned by T1). + + Thus, shared_mutex must be + managed like an ordinary mutex in deadlock sense. + */ + +namespace eprosima { + +#ifdef NDEBUG +using shared_mutex = detail::shared_mutex; +#else +using shared_mutex = + detail::debug_wrapper>; +#endif // NDEBUG + +} //namespace eprosima + +#else // fallback to STL + +#include + +namespace eprosima { + +using std::shared_mutex; + +} //namespace eprosima + +#endif // shared_mutex selection + +#endif // _UTILS_SHARED_MUTEX_HPP_ diff --git a/ThirdParty/ros/include/fastrtps/xmlparser/XMLEndpointParser.h b/ThirdParty/ros/include/fastrtps/xmlparser/XMLEndpointParser.h index b76166097..89d11cc44 100644 --- a/ThirdParty/ros/include/fastrtps/xmlparser/XMLEndpointParser.h +++ b/ThirdParty/ros/include/fastrtps/xmlparser/XMLEndpointParser.h @@ -21,103 +21,138 @@ #define XMLENDPOINTPARSER_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include +#include #include +#include #include -#include -namespace tinyxml2 -{ - class XMLElement; - class XMLDocument; -} +#include +#include +#include +#include +#include + +namespace tinyxml2 { +class XMLElement; +class XMLDocument; +} // namespace tinyxml2 -namespace eprosima{ -namespace fastrtps{ -namespace rtps{ + +namespace eprosima { +namespace fastrtps { +namespace rtps { class ReaderProxyData; class WriterProxyData; -} +} // namespace rtps -namespace xmlparser{ +namespace xmlparser { /** * Class StaticRTPSParticipantInfo, contains the information of writers and readers loaded from the XML file. *@ingroup DISCOVERY_MODULE */ -class StaticRTPSParticipantInfo{ +class StaticRTPSParticipantInfo +{ public: - StaticRTPSParticipantInfo(){}; - virtual ~StaticRTPSParticipantInfo(){}; - //!RTPS PArticipant name - std::string m_RTPSParticipantName; - //!Vector of ReaderProxyData pointer - std::vector m_readers; - //!Vector of ReaderProxyData pointer - std::vector m_writers; + + StaticRTPSParticipantInfo() + { + } + + virtual ~StaticRTPSParticipantInfo() + { + } + + //!RTPS PArticipant name + std::string m_RTPSParticipantName; + //!Vector of ReaderProxyData pointer + std::vector m_readers; + //!Vector of ReaderProxyData pointer + std::vector m_writers; }; /** * Class XMLEndpointParser used to parse the XML file that contains information about remote endpoints. * @ingroup DISCVOERYMODULE */ -class XMLEndpointParser { +class XMLEndpointParser : XMLParser +{ public: - XMLEndpointParser(); - virtual ~XMLEndpointParser(); - /** - * Load the XML file - * @param filename Name of the file to load and parse. - * @return True if correct. - */ - XMLP_ret loadXMLFile(std::string& filename); - /** - * Load the XML node - * @param doc Node to parse. - * @return True if correct. - */ - XMLP_ret loadXMLNode(tinyxml2::XMLDocument& doc); - - void loadXMLParticipantEndpoint(tinyxml2::XMLElement* xml_endpoint, StaticRTPSParticipantInfo* pdata); - - /** - * Load a Reader endpoint. - * @param xml_endpoint Reference of a tree child for a reader. - * @param pdata Pointer to the RTPSParticipantInfo where the reader must be added. - * @return True if correctly added. - */ - XMLP_ret loadXMLReaderEndpoint(tinyxml2::XMLElement* xml_endpoint,StaticRTPSParticipantInfo* pdata); - /** - * Load a Writer endpoint. - * @param xml_endpoint Reference of a tree child for a writer. - * @param pdata Pointer to the RTPSParticipantInfo where the reader must be added. - * @return True if correctly added. - */ - XMLP_ret loadXMLWriterEndpoint(tinyxml2::XMLElement* xml_endpoint, StaticRTPSParticipantInfo* pdata); - /** - * Look for a reader in the previously loaded endpoints. - * @param[in] partname RTPSParticipant name - * @param[in] id Id of the reader - * @param[out] rdataptr Pointer to pointer to return the information. - * @return True if found. - */ - XMLP_ret lookforReader(const char* partname, uint16_t id, rtps::ReaderProxyData** rdataptr); - /** - * Look for a writer in the previously loaded endpoints. - * @param[in] partname RTPSParticipant name - * @param[in] id Id of the writer - * @param[out] wdataptr Pointer to pointer to return the information. - * @return True if found - */ - XMLP_ret lookforWriter(const char* partname, uint16_t id, rtps::WriterProxyData** wdataptr); + + XMLEndpointParser(); + virtual ~XMLEndpointParser(); + /** + * Load the XML file + * @param filename Name of the file to load and parse. + * @return True if correct. + */ + XMLP_ret loadXMLFile( + std::string& filename); + /** + * Load the XML node + * @param doc Node to parse. + * @return True if correct. + */ + XMLP_ret loadXMLNode( + tinyxml2::XMLDocument& doc); + + void loadXMLParticipantEndpoint( + tinyxml2::XMLElement* xml_endpoint, + StaticRTPSParticipantInfo* pdata); + + /** + * Load a Reader endpoint. + * @param xml_endpoint Reference of a tree child for a reader. + * @param pdata Pointer to the RTPSParticipantInfo where the reader must be added. + * @return True if correctly added. + */ + XMLP_ret loadXMLReaderEndpoint( + tinyxml2::XMLElement* xml_endpoint, + StaticRTPSParticipantInfo* pdata); + /** + * Load a Writer endpoint. + * @param xml_endpoint Reference of a tree child for a writer. + * @param pdata Pointer to the RTPSParticipantInfo where the reader must be added. + * @return True if correctly added. + */ + XMLP_ret loadXMLWriterEndpoint( + tinyxml2::XMLElement* xml_endpoint, + StaticRTPSParticipantInfo* pdata); + /** + * Look for a reader in the previously loaded endpoints. + * @param[in] partname RTPSParticipant name + * @param[in] id Id of the reader + * @param[out] rdataptr Pointer to pointer to return the information. + * @return True if found. + */ + XMLP_ret lookforReader( + const char* partname, + uint16_t id, + rtps::ReaderProxyData** rdataptr); + /** + * Look for a writer in the previously loaded endpoints. + * @param[in] partname RTPSParticipant name + * @param[in] id Id of the writer + * @param[out] wdataptr Pointer to pointer to return the information. + * @return True if found + */ + XMLP_ret lookforWriter( + const char* partname, + uint16_t id, + rtps::WriterProxyData** wdataptr); private: - std::set m_endpointIds; - std::set m_entityIds; - std::vector m_RTPSParticipants; + XMLP_ret get_disable_positive_acks_qos( + tinyxml2::XMLElement* elem, + DisablePositiveACKsQosPolicy& disable_positive_acks_qos); + + std::set m_endpointIds; + std::set m_entityIds; + + std::vector m_RTPSParticipants; }; @@ -125,5 +160,5 @@ class XMLEndpointParser { } /* namespace */ } /* namespace eprosima */ -#endif +#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* XMLENDPOINTPARSER_H_ */ diff --git a/ThirdParty/ros/include/fastrtps/xmlparser/XMLParser.h b/ThirdParty/ros/include/fastrtps/xmlparser/XMLParser.h index 2143ee5d8..2ef8ea39b 100644 --- a/ThirdParty/ros/include/fastrtps/xmlparser/XMLParser.h +++ b/ThirdParty/ros/include/fastrtps/xmlparser/XMLParser.h @@ -162,10 +162,6 @@ class XMLParser tinyxml2::XMLElement* p_root, BaseNode& profilesNode); - RTPS_DllAPI static XMLP_ret parseRoot( - tinyxml2::XMLElement* p_root, - BaseNode& rootNode); - /** * Load a XML log node and parses it. It applies the configuration of the node directly. @@ -525,7 +521,7 @@ class XMLParser RTPS_DllAPI static XMLP_ret getXMLOctetVector( tinyxml2::XMLElement* elem, - std::vector& octetVector, + std::vector& octet_vector, uint8_t ident); RTPS_DllAPI static XMLP_ret getXMLInt( @@ -583,6 +579,11 @@ class XMLParser DisablePositiveACKsQosPolicy& disablePositiveAcks, uint8_t ident); + RTPS_DllAPI static XMLP_ret getXMLDataSharingQos( + tinyxml2::XMLElement* elem, + DataSharingQosPolicy& data_sharing, + uint8_t ident); + RTPS_DllAPI static XMLP_ret getXMLguidPrefix( tinyxml2::XMLElement* elem, rtps::GuidPrefix_t& prefix, diff --git a/ThirdParty/ros/include/fastrtps/xmlparser/XMLParserCommon.h b/ThirdParty/ros/include/fastrtps/xmlparser/XMLParserCommon.h index 69a920b1a..759aa0099 100644 --- a/ThirdParty/ros/include/fastrtps/xmlparser/XMLParserCommon.h +++ b/ThirdParty/ros/include/fastrtps/xmlparser/XMLParserCommon.h @@ -19,9 +19,6 @@ namespace eprosima { namespace fastrtps { namespace xmlparser { -#define draw(ident, text, ...) for (uint8_t i = ident + 1; i > 0; --i)(i == 1) ? printf(text, ## __VA_ARGS__) : printf( \ - "\t") - /** * Enum class XMLP_ret, used to provide a strongly typed result from the operations within this module. * @ingroup XMLPARSER_MODULE @@ -36,6 +33,7 @@ enum class XMLP_ret extern const char* DEFAULT_FASTRTPS_ENV_VARIABLE; extern const char* DEFAULT_FASTRTPS_PROFILES; +extern const char* SKIP_DEFAULT_XML_FILE; extern const char* ROOT; extern const char* PROFILES; @@ -81,6 +79,7 @@ extern const char* HEALTHY_CHECK_TIMEOUT_MS; extern const char* DISCARD; extern const char* FAIL; extern const char* RTPS_DUMP_FILE; +extern const char* ON; // IntraprocessDeliveryType extern const char* OFF; @@ -206,6 +205,8 @@ extern const char* TOPIC_DATA; extern const char* GROUP_DATA; extern const char* PUB_MODE; extern const char* DISABLE_POSITIVE_ACKS; +extern const char* DISABLE_HEARTBEAT_PIGGYBACK; +extern const char* DATA_SHARING; extern const char* SYNCHRONOUS; extern const char* ASYNCHRONOUS; @@ -247,6 +248,7 @@ extern const char* HISTORY_QOS; extern const char* RES_LIMITS_QOS; extern const char* DEPTH; extern const char* ALLOCATED_SAMPLES; +extern const char* EXTRA_SAMPLES; extern const char* BYTES_PER_SECOND; extern const char* PERIOD_MILLISECS; extern const char* PORT_BASE; @@ -286,6 +288,7 @@ extern const char* STATIC; extern const char* PUBWRITER_SUBREADER; extern const char* PUBREADER_SUBWRITER; extern const char* STATIC_ENDPOINT_XML; +extern const char* STATIC_ENDPOINT_XML_URI; extern const char* READER_HIST_MEM_POLICY; extern const char* WRITER_HIST_MEM_POLICY; extern const char* READER_PAYLOAD_SIZE; @@ -293,6 +296,9 @@ extern const char* WRITER_PAYLOAD_SIZE; extern const char* MUTATION_TRIES; extern const char* ACCESS_SCOPE; extern const char* ENABLED; +extern const char* DOMAIN_IDS; +extern const char* SHARED_DIR; +extern const char* MAX_DOMAINS; // Endpoint parser extern const char* STATICDISCOVERY; @@ -309,6 +315,8 @@ extern const char* MULTICAST_LOCATOR; extern const char* _RELIABLE_RELIABILITY_QOS; extern const char* _BEST_EFFORT_RELIABILITY_QOS; extern const char* DURABILITY_QOS; +extern const char* _PERSISTENT_DURABILITY_QOS; +extern const char* _TRANSIENT_DURABILITY_QOS; extern const char* _TRANSIENT_LOCAL_DURABILITY_QOS; extern const char* _VOLATILE_DURABILITY_QOS; extern const char* OWNERSHIP_QOS; diff --git a/ThirdParty/ros/include/fastrtps/xmlparser/XMLProfileManager.h b/ThirdParty/ros/include/fastrtps/xmlparser/XMLProfileManager.h index 822353c05..83f3bf191 100644 --- a/ThirdParty/ros/include/fastrtps/xmlparser/XMLProfileManager.h +++ b/ThirdParty/ros/include/fastrtps/xmlparser/XMLProfileManager.h @@ -70,6 +70,17 @@ class XMLProfileManager RTPS_DllAPI static XMLP_ret loadXMLFile( const std::string& filename); + /** + * Load a profiles XML string. + * @param data Buffer containing the data. + * @param length Length of data. + * @return XMLP_ret::XML_OK if all profiles are correct, XMLP_ret::XML_NOK if some are and some are not, + * XMLP_ret::XML_ERROR in other case. + */ + RTPS_DllAPI static XMLP_ret loadXMLString( + const char* data, + size_t length); + /** * Load a profiles XML node. * @param doc Node to be loaded. @@ -211,9 +222,9 @@ class XMLProfileManager ReplierAttributes& atts); /** - * Deletes the XMLProsileManager instance. - * FastRTPS's Domain calls this method automatically on its destructor, but - * if using XMLProfileManager outside of FastRTPS, it should be called manually. + * Deletes the XMLProfileManager instance. + * FastDDS's Domain calls this method automatically on its destructor, but + * if using XMLProfileManager outside of FastDDS, it should be called manually. */ RTPS_DllAPI static void DeleteInstance() { @@ -222,6 +233,7 @@ class XMLProfileManager subscriber_profiles_.clear(); requester_profiles_.clear(); replier_profiles_.clear(); + topic_profiles_.clear(); xml_files_.clear(); transport_profiles_.clear(); } @@ -253,10 +265,6 @@ class XMLProfileManager private: - RTPS_DllAPI static XMLP_ret extractDynamicTypes( - up_base_node_t properties, - const std::string& filename); - RTPS_DllAPI static XMLP_ret extractProfiles( up_base_node_t properties, const std::string& filename); diff --git a/ThirdParty/ros/include/fastrtps/xmlparser/XMLTree.h b/ThirdParty/ros/include/fastrtps/xmlparser/XMLTree.h index 2f505b4c4..26c3d0f20 100644 --- a/ThirdParty/ros/include/fastrtps/xmlparser/XMLTree.h +++ b/ThirdParty/ros/include/fastrtps/xmlparser/XMLTree.h @@ -3,6 +3,7 @@ #include #include +#include #include namespace eprosima { @@ -26,50 +27,70 @@ enum class NodeType TYPES, LOG, REQUESTER, - REPLIER + REPLIER, + LIBRARY_SETTINGS }; class BaseNode { - public: - BaseNode(NodeType type) : data_type_(type), parent_(nullptr){}; +public: + + BaseNode( + NodeType type) + : data_type_(type) + , parent_(nullptr) + { + } + virtual ~BaseNode() = default; - BaseNode(const BaseNode&) = delete; - BaseNode& operator=(const BaseNode&) = delete; + BaseNode( + const BaseNode&) = delete; + BaseNode& operator =( + const BaseNode&) = delete; -// C++11 defaulted functions -// Vs2013 partly support defaulted functions. Defaulted move constructors and move assignment operators are not -// supported. + // C++11 defaulted functions + // Vs2013 partly support defaulted functions. Defaulted move constructors and move assignment operators are not + // supported. #if !defined(HAVE_CXX0X) || (defined(_MSC_VER) && _MSC_VER <= 1800) - BaseNode(BaseNode&& other) - : data_type_(std::move(other.data_type_)), parent_(std::move(other.parent_)), children(std::move(children)) + BaseNode( + BaseNode&& other) + : data_type_(std::move(other.data_type_)) + , parent_(std::move(other.parent_)) + , children(std::move(other.children)) { } - BaseNode& operator=(BaseNode&& other) + + BaseNode& operator =( + BaseNode&& other) { data_type_ = std::move(other.data_type_); parent_ = std::move(other.parent_); children = std::move(other.children); return *this; } + #else - BaseNode(BaseNode&&) = default; - BaseNode& operator=(BaseNode&&) = default; -#endif + BaseNode( + BaseNode&&) = default; + BaseNode& operator =( + BaseNode&&) = default; +#endif // if !defined(HAVE_CXX0X) || (defined(_MSC_VER) && _MSC_VER <= 1800) NodeType getType() const { return data_type_; } - void addChild(std::unique_ptr child) + void addChild( + std::unique_ptr child) { child->setParent(this); children.push_back(std::move(child)); } - bool removeChild(const size_t& index) + bool removeChild( + const size_t& index) { if (children.size() > index) { @@ -82,7 +103,8 @@ class BaseNode } } - BaseNode* getChild(const size_t& index) const + BaseNode* getChild( + const size_t& index) const { if (children.empty()) { @@ -96,7 +118,8 @@ class BaseNode return parent_; } - void setParent(BaseNode* parent) + void setParent( + BaseNode* parent) { parent_ = parent; } @@ -111,7 +134,8 @@ class BaseNode return children; } - private: +private: + NodeType data_type_; BaseNode* parent_; std::vector> children; @@ -120,53 +144,80 @@ class BaseNode template class DataNode : public BaseNode { - public: - DataNode(NodeType type); - DataNode(NodeType type, std::unique_ptr data); +public: + + DataNode( + NodeType type); + DataNode( + NodeType type, + std::unique_ptr data); virtual ~DataNode(); - DataNode(const DataNode&) = delete; - DataNode& operator=(const DataNode&) = delete; + DataNode( + const DataNode&) = delete; + DataNode& operator =( + const DataNode&) = delete; -// C++11 defaulted functions -// Vs2013 partly support defaulted functions. Defaulted move constructors and move assignment operators are not -// supported. + // C++11 defaulted functions + // Vs2013 partly support defaulted functions. Defaulted move constructors and move assignment operators are not + // supported. #if !defined(HAVE_CXX0X) || (defined(_MSC_VER) && _MSC_VER <= 1800) - DataNode(DataNode&& other) - : BaseNode(std::move(other)), attributes_(std::move(other.attributes_)), data_(std::move(other.data_)) + DataNode( + DataNode&& other) + : BaseNode(std::move(other)) + , attributes_(std::move(other.attributes_)) + , data_(std::move(other.data_)) { } - DataNode& operator=(DataNode&& other) + + DataNode& operator =( + DataNode&& other) { - BaseNode::operator=(std::move(other)); - attributes__ = std::move(other.attributes_); + BaseNode::operator =(std::move(other)); + attributes_ = std::move(other.attributes_); data_ = std::move(other.data_); return *this; } + #else - DataNode(DataNode&&) = default; - DataNode& operator=(DataNode&&) = default; -#endif + DataNode( + DataNode&&) = default; + DataNode& operator =( + DataNode&&) = default; +#endif // if !defined(HAVE_CXX0X) || (defined(_MSC_VER) && _MSC_VER <= 1800) T* get() const; std::unique_ptr getData(); - void setData(std::unique_ptr data); + void setData( + std::unique_ptr data); - void addAttribute(const std::string& name, const std::string& value); + void addAttribute( + const std::string& name, + const std::string& value); const std::map& getAttributes(); - private: +private: + std::map attributes_; std::unique_ptr data_; }; template -DataNode::DataNode(NodeType type) : BaseNode(type), attributes_(), data_(nullptr) +DataNode::DataNode( + NodeType type) + : BaseNode(type) + , attributes_() + , data_(nullptr) { } template -DataNode::DataNode(NodeType type, std::unique_ptr data) : BaseNode(type), attributes_(), data_(std::move(data)) +DataNode::DataNode( + NodeType type, + std::unique_ptr data) + : BaseNode(type) + , attributes_() + , data_(std::move(data)) { } @@ -188,13 +239,16 @@ std::unique_ptr DataNode::getData() } template -void DataNode::setData(std::unique_ptr data) +void DataNode::setData( + std::unique_ptr data) { data_ = std::move(data); } template -void DataNode::addAttribute(const std::string& name, const std::string& value) +void DataNode::addAttribute( + const std::string& name, + const std::string& value) { attributes_[name] = value; } diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/accel.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/accel.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel.hpp index ada9d8265..4e521eaac 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/accel.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/accel__struct.hpp" #include "geometry_msgs/msg/detail/accel__builder.hpp" #include "geometry_msgs/msg/detail/accel__traits.hpp" +#include "geometry_msgs/msg/detail/accel__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__ACCEL_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_stamped.hpp index 4f20a92ab..923033e8f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/accel_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/accel_stamped__struct.hpp" #include "geometry_msgs/msg/detail/accel_stamped__builder.hpp" #include "geometry_msgs/msg/detail/accel_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/accel_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__ACCEL_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance.hpp index de6f4d024..a21737755 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/accel_with_covariance__struct.hpp" #include "geometry_msgs/msg/detail/accel_with_covariance__builder.hpp" #include "geometry_msgs/msg/detail/accel_with_covariance__traits.hpp" +#include "geometry_msgs/msg/detail/accel_with_covariance__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__ACCEL_WITH_COVARIANCE_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance_stamped.hpp index 1cec089c8..f37ca4a6f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/accel_with_covariance_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/accel_with_covariance_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp" #include "geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp" #include "geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__ACCEL_WITH_COVARIANCE_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__builder.hpp index ca0b1c9f8..b78bc625e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/accel__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/accel__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__functions.c index a471a1e97..29885e663 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__functions.c @@ -236,22 +236,27 @@ geometry_msgs__msg__Accel__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Accel); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Accel * data = - (geometry_msgs__msg__Accel *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Accel *)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 (!geometry_msgs__msg__Accel__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Accel__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; ) { - geometry_msgs__msg__Accel__fini(&data[i]); + geometry_msgs__msg__Accel__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h index 6636a5d82..00efcd98c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Accel( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Accel( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp index dfe6c3eb7..9ebb41bd5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Accel( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.h similarity index 87% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.h index bc157e901..16d9c6954 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.h @@ -22,7 +22,10 @@ extern "C" // Member 'angular' #include "geometry_msgs/msg/detail/vector3__struct.h" -// Struct defined in msg/Accel in the package geometry_msgs. +/// Struct defined in msg/Accel in the package geometry_msgs. +/** + * This expresses acceleration in free space broken into its linear and angular parts. + */ typedef struct geometry_msgs__msg__Accel { geometry_msgs__msg__Vector3 linear; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.hpp index b3a4edc72..2106ef395 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'linear' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__traits.hpp new file mode 100644 index 000000000..45f0c4c18 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Accel.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/accel__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'linear' +// Member 'angular' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Accel & msg, + std::ostream & out) +{ + out << "{"; + // member: linear + { + out << "linear: "; + to_flow_style_yaml(msg.linear, out); + out << ", "; + } + + // member: angular + { + out << "angular: "; + to_flow_style_yaml(msg.angular, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Accel & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: linear + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "linear:\n"; + to_block_style_yaml(msg.linear, out, indentation + 2); + } + + // member: angular + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angular:\n"; + to_block_style_yaml(msg.angular, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Accel & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Accel & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Accel & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Accel"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Accel"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.c new file mode 100644 index 000000000..5e26b7ff3 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.c @@ -0,0 +1,112 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Accel.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel__functions.h" +#include "geometry_msgs/msg/detail/accel__struct.h" + + +// Include directives for member types +// Member `linear` +// Member `angular` +#include "geometry_msgs/msg/vector3.h" +// Member `linear` +// Member `angular` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_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; + geometry_msgs__msg__Accel__init(message_memory); +} + +void geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_fini_function(void * message_memory) +{ + geometry_msgs__msg__Accel__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[2] = { + { + "linear", // 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(geometry_msgs__msg__Accel, linear), // 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 + }, + { + "angular", // 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(geometry_msgs__msg__Accel, angular), // 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 geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_members = { + "geometry_msgs__msg", // message namespace + "Accel", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Accel), + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_member_array, // message members + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_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 geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle = { + 0, + &geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)() { + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.cpp index 217c72017..aa13b81a7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Accel_message 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Accel_message 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.hpp new file mode 100644 index 000000000..fae73754c --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Accel.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Accel +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__builder.hpp index 7c1f0d788..1fe453fb2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/accel_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/accel_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__functions.c index 2754238e2..858247721 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__AccelStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__AccelStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__AccelStamped * data = - (geometry_msgs__msg__AccelStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__AccelStamped *)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 (!geometry_msgs__msg__AccelStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__AccelStamped__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; ) { - geometry_msgs__msg__AccelStamped__fini(&data[i]); + geometry_msgs__msg__AccelStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h index 87d0bcd4e..a6dc81856 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__AccelStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__AccelStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp index a3aeafa7a..7d24fc206 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_AccelStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.h similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.h index e484de870..05459e10f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'accel' #include "geometry_msgs/msg/detail/accel__struct.h" -// Struct defined in msg/AccelStamped in the package geometry_msgs. +/// Struct defined in msg/AccelStamped in the package geometry_msgs. +/** + * An accel with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__AccelStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.hpp index f4b0b36c5..e25a34964 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__traits.hpp new file mode 100644 index 000000000..814a84d4f --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/AccelStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/accel_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'accel' +#include "geometry_msgs/msg/detail/accel__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const AccelStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: accel + { + out << "accel: "; + to_flow_style_yaml(msg.accel, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AccelStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: accel + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "accel:\n"; + to_block_style_yaml(msg.accel, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AccelStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::AccelStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::AccelStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::AccelStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/AccelStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.c new file mode 100644 index 000000000..15aabcc2f --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/AccelStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_stamped__functions.h" +#include "geometry_msgs/msg/detail/accel_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `accel` +#include "geometry_msgs/msg/accel.h" +// Member `accel` +#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_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; + geometry_msgs__msg__AccelStamped__init(message_memory); +} + +void geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__AccelStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__AccelStamped, header), // 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 + }, + { + "accel", // 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(geometry_msgs__msg__AccelStamped, accel), // 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 geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_members = { + "geometry_msgs__msg", // message namespace + "AccelStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__AccelStamped), + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array, // message members + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_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 geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelStamped)() { + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)(); + if (!geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.cpp index 650b87d83..bfb40572c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelStamped_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelStamped_ 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.hpp new file mode 100644 index 000000000..a0be99bb5 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/AccelStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + AccelStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp index 4869da126..022e33250 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/accel_with_covariance__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/accel_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__functions.c index b64701d15..9add1fff5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__functions.c @@ -228,22 +228,27 @@ geometry_msgs__msg__AccelWithCovariance__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__AccelWithCovariance); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__AccelWithCovariance * data = - (geometry_msgs__msg__AccelWithCovariance *)realloc(output->data, allocation_size); + (geometry_msgs__msg__AccelWithCovariance *)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 (!geometry_msgs__msg__AccelWithCovariance__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__AccelWithCovariance__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; ) { - geometry_msgs__msg__AccelWithCovariance__fini(&data[i]); + geometry_msgs__msg__AccelWithCovariance__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h index f56704fea..5a84f5f28 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__AccelWithCovariance( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__AccelWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp index eeeed8799..85d0e9c24 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_AccelWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.h similarity index 75% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.h index b759eb44a..e37585951 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.h @@ -21,10 +21,17 @@ extern "C" // Member 'accel' #include "geometry_msgs/msg/detail/accel__struct.h" -// Struct defined in msg/AccelWithCovariance in the package geometry_msgs. +/// Struct defined in msg/AccelWithCovariance in the package geometry_msgs. +/** + * This expresses acceleration in free space with uncertainty. + */ typedef struct geometry_msgs__msg__AccelWithCovariance { geometry_msgs__msg__Accel accel; + /// Row-major representation of the 6x6 covariance matrix + /// The orientation parameters use a fixed-axis representation. + /// In order, the parameters are: + /// (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) double covariance[36]; } geometry_msgs__msg__AccelWithCovariance; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp index 024333554..b837df5e0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'accel' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp new file mode 100644 index 000000000..afa7f40d7 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/AccelWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/accel_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'accel' +#include "geometry_msgs/msg/detail/accel__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const AccelWithCovariance & msg, + std::ostream & out) +{ + out << "{"; + // member: accel + { + out << "accel: "; + to_flow_style_yaml(msg.accel, out); + out << ", "; + } + + // member: covariance + { + if (msg.covariance.size() == 0) { + out << "covariance: []"; + } else { + out << "covariance: ["; + size_t pending_items = msg.covariance.size(); + for (auto item : msg.covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AccelWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: accel + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "accel:\n"; + to_block_style_yaml(msg.accel, out, indentation + 2); + } + + // member: covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.covariance.size() == 0) { + out << "covariance: []\n"; + } else { + out << "covariance:\n"; + for (auto item : msg.covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AccelWithCovariance & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::AccelWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::AccelWithCovariance & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::AccelWithCovariance"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/AccelWithCovariance"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.c new file mode 100644 index 000000000..283bc6e40 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.c @@ -0,0 +1,153 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/AccelWithCovariance.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_with_covariance__functions.h" +#include "geometry_msgs/msg/detail/accel_with_covariance__struct.h" + + +// Include directives for member types +// Member `accel` +#include "geometry_msgs/msg/accel.h" +// Member `accel` +#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_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; + geometry_msgs__msg__AccelWithCovariance__init(message_memory); +} + +void geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_fini_function(void * message_memory) +{ + geometry_msgs__msg__AccelWithCovariance__fini(message_memory); +} + +size_t geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__size_function__AccelWithCovariance__covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 36; +} + +const void * geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_const_function__AccelWithCovariance__covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_function__AccelWithCovariance__covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__fetch_function__AccelWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_const_function__AccelWithCovariance__covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__assign_function__AccelWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_function__AccelWithCovariance__covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array[2] = { + { + "accel", // 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(geometry_msgs__msg__AccelWithCovariance, accel), // 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 + }, + { + "covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 36, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__AccelWithCovariance, covariance), // bytes offset in struct + NULL, // default value + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__size_function__AccelWithCovariance__covariance, // size() function pointer + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_const_function__AccelWithCovariance__covariance, // get_const(index) function pointer + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__get_function__AccelWithCovariance__covariance, // get(index) function pointer + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__fetch_function__AccelWithCovariance__covariance, // fetch(index, &value) function pointer + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__assign_function__AccelWithCovariance__covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_members = { + "geometry_msgs__msg", // message namespace + "AccelWithCovariance", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__AccelWithCovariance), + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array, // message members + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_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 geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle = { + 0, + &geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovariance)() { + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)(); + if (!geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp index 5f8096145..9e0388fa6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__AccelWithCovariance__covariance(void * untyped_member, size return &member[index]; } +void fetch_function__AccelWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__AccelWithCovariance__covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__AccelWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__AccelWithCovariance__covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelWithCovariance_message_member_array[2] = { { "accel", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelWithCova 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 }, { @@ -86,6 +106,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelWithCova size_function__AccelWithCovariance__covariance, // size() function pointer get_const_function__AccelWithCovariance__covariance, // get_const(index) function pointer get_function__AccelWithCovariance__covariance, // get(index) function pointer + fetch_function__AccelWithCovariance__covariance, // fetch(index, &value) function pointer + assign_function__AccelWithCovariance__covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.hpp new file mode 100644 index 000000000..773d26a3d --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/AccelWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + AccelWithCovariance +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp index 0bf98614f..a0bd65960 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c index 1958063dd..bee798369 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__AccelWithCovarianceStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__AccelWithCovarianceStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__AccelWithCovarianceStamped * data = - (geometry_msgs__msg__AccelWithCovarianceStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__AccelWithCovarianceStamped *)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 (!geometry_msgs__msg__AccelWithCovarianceStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__AccelWithCovarianceStamped__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; ) { - geometry_msgs__msg__AccelWithCovarianceStamped__fini(&data[i]); + geometry_msgs__msg__AccelWithCovarianceStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h index 4dc73313d..14b081bed 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__AccelWithCovarianceStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__AccelWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp index c85bd0e0d..73b9b86a3 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_AccelWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h index acd2893b3..39575dedb 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'accel' #include "geometry_msgs/msg/detail/accel_with_covariance__struct.h" -// Struct defined in msg/AccelWithCovarianceStamped in the package geometry_msgs. +/// Struct defined in msg/AccelWithCovarianceStamped in the package geometry_msgs. +/** + * This represents an estimated accel with reference coordinate frame and timestamp. + */ typedef struct geometry_msgs__msg__AccelWithCovarianceStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp index 1aedf0583..27a5664d8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp new file mode 100644 index 000000000..5053887c6 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/AccelWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'accel' +#include "geometry_msgs/msg/detail/accel_with_covariance__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const AccelWithCovarianceStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: accel + { + out << "accel: "; + to_flow_style_yaml(msg.accel, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const AccelWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: accel + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "accel:\n"; + to_block_style_yaml(msg.accel, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const AccelWithCovarianceStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::AccelWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::AccelWithCovarianceStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::AccelWithCovarianceStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/AccelWithCovarianceStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c new file mode 100644 index 000000000..dbb5a3fae --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/AccelWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h" +#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `accel` +#include "geometry_msgs/msg/accel_with_covariance.h" +// Member `accel` +#include "geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_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; + geometry_msgs__msg__AccelWithCovarianceStamped__init(message_memory); +} + +void geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__AccelWithCovarianceStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__AccelWithCovarianceStamped, header), // 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 + }, + { + "accel", // 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(geometry_msgs__msg__AccelWithCovarianceStamped, accel), // 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 geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_members = { + "geometry_msgs__msg", // message namespace + "AccelWithCovarianceStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__AccelWithCovarianceStamped), + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array, // message members + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_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 geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovarianceStamped)() { + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovariance)(); + if (!geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp index 0cd77c937..68d6a4598 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelWithCova 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember AccelWithCova 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.hpp new file mode 100644 index 000000000..f20800a26 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/AccelWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + AccelWithCovarianceStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__builder.hpp similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__builder.hpp index 589af4324..142f537a2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__INERTIA__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/inertia__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/inertia__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__functions.c index 6dc1a28e8..320b14a0b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__functions.c @@ -272,22 +272,27 @@ geometry_msgs__msg__Inertia__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Inertia); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Inertia * data = - (geometry_msgs__msg__Inertia *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Inertia *)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 (!geometry_msgs__msg__Inertia__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Inertia__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; ) { - geometry_msgs__msg__Inertia__fini(&data[i]); + geometry_msgs__msg__Inertia__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h index 5b66da931..63e1432f7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Inertia( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Inertia( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp index 7e9021b8e..f2393a4d7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Inertia( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.h similarity index 84% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.h index 3f9da1a3a..4b4c4ad8e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.h @@ -21,11 +21,19 @@ extern "C" // Member 'com' #include "geometry_msgs/msg/detail/vector3__struct.h" -// Struct defined in msg/Inertia in the package geometry_msgs. +/// Struct defined in msg/Inertia in the package geometry_msgs. +/** + * Mass + */ typedef struct geometry_msgs__msg__Inertia { double m; + /// Center of mass geometry_msgs__msg__Vector3 com; + /// Inertia Tensor + /// | ixx ixy ixz | + /// I = | ixy iyy iyz | + /// | ixz iyz izz | double ixx; double ixy; double ixz; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.hpp similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.hpp index a21b7d5e0..49836b32c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__INERTIA__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'com' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__traits.hpp new file mode 100644 index 000000000..d603dd0b5 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__traits.hpp @@ -0,0 +1,231 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Inertia.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/inertia__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'com' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Inertia & msg, + std::ostream & out) +{ + out << "{"; + // member: m + { + out << "m: "; + rosidl_generator_traits::value_to_yaml(msg.m, out); + out << ", "; + } + + // member: com + { + out << "com: "; + to_flow_style_yaml(msg.com, out); + out << ", "; + } + + // member: ixx + { + out << "ixx: "; + rosidl_generator_traits::value_to_yaml(msg.ixx, out); + out << ", "; + } + + // member: ixy + { + out << "ixy: "; + rosidl_generator_traits::value_to_yaml(msg.ixy, out); + out << ", "; + } + + // member: ixz + { + out << "ixz: "; + rosidl_generator_traits::value_to_yaml(msg.ixz, out); + out << ", "; + } + + // member: iyy + { + out << "iyy: "; + rosidl_generator_traits::value_to_yaml(msg.iyy, out); + out << ", "; + } + + // member: iyz + { + out << "iyz: "; + rosidl_generator_traits::value_to_yaml(msg.iyz, out); + out << ", "; + } + + // member: izz + { + out << "izz: "; + rosidl_generator_traits::value_to_yaml(msg.izz, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Inertia & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: m + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "m: "; + rosidl_generator_traits::value_to_yaml(msg.m, out); + out << "\n"; + } + + // member: com + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "com:\n"; + to_block_style_yaml(msg.com, out, indentation + 2); + } + + // member: ixx + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "ixx: "; + rosidl_generator_traits::value_to_yaml(msg.ixx, out); + out << "\n"; + } + + // member: ixy + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "ixy: "; + rosidl_generator_traits::value_to_yaml(msg.ixy, out); + out << "\n"; + } + + // member: ixz + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "ixz: "; + rosidl_generator_traits::value_to_yaml(msg.ixz, out); + out << "\n"; + } + + // member: iyy + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "iyy: "; + rosidl_generator_traits::value_to_yaml(msg.iyy, out); + out << "\n"; + } + + // member: iyz + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "iyz: "; + rosidl_generator_traits::value_to_yaml(msg.iyz, out); + out << "\n"; + } + + // member: izz + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "izz: "; + rosidl_generator_traits::value_to_yaml(msg.izz, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Inertia & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Inertia & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Inertia & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Inertia"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Inertia"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.c new file mode 100644 index 000000000..7a1742579 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.c @@ -0,0 +1,210 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Inertia.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/inertia__functions.h" +#include "geometry_msgs/msg/detail/inertia__struct.h" + + +// Include directives for member types +// Member `com` +#include "geometry_msgs/msg/vector3.h" +// Member `com` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_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; + geometry_msgs__msg__Inertia__init(message_memory); +} + +void geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_fini_function(void * message_memory) +{ + geometry_msgs__msg__Inertia__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array[8] = { + { + "m", // 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(geometry_msgs__msg__Inertia, m), // 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 + }, + { + "com", // 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(geometry_msgs__msg__Inertia, com), // 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 + }, + { + "ixx", // 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(geometry_msgs__msg__Inertia, ixx), // 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 + }, + { + "ixy", // 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(geometry_msgs__msg__Inertia, ixy), // 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 + }, + { + "ixz", // 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(geometry_msgs__msg__Inertia, ixz), // 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 + }, + { + "iyy", // 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(geometry_msgs__msg__Inertia, iyy), // 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 + }, + { + "iyz", // 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(geometry_msgs__msg__Inertia, iyz), // 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 + }, + { + "izz", // 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(geometry_msgs__msg__Inertia, izz), // 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 geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_members = { + "geometry_msgs__msg", // message namespace + "Inertia", // message name + 8, // number of fields + sizeof(geometry_msgs__msg__Inertia), + geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array, // message members + geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_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 geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle = { + 0, + &geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Inertia)() { + geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.cpp similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.cpp index 0f1b3830a..55632b7f9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -141,6 +153,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 }, { @@ -156,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Inertia_messa 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.hpp new file mode 100644 index 000000000..4103cac31 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Inertia.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Inertia +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__builder.hpp index 58fe26e8a..c89aa454d 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/inertia_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/inertia_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__functions.c index 9ad78c643..91ee7773e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__InertiaStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__InertiaStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__InertiaStamped * data = - (geometry_msgs__msg__InertiaStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__InertiaStamped *)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 (!geometry_msgs__msg__InertiaStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__InertiaStamped__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; ) { - geometry_msgs__msg__InertiaStamped__fini(&data[i]); + geometry_msgs__msg__InertiaStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h index 857ca81ed..bac8c3c36 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__InertiaStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__InertiaStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 904c6a258..9bcbcbbf3 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_InertiaStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.h similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.h index 92a6625c6..026410122 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'inertia' #include "geometry_msgs/msg/detail/inertia__struct.h" -// Struct defined in msg/InertiaStamped in the package geometry_msgs. +/// Struct defined in msg/InertiaStamped in the package geometry_msgs. +/** + * An Inertia with a time stamp and reference frame. + */ typedef struct geometry_msgs__msg__InertiaStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.hpp index b48bb5895..7f26cef19 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__traits.hpp new file mode 100644 index 000000000..8d52bb2bc --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/InertiaStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/inertia_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'inertia' +#include "geometry_msgs/msg/detail/inertia__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InertiaStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: inertia + { + out << "inertia: "; + to_flow_style_yaml(msg.inertia, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InertiaStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: inertia + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "inertia:\n"; + to_block_style_yaml(msg.inertia, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InertiaStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::InertiaStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::InertiaStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::InertiaStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/InertiaStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.c new file mode 100644 index 000000000..addc35709 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/InertiaStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/inertia_stamped__functions.h" +#include "geometry_msgs/msg/detail/inertia_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `inertia` +#include "geometry_msgs/msg/inertia.h" +// Member `inertia` +#include "geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_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; + geometry_msgs__msg__InertiaStamped__init(message_memory); +} + +void geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__InertiaStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__InertiaStamped, header), // 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 + }, + { + "inertia", // 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(geometry_msgs__msg__InertiaStamped, inertia), // 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 geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_members = { + "geometry_msgs__msg", // message namespace + "InertiaStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__InertiaStamped), + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array, // message members + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_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 geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, InertiaStamped)() { + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Inertia)(); + if (!geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp index 05065e011..4e499725c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InertiaStampe 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InertiaStampe 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.hpp new file mode 100644 index 000000000..b46033645 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/inertia_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/InertiaStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + InertiaStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__builder.hpp index 2f48a2991..a62c458ec 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT32__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/point32__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/point32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__functions.c index 49126d888..478c92548 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__functions.c @@ -217,22 +217,27 @@ geometry_msgs__msg__Point32__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Point32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Point32 * data = - (geometry_msgs__msg__Point32 *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Point32 *)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 (!geometry_msgs__msg__Point32__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Point32__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; ) { - geometry_msgs__msg__Point32__fini(&data[i]); + geometry_msgs__msg__Point32__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h index f9c74b715..51a6d89f5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Point32( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Point32( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp index 38aa8865c..51ee28fa6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Point32( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.h new file mode 100644 index 000000000..1eb1be411 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.h @@ -0,0 +1,51 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from geometry_msgs:msg/Point32.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Point32 in the package geometry_msgs. +/** + * This contains the position of a point in free space(with 32 bits of precision). + * It is recommended to use Point wherever possible instead of Point32. + * + * This recommendation is to promote interoperability. + * + * This message is designed to take up less space when sending + * lots of points at once, as in the case of a PointCloud. + */ +typedef struct geometry_msgs__msg__Point32 +{ + float x; + float y; + float z; +} geometry_msgs__msg__Point32; + +// Struct for a sequence of geometry_msgs__msg__Point32. +typedef struct geometry_msgs__msg__Point32__Sequence +{ + geometry_msgs__msg__Point32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} geometry_msgs__msg__Point32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.hpp index d8668067e..ad5259b4c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__geometry_msgs__msg__Point32 __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__traits.hpp new file mode 100644 index 000000000..88aa7a461 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Point32.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/point32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Point32 & msg, + std::ostream & out) +{ + out << "{"; + // member: x + { + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << ", "; + } + + // member: y + { + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << ", "; + } + + // member: z + { + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Point32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << "\n"; + } + + // member: y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << "\n"; + } + + // member: z + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Point32 & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Point32 & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Point32 & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Point32"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Point32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.c new file mode 100644 index 000000000..0127db395 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Point32.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/point32__functions.h" +#include "geometry_msgs/msg/detail/point32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_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; + geometry_msgs__msg__Point32__init(message_memory); +} + +void geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_fini_function(void * message_memory) +{ + geometry_msgs__msg__Point32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_member_array[3] = { + { + "x", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__Point32, x), // 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 + }, + { + "y", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__Point32, y), // 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 + }, + { + "z", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__Point32, z), // 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 geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_members = { + "geometry_msgs__msg", // message namespace + "Point32", // message name + 3, // number of fields + sizeof(geometry_msgs__msg__Point32), + geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_member_array, // message members + geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_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 geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle = { + 0, + &geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)() { + if (!geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.cpp index 7a491f73b..ef7ce10cc 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point32_messa 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point32_messa 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point32_messa 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.hpp new file mode 100644 index 000000000..499e4357b --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Point32.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Point32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__builder.hpp index afc2e89a5..7eba72e21 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/point__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/point__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__functions.c index 909685849..d70d504c9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__functions.c @@ -217,22 +217,27 @@ geometry_msgs__msg__Point__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Point); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Point * data = - (geometry_msgs__msg__Point *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Point *)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 (!geometry_msgs__msg__Point__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Point__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; ) { - geometry_msgs__msg__Point__fini(&data[i]); + geometry_msgs__msg__Point__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h index 9f4a62e33..1eb638b99 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Point( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Point( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp index 36612f720..948de95b0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Point( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.h similarity index 87% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.h index e2620e647..b3d1096c2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.h @@ -17,7 +17,10 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Point in the package geometry_msgs. +/// Struct defined in msg/Point in the package geometry_msgs. +/** + * This contains the position of a point in free space + */ typedef struct geometry_msgs__msg__Point { double x; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.hpp index 370a664b5..2dcb12bd3 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__geometry_msgs__msg__Point __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__traits.hpp new file mode 100644 index 000000000..abf9fbaff --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Point.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/point__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Point & msg, + std::ostream & out) +{ + out << "{"; + // member: x + { + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << ", "; + } + + // member: y + { + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << ", "; + } + + // member: z + { + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Point & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << "\n"; + } + + // member: y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << "\n"; + } + + // member: z + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Point & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Point & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Point & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Point"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Point"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.c new file mode 100644 index 000000000..037625e54 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Point.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/point__functions.h" +#include "geometry_msgs/msg/detail/point__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_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; + geometry_msgs__msg__Point__init(message_memory); +} + +void geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_fini_function(void * message_memory) +{ + geometry_msgs__msg__Point__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_member_array[3] = { + { + "x", // 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(geometry_msgs__msg__Point, x), // 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 + }, + { + "y", // 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(geometry_msgs__msg__Point, y), // 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 + }, + { + "z", // 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(geometry_msgs__msg__Point, z), // 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 geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_members = { + "geometry_msgs__msg", // message namespace + "Point", // message name + 3, // number of fields + sizeof(geometry_msgs__msg__Point), + geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_member_array, // message members + geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_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 geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle = { + 0, + &geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)() { + if (!geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.cpp index baaa29065..984cbca7a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point_message 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point_message 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Point_message 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.hpp new file mode 100644 index 000000000..38dd7e866 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Point.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Point +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__builder.hpp index f1a9f346a..9b8908eb2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/point_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/point_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__functions.c index b0ea6c6a4..61e0dd0ec 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__PointStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PointStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PointStamped * data = - (geometry_msgs__msg__PointStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PointStamped *)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 (!geometry_msgs__msg__PointStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PointStamped__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; ) { - geometry_msgs__msg__PointStamped__fini(&data[i]); + geometry_msgs__msg__PointStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h index 3692b1470..aabe7b83a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PointStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PointStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 55b461a9c..38b7ed7ef 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PointStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.h index a0b4473d2..1d5f3a41e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'point' #include "geometry_msgs/msg/detail/point__struct.h" -// Struct defined in msg/PointStamped in the package geometry_msgs. +/// Struct defined in msg/PointStamped in the package geometry_msgs. +/** + * This represents a Point with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__PointStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.hpp index f23692dc2..2fc307a31 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__traits.hpp new file mode 100644 index 000000000..df077a6b8 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PointStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/point_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'point' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PointStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: point + { + out << "point: "; + to_flow_style_yaml(msg.point, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PointStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: point + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "point:\n"; + to_block_style_yaml(msg.point, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PointStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PointStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PointStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PointStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PointStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.c new file mode 100644 index 000000000..7999e025a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PointStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/point_stamped__functions.h" +#include "geometry_msgs/msg/detail/point_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `point` +#include "geometry_msgs/msg/point.h" +// Member `point` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_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; + geometry_msgs__msg__PointStamped__init(message_memory); +} + +void geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__PointStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__PointStamped, header), // 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 + }, + { + "point", // 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(geometry_msgs__msg__PointStamped, point), // 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 geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_members = { + "geometry_msgs__msg", // message namespace + "PointStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PointStamped), + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array, // message members + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_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 geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PointStamped)() { + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.cpp index 099524500..7ee49b35d 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointStamped_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointStamped_ 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.hpp new file mode 100644 index 000000000..ac0e29901 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/point_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PointStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PointStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__builder.hpp similarity index 94% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__builder.hpp index b5b18651a..ceb1456b0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POLYGON__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/polygon__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/polygon__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__functions.c index 9c3c6af7b..eb8d1a673 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__functions.c @@ -216,22 +216,27 @@ geometry_msgs__msg__Polygon__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Polygon); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Polygon * data = - (geometry_msgs__msg__Polygon *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Polygon *)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 (!geometry_msgs__msg__Polygon__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Polygon__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; ) { - geometry_msgs__msg__Polygon__fini(&data[i]); + geometry_msgs__msg__Polygon__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h index fbe83b287..a4d881f38 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Polygon( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Polygon( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp index 25157701b..741a999c9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Polygon( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.h similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.h index 205216020..987fb79e3 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.h @@ -21,7 +21,10 @@ extern "C" // Member 'points' #include "geometry_msgs/msg/detail/point32__struct.h" -// Struct defined in msg/Polygon in the package geometry_msgs. +/// Struct defined in msg/Polygon in the package geometry_msgs. +/** + * A specification of a polygon where the first and last points are assumed to be connected + */ typedef struct geometry_msgs__msg__Polygon { geometry_msgs__msg__Point32__Sequence points; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.hpp similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.hpp index 41a79d848..71ad71235 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POLYGON__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'points' @@ -49,12 +50,12 @@ struct Polygon_ // field types and members using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _points_type points; // setters for named parameter idiom Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->points = _arg; return *this; diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__traits.hpp new file mode 100644 index 000000000..8cf904074 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__traits.hpp @@ -0,0 +1,133 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Polygon.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/polygon__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'points' +#include "geometry_msgs/msg/detail/point32__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Polygon & msg, + std::ostream & out) +{ + out << "{"; + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Polygon & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Polygon & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Polygon & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Polygon & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Polygon"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Polygon"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.c new file mode 100644 index 000000000..0ba1eae36 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.c @@ -0,0 +1,146 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Polygon.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/polygon__functions.h" +#include "geometry_msgs/msg/detail/polygon__struct.h" + + +// Include directives for member types +// Member `points` +#include "geometry_msgs/msg/point32.h" +// Member `points` +#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_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; + geometry_msgs__msg__Polygon__init(message_memory); +} + +void geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_fini_function(void * message_memory) +{ + geometry_msgs__msg__Polygon__fini(message_memory); +} + +size_t geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__size_function__Polygon__points( + const void * untyped_member) +{ + const geometry_msgs__msg__Point32__Sequence * member = + (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return member->size; +} + +const void * geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_const_function__Polygon__points( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point32__Sequence * member = + (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_function__Polygon__points( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point32__Sequence * member = + (geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__fetch_function__Polygon__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point32 * item = + ((const geometry_msgs__msg__Point32 *) + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_const_function__Polygon__points(untyped_member, index)); + geometry_msgs__msg__Point32 * value = + (geometry_msgs__msg__Point32 *)(untyped_value); + *value = *item; +} + +void geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__assign_function__Polygon__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point32 * item = + ((geometry_msgs__msg__Point32 *) + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_function__Polygon__points(untyped_member, index)); + const geometry_msgs__msg__Point32 * value = + (const geometry_msgs__msg__Point32 *)(untyped_value); + *item = *value; +} + +bool geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__resize_function__Polygon__points( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point32__Sequence * member = + (geometry_msgs__msg__Point32__Sequence *)(untyped_member); + geometry_msgs__msg__Point32__Sequence__fini(member); + return geometry_msgs__msg__Point32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array[1] = { + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__Polygon, points), // bytes offset in struct + NULL, // default value + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__size_function__Polygon__points, // size() function pointer + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_const_function__Polygon__points, // get_const(index) function pointer + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__get_function__Polygon__points, // get(index) function pointer + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__fetch_function__Polygon__points, // fetch(index, &value) function pointer + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__assign_function__Polygon__points, // assign(index, value) function pointer + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__resize_function__Polygon__points // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_members = { + "geometry_msgs__msg", // message namespace + "Polygon", // message name + 1, // number of fields + sizeof(geometry_msgs__msg__Polygon), + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array, // message members + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_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 geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle = { + 0, + &geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Polygon)() { + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)(); + if (!geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.cpp index 226316c9d..9688e2562 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Polygon__points(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Polygon__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Polygon__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Polygon__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Polygon__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Polygon__points(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Polygon_messa size_function__Polygon__points, // size() function pointer get_const_function__Polygon__points, // get_const(index) function pointer get_function__Polygon__points, // get(index) function pointer + fetch_function__Polygon__points, // fetch(index, &value) function pointer + assign_function__Polygon__points, // assign(index, value) function pointer resize_function__Polygon__points // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.hpp new file mode 100644 index 000000000..aac33ffb3 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Polygon.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Polygon +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__builder.hpp index 5037a9816..3e2ff732b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/polygon_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/polygon_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__functions.c index fbe589827..f482411d1 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__PolygonStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PolygonStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PolygonStamped * data = - (geometry_msgs__msg__PolygonStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PolygonStamped *)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 (!geometry_msgs__msg__PolygonStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PolygonStamped__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; ) { - geometry_msgs__msg__PolygonStamped__fini(&data[i]); + geometry_msgs__msg__PolygonStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h index 53755cdcc..01d3ff141 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PolygonStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PolygonStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 7f9085e55..363620337 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PolygonStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.h index c6342411e..09c2fa77e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'polygon' #include "geometry_msgs/msg/detail/polygon__struct.h" -// Struct defined in msg/PolygonStamped in the package geometry_msgs. +/// Struct defined in msg/PolygonStamped in the package geometry_msgs. +/** + * This represents a Polygon with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__PolygonStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.hpp index d7392c1ec..ef889e7f8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__traits.hpp new file mode 100644 index 000000000..d2f3a3c7d --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PolygonStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/polygon_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'polygon' +#include "geometry_msgs/msg/detail/polygon__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PolygonStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: polygon + { + out << "polygon: "; + to_flow_style_yaml(msg.polygon, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PolygonStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: polygon + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "polygon:\n"; + to_block_style_yaml(msg.polygon, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PolygonStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PolygonStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PolygonStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PolygonStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PolygonStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.c new file mode 100644 index 000000000..2f6b7fba0 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PolygonStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/polygon_stamped__functions.h" +#include "geometry_msgs/msg/detail/polygon_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `polygon` +#include "geometry_msgs/msg/polygon.h" +// Member `polygon` +#include "geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_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; + geometry_msgs__msg__PolygonStamped__init(message_memory); +} + +void geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__PolygonStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__PolygonStamped, header), // 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 + }, + { + "polygon", // 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(geometry_msgs__msg__PolygonStamped, polygon), // 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 geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_members = { + "geometry_msgs__msg", // message namespace + "PolygonStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PolygonStamped), + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array, // message members + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_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 geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PolygonStamped)() { + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Polygon)(); + if (!geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp index eb6150226..604647790 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PolygonStampe 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PolygonStampe 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.hpp new file mode 100644 index 000000000..9d3c5976a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/polygon_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PolygonStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PolygonStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__builder.hpp index ab8beb45f..4974f134b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose2_d__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose2_d__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__functions.c index 8fff9539b..1bc04b290 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__functions.c @@ -217,22 +217,27 @@ geometry_msgs__msg__Pose2D__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Pose2D); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Pose2D * data = - (geometry_msgs__msg__Pose2D *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Pose2D *)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 (!geometry_msgs__msg__Pose2D__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Pose2D__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; ) { - geometry_msgs__msg__Pose2D__fini(&data[i]); + geometry_msgs__msg__Pose2D__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h index a75535dab..d63bc6579 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Pose2D( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Pose2D( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp index fb7d68f63..165770b67 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Pose2D( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.h new file mode 100644 index 000000000..17c23bbf8 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.h @@ -0,0 +1,48 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from geometry_msgs:msg/Pose2D.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Pose2D in the package geometry_msgs. +/** + * Deprecated as of Foxy and will potentially be removed in any following release. + * Please use the full 3D pose. + */ +typedef struct geometry_msgs__msg__Pose2D +{ + /// In general our recommendation is to use a full 3D representation of everything and for 2D specific applications make the appropriate projections into the plane for their calculations but optimally will preserve the 3D information during processing. + /// If we have parallel copies of 2D datatypes every UI and other pipeline will end up needing to have dual interfaces to plot everything. And you will end up with not being able to use 3D tools for 2D use cases even if they're completely valid, as you'd have to reimplement it with different inputs and outputs. It's not particularly hard to plot the 2D pose or compute the yaw error for the Pose message and there are already tools and libraries that can do this for you.# This expresses a position and orientation on a 2D manifold. + double x; + double y; + double theta; +} geometry_msgs__msg__Pose2D; + +// Struct for a sequence of geometry_msgs__msg__Pose2D. +typedef struct geometry_msgs__msg__Pose2D__Sequence +{ + geometry_msgs__msg__Pose2D * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} geometry_msgs__msg__Pose2D__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.hpp index cdb41695e..f60b05cf8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__geometry_msgs__msg__Pose2D __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__traits.hpp new file mode 100644 index 000000000..8a823eb3b --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Pose2D.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose2_d__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Pose2D & msg, + std::ostream & out) +{ + out << "{"; + // member: x + { + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << ", "; + } + + // member: y + { + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << ", "; + } + + // member: theta + { + out << "theta: "; + rosidl_generator_traits::value_to_yaml(msg.theta, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Pose2D & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << "\n"; + } + + // member: y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << "\n"; + } + + // member: theta + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "theta: "; + rosidl_generator_traits::value_to_yaml(msg.theta, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Pose2D & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Pose2D & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Pose2D & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Pose2D"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Pose2D"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.c new file mode 100644 index 000000000..d0e585d19 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Pose2D.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose2_d__functions.h" +#include "geometry_msgs/msg/detail/pose2_d__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_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; + geometry_msgs__msg__Pose2D__init(message_memory); +} + +void geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_fini_function(void * message_memory) +{ + geometry_msgs__msg__Pose2D__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_member_array[3] = { + { + "x", // 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(geometry_msgs__msg__Pose2D, x), // 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 + }, + { + "y", // 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(geometry_msgs__msg__Pose2D, y), // 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 + }, + { + "theta", // 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(geometry_msgs__msg__Pose2D, theta), // 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 geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_members = { + "geometry_msgs__msg", // message namespace + "Pose2D", // message name + 3, // number of fields + sizeof(geometry_msgs__msg__Pose2D), + geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_member_array, // message members + geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_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 geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle = { + 0, + &geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose2D)() { + if (!geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.cpp index c02ea3192..a2fac4ae3 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Pose2D_messag 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Pose2D_messag 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Pose2D_messag 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.hpp new file mode 100644 index 000000000..0c389f96a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose2_d__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Pose2D.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Pose2D +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__builder.hpp index 19cf8a655..43a383564 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__functions.c index aa93a2413..90b37c214 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__Pose__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Pose); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Pose * data = - (geometry_msgs__msg__Pose *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Pose *)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 (!geometry_msgs__msg__Pose__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Pose__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; ) { - geometry_msgs__msg__Pose__fini(&data[i]); + geometry_msgs__msg__Pose__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h index 40491ae58..30bf33921 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Pose( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Pose( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp index 1b35bc464..216a527bf 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Pose( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.h index 7022a708c..060c201c4 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'orientation' #include "geometry_msgs/msg/detail/quaternion__struct.h" -// Struct defined in msg/Pose in the package geometry_msgs. +/// Struct defined in msg/Pose in the package geometry_msgs. +/** + * A representation of pose in free space, composed of position and orientation. + */ typedef struct geometry_msgs__msg__Pose { geometry_msgs__msg__Point position; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.hpp index 7f13c3269..78b535ad7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'position' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__traits.hpp new file mode 100644 index 000000000..b4facfef0 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Pose.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'position' +#include "geometry_msgs/msg/detail/point__traits.hpp" +// Member 'orientation' +#include "geometry_msgs/msg/detail/quaternion__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Pose & msg, + std::ostream & out) +{ + out << "{"; + // member: position + { + out << "position: "; + to_flow_style_yaml(msg.position, out); + out << ", "; + } + + // member: orientation + { + out << "orientation: "; + to_flow_style_yaml(msg.orientation, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Pose & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: position + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "position:\n"; + to_block_style_yaml(msg.position, out, indentation + 2); + } + + // member: orientation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "orientation:\n"; + to_block_style_yaml(msg.orientation, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Pose & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Pose & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Pose & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Pose"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Pose"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.c new file mode 100644 index 000000000..6b2887aa5 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Pose.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose__functions.h" +#include "geometry_msgs/msg/detail/pose__struct.h" + + +// Include directives for member types +// Member `position` +#include "geometry_msgs/msg/point.h" +// Member `position` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" +// Member `orientation` +#include "geometry_msgs/msg/quaternion.h" +// Member `orientation` +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_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; + geometry_msgs__msg__Pose__init(message_memory); +} + +void geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_fini_function(void * message_memory) +{ + geometry_msgs__msg__Pose__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[2] = { + { + "position", // 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(geometry_msgs__msg__Pose, position), // 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 + }, + { + "orientation", // 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(geometry_msgs__msg__Pose, orientation), // 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 geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_members = { + "geometry_msgs__msg", // message namespace + "Pose", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Pose), + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_member_array, // message members + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_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 geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle = { + 0, + &geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)() { + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); + if (!geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.cpp index 51e35d9f9..5b8831146 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Pose_message_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Pose_message_ 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.hpp new file mode 100644 index 000000000..7ffb22da1 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Pose.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Pose +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__builder.hpp index b6ae730d1..1ac16ffe7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose_array__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__functions.c index e59edfb60..f51c0cc5c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__PoseArray__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PoseArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PoseArray * data = - (geometry_msgs__msg__PoseArray *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PoseArray *)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 (!geometry_msgs__msg__PoseArray__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PoseArray__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; ) { - geometry_msgs__msg__PoseArray__fini(&data[i]); + geometry_msgs__msg__PoseArray__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h index 182e41d59..ec3578c72 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PoseArray( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PoseArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp index 813b96870..17df47233 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PoseArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.h similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.h index 864ce11fe..321016f63 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'poses' #include "geometry_msgs/msg/detail/pose__struct.h" -// Struct defined in msg/PoseArray in the package geometry_msgs. +/// Struct defined in msg/PoseArray in the package geometry_msgs. +/** + * An array of poses with a header for global reference. + */ typedef struct geometry_msgs__msg__PoseArray { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.hpp similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.hpp index 9cf96c68f..c26e99c05 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -55,7 +56,7 @@ struct PoseArray_ std_msgs::msg::Header_; _header_type header; using _poses_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _poses_type poses; // setters for named parameter idiom @@ -66,7 +67,7 @@ struct PoseArray_ return *this; } Type & set__poses( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->poses = _arg; return *this; diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__traits.hpp new file mode 100644 index 000000000..4dff960d2 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__traits.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PoseArray.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'poses' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PoseArray & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: poses + { + if (msg.poses.size() == 0) { + out << "poses: []"; + } else { + out << "poses: ["; + size_t pending_items = msg.poses.size(); + for (auto item : msg.poses) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PoseArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: poses + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.poses.size() == 0) { + out << "poses: []\n"; + } else { + out << "poses:\n"; + for (auto item : msg.poses) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PoseArray & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PoseArray & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PoseArray & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PoseArray"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PoseArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.c new file mode 100644 index 000000000..ee3a69680 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PoseArray.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_array__functions.h" +#include "geometry_msgs/msg/detail/pose_array__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `poses` +#include "geometry_msgs/msg/pose.h" +// Member `poses` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_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; + geometry_msgs__msg__PoseArray__init(message_memory); +} + +void geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_fini_function(void * message_memory) +{ + geometry_msgs__msg__PoseArray__fini(message_memory); +} + +size_t geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__size_function__PoseArray__poses( + const void * untyped_member) +{ + const geometry_msgs__msg__Pose__Sequence * member = + (const geometry_msgs__msg__Pose__Sequence *)(untyped_member); + return member->size; +} + +const void * geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_const_function__PoseArray__poses( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Pose__Sequence * member = + (const geometry_msgs__msg__Pose__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_function__PoseArray__poses( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Pose__Sequence * member = + (geometry_msgs__msg__Pose__Sequence *)(untyped_member); + return &member->data[index]; +} + +void geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__fetch_function__PoseArray__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Pose * item = + ((const geometry_msgs__msg__Pose *) + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_const_function__PoseArray__poses(untyped_member, index)); + geometry_msgs__msg__Pose * value = + (geometry_msgs__msg__Pose *)(untyped_value); + *value = *item; +} + +void geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__assign_function__PoseArray__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Pose * item = + ((geometry_msgs__msg__Pose *) + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_function__PoseArray__poses(untyped_member, index)); + const geometry_msgs__msg__Pose * value = + (const geometry_msgs__msg__Pose *)(untyped_value); + *item = *value; +} + +bool geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__resize_function__PoseArray__poses( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Pose__Sequence * member = + (geometry_msgs__msg__Pose__Sequence *)(untyped_member); + geometry_msgs__msg__Pose__Sequence__fini(member); + return geometry_msgs__msg__Pose__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__PoseArray, header), // 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 + }, + { + "poses", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__PoseArray, poses), // bytes offset in struct + NULL, // default value + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__size_function__PoseArray__poses, // size() function pointer + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_const_function__PoseArray__poses, // get_const(index) function pointer + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__get_function__PoseArray__poses, // get(index) function pointer + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__fetch_function__PoseArray__poses, // fetch(index, &value) function pointer + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__assign_function__PoseArray__poses, // assign(index, value) function pointer + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__resize_function__PoseArray__poses // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_members = { + "geometry_msgs__msg", // message namespace + "PoseArray", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PoseArray), + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array, // message members + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_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 geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle = { + 0, + &geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseArray)() { + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.cpp index be56c58a3..d6021f903 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PoseArray__poses(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PoseArray__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PoseArray__poses(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PoseArray__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PoseArray__poses(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PoseArray__poses(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseArray_mes 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseArray_mes size_function__PoseArray__poses, // size() function pointer get_const_function__PoseArray__poses, // get_const(index) function pointer get_function__PoseArray__poses, // get(index) function pointer + fetch_function__PoseArray__poses, // fetch(index, &value) function pointer + assign_function__PoseArray__poses, // assign(index, value) function pointer resize_function__PoseArray__poses // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.hpp new file mode 100644 index 000000000..1e3ff61ed --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PoseArray.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PoseArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__builder.hpp index 11253c237..894232ee6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__functions.c index 3cd189ba4..b6c0bfc15 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__PoseStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PoseStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PoseStamped * data = - (geometry_msgs__msg__PoseStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PoseStamped *)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 (!geometry_msgs__msg__PoseStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PoseStamped__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; ) { - geometry_msgs__msg__PoseStamped__fini(&data[i]); + geometry_msgs__msg__PoseStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h index fcca4c5e3..d578b05be 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PoseStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PoseStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp index eb0a135ae..6cb12d789 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PoseStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.h similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.h index 5b29f5b0e..2559c4c90 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'pose' #include "geometry_msgs/msg/detail/pose__struct.h" -// Struct defined in msg/PoseStamped in the package geometry_msgs. +/// Struct defined in msg/PoseStamped in the package geometry_msgs. +/** + * A Pose with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__PoseStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.hpp index 43d25095f..86bb9eadb 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__traits.hpp new file mode 100644 index 000000000..e706fbf18 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PoseStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PoseStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PoseStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PoseStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PoseStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PoseStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PoseStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PoseStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.c new file mode 100644 index 000000000..eb24bc3e3 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PoseStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_stamped__functions.h" +#include "geometry_msgs/msg/detail/pose_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_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; + geometry_msgs__msg__PoseStamped__init(message_memory); +} + +void geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__PoseStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__PoseStamped, header), // 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 + }, + { + "pose", // 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(geometry_msgs__msg__PoseStamped, pose), // 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 geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_members = { + "geometry_msgs__msg", // message namespace + "PoseStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PoseStamped), + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array, // message members + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_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 geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)() { + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.cpp index 962cb8d79..77f5db373 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseStamped_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseStamped_m 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.hpp new file mode 100644 index 000000000..42100b6a9 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PoseStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PoseStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp index ce2a03b55..3ec3b27a9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose_with_covariance__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__functions.c index 68cd3318a..c92abb934 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__functions.c @@ -228,22 +228,27 @@ geometry_msgs__msg__PoseWithCovariance__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PoseWithCovariance); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PoseWithCovariance * data = - (geometry_msgs__msg__PoseWithCovariance *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PoseWithCovariance *)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 (!geometry_msgs__msg__PoseWithCovariance__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PoseWithCovariance__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; ) { - geometry_msgs__msg__PoseWithCovariance__fini(&data[i]); + geometry_msgs__msg__PoseWithCovariance__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h index d6cec1811..6d8bb504b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PoseWithCovariance( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PoseWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp index a01b90485..bfaf2bfb8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PoseWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.h similarity index 75% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.h index 0aeef0b2f..ebc931c91 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.h @@ -21,10 +21,17 @@ extern "C" // Member 'pose' #include "geometry_msgs/msg/detail/pose__struct.h" -// Struct defined in msg/PoseWithCovariance in the package geometry_msgs. +/// Struct defined in msg/PoseWithCovariance in the package geometry_msgs. +/** + * This represents a pose in free space with uncertainty. + */ typedef struct geometry_msgs__msg__PoseWithCovariance { geometry_msgs__msg__Pose pose; + /// Row-major representation of the 6x6 covariance matrix + /// The orientation parameters use a fixed-axis representation. + /// In order, the parameters are: + /// (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) double covariance[36]; } geometry_msgs__msg__PoseWithCovariance; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp index c51bc0dda..9fd546575 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'pose' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp new file mode 100644 index 000000000..af827f480 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PoseWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PoseWithCovariance & msg, + std::ostream & out) +{ + out << "{"; + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: covariance + { + if (msg.covariance.size() == 0) { + out << "covariance: []"; + } else { + out << "covariance: ["; + size_t pending_items = msg.covariance.size(); + for (auto item : msg.covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PoseWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.covariance.size() == 0) { + out << "covariance: []\n"; + } else { + out << "covariance:\n"; + for (auto item : msg.covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PoseWithCovariance & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PoseWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PoseWithCovariance & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PoseWithCovariance"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PoseWithCovariance"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.c new file mode 100644 index 000000000..0c3f24fa6 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.c @@ -0,0 +1,153 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PoseWithCovariance.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_with_covariance__functions.h" +#include "geometry_msgs/msg/detail/pose_with_covariance__struct.h" + + +// Include directives for member types +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_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; + geometry_msgs__msg__PoseWithCovariance__init(message_memory); +} + +void geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_fini_function(void * message_memory) +{ + geometry_msgs__msg__PoseWithCovariance__fini(message_memory); +} + +size_t geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__size_function__PoseWithCovariance__covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 36; +} + +const void * geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_const_function__PoseWithCovariance__covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_function__PoseWithCovariance__covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__fetch_function__PoseWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_const_function__PoseWithCovariance__covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__assign_function__PoseWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_function__PoseWithCovariance__covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array[2] = { + { + "pose", // 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(geometry_msgs__msg__PoseWithCovariance, pose), // 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 + }, + { + "covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 36, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__PoseWithCovariance, covariance), // bytes offset in struct + NULL, // default value + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__size_function__PoseWithCovariance__covariance, // size() function pointer + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_const_function__PoseWithCovariance__covariance, // get_const(index) function pointer + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__get_function__PoseWithCovariance__covariance, // get(index) function pointer + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__fetch_function__PoseWithCovariance__covariance, // fetch(index, &value) function pointer + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__assign_function__PoseWithCovariance__covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_members = { + "geometry_msgs__msg", // message namespace + "PoseWithCovariance", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PoseWithCovariance), + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array, // message members + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_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 geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle = { + 0, + &geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)() { + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp index 6727a0f14..e10a7c8dc 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PoseWithCovariance__covariance(void * untyped_member, size_ return &member[index]; } +void fetch_function__PoseWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PoseWithCovariance__covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PoseWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PoseWithCovariance__covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseWithCovariance_message_member_array[2] = { { "pose", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseWithCovar 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 }, { @@ -86,6 +106,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseWithCovar size_function__PoseWithCovariance__covariance, // size() function pointer get_const_function__PoseWithCovariance__covariance, // get_const(index) function pointer get_function__PoseWithCovariance__covariance, // get(index) function pointer + fetch_function__PoseWithCovariance__covariance, // fetch(index, &value) function pointer + assign_function__PoseWithCovariance__covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.hpp new file mode 100644 index 000000000..9297f0f89 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PoseWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PoseWithCovariance +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp index d3cfa2f39..4931ac942 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c similarity index 92% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c index 2bc9f6dd5..09f116cd6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__PoseWithCovarianceStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__PoseWithCovarianceStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__PoseWithCovarianceStamped * data = - (geometry_msgs__msg__PoseWithCovarianceStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__PoseWithCovarianceStamped *)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 (!geometry_msgs__msg__PoseWithCovarianceStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__PoseWithCovarianceStamped__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; ) { - geometry_msgs__msg__PoseWithCovarianceStamped__fini(&data[i]); + geometry_msgs__msg__PoseWithCovarianceStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h index 486d4ce9f..7cbed7f9e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__PoseWithCovarianceStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__PoseWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp index f9df8643c..cca715808 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_PoseWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h index 666892e48..d94390212 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'pose' #include "geometry_msgs/msg/detail/pose_with_covariance__struct.h" -// Struct defined in msg/PoseWithCovarianceStamped in the package geometry_msgs. +/// Struct defined in msg/PoseWithCovarianceStamped in the package geometry_msgs. +/** + * This expresses an estimated pose with a reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__PoseWithCovarianceStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp index ba8857eeb..af8206d82 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp new file mode 100644 index 000000000..fec0991e3 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/PoseWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose_with_covariance__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PoseWithCovarianceStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PoseWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PoseWithCovarianceStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::PoseWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::PoseWithCovarianceStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::PoseWithCovarianceStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/PoseWithCovarianceStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c new file mode 100644 index 000000000..82ae19fc6 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/PoseWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h" +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `pose` +#include "geometry_msgs/msg/pose_with_covariance.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_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; + geometry_msgs__msg__PoseWithCovarianceStamped__init(message_memory); +} + +void geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__PoseWithCovarianceStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__PoseWithCovarianceStamped, header), // 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 + }, + { + "pose", // 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(geometry_msgs__msg__PoseWithCovarianceStamped, pose), // 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 geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_members = { + "geometry_msgs__msg", // message namespace + "PoseWithCovarianceStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__PoseWithCovarianceStamped), + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array, // message members + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_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 geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovarianceStamped)() { + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)(); + if (!geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp index 3502e6b0c..8199c46ff 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseWithCovar 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PoseWithCovar 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.hpp new file mode 100644 index 000000000..eaa0e2bda --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/PoseWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + PoseWithCovarianceStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__builder.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__builder.hpp index 972ada93a..a8f716524 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/quaternion__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/quaternion__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__functions.c index 3e76cff2f..7fa504fb6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__functions.c @@ -229,22 +229,27 @@ geometry_msgs__msg__Quaternion__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Quaternion); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Quaternion * data = - (geometry_msgs__msg__Quaternion *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Quaternion *)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 (!geometry_msgs__msg__Quaternion__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Quaternion__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; ) { - geometry_msgs__msg__Quaternion__fini(&data[i]); + geometry_msgs__msg__Quaternion__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h index 92a37c104..9989dc0b5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Quaternion( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Quaternion( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp index 5c20dcd58..15b128ab0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Quaternion( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.h similarity index 87% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.h index c9ae41169..2972bed50 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.h @@ -17,7 +17,10 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Quaternion in the package geometry_msgs. +/// Struct defined in msg/Quaternion in the package geometry_msgs. +/** + * This represents an orientation in free space in quaternion form. + */ typedef struct geometry_msgs__msg__Quaternion { double x; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.hpp index 4ee79598c..c0e65135a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__geometry_msgs__msg__Quaternion __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__traits.hpp new file mode 100644 index 000000000..a25242873 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__traits.hpp @@ -0,0 +1,160 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Quaternion.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/quaternion__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Quaternion & msg, + std::ostream & out) +{ + out << "{"; + // member: x + { + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << ", "; + } + + // member: y + { + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << ", "; + } + + // member: z + { + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + out << ", "; + } + + // member: w + { + out << "w: "; + rosidl_generator_traits::value_to_yaml(msg.w, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Quaternion & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << "\n"; + } + + // member: y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << "\n"; + } + + // member: z + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + out << "\n"; + } + + // member: w + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "w: "; + rosidl_generator_traits::value_to_yaml(msg.w, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Quaternion & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Quaternion & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Quaternion & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Quaternion"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Quaternion"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.c new file mode 100644 index 000000000..910d2ef6a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.c @@ -0,0 +1,134 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Quaternion.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/quaternion__functions.h" +#include "geometry_msgs/msg/detail/quaternion__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_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; + geometry_msgs__msg__Quaternion__init(message_memory); +} + +void geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_fini_function(void * message_memory) +{ + geometry_msgs__msg__Quaternion__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_member_array[4] = { + { + "x", // 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(geometry_msgs__msg__Quaternion, x), // 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 + }, + { + "y", // 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(geometry_msgs__msg__Quaternion, y), // 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 + }, + { + "z", // 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(geometry_msgs__msg__Quaternion, z), // 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 + }, + { + "w", // 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(geometry_msgs__msg__Quaternion, w), // 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 geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_members = { + "geometry_msgs__msg", // message namespace + "Quaternion", // message name + 4, // number of fields + sizeof(geometry_msgs__msg__Quaternion), + geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_member_array, // message members + geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_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 geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle = { + 0, + &geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)() { + if (!geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.cpp index 80c0434fd..bc3d7f6b8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Quaternion_me 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Quaternion_me 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Quaternion_me 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Quaternion_me 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.hpp new file mode 100644 index 000000000..94fe00e38 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Quaternion.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Quaternion +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp index 7e9a69f30..e20e2f06a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/quaternion_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/quaternion_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__functions.c index 56e6b0087..b37b7f78b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__QuaternionStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__QuaternionStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__QuaternionStamped * data = - (geometry_msgs__msg__QuaternionStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__QuaternionStamped *)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 (!geometry_msgs__msg__QuaternionStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__QuaternionStamped__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; ) { - geometry_msgs__msg__QuaternionStamped__fini(&data[i]); + geometry_msgs__msg__QuaternionStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h index 4da03062c..e2ae330a4 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__QuaternionStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__QuaternionStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 110a86744..ecf13179b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_QuaternionStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.h index 23ede0bd6..2be3ac7cd 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'quaternion' #include "geometry_msgs/msg/detail/quaternion__struct.h" -// Struct defined in msg/QuaternionStamped in the package geometry_msgs. +/// Struct defined in msg/QuaternionStamped in the package geometry_msgs. +/** + * This represents an orientation with reference coordinate frame and timestamp. + */ typedef struct geometry_msgs__msg__QuaternionStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp index 27d8cf86a..cb14dc20b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp new file mode 100644 index 000000000..a51a6fe35 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/QuaternionStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/quaternion_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'quaternion' +#include "geometry_msgs/msg/detail/quaternion__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const QuaternionStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: quaternion + { + out << "quaternion: "; + to_flow_style_yaml(msg.quaternion, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const QuaternionStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: quaternion + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "quaternion:\n"; + to_block_style_yaml(msg.quaternion, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const QuaternionStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::QuaternionStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::QuaternionStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::QuaternionStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/QuaternionStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.c new file mode 100644 index 000000000..cb10e8c82 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/QuaternionStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/quaternion_stamped__functions.h" +#include "geometry_msgs/msg/detail/quaternion_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `quaternion` +#include "geometry_msgs/msg/quaternion.h" +// Member `quaternion` +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_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; + geometry_msgs__msg__QuaternionStamped__init(message_memory); +} + +void geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__QuaternionStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__QuaternionStamped, header), // 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 + }, + { + "quaternion", // 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(geometry_msgs__msg__QuaternionStamped, quaternion), // 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 geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_members = { + "geometry_msgs__msg", // message namespace + "QuaternionStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__QuaternionStamped), + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array, // message members + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_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 geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, QuaternionStamped)() { + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); + if (!geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp index 911e165c5..fe19d4af7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember QuaternionSta 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember QuaternionSta 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.hpp new file mode 100644 index 000000000..971197f43 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/quaternion_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/QuaternionStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + QuaternionStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__builder.hpp index e20dd8c4f..f8f716910 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/transform__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/transform__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__functions.c index 9c3c26585..45e2825a2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__Transform__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Transform); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Transform * data = - (geometry_msgs__msg__Transform *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Transform *)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 (!geometry_msgs__msg__Transform__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Transform__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; ) { - geometry_msgs__msg__Transform__fini(&data[i]); + geometry_msgs__msg__Transform__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h index 16a613595..7bdfc27da 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Transform( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Transform( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp index d70ff0bd0..3d3467688 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Transform( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.h index 3636ef49b..50fb06e95 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'rotation' #include "geometry_msgs/msg/detail/quaternion__struct.h" -// Struct defined in msg/Transform in the package geometry_msgs. +/// Struct defined in msg/Transform in the package geometry_msgs. +/** + * This represents the transform between two coordinate frames in free space. + */ typedef struct geometry_msgs__msg__Transform { geometry_msgs__msg__Vector3 translation; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.hpp index ab75c6a1b..140d79eb1 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'translation' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__traits.hpp new file mode 100644 index 000000000..22ab8316a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Transform.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/transform__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'translation' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" +// Member 'rotation' +#include "geometry_msgs/msg/detail/quaternion__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Transform & msg, + std::ostream & out) +{ + out << "{"; + // member: translation + { + out << "translation: "; + to_flow_style_yaml(msg.translation, out); + out << ", "; + } + + // member: rotation + { + out << "rotation: "; + to_flow_style_yaml(msg.rotation, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Transform & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: translation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "translation:\n"; + to_block_style_yaml(msg.translation, out, indentation + 2); + } + + // member: rotation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "rotation:\n"; + to_block_style_yaml(msg.rotation, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Transform & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Transform & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Transform & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Transform"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Transform"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.c new file mode 100644 index 000000000..89ee16724 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Transform.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/transform__functions.h" +#include "geometry_msgs/msg/detail/transform__struct.h" + + +// Include directives for member types +// Member `translation` +#include "geometry_msgs/msg/vector3.h" +// Member `translation` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" +// Member `rotation` +#include "geometry_msgs/msg/quaternion.h" +// Member `rotation` +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_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; + geometry_msgs__msg__Transform__init(message_memory); +} + +void geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_fini_function(void * message_memory) +{ + geometry_msgs__msg__Transform__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[2] = { + { + "translation", // 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(geometry_msgs__msg__Transform, translation), // 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 + }, + { + "rotation", // 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(geometry_msgs__msg__Transform, rotation), // 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 geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_members = { + "geometry_msgs__msg", // message namespace + "Transform", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Transform), + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_member_array, // message members + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_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 geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle = { + 0, + &geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)() { + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); + if (!geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.cpp index 68a6210ee..797b561e6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Transform_mes 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Transform_mes 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.hpp new file mode 100644 index 000000000..62210dfca --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Transform.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Transform +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__builder.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__builder.hpp index 881c193dd..8d3db6c69 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/transform_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/transform_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__functions.c similarity index 92% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__functions.c index aeaddd972..cf7b033d0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__functions.c @@ -258,22 +258,27 @@ geometry_msgs__msg__TransformStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__TransformStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__TransformStamped * data = - (geometry_msgs__msg__TransformStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__TransformStamped *)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 (!geometry_msgs__msg__TransformStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__TransformStamped__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; ) { - geometry_msgs__msg__TransformStamped__fini(&data[i]); + geometry_msgs__msg__TransformStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h index 90febf4b3..91f24149f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__TransformStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__TransformStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp index d6d4efd6c..5f1b7561e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_TransformStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.h new file mode 100644 index 000000000..9ac321b67 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.h @@ -0,0 +1,65 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from geometry_msgs:msg/TransformStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'child_frame_id' +#include "rosidl_runtime_c/string.h" +// Member 'transform' +#include "geometry_msgs/msg/detail/transform__struct.h" + +/// Struct defined in msg/TransformStamped in the package geometry_msgs. +/** + * This expresses a transform from coordinate frame header.frame_id + * to the coordinate frame child_frame_id at the time of header.stamp + * + * This message is mostly used by the + * tf2 package. + * See its documentation for more information. + * + * The child_frame_id is necessary in addition to the frame_id + * in the Header to communicate the full reference for the transform + * in a self contained message. + */ +typedef struct geometry_msgs__msg__TransformStamped +{ + /// The frame id in the header is used as the reference frame of this transform. + std_msgs__msg__Header header; + /// The frame id of the child frame to which this transform points. + rosidl_runtime_c__String child_frame_id; + /// Translation and rotation in 3-dimensions of child_frame_id from header.frame_id. + geometry_msgs__msg__Transform transform; +} geometry_msgs__msg__TransformStamped; + +// Struct for a sequence of geometry_msgs__msg__TransformStamped. +typedef struct geometry_msgs__msg__TransformStamped__Sequence +{ + geometry_msgs__msg__TransformStamped * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} geometry_msgs__msg__TransformStamped__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.hpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.hpp index 896d3b32d..a740d3d1c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -66,7 +67,7 @@ struct TransformStamped_ std_msgs::msg::Header_; _header_type header; using _child_frame_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _child_frame_id_type child_frame_id; using _transform_type = geometry_msgs::msg::Transform_; @@ -80,7 +81,7 @@ struct TransformStamped_ return *this; } Type & set__child_frame_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->child_frame_id = _arg; return *this; diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__traits.hpp new file mode 100644 index 000000000..f962b50c2 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__traits.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/TransformStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/transform_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'transform' +#include "geometry_msgs/msg/detail/transform__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TransformStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: child_frame_id + { + out << "child_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.child_frame_id, out); + out << ", "; + } + + // member: transform + { + out << "transform: "; + to_flow_style_yaml(msg.transform, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TransformStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: child_frame_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "child_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.child_frame_id, out); + out << "\n"; + } + + // member: transform + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "transform:\n"; + to_block_style_yaml(msg.transform, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TransformStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::TransformStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::TransformStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::TransformStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/TransformStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.c new file mode 100644 index 000000000..46437ad3b --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.c @@ -0,0 +1,133 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/TransformStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/transform_stamped__functions.h" +#include "geometry_msgs/msg/detail/transform_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `child_frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `transform` +#include "geometry_msgs/msg/transform.h" +// Member `transform` +#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_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; + geometry_msgs__msg__TransformStamped__init(message_memory); +} + +void geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__TransformStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[3] = { + { + "header", // 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(geometry_msgs__msg__TransformStamped, header), // 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 + }, + { + "child_frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__TransformStamped, child_frame_id), // 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 + }, + { + "transform", // 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(geometry_msgs__msg__TransformStamped, transform), // 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 geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_members = { + "geometry_msgs__msg", // message namespace + "TransformStamped", // message name + 3, // number of fields + sizeof(geometry_msgs__msg__TransformStamped), + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array, // message members + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_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 geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)() { + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); + if (!geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.cpp index bc57075e6..e514f429f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TransformStam 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TransformStam 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TransformStam 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.hpp new file mode 100644 index 000000000..a1fce5ed5 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/transform_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/TransformStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + TransformStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__builder.hpp index 9eba292e5..961b4ef4a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/twist__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/twist__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__functions.c index ea966e54a..32a4356a9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__functions.c @@ -236,22 +236,27 @@ geometry_msgs__msg__Twist__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Twist); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Twist * data = - (geometry_msgs__msg__Twist *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Twist *)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 (!geometry_msgs__msg__Twist__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Twist__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; ) { - geometry_msgs__msg__Twist__fini(&data[i]); + geometry_msgs__msg__Twist__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h index 7eea61633..70487e90a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Twist( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Twist( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp index 9271ef135..15cfb85a0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Twist( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.h similarity index 87% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.h index bbf6abb09..55c68d1bc 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.h @@ -22,7 +22,10 @@ extern "C" // Member 'angular' #include "geometry_msgs/msg/detail/vector3__struct.h" -// Struct defined in msg/Twist in the package geometry_msgs. +/// Struct defined in msg/Twist in the package geometry_msgs. +/** + * This expresses velocity in free space broken into its linear and angular parts. + */ typedef struct geometry_msgs__msg__Twist { geometry_msgs__msg__Vector3 linear; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.hpp index e48e9d620..6aaebc4e0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'linear' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__traits.hpp new file mode 100644 index 000000000..8a1838263 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Twist.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/twist__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'linear' +// Member 'angular' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Twist & msg, + std::ostream & out) +{ + out << "{"; + // member: linear + { + out << "linear: "; + to_flow_style_yaml(msg.linear, out); + out << ", "; + } + + // member: angular + { + out << "angular: "; + to_flow_style_yaml(msg.angular, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Twist & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: linear + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "linear:\n"; + to_block_style_yaml(msg.linear, out, indentation + 2); + } + + // member: angular + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angular:\n"; + to_block_style_yaml(msg.angular, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Twist & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Twist & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Twist & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Twist"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Twist"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.c new file mode 100644 index 000000000..253745182 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.c @@ -0,0 +1,112 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Twist.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist__functions.h" +#include "geometry_msgs/msg/detail/twist__struct.h" + + +// Include directives for member types +// Member `linear` +// Member `angular` +#include "geometry_msgs/msg/vector3.h" +// Member `linear` +// Member `angular` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_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; + geometry_msgs__msg__Twist__init(message_memory); +} + +void geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_fini_function(void * message_memory) +{ + geometry_msgs__msg__Twist__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[2] = { + { + "linear", // 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(geometry_msgs__msg__Twist, linear), // 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 + }, + { + "angular", // 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(geometry_msgs__msg__Twist, angular), // 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 geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_members = { + "geometry_msgs__msg", // message namespace + "Twist", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Twist), + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_member_array, // message members + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_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 geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle = { + 0, + &geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)() { + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.cpp index 7dbeaca6d..d451a5ba2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Twist_message 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Twist_message 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.hpp new file mode 100644 index 000000000..a43875852 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Twist.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Twist +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__builder.hpp index 5a766602c..3848af056 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/twist_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/twist_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__functions.c index 24b1bed73..c4316955c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__TwistStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__TwistStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__TwistStamped * data = - (geometry_msgs__msg__TwistStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__TwistStamped *)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 (!geometry_msgs__msg__TwistStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__TwistStamped__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; ) { - geometry_msgs__msg__TwistStamped__fini(&data[i]); + geometry_msgs__msg__TwistStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h index 2809a4f17..4b36c8a05 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__TwistStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__TwistStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 69fabedab..c600fd230 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_TwistStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.h similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.h index a323da005..cf8f6adf8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'twist' #include "geometry_msgs/msg/detail/twist__struct.h" -// Struct defined in msg/TwistStamped in the package geometry_msgs. +/// Struct defined in msg/TwistStamped in the package geometry_msgs. +/** + * A twist with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__TwistStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.hpp index af0c13c42..5b18eb8c6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__traits.hpp new file mode 100644 index 000000000..e9ef3ba49 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/TwistStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/twist_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TwistStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: twist + { + out << "twist: "; + to_flow_style_yaml(msg.twist, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TwistStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "twist:\n"; + to_block_style_yaml(msg.twist, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TwistStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::TwistStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::TwistStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::TwistStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/TwistStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.c new file mode 100644 index 000000000..20cf9dbfc --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/TwistStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_stamped__functions.h" +#include "geometry_msgs/msg/detail/twist_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `twist` +#include "geometry_msgs/msg/twist.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_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; + geometry_msgs__msg__TwistStamped__init(message_memory); +} + +void geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__TwistStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__TwistStamped, header), // 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 + }, + { + "twist", // 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(geometry_msgs__msg__TwistStamped, twist), // 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 geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_members = { + "geometry_msgs__msg", // message namespace + "TwistStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__TwistStamped), + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array, // message members + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_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 geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistStamped)() { + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + if (!geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.cpp index 366d14d68..7bc0562af 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistStamped_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistStamped_ 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.hpp new file mode 100644 index 000000000..d266416e8 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/TwistStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + TwistStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp index a0939b235..1f5f9a840 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__functions.c index 5547ead3c..79f3ed26b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__functions.c @@ -228,22 +228,27 @@ geometry_msgs__msg__TwistWithCovariance__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__TwistWithCovariance); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__TwistWithCovariance * data = - (geometry_msgs__msg__TwistWithCovariance *)realloc(output->data, allocation_size); + (geometry_msgs__msg__TwistWithCovariance *)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 (!geometry_msgs__msg__TwistWithCovariance__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__TwistWithCovariance__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; ) { - geometry_msgs__msg__TwistWithCovariance__fini(&data[i]); + geometry_msgs__msg__TwistWithCovariance__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h index 143d28975..e6af7f7ad 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__TwistWithCovariance( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__TwistWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp index da7885b90..66639a653 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_TwistWithCovariance( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.h similarity index 75% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.h index ea990549d..f079a256a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.h @@ -21,10 +21,17 @@ extern "C" // Member 'twist' #include "geometry_msgs/msg/detail/twist__struct.h" -// Struct defined in msg/TwistWithCovariance in the package geometry_msgs. +/// Struct defined in msg/TwistWithCovariance in the package geometry_msgs. +/** + * This expresses velocity in free space with uncertainty. + */ typedef struct geometry_msgs__msg__TwistWithCovariance { geometry_msgs__msg__Twist twist; + /// Row-major representation of the 6x6 covariance matrix + /// The orientation parameters use a fixed-axis representation. + /// In order, the parameters are: + /// (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) double covariance[36]; } geometry_msgs__msg__TwistWithCovariance; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp index 243d3e90f..af8568dd4 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'twist' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp new file mode 100644 index 000000000..1a865856a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/TwistWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TwistWithCovariance & msg, + std::ostream & out) +{ + out << "{"; + // member: twist + { + out << "twist: "; + to_flow_style_yaml(msg.twist, out); + out << ", "; + } + + // member: covariance + { + if (msg.covariance.size() == 0) { + out << "covariance: []"; + } else { + out << "covariance: ["; + size_t pending_items = msg.covariance.size(); + for (auto item : msg.covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TwistWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "twist:\n"; + to_block_style_yaml(msg.twist, out, indentation + 2); + } + + // member: covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.covariance.size() == 0) { + out << "covariance: []\n"; + } else { + out << "covariance:\n"; + for (auto item : msg.covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TwistWithCovariance & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::TwistWithCovariance & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::TwistWithCovariance & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::TwistWithCovariance"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/TwistWithCovariance"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.c new file mode 100644 index 000000000..95330d9e6 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.c @@ -0,0 +1,153 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/TwistWithCovariance.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_with_covariance__functions.h" +#include "geometry_msgs/msg/detail/twist_with_covariance__struct.h" + + +// Include directives for member types +// Member `twist` +#include "geometry_msgs/msg/twist.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_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; + geometry_msgs__msg__TwistWithCovariance__init(message_memory); +} + +void geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_fini_function(void * message_memory) +{ + geometry_msgs__msg__TwistWithCovariance__fini(message_memory); +} + +size_t geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__size_function__TwistWithCovariance__covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 36; +} + +const void * geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_const_function__TwistWithCovariance__covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_function__TwistWithCovariance__covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__fetch_function__TwistWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_const_function__TwistWithCovariance__covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__assign_function__TwistWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_function__TwistWithCovariance__covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array[2] = { + { + "twist", // 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(geometry_msgs__msg__TwistWithCovariance, twist), // 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 + }, + { + "covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 36, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__TwistWithCovariance, covariance), // bytes offset in struct + NULL, // default value + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__size_function__TwistWithCovariance__covariance, // size() function pointer + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_const_function__TwistWithCovariance__covariance, // get_const(index) function pointer + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__get_function__TwistWithCovariance__covariance, // get(index) function pointer + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__fetch_function__TwistWithCovariance__covariance, // fetch(index, &value) function pointer + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__assign_function__TwistWithCovariance__covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_members = { + "geometry_msgs__msg", // message namespace + "TwistWithCovariance", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__TwistWithCovariance), + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array, // message members + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_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 geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle = { + 0, + &geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)() { + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + if (!geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp index fca714a36..dd5104445 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__TwistWithCovariance__covariance(void * untyped_member, size return &member[index]; } +void fetch_function__TwistWithCovariance__covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__TwistWithCovariance__covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__TwistWithCovariance__covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__TwistWithCovariance__covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistWithCovariance_message_member_array[2] = { { "twist", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistWithCova 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 }, { @@ -86,6 +106,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistWithCova size_function__TwistWithCovariance__covariance, // size() function pointer get_const_function__TwistWithCovariance__covariance, // get_const(index) function pointer get_function__TwistWithCovariance__covariance, // get(index) function pointer + fetch_function__TwistWithCovariance__covariance, // fetch(index, &value) function pointer + assign_function__TwistWithCovariance__covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.hpp new file mode 100644 index 000000000..699e35147 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/TwistWithCovariance.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + TwistWithCovariance +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp index 7efd6f250..4be4d1c4f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c index b03964ce7..5309976ad 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__TwistWithCovarianceStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__TwistWithCovarianceStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__TwistWithCovarianceStamped * data = - (geometry_msgs__msg__TwistWithCovarianceStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__TwistWithCovarianceStamped *)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 (!geometry_msgs__msg__TwistWithCovarianceStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__TwistWithCovarianceStamped__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; ) { - geometry_msgs__msg__TwistWithCovarianceStamped__fini(&data[i]); + geometry_msgs__msg__TwistWithCovarianceStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h index dd9edf073..5fa3a8d00 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__TwistWithCovarianceStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__TwistWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp index e2e66c809..04cc6e67a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_TwistWithCovarianceStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h similarity index 88% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h index 0c53b366d..e6a709ebe 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'twist' #include "geometry_msgs/msg/detail/twist_with_covariance__struct.h" -// Struct defined in msg/TwistWithCovarianceStamped in the package geometry_msgs. +/// Struct defined in msg/TwistWithCovarianceStamped in the package geometry_msgs. +/** + * This represents an estimated twist with reference coordinate frame and timestamp. + */ typedef struct geometry_msgs__msg__TwistWithCovarianceStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp index 9df4ba3dd..fa8c7a46d 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp new file mode 100644 index 000000000..8ba60557d --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist_with_covariance__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TwistWithCovarianceStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: twist + { + out << "twist: "; + to_flow_style_yaml(msg.twist, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TwistWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "twist:\n"; + to_block_style_yaml(msg.twist, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TwistWithCovarianceStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::TwistWithCovarianceStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::TwistWithCovarianceStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::TwistWithCovarianceStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/TwistWithCovarianceStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c new file mode 100644 index 000000000..1f4a576fe --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h" +#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `twist` +#include "geometry_msgs/msg/twist_with_covariance.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_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; + geometry_msgs__msg__TwistWithCovarianceStamped__init(message_memory); +} + +void geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__TwistWithCovarianceStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__TwistWithCovarianceStamped, header), // 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 + }, + { + "twist", // 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(geometry_msgs__msg__TwistWithCovarianceStamped, twist), // 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 geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_members = { + "geometry_msgs__msg", // message namespace + "TwistWithCovarianceStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__TwistWithCovarianceStamped), + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array, // message members + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_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 geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovarianceStamped)() { + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)(); + if (!geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp index 4e3ec6145..90a71c684 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistWithCova 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TwistWithCova 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.hpp new file mode 100644 index 000000000..3ee8026bc --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + TwistWithCovarianceStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__builder.hpp index b4230915b..e656f0acd 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/vector3__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/vector3__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__functions.c similarity index 90% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__functions.c index ae4e67746..59c9fe469 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__functions.c @@ -217,22 +217,27 @@ geometry_msgs__msg__Vector3__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Vector3); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Vector3 * data = - (geometry_msgs__msg__Vector3 *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Vector3 *)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 (!geometry_msgs__msg__Vector3__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Vector3__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; ) { - geometry_msgs__msg__Vector3__fini(&data[i]); + geometry_msgs__msg__Vector3__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h index fd5a834d0..21f6f2cdd 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Vector3( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Vector3( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp index d25942346..ac87dea50 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Vector3( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.h similarity index 75% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.h index 1f8507894..1a7423a56 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.h @@ -17,9 +17,15 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Vector3 in the package geometry_msgs. +/// Struct defined in msg/Vector3 in the package geometry_msgs. +/** + * This represents a vector in free space. + */ typedef struct geometry_msgs__msg__Vector3 { + /// This is semantically different than a point. + /// A vector is always anchored at the origin. + /// When a transform is applied to a vector, only the rotational component is applied. double x; double y; double z; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.hpp index 3197b6038..fbfe47b2c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__geometry_msgs__msg__Vector3 __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__traits.hpp new file mode 100644 index 000000000..998d088de --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Vector3.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/vector3__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Vector3 & msg, + std::ostream & out) +{ + out << "{"; + // member: x + { + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << ", "; + } + + // member: y + { + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << ", "; + } + + // member: z + { + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Vector3 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x: "; + rosidl_generator_traits::value_to_yaml(msg.x, out); + out << "\n"; + } + + // member: y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y: "; + rosidl_generator_traits::value_to_yaml(msg.y, out); + out << "\n"; + } + + // member: z + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "z: "; + rosidl_generator_traits::value_to_yaml(msg.z, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Vector3 & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Vector3 & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Vector3 & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Vector3"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Vector3"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.c new file mode 100644 index 000000000..b1fd82cbd --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Vector3.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/vector3__functions.h" +#include "geometry_msgs/msg/detail/vector3__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_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; + geometry_msgs__msg__Vector3__init(message_memory); +} + +void geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_fini_function(void * message_memory) +{ + geometry_msgs__msg__Vector3__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_member_array[3] = { + { + "x", // 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(geometry_msgs__msg__Vector3, x), // 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 + }, + { + "y", // 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(geometry_msgs__msg__Vector3, y), // 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 + }, + { + "z", // 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(geometry_msgs__msg__Vector3, z), // 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 geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_members = { + "geometry_msgs__msg", // message namespace + "Vector3", // message name + 3, // number of fields + sizeof(geometry_msgs__msg__Vector3), + geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_member_array, // message members + geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_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 geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle = { + 0, + &geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)() { + if (!geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.cpp index 36210c627..0484c16ba 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vector3_messa 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vector3_messa 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vector3_messa 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.hpp new file mode 100644 index 000000000..1a732d0f0 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Vector3.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Vector3 +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__builder.hpp index 5bcaff268..4e9e3eaa4 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/vector3_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/vector3_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__functions.c index 0b3cf0b00..99096b395 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__Vector3Stamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Vector3Stamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Vector3Stamped * data = - (geometry_msgs__msg__Vector3Stamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Vector3Stamped *)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 (!geometry_msgs__msg__Vector3Stamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Vector3Stamped__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; ) { - geometry_msgs__msg__Vector3Stamped__fini(&data[i]); + geometry_msgs__msg__Vector3Stamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h index 1630a6d27..57c7beda0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Vector3Stamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Vector3Stamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp index c9161872c..67daefe72 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Vector3Stamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.h similarity index 78% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.h index 07c31b91f..b78e905f7 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.h @@ -23,9 +23,14 @@ extern "C" // Member 'vector' #include "geometry_msgs/msg/detail/vector3__struct.h" -// Struct defined in msg/Vector3Stamped in the package geometry_msgs. +/// Struct defined in msg/Vector3Stamped in the package geometry_msgs. +/** + * This represents a Vector3 with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__Vector3Stamped { + /// Note that this follows vector semantics with it always anchored at the origin, + /// so the rotational elements of a transform are the only parts applied when transforming. std_msgs__msg__Header header; geometry_msgs__msg__Vector3 vector; } geometry_msgs__msg__Vector3Stamped; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.hpp index 51c5777b1..d2ab111e9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__traits.hpp new file mode 100644 index 000000000..f42f21430 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Vector3Stamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/vector3_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'vector' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Vector3Stamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: vector + { + out << "vector: "; + to_flow_style_yaml(msg.vector, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Vector3Stamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: vector + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "vector:\n"; + to_block_style_yaml(msg.vector, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Vector3Stamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Vector3Stamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Vector3Stamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Vector3Stamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Vector3Stamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.c new file mode 100644 index 000000000..cdd941fa7 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Vector3Stamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/vector3_stamped__functions.h" +#include "geometry_msgs/msg/detail/vector3_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `vector` +#include "geometry_msgs/msg/vector3.h" +// Member `vector` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_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; + geometry_msgs__msg__Vector3Stamped__init(message_memory); +} + +void geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__Vector3Stamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__Vector3Stamped, header), // 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 + }, + { + "vector", // 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(geometry_msgs__msg__Vector3Stamped, vector), // 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 geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_members = { + "geometry_msgs__msg", // message namespace + "Vector3Stamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Vector3Stamped), + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array, // message members + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_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 geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3Stamped)() { + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp index 042e5d098..12331c0d2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vector3Stampe 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vector3Stampe 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.hpp new file mode 100644 index 000000000..c190fb939 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/vector3_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Vector3Stamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Vector3Stamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__builder.hpp new file mode 100644 index 000000000..5c1e7591c --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__builder.hpp @@ -0,0 +1,104 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__BUILDER_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__BUILDER_HPP_ + +#include +#include + +#include "geometry_msgs/msg/detail/velocity_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace geometry_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_VelocityStamped_velocity +{ +public: + explicit Init_VelocityStamped_velocity(::geometry_msgs::msg::VelocityStamped & msg) + : msg_(msg) + {} + ::geometry_msgs::msg::VelocityStamped velocity(::geometry_msgs::msg::VelocityStamped::_velocity_type arg) + { + msg_.velocity = std::move(arg); + return std::move(msg_); + } + +private: + ::geometry_msgs::msg::VelocityStamped msg_; +}; + +class Init_VelocityStamped_reference_frame_id +{ +public: + explicit Init_VelocityStamped_reference_frame_id(::geometry_msgs::msg::VelocityStamped & msg) + : msg_(msg) + {} + Init_VelocityStamped_velocity reference_frame_id(::geometry_msgs::msg::VelocityStamped::_reference_frame_id_type arg) + { + msg_.reference_frame_id = std::move(arg); + return Init_VelocityStamped_velocity(msg_); + } + +private: + ::geometry_msgs::msg::VelocityStamped msg_; +}; + +class Init_VelocityStamped_body_frame_id +{ +public: + explicit Init_VelocityStamped_body_frame_id(::geometry_msgs::msg::VelocityStamped & msg) + : msg_(msg) + {} + Init_VelocityStamped_reference_frame_id body_frame_id(::geometry_msgs::msg::VelocityStamped::_body_frame_id_type arg) + { + msg_.body_frame_id = std::move(arg); + return Init_VelocityStamped_reference_frame_id(msg_); + } + +private: + ::geometry_msgs::msg::VelocityStamped msg_; +}; + +class Init_VelocityStamped_header +{ +public: + Init_VelocityStamped_header() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_VelocityStamped_body_frame_id header(::geometry_msgs::msg::VelocityStamped::_header_type arg) + { + msg_.header = std::move(arg); + return Init_VelocityStamped_body_frame_id(msg_); + } + +private: + ::geometry_msgs::msg::VelocityStamped msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::geometry_msgs::msg::VelocityStamped>() +{ + return geometry_msgs::msg::builder::Init_VelocityStamped_header(); +} + +} // namespace geometry_msgs + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.c new file mode 100644 index 000000000..d509151c9 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.c @@ -0,0 +1,313 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice +#include "geometry_msgs/msg/detail/velocity_stamped__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/detail/header__functions.h" +// Member `body_frame_id` +// Member `reference_frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `velocity` +#include "geometry_msgs/msg/detail/twist__functions.h" + +bool +geometry_msgs__msg__VelocityStamped__init(geometry_msgs__msg__VelocityStamped * msg) +{ + if (!msg) { + return false; + } + // header + if (!std_msgs__msg__Header__init(&msg->header)) { + geometry_msgs__msg__VelocityStamped__fini(msg); + return false; + } + // body_frame_id + if (!rosidl_runtime_c__String__init(&msg->body_frame_id)) { + geometry_msgs__msg__VelocityStamped__fini(msg); + return false; + } + // reference_frame_id + if (!rosidl_runtime_c__String__init(&msg->reference_frame_id)) { + geometry_msgs__msg__VelocityStamped__fini(msg); + return false; + } + // velocity + if (!geometry_msgs__msg__Twist__init(&msg->velocity)) { + geometry_msgs__msg__VelocityStamped__fini(msg); + return false; + } + return true; +} + +void +geometry_msgs__msg__VelocityStamped__fini(geometry_msgs__msg__VelocityStamped * msg) +{ + if (!msg) { + return; + } + // header + std_msgs__msg__Header__fini(&msg->header); + // body_frame_id + rosidl_runtime_c__String__fini(&msg->body_frame_id); + // reference_frame_id + rosidl_runtime_c__String__fini(&msg->reference_frame_id); + // velocity + geometry_msgs__msg__Twist__fini(&msg->velocity); +} + +bool +geometry_msgs__msg__VelocityStamped__are_equal(const geometry_msgs__msg__VelocityStamped * lhs, const geometry_msgs__msg__VelocityStamped * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // header + if (!std_msgs__msg__Header__are_equal( + &(lhs->header), &(rhs->header))) + { + return false; + } + // body_frame_id + if (!rosidl_runtime_c__String__are_equal( + &(lhs->body_frame_id), &(rhs->body_frame_id))) + { + return false; + } + // reference_frame_id + if (!rosidl_runtime_c__String__are_equal( + &(lhs->reference_frame_id), &(rhs->reference_frame_id))) + { + return false; + } + // velocity + if (!geometry_msgs__msg__Twist__are_equal( + &(lhs->velocity), &(rhs->velocity))) + { + return false; + } + return true; +} + +bool +geometry_msgs__msg__VelocityStamped__copy( + const geometry_msgs__msg__VelocityStamped * input, + geometry_msgs__msg__VelocityStamped * output) +{ + if (!input || !output) { + return false; + } + // header + if (!std_msgs__msg__Header__copy( + &(input->header), &(output->header))) + { + return false; + } + // body_frame_id + if (!rosidl_runtime_c__String__copy( + &(input->body_frame_id), &(output->body_frame_id))) + { + return false; + } + // reference_frame_id + if (!rosidl_runtime_c__String__copy( + &(input->reference_frame_id), &(output->reference_frame_id))) + { + return false; + } + // velocity + if (!geometry_msgs__msg__Twist__copy( + &(input->velocity), &(output->velocity))) + { + return false; + } + return true; +} + +geometry_msgs__msg__VelocityStamped * +geometry_msgs__msg__VelocityStamped__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + geometry_msgs__msg__VelocityStamped * msg = (geometry_msgs__msg__VelocityStamped *)allocator.allocate(sizeof(geometry_msgs__msg__VelocityStamped), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(geometry_msgs__msg__VelocityStamped)); + bool success = geometry_msgs__msg__VelocityStamped__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +geometry_msgs__msg__VelocityStamped__destroy(geometry_msgs__msg__VelocityStamped * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + geometry_msgs__msg__VelocityStamped__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +geometry_msgs__msg__VelocityStamped__Sequence__init(geometry_msgs__msg__VelocityStamped__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + geometry_msgs__msg__VelocityStamped * data = NULL; + + if (size) { + data = (geometry_msgs__msg__VelocityStamped *)allocator.zero_allocate(size, sizeof(geometry_msgs__msg__VelocityStamped), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = geometry_msgs__msg__VelocityStamped__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + geometry_msgs__msg__VelocityStamped__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +geometry_msgs__msg__VelocityStamped__Sequence__fini(geometry_msgs__msg__VelocityStamped__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) { + geometry_msgs__msg__VelocityStamped__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); + } +} + +geometry_msgs__msg__VelocityStamped__Sequence * +geometry_msgs__msg__VelocityStamped__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + geometry_msgs__msg__VelocityStamped__Sequence * array = (geometry_msgs__msg__VelocityStamped__Sequence *)allocator.allocate(sizeof(geometry_msgs__msg__VelocityStamped__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = geometry_msgs__msg__VelocityStamped__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +geometry_msgs__msg__VelocityStamped__Sequence__destroy(geometry_msgs__msg__VelocityStamped__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + geometry_msgs__msg__VelocityStamped__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +geometry_msgs__msg__VelocityStamped__Sequence__are_equal(const geometry_msgs__msg__VelocityStamped__Sequence * lhs, const geometry_msgs__msg__VelocityStamped__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!geometry_msgs__msg__VelocityStamped__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +geometry_msgs__msg__VelocityStamped__Sequence__copy( + const geometry_msgs__msg__VelocityStamped__Sequence * input, + geometry_msgs__msg__VelocityStamped__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(geometry_msgs__msg__VelocityStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + geometry_msgs__msg__VelocityStamped * data = + (geometry_msgs__msg__VelocityStamped *)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 (!geometry_msgs__msg__VelocityStamped__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; ) { + geometry_msgs__msg__VelocityStamped__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!geometry_msgs__msg__VelocityStamped__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.h new file mode 100644 index 000000000..c351f8cfe --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__FUNCTIONS_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "geometry_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "geometry_msgs/msg/detail/velocity_stamped__struct.h" + +/// Initialize msg/VelocityStamped 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( + * geometry_msgs__msg__VelocityStamped + * )) before or use + * geometry_msgs__msg__VelocityStamped__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__init(geometry_msgs__msg__VelocityStamped * msg); + +/// Finalize msg/VelocityStamped message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs +void +geometry_msgs__msg__VelocityStamped__fini(geometry_msgs__msg__VelocityStamped * msg); + +/// Create msg/VelocityStamped message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * geometry_msgs__msg__VelocityStamped__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs +geometry_msgs__msg__VelocityStamped * +geometry_msgs__msg__VelocityStamped__create(); + +/// Destroy msg/VelocityStamped message. +/** + * It calls + * geometry_msgs__msg__VelocityStamped__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs +void +geometry_msgs__msg__VelocityStamped__destroy(geometry_msgs__msg__VelocityStamped * msg); + +/// Check for msg/VelocityStamped 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_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__are_equal(const geometry_msgs__msg__VelocityStamped * lhs, const geometry_msgs__msg__VelocityStamped * rhs); + +/// Copy a msg/VelocityStamped 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_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__copy( + const geometry_msgs__msg__VelocityStamped * input, + geometry_msgs__msg__VelocityStamped * output); + +/// Initialize array of msg/VelocityStamped messages. +/** + * It allocates the memory for the number of elements and calls + * geometry_msgs__msg__VelocityStamped__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_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__Sequence__init(geometry_msgs__msg__VelocityStamped__Sequence * array, size_t size); + +/// Finalize array of msg/VelocityStamped messages. +/** + * It calls + * geometry_msgs__msg__VelocityStamped__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_geometry_msgs +void +geometry_msgs__msg__VelocityStamped__Sequence__fini(geometry_msgs__msg__VelocityStamped__Sequence * array); + +/// Create array of msg/VelocityStamped messages. +/** + * It allocates the memory for the array and calls + * geometry_msgs__msg__VelocityStamped__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_geometry_msgs +geometry_msgs__msg__VelocityStamped__Sequence * +geometry_msgs__msg__VelocityStamped__Sequence__create(size_t size); + +/// Destroy array of msg/VelocityStamped messages. +/** + * It calls + * geometry_msgs__msg__VelocityStamped__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_geometry_msgs +void +geometry_msgs__msg__VelocityStamped__Sequence__destroy(geometry_msgs__msg__VelocityStamped__Sequence * array); + +/// Check for msg/VelocityStamped 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_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__Sequence__are_equal(const geometry_msgs__msg__VelocityStamped__Sequence * lhs, const geometry_msgs__msg__VelocityStamped__Sequence * rhs); + +/// Copy an array of msg/VelocityStamped 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_geometry_msgs +bool +geometry_msgs__msg__VelocityStamped__Sequence__copy( + const geometry_msgs__msg__VelocityStamped__Sequence * input, + geometry_msgs__msg__VelocityStamped__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..6c34e80f0 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "geometry_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs +size_t get_serialized_size_geometry_msgs__msg__VelocityStamped( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs +size_t max_serialized_size_geometry_msgs__msg__VelocityStamped( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, geometry_msgs, msg, VelocityStamped)(); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..a6204ab06 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "geometry_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "geometry_msgs/msg/detail/velocity_stamped__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 geometry_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs +cdr_serialize( + const geometry_msgs::msg::VelocityStamped & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + geometry_msgs::msg::VelocityStamped & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs +get_serialized_size( + const geometry_msgs::msg::VelocityStamped & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs +max_serialized_size_VelocityStamped( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace geometry_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, geometry_msgs, msg, VelocityStamped)(); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..1bfe489c7 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__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 "geometry_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, VelocityStamped)(); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..d0681d91a --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__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, geometry_msgs, msg, VelocityStamped)(); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.h new file mode 100644 index 000000000..13bca7040 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'body_frame_id' +// Member 'reference_frame_id' +#include "rosidl_runtime_c/string.h" +// Member 'velocity' +#include "geometry_msgs/msg/detail/twist__struct.h" + +/// Struct defined in msg/VelocityStamped in the package geometry_msgs. +/** + * This expresses the timestamped velocity vector of a frame 'body_frame_id' in the reference frame 'reference_frame_id' expressed from arbitrary observation frame 'header.frame_id'. + * - If the 'body_frame_id' and 'header.frame_id' are identical, the velocity is observed and defined in the local coordinates system of the body + * which is the usual use-case in mobile robotics and is also known as a body twist. + */ +typedef struct geometry_msgs__msg__VelocityStamped +{ + std_msgs__msg__Header header; + rosidl_runtime_c__String body_frame_id; + rosidl_runtime_c__String reference_frame_id; + geometry_msgs__msg__Twist velocity; +} geometry_msgs__msg__VelocityStamped; + +// Struct for a sequence of geometry_msgs__msg__VelocityStamped. +typedef struct geometry_msgs__msg__VelocityStamped__Sequence +{ + geometry_msgs__msg__VelocityStamped * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} geometry_msgs__msg__VelocityStamped__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.hpp new file mode 100644 index 000000000..6e6c56741 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__struct.hpp @@ -0,0 +1,180 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.hpp" +// Member 'velocity' +#include "geometry_msgs/msg/detail/twist__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__geometry_msgs__msg__VelocityStamped __attribute__((deprecated)) +#else +# define DEPRECATED__geometry_msgs__msg__VelocityStamped __declspec(deprecated) +#endif + +namespace geometry_msgs +{ + +namespace msg +{ + +// message struct +template +struct VelocityStamped_ +{ + using Type = VelocityStamped_; + + explicit VelocityStamped_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init), + velocity(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->body_frame_id = ""; + this->reference_frame_id = ""; + } + } + + explicit VelocityStamped_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init), + body_frame_id(_alloc), + reference_frame_id(_alloc), + velocity(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->body_frame_id = ""; + this->reference_frame_id = ""; + } + } + + // field types and members + using _header_type = + std_msgs::msg::Header_; + _header_type header; + using _body_frame_id_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _body_frame_id_type body_frame_id; + using _reference_frame_id_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _reference_frame_id_type reference_frame_id; + using _velocity_type = + geometry_msgs::msg::Twist_; + _velocity_type velocity; + + // setters for named parameter idiom + Type & set__header( + const std_msgs::msg::Header_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__body_frame_id( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->body_frame_id = _arg; + return *this; + } + Type & set__reference_frame_id( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->reference_frame_id = _arg; + return *this; + } + Type & set__velocity( + const geometry_msgs::msg::Twist_ & _arg) + { + this->velocity = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + geometry_msgs::msg::VelocityStamped_ *; + using ConstRawPtr = + const geometry_msgs::msg::VelocityStamped_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__geometry_msgs__msg__VelocityStamped + std::shared_ptr> + Ptr; + typedef DEPRECATED__geometry_msgs__msg__VelocityStamped + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const VelocityStamped_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->body_frame_id != other.body_frame_id) { + return false; + } + if (this->reference_frame_id != other.reference_frame_id) { + return false; + } + if (this->velocity != other.velocity) { + return false; + } + return true; + } + bool operator!=(const VelocityStamped_ & other) const + { + return !this->operator==(other); + } +}; // struct VelocityStamped_ + +// alias to use template instance with default allocator +using VelocityStamped = + geometry_msgs::msg::VelocityStamped_>; + +// constant definitions + +} // namespace msg + +} // namespace geometry_msgs + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__traits.hpp new file mode 100644 index 000000000..413d4e7c8 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__traits.hpp @@ -0,0 +1,164 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/velocity_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'velocity' +#include "geometry_msgs/msg/detail/twist__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const VelocityStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: body_frame_id + { + out << "body_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.body_frame_id, out); + out << ", "; + } + + // member: reference_frame_id + { + out << "reference_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame_id, out); + out << ", "; + } + + // member: velocity + { + out << "velocity: "; + to_flow_style_yaml(msg.velocity, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const VelocityStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: body_frame_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "body_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.body_frame_id, out); + out << "\n"; + } + + // member: reference_frame_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "reference_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame_id, out); + out << "\n"; + } + + // member: velocity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "velocity:\n"; + to_block_style_yaml(msg.velocity, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const VelocityStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::VelocityStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::VelocityStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::VelocityStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/VelocityStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.c new file mode 100644 index 000000000..56e6e2a31 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.c @@ -0,0 +1,151 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/velocity_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/velocity_stamped__functions.h" +#include "geometry_msgs/msg/detail/velocity_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `body_frame_id` +// Member `reference_frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `velocity` +#include "geometry_msgs/msg/twist.h" +// Member `velocity` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_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; + geometry_msgs__msg__VelocityStamped__init(message_memory); +} + +void geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__VelocityStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_member_array[4] = { + { + "header", // 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(geometry_msgs__msg__VelocityStamped, header), // 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 + }, + { + "body_frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__VelocityStamped, body_frame_id), // 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 + }, + { + "reference_frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs__msg__VelocityStamped, reference_frame_id), // 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 + }, + { + "velocity", // 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(geometry_msgs__msg__VelocityStamped, velocity), // 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 geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_members = { + "geometry_msgs__msg", // message namespace + "VelocityStamped", // message name + 4, // number of fields + sizeof(geometry_msgs__msg__VelocityStamped), + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_member_array, // message members + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_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 geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, VelocityStamped)() { + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + if (!geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__VelocityStamped__rosidl_typesupport_introspection_c__VelocityStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.cpp new file mode 100644 index 000000000..ab3d00fac --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.cpp @@ -0,0 +1,160 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from geometry_msgs:msg/VelocityStamped.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 "geometry_msgs/msg/detail/velocity_stamped__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 geometry_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void VelocityStamped_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) geometry_msgs::msg::VelocityStamped(_init); +} + +void VelocityStamped_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~VelocityStamped(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember VelocityStamped_message_member_array[4] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs::msg::VelocityStamped, header), // 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 + }, + { + "body_frame_id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs::msg::VelocityStamped, body_frame_id), // 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 + }, + { + "reference_frame_id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs::msg::VelocityStamped, reference_frame_id), // 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 + }, + { + "velocity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(geometry_msgs::msg::VelocityStamped, velocity), // 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 VelocityStamped_message_members = { + "geometry_msgs::msg", // message namespace + "VelocityStamped", // message name + 4, // number of fields + sizeof(geometry_msgs::msg::VelocityStamped), + VelocityStamped_message_member_array, // message members + VelocityStamped_init_function, // function to initialize message memory (memory has to be allocated) + VelocityStamped_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t VelocityStamped_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &VelocityStamped_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace geometry_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::geometry_msgs::msg::rosidl_typesupport_introspection_cpp::VelocityStamped_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, geometry_msgs, msg, VelocityStamped)() { + return &::geometry_msgs::msg::rosidl_typesupport_introspection_cpp::VelocityStamped_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.h new file mode 100644 index 000000000..b905033c7 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_H_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + geometry_msgs, + msg, + VelocityStamped +)(); + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.hpp new file mode 100644 index 000000000..8e81c49fc --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/velocity_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + VelocityStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__VELOCITY_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__builder.hpp index 6e7983e63..193babdff 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__WRENCH__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/wrench__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/wrench__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__functions.c index cad0bb620..8f8d360f5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__functions.c @@ -236,22 +236,27 @@ geometry_msgs__msg__Wrench__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__Wrench); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__Wrench * data = - (geometry_msgs__msg__Wrench *)realloc(output->data, allocation_size); + (geometry_msgs__msg__Wrench *)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 (!geometry_msgs__msg__Wrench__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__Wrench__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; ) { - geometry_msgs__msg__Wrench__fini(&data[i]); + geometry_msgs__msg__Wrench__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h index 047887816..d0b343c65 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__Wrench( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__Wrench( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp index 4876fbbb9..21ad808c0 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_Wrench( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.h similarity index 87% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.h index 7ccd29e97..3de715b18 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.h @@ -22,7 +22,10 @@ extern "C" // Member 'torque' #include "geometry_msgs/msg/detail/vector3__struct.h" -// Struct defined in msg/Wrench in the package geometry_msgs. +/// Struct defined in msg/Wrench in the package geometry_msgs. +/** + * This represents force in free space, separated into its linear and angular parts. + */ typedef struct geometry_msgs__msg__Wrench { geometry_msgs__msg__Vector3 force; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.hpp index b0af944bf..19b24f52e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__WRENCH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'force' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__traits.hpp new file mode 100644 index 000000000..9f9094346 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/Wrench.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/wrench__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'force' +// Member 'torque' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Wrench & msg, + std::ostream & out) +{ + out << "{"; + // member: force + { + out << "force: "; + to_flow_style_yaml(msg.force, out); + out << ", "; + } + + // member: torque + { + out << "torque: "; + to_flow_style_yaml(msg.torque, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Wrench & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: force + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "force:\n"; + to_block_style_yaml(msg.force, out, indentation + 2); + } + + // member: torque + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "torque:\n"; + to_block_style_yaml(msg.torque, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Wrench & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::Wrench & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::Wrench & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::Wrench"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/Wrench"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.c new file mode 100644 index 000000000..f4dcc8f7f --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.c @@ -0,0 +1,112 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/Wrench.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/wrench__functions.h" +#include "geometry_msgs/msg/detail/wrench__struct.h" + + +// Include directives for member types +// Member `force` +// Member `torque` +#include "geometry_msgs/msg/vector3.h" +// Member `force` +// Member `torque` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_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; + geometry_msgs__msg__Wrench__init(message_memory); +} + +void geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_fini_function(void * message_memory) +{ + geometry_msgs__msg__Wrench__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[2] = { + { + "force", // 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(geometry_msgs__msg__Wrench, force), // 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 + }, + { + "torque", // 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(geometry_msgs__msg__Wrench, torque), // 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 geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_members = { + "geometry_msgs__msg", // message namespace + "Wrench", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__Wrench), + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array, // message members + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_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 geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle = { + 0, + &geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)() { + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.cpp index c7e13afc5..cfc5f4b1e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Wrench_messag 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Wrench_messag 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.hpp new file mode 100644 index 000000000..099964617 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/Wrench.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + Wrench +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__builder.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__builder.hpp similarity index 96% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__builder.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__builder.hpp index 08668f421..d3f6af9fc 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__builder.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__builder.hpp @@ -5,11 +5,12 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__BUILDER_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__BUILDER_HPP_ -#include "geometry_msgs/msg/detail/wrench_stamped__struct.hpp" -#include #include #include +#include "geometry_msgs/msg/detail/wrench_stamped__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace geometry_msgs { diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__functions.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__functions.c similarity index 91% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__functions.c rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__functions.c index 5c674cd7c..80e012e77 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__functions.c +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__functions.c @@ -237,22 +237,27 @@ geometry_msgs__msg__WrenchStamped__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(geometry_msgs__msg__WrenchStamped); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); geometry_msgs__msg__WrenchStamped * data = - (geometry_msgs__msg__WrenchStamped *)realloc(output->data, allocation_size); + (geometry_msgs__msg__WrenchStamped *)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 (!geometry_msgs__msg__WrenchStamped__init(&data[i])) { - /* free currently allocated and return false */ + if (!geometry_msgs__msg__WrenchStamped__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; ) { - geometry_msgs__msg__WrenchStamped__fini(&data[i]); + geometry_msgs__msg__WrenchStamped__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__functions.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__functions.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__functions.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__functions.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h index ac3069ff2..08ccbb939 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_geometry_msgs__msg__WrenchStamped( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs size_t max_serialized_size_geometry_msgs__msg__WrenchStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_geometry_msgs diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp index 0ee840f1e..cc2a8bfc6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_geometry_msgs max_serialized_size_WrenchStamped( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.h similarity index 89% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.h index 47c53e74f..2ee031168 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.h +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.h @@ -23,7 +23,10 @@ extern "C" // Member 'wrench' #include "geometry_msgs/msg/detail/wrench__struct.h" -// Struct defined in msg/WrenchStamped in the package geometry_msgs. +/// Struct defined in msg/WrenchStamped in the package geometry_msgs. +/** + * A wrench with reference coordinate frame and timestamp + */ typedef struct geometry_msgs__msg__WrenchStamped { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.hpp similarity index 97% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.hpp index 81f983747..79f50571e 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__struct.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__struct.hpp @@ -5,14 +5,15 @@ #ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__STRUCT_HPP_ #define GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__traits.hpp new file mode 100644 index 000000000..67d804d3f --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from geometry_msgs:msg/WrenchStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "geometry_msgs/msg/detail/wrench_stamped__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'wrench' +#include "geometry_msgs/msg/detail/wrench__traits.hpp" + +namespace geometry_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const WrenchStamped & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: wrench + { + out << "wrench: "; + to_flow_style_yaml(msg.wrench, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const WrenchStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: wrench + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "wrench:\n"; + to_block_style_yaml(msg.wrench, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const WrenchStamped & 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 geometry_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use geometry_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const geometry_msgs::msg::WrenchStamped & msg, + std::ostream & out, size_t indentation = 0) +{ + geometry_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use geometry_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const geometry_msgs::msg::WrenchStamped & msg) +{ + return geometry_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "geometry_msgs::msg::WrenchStamped"; +} + +template<> +inline const char * name() +{ + return "geometry_msgs/msg/WrenchStamped"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.c new file mode 100644 index 000000000..2453a9561 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.c @@ -0,0 +1,114 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from geometry_msgs:msg/WrenchStamped.idl +// generated code does not contain a copyright notice + +#include +#include "geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h" +#include "geometry_msgs/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 "geometry_msgs/msg/detail/wrench_stamped__functions.h" +#include "geometry_msgs/msg/detail/wrench_stamped__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `wrench` +#include "geometry_msgs/msg/wrench.h" +// Member `wrench` +#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_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; + geometry_msgs__msg__WrenchStamped__init(message_memory); +} + +void geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_fini_function(void * message_memory) +{ + geometry_msgs__msg__WrenchStamped__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[2] = { + { + "header", // 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(geometry_msgs__msg__WrenchStamped, header), // 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 + }, + { + "wrench", // 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(geometry_msgs__msg__WrenchStamped, wrench), // 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 geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_members = { + "geometry_msgs__msg", // message namespace + "WrenchStamped", // message name + 2, // number of fields + sizeof(geometry_msgs__msg__WrenchStamped), + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array, // message members + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_init_function, // function to initialize message memory (memory has to be allocated) + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_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 geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle = { + 0, + &geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, WrenchStamped)() { + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)(); + if (!geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle.typesupport_identifier) { + geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &geometry_msgs__msg__WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp index 175584a37..b679120fa 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember WrenchStamped 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember WrenchStamped 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 } }; diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.hpp new file mode 100644 index 000000000..2d888e3ae --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/detail/wrench_stamped__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from geometry_msgs:msg/WrenchStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TYPE_SUPPORT_HPP_ +#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "geometry_msgs/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_geometry_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + geometry_msgs, + msg, + WrenchStamped +)(); +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/inertia.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/inertia.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/inertia.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/inertia.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia.hpp index b307acfed..be97c9ebb 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/inertia.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/inertia__struct.hpp" #include "geometry_msgs/msg/detail/inertia__builder.hpp" #include "geometry_msgs/msg/detail/inertia__traits.hpp" +#include "geometry_msgs/msg/detail/inertia__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__INERTIA_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/inertia_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/inertia_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/inertia_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/inertia_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia_stamped.hpp index 3ecff22fe..0c404d18f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/inertia_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/inertia_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/inertia_stamped__struct.hpp" #include "geometry_msgs/msg/detail/inertia_stamped__builder.hpp" #include "geometry_msgs/msg/detail/inertia_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/inertia_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__INERTIA_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/point.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/point.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point.hpp index dba57a196..598f92784 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/point.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/point__struct.hpp" #include "geometry_msgs/msg/detail/point__builder.hpp" #include "geometry_msgs/msg/detail/point__traits.hpp" +#include "geometry_msgs/msg/detail/point__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POINT_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point32.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point32.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/point32.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point32.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point32.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point32.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/point32.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point32.hpp index 9027722dc..def09f2f2 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/point32.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point32.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/point32__struct.hpp" #include "geometry_msgs/msg/detail/point32__builder.hpp" #include "geometry_msgs/msg/detail/point32__traits.hpp" +#include "geometry_msgs/msg/detail/point32__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POINT32_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/point_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/point_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/point_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point_stamped.hpp index 0ef1442c5..0480d8721 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/point_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/point_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/point_stamped__struct.hpp" #include "geometry_msgs/msg/detail/point_stamped__builder.hpp" #include "geometry_msgs/msg/detail/point_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/point_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POINT_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/polygon.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/polygon.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/polygon.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/polygon.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon.hpp index 6aa3166c3..560a9b3f9 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/polygon.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/polygon__struct.hpp" #include "geometry_msgs/msg/detail/polygon__builder.hpp" #include "geometry_msgs/msg/detail/polygon__traits.hpp" +#include "geometry_msgs/msg/detail/polygon__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POLYGON_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/polygon_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/polygon_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/polygon_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/polygon_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon_stamped.hpp index fa0890f34..5d9a8d5f5 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/polygon_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/polygon_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/polygon_stamped__struct.hpp" #include "geometry_msgs/msg/detail/polygon_stamped__builder.hpp" #include "geometry_msgs/msg/detail/polygon_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/polygon_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POLYGON_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose.hpp index d20ade25f..2d0d6355b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose__struct.hpp" #include "geometry_msgs/msg/detail/pose__builder.hpp" #include "geometry_msgs/msg/detail/pose__traits.hpp" +#include "geometry_msgs/msg/detail/pose__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose2_d.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose2_d.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose2_d.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose2_d.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose2_d.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose2_d.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose2_d.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose2_d.hpp index 2795badcc..dbe239f13 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose2_d.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose2_d.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose2_d__struct.hpp" #include "geometry_msgs/msg/detail/pose2_d__builder.hpp" #include "geometry_msgs/msg/detail/pose2_d__traits.hpp" +#include "geometry_msgs/msg/detail/pose2_d__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE2_D_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_array.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_array.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_array.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_array.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_array.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_array.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_array.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_array.hpp index d9776acd9..a1701981b 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose_array.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_array.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose_array__struct.hpp" #include "geometry_msgs/msg/detail/pose_array__builder.hpp" #include "geometry_msgs/msg/detail/pose_array__traits.hpp" +#include "geometry_msgs/msg/detail/pose_array__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_stamped.hpp index 235620e4b..3fc1dc9be 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose_stamped__struct.hpp" #include "geometry_msgs/msg/detail/pose_stamped__builder.hpp" #include "geometry_msgs/msg/detail/pose_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/pose_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance.hpp index d5a047365..4271a7a1c 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose_with_covariance__struct.hpp" #include "geometry_msgs/msg/detail/pose_with_covariance__builder.hpp" #include "geometry_msgs/msg/detail/pose_with_covariance__traits.hpp" +#include "geometry_msgs/msg/detail/pose_with_covariance__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE_WITH_COVARIANCE_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance_stamped.hpp index 0fee91fc3..f0cb8dae8 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/pose_with_covariance_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/pose_with_covariance_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp" #include "geometry_msgs/msg/detail/pose_with_covariance_stamped__builder.hpp" #include "geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__POSE_WITH_COVARIANCE_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/quaternion.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/quaternion.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/quaternion.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/quaternion.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion.hpp index 9aab6a750..f854a5367 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/quaternion.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/quaternion__struct.hpp" #include "geometry_msgs/msg/detail/quaternion__builder.hpp" #include "geometry_msgs/msg/detail/quaternion__traits.hpp" +#include "geometry_msgs/msg/detail/quaternion__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__QUATERNION_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/quaternion_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/quaternion_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/quaternion_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/quaternion_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion_stamped.hpp index 430866457..23a6d8bc6 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/quaternion_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/quaternion_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/quaternion_stamped__struct.hpp" #include "geometry_msgs/msg/detail/quaternion_stamped__builder.hpp" #include "geometry_msgs/msg/detail/quaternion_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/quaternion_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__QUATERNION_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..1d8f9bf44 --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 GEOMETRY_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define GEOMETRY_MSGS__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_geometry_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_geometry_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_geometry_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_geometry_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_geometry_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_geometry_msgs ROSIDL_GENERATOR_CPP_EXPORT_geometry_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_geometry_msgs ROSIDL_GENERATOR_CPP_IMPORT_geometry_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_geometry_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_geometry_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_geometry_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_geometry_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // GEOMETRY_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/transform.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/transform.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/transform.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/transform.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform.hpp index 4a60584ef..b914835bf 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/transform.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/transform__struct.hpp" #include "geometry_msgs/msg/detail/transform__builder.hpp" #include "geometry_msgs/msg/detail/transform__traits.hpp" +#include "geometry_msgs/msg/detail/transform__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TRANSFORM_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/transform_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/transform_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/transform_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/transform_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform_stamped.hpp index 5dd00781d..ab4f3241f 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/transform_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/transform_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/transform_stamped__struct.hpp" #include "geometry_msgs/msg/detail/transform_stamped__builder.hpp" #include "geometry_msgs/msg/detail/transform_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/transform_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TRANSFORM_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/twist.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/twist.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist.hpp index ec50ff93f..a77e2031a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/twist.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/twist__struct.hpp" #include "geometry_msgs/msg/detail/twist__builder.hpp" #include "geometry_msgs/msg/detail/twist__traits.hpp" +#include "geometry_msgs/msg/detail/twist__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TWIST_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_stamped.hpp index c0a59e625..cf5034d18 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/twist_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/twist_stamped__struct.hpp" #include "geometry_msgs/msg/detail/twist_stamped__builder.hpp" #include "geometry_msgs/msg/detail/twist_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/twist_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TWIST_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance.hpp index 5df268fa6..c5c8f6bac 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp" #include "geometry_msgs/msg/detail/twist_with_covariance__builder.hpp" #include "geometry_msgs/msg/detail/twist_with_covariance__traits.hpp" +#include "geometry_msgs/msg/detail/twist_with_covariance__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TWIST_WITH_COVARIANCE_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance_stamped.hpp index c1521b733..7d1ccb1d1 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/twist_with_covariance_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/twist_with_covariance_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp" #include "geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp" #include "geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__TWIST_WITH_COVARIANCE_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/vector3.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/vector3.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/vector3.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/vector3.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3.hpp index a2b4ba0bb..0120fdec4 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/vector3.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/vector3__struct.hpp" #include "geometry_msgs/msg/detail/vector3__builder.hpp" #include "geometry_msgs/msg/detail/vector3__traits.hpp" +#include "geometry_msgs/msg/detail/vector3__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__VECTOR3_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/vector3_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/vector3_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/vector3_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/vector3_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3_stamped.hpp index 74060f49b..0e5935e9a 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/vector3_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/vector3_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/vector3_stamped__struct.hpp" #include "geometry_msgs/msg/detail/vector3_stamped__builder.hpp" #include "geometry_msgs/msg/detail/vector3_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/vector3_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__VECTOR3_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.h new file mode 100644 index 000000000..b845feeae --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from geometry_msgs:msg/VelocityStamped.idl +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_H_ +#define GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_H_ + +#include "geometry_msgs/msg/detail/velocity_stamped__struct.h" +#include "geometry_msgs/msg/detail/velocity_stamped__functions.h" +#include "geometry_msgs/msg/detail/velocity_stamped__type_support.h" + +#endif // GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.hpp new file mode 100644 index 000000000..2c99e486e --- /dev/null +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/velocity_stamped.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_HPP_ +#define GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_HPP_ + +#include "geometry_msgs/msg/detail/velocity_stamped__struct.hpp" +#include "geometry_msgs/msg/detail/velocity_stamped__builder.hpp" +#include "geometry_msgs/msg/detail/velocity_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/velocity_stamped__type_support.hpp" + +#endif // GEOMETRY_MSGS__MSG__VELOCITY_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/wrench.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/wrench.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/wrench.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/wrench.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench.hpp index df844493c..c385ff922 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/wrench.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/wrench__struct.hpp" #include "geometry_msgs/msg/detail/wrench__builder.hpp" #include "geometry_msgs/msg/detail/wrench__traits.hpp" +#include "geometry_msgs/msg/detail/wrench__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__WRENCH_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/wrench_stamped.h b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench_stamped.h similarity index 100% rename from ThirdParty/ros/include/geometry_msgs/msg/wrench_stamped.h rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench_stamped.h diff --git a/ThirdParty/ros/include/geometry_msgs/msg/wrench_stamped.hpp b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench_stamped.hpp similarity index 86% rename from ThirdParty/ros/include/geometry_msgs/msg/wrench_stamped.hpp rename to ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench_stamped.hpp index 882e6f230..41c61aebd 100644 --- a/ThirdParty/ros/include/geometry_msgs/msg/wrench_stamped.hpp +++ b/ThirdParty/ros/include/geometry_msgs/geometry_msgs/msg/wrench_stamped.hpp @@ -7,5 +7,6 @@ #include "geometry_msgs/msg/detail/wrench_stamped__struct.hpp" #include "geometry_msgs/msg/detail/wrench_stamped__builder.hpp" #include "geometry_msgs/msg/detail/wrench_stamped__traits.hpp" +#include "geometry_msgs/msg/detail/wrench_stamped__type_support.hpp" #endif // GEOMETRY_MSGS__MSG__WRENCH_STAMPED_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__traits.hpp deleted file mode 100644 index c34c29385..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__traits.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Accel.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/accel__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'linear' -// Member 'angular' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Accel"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Accel"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.c deleted file mode 100644 index e44ada3c1..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel__type_support.c +++ /dev/null @@ -1,108 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Accel.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel__functions.h" -#include "geometry_msgs/msg/detail/accel__struct.h" - - -// Include directives for member types -// Member `linear` -// Member `angular` -#include "geometry_msgs/msg/vector3.h" -// Member `linear` -// Member `angular` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Accel__rosidl_typesupport_introspection_c__Accel_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; - geometry_msgs__msg__Accel__init(message_memory); -} - -void Accel__rosidl_typesupport_introspection_c__Accel_fini_function(void * message_memory) -{ - geometry_msgs__msg__Accel__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[2] = { - { - "linear", // 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(geometry_msgs__msg__Accel, linear), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angular", // 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(geometry_msgs__msg__Accel, angular), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Accel__rosidl_typesupport_introspection_c__Accel_message_members = { - "geometry_msgs__msg", // message namespace - "Accel", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Accel), - Accel__rosidl_typesupport_introspection_c__Accel_message_member_array, // message members - Accel__rosidl_typesupport_introspection_c__Accel_init_function, // function to initialize message memory (memory has to be allocated) - Accel__rosidl_typesupport_introspection_c__Accel_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 Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle = { - 0, - &Accel__rosidl_typesupport_introspection_c__Accel_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)() { - Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Accel__rosidl_typesupport_introspection_c__Accel_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle.typesupport_identifier) { - Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Accel__rosidl_typesupport_introspection_c__Accel_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__traits.hpp deleted file mode 100644 index dd931ca22..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/AccelStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/accel_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'accel' -#include "geometry_msgs/msg/detail/accel__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::AccelStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/AccelStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.c deleted file mode 100644 index 711774611..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/AccelStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/accel_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_stamped__functions.h" -#include "geometry_msgs/msg/detail/accel_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `accel` -#include "geometry_msgs/msg/accel.h" -// Member `accel` -#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_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; - geometry_msgs__msg__AccelStamped__init(message_memory); -} - -void AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__AccelStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__AccelStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "accel", // 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(geometry_msgs__msg__AccelStamped, accel), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_members = { - "geometry_msgs__msg", // message namespace - "AccelStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__AccelStamped), - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array, // message members - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_init_function, // function to initialize message memory (memory has to be allocated) - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_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 AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle = { - 0, - &AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelStamped)() { - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)(); - if (!AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle.typesupport_identifier) { - AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AccelStamped__rosidl_typesupport_introspection_c__AccelStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp deleted file mode 100644 index d75e9aa9f..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/AccelWithCovariance.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/accel_with_covariance__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'accel' -#include "geometry_msgs/msg/detail/accel__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::AccelWithCovariance"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/AccelWithCovariance"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.c deleted file mode 100644 index 9276bc88b..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance__type_support.c +++ /dev/null @@ -1,104 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/AccelWithCovariance.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_with_covariance__functions.h" -#include "geometry_msgs/msg/detail/accel_with_covariance__struct.h" - - -// Include directives for member types -// Member `accel` -#include "geometry_msgs/msg/accel.h" -// Member `accel` -#include "geometry_msgs/msg/detail/accel__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_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; - geometry_msgs__msg__AccelWithCovariance__init(message_memory); -} - -void AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_fini_function(void * message_memory) -{ - geometry_msgs__msg__AccelWithCovariance__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array[2] = { - { - "accel", // 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(geometry_msgs__msg__AccelWithCovariance, accel), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 36, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__AccelWithCovariance, covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_members = { - "geometry_msgs__msg", // message namespace - "AccelWithCovariance", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__AccelWithCovariance), - AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array, // message members - AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) - AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_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 AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle = { - 0, - &AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovariance)() { - AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Accel)(); - if (!AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle.typesupport_identifier) { - AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AccelWithCovariance__rosidl_typesupport_introspection_c__AccelWithCovariance_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp deleted file mode 100644 index 3160b1a08..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/AccelWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'accel' -#include "geometry_msgs/msg/detail/accel_with_covariance__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::AccelWithCovarianceStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/AccelWithCovarianceStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__ACCEL_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c deleted file mode 100644 index 9c1176d3a..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/accel_with_covariance_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/AccelWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/accel_with_covariance_stamped__functions.h" -#include "geometry_msgs/msg/detail/accel_with_covariance_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `accel` -#include "geometry_msgs/msg/accel_with_covariance.h" -// Member `accel` -#include "geometry_msgs/msg/detail/accel_with_covariance__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_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; - geometry_msgs__msg__AccelWithCovarianceStamped__init(message_memory); -} - -void AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__AccelWithCovarianceStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__AccelWithCovarianceStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "accel", // 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(geometry_msgs__msg__AccelWithCovarianceStamped, accel), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_members = { - "geometry_msgs__msg", // message namespace - "AccelWithCovarianceStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__AccelWithCovarianceStamped), - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array, // message members - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_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 AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle = { - 0, - &AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovarianceStamped)() { - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, AccelWithCovariance)(); - if (!AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { - AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &AccelWithCovarianceStamped__rosidl_typesupport_introspection_c__AccelWithCovarianceStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__traits.hpp deleted file mode 100644 index 5d6e89d3a..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Inertia.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/inertia__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'com' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Inertia"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Inertia"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.c deleted file mode 100644 index c3a8ec97e..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia__type_support.c +++ /dev/null @@ -1,194 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Inertia.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/inertia__functions.h" -#include "geometry_msgs/msg/detail/inertia__struct.h" - - -// Include directives for member types -// Member `com` -#include "geometry_msgs/msg/vector3.h" -// Member `com` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Inertia__rosidl_typesupport_introspection_c__Inertia_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; - geometry_msgs__msg__Inertia__init(message_memory); -} - -void Inertia__rosidl_typesupport_introspection_c__Inertia_fini_function(void * message_memory) -{ - geometry_msgs__msg__Inertia__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array[8] = { - { - "m", // 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(geometry_msgs__msg__Inertia, m), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "com", // 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(geometry_msgs__msg__Inertia, com), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ixx", // 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(geometry_msgs__msg__Inertia, ixx), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ixy", // 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(geometry_msgs__msg__Inertia, ixy), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ixz", // 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(geometry_msgs__msg__Inertia, ixz), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "iyy", // 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(geometry_msgs__msg__Inertia, iyy), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "iyz", // 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(geometry_msgs__msg__Inertia, iyz), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "izz", // 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(geometry_msgs__msg__Inertia, izz), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Inertia__rosidl_typesupport_introspection_c__Inertia_message_members = { - "geometry_msgs__msg", // message namespace - "Inertia", // message name - 8, // number of fields - sizeof(geometry_msgs__msg__Inertia), - Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array, // message members - Inertia__rosidl_typesupport_introspection_c__Inertia_init_function, // function to initialize message memory (memory has to be allocated) - Inertia__rosidl_typesupport_introspection_c__Inertia_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 Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle = { - 0, - &Inertia__rosidl_typesupport_introspection_c__Inertia_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Inertia)() { - Inertia__rosidl_typesupport_introspection_c__Inertia_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle.typesupport_identifier) { - Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Inertia__rosidl_typesupport_introspection_c__Inertia_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__traits.hpp deleted file mode 100644 index d0c52669c..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/InertiaStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/inertia_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'inertia' -#include "geometry_msgs/msg/detail/inertia__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::InertiaStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/InertiaStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__INERTIA_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.c deleted file mode 100644 index 46ba0ed1d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/inertia_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/InertiaStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/inertia_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/inertia_stamped__functions.h" -#include "geometry_msgs/msg/detail/inertia_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `inertia` -#include "geometry_msgs/msg/inertia.h" -// Member `inertia` -#include "geometry_msgs/msg/detail/inertia__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_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; - geometry_msgs__msg__InertiaStamped__init(message_memory); -} - -void InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__InertiaStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__InertiaStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "inertia", // 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(geometry_msgs__msg__InertiaStamped, inertia), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_members = { - "geometry_msgs__msg", // message namespace - "InertiaStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__InertiaStamped), - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array, // message members - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_init_function, // function to initialize message memory (memory has to be allocated) - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_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 InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle = { - 0, - &InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, InertiaStamped)() { - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Inertia)(); - if (!InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle.typesupport_identifier) { - InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InertiaStamped__rosidl_typesupport_introspection_c__InertiaStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.h b/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.h deleted file mode 100644 index 488319b38..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__struct.h +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from geometry_msgs:msg/Point32.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ -#define GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Point32 in the package geometry_msgs. -typedef struct geometry_msgs__msg__Point32 -{ - float x; - float y; - float z; -} geometry_msgs__msg__Point32; - -// Struct for a sequence of geometry_msgs__msg__Point32. -typedef struct geometry_msgs__msg__Point32__Sequence -{ - geometry_msgs__msg__Point32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} geometry_msgs__msg__Point32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__traits.hpp deleted file mode 100644 index d9436121b..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Point32.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/point32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Point32"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Point32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.c deleted file mode 100644 index 1ec1e945d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point32__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Point32.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/point32__functions.h" -#include "geometry_msgs/msg/detail/point32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Point32__rosidl_typesupport_introspection_c__Point32_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; - geometry_msgs__msg__Point32__init(message_memory); -} - -void Point32__rosidl_typesupport_introspection_c__Point32_fini_function(void * message_memory) -{ - geometry_msgs__msg__Point32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Point32__rosidl_typesupport_introspection_c__Point32_message_member_array[3] = { - { - "x", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__Point32, x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__Point32, y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "z", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__Point32, z), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Point32__rosidl_typesupport_introspection_c__Point32_message_members = { - "geometry_msgs__msg", // message namespace - "Point32", // message name - 3, // number of fields - sizeof(geometry_msgs__msg__Point32), - Point32__rosidl_typesupport_introspection_c__Point32_message_member_array, // message members - Point32__rosidl_typesupport_introspection_c__Point32_init_function, // function to initialize message memory (memory has to be allocated) - Point32__rosidl_typesupport_introspection_c__Point32_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 Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle = { - 0, - &Point32__rosidl_typesupport_introspection_c__Point32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)() { - if (!Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle.typesupport_identifier) { - Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Point32__rosidl_typesupport_introspection_c__Point32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/point__traits.hpp deleted file mode 100644 index 92a8affc2..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Point.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/point__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Point"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Point"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.c deleted file mode 100644 index 7f08d7f02..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Point.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/point__functions.h" -#include "geometry_msgs/msg/detail/point__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Point__rosidl_typesupport_introspection_c__Point_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; - geometry_msgs__msg__Point__init(message_memory); -} - -void Point__rosidl_typesupport_introspection_c__Point_fini_function(void * message_memory) -{ - geometry_msgs__msg__Point__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Point__rosidl_typesupport_introspection_c__Point_message_member_array[3] = { - { - "x", // 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(geometry_msgs__msg__Point, x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y", // 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(geometry_msgs__msg__Point, y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "z", // 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(geometry_msgs__msg__Point, z), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Point__rosidl_typesupport_introspection_c__Point_message_members = { - "geometry_msgs__msg", // message namespace - "Point", // message name - 3, // number of fields - sizeof(geometry_msgs__msg__Point), - Point__rosidl_typesupport_introspection_c__Point_message_member_array, // message members - Point__rosidl_typesupport_introspection_c__Point_init_function, // function to initialize message memory (memory has to be allocated) - Point__rosidl_typesupport_introspection_c__Point_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 Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle = { - 0, - &Point__rosidl_typesupport_introspection_c__Point_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)() { - if (!Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle.typesupport_identifier) { - Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Point__rosidl_typesupport_introspection_c__Point_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__traits.hpp deleted file mode 100644 index 8a06e25b8..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PointStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/point_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'point' -#include "geometry_msgs/msg/detail/point__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PointStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PointStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POINT_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.c deleted file mode 100644 index c863deffe..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/point_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PointStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/point_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/point_stamped__functions.h" -#include "geometry_msgs/msg/detail/point_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `point` -#include "geometry_msgs/msg/point.h" -// Member `point` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PointStamped__rosidl_typesupport_introspection_c__PointStamped_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; - geometry_msgs__msg__PointStamped__init(message_memory); -} - -void PointStamped__rosidl_typesupport_introspection_c__PointStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__PointStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__PointStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "point", // 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(geometry_msgs__msg__PointStamped, point), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_members = { - "geometry_msgs__msg", // message namespace - "PointStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PointStamped), - PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array, // message members - PointStamped__rosidl_typesupport_introspection_c__PointStamped_init_function, // function to initialize message memory (memory has to be allocated) - PointStamped__rosidl_typesupport_introspection_c__PointStamped_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 PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle = { - 0, - &PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PointStamped)() { - PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - if (!PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle.typesupport_identifier) { - PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PointStamped__rosidl_typesupport_introspection_c__PointStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__traits.hpp deleted file mode 100644 index a9d4cad2d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Polygon.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/polygon__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Polygon"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Polygon"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.c deleted file mode 100644 index 639b92b9f..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Polygon.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/polygon__functions.h" -#include "geometry_msgs/msg/detail/polygon__struct.h" - - -// Include directives for member types -// Member `points` -#include "geometry_msgs/msg/point32.h" -// Member `points` -#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Polygon__rosidl_typesupport_introspection_c__Polygon_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; - geometry_msgs__msg__Polygon__init(message_memory); -} - -void Polygon__rosidl_typesupport_introspection_c__Polygon_fini_function(void * message_memory) -{ - geometry_msgs__msg__Polygon__fini(message_memory); -} - -size_t Polygon__rosidl_typesupport_introspection_c__size_function__Point32__points( - const void * untyped_member) -{ - const geometry_msgs__msg__Point32__Sequence * member = - (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return member->size; -} - -const void * Polygon__rosidl_typesupport_introspection_c__get_const_function__Point32__points( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point32__Sequence * member = - (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Polygon__rosidl_typesupport_introspection_c__get_function__Point32__points( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point32__Sequence * member = - (geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Polygon__rosidl_typesupport_introspection_c__resize_function__Point32__points( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point32__Sequence * member = - (geometry_msgs__msg__Point32__Sequence *)(untyped_member); - geometry_msgs__msg__Point32__Sequence__fini(member); - return geometry_msgs__msg__Point32__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array[1] = { - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__Polygon, points), // bytes offset in struct - NULL, // default value - Polygon__rosidl_typesupport_introspection_c__size_function__Point32__points, // size() function pointer - Polygon__rosidl_typesupport_introspection_c__get_const_function__Point32__points, // get_const(index) function pointer - Polygon__rosidl_typesupport_introspection_c__get_function__Point32__points, // get(index) function pointer - Polygon__rosidl_typesupport_introspection_c__resize_function__Point32__points // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Polygon__rosidl_typesupport_introspection_c__Polygon_message_members = { - "geometry_msgs__msg", // message namespace - "Polygon", // message name - 1, // number of fields - sizeof(geometry_msgs__msg__Polygon), - Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array, // message members - Polygon__rosidl_typesupport_introspection_c__Polygon_init_function, // function to initialize message memory (memory has to be allocated) - Polygon__rosidl_typesupport_introspection_c__Polygon_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 Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle = { - 0, - &Polygon__rosidl_typesupport_introspection_c__Polygon_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Polygon)() { - Polygon__rosidl_typesupport_introspection_c__Polygon_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)(); - if (!Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle.typesupport_identifier) { - Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Polygon__rosidl_typesupport_introspection_c__Polygon_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__traits.hpp deleted file mode 100644 index ecc4e7c5d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PolygonStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/polygon_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'polygon' -#include "geometry_msgs/msg/detail/polygon__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PolygonStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PolygonStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POLYGON_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.c deleted file mode 100644 index 04e9e0936..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/polygon_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PolygonStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/polygon_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/polygon_stamped__functions.h" -#include "geometry_msgs/msg/detail/polygon_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `polygon` -#include "geometry_msgs/msg/polygon.h" -// Member `polygon` -#include "geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_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; - geometry_msgs__msg__PolygonStamped__init(message_memory); -} - -void PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__PolygonStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__PolygonStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "polygon", // 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(geometry_msgs__msg__PolygonStamped, polygon), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_members = { - "geometry_msgs__msg", // message namespace - "PolygonStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PolygonStamped), - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array, // message members - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_init_function, // function to initialize message memory (memory has to be allocated) - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_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 PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle = { - 0, - &PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PolygonStamped)() { - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Polygon)(); - if (!PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle.typesupport_identifier) { - PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PolygonStamped__rosidl_typesupport_introspection_c__PolygonStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.h b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.h deleted file mode 100644 index 4bad1c7a8..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__struct.h +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from geometry_msgs:msg/Pose2D.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Pose2D in the package geometry_msgs. -typedef struct geometry_msgs__msg__Pose2D -{ - double x; - double y; - double theta; -} geometry_msgs__msg__Pose2D; - -// Struct for a sequence of geometry_msgs__msg__Pose2D. -typedef struct geometry_msgs__msg__Pose2D__Sequence -{ - geometry_msgs__msg__Pose2D * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} geometry_msgs__msg__Pose2D__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__traits.hpp deleted file mode 100644 index 839aba80f..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Pose2D.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose2_d__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Pose2D"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Pose2D"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE2_D__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.c deleted file mode 100644 index 43ba932dd..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose2_d__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Pose2D.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose2_d__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose2_d__functions.h" -#include "geometry_msgs/msg/detail/pose2_d__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Pose2D__rosidl_typesupport_introspection_c__Pose2D_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; - geometry_msgs__msg__Pose2D__init(message_memory); -} - -void Pose2D__rosidl_typesupport_introspection_c__Pose2D_fini_function(void * message_memory) -{ - geometry_msgs__msg__Pose2D__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_member_array[3] = { - { - "x", // 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(geometry_msgs__msg__Pose2D, x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y", // 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(geometry_msgs__msg__Pose2D, y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "theta", // 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(geometry_msgs__msg__Pose2D, theta), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_members = { - "geometry_msgs__msg", // message namespace - "Pose2D", // message name - 3, // number of fields - sizeof(geometry_msgs__msg__Pose2D), - Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_member_array, // message members - Pose2D__rosidl_typesupport_introspection_c__Pose2D_init_function, // function to initialize message memory (memory has to be allocated) - Pose2D__rosidl_typesupport_introspection_c__Pose2D_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 Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle = { - 0, - &Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose2D)() { - if (!Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle.typesupport_identifier) { - Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Pose2D__rosidl_typesupport_introspection_c__Pose2D_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__traits.hpp deleted file mode 100644 index f94dd9bcd..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Pose.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'position' -#include "geometry_msgs/msg/detail/point__traits.hpp" -// Member 'orientation' -#include "geometry_msgs/msg/detail/quaternion__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Pose"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Pose"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.c deleted file mode 100644 index c4dc8b5d8..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Pose.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose__functions.h" -#include "geometry_msgs/msg/detail/pose__struct.h" - - -// Include directives for member types -// Member `position` -#include "geometry_msgs/msg/point.h" -// Member `position` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" -// Member `orientation` -#include "geometry_msgs/msg/quaternion.h" -// Member `orientation` -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Pose__rosidl_typesupport_introspection_c__Pose_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; - geometry_msgs__msg__Pose__init(message_memory); -} - -void Pose__rosidl_typesupport_introspection_c__Pose_fini_function(void * message_memory) -{ - geometry_msgs__msg__Pose__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[2] = { - { - "position", // 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(geometry_msgs__msg__Pose, position), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "orientation", // 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(geometry_msgs__msg__Pose, orientation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Pose__rosidl_typesupport_introspection_c__Pose_message_members = { - "geometry_msgs__msg", // message namespace - "Pose", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Pose), - Pose__rosidl_typesupport_introspection_c__Pose_message_member_array, // message members - Pose__rosidl_typesupport_introspection_c__Pose_init_function, // function to initialize message memory (memory has to be allocated) - Pose__rosidl_typesupport_introspection_c__Pose_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 Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle = { - 0, - &Pose__rosidl_typesupport_introspection_c__Pose_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)() { - Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - Pose__rosidl_typesupport_introspection_c__Pose_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); - if (!Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle.typesupport_identifier) { - Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Pose__rosidl_typesupport_introspection_c__Pose_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__traits.hpp deleted file mode 100644 index 4b84a231d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PoseArray.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PoseArray"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PoseArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.c deleted file mode 100644 index d5176d8e4..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_array__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PoseArray.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose_array__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_array__functions.h" -#include "geometry_msgs/msg/detail/pose_array__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `poses` -#include "geometry_msgs/msg/pose.h" -// Member `poses` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PoseArray__rosidl_typesupport_introspection_c__PoseArray_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; - geometry_msgs__msg__PoseArray__init(message_memory); -} - -void PoseArray__rosidl_typesupport_introspection_c__PoseArray_fini_function(void * message_memory) -{ - geometry_msgs__msg__PoseArray__fini(message_memory); -} - -size_t PoseArray__rosidl_typesupport_introspection_c__size_function__Pose__poses( - const void * untyped_member) -{ - const geometry_msgs__msg__Pose__Sequence * member = - (const geometry_msgs__msg__Pose__Sequence *)(untyped_member); - return member->size; -} - -const void * PoseArray__rosidl_typesupport_introspection_c__get_const_function__Pose__poses( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Pose__Sequence * member = - (const geometry_msgs__msg__Pose__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * PoseArray__rosidl_typesupport_introspection_c__get_function__Pose__poses( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Pose__Sequence * member = - (geometry_msgs__msg__Pose__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool PoseArray__rosidl_typesupport_introspection_c__resize_function__Pose__poses( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Pose__Sequence * member = - (geometry_msgs__msg__Pose__Sequence *)(untyped_member); - geometry_msgs__msg__Pose__Sequence__fini(member); - return geometry_msgs__msg__Pose__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__PoseArray, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "poses", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__PoseArray, poses), // bytes offset in struct - NULL, // default value - PoseArray__rosidl_typesupport_introspection_c__size_function__Pose__poses, // size() function pointer - PoseArray__rosidl_typesupport_introspection_c__get_const_function__Pose__poses, // get_const(index) function pointer - PoseArray__rosidl_typesupport_introspection_c__get_function__Pose__poses, // get(index) function pointer - PoseArray__rosidl_typesupport_introspection_c__resize_function__Pose__poses // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_members = { - "geometry_msgs__msg", // message namespace - "PoseArray", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PoseArray), - PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array, // message members - PoseArray__rosidl_typesupport_introspection_c__PoseArray_init_function, // function to initialize message memory (memory has to be allocated) - PoseArray__rosidl_typesupport_introspection_c__PoseArray_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 PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle = { - 0, - &PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseArray)() { - PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle.typesupport_identifier) { - PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PoseArray__rosidl_typesupport_introspection_c__PoseArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__traits.hpp deleted file mode 100644 index 058b4f4ff..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PoseStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PoseStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PoseStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.c deleted file mode 100644 index 798d97789..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PoseStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_stamped__functions.h" -#include "geometry_msgs/msg/detail/pose_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_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; - geometry_msgs__msg__PoseStamped__init(message_memory); -} - -void PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__PoseStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__PoseStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(geometry_msgs__msg__PoseStamped, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_members = { - "geometry_msgs__msg", // message namespace - "PoseStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PoseStamped), - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array, // message members - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_init_function, // function to initialize message memory (memory has to be allocated) - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_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 PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle = { - 0, - &PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)() { - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle.typesupport_identifier) { - PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PoseStamped__rosidl_typesupport_introspection_c__PoseStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp deleted file mode 100644 index b3f6d77e1..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PoseWithCovariance.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose_with_covariance__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PoseWithCovariance"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PoseWithCovariance"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.c deleted file mode 100644 index ad5d89d00..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance__type_support.c +++ /dev/null @@ -1,104 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PoseWithCovariance.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_with_covariance__functions.h" -#include "geometry_msgs/msg/detail/pose_with_covariance__struct.h" - - -// Include directives for member types -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_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; - geometry_msgs__msg__PoseWithCovariance__init(message_memory); -} - -void PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_fini_function(void * message_memory) -{ - geometry_msgs__msg__PoseWithCovariance__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array[2] = { - { - "pose", // 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(geometry_msgs__msg__PoseWithCovariance, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 36, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__PoseWithCovariance, covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_members = { - "geometry_msgs__msg", // message namespace - "PoseWithCovariance", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PoseWithCovariance), - PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array, // message members - PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) - PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_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 PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle = { - 0, - &PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)() { - PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle.typesupport_identifier) { - PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PoseWithCovariance__rosidl_typesupport_introspection_c__PoseWithCovariance_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp deleted file mode 100644 index e22bd6aef..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/PoseWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose_with_covariance__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::PoseWithCovarianceStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/PoseWithCovarianceStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__POSE_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c deleted file mode 100644 index 89d31b883..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/pose_with_covariance_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/PoseWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/pose_with_covariance_stamped__functions.h" -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `pose` -#include "geometry_msgs/msg/pose_with_covariance.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_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; - geometry_msgs__msg__PoseWithCovarianceStamped__init(message_memory); -} - -void PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__PoseWithCovarianceStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__PoseWithCovarianceStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(geometry_msgs__msg__PoseWithCovarianceStamped, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_members = { - "geometry_msgs__msg", // message namespace - "PoseWithCovarianceStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__PoseWithCovarianceStamped), - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array, // message members - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_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 PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle = { - 0, - &PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovarianceStamped)() { - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)(); - if (!PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { - PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PoseWithCovarianceStamped__rosidl_typesupport_introspection_c__PoseWithCovarianceStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__traits.hpp deleted file mode 100644 index 5f4f0e562..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Quaternion.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/quaternion__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Quaternion"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Quaternion"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.c deleted file mode 100644 index 9902b00b2..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion__type_support.c +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Quaternion.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/quaternion__functions.h" -#include "geometry_msgs/msg/detail/quaternion__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Quaternion__rosidl_typesupport_introspection_c__Quaternion_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; - geometry_msgs__msg__Quaternion__init(message_memory); -} - -void Quaternion__rosidl_typesupport_introspection_c__Quaternion_fini_function(void * message_memory) -{ - geometry_msgs__msg__Quaternion__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_member_array[4] = { - { - "x", // 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(geometry_msgs__msg__Quaternion, x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y", // 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(geometry_msgs__msg__Quaternion, y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "z", // 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(geometry_msgs__msg__Quaternion, z), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "w", // 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(geometry_msgs__msg__Quaternion, w), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_members = { - "geometry_msgs__msg", // message namespace - "Quaternion", // message name - 4, // number of fields - sizeof(geometry_msgs__msg__Quaternion), - Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_member_array, // message members - Quaternion__rosidl_typesupport_introspection_c__Quaternion_init_function, // function to initialize message memory (memory has to be allocated) - Quaternion__rosidl_typesupport_introspection_c__Quaternion_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 Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle = { - 0, - &Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)() { - if (!Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle.typesupport_identifier) { - Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Quaternion__rosidl_typesupport_introspection_c__Quaternion_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp deleted file mode 100644 index 7120407ad..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/QuaternionStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/quaternion_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'quaternion' -#include "geometry_msgs/msg/detail/quaternion__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::QuaternionStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/QuaternionStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__QUATERNION_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.c deleted file mode 100644 index 9c7b477d5..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/quaternion_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/QuaternionStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/quaternion_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/quaternion_stamped__functions.h" -#include "geometry_msgs/msg/detail/quaternion_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `quaternion` -#include "geometry_msgs/msg/quaternion.h" -// Member `quaternion` -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_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; - geometry_msgs__msg__QuaternionStamped__init(message_memory); -} - -void QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__QuaternionStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__QuaternionStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "quaternion", // 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(geometry_msgs__msg__QuaternionStamped, quaternion), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_members = { - "geometry_msgs__msg", // message namespace - "QuaternionStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__QuaternionStamped), - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array, // message members - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_init_function, // function to initialize message memory (memory has to be allocated) - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_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 QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle = { - 0, - &QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, QuaternionStamped)() { - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); - if (!QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle.typesupport_identifier) { - QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &QuaternionStamped__rosidl_typesupport_introspection_c__QuaternionStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__traits.hpp deleted file mode 100644 index d95dc270b..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Transform.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/transform__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'translation' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" -// Member 'rotation' -#include "geometry_msgs/msg/detail/quaternion__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Transform"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Transform"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.c deleted file mode 100644 index eed8a85fa..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Transform.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/transform__functions.h" -#include "geometry_msgs/msg/detail/transform__struct.h" - - -// Include directives for member types -// Member `translation` -#include "geometry_msgs/msg/vector3.h" -// Member `translation` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" -// Member `rotation` -#include "geometry_msgs/msg/quaternion.h" -// Member `rotation` -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Transform__rosidl_typesupport_introspection_c__Transform_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; - geometry_msgs__msg__Transform__init(message_memory); -} - -void Transform__rosidl_typesupport_introspection_c__Transform_fini_function(void * message_memory) -{ - geometry_msgs__msg__Transform__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[2] = { - { - "translation", // 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(geometry_msgs__msg__Transform, translation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "rotation", // 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(geometry_msgs__msg__Transform, rotation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Transform__rosidl_typesupport_introspection_c__Transform_message_members = { - "geometry_msgs__msg", // message namespace - "Transform", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Transform), - Transform__rosidl_typesupport_introspection_c__Transform_message_member_array, // message members - Transform__rosidl_typesupport_introspection_c__Transform_init_function, // function to initialize message memory (memory has to be allocated) - Transform__rosidl_typesupport_introspection_c__Transform_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 Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle = { - 0, - &Transform__rosidl_typesupport_introspection_c__Transform_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)() { - Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Transform__rosidl_typesupport_introspection_c__Transform_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); - if (!Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle.typesupport_identifier) { - Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Transform__rosidl_typesupport_introspection_c__Transform_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.h b/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.h deleted file mode 100644 index 3b9db8283..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from geometry_msgs:msg/TransformStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ -#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'child_frame_id' -#include "rosidl_runtime_c/string.h" -// Member 'transform' -#include "geometry_msgs/msg/detail/transform__struct.h" - -// Struct defined in msg/TransformStamped in the package geometry_msgs. -typedef struct geometry_msgs__msg__TransformStamped -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String child_frame_id; - geometry_msgs__msg__Transform transform; -} geometry_msgs__msg__TransformStamped; - -// Struct for a sequence of geometry_msgs__msg__TransformStamped. -typedef struct geometry_msgs__msg__TransformStamped__Sequence -{ - geometry_msgs__msg__TransformStamped * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} geometry_msgs__msg__TransformStamped__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__STRUCT_H_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__traits.hpp deleted file mode 100644 index 2b3fd0fc6..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/TransformStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/transform_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'transform' -#include "geometry_msgs/msg/detail/transform__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::TransformStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/TransformStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TRANSFORM_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.c deleted file mode 100644 index d7637b4cf..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/transform_stamped__type_support.c +++ /dev/null @@ -1,127 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/TransformStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/transform_stamped__functions.h" -#include "geometry_msgs/msg/detail/transform_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `child_frame_id` -#include "rosidl_runtime_c/string_functions.h" -// Member `transform` -#include "geometry_msgs/msg/transform.h" -// Member `transform` -#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_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; - geometry_msgs__msg__TransformStamped__init(message_memory); -} - -void TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__TransformStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[3] = { - { - "header", // 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(geometry_msgs__msg__TransformStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "child_frame_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__TransformStamped, child_frame_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "transform", // 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(geometry_msgs__msg__TransformStamped, transform), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_members = { - "geometry_msgs__msg", // message namespace - "TransformStamped", // message name - 3, // number of fields - sizeof(geometry_msgs__msg__TransformStamped), - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array, // message members - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_init_function, // function to initialize message memory (memory has to be allocated) - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_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 TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle = { - 0, - &TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)() { - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); - if (!TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle.typesupport_identifier) { - TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TransformStamped__rosidl_typesupport_introspection_c__TransformStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__traits.hpp deleted file mode 100644 index 7cc86e4f3..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__traits.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Twist.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/twist__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'linear' -// Member 'angular' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Twist"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Twist"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.c deleted file mode 100644 index 6f2063683..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist__type_support.c +++ /dev/null @@ -1,108 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Twist.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist__functions.h" -#include "geometry_msgs/msg/detail/twist__struct.h" - - -// Include directives for member types -// Member `linear` -// Member `angular` -#include "geometry_msgs/msg/vector3.h" -// Member `linear` -// Member `angular` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Twist__rosidl_typesupport_introspection_c__Twist_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; - geometry_msgs__msg__Twist__init(message_memory); -} - -void Twist__rosidl_typesupport_introspection_c__Twist_fini_function(void * message_memory) -{ - geometry_msgs__msg__Twist__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[2] = { - { - "linear", // 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(geometry_msgs__msg__Twist, linear), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angular", // 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(geometry_msgs__msg__Twist, angular), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Twist__rosidl_typesupport_introspection_c__Twist_message_members = { - "geometry_msgs__msg", // message namespace - "Twist", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Twist), - Twist__rosidl_typesupport_introspection_c__Twist_message_member_array, // message members - Twist__rosidl_typesupport_introspection_c__Twist_init_function, // function to initialize message memory (memory has to be allocated) - Twist__rosidl_typesupport_introspection_c__Twist_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 Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle = { - 0, - &Twist__rosidl_typesupport_introspection_c__Twist_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)() { - Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Twist__rosidl_typesupport_introspection_c__Twist_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle.typesupport_identifier) { - Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Twist__rosidl_typesupport_introspection_c__Twist_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__traits.hpp deleted file mode 100644 index 99679e70b..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/TwistStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/twist_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::TwistStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/TwistStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.c deleted file mode 100644 index 96f8b67ae..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/TwistStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/twist_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_stamped__functions.h" -#include "geometry_msgs/msg/detail/twist_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `twist` -#include "geometry_msgs/msg/twist.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_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; - geometry_msgs__msg__TwistStamped__init(message_memory); -} - -void TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__TwistStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__TwistStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "twist", // 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(geometry_msgs__msg__TwistStamped, twist), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_members = { - "geometry_msgs__msg", // message namespace - "TwistStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__TwistStamped), - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array, // message members - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_init_function, // function to initialize message memory (memory has to be allocated) - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_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 TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle = { - 0, - &TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistStamped)() { - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - if (!TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle.typesupport_identifier) { - TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TwistStamped__rosidl_typesupport_introspection_c__TwistStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp deleted file mode 100644 index f99783d2d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/TwistWithCovariance.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/twist_with_covariance__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'twist' -#include "geometry_msgs/msg/detail/twist__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::TwistWithCovariance"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/TwistWithCovariance"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.c deleted file mode 100644 index dc3fd2ab5..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance__type_support.c +++ /dev/null @@ -1,104 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/TwistWithCovariance.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_with_covariance__functions.h" -#include "geometry_msgs/msg/detail/twist_with_covariance__struct.h" - - -// Include directives for member types -// Member `twist` -#include "geometry_msgs/msg/twist.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_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; - geometry_msgs__msg__TwistWithCovariance__init(message_memory); -} - -void TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_fini_function(void * message_memory) -{ - geometry_msgs__msg__TwistWithCovariance__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array[2] = { - { - "twist", // 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(geometry_msgs__msg__TwistWithCovariance, twist), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 36, // array size - false, // is upper bound - offsetof(geometry_msgs__msg__TwistWithCovariance, covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_members = { - "geometry_msgs__msg", // message namespace - "TwistWithCovariance", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__TwistWithCovariance), - TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array, // message members - TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_init_function, // function to initialize message memory (memory has to be allocated) - TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_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 TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle = { - 0, - &TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)() { - TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - if (!TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle.typesupport_identifier) { - TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TwistWithCovariance__rosidl_typesupport_introspection_c__TwistWithCovariance_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp deleted file mode 100644 index 98a56b702..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist_with_covariance__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::TwistWithCovarianceStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/TwistWithCovarianceStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c deleted file mode 100644 index 9e9c64dbc..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/twist_with_covariance_stamped__functions.h" -#include "geometry_msgs/msg/detail/twist_with_covariance_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `twist` -#include "geometry_msgs/msg/twist_with_covariance.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_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; - geometry_msgs__msg__TwistWithCovarianceStamped__init(message_memory); -} - -void TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__TwistWithCovarianceStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__TwistWithCovarianceStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "twist", // 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(geometry_msgs__msg__TwistWithCovarianceStamped, twist), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_members = { - "geometry_msgs__msg", // message namespace - "TwistWithCovarianceStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__TwistWithCovarianceStamped), - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array, // message members - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_init_function, // function to initialize message memory (memory has to be allocated) - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_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 TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle = { - 0, - &TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovarianceStamped)() { - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)(); - if (!TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle.typesupport_identifier) { - TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TwistWithCovarianceStamped__rosidl_typesupport_introspection_c__TwistWithCovarianceStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__traits.hpp deleted file mode 100644 index 471dfa6f2..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Vector3.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/vector3__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Vector3"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Vector3"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.c deleted file mode 100644 index cc5b7f93f..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Vector3.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/vector3__functions.h" -#include "geometry_msgs/msg/detail/vector3__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Vector3__rosidl_typesupport_introspection_c__Vector3_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; - geometry_msgs__msg__Vector3__init(message_memory); -} - -void Vector3__rosidl_typesupport_introspection_c__Vector3_fini_function(void * message_memory) -{ - geometry_msgs__msg__Vector3__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Vector3__rosidl_typesupport_introspection_c__Vector3_message_member_array[3] = { - { - "x", // 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(geometry_msgs__msg__Vector3, x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y", // 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(geometry_msgs__msg__Vector3, y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "z", // 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(geometry_msgs__msg__Vector3, z), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Vector3__rosidl_typesupport_introspection_c__Vector3_message_members = { - "geometry_msgs__msg", // message namespace - "Vector3", // message name - 3, // number of fields - sizeof(geometry_msgs__msg__Vector3), - Vector3__rosidl_typesupport_introspection_c__Vector3_message_member_array, // message members - Vector3__rosidl_typesupport_introspection_c__Vector3_init_function, // function to initialize message memory (memory has to be allocated) - Vector3__rosidl_typesupport_introspection_c__Vector3_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 Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle = { - 0, - &Vector3__rosidl_typesupport_introspection_c__Vector3_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)() { - if (!Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle.typesupport_identifier) { - Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Vector3__rosidl_typesupport_introspection_c__Vector3_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__traits.hpp deleted file mode 100644 index 19f902b22..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Vector3Stamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/vector3_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'vector' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Vector3Stamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Vector3Stamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__VECTOR3_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.c deleted file mode 100644 index 8c86ca30e..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/vector3_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Vector3Stamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/vector3_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/vector3_stamped__functions.h" -#include "geometry_msgs/msg/detail/vector3_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `vector` -#include "geometry_msgs/msg/vector3.h" -// Member `vector` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_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; - geometry_msgs__msg__Vector3Stamped__init(message_memory); -} - -void Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__Vector3Stamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__Vector3Stamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "vector", // 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(geometry_msgs__msg__Vector3Stamped, vector), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_members = { - "geometry_msgs__msg", // message namespace - "Vector3Stamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Vector3Stamped), - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array, // message members - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_init_function, // function to initialize message memory (memory has to be allocated) - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_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 Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle = { - 0, - &Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3Stamped)() { - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle.typesupport_identifier) { - Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Vector3Stamped__rosidl_typesupport_introspection_c__Vector3Stamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__traits.hpp deleted file mode 100644 index 8dafc131d..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__traits.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/Wrench.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/wrench__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'force' -// Member 'torque' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::Wrench"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/Wrench"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.c deleted file mode 100644 index c1edaab66..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench__type_support.c +++ /dev/null @@ -1,108 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/Wrench.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/wrench__functions.h" -#include "geometry_msgs/msg/detail/wrench__struct.h" - - -// Include directives for member types -// Member `force` -// Member `torque` -#include "geometry_msgs/msg/vector3.h" -// Member `force` -// Member `torque` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Wrench__rosidl_typesupport_introspection_c__Wrench_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; - geometry_msgs__msg__Wrench__init(message_memory); -} - -void Wrench__rosidl_typesupport_introspection_c__Wrench_fini_function(void * message_memory) -{ - geometry_msgs__msg__Wrench__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[2] = { - { - "force", // 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(geometry_msgs__msg__Wrench, force), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "torque", // 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(geometry_msgs__msg__Wrench, torque), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Wrench__rosidl_typesupport_introspection_c__Wrench_message_members = { - "geometry_msgs__msg", // message namespace - "Wrench", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__Wrench), - Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array, // message members - Wrench__rosidl_typesupport_introspection_c__Wrench_init_function, // function to initialize message memory (memory has to be allocated) - Wrench__rosidl_typesupport_introspection_c__Wrench_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 Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle = { - 0, - &Wrench__rosidl_typesupport_introspection_c__Wrench_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)() { - Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Wrench__rosidl_typesupport_introspection_c__Wrench_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle.typesupport_identifier) { - Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Wrench__rosidl_typesupport_introspection_c__Wrench_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__traits.hpp b/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__traits.hpp deleted file mode 100644 index 8d3ae42ce..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from geometry_msgs:msg/WrenchStamped.idl -// generated code does not contain a copyright notice - -#ifndef GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ -#define GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ - -#include "geometry_msgs/msg/detail/wrench_stamped__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'wrench' -#include "geometry_msgs/msg/detail/wrench__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "geometry_msgs::msg::WrenchStamped"; -} - -template<> -inline const char * name() -{ - return "geometry_msgs/msg/WrenchStamped"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // GEOMETRY_MSGS__MSG__DETAIL__WRENCH_STAMPED__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.c b/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.c deleted file mode 100644 index a8e67b530..000000000 --- a/ThirdParty/ros/include/geometry_msgs/msg/detail/wrench_stamped__type_support.c +++ /dev/null @@ -1,110 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from geometry_msgs:msg/WrenchStamped.idl -// generated code does not contain a copyright notice - -#include -#include "geometry_msgs/msg/detail/wrench_stamped__rosidl_typesupport_introspection_c.h" -#include "geometry_msgs/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 "geometry_msgs/msg/detail/wrench_stamped__functions.h" -#include "geometry_msgs/msg/detail/wrench_stamped__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `wrench` -#include "geometry_msgs/msg/wrench.h" -// Member `wrench` -#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_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; - geometry_msgs__msg__WrenchStamped__init(message_memory); -} - -void WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_fini_function(void * message_memory) -{ - geometry_msgs__msg__WrenchStamped__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[2] = { - { - "header", // 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(geometry_msgs__msg__WrenchStamped, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "wrench", // 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(geometry_msgs__msg__WrenchStamped, wrench), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_members = { - "geometry_msgs__msg", // message namespace - "WrenchStamped", // message name - 2, // number of fields - sizeof(geometry_msgs__msg__WrenchStamped), - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array, // message members - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_init_function, // function to initialize message memory (memory has to be allocated) - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_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 WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle = { - 0, - &WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_geometry_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, WrenchStamped)() { - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)(); - if (!WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle.typesupport_identifier) { - WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &WrenchStamped__rosidl_typesupport_introspection_c__WrenchStamped_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__builder.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__builder.hpp new file mode 100644 index 000000000..cdf0151a0 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__builder.hpp @@ -0,0 +1,136 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__BUILDER_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__BUILDER_HPP_ + +#include +#include + +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace guided_vr_interfaces +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Notification2D_polygon +{ +public: + explicit Init_Notification2D_polygon(::guided_vr_interfaces::msg::Notification2D & msg) + : msg_(msg) + {} + ::guided_vr_interfaces::msg::Notification2D polygon(::guided_vr_interfaces::msg::Notification2D::_polygon_type arg) + { + msg_.polygon = std::move(arg); + return std::move(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +class Init_Notification2D_id +{ +public: + explicit Init_Notification2D_id(::guided_vr_interfaces::msg::Notification2D & msg) + : msg_(msg) + {} + Init_Notification2D_polygon id(::guided_vr_interfaces::msg::Notification2D::_id_type arg) + { + msg_.id = std::move(arg); + return Init_Notification2D_polygon(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +class Init_Notification2D_stamp +{ +public: + explicit Init_Notification2D_stamp(::guided_vr_interfaces::msg::Notification2D & msg) + : msg_(msg) + {} + Init_Notification2D_id stamp(::guided_vr_interfaces::msg::Notification2D::_stamp_type arg) + { + msg_.stamp = std::move(arg); + return Init_Notification2D_id(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +class Init_Notification2D_level +{ +public: + explicit Init_Notification2D_level(::guided_vr_interfaces::msg::Notification2D & msg) + : msg_(msg) + {} + Init_Notification2D_stamp level(::guided_vr_interfaces::msg::Notification2D::_level_type arg) + { + msg_.level = std::move(arg); + return Init_Notification2D_stamp(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +class Init_Notification2D_desc +{ +public: + explicit Init_Notification2D_desc(::guided_vr_interfaces::msg::Notification2D & msg) + : msg_(msg) + {} + Init_Notification2D_level desc(::guided_vr_interfaces::msg::Notification2D::_desc_type arg) + { + msg_.desc = std::move(arg); + return Init_Notification2D_level(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +class Init_Notification2D_source +{ +public: + Init_Notification2D_source() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Notification2D_desc source(::guided_vr_interfaces::msg::Notification2D::_source_type arg) + { + msg_.source = std::move(arg); + return Init_Notification2D_desc(msg_); + } + +private: + ::guided_vr_interfaces::msg::Notification2D msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::guided_vr_interfaces::msg::Notification2D>() +{ + return guided_vr_interfaces::msg::builder::Init_Notification2D_source(); +} + +} // namespace guided_vr_interfaces + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.c b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.c new file mode 100644 index 000000000..309538183 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.c @@ -0,0 +1,342 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice +#include "guided_vr_interfaces/msg/detail/notification2_d__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `source` +// Member `desc` +#include "std_msgs/msg/detail/string__functions.h" +// Member `level` +#include "std_msgs/msg/detail/u_int8__functions.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__functions.h" +// Member `polygon` +#include "geometry_msgs/msg/detail/point__functions.h" + +bool +guided_vr_interfaces__msg__Notification2D__init(guided_vr_interfaces__msg__Notification2D * msg) +{ + if (!msg) { + return false; + } + // source + if (!std_msgs__msg__String__init(&msg->source)) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + return false; + } + // desc + if (!std_msgs__msg__String__init(&msg->desc)) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + return false; + } + // level + if (!std_msgs__msg__UInt8__init(&msg->level)) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + return false; + } + // stamp + if (!builtin_interfaces__msg__Time__init(&msg->stamp)) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + return false; + } + // id + // polygon + if (!geometry_msgs__msg__Point__Sequence__init(&msg->polygon, 0)) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + return false; + } + return true; +} + +void +guided_vr_interfaces__msg__Notification2D__fini(guided_vr_interfaces__msg__Notification2D * msg) +{ + if (!msg) { + return; + } + // source + std_msgs__msg__String__fini(&msg->source); + // desc + std_msgs__msg__String__fini(&msg->desc); + // level + std_msgs__msg__UInt8__fini(&msg->level); + // stamp + builtin_interfaces__msg__Time__fini(&msg->stamp); + // id + // polygon + geometry_msgs__msg__Point__Sequence__fini(&msg->polygon); +} + +bool +guided_vr_interfaces__msg__Notification2D__are_equal(const guided_vr_interfaces__msg__Notification2D * lhs, const guided_vr_interfaces__msg__Notification2D * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // source + if (!std_msgs__msg__String__are_equal( + &(lhs->source), &(rhs->source))) + { + return false; + } + // desc + if (!std_msgs__msg__String__are_equal( + &(lhs->desc), &(rhs->desc))) + { + return false; + } + // level + if (!std_msgs__msg__UInt8__are_equal( + &(lhs->level), &(rhs->level))) + { + return false; + } + // stamp + if (!builtin_interfaces__msg__Time__are_equal( + &(lhs->stamp), &(rhs->stamp))) + { + return false; + } + // id + if (lhs->id != rhs->id) { + return false; + } + // polygon + if (!geometry_msgs__msg__Point__Sequence__are_equal( + &(lhs->polygon), &(rhs->polygon))) + { + return false; + } + return true; +} + +bool +guided_vr_interfaces__msg__Notification2D__copy( + const guided_vr_interfaces__msg__Notification2D * input, + guided_vr_interfaces__msg__Notification2D * output) +{ + if (!input || !output) { + return false; + } + // source + if (!std_msgs__msg__String__copy( + &(input->source), &(output->source))) + { + return false; + } + // desc + if (!std_msgs__msg__String__copy( + &(input->desc), &(output->desc))) + { + return false; + } + // level + if (!std_msgs__msg__UInt8__copy( + &(input->level), &(output->level))) + { + return false; + } + // stamp + if (!builtin_interfaces__msg__Time__copy( + &(input->stamp), &(output->stamp))) + { + return false; + } + // id + output->id = input->id; + // polygon + if (!geometry_msgs__msg__Point__Sequence__copy( + &(input->polygon), &(output->polygon))) + { + return false; + } + return true; +} + +guided_vr_interfaces__msg__Notification2D * +guided_vr_interfaces__msg__Notification2D__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + guided_vr_interfaces__msg__Notification2D * msg = (guided_vr_interfaces__msg__Notification2D *)allocator.allocate(sizeof(guided_vr_interfaces__msg__Notification2D), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(guided_vr_interfaces__msg__Notification2D)); + bool success = guided_vr_interfaces__msg__Notification2D__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +guided_vr_interfaces__msg__Notification2D__destroy(guided_vr_interfaces__msg__Notification2D * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + guided_vr_interfaces__msg__Notification2D__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +guided_vr_interfaces__msg__Notification2D__Sequence__init(guided_vr_interfaces__msg__Notification2D__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + guided_vr_interfaces__msg__Notification2D * data = NULL; + + if (size) { + data = (guided_vr_interfaces__msg__Notification2D *)allocator.zero_allocate(size, sizeof(guided_vr_interfaces__msg__Notification2D), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = guided_vr_interfaces__msg__Notification2D__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + guided_vr_interfaces__msg__Notification2D__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +guided_vr_interfaces__msg__Notification2D__Sequence__fini(guided_vr_interfaces__msg__Notification2D__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) { + guided_vr_interfaces__msg__Notification2D__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); + } +} + +guided_vr_interfaces__msg__Notification2D__Sequence * +guided_vr_interfaces__msg__Notification2D__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + guided_vr_interfaces__msg__Notification2D__Sequence * array = (guided_vr_interfaces__msg__Notification2D__Sequence *)allocator.allocate(sizeof(guided_vr_interfaces__msg__Notification2D__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = guided_vr_interfaces__msg__Notification2D__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +guided_vr_interfaces__msg__Notification2D__Sequence__destroy(guided_vr_interfaces__msg__Notification2D__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + guided_vr_interfaces__msg__Notification2D__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +guided_vr_interfaces__msg__Notification2D__Sequence__are_equal(const guided_vr_interfaces__msg__Notification2D__Sequence * lhs, const guided_vr_interfaces__msg__Notification2D__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!guided_vr_interfaces__msg__Notification2D__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +guided_vr_interfaces__msg__Notification2D__Sequence__copy( + const guided_vr_interfaces__msg__Notification2D__Sequence * input, + guided_vr_interfaces__msg__Notification2D__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(guided_vr_interfaces__msg__Notification2D); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + guided_vr_interfaces__msg__Notification2D * data = + (guided_vr_interfaces__msg__Notification2D *)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 (!guided_vr_interfaces__msg__Notification2D__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; ) { + guided_vr_interfaces__msg__Notification2D__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!guided_vr_interfaces__msg__Notification2D__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.h new file mode 100644 index 000000000..9eddfc4f2 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__FUNCTIONS_H_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "guided_vr_interfaces/msg/rosidl_generator_c__visibility_control.h" + +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.h" + +/// Initialize msg/Notification2D 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( + * guided_vr_interfaces__msg__Notification2D + * )) before or use + * guided_vr_interfaces__msg__Notification2D__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__init(guided_vr_interfaces__msg__Notification2D * msg); + +/// Finalize msg/Notification2D message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces +void +guided_vr_interfaces__msg__Notification2D__fini(guided_vr_interfaces__msg__Notification2D * msg); + +/// Create msg/Notification2D message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * guided_vr_interfaces__msg__Notification2D__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces +guided_vr_interfaces__msg__Notification2D * +guided_vr_interfaces__msg__Notification2D__create(); + +/// Destroy msg/Notification2D message. +/** + * It calls + * guided_vr_interfaces__msg__Notification2D__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces +void +guided_vr_interfaces__msg__Notification2D__destroy(guided_vr_interfaces__msg__Notification2D * msg); + +/// Check for msg/Notification2D 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_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__are_equal(const guided_vr_interfaces__msg__Notification2D * lhs, const guided_vr_interfaces__msg__Notification2D * rhs); + +/// Copy a msg/Notification2D 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_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__copy( + const guided_vr_interfaces__msg__Notification2D * input, + guided_vr_interfaces__msg__Notification2D * output); + +/// Initialize array of msg/Notification2D messages. +/** + * It allocates the memory for the number of elements and calls + * guided_vr_interfaces__msg__Notification2D__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_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__Sequence__init(guided_vr_interfaces__msg__Notification2D__Sequence * array, size_t size); + +/// Finalize array of msg/Notification2D messages. +/** + * It calls + * guided_vr_interfaces__msg__Notification2D__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_guided_vr_interfaces +void +guided_vr_interfaces__msg__Notification2D__Sequence__fini(guided_vr_interfaces__msg__Notification2D__Sequence * array); + +/// Create array of msg/Notification2D messages. +/** + * It allocates the memory for the array and calls + * guided_vr_interfaces__msg__Notification2D__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_guided_vr_interfaces +guided_vr_interfaces__msg__Notification2D__Sequence * +guided_vr_interfaces__msg__Notification2D__Sequence__create(size_t size); + +/// Destroy array of msg/Notification2D messages. +/** + * It calls + * guided_vr_interfaces__msg__Notification2D__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces +void +guided_vr_interfaces__msg__Notification2D__Sequence__destroy(guided_vr_interfaces__msg__Notification2D__Sequence * array); + +/// Check for msg/Notification2D 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_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__Sequence__are_equal(const guided_vr_interfaces__msg__Notification2D__Sequence * lhs, const guided_vr_interfaces__msg__Notification2D__Sequence * rhs); + +/// Copy an array of msg/Notification2D 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_guided_vr_interfaces +bool +guided_vr_interfaces__msg__Notification2D__Sequence__copy( + const guided_vr_interfaces__msg__Notification2D__Sequence * input, + guided_vr_interfaces__msg__Notification2D__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..e4b312f99 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces +size_t get_serialized_size_guided_vr_interfaces__msg__Notification2D( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces +size_t max_serialized_size_guided_vr_interfaces__msg__Notification2D( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, guided_vr_interfaces, msg, Notification2D)(); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..44588e937 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "guided_vr_interfaces/msg/detail/notification2_d__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 guided_vr_interfaces +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces +cdr_serialize( + const guided_vr_interfaces::msg::Notification2D & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + guided_vr_interfaces::msg::Notification2D & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces +get_serialized_size( + const guided_vr_interfaces::msg::Notification2D & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces +max_serialized_size_Notification2D( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace guided_vr_interfaces + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, guided_vr_interfaces, msg, Notification2D)(); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..55454b76c --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__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 "guided_vr_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_guided_vr_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, guided_vr_interfaces, msg, Notification2D)(); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..7373d3db4 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__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, guided_vr_interfaces, msg, Notification2D)(); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.h new file mode 100644 index 000000000..0a8832949 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_H_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'source' +// Member 'desc' +#include "std_msgs/msg/detail/string__struct.h" +// Member 'level' +#include "std_msgs/msg/detail/u_int8__struct.h" +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__struct.h" +// Member 'polygon' +#include "geometry_msgs/msg/detail/point__struct.h" + +/// Struct defined in msg/Notification2D in the package guided_vr_interfaces. +typedef struct guided_vr_interfaces__msg__Notification2D +{ + std_msgs__msg__String source; + std_msgs__msg__String desc; + std_msgs__msg__UInt8 level; + builtin_interfaces__msg__Time stamp; + uint32_t id; + geometry_msgs__msg__Point__Sequence polygon; +} guided_vr_interfaces__msg__Notification2D; + +// Struct for a sequence of guided_vr_interfaces__msg__Notification2D. +typedef struct guided_vr_interfaces__msg__Notification2D__Sequence +{ + guided_vr_interfaces__msg__Notification2D * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} guided_vr_interfaces__msg__Notification2D__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.hpp new file mode 100644 index 000000000..7419edc5f --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__struct.hpp @@ -0,0 +1,209 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'source' +// Member 'desc' +#include "std_msgs/msg/detail/string__struct.hpp" +// Member 'level' +#include "std_msgs/msg/detail/u_int8__struct.hpp" +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__struct.hpp" +// Member 'polygon' +#include "geometry_msgs/msg/detail/point__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__guided_vr_interfaces__msg__Notification2D __attribute__((deprecated)) +#else +# define DEPRECATED__guided_vr_interfaces__msg__Notification2D __declspec(deprecated) +#endif + +namespace guided_vr_interfaces +{ + +namespace msg +{ + +// message struct +template +struct Notification2D_ +{ + using Type = Notification2D_; + + explicit Notification2D_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : source(_init), + desc(_init), + level(_init), + stamp(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ul; + } + } + + explicit Notification2D_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : source(_alloc, _init), + desc(_alloc, _init), + level(_alloc, _init), + stamp(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ul; + } + } + + // field types and members + using _source_type = + std_msgs::msg::String_; + _source_type source; + using _desc_type = + std_msgs::msg::String_; + _desc_type desc; + using _level_type = + std_msgs::msg::UInt8_; + _level_type level; + using _stamp_type = + builtin_interfaces::msg::Time_; + _stamp_type stamp; + using _id_type = + uint32_t; + _id_type id; + using _polygon_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _polygon_type polygon; + + // setters for named parameter idiom + Type & set__source( + const std_msgs::msg::String_ & _arg) + { + this->source = _arg; + return *this; + } + Type & set__desc( + const std_msgs::msg::String_ & _arg) + { + this->desc = _arg; + return *this; + } + Type & set__level( + const std_msgs::msg::UInt8_ & _arg) + { + this->level = _arg; + return *this; + } + Type & set__stamp( + const builtin_interfaces::msg::Time_ & _arg) + { + this->stamp = _arg; + return *this; + } + Type & set__id( + const uint32_t & _arg) + { + this->id = _arg; + return *this; + } + Type & set__polygon( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->polygon = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + guided_vr_interfaces::msg::Notification2D_ *; + using ConstRawPtr = + const guided_vr_interfaces::msg::Notification2D_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__guided_vr_interfaces__msg__Notification2D + std::shared_ptr> + Ptr; + typedef DEPRECATED__guided_vr_interfaces__msg__Notification2D + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Notification2D_ & other) const + { + if (this->source != other.source) { + return false; + } + if (this->desc != other.desc) { + return false; + } + if (this->level != other.level) { + return false; + } + if (this->stamp != other.stamp) { + return false; + } + if (this->id != other.id) { + return false; + } + if (this->polygon != other.polygon) { + return false; + } + return true; + } + bool operator!=(const Notification2D_ & other) const + { + return !this->operator==(other); + } +}; // struct Notification2D_ + +// alias to use template instance with default allocator +using Notification2D = + guided_vr_interfaces::msg::Notification2D_>; + +// constant definitions + +} // namespace msg + +} // namespace guided_vr_interfaces + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__traits.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__traits.hpp new file mode 100644 index 000000000..48eaad888 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__traits.hpp @@ -0,0 +1,221 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TRAITS_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'source' +// Member 'desc' +#include "std_msgs/msg/detail/string__traits.hpp" +// Member 'level' +#include "std_msgs/msg/detail/u_int8__traits.hpp" +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" +// Member 'polygon' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace guided_vr_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Notification2D & msg, + std::ostream & out) +{ + out << "{"; + // member: source + { + out << "source: "; + to_flow_style_yaml(msg.source, out); + out << ", "; + } + + // member: desc + { + out << "desc: "; + to_flow_style_yaml(msg.desc, out); + out << ", "; + } + + // member: level + { + out << "level: "; + to_flow_style_yaml(msg.level, out); + out << ", "; + } + + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + out << ", "; + } + + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: polygon + { + if (msg.polygon.size() == 0) { + out << "polygon: []"; + } else { + out << "polygon: ["; + size_t pending_items = msg.polygon.size(); + for (auto item : msg.polygon) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Notification2D & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: source + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "source:\n"; + to_block_style_yaml(msg.source, out, indentation + 2); + } + + // member: desc + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "desc:\n"; + to_block_style_yaml(msg.desc, out, indentation + 2); + } + + // member: level + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "level:\n"; + to_block_style_yaml(msg.level, out, indentation + 2); + } + + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } + + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: polygon + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.polygon.size() == 0) { + out << "polygon: []\n"; + } else { + out << "polygon:\n"; + for (auto item : msg.polygon) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Notification2D & 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 guided_vr_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use guided_vr_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const guided_vr_interfaces::msg::Notification2D & msg, + std::ostream & out, size_t indentation = 0) +{ + guided_vr_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use guided_vr_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const guided_vr_interfaces::msg::Notification2D & msg) +{ + return guided_vr_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "guided_vr_interfaces::msg::Notification2D"; +} + +template<> +inline const char * name() +{ + return "guided_vr_interfaces/msg/Notification2D"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.c b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.c new file mode 100644 index 000000000..4f023759d --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.c @@ -0,0 +1,253 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#include +#include "guided_vr_interfaces/msg/detail/notification2_d__rosidl_typesupport_introspection_c.h" +#include "guided_vr_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 "guided_vr_interfaces/msg/detail/notification2_d__functions.h" +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.h" + + +// Include directives for member types +// Member `source` +// Member `desc` +#include "std_msgs/msg/string.h" +// Member `source` +// Member `desc` +#include "std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h" +// Member `level` +#include "std_msgs/msg/u_int8.h" +// Member `level` +#include "std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h" +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `polygon` +#include "geometry_msgs/msg/point.h" +// Member `polygon` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_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; + guided_vr_interfaces__msg__Notification2D__init(message_memory); +} + +void guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_fini_function(void * message_memory) +{ + guided_vr_interfaces__msg__Notification2D__fini(message_memory); +} + +size_t guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__size_function__Notification2D__polygon( + const void * untyped_member) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return member->size; +} + +const void * guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_const_function__Notification2D__polygon( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_function__Notification2D__polygon( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__fetch_function__Notification2D__polygon( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point * item = + ((const geometry_msgs__msg__Point *) + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_const_function__Notification2D__polygon(untyped_member, index)); + geometry_msgs__msg__Point * value = + (geometry_msgs__msg__Point *)(untyped_value); + *value = *item; +} + +void guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__assign_function__Notification2D__polygon( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point * item = + ((geometry_msgs__msg__Point *) + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_function__Notification2D__polygon(untyped_member, index)); + const geometry_msgs__msg__Point * value = + (const geometry_msgs__msg__Point *)(untyped_value); + *item = *value; +} + +bool guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__resize_function__Notification2D__polygon( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + geometry_msgs__msg__Point__Sequence__fini(member); + return geometry_msgs__msg__Point__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[6] = { + { + "source", // 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(guided_vr_interfaces__msg__Notification2D, source), // 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 + }, + { + "desc", // 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(guided_vr_interfaces__msg__Notification2D, desc), // 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 + }, + { + "level", // 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(guided_vr_interfaces__msg__Notification2D, level), // 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 + }, + { + "stamp", // 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(guided_vr_interfaces__msg__Notification2D, stamp), // 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 + }, + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces__msg__Notification2D, id), // 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 + }, + { + "polygon", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces__msg__Notification2D, polygon), // bytes offset in struct + NULL, // default value + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__size_function__Notification2D__polygon, // size() function pointer + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_const_function__Notification2D__polygon, // get_const(index) function pointer + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__get_function__Notification2D__polygon, // get(index) function pointer + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__fetch_function__Notification2D__polygon, // fetch(index, &value) function pointer + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__assign_function__Notification2D__polygon, // assign(index, value) function pointer + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__resize_function__Notification2D__polygon // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_members = { + "guided_vr_interfaces__msg", // message namespace + "Notification2D", // message name + 6, // number of fields + sizeof(guided_vr_interfaces__msg__Notification2D), + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array, // message members + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_init_function, // function to initialize message memory (memory has to be allocated) + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_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 guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_type_support_handle = { + 0, + &guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_guided_vr_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, guided_vr_interfaces, msg, Notification2D)() { + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, String)(); + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, String)(); + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt8)(); + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_type_support_handle.typesupport_identifier) { + guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &guided_vr_interfaces__msg__Notification2D__rosidl_typesupport_introspection_c__Notification2D_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.cpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.cpp new file mode 100644 index 000000000..b38f01498 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.cpp @@ -0,0 +1,239 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from guided_vr_interfaces:msg/Notification2D.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 "guided_vr_interfaces/msg/detail/notification2_d__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 guided_vr_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Notification2D_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) guided_vr_interfaces::msg::Notification2D(_init); +} + +void Notification2D_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Notification2D(); +} + +size_t size_function__Notification2D__polygon(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Notification2D__polygon(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Notification2D__polygon(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Notification2D__polygon( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Notification2D__polygon(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Notification2D__polygon( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Notification2D__polygon(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Notification2D__polygon(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Notification2D_message_member_array[6] = { + { + "source", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, source), // 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 + }, + { + "desc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, desc), // 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 + }, + { + "level", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, level), // 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 + }, + { + "stamp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, stamp), // 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 + }, + { + "id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, id), // 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 + }, + { + "polygon", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(guided_vr_interfaces::msg::Notification2D, polygon), // bytes offset in struct + nullptr, // default value + size_function__Notification2D__polygon, // size() function pointer + get_const_function__Notification2D__polygon, // get_const(index) function pointer + get_function__Notification2D__polygon, // get(index) function pointer + fetch_function__Notification2D__polygon, // fetch(index, &value) function pointer + assign_function__Notification2D__polygon, // assign(index, value) function pointer + resize_function__Notification2D__polygon // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Notification2D_message_members = { + "guided_vr_interfaces::msg", // message namespace + "Notification2D", // message name + 6, // number of fields + sizeof(guided_vr_interfaces::msg::Notification2D), + Notification2D_message_member_array, // message members + Notification2D_init_function, // function to initialize message memory (memory has to be allocated) + Notification2D_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Notification2D_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Notification2D_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace guided_vr_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::guided_vr_interfaces::msg::rosidl_typesupport_introspection_cpp::Notification2D_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, guided_vr_interfaces, msg, Notification2D)() { + return &::guided_vr_interfaces::msg::rosidl_typesupport_introspection_cpp::Notification2D_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.h new file mode 100644 index 000000000..caa9ba76b --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_H_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "guided_vr_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_guided_vr_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + guided_vr_interfaces, + msg, + Notification2D +)(); + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.hpp new file mode 100644 index 000000000..53c1a77e1 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/detail/notification2_d__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_HPP_ +#define GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "guided_vr_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_guided_vr_interfaces +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + guided_vr_interfaces, + msg, + Notification2D +)(); +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__DETAIL__NOTIFICATION2_D__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.h new file mode 100644 index 000000000..a03f35405 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from guided_vr_interfaces:msg/Notification2D.idl +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_H_ +#define GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_H_ + +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.h" +#include "guided_vr_interfaces/msg/detail/notification2_d__functions.h" +#include "guided_vr_interfaces/msg/detail/notification2_d__type_support.h" + +#endif // GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.hpp new file mode 100644 index 000000000..e778c30a9 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/notification2_d.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_HPP_ +#define GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_HPP_ + +#include "guided_vr_interfaces/msg/detail/notification2_d__struct.hpp" +#include "guided_vr_interfaces/msg/detail/notification2_d__builder.hpp" +#include "guided_vr_interfaces/msg/detail/notification2_d__traits.hpp" +#include "guided_vr_interfaces/msg/detail/notification2_d__type_support.hpp" + +#endif // GUIDED_VR_INTERFACES__MSG__NOTIFICATION2_D_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_c__visibility_control.h new file mode 100644 index 000000000..cf911036f --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_c__visibility_control.h @@ -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 GUIDED_VR_INTERFACES__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ +#define GUIDED_VR_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_guided_vr_interfaces __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_C_IMPORT_guided_vr_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_C_EXPORT_guided_vr_interfaces __declspec(dllexport) + #define ROSIDL_GENERATOR_C_IMPORT_guided_vr_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_C_BUILDING_DLL_guided_vr_interfaces + #define ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces ROSIDL_GENERATOR_C_EXPORT_guided_vr_interfaces + #else + #define ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces ROSIDL_GENERATOR_C_IMPORT_guided_vr_interfaces + #endif +#else + #define ROSIDL_GENERATOR_C_EXPORT_guided_vr_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_C_IMPORT_guided_vr_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_C_PUBLIC_guided_vr_interfaces + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..0cf2e4cd0 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 GUIDED_VR_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define GUIDED_VR_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_guided_vr_interfaces __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_guided_vr_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_guided_vr_interfaces __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_guided_vr_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_guided_vr_interfaces + #define ROSIDL_GENERATOR_CPP_PUBLIC_guided_vr_interfaces ROSIDL_GENERATOR_CPP_EXPORT_guided_vr_interfaces + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_guided_vr_interfaces ROSIDL_GENERATOR_CPP_IMPORT_guided_vr_interfaces + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_guided_vr_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_guided_vr_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_guided_vr_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_guided_vr_interfaces + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h new file mode 100644 index 000000000..1f4b5d8bd --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h @@ -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 GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ +#define GUIDED_VR_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_guided_vr_interfaces __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_guided_vr_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_guided_vr_interfaces __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_guided_vr_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_C_BUILDING_DLL_guided_vr_interfaces + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_guided_vr_interfaces + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_guided_vr_interfaces + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_guided_vr_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_guided_vr_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_guided_vr_interfaces + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h new file mode 100644 index 000000000..7cd91ec14 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h @@ -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 GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ +#define GUIDED_VR_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_guided_vr_interfaces __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_guided_vr_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_guided_vr_interfaces __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_guided_vr_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_CPP_BUILDING_DLL_guided_vr_interfaces + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_guided_vr_interfaces + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_guided_vr_interfaces + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_guided_vr_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_guided_vr_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_guided_vr_interfaces + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h new file mode 100644 index 000000000..5e9113be1 --- /dev/null +++ b/ThirdParty/ros/include/guided_vr_interfaces/guided_vr_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h @@ -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 GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ +#define GUIDED_VR_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_guided_vr_interfaces __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_guided_vr_interfaces __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_guided_vr_interfaces __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_guided_vr_interfaces __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_INTROSPECTION_C_BUILDING_DLL_guided_vr_interfaces + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_guided_vr_interfaces + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_guided_vr_interfaces ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_guided_vr_interfaces + #endif +#else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_guided_vr_interfaces __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_guided_vr_interfaces + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_guided_vr_interfaces __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_guided_vr_interfaces + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // GUIDED_VR_INTERFACES__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__traits.hpp b/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__traits.hpp deleted file mode 100644 index 02a75610b..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:msg/GridCells.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ -#define NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ - -#include "nav_msgs/msg/detail/grid_cells__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::msg::GridCells"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/msg/GridCells"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.c b/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.c deleted file mode 100644 index 189cc8026..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.c +++ /dev/null @@ -1,173 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:msg/GridCells.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/msg/detail/grid_cells__functions.h" -#include "nav_msgs/msg/detail/grid_cells__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `cells` -#include "geometry_msgs/msg/point.h" -// Member `cells` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GridCells__rosidl_typesupport_introspection_c__GridCells_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; - nav_msgs__msg__GridCells__init(message_memory); -} - -void GridCells__rosidl_typesupport_introspection_c__GridCells_fini_function(void * message_memory) -{ - nav_msgs__msg__GridCells__fini(message_memory); -} - -size_t GridCells__rosidl_typesupport_introspection_c__size_function__Point__cells( - const void * untyped_member) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return member->size; -} - -const void * GridCells__rosidl_typesupport_introspection_c__get_const_function__Point__cells( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * GridCells__rosidl_typesupport_introspection_c__get_function__Point__cells( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool GridCells__rosidl_typesupport_introspection_c__resize_function__Point__cells( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - geometry_msgs__msg__Point__Sequence__fini(member); - return geometry_msgs__msg__Point__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[4] = { - { - "header", // 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(nav_msgs__msg__GridCells, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cell_width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__GridCells, cell_width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cell_height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__GridCells, cell_height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cells", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__GridCells, cells), // bytes offset in struct - NULL, // default value - GridCells__rosidl_typesupport_introspection_c__size_function__Point__cells, // size() function pointer - GridCells__rosidl_typesupport_introspection_c__get_const_function__Point__cells, // get_const(index) function pointer - GridCells__rosidl_typesupport_introspection_c__get_function__Point__cells, // get(index) function pointer - GridCells__rosidl_typesupport_introspection_c__resize_function__Point__cells // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GridCells__rosidl_typesupport_introspection_c__GridCells_message_members = { - "nav_msgs__msg", // message namespace - "GridCells", // message name - 4, // number of fields - sizeof(nav_msgs__msg__GridCells), - GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array, // message members - GridCells__rosidl_typesupport_introspection_c__GridCells_init_function, // function to initialize message memory (memory has to be allocated) - GridCells__rosidl_typesupport_introspection_c__GridCells_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 GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle = { - 0, - &GridCells__rosidl_typesupport_introspection_c__GridCells_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, GridCells)() { - GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - if (!GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle.typesupport_identifier) { - GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__traits.hpp b/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__traits.hpp deleted file mode 100644 index 1493bf2d2..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:msg/MapMetaData.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ -#define NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ - -#include "nav_msgs/msg/detail/map_meta_data__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'map_load_time' -#include "builtin_interfaces/msg/detail/time__traits.hpp" -// Member 'origin' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::msg::MapMetaData"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/msg/MapMetaData"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.c b/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.c deleted file mode 100644 index 7823334d4..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.c +++ /dev/null @@ -1,155 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:msg/MapMetaData.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/msg/detail/map_meta_data__functions.h" -#include "nav_msgs/msg/detail/map_meta_data__struct.h" - - -// Include directives for member types -// Member `map_load_time` -#include "builtin_interfaces/msg/time.h" -// Member `map_load_time` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `origin` -#include "geometry_msgs/msg/pose.h" -// Member `origin` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_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; - nav_msgs__msg__MapMetaData__init(message_memory); -} - -void MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_fini_function(void * message_memory) -{ - nav_msgs__msg__MapMetaData__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[5] = { - { - "map_load_time", // 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(nav_msgs__msg__MapMetaData, map_load_time), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "resolution", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__MapMetaData, resolution), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__MapMetaData, width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__MapMetaData, height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "origin", // 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(nav_msgs__msg__MapMetaData, origin), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_members = { - "nav_msgs__msg", // message namespace - "MapMetaData", // message name - 5, // number of fields - sizeof(nav_msgs__msg__MapMetaData), - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array, // message members - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_init_function, // function to initialize message memory (memory has to be allocated) - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_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 MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle = { - 0, - &MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, MapMetaData)() { - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle.typesupport_identifier) { - MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.h b/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.h deleted file mode 100644 index 6aaa18447..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from nav_msgs:msg/OccupancyGrid.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ -#define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'info' -#include "nav_msgs/msg/detail/map_meta_data__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/OccupancyGrid in the package nav_msgs. -typedef struct nav_msgs__msg__OccupancyGrid -{ - std_msgs__msg__Header header; - nav_msgs__msg__MapMetaData info; - rosidl_runtime_c__int8__Sequence data; -} nav_msgs__msg__OccupancyGrid; - -// Struct for a sequence of nav_msgs__msg__OccupancyGrid. -typedef struct nav_msgs__msg__OccupancyGrid__Sequence -{ - nav_msgs__msg__OccupancyGrid * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} nav_msgs__msg__OccupancyGrid__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__traits.hpp b/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__traits.hpp deleted file mode 100644 index c7705778a..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:msg/OccupancyGrid.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ -#define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ - -#include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'info' -#include "nav_msgs/msg/detail/map_meta_data__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::msg::OccupancyGrid"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/msg/OccupancyGrid"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.c b/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.c deleted file mode 100644 index 692472d22..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.c +++ /dev/null @@ -1,127 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:msg/OccupancyGrid.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/msg/detail/occupancy_grid__functions.h" -#include "nav_msgs/msg/detail/occupancy_grid__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `info` -#include "nav_msgs/msg/map_meta_data.h" -// Member `info` -#include "nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_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; - nav_msgs__msg__OccupancyGrid__init(message_memory); -} - -void OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_fini_function(void * message_memory) -{ - nav_msgs__msg__OccupancyGrid__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[3] = { - { - "header", // 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(nav_msgs__msg__OccupancyGrid, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "info", // 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(nav_msgs__msg__OccupancyGrid, info), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__OccupancyGrid, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_members = { - "nav_msgs__msg", // message namespace - "OccupancyGrid", // message name - 3, // number of fields - sizeof(nav_msgs__msg__OccupancyGrid), - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array, // message members - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_init_function, // function to initialize message memory (memory has to be allocated) - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_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 OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle = { - 0, - &OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)() { - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, MapMetaData)(); - if (!OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle.typesupport_identifier) { - OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.h b/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.h deleted file mode 100644 index 4fd99a717..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.h +++ /dev/null @@ -1,53 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from nav_msgs:msg/Odometry.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ -#define NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'child_frame_id' -#include "rosidl_runtime_c/string.h" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose_with_covariance__struct.h" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist_with_covariance__struct.h" - -// Struct defined in msg/Odometry in the package nav_msgs. -typedef struct nav_msgs__msg__Odometry -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String child_frame_id; - geometry_msgs__msg__PoseWithCovariance pose; - geometry_msgs__msg__TwistWithCovariance twist; -} nav_msgs__msg__Odometry; - -// Struct for a sequence of nav_msgs__msg__Odometry. -typedef struct nav_msgs__msg__Odometry__Sequence -{ - nav_msgs__msg__Odometry * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} nav_msgs__msg__Odometry__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__traits.hpp b/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__traits.hpp deleted file mode 100644 index 2b6655e5d..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__traits.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:msg/Odometry.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ -#define NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ - -#include "nav_msgs/msg/detail/odometry__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose_with_covariance__traits.hpp" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist_with_covariance__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::msg::Odometry"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/msg/Odometry"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.c b/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.c deleted file mode 100644 index 4e488a907..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.c +++ /dev/null @@ -1,148 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:msg/Odometry.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/msg/detail/odometry__functions.h" -#include "nav_msgs/msg/detail/odometry__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `child_frame_id` -#include "rosidl_runtime_c/string_functions.h" -// Member `pose` -#include "geometry_msgs/msg/pose_with_covariance.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" -// Member `twist` -#include "geometry_msgs/msg/twist_with_covariance.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Odometry__rosidl_typesupport_introspection_c__Odometry_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; - nav_msgs__msg__Odometry__init(message_memory); -} - -void Odometry__rosidl_typesupport_introspection_c__Odometry_fini_function(void * message_memory) -{ - nav_msgs__msg__Odometry__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[4] = { - { - "header", // 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(nav_msgs__msg__Odometry, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "child_frame_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__Odometry, child_frame_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(nav_msgs__msg__Odometry, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "twist", // 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(nav_msgs__msg__Odometry, twist), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Odometry__rosidl_typesupport_introspection_c__Odometry_message_members = { - "nav_msgs__msg", // message namespace - "Odometry", // message name - 4, // number of fields - sizeof(nav_msgs__msg__Odometry), - Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array, // message members - Odometry__rosidl_typesupport_introspection_c__Odometry_init_function, // function to initialize message memory (memory has to be allocated) - Odometry__rosidl_typesupport_introspection_c__Odometry_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 Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle = { - 0, - &Odometry__rosidl_typesupport_introspection_c__Odometry_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Odometry)() { - Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)(); - Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)(); - if (!Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle.typesupport_identifier) { - Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__traits.hpp b/ThirdParty/ros/include/nav_msgs/msg/detail/path__traits.hpp deleted file mode 100644 index 937c12822..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:msg/Path.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ -#define NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ - -#include "nav_msgs/msg/detail/path__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::msg::Path"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/msg/Path"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.c b/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.c deleted file mode 100644 index a4b499178..000000000 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:msg/Path.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/msg/detail/path__functions.h" -#include "nav_msgs/msg/detail/path__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `poses` -#include "geometry_msgs/msg/pose_stamped.h" -// Member `poses` -#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Path__rosidl_typesupport_introspection_c__Path_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; - nav_msgs__msg__Path__init(message_memory); -} - -void Path__rosidl_typesupport_introspection_c__Path_fini_function(void * message_memory) -{ - nav_msgs__msg__Path__fini(message_memory); -} - -size_t Path__rosidl_typesupport_introspection_c__size_function__PoseStamped__poses( - const void * untyped_member) -{ - const geometry_msgs__msg__PoseStamped__Sequence * member = - (const geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); - return member->size; -} - -const void * Path__rosidl_typesupport_introspection_c__get_const_function__PoseStamped__poses( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__PoseStamped__Sequence * member = - (const geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Path__rosidl_typesupport_introspection_c__get_function__PoseStamped__poses( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__PoseStamped__Sequence * member = - (geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Path__rosidl_typesupport_introspection_c__resize_function__PoseStamped__poses( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__PoseStamped__Sequence * member = - (geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); - geometry_msgs__msg__PoseStamped__Sequence__fini(member); - return geometry_msgs__msg__PoseStamped__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember Path__rosidl_typesupport_introspection_c__Path_message_member_array[2] = { - { - "header", // 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(nav_msgs__msg__Path, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "poses", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__msg__Path, poses), // bytes offset in struct - NULL, // default value - Path__rosidl_typesupport_introspection_c__size_function__PoseStamped__poses, // size() function pointer - Path__rosidl_typesupport_introspection_c__get_const_function__PoseStamped__poses, // get_const(index) function pointer - Path__rosidl_typesupport_introspection_c__get_function__PoseStamped__poses, // get(index) function pointer - Path__rosidl_typesupport_introspection_c__resize_function__PoseStamped__poses // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Path__rosidl_typesupport_introspection_c__Path_message_members = { - "nav_msgs__msg", // message namespace - "Path", // message name - 2, // number of fields - sizeof(nav_msgs__msg__Path), - Path__rosidl_typesupport_introspection_c__Path_message_member_array, // message members - Path__rosidl_typesupport_introspection_c__Path_init_function, // function to initialize message memory (memory has to be allocated) - Path__rosidl_typesupport_introspection_c__Path_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 Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle = { - 0, - &Path__rosidl_typesupport_introspection_c__Path_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Path)() { - Path__rosidl_typesupport_introspection_c__Path_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - Path__rosidl_typesupport_introspection_c__Path_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); - if (!Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle.typesupport_identifier) { - Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__builder.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__builder.hpp index 23385a3d7..9f83cef76 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__MSG__DETAIL__GRID_CELLS__BUILDER_HPP_ #define NAV_MSGS__MSG__DETAIL__GRID_CELLS__BUILDER_HPP_ -#include "nav_msgs/msg/detail/grid_cells__struct.hpp" -#include #include #include +#include "nav_msgs/msg/detail/grid_cells__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__functions.c similarity index 91% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__functions.c index c821c0fa6..bc5706f60 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__functions.c @@ -253,22 +253,27 @@ nav_msgs__msg__GridCells__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__msg__GridCells); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__msg__GridCells * data = - (nav_msgs__msg__GridCells *)realloc(output->data, allocation_size); + (nav_msgs__msg__GridCells *)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 (!nav_msgs__msg__GridCells__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__msg__GridCells__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; ) { - nav_msgs__msg__GridCells__fini(&data[i]); + nav_msgs__msg__GridCells__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h index d1231da42..11d42e6b2 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__msg__GridCells( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__msg__GridCells( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp index d8de47ecb..694663292 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_GridCells( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.h similarity index 83% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.h index e90a4b3d0..50f6649ef 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.h @@ -23,12 +23,18 @@ extern "C" // Member 'cells' #include "geometry_msgs/msg/detail/point__struct.h" -// Struct defined in msg/GridCells in the package nav_msgs. +/// Struct defined in msg/GridCells in the package nav_msgs. +/** + * An array of cells in a 2D grid + */ typedef struct nav_msgs__msg__GridCells { std_msgs__msg__Header header; + /// Width of each cell float cell_width; + /// Height of each cell float cell_height; + /// Each cell is represented by the Point at the center of the cell geometry_msgs__msg__Point__Sequence cells; } nav_msgs__msg__GridCells; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.hpp similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.hpp index 34c56bcab..ff07cf418 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__MSG__DETAIL__GRID_CELLS__STRUCT_HPP_ #define NAV_MSGS__MSG__DETAIL__GRID_CELLS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -71,7 +72,7 @@ struct GridCells_ float; _cell_height_type cell_height; using _cells_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _cells_type cells; // setters for named parameter idiom @@ -94,7 +95,7 @@ struct GridCells_ return *this; } Type & set__cells( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->cells = _arg; return *this; diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__traits.hpp new file mode 100644 index 000000000..e3a2aaf3d --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__traits.hpp @@ -0,0 +1,185 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:msg/GridCells.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ +#define NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/msg/detail/grid_cells__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'cells' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace nav_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const GridCells & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: cell_width + { + out << "cell_width: "; + rosidl_generator_traits::value_to_yaml(msg.cell_width, out); + out << ", "; + } + + // member: cell_height + { + out << "cell_height: "; + rosidl_generator_traits::value_to_yaml(msg.cell_height, out); + out << ", "; + } + + // member: cells + { + if (msg.cells.size() == 0) { + out << "cells: []"; + } else { + out << "cells: ["; + size_t pending_items = msg.cells.size(); + for (auto item : msg.cells) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GridCells & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: cell_width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "cell_width: "; + rosidl_generator_traits::value_to_yaml(msg.cell_width, out); + out << "\n"; + } + + // member: cell_height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "cell_height: "; + rosidl_generator_traits::value_to_yaml(msg.cell_height, out); + out << "\n"; + } + + // member: cells + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.cells.size() == 0) { + out << "cells: []\n"; + } else { + out << "cells:\n"; + for (auto item : msg.cells) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GridCells & 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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::msg::GridCells & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::msg::GridCells & msg) +{ + return nav_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::msg::GridCells"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/msg/GridCells"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__MSG__DETAIL__GRID_CELLS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.c new file mode 100644 index 000000000..0fd9135cb --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.c @@ -0,0 +1,203 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:msg/GridCells.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/msg/detail/grid_cells__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/msg/detail/grid_cells__functions.h" +#include "nav_msgs/msg/detail/grid_cells__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `cells` +#include "geometry_msgs/msg/point.h" +// Member `cells` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_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; + nav_msgs__msg__GridCells__init(message_memory); +} + +void nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_fini_function(void * message_memory) +{ + nav_msgs__msg__GridCells__fini(message_memory); +} + +size_t nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__size_function__GridCells__cells( + const void * untyped_member) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return member->size; +} + +const void * nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_const_function__GridCells__cells( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_function__GridCells__cells( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__fetch_function__GridCells__cells( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point * item = + ((const geometry_msgs__msg__Point *) + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_const_function__GridCells__cells(untyped_member, index)); + geometry_msgs__msg__Point * value = + (geometry_msgs__msg__Point *)(untyped_value); + *value = *item; +} + +void nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__assign_function__GridCells__cells( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point * item = + ((geometry_msgs__msg__Point *) + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_function__GridCells__cells(untyped_member, index)); + const geometry_msgs__msg__Point * value = + (const geometry_msgs__msg__Point *)(untyped_value); + *item = *value; +} + +bool nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__resize_function__GridCells__cells( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + geometry_msgs__msg__Point__Sequence__fini(member); + return geometry_msgs__msg__Point__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[4] = { + { + "header", // 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(nav_msgs__msg__GridCells, header), // 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 + }, + { + "cell_width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__GridCells, cell_width), // 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 + }, + { + "cell_height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__GridCells, cell_height), // 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 + }, + { + "cells", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__GridCells, cells), // bytes offset in struct + NULL, // default value + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__size_function__GridCells__cells, // size() function pointer + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_const_function__GridCells__cells, // get_const(index) function pointer + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__get_function__GridCells__cells, // get(index) function pointer + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__fetch_function__GridCells__cells, // fetch(index, &value) function pointer + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__assign_function__GridCells__cells, // assign(index, value) function pointer + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__resize_function__GridCells__cells // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_members = { + "nav_msgs__msg", // message namespace + "GridCells", // message name + 4, // number of fields + sizeof(nav_msgs__msg__GridCells), + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array, // message members + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_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 nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle = { + 0, + &nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, GridCells)() { + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle.typesupport_identifier) { + nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__msg__GridCells__rosidl_typesupport_introspection_c__GridCells_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.cpp index 7042d454f..adb78ef6c 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__GridCells__cells(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__GridCells__cells( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GridCells__cells(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GridCells__cells( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GridCells__cells(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GridCells__cells(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GridCells_mes 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GridCells_mes 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GridCells_mes 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 }, { @@ -123,6 +147,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GridCells_mes size_function__GridCells__cells, // size() function pointer get_const_function__GridCells__cells, // get_const(index) function pointer get_function__GridCells__cells, // get(index) function pointer + fetch_function__GridCells__cells, // fetch(index, &value) function pointer + assign_function__GridCells__cells, // assign(index, value) function pointer resize_function__GridCells__cells // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/grid_cells__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.hpp new file mode 100644 index 000000000..489da6698 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/grid_cells__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:msg/GridCells.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__GRID_CELLS__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__MSG__DETAIL__GRID_CELLS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + msg, + GridCells +)(); +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__GRID_CELLS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__builder.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__builder.hpp index 220142707..961a8840e 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__MSG__DETAIL__MAP_META_DATA__BUILDER_HPP_ #define NAV_MSGS__MSG__DETAIL__MAP_META_DATA__BUILDER_HPP_ -#include "nav_msgs/msg/detail/map_meta_data__struct.hpp" -#include #include #include +#include "nav_msgs/msg/detail/map_meta_data__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__functions.c similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__functions.c index 9e2c07199..df5698bed 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__functions.c @@ -261,22 +261,27 @@ nav_msgs__msg__MapMetaData__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__msg__MapMetaData); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__msg__MapMetaData * data = - (nav_msgs__msg__MapMetaData *)realloc(output->data, allocation_size); + (nav_msgs__msg__MapMetaData *)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 (!nav_msgs__msg__MapMetaData__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__msg__MapMetaData__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; ) { - nav_msgs__msg__MapMetaData__fini(&data[i]); + nav_msgs__msg__MapMetaData__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h index 539e33ab5..0d06cd5ce 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__msg__MapMetaData( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__msg__MapMetaData( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp index 248d19cae..617ffc45d 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_MapMetaData( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.h similarity index 76% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.h index 8ab810cf7..43ac0eef4 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.h @@ -23,13 +23,22 @@ extern "C" // Member 'origin' #include "geometry_msgs/msg/detail/pose__struct.h" -// Struct defined in msg/MapMetaData in the package nav_msgs. +/// Struct defined in msg/MapMetaData in the package nav_msgs. +/** + * This hold basic information about the characteristics of the OccupancyGrid + */ typedef struct nav_msgs__msg__MapMetaData { + /// The time at which the map was loaded builtin_interfaces__msg__Time map_load_time; + /// The map resolution float resolution; + /// Map width uint32_t width; + /// Map height uint32_t height; + /// The origin of the map [m, m, rad]. This is the real-world pose of the + /// bottom left corner of cell (0,0) in the map. geometry_msgs__msg__Pose origin; } nav_msgs__msg__MapMetaData; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.hpp index 1e5264cb4..2d11606b0 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__MSG__DETAIL__MAP_META_DATA__STRUCT_HPP_ #define NAV_MSGS__MSG__DETAIL__MAP_META_DATA__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'map_load_time' diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__traits.hpp new file mode 100644 index 000000000..47c6f966c --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__traits.hpp @@ -0,0 +1,181 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:msg/MapMetaData.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ +#define NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/msg/detail/map_meta_data__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'map_load_time' +#include "builtin_interfaces/msg/detail/time__traits.hpp" +// Member 'origin' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace nav_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MapMetaData & msg, + std::ostream & out) +{ + out << "{"; + // member: map_load_time + { + out << "map_load_time: "; + to_flow_style_yaml(msg.map_load_time, out); + out << ", "; + } + + // member: resolution + { + out << "resolution: "; + rosidl_generator_traits::value_to_yaml(msg.resolution, out); + out << ", "; + } + + // member: width + { + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << ", "; + } + + // member: height + { + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << ", "; + } + + // member: origin + { + out << "origin: "; + to_flow_style_yaml(msg.origin, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MapMetaData & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: map_load_time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "map_load_time:\n"; + to_block_style_yaml(msg.map_load_time, out, indentation + 2); + } + + // member: resolution + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "resolution: "; + rosidl_generator_traits::value_to_yaml(msg.resolution, out); + out << "\n"; + } + + // member: width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << "\n"; + } + + // member: height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << "\n"; + } + + // member: origin + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "origin:\n"; + to_block_style_yaml(msg.origin, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MapMetaData & 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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::msg::MapMetaData & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::msg::MapMetaData & msg) +{ + return nav_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::msg::MapMetaData"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/msg/MapMetaData"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.c new file mode 100644 index 000000000..3e3725dda --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:msg/MapMetaData.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/msg/detail/map_meta_data__functions.h" +#include "nav_msgs/msg/detail/map_meta_data__struct.h" + + +// Include directives for member types +// Member `map_load_time` +#include "builtin_interfaces/msg/time.h" +// Member `map_load_time` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `origin` +#include "geometry_msgs/msg/pose.h" +// Member `origin` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_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; + nav_msgs__msg__MapMetaData__init(message_memory); +} + +void nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_fini_function(void * message_memory) +{ + nav_msgs__msg__MapMetaData__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[5] = { + { + "map_load_time", // 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(nav_msgs__msg__MapMetaData, map_load_time), // 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 + }, + { + "resolution", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__MapMetaData, resolution), // 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 + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__MapMetaData, width), // 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 + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__MapMetaData, height), // 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 + }, + { + "origin", // 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(nav_msgs__msg__MapMetaData, origin), // 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 nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_members = { + "nav_msgs__msg", // message namespace + "MapMetaData", // message name + 5, // number of fields + sizeof(nav_msgs__msg__MapMetaData), + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array, // message members + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_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 nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle = { + 0, + &nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, MapMetaData)() { + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle.typesupport_identifier) { + nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__msg__MapMetaData__rosidl_typesupport_introspection_c__MapMetaData_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.cpp index 62240b7af..7382595e0 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MapMetaData_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MapMetaData_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MapMetaData_m 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MapMetaData_m 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MapMetaData_m 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 } }; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/map_meta_data__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.hpp new file mode 100644 index 000000000..915c056db --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/map_meta_data__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:msg/MapMetaData.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + msg, + MapMetaData +)(); +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__MAP_META_DATA__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__builder.hpp similarity index 96% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__builder.hpp index 21cf5b8bc..6739f5da6 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__BUILDER_HPP_ #define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__BUILDER_HPP_ -#include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" -#include #include #include +#include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__functions.c similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__functions.c index 85abfb86a..1a490bd5f 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__functions.c @@ -258,22 +258,27 @@ nav_msgs__msg__OccupancyGrid__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__msg__OccupancyGrid); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__msg__OccupancyGrid * data = - (nav_msgs__msg__OccupancyGrid *)realloc(output->data, allocation_size); + (nav_msgs__msg__OccupancyGrid *)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 (!nav_msgs__msg__OccupancyGrid__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__msg__OccupancyGrid__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; ) { - nav_msgs__msg__OccupancyGrid__fini(&data[i]); + nav_msgs__msg__OccupancyGrid__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h index 1ed80bdf5..afa1988ce 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__msg__OccupancyGrid( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__msg__OccupancyGrid( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp index d17b46383..dc734abb3 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_OccupancyGrid( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.h new file mode 100644 index 000000000..08b52a7b8 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.h @@ -0,0 +1,60 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from nav_msgs:msg/OccupancyGrid.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ +#define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'info' +#include "nav_msgs/msg/detail/map_meta_data__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/OccupancyGrid in the package nav_msgs. +/** + * This represents a 2-D grid map + */ +typedef struct nav_msgs__msg__OccupancyGrid +{ + std_msgs__msg__Header header; + /// MetaData for the map + nav_msgs__msg__MapMetaData info; + /// The map data, in row-major order, starting with (0,0). + /// Cell (1, 0) will be listed second, representing the next cell in the x direction. + /// Cell (0, 1) will be at the index equal to info.width, followed by (1, 1). + /// The values inside are application dependent, but frequently, + /// 0 represents unoccupied, 1 represents definitely occupied, and + /// -1 represents unknown. + rosidl_runtime_c__int8__Sequence data; +} nav_msgs__msg__OccupancyGrid; + +// Struct for a sequence of nav_msgs__msg__OccupancyGrid. +typedef struct nav_msgs__msg__OccupancyGrid__Sequence +{ + nav_msgs__msg__OccupancyGrid * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} nav_msgs__msg__OccupancyGrid__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.hpp similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.hpp index dd14d7645..e3c16e7c0 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_HPP_ #define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -60,7 +61,7 @@ struct OccupancyGrid_ nav_msgs::msg::MapMetaData_; _info_type info; using _data_type = - std::vector::other>; + std::vector::template rebind_alloc>; _data_type data; // setters for named parameter idiom @@ -77,7 +78,7 @@ struct OccupancyGrid_ return *this; } Type & set__data( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->data = _arg; return *this; diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__traits.hpp new file mode 100644 index 000000000..fdfcd16db --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__traits.hpp @@ -0,0 +1,168 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:msg/OccupancyGrid.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ +#define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'info' +#include "nav_msgs/msg/detail/map_meta_data__traits.hpp" + +namespace nav_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const OccupancyGrid & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: info + { + out << "info: "; + to_flow_style_yaml(msg.info, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const OccupancyGrid & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: info + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "info:\n"; + to_block_style_yaml(msg.info, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const OccupancyGrid & 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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::msg::OccupancyGrid & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::msg::OccupancyGrid & msg) +{ + return nav_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::msg::OccupancyGrid"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/msg/OccupancyGrid"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.c new file mode 100644 index 000000000..c85627be7 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.c @@ -0,0 +1,188 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:msg/OccupancyGrid.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/msg/detail/occupancy_grid__functions.h" +#include "nav_msgs/msg/detail/occupancy_grid__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `info` +#include "nav_msgs/msg/map_meta_data.h" +// Member `info` +#include "nav_msgs/msg/detail/map_meta_data__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_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; + nav_msgs__msg__OccupancyGrid__init(message_memory); +} + +void nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_fini_function(void * message_memory) +{ + nav_msgs__msg__OccupancyGrid__fini(message_memory); +} + +size_t nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__size_function__OccupancyGrid__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return member->size; +} + +const void * nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_const_function__OccupancyGrid__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_function__OccupancyGrid__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__fetch_function__OccupancyGrid__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int8_t * item = + ((const int8_t *) + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_const_function__OccupancyGrid__data(untyped_member, index)); + int8_t * value = + (int8_t *)(untyped_value); + *value = *item; +} + +void nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__assign_function__OccupancyGrid__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int8_t * item = + ((int8_t *) + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_function__OccupancyGrid__data(untyped_member, index)); + const int8_t * value = + (const int8_t *)(untyped_value); + *item = *value; +} + +bool nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__resize_function__OccupancyGrid__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + rosidl_runtime_c__int8__Sequence__fini(member); + return rosidl_runtime_c__int8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[3] = { + { + "header", // 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(nav_msgs__msg__OccupancyGrid, header), // 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 + }, + { + "info", // 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(nav_msgs__msg__OccupancyGrid, info), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__OccupancyGrid, data), // bytes offset in struct + NULL, // default value + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__size_function__OccupancyGrid__data, // size() function pointer + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_const_function__OccupancyGrid__data, // get_const(index) function pointer + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__get_function__OccupancyGrid__data, // get(index) function pointer + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__fetch_function__OccupancyGrid__data, // fetch(index, &value) function pointer + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__assign_function__OccupancyGrid__data, // assign(index, value) function pointer + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__resize_function__OccupancyGrid__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_members = { + "nav_msgs__msg", // message namespace + "OccupancyGrid", // message name + 3, // number of fields + sizeof(nav_msgs__msg__OccupancyGrid), + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array, // message members + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_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 nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle = { + 0, + &nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)() { + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, MapMetaData)(); + if (!nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle.typesupport_identifier) { + nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__msg__OccupancyGrid__rosidl_typesupport_introspection_c__OccupancyGrid_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.cpp index 129162091..f2a4161a2 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__OccupancyGrid__data(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__OccupancyGrid__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__OccupancyGrid__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__OccupancyGrid__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__OccupancyGrid__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__OccupancyGrid__data(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember OccupancyGrid 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember OccupancyGrid 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember OccupancyGrid size_function__OccupancyGrid__data, // size() function pointer get_const_function__OccupancyGrid__data, // get_const(index) function pointer get_function__OccupancyGrid__data, // get(index) function pointer + fetch_function__OccupancyGrid__data, // fetch(index, &value) function pointer + assign_function__OccupancyGrid__data, // assign(index, value) function pointer resize_function__OccupancyGrid__data // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/occupancy_grid__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.hpp new file mode 100644 index 000000000..838583a87 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/occupancy_grid__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:msg/OccupancyGrid.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + msg, + OccupancyGrid +)(); +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__OCCUPANCY_GRID__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__builder.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__builder.hpp index 18f5193b8..80c0d016e 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__BUILDER_HPP_ #define NAV_MSGS__MSG__DETAIL__ODOMETRY__BUILDER_HPP_ -#include "nav_msgs/msg/detail/odometry__struct.hpp" -#include #include #include +#include "nav_msgs/msg/detail/odometry__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__functions.c similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__functions.c index 8e7d67134..532d4566c 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__functions.c @@ -279,22 +279,27 @@ nav_msgs__msg__Odometry__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__msg__Odometry); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__msg__Odometry * data = - (nav_msgs__msg__Odometry *)realloc(output->data, allocation_size); + (nav_msgs__msg__Odometry *)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 (!nav_msgs__msg__Odometry__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__msg__Odometry__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; ) { - nav_msgs__msg__Odometry__fini(&data[i]); + nav_msgs__msg__Odometry__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h index 9d8a94233..1d5a5fd42 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__msg__Odometry( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__msg__Odometry( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp index f0d19b2a8..e2fd2febc 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_Odometry( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.h new file mode 100644 index 000000000..0cbc32e6b --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from nav_msgs:msg/Odometry.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ +#define NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'child_frame_id' +#include "rosidl_runtime_c/string.h" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose_with_covariance__struct.h" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist_with_covariance__struct.h" + +/// Struct defined in msg/Odometry in the package nav_msgs. +/** + * This represents an estimate of a position and velocity in free space. + * The pose in this message should be specified in the coordinate frame given by header.frame_id + * The twist in this message should be specified in the coordinate frame given by the child_frame_id + */ +typedef struct nav_msgs__msg__Odometry +{ + /// Includes the frame id of the pose parent. + std_msgs__msg__Header header; + /// Frame id the pose points to. The twist is in this coordinate frame. + rosidl_runtime_c__String child_frame_id; + /// Estimated pose that is typically relative to a fixed world frame. + geometry_msgs__msg__PoseWithCovariance pose; + /// Estimated linear and angular velocity relative to child_frame_id. + geometry_msgs__msg__TwistWithCovariance twist; +} nav_msgs__msg__Odometry; + +// Struct for a sequence of nav_msgs__msg__Odometry. +typedef struct nav_msgs__msg__Odometry__Sequence +{ + nav_msgs__msg__Odometry * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} nav_msgs__msg__Odometry__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.hpp similarity index 93% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.hpp index c81f76ba7..ee84b8f6f 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_HPP_ #define NAV_MSGS__MSG__DETAIL__ODOMETRY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -70,7 +71,7 @@ struct Odometry_ std_msgs::msg::Header_; _header_type header; using _child_frame_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _child_frame_id_type child_frame_id; using _pose_type = geometry_msgs::msg::PoseWithCovariance_; @@ -87,7 +88,7 @@ struct Odometry_ return *this; } Type & set__child_frame_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->child_frame_id = _arg; return *this; diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__traits.hpp new file mode 100644 index 000000000..c4dac347d --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__traits.hpp @@ -0,0 +1,165 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:msg/Odometry.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ +#define NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/msg/detail/odometry__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose_with_covariance__traits.hpp" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist_with_covariance__traits.hpp" + +namespace nav_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Odometry & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: child_frame_id + { + out << "child_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.child_frame_id, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: twist + { + out << "twist: "; + to_flow_style_yaml(msg.twist, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Odometry & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: child_frame_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "child_frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.child_frame_id, out); + out << "\n"; + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "twist:\n"; + to_block_style_yaml(msg.twist, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Odometry & 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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::msg::Odometry & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::msg::Odometry & msg) +{ + return nav_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::msg::Odometry"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/msg/Odometry"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__MSG__DETAIL__ODOMETRY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.c new file mode 100644 index 000000000..a7be13906 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.c @@ -0,0 +1,156 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:msg/Odometry.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/msg/detail/odometry__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/msg/detail/odometry__functions.h" +#include "nav_msgs/msg/detail/odometry__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `child_frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `pose` +#include "geometry_msgs/msg/pose_with_covariance.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose_with_covariance__rosidl_typesupport_introspection_c.h" +// Member `twist` +#include "geometry_msgs/msg/twist_with_covariance.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist_with_covariance__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_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; + nav_msgs__msg__Odometry__init(message_memory); +} + +void nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_fini_function(void * message_memory) +{ + nav_msgs__msg__Odometry__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[4] = { + { + "header", // 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(nav_msgs__msg__Odometry, header), // 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 + }, + { + "child_frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__Odometry, child_frame_id), // 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 + }, + { + "pose", // 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(nav_msgs__msg__Odometry, pose), // 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 + }, + { + "twist", // 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(nav_msgs__msg__Odometry, twist), // 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 nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_members = { + "nav_msgs__msg", // message namespace + "Odometry", // message name + 4, // number of fields + sizeof(nav_msgs__msg__Odometry), + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array, // message members + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_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 nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle = { + 0, + &nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Odometry)() { + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovariance)(); + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TwistWithCovariance)(); + if (!nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle.typesupport_identifier) { + nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__msg__Odometry__rosidl_typesupport_introspection_c__Odometry_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.cpp index 57a030106..c9a67f2a3 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Odometry_mess 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Odometry_mess 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Odometry_mess 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Odometry_mess 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 } }; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/odometry__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.hpp new file mode 100644 index 000000000..426a77b6a --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/odometry__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:msg/Odometry.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__ODOMETRY__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__MSG__DETAIL__ODOMETRY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + msg, + Odometry +)(); +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__ODOMETRY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__builder.hpp similarity index 95% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__builder.hpp index 101d513dd..0dce540f9 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__MSG__DETAIL__PATH__BUILDER_HPP_ #define NAV_MSGS__MSG__DETAIL__PATH__BUILDER_HPP_ -#include "nav_msgs/msg/detail/path__struct.hpp" -#include #include #include +#include "nav_msgs/msg/detail/path__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__functions.c similarity index 91% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__functions.c index 892b299f0..d2f4f947b 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__functions.c @@ -237,22 +237,27 @@ nav_msgs__msg__Path__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__msg__Path); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__msg__Path * data = - (nav_msgs__msg__Path *)realloc(output->data, allocation_size); + (nav_msgs__msg__Path *)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 (!nav_msgs__msg__Path__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__msg__Path__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; ) { - nav_msgs__msg__Path__fini(&data[i]); + nav_msgs__msg__Path__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h index a4a1ccbfa..1e161f792 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__msg__Path( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__msg__Path( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp index d8d5cf95f..32fc9c177 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_Path( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.h similarity index 83% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.h index e59650ace..4d7e087ab 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.h @@ -23,10 +23,15 @@ extern "C" // Member 'poses' #include "geometry_msgs/msg/detail/pose_stamped__struct.h" -// Struct defined in msg/Path in the package nav_msgs. +/// Struct defined in msg/Path in the package nav_msgs. +/** + * An array of poses that represents a Path for a robot to follow. + */ typedef struct nav_msgs__msg__Path { + /// Indicates the frame_id of the path. std_msgs__msg__Header header; + /// Array of poses to follow. geometry_msgs__msg__PoseStamped__Sequence poses; } nav_msgs__msg__Path; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.hpp similarity index 90% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.hpp index 52ac7421d..1240fa042 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__MSG__DETAIL__PATH__STRUCT_HPP_ #define NAV_MSGS__MSG__DETAIL__PATH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -55,7 +56,7 @@ struct Path_ std_msgs::msg::Header_; _header_type header; using _poses_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _poses_type poses; // setters for named parameter idiom @@ -66,7 +67,7 @@ struct Path_ return *this; } Type & set__poses( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->poses = _arg; return *this; diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__traits.hpp new file mode 100644 index 000000000..930af7cfb --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__traits.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:msg/Path.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ +#define NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/msg/detail/path__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'poses' +#include "geometry_msgs/msg/detail/pose_stamped__traits.hpp" + +namespace nav_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Path & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: poses + { + if (msg.poses.size() == 0) { + out << "poses: []"; + } else { + out << "poses: ["; + size_t pending_items = msg.poses.size(); + for (auto item : msg.poses) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Path & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: poses + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.poses.size() == 0) { + out << "poses: []\n"; + } else { + out << "poses:\n"; + for (auto item : msg.poses) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Path & 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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::msg::Path & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::msg::Path & msg) +{ + return nav_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::msg::Path"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/msg/Path"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__MSG__DETAIL__PATH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.c new file mode 100644 index 000000000..c6b67eb2c --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:msg/Path.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/msg/detail/path__functions.h" +#include "nav_msgs/msg/detail/path__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `poses` +#include "geometry_msgs/msg/pose_stamped.h" +// Member `poses` +#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_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; + nav_msgs__msg__Path__init(message_memory); +} + +void nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_fini_function(void * message_memory) +{ + nav_msgs__msg__Path__fini(message_memory); +} + +size_t nav_msgs__msg__Path__rosidl_typesupport_introspection_c__size_function__Path__poses( + const void * untyped_member) +{ + const geometry_msgs__msg__PoseStamped__Sequence * member = + (const geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); + return member->size; +} + +const void * nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_const_function__Path__poses( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__PoseStamped__Sequence * member = + (const geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_function__Path__poses( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__PoseStamped__Sequence * member = + (geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); + return &member->data[index]; +} + +void nav_msgs__msg__Path__rosidl_typesupport_introspection_c__fetch_function__Path__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__PoseStamped * item = + ((const geometry_msgs__msg__PoseStamped *) + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_const_function__Path__poses(untyped_member, index)); + geometry_msgs__msg__PoseStamped * value = + (geometry_msgs__msg__PoseStamped *)(untyped_value); + *value = *item; +} + +void nav_msgs__msg__Path__rosidl_typesupport_introspection_c__assign_function__Path__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__PoseStamped * item = + ((geometry_msgs__msg__PoseStamped *) + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_function__Path__poses(untyped_member, index)); + const geometry_msgs__msg__PoseStamped * value = + (const geometry_msgs__msg__PoseStamped *)(untyped_value); + *item = *value; +} + +bool nav_msgs__msg__Path__rosidl_typesupport_introspection_c__resize_function__Path__poses( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__PoseStamped__Sequence * member = + (geometry_msgs__msg__PoseStamped__Sequence *)(untyped_member); + geometry_msgs__msg__PoseStamped__Sequence__fini(member); + return geometry_msgs__msg__PoseStamped__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_member_array[2] = { + { + "header", // 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(nav_msgs__msg__Path, header), // 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 + }, + { + "poses", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__msg__Path, poses), // bytes offset in struct + NULL, // default value + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__size_function__Path__poses, // size() function pointer + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_const_function__Path__poses, // get_const(index) function pointer + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__get_function__Path__poses, // get(index) function pointer + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__fetch_function__Path__poses, // fetch(index, &value) function pointer + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__assign_function__Path__poses, // assign(index, value) function pointer + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__resize_function__Path__poses // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_members = { + "nav_msgs__msg", // message namespace + "Path", // message name + 2, // number of fields + sizeof(nav_msgs__msg__Path), + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_member_array, // message members + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_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 nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle = { + 0, + &nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Path)() { + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); + if (!nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle.typesupport_identifier) { + nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__msg__Path__rosidl_typesupport_introspection_c__Path_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.cpp index 2b83858f9..085fddfdf 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Path__poses(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Path__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Path__poses(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Path__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Path__poses(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Path__poses(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Path_message_ 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Path_message_ size_function__Path__poses, // size() function pointer get_const_function__Path__poses, // get_const(index) function pointer get_function__Path__poses, // get(index) function pointer + fetch_function__Path__poses, // fetch(index, &value) function pointer + assign_function__Path__poses, // assign(index, value) function pointer resize_function__Path__poses // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/detail/path__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.hpp new file mode 100644 index 000000000..3e7125cc7 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/detail/path__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:msg/Path.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__MSG__DETAIL__PATH__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__MSG__DETAIL__PATH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + msg, + Path +)(); +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__DETAIL__PATH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/grid_cells.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/grid_cells.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/grid_cells.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/grid_cells.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/grid_cells.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/grid_cells.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/msg/grid_cells.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/grid_cells.hpp index bc5e2d866..fa0bda80a 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/grid_cells.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/grid_cells.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/msg/detail/grid_cells__struct.hpp" #include "nav_msgs/msg/detail/grid_cells__builder.hpp" #include "nav_msgs/msg/detail/grid_cells__traits.hpp" +#include "nav_msgs/msg/detail/grid_cells__type_support.hpp" #endif // NAV_MSGS__MSG__GRID_CELLS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/map_meta_data.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/map_meta_data.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/map_meta_data.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/map_meta_data.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/map_meta_data.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/map_meta_data.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/msg/map_meta_data.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/map_meta_data.hpp index afb90e999..1607c9c29 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/map_meta_data.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/map_meta_data.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/msg/detail/map_meta_data__struct.hpp" #include "nav_msgs/msg/detail/map_meta_data__builder.hpp" #include "nav_msgs/msg/detail/map_meta_data__traits.hpp" +#include "nav_msgs/msg/detail/map_meta_data__type_support.hpp" #endif // NAV_MSGS__MSG__MAP_META_DATA_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/occupancy_grid.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/occupancy_grid.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/occupancy_grid.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/occupancy_grid.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/occupancy_grid.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/occupancy_grid.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/msg/occupancy_grid.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/occupancy_grid.hpp index c4a98ab2f..1ca7eecef 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/occupancy_grid.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/occupancy_grid.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" #include "nav_msgs/msg/detail/occupancy_grid__builder.hpp" #include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" +#include "nav_msgs/msg/detail/occupancy_grid__type_support.hpp" #endif // NAV_MSGS__MSG__OCCUPANCY_GRID_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/odometry.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/odometry.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/odometry.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/odometry.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/odometry.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/odometry.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/msg/odometry.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/odometry.hpp index 1722dfa9b..5eaffcc5f 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/odometry.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/odometry.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/msg/detail/odometry__struct.hpp" #include "nav_msgs/msg/detail/odometry__builder.hpp" #include "nav_msgs/msg/detail/odometry__traits.hpp" +#include "nav_msgs/msg/detail/odometry__type_support.hpp" #endif // NAV_MSGS__MSG__ODOMETRY_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/path.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/path.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/path.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/path.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/path.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/path.hpp similarity index 87% rename from ThirdParty/ros/include/nav_msgs/msg/path.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/path.hpp index 276b4de8a..652141500 100644 --- a/ThirdParty/ros/include/nav_msgs/msg/path.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/path.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/msg/detail/path__struct.hpp" #include "nav_msgs/msg/detail/path__builder.hpp" #include "nav_msgs/msg/detail/path__traits.hpp" +#include "nav_msgs/msg/detail/path__type_support.hpp" #endif // NAV_MSGS__MSG__PATH_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..8088c27e4 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 NAV_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define NAV_MSGS__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_nav_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_nav_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_nav_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_nav_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_nav_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_nav_msgs ROSIDL_GENERATOR_CPP_EXPORT_nav_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_nav_msgs ROSIDL_GENERATOR_CPP_IMPORT_nav_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_nav_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_nav_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_nav_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_nav_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__builder.hpp similarity index 95% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__builder.hpp index df39eca8a..3d40ee9a7 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__SRV__DETAIL__GET_MAP__BUILDER_HPP_ #define NAV_MSGS__SRV__DETAIL__GET_MAP__BUILDER_HPP_ -#include "nav_msgs/srv/detail/get_map__struct.hpp" -#include #include #include +#include "nav_msgs/srv/detail/get_map__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__functions.c similarity index 90% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__functions.c index 58ce9d8e4..05a505c9a 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__functions.c @@ -200,22 +200,27 @@ nav_msgs__srv__GetMap_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__GetMap_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__GetMap_Request * data = - (nav_msgs__srv__GetMap_Request *)realloc(output->data, allocation_size); + (nav_msgs__srv__GetMap_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 (!nav_msgs__srv__GetMap_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__GetMap_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; ) { - nav_msgs__srv__GetMap_Request__fini(&data[i]); + nav_msgs__srv__GetMap_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -435,22 +440,27 @@ nav_msgs__srv__GetMap_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__GetMap_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__GetMap_Response * data = - (nav_msgs__srv__GetMap_Response *)realloc(output->data, allocation_size); + (nav_msgs__srv__GetMap_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 (!nav_msgs__srv__GetMap_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__GetMap_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; ) { - nav_msgs__srv__GetMap_Response__fini(&data[i]); + nav_msgs__srv__GetMap_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h index 822223c36..49c7627dc 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__srv__GetMap_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__GetMap_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_nav_msgs__srv__GetMap_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__GetMap_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp index cbbb9f633..ffb469f23 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_GetMap_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_GetMap_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.h similarity index 92% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.h index df3b92511..638929643 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/GetMap in the package nav_msgs. +/// Struct defined in srv/GetMap in the package nav_msgs. typedef struct nav_msgs__srv__GetMap_Request { uint8_t structure_needs_at_least_one_member; @@ -40,7 +40,7 @@ typedef struct nav_msgs__srv__GetMap_Request__Sequence // Member 'map' #include "nav_msgs/msg/detail/occupancy_grid__struct.h" -// Struct defined in srv/GetMap in the package nav_msgs. +/// Struct defined in srv/GetMap in the package nav_msgs. typedef struct nav_msgs__srv__GetMap_Response { nav_msgs__msg__OccupancyGrid map; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.hpp similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.hpp index 08da6aff9..080dd30d9 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__SRV__DETAIL__GET_MAP__STRUCT_HPP_ #define NAV_MSGS__SRV__DETAIL__GET_MAP__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__nav_msgs__srv__GetMap_Request __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__traits.hpp new file mode 100644 index 000000000..dff9627ae --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__traits.hpp @@ -0,0 +1,248 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:srv/GetMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ +#define NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/srv/detail/get_map__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetMap_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::GetMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::GetMap_Request & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetMap_Request"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetMap_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'map' +#include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetMap_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: map + { + out << "map: "; + to_flow_style_yaml(msg.map, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: map + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "map:\n"; + to_block_style_yaml(msg.map, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::GetMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::GetMap_Response & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetMap_Response"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetMap_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetMap"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetMap"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.c new file mode 100644 index 000000000..2fd698387 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.c @@ -0,0 +1,236 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:srv/GetMap.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/srv/detail/get_map__functions.h" +#include "nav_msgs/srv/detail/get_map__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_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; + nav_msgs__srv__GetMap_Request__init(message_memory); +} + +void nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_fini_function(void * message_memory) +{ + nav_msgs__srv__GetMap_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__srv__GetMap_Request, structure_needs_at_least_one_member), // 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 nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_members = { + "nav_msgs__srv", // message namespace + "GetMap_Request", // message name + 1, // number of fields + sizeof(nav_msgs__srv__GetMap_Request), + nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_member_array, // message members + nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_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 nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle = { + 0, + &nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Request)() { + if (!nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h" +// already included above +// #include "nav_msgs/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 "nav_msgs/srv/detail/get_map__functions.h" +// already included above +// #include "nav_msgs/srv/detail/get_map__struct.h" + + +// Include directives for member types +// Member `map` +#include "nav_msgs/msg/occupancy_grid.h" +// Member `map` +#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_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; + nav_msgs__srv__GetMap_Response__init(message_memory); +} + +void nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_fini_function(void * message_memory) +{ + nav_msgs__srv__GetMap_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array[1] = { + { + "map", // 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(nav_msgs__srv__GetMap_Response, map), // 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 nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_members = { + "nav_msgs__srv", // message namespace + "GetMap_Response", // message name + 1, // number of fields + sizeof(nav_msgs__srv__GetMap_Response), + nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array, // message members + nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_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 nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle = { + 0, + &nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Response)() { + nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)(); + if (!nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "nav_msgs/srv/detail/get_map__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 nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_members = { + "nav_msgs__srv", // service namespace + "GetMap", // service name + // these two fields are initialized below on the first access + NULL, // request message + // nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle, + NULL // response message + // nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle = { + 0, + &nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_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, nav_msgs, srv, GetMap_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap)() { + if (!nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle.typesupport_identifier) { + nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_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, nav_msgs, srv, GetMap_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, nav_msgs, srv, GetMap_Response)()->data; + } + + return &nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.cpp similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.cpp index 03cc288ce..2aa35e06d 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetMap_Reques 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetMap_Respon 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 } }; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.hpp new file mode 100644 index 000000000..1a4b661d7 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_map__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:srv/GetMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__GET_MAP__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__SRV__DETAIL__GET_MAP__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetMap +)(); +#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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetMap_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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetMap_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // NAV_MSGS__SRV__DETAIL__GET_MAP__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__builder.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__builder.hpp index e196cd902..56d796872 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__SRV__DETAIL__GET_PLAN__BUILDER_HPP_ #define NAV_MSGS__SRV__DETAIL__GET_PLAN__BUILDER_HPP_ -#include "nav_msgs/srv/detail/get_plan__struct.hpp" -#include #include #include +#include "nav_msgs/srv/detail/get_plan__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__functions.c similarity index 91% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__functions.c index da10c16e9..f03eb2e1f 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__functions.c @@ -243,22 +243,27 @@ nav_msgs__srv__GetPlan_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__GetPlan_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__GetPlan_Request * data = - (nav_msgs__srv__GetPlan_Request *)realloc(output->data, allocation_size); + (nav_msgs__srv__GetPlan_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 (!nav_msgs__srv__GetPlan_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__GetPlan_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; ) { - nav_msgs__srv__GetPlan_Request__fini(&data[i]); + nav_msgs__srv__GetPlan_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -478,22 +483,27 @@ nav_msgs__srv__GetPlan_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__GetPlan_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__GetPlan_Response * data = - (nav_msgs__srv__GetPlan_Response *)realloc(output->data, allocation_size); + (nav_msgs__srv__GetPlan_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 (!nav_msgs__srv__GetPlan_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__GetPlan_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; ) { - nav_msgs__srv__GetPlan_Response__fini(&data[i]); + nav_msgs__srv__GetPlan_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h index 0417fc412..ca05dcec8 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__srv__GetPlan_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__GetPlan_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_nav_msgs__srv__GetPlan_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__GetPlan_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp index 9d05cba5c..e1810186a 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_GetPlan_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_GetPlan_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.h similarity index 84% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.h index 77e4cab3b..351a3a2e1 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.h @@ -22,11 +22,15 @@ extern "C" // Member 'goal' #include "geometry_msgs/msg/detail/pose_stamped__struct.h" -// Struct defined in srv/GetPlan in the package nav_msgs. +/// Struct defined in srv/GetPlan in the package nav_msgs. typedef struct nav_msgs__srv__GetPlan_Request { + /// The start pose for the plan geometry_msgs__msg__PoseStamped start; + /// The final pose of the goal position geometry_msgs__msg__PoseStamped goal; + /// If the goal is obstructed, how many meters the planner can + /// relax the constraint in x and y before failing. float tolerance; } nav_msgs__srv__GetPlan_Request; @@ -47,7 +51,7 @@ typedef struct nav_msgs__srv__GetPlan_Request__Sequence // Member 'plan' #include "nav_msgs/msg/detail/path__struct.h" -// Struct defined in srv/GetPlan in the package nav_msgs. +/// Struct defined in srv/GetPlan in the package nav_msgs. typedef struct nav_msgs__srv__GetPlan_Response { nav_msgs__msg__Path plan; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.hpp similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.hpp index 17079f86f..f4385bda0 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__SRV__DETAIL__GET_PLAN__STRUCT_HPP_ #define NAV_MSGS__SRV__DETAIL__GET_PLAN__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'start' diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__traits.hpp new file mode 100644 index 000000000..7ef877d7f --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__traits.hpp @@ -0,0 +1,296 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:srv/GetPlan.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ +#define NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/srv/detail/get_plan__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'start' +// Member 'goal' +#include "geometry_msgs/msg/detail/pose_stamped__traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetPlan_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: start + { + out << "start: "; + to_flow_style_yaml(msg.start, out); + out << ", "; + } + + // member: goal + { + out << "goal: "; + to_flow_style_yaml(msg.goal, out); + out << ", "; + } + + // member: tolerance + { + out << "tolerance: "; + rosidl_generator_traits::value_to_yaml(msg.tolerance, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetPlan_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: start + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "start:\n"; + to_block_style_yaml(msg.start, out, indentation + 2); + } + + // member: goal + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal:\n"; + to_block_style_yaml(msg.goal, out, indentation + 2); + } + + // member: tolerance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "tolerance: "; + rosidl_generator_traits::value_to_yaml(msg.tolerance, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetPlan_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::GetPlan_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::GetPlan_Request & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetPlan_Request"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetPlan_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'plan' +#include "nav_msgs/msg/detail/path__traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetPlan_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: plan + { + out << "plan: "; + to_flow_style_yaml(msg.plan, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetPlan_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: plan + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "plan:\n"; + to_block_style_yaml(msg.plan, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetPlan_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::GetPlan_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::GetPlan_Response & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetPlan_Response"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetPlan_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::GetPlan"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/GetPlan"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.c new file mode 100644 index 000000000..7dfdf063f --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.c @@ -0,0 +1,282 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:srv/GetPlan.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/srv/detail/get_plan__functions.h" +#include "nav_msgs/srv/detail/get_plan__struct.h" + + +// Include directives for member types +// Member `start` +// Member `goal` +#include "geometry_msgs/msg/pose_stamped.h" +// Member `start` +// Member `goal` +#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_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; + nav_msgs__srv__GetPlan_Request__init(message_memory); +} + +void nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_fini_function(void * message_memory) +{ + nav_msgs__srv__GetPlan_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[3] = { + { + "start", // 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(nav_msgs__srv__GetPlan_Request, start), // 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 + }, + { + "goal", // 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(nav_msgs__srv__GetPlan_Request, goal), // 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 + }, + { + "tolerance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__srv__GetPlan_Request, tolerance), // 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 nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_members = { + "nav_msgs__srv", // message namespace + "GetPlan_Request", // message name + 3, // number of fields + sizeof(nav_msgs__srv__GetPlan_Request), + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array, // message members + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_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 nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle = { + 0, + &nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Request)() { + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); + if (!nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h" +// already included above +// #include "nav_msgs/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 "nav_msgs/srv/detail/get_plan__functions.h" +// already included above +// #include "nav_msgs/srv/detail/get_plan__struct.h" + + +// Include directives for member types +// Member `plan` +#include "nav_msgs/msg/path.h" +// Member `plan` +#include "nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_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; + nav_msgs__srv__GetPlan_Response__init(message_memory); +} + +void nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_fini_function(void * message_memory) +{ + nav_msgs__srv__GetPlan_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array[1] = { + { + "plan", // 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(nav_msgs__srv__GetPlan_Response, plan), // 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 nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_members = { + "nav_msgs__srv", // message namespace + "GetPlan_Response", // message name + 1, // number of fields + sizeof(nav_msgs__srv__GetPlan_Response), + nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array, // message members + nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_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 nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle = { + 0, + &nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Response)() { + nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Path)(); + if (!nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "nav_msgs/srv/detail/get_plan__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 nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_members = { + "nav_msgs__srv", // service namespace + "GetPlan", // service name + // these two fields are initialized below on the first access + NULL, // request message + // nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle, + NULL // response message + // nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle = { + 0, + &nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_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, nav_msgs, srv, GetPlan_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan)() { + if (!nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle.typesupport_identifier) { + nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_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, nav_msgs, srv, GetPlan_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, nav_msgs, srv, GetPlan_Response)()->data; + } + + return &nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.cpp index b74b2746b..a284cd5e4 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetPlan_Reque 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetPlan_Reque 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetPlan_Reque 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 } }; @@ -198,6 +204,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetPlan_Respo 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 } }; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.hpp new file mode 100644 index 000000000..506eb5d01 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/get_plan__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:srv/GetPlan.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__GET_PLAN__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__SRV__DETAIL__GET_PLAN__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetPlan +)(); +#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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetPlan_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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + GetPlan_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // NAV_MSGS__SRV__DETAIL__GET_PLAN__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__builder.hpp new file mode 100644 index 000000000..96aef2795 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__builder.hpp @@ -0,0 +1,114 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__BUILDER_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__BUILDER_HPP_ + +#include +#include + +#include "nav_msgs/srv/detail/load_map__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace nav_msgs +{ + +namespace srv +{ + +namespace builder +{ + +class Init_LoadMap_Request_map_url +{ +public: + Init_LoadMap_Request_map_url() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::nav_msgs::srv::LoadMap_Request map_url(::nav_msgs::srv::LoadMap_Request::_map_url_type arg) + { + msg_.map_url = std::move(arg); + return std::move(msg_); + } + +private: + ::nav_msgs::srv::LoadMap_Request msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::nav_msgs::srv::LoadMap_Request>() +{ + return nav_msgs::srv::builder::Init_LoadMap_Request_map_url(); +} + +} // namespace nav_msgs + + +namespace nav_msgs +{ + +namespace srv +{ + +namespace builder +{ + +class Init_LoadMap_Response_result +{ +public: + explicit Init_LoadMap_Response_result(::nav_msgs::srv::LoadMap_Response & msg) + : msg_(msg) + {} + ::nav_msgs::srv::LoadMap_Response result(::nav_msgs::srv::LoadMap_Response::_result_type arg) + { + msg_.result = std::move(arg); + return std::move(msg_); + } + +private: + ::nav_msgs::srv::LoadMap_Response msg_; +}; + +class Init_LoadMap_Response_map +{ +public: + Init_LoadMap_Response_map() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_LoadMap_Response_result map(::nav_msgs::srv::LoadMap_Response::_map_type arg) + { + msg_.map = std::move(arg); + return Init_LoadMap_Response_result(msg_); + } + +private: + ::nav_msgs::srv::LoadMap_Response msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::nav_msgs::srv::LoadMap_Response>() +{ + return nav_msgs::srv::builder::Init_LoadMap_Response_map(); +} + +} // namespace nav_msgs + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.c new file mode 100644 index 000000000..bc1c4b261 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.c @@ -0,0 +1,498 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice +#include "nav_msgs/srv/detail/load_map__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +// Include directives for member types +// Member `map_url` +#include "rosidl_runtime_c/string_functions.h" + +bool +nav_msgs__srv__LoadMap_Request__init(nav_msgs__srv__LoadMap_Request * msg) +{ + if (!msg) { + return false; + } + // map_url + if (!rosidl_runtime_c__String__init(&msg->map_url)) { + nav_msgs__srv__LoadMap_Request__fini(msg); + return false; + } + return true; +} + +void +nav_msgs__srv__LoadMap_Request__fini(nav_msgs__srv__LoadMap_Request * msg) +{ + if (!msg) { + return; + } + // map_url + rosidl_runtime_c__String__fini(&msg->map_url); +} + +bool +nav_msgs__srv__LoadMap_Request__are_equal(const nav_msgs__srv__LoadMap_Request * lhs, const nav_msgs__srv__LoadMap_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // map_url + if (!rosidl_runtime_c__String__are_equal( + &(lhs->map_url), &(rhs->map_url))) + { + return false; + } + return true; +} + +bool +nav_msgs__srv__LoadMap_Request__copy( + const nav_msgs__srv__LoadMap_Request * input, + nav_msgs__srv__LoadMap_Request * output) +{ + if (!input || !output) { + return false; + } + // map_url + if (!rosidl_runtime_c__String__copy( + &(input->map_url), &(output->map_url))) + { + return false; + } + return true; +} + +nav_msgs__srv__LoadMap_Request * +nav_msgs__srv__LoadMap_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Request * msg = (nav_msgs__srv__LoadMap_Request *)allocator.allocate(sizeof(nav_msgs__srv__LoadMap_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(nav_msgs__srv__LoadMap_Request)); + bool success = nav_msgs__srv__LoadMap_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +nav_msgs__srv__LoadMap_Request__destroy(nav_msgs__srv__LoadMap_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + nav_msgs__srv__LoadMap_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +nav_msgs__srv__LoadMap_Request__Sequence__init(nav_msgs__srv__LoadMap_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Request * data = NULL; + + if (size) { + data = (nav_msgs__srv__LoadMap_Request *)allocator.zero_allocate(size, sizeof(nav_msgs__srv__LoadMap_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = nav_msgs__srv__LoadMap_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + nav_msgs__srv__LoadMap_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +nav_msgs__srv__LoadMap_Request__Sequence__fini(nav_msgs__srv__LoadMap_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) { + nav_msgs__srv__LoadMap_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); + } +} + +nav_msgs__srv__LoadMap_Request__Sequence * +nav_msgs__srv__LoadMap_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Request__Sequence * array = (nav_msgs__srv__LoadMap_Request__Sequence *)allocator.allocate(sizeof(nav_msgs__srv__LoadMap_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = nav_msgs__srv__LoadMap_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +nav_msgs__srv__LoadMap_Request__Sequence__destroy(nav_msgs__srv__LoadMap_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + nav_msgs__srv__LoadMap_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +nav_msgs__srv__LoadMap_Request__Sequence__are_equal(const nav_msgs__srv__LoadMap_Request__Sequence * lhs, const nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +nav_msgs__srv__LoadMap_Request__Sequence__copy( + const nav_msgs__srv__LoadMap_Request__Sequence * input, + nav_msgs__srv__LoadMap_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(nav_msgs__srv__LoadMap_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Request * data = + (nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_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; ) { + nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +// Include directives for member types +// Member `map` +#include "nav_msgs/msg/detail/occupancy_grid__functions.h" + +bool +nav_msgs__srv__LoadMap_Response__init(nav_msgs__srv__LoadMap_Response * msg) +{ + if (!msg) { + return false; + } + // map + if (!nav_msgs__msg__OccupancyGrid__init(&msg->map)) { + nav_msgs__srv__LoadMap_Response__fini(msg); + return false; + } + // result + return true; +} + +void +nav_msgs__srv__LoadMap_Response__fini(nav_msgs__srv__LoadMap_Response * msg) +{ + if (!msg) { + return; + } + // map + nav_msgs__msg__OccupancyGrid__fini(&msg->map); + // result +} + +bool +nav_msgs__srv__LoadMap_Response__are_equal(const nav_msgs__srv__LoadMap_Response * lhs, const nav_msgs__srv__LoadMap_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // map + if (!nav_msgs__msg__OccupancyGrid__are_equal( + &(lhs->map), &(rhs->map))) + { + return false; + } + // result + if (lhs->result != rhs->result) { + return false; + } + return true; +} + +bool +nav_msgs__srv__LoadMap_Response__copy( + const nav_msgs__srv__LoadMap_Response * input, + nav_msgs__srv__LoadMap_Response * output) +{ + if (!input || !output) { + return false; + } + // map + if (!nav_msgs__msg__OccupancyGrid__copy( + &(input->map), &(output->map))) + { + return false; + } + // result + output->result = input->result; + return true; +} + +nav_msgs__srv__LoadMap_Response * +nav_msgs__srv__LoadMap_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Response * msg = (nav_msgs__srv__LoadMap_Response *)allocator.allocate(sizeof(nav_msgs__srv__LoadMap_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(nav_msgs__srv__LoadMap_Response)); + bool success = nav_msgs__srv__LoadMap_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +nav_msgs__srv__LoadMap_Response__destroy(nav_msgs__srv__LoadMap_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + nav_msgs__srv__LoadMap_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +nav_msgs__srv__LoadMap_Response__Sequence__init(nav_msgs__srv__LoadMap_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Response * data = NULL; + + if (size) { + data = (nav_msgs__srv__LoadMap_Response *)allocator.zero_allocate(size, sizeof(nav_msgs__srv__LoadMap_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = nav_msgs__srv__LoadMap_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + nav_msgs__srv__LoadMap_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +nav_msgs__srv__LoadMap_Response__Sequence__fini(nav_msgs__srv__LoadMap_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) { + nav_msgs__srv__LoadMap_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); + } +} + +nav_msgs__srv__LoadMap_Response__Sequence * +nav_msgs__srv__LoadMap_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Response__Sequence * array = (nav_msgs__srv__LoadMap_Response__Sequence *)allocator.allocate(sizeof(nav_msgs__srv__LoadMap_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = nav_msgs__srv__LoadMap_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +nav_msgs__srv__LoadMap_Response__Sequence__destroy(nav_msgs__srv__LoadMap_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + nav_msgs__srv__LoadMap_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +nav_msgs__srv__LoadMap_Response__Sequence__are_equal(const nav_msgs__srv__LoadMap_Response__Sequence * lhs, const nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +nav_msgs__srv__LoadMap_Response__Sequence__copy( + const nav_msgs__srv__LoadMap_Response__Sequence * input, + nav_msgs__srv__LoadMap_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(nav_msgs__srv__LoadMap_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + nav_msgs__srv__LoadMap_Response * data = + (nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_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; ) { + nav_msgs__srv__LoadMap_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 (!nav_msgs__srv__LoadMap_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.h new file mode 100644 index 000000000..ca7f01e8d --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__functions.h @@ -0,0 +1,329 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__FUNCTIONS_H_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "nav_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "nav_msgs/srv/detail/load_map__struct.h" + +/// Initialize srv/LoadMap 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( + * nav_msgs__srv__LoadMap_Request + * )) before or use + * nav_msgs__srv__LoadMap_Request__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__init(nav_msgs__srv__LoadMap_Request * msg); + +/// Finalize srv/LoadMap message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +void +nav_msgs__srv__LoadMap_Request__fini(nav_msgs__srv__LoadMap_Request * msg); + +/// Create srv/LoadMap message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * nav_msgs__srv__LoadMap_Request__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +nav_msgs__srv__LoadMap_Request * +nav_msgs__srv__LoadMap_Request__create(); + +/// Destroy srv/LoadMap message. +/** + * It calls + * nav_msgs__srv__LoadMap_Request__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +void +nav_msgs__srv__LoadMap_Request__destroy(nav_msgs__srv__LoadMap_Request * msg); + +/// Check for srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__are_equal(const nav_msgs__srv__LoadMap_Request * lhs, const nav_msgs__srv__LoadMap_Request * rhs); + +/// Copy a srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__copy( + const nav_msgs__srv__LoadMap_Request * input, + nav_msgs__srv__LoadMap_Request * output); + +/// Initialize array of srv/LoadMap messages. +/** + * It allocates the memory for the number of elements and calls + * nav_msgs__srv__LoadMap_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_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__Sequence__init(nav_msgs__srv__LoadMap_Request__Sequence * array, size_t size); + +/// Finalize array of srv/LoadMap messages. +/** + * It calls + * nav_msgs__srv__LoadMap_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_nav_msgs +void +nav_msgs__srv__LoadMap_Request__Sequence__fini(nav_msgs__srv__LoadMap_Request__Sequence * array); + +/// Create array of srv/LoadMap messages. +/** + * It allocates the memory for the array and calls + * nav_msgs__srv__LoadMap_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_nav_msgs +nav_msgs__srv__LoadMap_Request__Sequence * +nav_msgs__srv__LoadMap_Request__Sequence__create(size_t size); + +/// Destroy array of srv/LoadMap messages. +/** + * It calls + * nav_msgs__srv__LoadMap_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_nav_msgs +void +nav_msgs__srv__LoadMap_Request__Sequence__destroy(nav_msgs__srv__LoadMap_Request__Sequence * array); + +/// Check for srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__Sequence__are_equal(const nav_msgs__srv__LoadMap_Request__Sequence * lhs, const nav_msgs__srv__LoadMap_Request__Sequence * rhs); + +/// Copy an array of srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Request__Sequence__copy( + const nav_msgs__srv__LoadMap_Request__Sequence * input, + nav_msgs__srv__LoadMap_Request__Sequence * output); + +/// Initialize srv/LoadMap 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( + * nav_msgs__srv__LoadMap_Response + * )) before or use + * nav_msgs__srv__LoadMap_Response__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__init(nav_msgs__srv__LoadMap_Response * msg); + +/// Finalize srv/LoadMap message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +void +nav_msgs__srv__LoadMap_Response__fini(nav_msgs__srv__LoadMap_Response * msg); + +/// Create srv/LoadMap message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * nav_msgs__srv__LoadMap_Response__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +nav_msgs__srv__LoadMap_Response * +nav_msgs__srv__LoadMap_Response__create(); + +/// Destroy srv/LoadMap message. +/** + * It calls + * nav_msgs__srv__LoadMap_Response__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +void +nav_msgs__srv__LoadMap_Response__destroy(nav_msgs__srv__LoadMap_Response * msg); + +/// Check for srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__are_equal(const nav_msgs__srv__LoadMap_Response * lhs, const nav_msgs__srv__LoadMap_Response * rhs); + +/// Copy a srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__copy( + const nav_msgs__srv__LoadMap_Response * input, + nav_msgs__srv__LoadMap_Response * output); + +/// Initialize array of srv/LoadMap messages. +/** + * It allocates the memory for the number of elements and calls + * nav_msgs__srv__LoadMap_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_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__Sequence__init(nav_msgs__srv__LoadMap_Response__Sequence * array, size_t size); + +/// Finalize array of srv/LoadMap messages. +/** + * It calls + * nav_msgs__srv__LoadMap_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_nav_msgs +void +nav_msgs__srv__LoadMap_Response__Sequence__fini(nav_msgs__srv__LoadMap_Response__Sequence * array); + +/// Create array of srv/LoadMap messages. +/** + * It allocates the memory for the array and calls + * nav_msgs__srv__LoadMap_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_nav_msgs +nav_msgs__srv__LoadMap_Response__Sequence * +nav_msgs__srv__LoadMap_Response__Sequence__create(size_t size); + +/// Destroy array of srv/LoadMap messages. +/** + * It calls + * nav_msgs__srv__LoadMap_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_nav_msgs +void +nav_msgs__srv__LoadMap_Response__Sequence__destroy(nav_msgs__srv__LoadMap_Response__Sequence * array); + +/// Check for srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__Sequence__are_equal(const nav_msgs__srv__LoadMap_Response__Sequence * lhs, const nav_msgs__srv__LoadMap_Response__Sequence * rhs); + +/// Copy an array of srv/LoadMap 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_nav_msgs +bool +nav_msgs__srv__LoadMap_Response__Sequence__copy( + const nav_msgs__srv__LoadMap_Response__Sequence * input, + nav_msgs__srv__LoadMap_Response__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..4ad2e3b6a --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +size_t get_serialized_size_nav_msgs__srv__LoadMap_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +size_t max_serialized_size_nav_msgs__srv__LoadMap_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, nav_msgs, srv, LoadMap_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +size_t get_serialized_size_nav_msgs__srv__LoadMap_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +size_t max_serialized_size_nav_msgs__srv__LoadMap_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, nav_msgs, srv, LoadMap_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 "nav_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, nav_msgs, srv, LoadMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..9655e88ed --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "nav_msgs/srv/detail/load_map__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 nav_msgs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +cdr_serialize( + const nav_msgs::srv::LoadMap_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + nav_msgs::srv::LoadMap_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +get_serialized_size( + const nav_msgs::srv::LoadMap_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +max_serialized_size_LoadMap_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace nav_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, nav_msgs, srv, LoadMap_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 "nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "nav_msgs/srv/detail/load_map__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 nav_msgs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +cdr_serialize( + const nav_msgs::srv::LoadMap_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + nav_msgs::srv::LoadMap_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +get_serialized_size( + const nav_msgs::srv::LoadMap_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +max_serialized_size_LoadMap_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace nav_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, nav_msgs, srv, LoadMap_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 "nav_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, nav_msgs, srv, LoadMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..25ac05d23 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_c.h @@ -0,0 +1,47 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__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 "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap_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 "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap_Response)(); + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rosidl_typesupport_interface/macros.h" +// already included above +// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..8097bd5a1 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,67 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__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, nav_msgs, srv, LoadMap_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, nav_msgs, srv, LoadMap_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, nav_msgs, srv, LoadMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.h new file mode 100644 index 000000000..b2521d8c1 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.h @@ -0,0 +1,99 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_H_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'map_url' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/LoadMap in the package nav_msgs. +typedef struct nav_msgs__srv__LoadMap_Request +{ + rosidl_runtime_c__String map_url; +} nav_msgs__srv__LoadMap_Request; + +// Struct for a sequence of nav_msgs__srv__LoadMap_Request. +typedef struct nav_msgs__srv__LoadMap_Request__Sequence +{ + nav_msgs__srv__LoadMap_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} nav_msgs__srv__LoadMap_Request__Sequence; + + +// Constants defined in the message + +/// Constant 'RESULT_SUCCESS'. +enum +{ + nav_msgs__srv__LoadMap_Response__RESULT_SUCCESS = 0 +}; + +/// Constant 'RESULT_MAP_DOES_NOT_EXIST'. +enum +{ + nav_msgs__srv__LoadMap_Response__RESULT_MAP_DOES_NOT_EXIST = 1 +}; + +/// Constant 'RESULT_INVALID_MAP_DATA'. +enum +{ + nav_msgs__srv__LoadMap_Response__RESULT_INVALID_MAP_DATA = 2 +}; + +/// Constant 'RESULT_INVALID_MAP_METADATA'. +enum +{ + nav_msgs__srv__LoadMap_Response__RESULT_INVALID_MAP_METADATA = 3 +}; + +/// Constant 'RESULT_UNDEFINED_FAILURE'. +enum +{ + nav_msgs__srv__LoadMap_Response__RESULT_UNDEFINED_FAILURE = 255 +}; + +// Include directives for member types +// Member 'map' +#include "nav_msgs/msg/detail/occupancy_grid__struct.h" + +/// Struct defined in srv/LoadMap in the package nav_msgs. +typedef struct nav_msgs__srv__LoadMap_Response +{ + /// Returned map is only valid if result equals RESULT_SUCCESS + nav_msgs__msg__OccupancyGrid map; + uint8_t result; +} nav_msgs__srv__LoadMap_Response; + +// Struct for a sequence of nav_msgs__srv__LoadMap_Response. +typedef struct nav_msgs__srv__LoadMap_Response__Sequence +{ + nav_msgs__srv__LoadMap_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} nav_msgs__srv__LoadMap_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.hpp new file mode 100644 index 000000000..73b037618 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__struct.hpp @@ -0,0 +1,313 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__nav_msgs__srv__LoadMap_Request __attribute__((deprecated)) +#else +# define DEPRECATED__nav_msgs__srv__LoadMap_Request __declspec(deprecated) +#endif + +namespace nav_msgs +{ + +namespace srv +{ + +// message struct +template +struct LoadMap_Request_ +{ + using Type = LoadMap_Request_; + + explicit LoadMap_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->map_url = ""; + } + } + + explicit LoadMap_Request_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : map_url(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->map_url = ""; + } + } + + // field types and members + using _map_url_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _map_url_type map_url; + + // setters for named parameter idiom + Type & set__map_url( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->map_url = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + nav_msgs::srv::LoadMap_Request_ *; + using ConstRawPtr = + const nav_msgs::srv::LoadMap_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__nav_msgs__srv__LoadMap_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__nav_msgs__srv__LoadMap_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const LoadMap_Request_ & other) const + { + if (this->map_url != other.map_url) { + return false; + } + return true; + } + bool operator!=(const LoadMap_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct LoadMap_Request_ + +// alias to use template instance with default allocator +using LoadMap_Request = + nav_msgs::srv::LoadMap_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace nav_msgs + + +// Include directives for member types +// Member 'map' +#include "nav_msgs/msg/detail/occupancy_grid__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__nav_msgs__srv__LoadMap_Response __attribute__((deprecated)) +#else +# define DEPRECATED__nav_msgs__srv__LoadMap_Response __declspec(deprecated) +#endif + +namespace nav_msgs +{ + +namespace srv +{ + +// message struct +template +struct LoadMap_Response_ +{ + using Type = LoadMap_Response_; + + explicit LoadMap_Response_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : map(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->result = 0; + } + } + + explicit LoadMap_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : map(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->result = 0; + } + } + + // field types and members + using _map_type = + nav_msgs::msg::OccupancyGrid_; + _map_type map; + using _result_type = + uint8_t; + _result_type result; + + // setters for named parameter idiom + Type & set__map( + const nav_msgs::msg::OccupancyGrid_ & _arg) + { + this->map = _arg; + return *this; + } + Type & set__result( + const uint8_t & _arg) + { + this->result = _arg; + return *this; + } + + // constant declarations + static constexpr uint8_t RESULT_SUCCESS = + 0u; + static constexpr uint8_t RESULT_MAP_DOES_NOT_EXIST = + 1u; + static constexpr uint8_t RESULT_INVALID_MAP_DATA = + 2u; + static constexpr uint8_t RESULT_INVALID_MAP_METADATA = + 3u; + static constexpr uint8_t RESULT_UNDEFINED_FAILURE = + 255u; + + // pointer types + using RawPtr = + nav_msgs::srv::LoadMap_Response_ *; + using ConstRawPtr = + const nav_msgs::srv::LoadMap_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__nav_msgs__srv__LoadMap_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__nav_msgs__srv__LoadMap_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const LoadMap_Response_ & other) const + { + if (this->map != other.map) { + return false; + } + if (this->result != other.result) { + return false; + } + return true; + } + bool operator!=(const LoadMap_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct LoadMap_Response_ + +// alias to use template instance with default allocator +using LoadMap_Response = + nav_msgs::srv::LoadMap_Response_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t LoadMap_Response_::RESULT_SUCCESS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t LoadMap_Response_::RESULT_MAP_DOES_NOT_EXIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t LoadMap_Response_::RESULT_INVALID_MAP_DATA; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t LoadMap_Response_::RESULT_INVALID_MAP_METADATA; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t LoadMap_Response_::RESULT_UNDEFINED_FAILURE; +#endif // __cplusplus < 201703L + +} // namespace srv + +} // namespace nav_msgs + +namespace nav_msgs +{ + +namespace srv +{ + +struct LoadMap +{ + using Request = nav_msgs::srv::LoadMap_Request; + using Response = nav_msgs::srv::LoadMap_Response; +}; + +} // namespace srv + +} // namespace nav_msgs + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__traits.hpp new file mode 100644 index 000000000..a5adb401e --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__traits.hpp @@ -0,0 +1,276 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__TRAITS_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/srv/detail/load_map__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const LoadMap_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: map_url + { + out << "map_url: "; + rosidl_generator_traits::value_to_yaml(msg.map_url, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LoadMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: map_url + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "map_url: "; + rosidl_generator_traits::value_to_yaml(msg.map_url, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LoadMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::LoadMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::LoadMap_Request & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::LoadMap_Request"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/LoadMap_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'map' +#include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const LoadMap_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: map + { + out << "map: "; + to_flow_style_yaml(msg.map, out); + out << ", "; + } + + // member: result + { + out << "result: "; + rosidl_generator_traits::value_to_yaml(msg.result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LoadMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: map + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "map:\n"; + to_block_style_yaml(msg.map, out, indentation + 2); + } + + // member: result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "result: "; + rosidl_generator_traits::value_to_yaml(msg.result, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LoadMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::LoadMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::LoadMap_Response & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::LoadMap_Response"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/LoadMap_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::LoadMap"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/LoadMap"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.c new file mode 100644 index 000000000..cf2b64bea --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.c @@ -0,0 +1,257 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/srv/detail/load_map__functions.h" +#include "nav_msgs/srv/detail/load_map__struct.h" + + +// Include directives for member types +// Member `map_url` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_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; + nav_msgs__srv__LoadMap_Request__init(message_memory); +} + +void nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_fini_function(void * message_memory) +{ + nav_msgs__srv__LoadMap_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_member_array[1] = { + { + "map_url", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__srv__LoadMap_Request, map_url), // 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 nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_members = { + "nav_msgs__srv", // message namespace + "LoadMap_Request", // message name + 1, // number of fields + sizeof(nav_msgs__srv__LoadMap_Request), + nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_member_array, // message members + nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_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 nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_type_support_handle = { + 0, + &nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap_Request)() { + if (!nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__LoadMap_Request__rosidl_typesupport_introspection_c__LoadMap_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "nav_msgs/srv/detail/load_map__rosidl_typesupport_introspection_c.h" +// already included above +// #include "nav_msgs/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 "nav_msgs/srv/detail/load_map__functions.h" +// already included above +// #include "nav_msgs/srv/detail/load_map__struct.h" + + +// Include directives for member types +// Member `map` +#include "nav_msgs/msg/occupancy_grid.h" +// Member `map` +#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_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; + nav_msgs__srv__LoadMap_Response__init(message_memory); +} + +void nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_fini_function(void * message_memory) +{ + nav_msgs__srv__LoadMap_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_member_array[2] = { + { + "map", // 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(nav_msgs__srv__LoadMap_Response, map), // 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 + }, + { + "result", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__srv__LoadMap_Response, result), // 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 nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_members = { + "nav_msgs__srv", // message namespace + "LoadMap_Response", // message name + 2, // number of fields + sizeof(nav_msgs__srv__LoadMap_Response), + nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_member_array, // message members + nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_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 nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_type_support_handle = { + 0, + &nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap_Response)() { + nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)(); + if (!nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__LoadMap_Response__rosidl_typesupport_introspection_c__LoadMap_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "nav_msgs/srv/detail/load_map__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 nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_service_members = { + "nav_msgs__srv", // service namespace + "LoadMap", // service name + // these two fields are initialized below on the first access + NULL, // request message + // nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_Request_message_type_support_handle, + NULL // response message + // nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_service_type_support_handle = { + 0, + &nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_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, nav_msgs, srv, LoadMap_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, LoadMap)() { + if (!nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_service_type_support_handle.typesupport_identifier) { + nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_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, nav_msgs, srv, LoadMap_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, nav_msgs, srv, LoadMap_Response)()->data; + } + + return &nav_msgs__srv__detail__load_map__rosidl_typesupport_introspection_c__LoadMap_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.cpp new file mode 100644 index 000000000..de8238467 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.cpp @@ -0,0 +1,353 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from nav_msgs:srv/LoadMap.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 "nav_msgs/srv/detail/load_map__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 nav_msgs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void LoadMap_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) nav_msgs::srv::LoadMap_Request(_init); +} + +void LoadMap_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~LoadMap_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember LoadMap_Request_message_member_array[1] = { + { + "map_url", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs::srv::LoadMap_Request, map_url), // 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 LoadMap_Request_message_members = { + "nav_msgs::srv", // message namespace + "LoadMap_Request", // message name + 1, // number of fields + sizeof(nav_msgs::srv::LoadMap_Request), + LoadMap_Request_message_member_array, // message members + LoadMap_Request_init_function, // function to initialize message memory (memory has to be allocated) + LoadMap_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t LoadMap_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LoadMap_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace nav_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::nav_msgs::srv::rosidl_typesupport_introspection_cpp::LoadMap_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, nav_msgs, srv, LoadMap_Request)() { + return &::nav_msgs::srv::rosidl_typesupport_introspection_cpp::LoadMap_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 "nav_msgs/srv/detail/load_map__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 nav_msgs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void LoadMap_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) nav_msgs::srv::LoadMap_Response(_init); +} + +void LoadMap_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~LoadMap_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember LoadMap_Response_message_member_array[2] = { + { + "map", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs::srv::LoadMap_Response, map), // 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 + }, + { + "result", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs::srv::LoadMap_Response, result), // 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 LoadMap_Response_message_members = { + "nav_msgs::srv", // message namespace + "LoadMap_Response", // message name + 2, // number of fields + sizeof(nav_msgs::srv::LoadMap_Response), + LoadMap_Response_message_member_array, // message members + LoadMap_Response_init_function, // function to initialize message memory (memory has to be allocated) + LoadMap_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t LoadMap_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LoadMap_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace nav_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::nav_msgs::srv::rosidl_typesupport_introspection_cpp::LoadMap_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, nav_msgs, srv, LoadMap_Response)() { + return &::nav_msgs::srv::rosidl_typesupport_introspection_cpp::LoadMap_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 "nav_msgs/srv/detail/load_map__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 nav_msgs +{ + +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 LoadMap_service_members = { + "nav_msgs::srv", // service namespace + "LoadMap", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t LoadMap_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LoadMap_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace nav_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::nav_msgs::srv::rosidl_typesupport_introspection_cpp::LoadMap_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( + 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< + ::nav_msgs::srv::LoadMap_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< + ::nav_msgs::srv::LoadMap_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, nav_msgs, srv, LoadMap)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.h new file mode 100644 index 000000000..e5fd03da7 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.h @@ -0,0 +1,58 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_H_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + nav_msgs, + srv, + LoadMap_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_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + nav_msgs, + srv, + LoadMap_Response +)(); + +#include "rosidl_runtime_c/service_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_c, + nav_msgs, + srv, + LoadMap +)(); + +#ifdef __cplusplus +} +#endif + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.hpp new file mode 100644 index 000000000..5c62709c6 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/load_map__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + LoadMap +)(); +#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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + LoadMap_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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + LoadMap_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // NAV_MSGS__SRV__DETAIL__LOAD_MAP__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__builder.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__builder.hpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__builder.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__builder.hpp index ac530396a..c6f27f4f5 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__builder.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__builder.hpp @@ -5,11 +5,12 @@ #ifndef NAV_MSGS__SRV__DETAIL__SET_MAP__BUILDER_HPP_ #define NAV_MSGS__SRV__DETAIL__SET_MAP__BUILDER_HPP_ -#include "nav_msgs/srv/detail/set_map__struct.hpp" -#include #include #include +#include "nav_msgs/srv/detail/set_map__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace nav_msgs { diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__functions.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__functions.c similarity index 90% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__functions.c rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__functions.c index 0d4e951ad..3b50ff782 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__functions.c +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__functions.c @@ -236,22 +236,27 @@ nav_msgs__srv__SetMap_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__SetMap_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__SetMap_Request * data = - (nav_msgs__srv__SetMap_Request *)realloc(output->data, allocation_size); + (nav_msgs__srv__SetMap_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 (!nav_msgs__srv__SetMap_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__SetMap_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; ) { - nav_msgs__srv__SetMap_Request__fini(&data[i]); + nav_msgs__srv__SetMap_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -456,22 +461,27 @@ nav_msgs__srv__SetMap_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(nav_msgs__srv__SetMap_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); nav_msgs__srv__SetMap_Response * data = - (nav_msgs__srv__SetMap_Response *)realloc(output->data, allocation_size); + (nav_msgs__srv__SetMap_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 (!nav_msgs__srv__SetMap_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!nav_msgs__srv__SetMap_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; ) { - nav_msgs__srv__SetMap_Response__fini(&data[i]); + nav_msgs__srv__SetMap_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__functions.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__functions.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__functions.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__functions.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h index 30aec2053..8838d5608 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_nav_msgs__srv__SetMap_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__SetMap_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_nav_msgs__srv__SetMap_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs size_t max_serialized_size_nav_msgs__srv__SetMap_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_nav_msgs diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp index a5f3699a3..6bec8c375 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_SetMap_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_nav_msgs max_serialized_size_SetMap_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.h similarity index 86% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.h index e5739c05e..2ccf7c841 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.h +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.h @@ -23,10 +23,12 @@ extern "C" // Member 'initial_pose' #include "geometry_msgs/msg/detail/pose_with_covariance_stamped__struct.h" -// Struct defined in srv/SetMap in the package nav_msgs. +/// Struct defined in srv/SetMap in the package nav_msgs. typedef struct nav_msgs__srv__SetMap_Request { + /// Requested 2D map to be set. nav_msgs__msg__OccupancyGrid map; + /// Estimated initial pose when setting new map. geometry_msgs__msg__PoseWithCovarianceStamped initial_pose; } nav_msgs__srv__SetMap_Request; @@ -43,9 +45,10 @@ typedef struct nav_msgs__srv__SetMap_Request__Sequence // Constants defined in the message -// Struct defined in srv/SetMap in the package nav_msgs. +/// Struct defined in srv/SetMap in the package nav_msgs. typedef struct nav_msgs__srv__SetMap_Response { + /// True if the map was successfully set, false otherwise. bool success; } nav_msgs__srv__SetMap_Response; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.hpp similarity index 98% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.hpp index 71cf6044b..afce11306 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__struct.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__struct.hpp @@ -5,14 +5,15 @@ #ifndef NAV_MSGS__SRV__DETAIL__SET_MAP__STRUCT_HPP_ #define NAV_MSGS__SRV__DETAIL__SET_MAP__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'map' diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__traits.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__traits.hpp new file mode 100644 index 000000000..79edf32ba --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__traits.hpp @@ -0,0 +1,277 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from nav_msgs:srv/SetMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ +#define NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "nav_msgs/srv/detail/set_map__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'map' +#include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" +// Member 'initial_pose' +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp" + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetMap_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: map + { + out << "map: "; + to_flow_style_yaml(msg.map, out); + out << ", "; + } + + // member: initial_pose + { + out << "initial_pose: "; + to_flow_style_yaml(msg.initial_pose, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: map + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "map:\n"; + to_block_style_yaml(msg.map, out, indentation + 2); + } + + // member: initial_pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "initial_pose:\n"; + to_block_style_yaml(msg.initial_pose, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::SetMap_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::SetMap_Request & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::SetMap_Request"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/SetMap_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace nav_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetMap_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetMap_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 nav_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use nav_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const nav_msgs::srv::SetMap_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + nav_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use nav_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const nav_msgs::srv::SetMap_Response & msg) +{ + return nav_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::SetMap_Response"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/SetMap_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "nav_msgs::srv::SetMap"; +} + +template<> +inline const char * name() +{ + return "nav_msgs/srv/SetMap"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.c b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.c new file mode 100644 index 000000000..4ccedee9d --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.c @@ -0,0 +1,259 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from nav_msgs:srv/SetMap.idl +// generated code does not contain a copyright notice + +#include +#include "nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h" +#include "nav_msgs/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 "nav_msgs/srv/detail/set_map__functions.h" +#include "nav_msgs/srv/detail/set_map__struct.h" + + +// Include directives for member types +// Member `map` +#include "nav_msgs/msg/occupancy_grid.h" +// Member `map` +#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" +// Member `initial_pose` +#include "geometry_msgs/msg/pose_with_covariance_stamped.h" +// Member `initial_pose` +#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_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; + nav_msgs__srv__SetMap_Request__init(message_memory); +} + +void nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_fini_function(void * message_memory) +{ + nav_msgs__srv__SetMap_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[2] = { + { + "map", // 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(nav_msgs__srv__SetMap_Request, map), // 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 + }, + { + "initial_pose", // 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(nav_msgs__srv__SetMap_Request, initial_pose), // 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 nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_members = { + "nav_msgs__srv", // message namespace + "SetMap_Request", // message name + 2, // number of fields + sizeof(nav_msgs__srv__SetMap_Request), + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array, // message members + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_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 nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle = { + 0, + &nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Request)() { + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)(); + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovarianceStamped)(); + if (!nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h" +// already included above +// #include "nav_msgs/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 "nav_msgs/srv/detail/set_map__functions.h" +// already included above +// #include "nav_msgs/srv/detail/set_map__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_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; + nav_msgs__srv__SetMap_Response__init(message_memory); +} + +void nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_fini_function(void * message_memory) +{ + nav_msgs__srv__SetMap_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_member_array[1] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(nav_msgs__srv__SetMap_Response, success), // 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 nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_members = { + "nav_msgs__srv", // message namespace + "SetMap_Response", // message name + 1, // number of fields + sizeof(nav_msgs__srv__SetMap_Response), + nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_member_array, // message members + nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_init_function, // function to initialize message memory (memory has to be allocated) + nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_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 nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle = { + 0, + &nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Response)() { + if (!nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle.typesupport_identifier) { + nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &nav_msgs__srv__SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "nav_msgs/srv/detail/set_map__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 nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_members = { + "nav_msgs__srv", // service namespace + "SetMap", // service name + // these two fields are initialized below on the first access + NULL, // request message + // nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle, + NULL // response message + // nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle = { + 0, + &nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_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, nav_msgs, srv, SetMap_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap)() { + if (!nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle.typesupport_identifier) { + nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_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, nav_msgs, srv, SetMap_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, nav_msgs, srv, SetMap_Response)()->data; + } + + return &nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.cpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.cpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.cpp index e287892ef..a54bbd485 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.cpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetMap_Reques 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetMap_Reques 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 } }; @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetMap_Respon 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 } }; diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.h diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.hpp new file mode 100644 index 000000000..3da9862be --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/detail/set_map__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from nav_msgs:srv/SetMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__DETAIL__SET_MAP__TYPE_SUPPORT_HPP_ +#define NAV_MSGS__SRV__DETAIL__SET_MAP__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "nav_msgs/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_nav_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + SetMap +)(); +#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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + SetMap_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_nav_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + nav_msgs, + srv, + SetMap_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // NAV_MSGS__SRV__DETAIL__SET_MAP__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/get_map.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_map.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/get_map.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_map.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/get_map.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_map.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/srv/get_map.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_map.hpp index 19cf7aed3..0787c753a 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/get_map.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_map.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/srv/detail/get_map__struct.hpp" #include "nav_msgs/srv/detail/get_map__builder.hpp" #include "nav_msgs/srv/detail/get_map__traits.hpp" +#include "nav_msgs/srv/detail/get_map__type_support.hpp" #endif // NAV_MSGS__SRV__GET_MAP_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/get_plan.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_plan.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/get_plan.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_plan.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/get_plan.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_plan.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/srv/get_plan.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_plan.hpp index e2ecf3e3b..311e75558 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/get_plan.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/get_plan.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/srv/detail/get_plan__struct.hpp" #include "nav_msgs/srv/detail/get_plan__builder.hpp" #include "nav_msgs/srv/detail/get_plan__traits.hpp" +#include "nav_msgs/srv/detail/get_plan__type_support.hpp" #endif // NAV_MSGS__SRV__GET_PLAN_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.h new file mode 100644 index 000000000..01dba27b6 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from nav_msgs:srv/LoadMap.idl +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__LOAD_MAP_H_ +#define NAV_MSGS__SRV__LOAD_MAP_H_ + +#include "nav_msgs/srv/detail/load_map__struct.h" +#include "nav_msgs/srv/detail/load_map__functions.h" +#include "nav_msgs/srv/detail/load_map__type_support.h" + +#endif // NAV_MSGS__SRV__LOAD_MAP_H_ diff --git a/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.hpp new file mode 100644 index 000000000..0ddf5c442 --- /dev/null +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/load_map.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef NAV_MSGS__SRV__LOAD_MAP_HPP_ +#define NAV_MSGS__SRV__LOAD_MAP_HPP_ + +#include "nav_msgs/srv/detail/load_map__struct.hpp" +#include "nav_msgs/srv/detail/load_map__builder.hpp" +#include "nav_msgs/srv/detail/load_map__traits.hpp" +#include "nav_msgs/srv/detail/load_map__type_support.hpp" + +#endif // NAV_MSGS__SRV__LOAD_MAP_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/set_map.h b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/set_map.h similarity index 100% rename from ThirdParty/ros/include/nav_msgs/srv/set_map.h rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/set_map.h diff --git a/ThirdParty/ros/include/nav_msgs/srv/set_map.hpp b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/set_map.hpp similarity index 86% rename from ThirdParty/ros/include/nav_msgs/srv/set_map.hpp rename to ThirdParty/ros/include/nav_msgs/nav_msgs/srv/set_map.hpp index 8174d3302..dfb4abf67 100644 --- a/ThirdParty/ros/include/nav_msgs/srv/set_map.hpp +++ b/ThirdParty/ros/include/nav_msgs/nav_msgs/srv/set_map.hpp @@ -7,5 +7,6 @@ #include "nav_msgs/srv/detail/set_map__struct.hpp" #include "nav_msgs/srv/detail/set_map__builder.hpp" #include "nav_msgs/srv/detail/set_map__traits.hpp" +#include "nav_msgs/srv/detail/set_map__type_support.hpp" #endif // NAV_MSGS__SRV__SET_MAP_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__traits.hpp b/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__traits.hpp deleted file mode 100644 index 8fe86074b..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:srv/GetMap.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ -#define NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ - -#include "nav_msgs/srv/detail/get_map__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetMap_Request"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetMap_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'map' -#include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetMap_Response"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetMap_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetMap"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetMap"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__SRV__DETAIL__GET_MAP__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.c b/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.c deleted file mode 100644 index b7894ecb4..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_map__type_support.c +++ /dev/null @@ -1,232 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:srv/GetMap.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/srv/detail/get_map__functions.h" -#include "nav_msgs/srv/detail/get_map__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetMap_Request__rosidl_typesupport_introspection_c__GetMap_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; - nav_msgs__srv__GetMap_Request__init(message_memory); -} - -void GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_fini_function(void * message_memory) -{ - nav_msgs__srv__GetMap_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__srv__GetMap_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_members = { - "nav_msgs__srv", // message namespace - "GetMap_Request", // message name - 1, // number of fields - sizeof(nav_msgs__srv__GetMap_Request), - GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_member_array, // message members - GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetMap_Request__rosidl_typesupport_introspection_c__GetMap_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 GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle = { - 0, - &GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Request)() { - if (!GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle.typesupport_identifier) { - GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetMap_Request__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "nav_msgs/srv/detail/get_map__rosidl_typesupport_introspection_c.h" -// already included above -// #include "nav_msgs/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 "nav_msgs/srv/detail/get_map__functions.h" -// already included above -// #include "nav_msgs/srv/detail/get_map__struct.h" - - -// Include directives for member types -// Member `map` -#include "nav_msgs/msg/occupancy_grid.h" -// Member `map` -#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetMap_Response__rosidl_typesupport_introspection_c__GetMap_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; - nav_msgs__srv__GetMap_Response__init(message_memory); -} - -void GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_fini_function(void * message_memory) -{ - nav_msgs__srv__GetMap_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array[1] = { - { - "map", // 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(nav_msgs__srv__GetMap_Response, map), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_members = { - "nav_msgs__srv", // message namespace - "GetMap_Response", // message name - 1, // number of fields - sizeof(nav_msgs__srv__GetMap_Response), - GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array, // message members - GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetMap_Response__rosidl_typesupport_introspection_c__GetMap_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 GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle = { - 0, - &GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Response)() { - GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)(); - if (!GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle.typesupport_identifier) { - GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetMap_Response__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "nav_msgs/srv/detail/get_map__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 nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_members = { - "nav_msgs__srv", // service namespace - "GetMap", // service name - // these two fields are initialized below on the first access - NULL, // request message - // nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_Request_message_type_support_handle, - NULL // response message - // nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle = { - 0, - &nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_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, nav_msgs, srv, GetMap_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetMap)() { - if (!nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle.typesupport_identifier) { - nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_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, nav_msgs, srv, GetMap_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, nav_msgs, srv, GetMap_Response)()->data; - } - - return &nav_msgs__srv__detail__get_map__rosidl_typesupport_introspection_c__GetMap_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__traits.hpp b/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__traits.hpp deleted file mode 100644 index 7df346d4e..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__traits.hpp +++ /dev/null @@ -1,135 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:srv/GetPlan.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ -#define NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ - -#include "nav_msgs/srv/detail/get_plan__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'start' -// Member 'goal' -#include "geometry_msgs/msg/detail/pose_stamped__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetPlan_Request"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetPlan_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'plan' -#include "nav_msgs/msg/detail/path__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetPlan_Response"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetPlan_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::GetPlan"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/GetPlan"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__SRV__DETAIL__GET_PLAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.c b/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.c deleted file mode 100644 index 3e518184d..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/get_plan__type_support.c +++ /dev/null @@ -1,274 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:srv/GetPlan.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/srv/detail/get_plan__functions.h" -#include "nav_msgs/srv/detail/get_plan__struct.h" - - -// Include directives for member types -// Member `start` -// Member `goal` -#include "geometry_msgs/msg/pose_stamped.h" -// Member `start` -// Member `goal` -#include "geometry_msgs/msg/detail/pose_stamped__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_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; - nav_msgs__srv__GetPlan_Request__init(message_memory); -} - -void GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_fini_function(void * message_memory) -{ - nav_msgs__srv__GetPlan_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[3] = { - { - "start", // 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(nav_msgs__srv__GetPlan_Request, start), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "goal", // 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(nav_msgs__srv__GetPlan_Request, goal), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "tolerance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__srv__GetPlan_Request, tolerance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_members = { - "nav_msgs__srv", // message namespace - "GetPlan_Request", // message name - 3, // number of fields - sizeof(nav_msgs__srv__GetPlan_Request), - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array, // message members - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_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 GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle = { - 0, - &GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Request)() { - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseStamped)(); - if (!GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle.typesupport_identifier) { - GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetPlan_Request__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "nav_msgs/srv/detail/get_plan__rosidl_typesupport_introspection_c.h" -// already included above -// #include "nav_msgs/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 "nav_msgs/srv/detail/get_plan__functions.h" -// already included above -// #include "nav_msgs/srv/detail/get_plan__struct.h" - - -// Include directives for member types -// Member `plan` -#include "nav_msgs/msg/path.h" -// Member `plan` -#include "nav_msgs/msg/detail/path__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_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; - nav_msgs__srv__GetPlan_Response__init(message_memory); -} - -void GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_fini_function(void * message_memory) -{ - nav_msgs__srv__GetPlan_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array[1] = { - { - "plan", // 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(nav_msgs__srv__GetPlan_Response, plan), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_members = { - "nav_msgs__srv", // message namespace - "GetPlan_Response", // message name - 1, // number of fields - sizeof(nav_msgs__srv__GetPlan_Response), - GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array, // message members - GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_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 GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle = { - 0, - &GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Response)() { - GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, Path)(); - if (!GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle.typesupport_identifier) { - GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetPlan_Response__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "nav_msgs/srv/detail/get_plan__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 nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_members = { - "nav_msgs__srv", // service namespace - "GetPlan", // service name - // these two fields are initialized below on the first access - NULL, // request message - // nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_Request_message_type_support_handle, - NULL // response message - // nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle = { - 0, - &nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_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, nav_msgs, srv, GetPlan_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, GetPlan)() { - if (!nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle.typesupport_identifier) { - nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_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, nav_msgs, srv, GetPlan_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, nav_msgs, srv, GetPlan_Response)()->data; - } - - return &nav_msgs__srv__detail__get_plan__rosidl_typesupport_introspection_c__GetPlan_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__traits.hpp b/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__traits.hpp deleted file mode 100644 index 4d1eed4d9..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__traits.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from nav_msgs:srv/SetMap.idl -// generated code does not contain a copyright notice - -#ifndef NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ -#define NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ - -#include "nav_msgs/srv/detail/set_map__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'map' -#include "nav_msgs/msg/detail/occupancy_grid__traits.hpp" -// Member 'initial_pose' -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::SetMap_Request"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/SetMap_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::SetMap_Response"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/SetMap_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "nav_msgs::srv::SetMap"; -} - -template<> -inline const char * name() -{ - return "nav_msgs/srv/SetMap"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // NAV_MSGS__SRV__DETAIL__SET_MAP__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.c b/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.c deleted file mode 100644 index 6b50dd1d2..000000000 --- a/ThirdParty/ros/include/nav_msgs/srv/detail/set_map__type_support.c +++ /dev/null @@ -1,253 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from nav_msgs:srv/SetMap.idl -// generated code does not contain a copyright notice - -#include -#include "nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h" -#include "nav_msgs/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 "nav_msgs/srv/detail/set_map__functions.h" -#include "nav_msgs/srv/detail/set_map__struct.h" - - -// Include directives for member types -// Member `map` -#include "nav_msgs/msg/occupancy_grid.h" -// Member `map` -#include "nav_msgs/msg/detail/occupancy_grid__rosidl_typesupport_introspection_c.h" -// Member `initial_pose` -#include "geometry_msgs/msg/pose_with_covariance_stamped.h" -// Member `initial_pose` -#include "geometry_msgs/msg/detail/pose_with_covariance_stamped__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetMap_Request__rosidl_typesupport_introspection_c__SetMap_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; - nav_msgs__srv__SetMap_Request__init(message_memory); -} - -void SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_fini_function(void * message_memory) -{ - nav_msgs__srv__SetMap_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[2] = { - { - "map", // 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(nav_msgs__srv__SetMap_Request, map), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "initial_pose", // 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(nav_msgs__srv__SetMap_Request, initial_pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_members = { - "nav_msgs__srv", // message namespace - "SetMap_Request", // message name - 2, // number of fields - sizeof(nav_msgs__srv__SetMap_Request), - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array, // message members - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_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 SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle = { - 0, - &SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Request)() { - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, msg, OccupancyGrid)(); - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, PoseWithCovarianceStamped)(); - if (!SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle.typesupport_identifier) { - SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetMap_Request__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "nav_msgs/srv/detail/set_map__rosidl_typesupport_introspection_c.h" -// already included above -// #include "nav_msgs/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 "nav_msgs/srv/detail/set_map__functions.h" -// already included above -// #include "nav_msgs/srv/detail/set_map__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetMap_Response__rosidl_typesupport_introspection_c__SetMap_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; - nav_msgs__srv__SetMap_Response__init(message_memory); -} - -void SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_fini_function(void * message_memory) -{ - nav_msgs__srv__SetMap_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_member_array[1] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(nav_msgs__srv__SetMap_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_members = { - "nav_msgs__srv", // message namespace - "SetMap_Response", // message name - 1, // number of fields - sizeof(nav_msgs__srv__SetMap_Response), - SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_member_array, // message members - SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetMap_Response__rosidl_typesupport_introspection_c__SetMap_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 SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle = { - 0, - &SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Response)() { - if (!SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle.typesupport_identifier) { - SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetMap_Response__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "nav_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "nav_msgs/srv/detail/set_map__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 nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_members = { - "nav_msgs__srv", // service namespace - "SetMap", // service name - // these two fields are initialized below on the first access - NULL, // request message - // nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_Request_message_type_support_handle, - NULL // response message - // nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle = { - 0, - &nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_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, nav_msgs, srv, SetMap_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_nav_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, nav_msgs, srv, SetMap)() { - if (!nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle.typesupport_identifier) { - nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_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, nav_msgs, srv, SetMap_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, nav_msgs, srv, SetMap_Response)()->data; - } - - return &nav_msgs__srv__detail__set_map__rosidl_typesupport_introspection_c__SetMap_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__traits.hpp b/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__traits.hpp deleted file mode 100644 index 38b943c72..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from pcl_msgs:msg/ModelCoefficients.idl -// generated code does not contain a copyright notice - -#ifndef PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ -#define PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ - -#include "pcl_msgs/msg/detail/model_coefficients__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::msg::ModelCoefficients"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/msg/ModelCoefficients"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.c b/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.c deleted file mode 100644 index fefe98757..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from pcl_msgs:msg/ModelCoefficients.idl -// generated code does not contain a copyright notice - -#include -#include "pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h" -#include "pcl_msgs/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 "pcl_msgs/msg/detail/model_coefficients__functions.h" -#include "pcl_msgs/msg/detail/model_coefficients__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `values` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_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; - pcl_msgs__msg__ModelCoefficients__init(message_memory); -} - -void ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_fini_function(void * message_memory) -{ - pcl_msgs__msg__ModelCoefficients__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array[2] = { - { - "header", // 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(pcl_msgs__msg__ModelCoefficients, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "values", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__msg__ModelCoefficients, values), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_members = { - "pcl_msgs__msg", // message namespace - "ModelCoefficients", // message name - 2, // number of fields - sizeof(pcl_msgs__msg__ModelCoefficients), - ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array, // message members - ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_init_function, // function to initialize message memory (memory has to be allocated) - ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_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 ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle = { - 0, - &ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, ModelCoefficients)() { - ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle.typesupport_identifier) { - ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__traits.hpp b/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__traits.hpp deleted file mode 100644 index bffc496ee..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from pcl_msgs:msg/PointIndices.idl -// generated code does not contain a copyright notice - -#ifndef PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ -#define PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ - -#include "pcl_msgs/msg/detail/point_indices__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::msg::PointIndices"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/msg/PointIndices"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.c b/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.c deleted file mode 100644 index 3717aa71f..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from pcl_msgs:msg/PointIndices.idl -// generated code does not contain a copyright notice - -#include -#include "pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h" -#include "pcl_msgs/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 "pcl_msgs/msg/detail/point_indices__functions.h" -#include "pcl_msgs/msg/detail/point_indices__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `indices` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PointIndices__rosidl_typesupport_introspection_c__PointIndices_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; - pcl_msgs__msg__PointIndices__init(message_memory); -} - -void PointIndices__rosidl_typesupport_introspection_c__PointIndices_fini_function(void * message_memory) -{ - pcl_msgs__msg__PointIndices__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array[2] = { - { - "header", // 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(pcl_msgs__msg__PointIndices, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "indices", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__msg__PointIndices, indices), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_members = { - "pcl_msgs__msg", // message namespace - "PointIndices", // message name - 2, // number of fields - sizeof(pcl_msgs__msg__PointIndices), - PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array, // message members - PointIndices__rosidl_typesupport_introspection_c__PointIndices_init_function, // function to initialize message memory (memory has to be allocated) - PointIndices__rosidl_typesupport_introspection_c__PointIndices_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 PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle = { - 0, - &PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, PointIndices)() { - PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle.typesupport_identifier) { - PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__traits.hpp b/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__traits.hpp deleted file mode 100644 index 319b007ef..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from pcl_msgs:msg/PolygonMesh.idl -// generated code does not contain a copyright notice - -#ifndef PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ -#define PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ - -#include "pcl_msgs/msg/detail/polygon_mesh__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'cloud' -#include "sensor_msgs/msg/detail/point_cloud2__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::msg::PolygonMesh"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/msg/PolygonMesh"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.c b/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.c deleted file mode 100644 index bec6c182a..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.c +++ /dev/null @@ -1,164 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from pcl_msgs:msg/PolygonMesh.idl -// generated code does not contain a copyright notice - -#include -#include "pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h" -#include "pcl_msgs/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 "pcl_msgs/msg/detail/polygon_mesh__functions.h" -#include "pcl_msgs/msg/detail/polygon_mesh__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `cloud` -#include "sensor_msgs/msg/point_cloud2.h" -// Member `cloud` -#include "sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h" -// Member `polygons` -#include "pcl_msgs/msg/vertices.h" -// Member `polygons` -#include "pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_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; - pcl_msgs__msg__PolygonMesh__init(message_memory); -} - -void PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_fini_function(void * message_memory) -{ - pcl_msgs__msg__PolygonMesh__fini(message_memory); -} - -size_t PolygonMesh__rosidl_typesupport_introspection_c__size_function__Vertices__polygons( - const void * untyped_member) -{ - const pcl_msgs__msg__Vertices__Sequence * member = - (const pcl_msgs__msg__Vertices__Sequence *)(untyped_member); - return member->size; -} - -const void * PolygonMesh__rosidl_typesupport_introspection_c__get_const_function__Vertices__polygons( - const void * untyped_member, size_t index) -{ - const pcl_msgs__msg__Vertices__Sequence * member = - (const pcl_msgs__msg__Vertices__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * PolygonMesh__rosidl_typesupport_introspection_c__get_function__Vertices__polygons( - void * untyped_member, size_t index) -{ - pcl_msgs__msg__Vertices__Sequence * member = - (pcl_msgs__msg__Vertices__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool PolygonMesh__rosidl_typesupport_introspection_c__resize_function__Vertices__polygons( - void * untyped_member, size_t size) -{ - pcl_msgs__msg__Vertices__Sequence * member = - (pcl_msgs__msg__Vertices__Sequence *)(untyped_member); - pcl_msgs__msg__Vertices__Sequence__fini(member); - return pcl_msgs__msg__Vertices__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[3] = { - { - "header", // 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(pcl_msgs__msg__PolygonMesh, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cloud", // 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(pcl_msgs__msg__PolygonMesh, cloud), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "polygons", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__msg__PolygonMesh, polygons), // bytes offset in struct - NULL, // default value - PolygonMesh__rosidl_typesupport_introspection_c__size_function__Vertices__polygons, // size() function pointer - PolygonMesh__rosidl_typesupport_introspection_c__get_const_function__Vertices__polygons, // get_const(index) function pointer - PolygonMesh__rosidl_typesupport_introspection_c__get_function__Vertices__polygons, // get(index) function pointer - PolygonMesh__rosidl_typesupport_introspection_c__resize_function__Vertices__polygons // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_members = { - "pcl_msgs__msg", // message namespace - "PolygonMesh", // message name - 3, // number of fields - sizeof(pcl_msgs__msg__PolygonMesh), - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array, // message members - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_init_function, // function to initialize message memory (memory has to be allocated) - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_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 PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle = { - 0, - &PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, PolygonMesh)() { - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud2)(); - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, Vertices)(); - if (!PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle.typesupport_identifier) { - PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__traits.hpp b/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__traits.hpp deleted file mode 100644 index 3ffad992d..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from pcl_msgs:msg/Vertices.idl -// generated code does not contain a copyright notice - -#ifndef PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ -#define PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ - -#include "pcl_msgs/msg/detail/vertices__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::msg::Vertices"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/msg/Vertices"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.c b/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.c deleted file mode 100644 index 03a8a2be1..000000000 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.c +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from pcl_msgs:msg/Vertices.idl -// generated code does not contain a copyright notice - -#include -#include "pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h" -#include "pcl_msgs/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 "pcl_msgs/msg/detail/vertices__functions.h" -#include "pcl_msgs/msg/detail/vertices__struct.h" - - -// Include directives for member types -// Member `vertices` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Vertices__rosidl_typesupport_introspection_c__Vertices_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; - pcl_msgs__msg__Vertices__init(message_memory); -} - -void Vertices__rosidl_typesupport_introspection_c__Vertices_fini_function(void * message_memory) -{ - pcl_msgs__msg__Vertices__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Vertices__rosidl_typesupport_introspection_c__Vertices_message_member_array[1] = { - { - "vertices", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__msg__Vertices, vertices), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Vertices__rosidl_typesupport_introspection_c__Vertices_message_members = { - "pcl_msgs__msg", // message namespace - "Vertices", // message name - 1, // number of fields - sizeof(pcl_msgs__msg__Vertices), - Vertices__rosidl_typesupport_introspection_c__Vertices_message_member_array, // message members - Vertices__rosidl_typesupport_introspection_c__Vertices_init_function, // function to initialize message memory (memory has to be allocated) - Vertices__rosidl_typesupport_introspection_c__Vertices_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 Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle = { - 0, - &Vertices__rosidl_typesupport_introspection_c__Vertices_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, Vertices)() { - if (!Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle.typesupport_identifier) { - Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__builder.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__builder.hpp similarity index 96% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__builder.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__builder.hpp index 4f9ed250d..e1356bb31 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__builder.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__builder.hpp @@ -5,11 +5,12 @@ #ifndef PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__BUILDER_HPP_ #define PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__BUILDER_HPP_ -#include "pcl_msgs/msg/detail/model_coefficients__struct.hpp" -#include #include #include +#include "pcl_msgs/msg/detail/model_coefficients__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace pcl_msgs { diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__functions.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__functions.c similarity index 91% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__functions.c rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__functions.c index 5ab6e94ae..b86d8dece 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__functions.c +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__functions.c @@ -237,22 +237,27 @@ pcl_msgs__msg__ModelCoefficients__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__msg__ModelCoefficients); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__msg__ModelCoefficients * data = - (pcl_msgs__msg__ModelCoefficients *)realloc(output->data, allocation_size); + (pcl_msgs__msg__ModelCoefficients *)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 (!pcl_msgs__msg__ModelCoefficients__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__msg__ModelCoefficients__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; ) { - pcl_msgs__msg__ModelCoefficients__fini(&data[i]); + pcl_msgs__msg__ModelCoefficients__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__functions.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__functions.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__functions.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__functions.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h index 06f2d27f1..82e2d31d7 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_pcl_msgs__msg__ModelCoefficients( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__msg__ModelCoefficients( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp index 42050bb5a..49c8f0aa3 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_ModelCoefficients( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.h similarity index 94% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.h index 47045bd49..61529f458 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.h @@ -23,7 +23,7 @@ extern "C" // Member 'values' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in msg/ModelCoefficients in the package pcl_msgs. +/// Struct defined in msg/ModelCoefficients in the package pcl_msgs. typedef struct pcl_msgs__msg__ModelCoefficients { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.hpp similarity index 92% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.hpp index 88b8e65eb..7a569916c 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__struct.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__struct.hpp @@ -5,14 +5,15 @@ #ifndef PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__STRUCT_HPP_ #define PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -53,7 +54,7 @@ struct ModelCoefficients_ std_msgs::msg::Header_; _header_type header; using _values_type = - std::vector::other>; + std::vector::template rebind_alloc>; _values_type values; // setters for named parameter idiom @@ -64,7 +65,7 @@ struct ModelCoefficients_ return *this; } Type & set__values( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->values = _arg; return *this; diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__traits.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__traits.hpp new file mode 100644 index 000000000..743b87a79 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from pcl_msgs:msg/ModelCoefficients.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ +#define PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "pcl_msgs/msg/detail/model_coefficients__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace pcl_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ModelCoefficients & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: values + { + if (msg.values.size() == 0) { + out << "values: []"; + } else { + out << "values: ["; + size_t pending_items = msg.values.size(); + for (auto item : msg.values) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ModelCoefficients & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: values + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.values.size() == 0) { + out << "values: []\n"; + } else { + out << "values:\n"; + for (auto item : msg.values) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ModelCoefficients & 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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::msg::ModelCoefficients & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::msg::ModelCoefficients & msg) +{ + return pcl_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::msg::ModelCoefficients"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/msg/ModelCoefficients"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.c new file mode 100644 index 000000000..637ab7fa1 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from pcl_msgs:msg/ModelCoefficients.idl +// generated code does not contain a copyright notice + +#include +#include "pcl_msgs/msg/detail/model_coefficients__rosidl_typesupport_introspection_c.h" +#include "pcl_msgs/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 "pcl_msgs/msg/detail/model_coefficients__functions.h" +#include "pcl_msgs/msg/detail/model_coefficients__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `values` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_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; + pcl_msgs__msg__ModelCoefficients__init(message_memory); +} + +void pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_fini_function(void * message_memory) +{ + pcl_msgs__msg__ModelCoefficients__fini(message_memory); +} + +size_t pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__size_function__ModelCoefficients__values( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_const_function__ModelCoefficients__values( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_function__ModelCoefficients__values( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__fetch_function__ModelCoefficients__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_const_function__ModelCoefficients__values(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__assign_function__ModelCoefficients__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_function__ModelCoefficients__values(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__resize_function__ModelCoefficients__values( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array[2] = { + { + "header", // 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(pcl_msgs__msg__ModelCoefficients, header), // 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 + }, + { + "values", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__msg__ModelCoefficients, values), // bytes offset in struct + NULL, // default value + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__size_function__ModelCoefficients__values, // size() function pointer + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_const_function__ModelCoefficients__values, // get_const(index) function pointer + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__get_function__ModelCoefficients__values, // get(index) function pointer + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__fetch_function__ModelCoefficients__values, // fetch(index, &value) function pointer + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__assign_function__ModelCoefficients__values, // assign(index, value) function pointer + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__resize_function__ModelCoefficients__values // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_members = { + "pcl_msgs__msg", // message namespace + "ModelCoefficients", // message name + 2, // number of fields + sizeof(pcl_msgs__msg__ModelCoefficients), + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array, // message members + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_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 pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle = { + 0, + &pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, ModelCoefficients)() { + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle.typesupport_identifier) { + pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__msg__ModelCoefficients__rosidl_typesupport_introspection_c__ModelCoefficients_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.cpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.cpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.cpp index 7b3795962..4024b31f4 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.cpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ModelCoefficients__values(void * untyped_member, size_t ind return &member[index]; } +void fetch_function__ModelCoefficients__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ModelCoefficients__values(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ModelCoefficients__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ModelCoefficients__values(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ModelCoefficients__values(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ModelCoeffici 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ModelCoeffici size_function__ModelCoefficients__values, // size() function pointer get_const_function__ModelCoefficients__values, // get_const(index) function pointer get_function__ModelCoefficients__values, // get(index) function pointer + fetch_function__ModelCoefficients__values, // fetch(index, &value) function pointer + assign_function__ModelCoefficients__values, // assign(index, value) function pointer resize_function__ModelCoefficients__values // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/model_coefficients__type_support.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.hpp new file mode 100644 index 000000000..5834e6bcb --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/model_coefficients__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from pcl_msgs:msg/ModelCoefficients.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TYPE_SUPPORT_HPP_ +#define PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "pcl_msgs/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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + msg, + ModelCoefficients +)(); +#ifdef __cplusplus +} +#endif + +#endif // PCL_MSGS__MSG__DETAIL__MODEL_COEFFICIENTS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__builder.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__builder.hpp similarity index 96% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__builder.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__builder.hpp index b4f9e2b23..ab49f3b8f 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__builder.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__builder.hpp @@ -5,11 +5,12 @@ #ifndef PCL_MSGS__MSG__DETAIL__POINT_INDICES__BUILDER_HPP_ #define PCL_MSGS__MSG__DETAIL__POINT_INDICES__BUILDER_HPP_ -#include "pcl_msgs/msg/detail/point_indices__struct.hpp" -#include #include #include +#include "pcl_msgs/msg/detail/point_indices__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace pcl_msgs { diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__functions.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__functions.c similarity index 91% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__functions.c rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__functions.c index 31a73a413..d1fd064f9 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__functions.c +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__functions.c @@ -237,22 +237,27 @@ pcl_msgs__msg__PointIndices__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__msg__PointIndices); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__msg__PointIndices * data = - (pcl_msgs__msg__PointIndices *)realloc(output->data, allocation_size); + (pcl_msgs__msg__PointIndices *)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 (!pcl_msgs__msg__PointIndices__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__msg__PointIndices__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; ) { - pcl_msgs__msg__PointIndices__fini(&data[i]); + pcl_msgs__msg__PointIndices__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__functions.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__functions.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__functions.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__functions.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h index a6f930953..f73834466 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_pcl_msgs__msg__PointIndices( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__msg__PointIndices( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp index d60ce6029..d3cb1e4d9 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_PointIndices( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.h similarity index 94% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.h index e8d08ef78..35d1562a6 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.h @@ -23,7 +23,7 @@ extern "C" // Member 'indices' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in msg/PointIndices in the package pcl_msgs. +/// Struct defined in msg/PointIndices in the package pcl_msgs. typedef struct pcl_msgs__msg__PointIndices { std_msgs__msg__Header header; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.hpp similarity index 91% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.hpp index 57653b15d..c8deb5b48 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__struct.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__struct.hpp @@ -5,14 +5,15 @@ #ifndef PCL_MSGS__MSG__DETAIL__POINT_INDICES__STRUCT_HPP_ #define PCL_MSGS__MSG__DETAIL__POINT_INDICES__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -53,7 +54,7 @@ struct PointIndices_ std_msgs::msg::Header_; _header_type header; using _indices_type = - std::vector::other>; + std::vector::template rebind_alloc>; _indices_type indices; // setters for named parameter idiom @@ -64,7 +65,7 @@ struct PointIndices_ return *this; } Type & set__indices( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->indices = _arg; return *this; diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__traits.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__traits.hpp new file mode 100644 index 000000000..a825ba5ac --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from pcl_msgs:msg/PointIndices.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ +#define PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "pcl_msgs/msg/detail/point_indices__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace pcl_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PointIndices & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: indices + { + if (msg.indices.size() == 0) { + out << "indices: []"; + } else { + out << "indices: ["; + size_t pending_items = msg.indices.size(); + for (auto item : msg.indices) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PointIndices & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: indices + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.indices.size() == 0) { + out << "indices: []\n"; + } else { + out << "indices:\n"; + for (auto item : msg.indices) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PointIndices & 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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::msg::PointIndices & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::msg::PointIndices & msg) +{ + return pcl_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::msg::PointIndices"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/msg/PointIndices"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // PCL_MSGS__MSG__DETAIL__POINT_INDICES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.c new file mode 100644 index 000000000..2f36b4b66 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from pcl_msgs:msg/PointIndices.idl +// generated code does not contain a copyright notice + +#include +#include "pcl_msgs/msg/detail/point_indices__rosidl_typesupport_introspection_c.h" +#include "pcl_msgs/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 "pcl_msgs/msg/detail/point_indices__functions.h" +#include "pcl_msgs/msg/detail/point_indices__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `indices` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_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; + pcl_msgs__msg__PointIndices__init(message_memory); +} + +void pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_fini_function(void * message_memory) +{ + pcl_msgs__msg__PointIndices__fini(message_memory); +} + +size_t pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__size_function__PointIndices__indices( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_const_function__PointIndices__indices( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_function__PointIndices__indices( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__fetch_function__PointIndices__indices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_const_function__PointIndices__indices(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__assign_function__PointIndices__indices( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_function__PointIndices__indices(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__resize_function__PointIndices__indices( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array[2] = { + { + "header", // 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(pcl_msgs__msg__PointIndices, header), // 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 + }, + { + "indices", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__msg__PointIndices, indices), // bytes offset in struct + NULL, // default value + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__size_function__PointIndices__indices, // size() function pointer + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_const_function__PointIndices__indices, // get_const(index) function pointer + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__get_function__PointIndices__indices, // get(index) function pointer + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__fetch_function__PointIndices__indices, // fetch(index, &value) function pointer + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__assign_function__PointIndices__indices, // assign(index, value) function pointer + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__resize_function__PointIndices__indices // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_members = { + "pcl_msgs__msg", // message namespace + "PointIndices", // message name + 2, // number of fields + sizeof(pcl_msgs__msg__PointIndices), + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array, // message members + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_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 pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle = { + 0, + &pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, PointIndices)() { + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle.typesupport_identifier) { + pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__msg__PointIndices__rosidl_typesupport_introspection_c__PointIndices_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.cpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.cpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.cpp index 3e747222f..15e31e00b 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.cpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PointIndices__indices(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PointIndices__indices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PointIndices__indices(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PointIndices__indices( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PointIndices__indices(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PointIndices__indices(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointIndices_ 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointIndices_ size_function__PointIndices__indices, // size() function pointer get_const_function__PointIndices__indices, // get_const(index) function pointer get_function__PointIndices__indices, // get(index) function pointer + fetch_function__PointIndices__indices, // fetch(index, &value) function pointer + assign_function__PointIndices__indices, // assign(index, value) function pointer resize_function__PointIndices__indices // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/point_indices__type_support.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.hpp new file mode 100644 index 000000000..ea03d21ee --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/point_indices__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from pcl_msgs:msg/PointIndices.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__POINT_INDICES__TYPE_SUPPORT_HPP_ +#define PCL_MSGS__MSG__DETAIL__POINT_INDICES__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "pcl_msgs/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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + msg, + PointIndices +)(); +#ifdef __cplusplus +} +#endif + +#endif // PCL_MSGS__MSG__DETAIL__POINT_INDICES__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__builder.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__builder.hpp similarity index 96% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__builder.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__builder.hpp index 8599b5b4e..0fa3fdcbc 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__builder.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__builder.hpp @@ -5,11 +5,12 @@ #ifndef PCL_MSGS__MSG__DETAIL__POLYGON_MESH__BUILDER_HPP_ #define PCL_MSGS__MSG__DETAIL__POLYGON_MESH__BUILDER_HPP_ -#include "pcl_msgs/msg/detail/polygon_mesh__struct.hpp" -#include #include #include +#include "pcl_msgs/msg/detail/polygon_mesh__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace pcl_msgs { diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__functions.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__functions.c similarity index 92% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__functions.c rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__functions.c index 956268fce..a5e8a63b9 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__functions.c +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__functions.c @@ -258,22 +258,27 @@ pcl_msgs__msg__PolygonMesh__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__msg__PolygonMesh); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__msg__PolygonMesh * data = - (pcl_msgs__msg__PolygonMesh *)realloc(output->data, allocation_size); + (pcl_msgs__msg__PolygonMesh *)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 (!pcl_msgs__msg__PolygonMesh__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__msg__PolygonMesh__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; ) { - pcl_msgs__msg__PolygonMesh__fini(&data[i]); + pcl_msgs__msg__PolygonMesh__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__functions.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__functions.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__functions.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__functions.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h index c42f81fa5..578295ac1 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_pcl_msgs__msg__PolygonMesh( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__msg__PolygonMesh( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp index 0ae88d31b..fb650b874 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_PolygonMesh( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.h similarity index 87% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.h index 3cc7a4f40..ec0220c02 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.h @@ -25,11 +25,16 @@ extern "C" // Member 'polygons' #include "pcl_msgs/msg/detail/vertices__struct.h" -// Struct defined in msg/PolygonMesh in the package pcl_msgs. +/// Struct defined in msg/PolygonMesh in the package pcl_msgs. +/** + * Separate header for the polygonal surface + */ typedef struct pcl_msgs__msg__PolygonMesh { std_msgs__msg__Header header; + /// Vertices of the mesh as a point cloud sensor_msgs__msg__PointCloud2 cloud; + /// List of polygons pcl_msgs__msg__Vertices__Sequence polygons; } pcl_msgs__msg__PolygonMesh; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.hpp similarity index 92% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.hpp index c22d7362a..f8d3b24fb 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__struct.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__struct.hpp @@ -5,14 +5,15 @@ #ifndef PCL_MSGS__MSG__DETAIL__POLYGON_MESH__STRUCT_HPP_ #define PCL_MSGS__MSG__DETAIL__POLYGON_MESH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -62,7 +63,7 @@ struct PolygonMesh_ sensor_msgs::msg::PointCloud2_; _cloud_type cloud; using _polygons_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _polygons_type polygons; // setters for named parameter idiom @@ -79,7 +80,7 @@ struct PolygonMesh_ return *this; } Type & set__polygons( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->polygons = _arg; return *this; diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__traits.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__traits.hpp new file mode 100644 index 000000000..4b387fa07 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__traits.hpp @@ -0,0 +1,169 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from pcl_msgs:msg/PolygonMesh.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ +#define PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "pcl_msgs/msg/detail/polygon_mesh__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'cloud' +#include "sensor_msgs/msg/detail/point_cloud2__traits.hpp" +// Member 'polygons' +#include "pcl_msgs/msg/detail/vertices__traits.hpp" + +namespace pcl_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PolygonMesh & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: cloud + { + out << "cloud: "; + to_flow_style_yaml(msg.cloud, out); + out << ", "; + } + + // member: polygons + { + if (msg.polygons.size() == 0) { + out << "polygons: []"; + } else { + out << "polygons: ["; + size_t pending_items = msg.polygons.size(); + for (auto item : msg.polygons) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PolygonMesh & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: cloud + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "cloud:\n"; + to_block_style_yaml(msg.cloud, out, indentation + 2); + } + + // member: polygons + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.polygons.size() == 0) { + out << "polygons: []\n"; + } else { + out << "polygons:\n"; + for (auto item : msg.polygons) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PolygonMesh & 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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::msg::PolygonMesh & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::msg::PolygonMesh & msg) +{ + return pcl_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::msg::PolygonMesh"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/msg/PolygonMesh"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.c new file mode 100644 index 000000000..1ceeb8049 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.c @@ -0,0 +1,192 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from pcl_msgs:msg/PolygonMesh.idl +// generated code does not contain a copyright notice + +#include +#include "pcl_msgs/msg/detail/polygon_mesh__rosidl_typesupport_introspection_c.h" +#include "pcl_msgs/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 "pcl_msgs/msg/detail/polygon_mesh__functions.h" +#include "pcl_msgs/msg/detail/polygon_mesh__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `cloud` +#include "sensor_msgs/msg/point_cloud2.h" +// Member `cloud` +#include "sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h" +// Member `polygons` +#include "pcl_msgs/msg/vertices.h" +// Member `polygons` +#include "pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_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; + pcl_msgs__msg__PolygonMesh__init(message_memory); +} + +void pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_fini_function(void * message_memory) +{ + pcl_msgs__msg__PolygonMesh__fini(message_memory); +} + +size_t pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__size_function__PolygonMesh__polygons( + const void * untyped_member) +{ + const pcl_msgs__msg__Vertices__Sequence * member = + (const pcl_msgs__msg__Vertices__Sequence *)(untyped_member); + return member->size; +} + +const void * pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_const_function__PolygonMesh__polygons( + const void * untyped_member, size_t index) +{ + const pcl_msgs__msg__Vertices__Sequence * member = + (const pcl_msgs__msg__Vertices__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_function__PolygonMesh__polygons( + void * untyped_member, size_t index) +{ + pcl_msgs__msg__Vertices__Sequence * member = + (pcl_msgs__msg__Vertices__Sequence *)(untyped_member); + return &member->data[index]; +} + +void pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__fetch_function__PolygonMesh__polygons( + const void * untyped_member, size_t index, void * untyped_value) +{ + const pcl_msgs__msg__Vertices * item = + ((const pcl_msgs__msg__Vertices *) + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_const_function__PolygonMesh__polygons(untyped_member, index)); + pcl_msgs__msg__Vertices * value = + (pcl_msgs__msg__Vertices *)(untyped_value); + *value = *item; +} + +void pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__assign_function__PolygonMesh__polygons( + void * untyped_member, size_t index, const void * untyped_value) +{ + pcl_msgs__msg__Vertices * item = + ((pcl_msgs__msg__Vertices *) + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_function__PolygonMesh__polygons(untyped_member, index)); + const pcl_msgs__msg__Vertices * value = + (const pcl_msgs__msg__Vertices *)(untyped_value); + *item = *value; +} + +bool pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__resize_function__PolygonMesh__polygons( + void * untyped_member, size_t size) +{ + pcl_msgs__msg__Vertices__Sequence * member = + (pcl_msgs__msg__Vertices__Sequence *)(untyped_member); + pcl_msgs__msg__Vertices__Sequence__fini(member); + return pcl_msgs__msg__Vertices__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[3] = { + { + "header", // 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(pcl_msgs__msg__PolygonMesh, header), // 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 + }, + { + "cloud", // 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(pcl_msgs__msg__PolygonMesh, cloud), // 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 + }, + { + "polygons", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__msg__PolygonMesh, polygons), // bytes offset in struct + NULL, // default value + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__size_function__PolygonMesh__polygons, // size() function pointer + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_const_function__PolygonMesh__polygons, // get_const(index) function pointer + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__get_function__PolygonMesh__polygons, // get(index) function pointer + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__fetch_function__PolygonMesh__polygons, // fetch(index, &value) function pointer + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__assign_function__PolygonMesh__polygons, // assign(index, value) function pointer + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__resize_function__PolygonMesh__polygons // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_members = { + "pcl_msgs__msg", // message namespace + "PolygonMesh", // message name + 3, // number of fields + sizeof(pcl_msgs__msg__PolygonMesh), + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array, // message members + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_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 pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle = { + 0, + &pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, PolygonMesh)() { + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud2)(); + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, Vertices)(); + if (!pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle.typesupport_identifier) { + pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__msg__PolygonMesh__rosidl_typesupport_introspection_c__PolygonMesh_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp index b343fc746..aa0b0188b 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PolygonMesh__polygons(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PolygonMesh__polygons( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PolygonMesh__polygons(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PolygonMesh__polygons( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PolygonMesh__polygons(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PolygonMesh__polygons(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PolygonMesh_m 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PolygonMesh_m 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PolygonMesh_m size_function__PolygonMesh__polygons, // size() function pointer get_const_function__PolygonMesh__polygons, // get_const(index) function pointer get_function__PolygonMesh__polygons, // get(index) function pointer + fetch_function__PolygonMesh__polygons, // fetch(index, &value) function pointer + assign_function__PolygonMesh__polygons, // assign(index, value) function pointer resize_function__PolygonMesh__polygons // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/polygon_mesh__type_support.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.hpp new file mode 100644 index 000000000..e6b402ed4 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/polygon_mesh__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from pcl_msgs:msg/PolygonMesh.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TYPE_SUPPORT_HPP_ +#define PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "pcl_msgs/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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + msg, + PolygonMesh +)(); +#ifdef __cplusplus +} +#endif + +#endif // PCL_MSGS__MSG__DETAIL__POLYGON_MESH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__builder.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__builder.hpp similarity index 94% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__builder.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__builder.hpp index 3d597ae3b..8c8a703a5 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__builder.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__builder.hpp @@ -5,11 +5,12 @@ #ifndef PCL_MSGS__MSG__DETAIL__VERTICES__BUILDER_HPP_ #define PCL_MSGS__MSG__DETAIL__VERTICES__BUILDER_HPP_ -#include "pcl_msgs/msg/detail/vertices__struct.hpp" -#include #include #include +#include "pcl_msgs/msg/detail/vertices__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace pcl_msgs { diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__functions.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__functions.c similarity index 90% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__functions.c rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__functions.c index 2d265969d..5fdcb4ded 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__functions.c +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__functions.c @@ -216,22 +216,27 @@ pcl_msgs__msg__Vertices__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__msg__Vertices); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__msg__Vertices * data = - (pcl_msgs__msg__Vertices *)realloc(output->data, allocation_size); + (pcl_msgs__msg__Vertices *)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 (!pcl_msgs__msg__Vertices__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__msg__Vertices__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; ) { - pcl_msgs__msg__Vertices__fini(&data[i]); + pcl_msgs__msg__Vertices__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__functions.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__functions.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__functions.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__functions.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h index 0b8dbf035..93926943d 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_pcl_msgs__msg__Vertices( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__msg__Vertices( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp index b904a71a7..b5c22f654 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_Vertices( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.h similarity index 91% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.h index af8b83c7c..e74cacc79 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.h @@ -21,7 +21,10 @@ extern "C" // Member 'vertices' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in msg/Vertices in the package pcl_msgs. +/// Struct defined in msg/Vertices in the package pcl_msgs. +/** + * List of point indices + */ typedef struct pcl_msgs__msg__Vertices { rosidl_runtime_c__uint32__Sequence vertices; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.hpp similarity index 90% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.hpp index b1a3c0147..c48f04c60 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__struct.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__struct.hpp @@ -5,14 +5,15 @@ #ifndef PCL_MSGS__MSG__DETAIL__VERTICES__STRUCT_HPP_ #define PCL_MSGS__MSG__DETAIL__VERTICES__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__pcl_msgs__msg__Vertices __attribute__((deprecated)) @@ -45,12 +46,12 @@ struct Vertices_ // field types and members using _vertices_type = - std::vector::other>; + std::vector::template rebind_alloc>; _vertices_type vertices; // setters for named parameter idiom Type & set__vertices( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->vertices = _arg; return *this; diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__traits.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__traits.hpp new file mode 100644 index 000000000..f179769f6 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from pcl_msgs:msg/Vertices.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ +#define PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "pcl_msgs/msg/detail/vertices__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace pcl_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Vertices & msg, + std::ostream & out) +{ + out << "{"; + // member: vertices + { + if (msg.vertices.size() == 0) { + out << "vertices: []"; + } else { + out << "vertices: ["; + size_t pending_items = msg.vertices.size(); + for (auto item : msg.vertices) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Vertices & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: vertices + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.vertices.size() == 0) { + out << "vertices: []\n"; + } else { + out << "vertices:\n"; + for (auto item : msg.vertices) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Vertices & 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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::msg::Vertices & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::msg::Vertices & msg) +{ + return pcl_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::msg::Vertices"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/msg/Vertices"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // PCL_MSGS__MSG__DETAIL__VERTICES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.c new file mode 100644 index 000000000..c8d5623d3 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.c @@ -0,0 +1,142 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from pcl_msgs:msg/Vertices.idl +// generated code does not contain a copyright notice + +#include +#include "pcl_msgs/msg/detail/vertices__rosidl_typesupport_introspection_c.h" +#include "pcl_msgs/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 "pcl_msgs/msg/detail/vertices__functions.h" +#include "pcl_msgs/msg/detail/vertices__struct.h" + + +// Include directives for member types +// Member `vertices` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_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; + pcl_msgs__msg__Vertices__init(message_memory); +} + +void pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_fini_function(void * message_memory) +{ + pcl_msgs__msg__Vertices__fini(message_memory); +} + +size_t pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__size_function__Vertices__vertices( + const void * untyped_member) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return member->size; +} + +const void * pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_const_function__Vertices__vertices( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_function__Vertices__vertices( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__fetch_function__Vertices__vertices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint32_t * item = + ((const uint32_t *) + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_const_function__Vertices__vertices(untyped_member, index)); + uint32_t * value = + (uint32_t *)(untyped_value); + *value = *item; +} + +void pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__assign_function__Vertices__vertices( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint32_t * item = + ((uint32_t *) + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_function__Vertices__vertices(untyped_member, index)); + const uint32_t * value = + (const uint32_t *)(untyped_value); + *item = *value; +} + +bool pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__resize_function__Vertices__vertices( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + rosidl_runtime_c__uint32__Sequence__fini(member); + return rosidl_runtime_c__uint32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_member_array[1] = { + { + "vertices", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__msg__Vertices, vertices), // bytes offset in struct + NULL, // default value + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__size_function__Vertices__vertices, // size() function pointer + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_const_function__Vertices__vertices, // get_const(index) function pointer + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__get_function__Vertices__vertices, // get(index) function pointer + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__fetch_function__Vertices__vertices, // fetch(index, &value) function pointer + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__assign_function__Vertices__vertices, // assign(index, value) function pointer + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__resize_function__Vertices__vertices // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_members = { + "pcl_msgs__msg", // message namespace + "Vertices", // message name + 1, // number of fields + sizeof(pcl_msgs__msg__Vertices), + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_member_array, // message members + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_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 pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle = { + 0, + &pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, msg, Vertices)() { + if (!pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle.typesupport_identifier) { + pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__msg__Vertices__rosidl_typesupport_introspection_c__Vertices_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.cpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.cpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.cpp index ef4d0dbb6..70113b3b7 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.cpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Vertices__vertices(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Vertices__vertices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Vertices__vertices(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Vertices__vertices( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Vertices__vertices(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Vertices__vertices(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Vertices_mess size_function__Vertices__vertices, // size() function pointer get_const_function__Vertices__vertices, // get_const(index) function pointer get_function__Vertices__vertices, // get(index) function pointer + fetch_function__Vertices__vertices, // fetch(index, &value) function pointer + assign_function__Vertices__vertices, // assign(index, value) function pointer resize_function__Vertices__vertices // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/detail/vertices__type_support.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.hpp new file mode 100644 index 000000000..b1e41240c --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/detail/vertices__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from pcl_msgs:msg/Vertices.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__MSG__DETAIL__VERTICES__TYPE_SUPPORT_HPP_ +#define PCL_MSGS__MSG__DETAIL__VERTICES__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "pcl_msgs/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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + msg, + Vertices +)(); +#ifdef __cplusplus +} +#endif + +#endif // PCL_MSGS__MSG__DETAIL__VERTICES__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/model_coefficients.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/model_coefficients.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/model_coefficients.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/model_coefficients.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/model_coefficients.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/model_coefficients.hpp similarity index 86% rename from ThirdParty/ros/include/pcl_msgs/msg/model_coefficients.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/model_coefficients.hpp index 3511b2d2a..eae52c1c4 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/model_coefficients.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/model_coefficients.hpp @@ -7,5 +7,6 @@ #include "pcl_msgs/msg/detail/model_coefficients__struct.hpp" #include "pcl_msgs/msg/detail/model_coefficients__builder.hpp" #include "pcl_msgs/msg/detail/model_coefficients__traits.hpp" +#include "pcl_msgs/msg/detail/model_coefficients__type_support.hpp" #endif // PCL_MSGS__MSG__MODEL_COEFFICIENTS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/point_indices.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/point_indices.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/point_indices.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/point_indices.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/point_indices.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/point_indices.hpp similarity index 86% rename from ThirdParty/ros/include/pcl_msgs/msg/point_indices.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/point_indices.hpp index e873a7c67..fe322d977 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/point_indices.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/point_indices.hpp @@ -7,5 +7,6 @@ #include "pcl_msgs/msg/detail/point_indices__struct.hpp" #include "pcl_msgs/msg/detail/point_indices__builder.hpp" #include "pcl_msgs/msg/detail/point_indices__traits.hpp" +#include "pcl_msgs/msg/detail/point_indices__type_support.hpp" #endif // PCL_MSGS__MSG__POINT_INDICES_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/polygon_mesh.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/polygon_mesh.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/polygon_mesh.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/polygon_mesh.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/polygon_mesh.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/polygon_mesh.hpp similarity index 86% rename from ThirdParty/ros/include/pcl_msgs/msg/polygon_mesh.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/polygon_mesh.hpp index d4e8b7d9b..f310eb7cc 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/polygon_mesh.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/polygon_mesh.hpp @@ -7,5 +7,6 @@ #include "pcl_msgs/msg/detail/polygon_mesh__struct.hpp" #include "pcl_msgs/msg/detail/polygon_mesh__builder.hpp" #include "pcl_msgs/msg/detail/polygon_mesh__traits.hpp" +#include "pcl_msgs/msg/detail/polygon_mesh__type_support.hpp" #endif // PCL_MSGS__MSG__POLYGON_MESH_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..9583c1b58 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 PCL_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define PCL_MSGS__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_pcl_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_pcl_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_pcl_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_pcl_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_pcl_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_pcl_msgs ROSIDL_GENERATOR_CPP_EXPORT_pcl_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_pcl_msgs ROSIDL_GENERATOR_CPP_IMPORT_pcl_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_pcl_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_pcl_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_pcl_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_pcl_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // PCL_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/vertices.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/vertices.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/msg/vertices.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/vertices.h diff --git a/ThirdParty/ros/include/pcl_msgs/msg/vertices.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/vertices.hpp similarity index 86% rename from ThirdParty/ros/include/pcl_msgs/msg/vertices.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/vertices.hpp index 5a47891b8..4f95d3284 100644 --- a/ThirdParty/ros/include/pcl_msgs/msg/vertices.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/msg/vertices.hpp @@ -7,5 +7,6 @@ #include "pcl_msgs/msg/detail/vertices__struct.hpp" #include "pcl_msgs/msg/detail/vertices__builder.hpp" #include "pcl_msgs/msg/detail/vertices__traits.hpp" +#include "pcl_msgs/msg/detail/vertices__type_support.hpp" #endif // PCL_MSGS__MSG__VERTICES_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__builder.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__builder.hpp similarity index 97% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__builder.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__builder.hpp index 8c71a02f5..6e405671f 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__builder.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__builder.hpp @@ -5,11 +5,12 @@ #ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__BUILDER_HPP_ #define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__BUILDER_HPP_ -#include "pcl_msgs/srv/detail/update_filename__struct.hpp" -#include #include #include +#include "pcl_msgs/srv/detail/update_filename__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace pcl_msgs { diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__functions.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__functions.c similarity index 90% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__functions.c rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__functions.c index e01c89be6..4424ce5ea 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__functions.c +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__functions.c @@ -215,22 +215,27 @@ pcl_msgs__srv__UpdateFilename_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__srv__UpdateFilename_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__srv__UpdateFilename_Request * data = - (pcl_msgs__srv__UpdateFilename_Request *)realloc(output->data, allocation_size); + (pcl_msgs__srv__UpdateFilename_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 (!pcl_msgs__srv__UpdateFilename_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__srv__UpdateFilename_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; ) { - pcl_msgs__srv__UpdateFilename_Request__fini(&data[i]); + pcl_msgs__srv__UpdateFilename_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -435,22 +440,27 @@ pcl_msgs__srv__UpdateFilename_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(pcl_msgs__srv__UpdateFilename_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); pcl_msgs__srv__UpdateFilename_Response * data = - (pcl_msgs__srv__UpdateFilename_Response *)realloc(output->data, allocation_size); + (pcl_msgs__srv__UpdateFilename_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 (!pcl_msgs__srv__UpdateFilename_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!pcl_msgs__srv__UpdateFilename_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; ) { - pcl_msgs__srv__UpdateFilename_Response__fini(&data[i]); + pcl_msgs__srv__UpdateFilename_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__functions.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__functions.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__functions.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__functions.h diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h index cb2258b62..5356211e5 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_pcl_msgs__srv__UpdateFilename_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__srv__UpdateFilename_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_pcl_msgs__srv__UpdateFilename_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs size_t max_serialized_size_pcl_msgs__srv__UpdateFilename_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_pcl_msgs diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp index d3e8ed55f..4baafa0c7 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_UpdateFilename_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_pcl_msgs max_serialized_size_UpdateFilename_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.h similarity index 92% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.h index 2f6a84e18..b6a9dca06 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.h +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'filename' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/UpdateFilename in the package pcl_msgs. +/// Struct defined in srv/UpdateFilename in the package pcl_msgs. typedef struct pcl_msgs__srv__UpdateFilename_Request { rosidl_runtime_c__String filename; @@ -40,7 +40,7 @@ typedef struct pcl_msgs__srv__UpdateFilename_Request__Sequence // Constants defined in the message -// Struct defined in srv/UpdateFilename in the package pcl_msgs. +/// Struct defined in srv/UpdateFilename in the package pcl_msgs. typedef struct pcl_msgs__srv__UpdateFilename_Response { bool success; diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.hpp similarity index 96% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.hpp index 436d0606a..13bcb86ae 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__struct.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__struct.hpp @@ -5,14 +5,15 @@ #ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__STRUCT_HPP_ #define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__pcl_msgs__srv__UpdateFilename_Request __attribute__((deprecated)) @@ -53,12 +54,12 @@ struct UpdateFilename_Request_ // field types and members using _filename_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _filename_type filename; // setters for named parameter idiom Type & set__filename( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->filename = _arg; return *this; diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__traits.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__traits.hpp new file mode 100644 index 000000000..da79c0599 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__traits.hpp @@ -0,0 +1,256 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from pcl_msgs:srv/UpdateFilename.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ +#define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "pcl_msgs/srv/detail/update_filename__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace pcl_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const UpdateFilename_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: filename + { + out << "filename: "; + rosidl_generator_traits::value_to_yaml(msg.filename, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UpdateFilename_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: filename + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "filename: "; + rosidl_generator_traits::value_to_yaml(msg.filename, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UpdateFilename_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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::srv::UpdateFilename_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::srv::UpdateFilename_Request & msg) +{ + return pcl_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::srv::UpdateFilename_Request"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/srv/UpdateFilename_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace pcl_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const UpdateFilename_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UpdateFilename_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UpdateFilename_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 pcl_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use pcl_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const pcl_msgs::srv::UpdateFilename_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + pcl_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use pcl_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const pcl_msgs::srv::UpdateFilename_Response & msg) +{ + return pcl_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "pcl_msgs::srv::UpdateFilename_Response"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/srv/UpdateFilename_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "pcl_msgs::srv::UpdateFilename"; +} + +template<> +inline const char * name() +{ + return "pcl_msgs/srv/UpdateFilename"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.c b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.c new file mode 100644 index 000000000..398ec414e --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.c @@ -0,0 +1,232 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from pcl_msgs:srv/UpdateFilename.idl +// generated code does not contain a copyright notice + +#include +#include "pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h" +#include "pcl_msgs/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 "pcl_msgs/srv/detail/update_filename__functions.h" +#include "pcl_msgs/srv/detail/update_filename__struct.h" + + +// Include directives for member types +// Member `filename` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_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; + pcl_msgs__srv__UpdateFilename_Request__init(message_memory); +} + +void pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_fini_function(void * message_memory) +{ + pcl_msgs__srv__UpdateFilename_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_member_array[1] = { + { + "filename", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__srv__UpdateFilename_Request, filename), // 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 pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_members = { + "pcl_msgs__srv", // message namespace + "UpdateFilename_Request", // message name + 1, // number of fields + sizeof(pcl_msgs__srv__UpdateFilename_Request), + pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_member_array, // message members + pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_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 pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle = { + 0, + &pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Request)() { + if (!pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle.typesupport_identifier) { + pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__srv__UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h" +// already included above +// #include "pcl_msgs/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 "pcl_msgs/srv/detail/update_filename__functions.h" +// already included above +// #include "pcl_msgs/srv/detail/update_filename__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_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; + pcl_msgs__srv__UpdateFilename_Response__init(message_memory); +} + +void pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_fini_function(void * message_memory) +{ + pcl_msgs__srv__UpdateFilename_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_member_array[1] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(pcl_msgs__srv__UpdateFilename_Response, success), // 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 pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_members = { + "pcl_msgs__srv", // message namespace + "UpdateFilename_Response", // message name + 1, // number of fields + sizeof(pcl_msgs__srv__UpdateFilename_Response), + pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_member_array, // message members + pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_init_function, // function to initialize message memory (memory has to be allocated) + pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_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 pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle = { + 0, + &pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Response)() { + if (!pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle.typesupport_identifier) { + pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &pcl_msgs__srv__UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "pcl_msgs/srv/detail/update_filename__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 pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_members = { + "pcl_msgs__srv", // service namespace + "UpdateFilename", // service name + // these two fields are initialized below on the first access + NULL, // request message + // pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle, + NULL // response message + // pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle = { + 0, + &pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_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, pcl_msgs, srv, UpdateFilename_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename)() { + if (!pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle.typesupport_identifier) { + pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_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, pcl_msgs, srv, UpdateFilename_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, pcl_msgs, srv, UpdateFilename_Response)()->data; + } + + return &pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.cpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.cpp similarity index 98% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.cpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.cpp index 132be981a..3b1cd10c4 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.cpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember UpdateFilenam 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember UpdateFilenam 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 } }; diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.h diff --git a/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.hpp new file mode 100644 index 000000000..4530d1324 --- /dev/null +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/detail/update_filename__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from pcl_msgs:srv/UpdateFilename.idl +// generated code does not contain a copyright notice + +#ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TYPE_SUPPORT_HPP_ +#define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "pcl_msgs/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_pcl_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + srv, + UpdateFilename +)(); +#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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + srv, + UpdateFilename_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_pcl_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + pcl_msgs, + srv, + UpdateFilename_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/srv/update_filename.h b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/update_filename.h similarity index 100% rename from ThirdParty/ros/include/pcl_msgs/srv/update_filename.h rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/update_filename.h diff --git a/ThirdParty/ros/include/pcl_msgs/srv/update_filename.hpp b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/update_filename.hpp similarity index 86% rename from ThirdParty/ros/include/pcl_msgs/srv/update_filename.hpp rename to ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/update_filename.hpp index bac9627e3..b007e82d1 100644 --- a/ThirdParty/ros/include/pcl_msgs/srv/update_filename.hpp +++ b/ThirdParty/ros/include/pcl_msgs/pcl_msgs/srv/update_filename.hpp @@ -7,5 +7,6 @@ #include "pcl_msgs/srv/detail/update_filename__struct.hpp" #include "pcl_msgs/srv/detail/update_filename__builder.hpp" #include "pcl_msgs/srv/detail/update_filename__traits.hpp" +#include "pcl_msgs/srv/detail/update_filename__type_support.hpp" #endif // PCL_MSGS__SRV__UPDATE_FILENAME_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__traits.hpp b/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__traits.hpp deleted file mode 100644 index ccea22224..000000000 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from pcl_msgs:srv/UpdateFilename.idl -// generated code does not contain a copyright notice - -#ifndef PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ -#define PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ - -#include "pcl_msgs/srv/detail/update_filename__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::srv::UpdateFilename_Request"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/srv/UpdateFilename_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::srv::UpdateFilename_Response"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/srv/UpdateFilename_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "pcl_msgs::srv::UpdateFilename"; -} - -template<> -inline const char * name() -{ - return "pcl_msgs/srv/UpdateFilename"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // PCL_MSGS__SRV__DETAIL__UPDATE_FILENAME__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.c b/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.c deleted file mode 100644 index 49e267db4..000000000 --- a/ThirdParty/ros/include/pcl_msgs/srv/detail/update_filename__type_support.c +++ /dev/null @@ -1,228 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from pcl_msgs:srv/UpdateFilename.idl -// generated code does not contain a copyright notice - -#include -#include "pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h" -#include "pcl_msgs/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 "pcl_msgs/srv/detail/update_filename__functions.h" -#include "pcl_msgs/srv/detail/update_filename__struct.h" - - -// Include directives for member types -// Member `filename` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_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; - pcl_msgs__srv__UpdateFilename_Request__init(message_memory); -} - -void UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_fini_function(void * message_memory) -{ - pcl_msgs__srv__UpdateFilename_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_member_array[1] = { - { - "filename", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__srv__UpdateFilename_Request, filename), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_members = { - "pcl_msgs__srv", // message namespace - "UpdateFilename_Request", // message name - 1, // number of fields - sizeof(pcl_msgs__srv__UpdateFilename_Request), - UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_member_array, // message members - UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_init_function, // function to initialize message memory (memory has to be allocated) - UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_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 UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle = { - 0, - &UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Request)() { - if (!UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle.typesupport_identifier) { - UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UpdateFilename_Request__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "pcl_msgs/srv/detail/update_filename__rosidl_typesupport_introspection_c.h" -// already included above -// #include "pcl_msgs/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 "pcl_msgs/srv/detail/update_filename__functions.h" -// already included above -// #include "pcl_msgs/srv/detail/update_filename__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_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; - pcl_msgs__srv__UpdateFilename_Response__init(message_memory); -} - -void UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_fini_function(void * message_memory) -{ - pcl_msgs__srv__UpdateFilename_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_member_array[1] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(pcl_msgs__srv__UpdateFilename_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_members = { - "pcl_msgs__srv", // message namespace - "UpdateFilename_Response", // message name - 1, // number of fields - sizeof(pcl_msgs__srv__UpdateFilename_Response), - UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_member_array, // message members - UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_init_function, // function to initialize message memory (memory has to be allocated) - UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_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 UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle = { - 0, - &UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Response)() { - if (!UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle.typesupport_identifier) { - UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UpdateFilename_Response__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "pcl_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "pcl_msgs/srv/detail/update_filename__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 pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_members = { - "pcl_msgs__srv", // service namespace - "UpdateFilename", // service name - // these two fields are initialized below on the first access - NULL, // request message - // pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_Request_message_type_support_handle, - NULL // response message - // pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle = { - 0, - &pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_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, pcl_msgs, srv, UpdateFilename_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_pcl_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, pcl_msgs, srv, UpdateFilename)() { - if (!pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle.typesupport_identifier) { - pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_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, pcl_msgs, srv, UpdateFilename_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, pcl_msgs, srv, UpdateFilename_Response)()->data; - } - - return &pcl_msgs__srv__detail__update_filename__rosidl_typesupport_introspection_c__UpdateFilename_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl/allocator.h b/ThirdParty/ros/include/rcl/allocator.h deleted file mode 100644 index 1b3906f1e..000000000 --- a/ThirdParty/ros/include/rcl/allocator.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__ALLOCATOR_H_ -#define RCL__ALLOCATOR_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcutils/allocator.h" - -typedef rcutils_allocator_t rcl_allocator_t; - -#define rcl_get_default_allocator rcutils_get_default_allocator - -#define rcl_reallocf rcutils_reallocf - -#define RCL_CHECK_ALLOCATOR(allocator, fail_statement) \ - RCUTILS_CHECK_ALLOCATOR(allocator, fail_statement) - -#define RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \ - RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) - -#ifdef __cplusplus -} -#endif - -#endif // RCL__ALLOCATOR_H_ diff --git a/ThirdParty/ros/include/rcl/arguments.h b/ThirdParty/ros/include/rcl/arguments.h deleted file mode 100644 index f29da70f8..000000000 --- a/ThirdParty/ros/include/rcl/arguments.h +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__ARGUMENTS_H_ -#define RCL__ARGUMENTS_H_ - -#include "rcl/allocator.h" -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" -#include "rcl_yaml_param_parser/types.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -struct rcl_arguments_impl_t; - -/// Hold output of parsing command line arguments. -typedef struct rcl_arguments_t -{ - /// Private implementation pointer. - struct rcl_arguments_impl_t * impl; -} rcl_arguments_t; - -#define RCL_ROS_ARGS_FLAG "--ros-args" -#define RCL_ROS_ARGS_EXPLICIT_END_TOKEN "--" -#define RCL_PARAM_FLAG "--param" -#define RCL_SHORT_PARAM_FLAG "-p" -#define RCL_PARAM_FILE_FLAG "--params-file" -#define RCL_REMAP_FLAG "--remap" -#define RCL_SHORT_REMAP_FLAG "-r" -#define RCL_ENCLAVE_FLAG "--enclave" -#define RCL_SHORT_ENCLAVE_FLAG "-e" -#define RCL_LOG_LEVEL_FLAG "--log-level" -#define RCL_EXTERNAL_LOG_CONFIG_FLAG "--log-config-file" -// To be prefixed with --enable- or --disable- -#define RCL_LOG_STDOUT_FLAG_SUFFIX "stdout-logs" -#define RCL_LOG_ROSOUT_FLAG_SUFFIX "rosout-logs" -#define RCL_LOG_EXT_LIB_FLAG_SUFFIX "external-lib-logs" - -/// Return a rcl_arguments_t struct with members initialized to `NULL`. -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_arguments_t -rcl_get_zero_initialized_arguments(void); - -/// Parse command line arguments into a structure usable by code. -/** - * \sa rcl_get_zero_initialized_arguments() - * - * ROS arguments are expected to be scoped by a leading `--ros-args` flag and a trailing double - * dash token `--` which may be elided if no non-ROS arguments follow after the last `--ros-args`. - * - * Remap rule parsing is supported via `-r/--remap` flags e.g. `--remap from:=to` or `-r from:=to`. - * Successfully parsed remap rules are stored in the order they were given in `argv`. - * If given arguments `{"__ns:=/foo", "__ns:=/bar"}` then the namespace used by nodes in this - * process will be `/foo` and not `/bar`. - * - * \sa rcl_remap_topic_name() - * \sa rcl_remap_service_name() - * \sa rcl_remap_node_name() - * \sa rcl_remap_node_namespace() - * - * Parameter override rule parsing is supported via `-p/--param` flags e.g. `--param name:=value` - * or `-p name:=value`. - * - * The default log level will be parsed as `--log-level level`, where `level` is a name - * representing one of the log levels in the `RCUTILS_LOG_SEVERITY` enum, e.g. `info`, `debug`, - * `warn`, not case sensitive. - * If multiple of these rules are found, the last one parsed will be used. - * - * If an argument does not appear to be a valid ROS argument e.g. a `-r/--remap` flag followed by - * anything but a valid remap rule, parsing will fail immediately. - * - * If an argument does not appear to be a known ROS argument, then it is skipped and left unparsed. - * - * \sa rcl_arguments_get_count_unparsed_ros() - * \sa rcl_arguments_get_unparsed_ros() - * - * All arguments found outside a `--ros-args ... --` scope are skipped and left unparsed. - * - * \sa rcl_arguments_get_count_unparsed() - * \sa rcl_arguments_get_unparsed() - * - *


- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] argc The number of arguments in argv. - * \param[in] argv The values of the arguments. - * \param[in] allocator A valid allocator. - * \param[out] args_output A structure that will contain the result of parsing. - * Must be zero initialized before use. - * \return `RCL_RET_OK` if the arguments were parsed successfully, or - * \return `RCL_RET_INVALID_ROS_ARGS` if an invalid ROS argument is found, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_parse_arguments( - int argc, - const char * const argv[], - rcl_allocator_t allocator, - rcl_arguments_t * args_output); - -/// Return the number of arguments that were not ROS specific arguments. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args An arguments structure that has been parsed. - * \return number of unparsed arguments, or - * \return -1 if args is `NULL` or zero initialized. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -int -rcl_arguments_get_count_unparsed( - const rcl_arguments_t * args); - -/// Return a list of indices to non ROS specific arguments. -/** - * Non ROS specific arguments may have been provided i.e. arguments outside a '--ros-args' scope. - * This function populates an array of indices to these arguments in the original argv array. - * Since the first argument is always assumed to be a process name, the list will always contain - * the index 0. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args An arguments structure that has been parsed. - * \param[in] allocator A valid allocator. - * \param[out] output_unparsed_indices An allocated array of indices into the original argv array. - * This array must be deallocated by the caller using the given allocator. - * If there are no unparsed args then the output will be set to NULL. - * \return `RCL_RET_OK` if everything goes correctly, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_get_unparsed( - const rcl_arguments_t * args, - rcl_allocator_t allocator, - int ** output_unparsed_indices); - -/// Return the number of ROS specific arguments that were not successfully parsed. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args An arguments structure that has been parsed. - * \return number of unparsed ROS specific arguments, or - * \return -1 if args is `NULL` or zero initialized. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -int -rcl_arguments_get_count_unparsed_ros( - const rcl_arguments_t * args); - -/// Return a list of indices to unknown ROS specific arguments that were left unparsed. -/** - * Some ROS specific arguments may not have been recognized, or were not intended to be - * parsed by rcl. - * This function populates an array of indices to these arguments in the original argv array. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args An arguments structure that has been parsed. - * \param[in] allocator A valid allocator. - * \param[out] output_unparsed_ros_indices An allocated array of indices into the original argv array. - * This array must be deallocated by the caller using the given allocator. - * If there are no unparsed ROS specific arguments then the output will be set to NULL. - * \return `RCL_RET_OK` if everything goes correctly, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_get_unparsed_ros( - const rcl_arguments_t * args, - rcl_allocator_t allocator, - int ** output_unparsed_ros_indices); - -/// Return the number of parameter yaml files given in the arguments. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args An arguments structure that has been parsed. - * \return number of yaml files, or - * \return -1 if args is `NULL` or zero initialized. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -int -rcl_arguments_get_param_files_count( - const rcl_arguments_t * args); - - -/// Return a list of yaml parameter file paths specified on the command line. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] arguments An arguments structure that has been parsed. - * \param[in] allocator A valid allocator. - * \param[out] parameter_files An allocated array of paramter file names. - * This array must be deallocated by the caller using the given allocator. - * The output is NULL if there were no paramter files. - * \return `RCL_RET_OK` if everything goes correctly, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_get_param_files( - const rcl_arguments_t * arguments, - rcl_allocator_t allocator, - char *** parameter_files); - -/// Return all parameter overrides parsed from the command line. -/** - * Parameter overrides are parsed directly from command line arguments and - * parameter files provided in the command line. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] arguments An arguments structure that has been parsed. - * \param[out] parameter_overrides Parameter overrides as parsed from command line arguments. - * This structure must be finalized by the caller. - * The output is NULL if no parameter overrides were parsed. - * \return `RCL_RET_OK` if everything goes correctly, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_get_param_overrides( - const rcl_arguments_t * arguments, - rcl_params_t ** parameter_overrides); - -/// Return a list of arguments with ROS-specific arguments removed. -/** - * Some arguments may not have been intended as ROS arguments. - * This function populates an array of the aruments in a new argv array. - * Since the first argument is always assumed to be a process name, the list - * will always contain the first value from the argument vector. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] argv The argument vector - * \param[in] args An arguments structure that has been parsed. - * \param[in] allocator A valid allocator. - * \param[out] nonros_argc The count of arguments that aren't ROS-specific - * \param[out] nonros_argv An allocated array of arguments that aren't ROS-specific - * This array must be deallocated by the caller using the given allocator. - * If there are no non-ROS args, then the output will be set to NULL. - * \return `RCL_RET_OK` if everything goes correctly, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_remove_ros_arguments( - char const * const argv[], - const rcl_arguments_t * args, - rcl_allocator_t allocator, - int * nonros_argc, - const char ** nonros_argv[]); - -/// Copy one arguments structure into another. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args The structure to be copied. - * Its allocator is used to copy memory into the new structure. - * \param[out] args_out A zero-initialized arguments structure to be copied into. - * \return `RCL_RET_OK` if the structure was copied successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_copy( - const rcl_arguments_t * args, - rcl_arguments_t * args_out); - -/// Reclaim resources held inside rcl_arguments_t structure. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] args The structure to be deallocated. - * \return `RCL_RET_OK` if the memory was successfully freed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_arguments_fini( - rcl_arguments_t * args); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__ARGUMENTS_H_ diff --git a/ThirdParty/ros/include/rcl/event.h b/ThirdParty/ros/include/rcl/event.h deleted file mode 100644 index 6da7f8093..000000000 --- a/ThirdParty/ros/include/rcl/event.h +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__EVENT_H_ -#define RCL__EVENT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/client.h" -#include "rcl/macros.h" -#include "rcl/publisher.h" -#include "rcl/service.h" -#include "rcl/subscription.h" -#include "rcl/visibility_control.h" - -typedef enum rcl_publisher_event_type_t -{ - RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, - RCL_PUBLISHER_LIVELINESS_LOST, - RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS, -} rcl_publisher_event_type_t; - -typedef enum rcl_subscription_event_type_t -{ - RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED, - RCL_SUBSCRIPTION_LIVELINESS_CHANGED, - RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS, -} rcl_subscription_event_type_t; - -/// rmw struct. -typedef struct rmw_event_t rmw_event_t; - -/// Internal rcl implementation struct. -struct rcl_event_impl_t; - -/// Structure which encapsulates a ROS QoS event handle. -typedef struct rcl_event_t -{ - /// Pointer to the event implementation - struct rcl_event_impl_t * impl; -} rcl_event_t; - -/// Return a rcl_event_t struct with members set to `NULL`. -/** - * Should be called to get a null rcl_event_t before passing to - * rcl_event_init(). - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_event_t -rcl_get_zero_initialized_event(void); - -/// Initialize an rcl_event_t with a publisher. -/** - * Fill the rcl_event_t with the publisher and desired event_type. - * - * \param[in,out] event pointer to fill - * \param[in] publisher to get events from - * \param[in] event_type to listen for - * \return `RCL_RET_OK` if the rcl_event_t is filled, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory fails, or - * \return `RCL_RET_UNSUPPORTED` if event_type is not supported, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_publisher_event_init( - rcl_event_t * event, - const rcl_publisher_t * publisher, - const rcl_publisher_event_type_t event_type); - -/// Initialize an rcl_event_t with a subscription. -/** - * Fill the rcl_event_t with the subscription and desired event_type. - * - * \param[in,out] event pointer to fill - * \param[in] subscription to get events from - * \param[in] event_type to listen for - * \return `RCL_RET_OK` if the rcl_event_t is filled, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory fails, or - * \return `RCL_RET_UNSUPPORTED` if event_type is not supported, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_subscription_event_init( - rcl_event_t * event, - const rcl_subscription_t * subscription, - const rcl_subscription_event_type_t event_type); - -// Take event using the event handle. -/** - * Take an event from the event handle. - * - * \param[in] event event object to take from - * \param[in, out] event_info event info object to write taken data into - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCL_RET_EVENT_TAKE_FAILED` if the take event failed, or - * \return `RCL_RET_ERROR` if an unexpected error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_event( - const rcl_event_t * event, - void * event_info); - -// Finalize an event. -/** - * Finalize an event. - * - * \param[in] event to finalize - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_EVENT_INVALID` if event is null, or - * \return `RCL_RET_ERROR` if an unexpected error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_event_fini(rcl_event_t * event); - -/// Return the rmw event handle. -/** - * The handle returned is a pointer to the internally held rmw handle. - * This function can fail, and therefore return `NULL`, if the: - * - event is `NULL` - * - event is invalid (never called init, called fini, or invalid node) - * - * The returned handle is made invalid if the event is finalized or if - * rcl_shutdown() is called. - * The returned handle is not guaranteed to be valid for the life time of the - * event as it may be finalized and recreated itself. - * Therefore it is recommended to get the handle from the event using - * this function each time it is needed and avoid use of the handle - * concurrently with functions that might change it. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] event pointer to the rcl event - * \return rmw event handle if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rmw_event_t * -rcl_event_get_rmw_handle(const rcl_event_t * event); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__EVENT_H_ diff --git a/ThirdParty/ros/include/rcl/graph.h b/ThirdParty/ros/include/rcl/graph.h deleted file mode 100644 index e4756937d..000000000 --- a/ThirdParty/ros/include/rcl/graph.h +++ /dev/null @@ -1,738 +0,0 @@ -// Copyright 2016-2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__GRAPH_H_ -#define RCL__GRAPH_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - -#include "rcutils/types.h" - -#include "rosidl_runtime_c/service_type_support_struct.h" - -#include "rcl/macros.h" -#include "rcl/client.h" -#include "rcl/node.h" -#include "rcl/visibility_control.h" - -typedef rmw_names_and_types_t rcl_names_and_types_t; -typedef rmw_topic_endpoint_info_t rcl_topic_endpoint_info_t; -typedef rmw_topic_endpoint_info_array_t rcl_topic_endpoint_info_array_t; - -#define rcl_get_zero_initialized_names_and_types rmw_get_zero_initialized_names_and_types -#define rcl_get_zero_initialized_topic_endpoint_info_array \ - rmw_get_zero_initialized_topic_endpoint_info_array -#define rcl_topic_endpoint_info_array_fini rmw_topic_endpoint_info_array_fini - -/// Return a list of topic names and types for publishers associated with a node. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * There may be some demangling that occurs when listing the names from the middleware - * implementation. - * If the `no_demangle` argument is set to `true`, then this will be avoided and the names will be - * returned as they appear to the middleware. - * - * \see rmw_get_topic_names_and_types for more details on no_demangle - * - * The returned names are not automatically remapped by this function. - * Attempting to create publishers or subscribers using names returned by this function may not - * result in the desired topic name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[in] no_demangle if true, list all topics without any demangling - * \param[in] node_name the node name of the topics to return - * \param[in] node_namespace the node namespace of the topics to return - * \param[out] topic_names_and_types list of topic names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the node name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the node namespace is invalid, or - * \return `RCL_RET_NODE_NAME_NON_EXISTENT` if the node name wasn't found, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_publisher_names_and_types_by_node( - const rcl_node_t * node, - rcl_allocator_t * allocator, - bool no_demangle, - const char * node_name, - const char * node_namespace, - rcl_names_and_types_t * topic_names_and_types); - -/// Return a list of topic names and types for subscriptions associated with a node. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. - * - * The returned names are not automatically remapped by this function. - * Attempting to create publishers or subscribers using names returned by this function may not - * result in the desired topic name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[in] no_demangle if true, list all topics without any demangling - * \param[in] node_name the node name of the topics to return - * \param[in] node_namespace the node namespace of the topics to return - * \param[out] topic_names_and_types list of topic names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the node name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the node namespace is invalid, or - * \return `RCL_RET_NODE_NAME_NON_EXISTENT` if the node name wasn't found, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_subscriber_names_and_types_by_node( - const rcl_node_t * node, - rcl_allocator_t * allocator, - bool no_demangle, - const char * node_name, - const char * node_namespace, - rcl_names_and_types_t * topic_names_and_types); - -/// Return a list of service names and types associated with a node. -/** - * The `node` parameter must point to a valid node. - * - * The `service_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. - * - * The returned names are not automatically remapped by this function. - * Attempting to create service clients using names returned by this function may not - * result in the desired service name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[in] node_name the node name of the services to return - * \param[in] node_namespace the node namespace of the services to return - * \param[out] service_names_and_types list of service names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the node name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the node namespace is invalid, or - * \return `RCL_RET_NODE_NAME_NON_EXISTENT` if the node name wasn't found, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_service_names_and_types_by_node( - const rcl_node_t * node, - rcl_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - rcl_names_and_types_t * service_names_and_types); - -/// Return a list of service client names and types associated with a node. -/** - * The `node` parameter must point to a valid node. - * - * The `service_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. - * - * The returned names are not automatically remapped by this function. - * Attempting to create service servers using names returned by this function may not - * result in the desired service name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[in] node_name the node name of the services to return - * \param[in] node_namespace the node namespace of the services to return - * \param[out] service_names_and_types list of service client names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the node name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the node namespace is invalid, or - * \return `RCL_RET_NODE_NAME_NON_EXISTENT` if the node name wasn't found, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_client_names_and_types_by_node( - const rcl_node_t * node, - rcl_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - rcl_names_and_types_t * service_names_and_types); - -/// Return a list of topic names and their types. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. - * - * The returned names are not automatically remapped by this function. - * Attempting to create publishers or subscribers using names returned by this function may not - * result in the desired topic name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[in] no_demangle if true, list all topics without any demangling - * \param[out] topic_names_and_types list of topic names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the node name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the node namespace is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_topic_names_and_types( - const rcl_node_t * node, - rcl_allocator_t * allocator, - bool no_demangle, - rcl_names_and_types_t * topic_names_and_types); - -/// Return a list of service names and their types. -/** - * The `node` parameter must point to a valid node. - * - * The `service_names_and_types` parameter must be allocated and zero initialized. - * This function allocates memory for the returned list of names and types and so it is the - * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * The returned names are not automatically remapped by this function. - * Attempting to create clients or services using names returned by this function may not result in - * the desired service name being used depending on the remap rules in use. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for strings - * \param[out] service_names_and_types list of service names and their types - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_service_names_and_types( - const rcl_node_t * node, - rcl_allocator_t * allocator, - rcl_names_and_types_t * service_names_and_types); - -/// Initialize a rcl_names_and_types_t object. -/** - * This function initializes the string array for the names and allocates space - * for all the string arrays for the types according to the given size, but - * it does not initialize the string array for each set of types. - * However, the string arrays for each set of types is zero initialized. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] names_and_types object to be initialized - * \param[in] size the number of names and sets of types to be stored - * \param[in] allocator to be used to allocate and deallocate memory - * \returns `RCL_RET_OK` on success, or - * \returns `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \returns `RCL_BAD_ALLOC` if memory allocation fails, or - * \returns `RCL_RET_ERROR` when an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_names_and_types_init( - rcl_names_and_types_t * names_and_types, - size_t size, - rcl_allocator_t * allocator); - -/// Finalize a rcl_names_and_types_t object. -/** - * The object is populated when given to one of the rcl_get_*_names_and_types() - * functions. - * This function reclaims any resources allocated during population. - * - * The `names_and_types` parameter must not be `NULL`, and must point to an - * already allocated rcl_names_and_types_t struct that was previously - * passed to a successful rcl_get_*_names_and_types() function call. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] names_and_types struct to be finalized - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_names_and_types_fini(rcl_names_and_types_t * names_and_types); - -/// Return a list of available nodes in the ROS graph. -/** - * The `node` parameter must point to a valid node. - * - * The `node_names` parameter must be allocated and zero initialized. - * `node_names` is the output for this function, and contains allocated memory. - * Note that entries in the array might contain `NULL` values. - * Use rcutils_get_zero_initialized_string_array() for initializing an empty - * rcutils_string_array_t struct. - * This `node_names` struct should therefore be passed to rcutils_string_array_fini() - * when it is no longer needed. - * Failing to do so will result in leaked memory. - * - * Example: - * - * ```c - * rcutils_string_array_t node_names = - * rcutils_get_zero_initialized_string_array(); - * rcl_ret_t ret = rcl_get_node_names(node, &node_names); - * if (ret != RCL_RET_OK) { - * // ... error handling - * } - * // ... use the node_names struct, and when done: - * rcutils_ret_t rcutils_ret = rcutils_string_array_fini(&node_names); - * if (rcutils_ret != RCUTILS_RET_OK) { - * // ... error handling - * } - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator used to control allocation and deallocation of names - * \param[out] node_names struct storing discovered node names - * \param[out] node_namespaces struct storing discovered node namespaces - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_BAD_ALLOC` if an error occurred while allocating memory, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_node_names( - const rcl_node_t * node, - rcl_allocator_t allocator, - rcutils_string_array_t * node_names, - rcutils_string_array_t * node_namespaces); - -/// Return a list of available nodes in the ROS graph, including their enclave names. -/** - * An \ref rcl_get_node_names equivalent, but including in its output the enclave - * name the node is using. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] RMW implementation in use may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator used to control allocation and deallocation of names - * \param[out] node_names struct storing discovered node names - * \param[out] node_namespaces struct storing discovered node namespaces - * \param[out] enclaves struct storing discovered node enclaves - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_BAD_ALLOC` if an error occurred while allocating memory, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_node_names_with_enclaves( - const rcl_node_t * node, - rcl_allocator_t allocator, - rcutils_string_array_t * node_names, - rcutils_string_array_t * node_namespaces, - rcutils_string_array_t * enclaves); - -/// Return the number of publishers on a given topic. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_name` parameter must not be `NULL`, and must not be an empty string. - * It should also follow the topic name rules. - * \todo TODO(wjwwood): link to the topic name rules. - * - * The `count` parameter must point to a valid bool. - * The `count` parameter is the output for this function and will be set. - * - * In the event that error handling needs to allocate memory, this function - * will try to use the node's allocator. - * - * The topic name is not automatically remapped by this function. - * If there is a publisher created with topic name `foo` and remap rule `foo:=bar` then calling - * this with `topic_name` set to `bar` will return a count of 1, and with `topic_name` set to `foo` - * will return a count of 0. - * /sa rcl_remap_topic_name() - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] topic_name the name of the topic in question - * \param[out] count number of publishers on the given topic - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_count_publishers( - const rcl_node_t * node, - const char * topic_name, - size_t * count); - -/// Return the number of subscriptions on a given topic. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_name` parameter must not be `NULL`, and must not be an empty string. - * It should also follow the topic name rules. - * \todo TODO(wjwwood): link to the topic name rules. - * - * The `count` parameter must point to a valid bool. - * The `count` parameter is the output for this function and will be set. - * - * In the event that error handling needs to allocate memory, this function - * will try to use the node's allocator. - * - * The topic name is not automatically remapped by this function. - * If there is a subscriber created with topic name `foo` and remap rule `foo:=bar` then calling - * this with `topic_name` set to `bar` will return a count of 1, and with `topic_name` set to `foo` - * will return a count of 0. - * /sa rcl_remap_topic_name() - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] topic_name the name of the topic in question - * \param[out] count number of subscriptions on the given topic - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_count_subscribers( - const rcl_node_t * node, - const char * topic_name, - size_t * count); - -/// Return a list of all publishers to a topic. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_name` parameter must not be `NULL`. - * - * When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic name - * for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps). - * When the `no_mangle` parameter is `false`, the provided `topic_name` should follow - * ROS topic name conventions. - * In either case, the topic name should always be fully qualified. - * - * Each element in the `publishers_info` array will contain the node name, node namespace, - * topic type, gid and the qos profile of the publisher. - * It is the responsibility of the caller to ensure that `publishers_info` parameter points - * to a valid struct of type rcl_topic_endpoint_info_array_t. - * The `count` field inside the struct must be set to 0 and the `info_array` field inside - * the struct must be set to null. - * \see rmw_get_zero_initialized_topic_endpoint_info_array - * - * The `allocator` will be used to allocate memory to the `info_array` member - * inside of `publishers_info`. - * Moreover, every const char * member inside of - * rmw_topic_endpoint_info_t will be assigned a copied value on allocated memory. - * \see rmw_topic_endpoint_info_set_node_name and the likes. - * However, it is the responsibility of the caller to - * reclaim any allocated resources to `publishers_info` to avoid leaking memory. - * \see rmw_topic_endpoint_info_array_fini - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for - * the array inside publishers_info - * \param[in] topic_name the name of the topic in question - * \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name, - * otherwise it should be a valid ROS topic name - * \param[out] publishers_info a struct representing a list of publisher information - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_publishers_info_by_topic( - const rcl_node_t * node, - rcutils_allocator_t * allocator, - const char * topic_name, - bool no_mangle, - rcl_topic_endpoint_info_array_t * publishers_info); - -/// Return a list of all subscriptions to a topic. -/** - * The `node` parameter must point to a valid node. - * - * The `topic_name` parameter must not be `NULL`. - * - * When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic name - * for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps). - * When the `no_mangle` parameter is `false`, the provided `topic_name` should follow - * ROS topic name conventions. - * In either case, the topic name should always be fully qualified. - * - * Each element in the `subscriptions_info` array will contain the node name, node namespace, - * topic type, gid and the qos profile of the subscription. - * It is the responsibility of the caller to ensure that `subscriptions_info` parameter points - * to a valid struct of type rcl_topic_endpoint_info_array_t. - * The `count` field inside the struct must be set to 0 and the `info_array` field inside - * the struct must be set to null. - * \see rmw_get_zero_initialized_topic_endpoint_info_array - * - * The `allocator` will be used to allocate memory to the `info_array` member - * inside of `subscriptions_info`. - * Moreover, every const char * member inside of - * rmw_topic_endpoint_info_t will be assigned a copied value on allocated memory. - * \see rmw_topic_endpoint_info_set_node_name and the likes. - * However, it is the responsibility of the caller to - * reclaim any allocated resources to `subscriptions_info` to avoid leaking memory. - * \see rmw_topic_endpoint_info_array_fini - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] allocator allocator to be used when allocating space for - * the array inside publishers_info - * \param[in] topic_name the name of the topic in question - * \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name, - * otherwise it should be a valid ROS topic name - * \param[out] subscriptions_info a struct representing a list of subscriptions information - * \return `RCL_RET_OK` if the query was successful, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_get_subscriptions_info_by_topic( - const rcl_node_t * node, - rcutils_allocator_t * allocator, - const char * topic_name, - bool no_mangle, - rcl_topic_endpoint_info_array_t * subscriptions_info); - -/// Check if a service server is available for the given service client. -/** - * This function will return true for `is_available` if there is a service server - * available for the given client. - * - * The `node` parameter must point to a valid node. - * - * The `client` parameter must point to a valid client. - * - * The given client and node must match, i.e. the client must have been created - * using the given node. - * - * The `is_available` parameter must not be `NULL`, and must point a bool variable. - * The result of the check will be stored in the `is_available` parameter. - * - * In the event that error handling needs to allocate memory, this function - * will try to use the node's allocator. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] client the handle to the service client being queried - * \param[out] is_available set to true if there is a service server available, else false - * \return `RCL_RET_OK` if the check was made successfully (regardless of the service readiness), or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_service_server_is_available( - const rcl_node_t * node, - const rcl_client_t * client, - bool * is_available); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__GRAPH_H_ diff --git a/ThirdParty/ros/include/rcl/init.h b/ThirdParty/ros/include/rcl/init.h deleted file mode 100644 index 42b07b5f0..000000000 --- a/ThirdParty/ros/include/rcl/init.h +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2014 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__INIT_H_ -#define RCL__INIT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/allocator.h" -#include "rcl/context.h" -#include "rcl/init_options.h" -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -/// Initialization of rcl. -/** - * This function can be run any number of times, so long as the given context - * has been properly prepared. - * - * The given `rcl_context_t` must be zero initialized with the function - * `rcl_get_zero_initialized_context()` and must not be already initialized - * by this function. - * If the context is already initialized this function will fail and return the - * `RCL_RET_ALREADY_INIT` error code. - * A context may be initialized again after it has been finalized with the - * `rcl_shutdown()` function and zero initialized again with - * `rcl_get_zero_initialized_context()`. - * - * The `argc` and `argv` parameters may contain command line arguments for the - * program. - * rcl specific arguments will be parsed, but not removed. - * If `argc` is `0` and `argv` is `NULL` no parameters will be parsed. - * - * The `options` argument must be non-`NULL` and must have been initialized - * with `rcl_init_options_init()`. - * It is unmodified by this function, and the ownership is not transfered to - * the context, but instead a copy is made into the context for later reference. - * Therefore, the given options need to be cleaned up with - * `rcl_init_options_fini()` after this function returns. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes [1] - * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` - * - * \param[in] argc number of strings in argv - * \param[in] argv command line arguments; rcl specific arguments are removed - * \param[in] options options used during initialization - * \param[out] context resulting context object that represents this init - * \return `RCL_RET_OK` if initialization is successful, or - * \return `RCL_RET_ALREADY_INIT` if rcl_init has already been called, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_INVALID_ROS_ARGS` if an invalid ROS argument is found, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init( - int argc, - char const * const * argv, - const rcl_init_options_t * options, - rcl_context_t * context); - -/// Shutdown a given rcl context. -/** - * The given context must have been initialized with `rcl_init()`. - * If not, this function will fail with `RCL_RET_ALREADY_SHUTDOWN`. - * - * When this function is called: - * - Any rcl objects created using this context are invalidated. - * - Functions called on invalid objects may or may not fail. - * - Calls to `rcl_context_is_initialized()` will return `false`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | Yes - * Uses Atomics | Yes - * Lock-Free | Yes [1] - * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` - * - * \param[inout] context object to shutdown - * \return `RCL_RET_OK` if the shutdown was completed successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_SHUTDOWN` if the context is not currently valid, or - * \return `RCL_RET_ERROR` if an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_shutdown(rcl_context_t * context); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__INIT_H_ diff --git a/ThirdParty/ros/include/rcl/init_options.h b/ThirdParty/ros/include/rcl/init_options.h deleted file mode 100644 index c6ccb5938..000000000 --- a/ThirdParty/ros/include/rcl/init_options.h +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__INIT_OPTIONS_H_ -#define RCL__INIT_OPTIONS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rmw/init.h" - -#include "rcl/allocator.h" -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -struct rcl_init_options_impl_t; - -/// Encapsulation of init options and implementation defined init options. -typedef struct rcl_init_options_t -{ - /// Implementation specific pointer. - struct rcl_init_options_impl_t * impl; -} rcl_init_options_t; - -/// Return a zero initialized rcl_init_options_t struct. -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_init_options_t -rcl_get_zero_initialized_init_options(void); - -/// Initialize given init_options with the default values and implementation specific values. -/** - * The given allocator is used, if required, during setup of the init options, - * but is also used during initialization. - * - * In either case the given allocator is stored in the returned init options. - * - * The `impl` pointer should not be changed manually. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * \param[inout] init_options object to be setup - * \param[in] allocator to be used during setup and during initialization - * \return `RCL_RET_OK` if setup is successful, or - * \return `RCL_RET_ALREADY_INIT` if init_options has already be initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init_options_init(rcl_init_options_t * init_options, rcl_allocator_t allocator); - -/// Copy the given source init_options to the destination init_options. -/** - * The allocator from the source is used for any allocations and stored in the - * destination. - * - * The destination should either be zero initialized with - * `rcl_get_zero_initialized_init_options()` or should have had - * `rcl_init_options_fini()` called on it. - * Giving an already initialized init options for the destination will result - * in a failure with return code `RCL_RET_ALREADY_INIT`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * \param[in] src rcl_init_options_t object to be copied from - * \param[out] dst rcl_init_options_t object to be copied into - * \return `RCL_RET_OK` if the copy is successful, or - * \return `RCL_RET_ALREADY_INIT` if the dst has already be initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init_options_copy(const rcl_init_options_t * src, rcl_init_options_t * dst); - -/// Finalize the given init_options. -/** - * The given init_options must be non-`NULL` and valid, i.e. had - * `rcl_init_options_init()` called on it but not this function yet. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * \param[inout] init_options object to be setup - * \return `RCL_RET_OK` if setup is successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init_options_fini(rcl_init_options_t * init_options); - -/// Return the domain_id stored in the init options. -/** - * Get the domain id from the specified rcl_init_options_t object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] init_options object from which the domain id should be retrieved. - * \param[out] domain_id domain id to be set in init_options object. - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init_options_get_domain_id(rcl_init_options_t * init_options, size_t * domain_id); - -/// Set a domain id in the init options provided. -/** - * Store the domain id in the specified init_options object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] init_options objects in which to set the specified domain id. - * \param[in] domain_id domain id to be set in init_options object. - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_init_options_set_domain_id(rcl_init_options_t * init_options, size_t domain_id); - -/// Return the rmw init options which are stored internally. -/** - * This function can fail and return `NULL` if: - * - init_options is NULL - * - init_options is invalid, e.g. init_options->impl is NULL - * - * If NULL is returned an error message will have been set. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * \param[in] init_options object from which the rmw init options should be retrieved - * \return pointer to the the rcl init options, or - * \return `NULL` if there was an error - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rmw_init_options_t * -rcl_init_options_get_rmw_init_options(rcl_init_options_t * init_options); - -/// Return the allocator stored in the init_options. -/** - * This function can fail and return `NULL` if: - * - init_options is NULL - * - init_options is invalid, e.g. init_options->impl is NULL - * - * If NULL is returned an error message will have been set. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] init_options object from which the allocator should be retrieved - * \return pointer to the rcl allocator, or - * \return `NULL` if there was an error - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const rcl_allocator_t * -rcl_init_options_get_allocator(const rcl_init_options_t * init_options); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__INIT_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rcl/localhost.h b/ThirdParty/ros/include/rcl/localhost.h deleted file mode 100644 index 551b36702..000000000 --- a/ThirdParty/ros/include/rcl/localhost.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__LOCALHOST_H_ -#define RCL__LOCALHOST_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/types.h" -#include "rcl/visibility_control.h" -#include "rmw/localhost.h" - -extern const char * const RCL_LOCALHOST_ENV_VAR; - -/// Determine if the user wants to communicate using loopback only. -/** - * Checks if localhost should be used for network communication based on environment. - * - * \param[out] localhost_only Must not be NULL. - * \returns RCL_RET_INVALID_ARGUMENT if an argument is invalid, or - * \returns RCL_RET_ERROR if an unexpected error happened, or - * \returns RCL_RET_OK. - */ -RCL_PUBLIC -rcl_ret_t -rcl_get_localhost_only(rmw_localhost_only_t * localhost_only); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__LOCALHOST_H_ diff --git a/ThirdParty/ros/include/rcl/logging.h b/ThirdParty/ros/include/rcl/logging.h deleted file mode 100644 index 1014853d5..000000000 --- a/ThirdParty/ros/include/rcl/logging.h +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__LOGGING_H_ -#define RCL__LOGGING_H_ - -#include "rcl/allocator.h" -#include "rcl/arguments.h" -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -#include "rcutils/logging.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -typedef rcutils_logging_output_handler_t rcl_logging_output_handler_t; - -/// Configure the logging system. -/** - * This function should be called during the ROS initialization process. - * It will add the enabled log output appenders to the root logger. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param global_args The global arguments for the system - * \param allocator Used to allocate memory used by the logging system - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if a general error occurs - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_configure( - const rcl_arguments_t * global_args, - const rcl_allocator_t * allocator); - -/// Configure the logging system with the provided output handler. -/** - * Similar to rcl_logging_configure, but it uses the provided output handler. - * \sa rcl_logging_configure - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param global_args The global arguments for the system - * \param allocator Used to allocate memory used by the logging system - * \param output_handler Output handler to be installed - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if a general error occurs - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_configure_with_output_handler( - const rcl_arguments_t * global_args, - const rcl_allocator_t * allocator, - rcl_logging_output_handler_t output_handler); - -/** - * This function should be called to tear down the logging setup by the configure function. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `RCL_RET_OK` if successful. - * \return `RCL_RET_ERROR` if a general error occurs - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t rcl_logging_fini(); - -/// See if logging rosout is enabled. -/** - * This function is meant to be used to check if logging rosout is enabled. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `TRUE` if logging rosout is enabled, or - * \return `FALSE` if logging rosout is disabled. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -bool rcl_logging_rosout_enabled(); - -/// Default output handler used by rcl. -/** - * This function can be wrapped in a language specific client library, - * adding the necessary mutual exclusion protection there, and then use - * `rcl_logging_configure_with_output_handler` instead of - * `rcl_logging_configure`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - */ -RCL_PUBLIC -void -rcl_logging_multiple_output_handler( - const rcutils_log_location_t * location, - int severity, const char * name, rcutils_time_point_value_t timestamp, - const char * format, va_list * args); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__LOGGING_H_ diff --git a/ThirdParty/ros/include/rcl/logging_external_interface.h b/ThirdParty/ros/include/rcl/logging_external_interface.h deleted file mode 100644 index 97961a772..000000000 --- a/ThirdParty/ros/include/rcl/logging_external_interface.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__LOGGING_EXTERNAL_INTERFACE_H_ -#define RCL__LOGGING_EXTERNAL_INTERFACE_H_ - -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// Initialize the external logging library. -/** - * \param[in] config_file The location of a config file that the external - * logging library should use to configure itself. - * If no config file is provided this will be set to an empty string. - * Must be a NULL terminated c string. - * \param[in] allocator The allocator to use for memory allocation. This is - * an rcutils_allocator_t rather than an rcl_allocator_t to ensure that the - * rcl_logging_* packages don't have a circular dependency back to rcl. - * \todo TODO(clalancette) This API is marked RCL_PUBLIC, but is not built or - * exported from librcl. Instead, these headers should be split into a - * separate package which is then depended on by both rcl and the - * rcl_logging_* implementations. The duplicated headers from the - * implementations could then be removed. - * \return RCL_RET_OK if initialized successfully, or - * \return RCL_RET_ERROR if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_external_initialize(const char * config_file, rcutils_allocator_t allocator); - -/// Free the resources allocated for the external logging system. -/** - * This puts the system into a state equivalent to being uninitialized. - * - * \return RCL_RET_OK if successfully shutdown, or - * \return RCL_RET_ERROR if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_external_shutdown(); - -/// Log a message. -/** - * \param[in] severity The severity level of the message being logged. - * \param[in] name The name of the logger, must either be a null terminated - * c string or NULL. - * If NULL or empty the root logger will be used. - * \param[in] msg The message to be logged. Must be a null terminated c string. - */ -RCL_PUBLIC -void -rcl_logging_external_log(int severity, const char * name, const char * msg); - -/// Set the severity level for a logger. -/** - * This function sets the severity level for the specified logger. - * If the name provided is an empty string or NULL it will change the level of - * the root logger. - * - * \param[in] name The name of the logger. - * Must be a NULL terminated c string or NULL. - * \param[in] level The severity level to be used for the specified logger. - * \return RCL_RET_OK if set successfully, or - * \return RCL_RET_ERROR if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t rcl_logging_external_set_logger_level(const char * name, int level); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__LOGGING_EXTERNAL_INTERFACE_H_ diff --git a/ThirdParty/ros/include/rcl/logging_rosout.h b/ThirdParty/ros/include/rcl/logging_rosout.h deleted file mode 100644 index 255511680..000000000 --- a/ThirdParty/ros/include/rcl/logging_rosout.h +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2018-2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__LOGGING_ROSOUT_H_ -#define RCL__LOGGING_ROSOUT_H_ - -#include "rcl/allocator.h" -#include "rcl/error_handling.h" -#include "rcl/node.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Initializes the rcl_logging_rosout features -/** - * Calling this will initialize the rcl_logging_rosout features. This function must be called - * before any other rcl_logging_rosout_* functions can be called. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] allocator The allocator used for metadata related to the rcl_logging_rosout features - * \return `RCL_RET_OK` if the rcl_logging_rosout features are successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_rosout_init( - const rcl_allocator_t * allocator); - -/// Uninitializes the rcl_logging_rosout features -/** - * Calling this will set the rcl_logging_rosout features into the an unitialized state that is - * functionally the same as before rcl_logging_rosout_init was called. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `RCL_RET_OK` if the rcl_logging_rosout feature was successfully unitialized, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_rosout_fini(); - -/// Creates a rosout publisher for a node and registers it to be used by the logging system -/** - * Calling this for an rcl_node_t will create a new publisher on that node that will be - * used by the logging system to publish all log messages from that Node's logger. - * - * If a publisher already exists for this node then a new publisher will NOT be created. - * - * It is expected that after creating a rosout publisher with this function - * rcl_logging_destroy_rosout_publisher_for_node() will be called for the node to cleanup - * the publisher while the Node is still valid. - * - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] node a valid rcl_node_t that the publisher will be created on - * \return `RCL_RET_OK` if the logging publisher was created successfully, or - * \return `RCL_RET_NODE_INVALID` if the argument is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_rosout_init_publisher_for_node( - rcl_node_t * node); - -/// Deregisters a rosout publisher for a node and cleans up allocated resources -/** - * Calling this for an rcl_node_t will destroy the rosout publisher on that node and remove it from - * the logging system so that no more Log messages are published to this function. - * - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] node a valid rcl_node_t that the publisher will be created on - * \return `RCL_RET_OK` if the logging publisher was finalized successfully, or - * \return `RCL_RET_NODE_INVALID` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_logging_rosout_fini_publisher_for_node( - rcl_node_t * node); - -/// The output handler outputs log messages to rosout topics. -/** - * When called with a logger name and log message this function will attempt to - * find a rosout publisher correlated with the logger name and publish a Log - * message out via that publisher. If there is no publisher directly correlated - * with the logger then nothing will be done. - * - * This function is meant to be registered with the logging functions for rcutils - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] location The pointer to the location struct or NULL - * \param[in] severity The severity level - * \param[in] name The name of the logger, must be null terminated c string - * \param[in] timestamp The timestamp for when the log message was made - * \param[in] format The list of arguments to insert into the formatted log message - * \param[in] args argument for the string format - */ -RCL_PUBLIC -void rcl_logging_rosout_output_handler( - const rcutils_log_location_t * location, - int severity, - const char * name, - rcutils_time_point_value_t timestamp, - const char * format, - va_list * args); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__LOGGING_ROSOUT_H_ diff --git a/ThirdParty/ros/include/rcl/macros.h b/ThirdParty/ros/include/rcl/macros.h deleted file mode 100644 index 2f478fe21..000000000 --- a/ThirdParty/ros/include/rcl/macros.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__MACROS_H_ -#define RCL__MACROS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Ignored return values of functions with this macro will emit a warning. -#define RCL_WARN_UNUSED RCUTILS_WARN_UNUSED - -#define RCL_UNUSED(x) (void)(x) - -#ifdef __cplusplus -} -#endif - -#endif // RCL__MACROS_H_ diff --git a/ThirdParty/ros/include/rcl/node_options.h b/ThirdParty/ros/include/rcl/node_options.h deleted file mode 100644 index c9c0edfb0..000000000 --- a/ThirdParty/ros/include/rcl/node_options.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__NODE_OPTIONS_H_ -#define RCL__NODE_OPTIONS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/allocator.h" -#include "rcl/arguments.h" - -#include "rcl/domain_id.h" - -/// Constant which indicates that the default domain id should be used. -#define RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID RCL_DEFAULT_DOMAIN_ID - -/// Structure which encapsulates the options for creating a rcl_node_t. -typedef struct rcl_node_options_t -{ - // bool anonymous_name; - - // rmw_qos_profile_t parameter_qos; - - /// If true, no parameter infrastructure will be setup. - // bool no_parameters; - - /// If set, then this value overrides the ROS_DOMAIN_ID environment variable. - /** - * It defaults to RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID, which will cause the - * node to use the ROS domain ID set in the ROS_DOMAIN_ID environment - * variable, or on some systems 0 if the environment variable is not set. - * - * \todo TODO(wjwwood): - * Should we put a limit on the ROS_DOMAIN_ID value, that way we can have - * a safe value for the default RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID? - * (currently max size_t) - */ - size_t domain_id; - - /// Custom allocator used for internal allocations. - rcl_allocator_t allocator; - - /// If false then only use arguments in this struct, otherwise use global arguments also. - bool use_global_arguments; - - /// Command line arguments that apply only to this node. - rcl_arguments_t arguments; - - /// Flag to enable rosout for this node - bool enable_rosout; -} rcl_node_options_t; - -/// Return the default node options in a rcl_node_options_t. -/** - * The default values are: - * - * - domain_id = RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID - * - allocator = rcl_get_default_allocator() - * - use_global_arguments = true - * - enable_rosout = true - * - arguments = rcl_get_zero_initialized_arguments() - */ -RCL_PUBLIC -rcl_node_options_t -rcl_node_get_default_options(void); - -/// Copy one options structure into another. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] options The structure to be copied. - * Its allocator is used to copy memory into the new structure. - * \param[out] options_out An options structure containing default values. - * \return `RCL_RET_OK` if the structure was copied successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_node_options_copy( - const rcl_node_options_t * options, - rcl_node_options_t * options_out); - -/// Finalize the given node_options. -/** - * The given node_options must be non-`NULL` and valid, i.e. had - * `rcl_node_get_default_options()` called on it but not this function yet. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * \param[inout] options object to be finalized - * \return `RCL_RET_OK` if setup is successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_node_options_fini(rcl_node_options_t * options); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__NODE_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/allocator.h b/ThirdParty/ros/include/rcl/rcl/allocator.h new file mode 100644 index 000000000..c57ec0fc3 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/allocator.h @@ -0,0 +1,63 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__ALLOCATOR_H_ +#define RCL__ALLOCATOR_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcutils/allocator.h" + +/// Encapsulation of an allocator. +/** + * \sa rcutils_allocator_t + */ +typedef rcutils_allocator_t rcl_allocator_t; + +/// Return a properly initialized rcl_allocator_t with default values. +/** + * \sa rcutils_get_default_allocator() + */ +#define rcl_get_default_allocator rcutils_get_default_allocator + +/// Emulate the behavior of [reallocf](https://linux.die.net/man/3/reallocf). +/** + * \sa rcutils_reallocf() + */ +#define rcl_reallocf rcutils_reallocf + +/// Check that the given allocator is initialized. +/** + * If the allocator is not initialized, run the fail_statement. + */ +#define RCL_CHECK_ALLOCATOR(allocator, fail_statement) \ + RCUTILS_CHECK_ALLOCATOR(allocator, fail_statement) + +/// Check that the given allocator is initialized, or fail with a message. +/** + * If the allocator is not initialized, set the error to msg, and run the fail_statement. + */ +#define RCL_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \ + RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) + +#ifdef __cplusplus +} +#endif + +#endif // RCL__ALLOCATOR_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/arguments.h b/ThirdParty/ros/include/rcl/rcl/arguments.h new file mode 100644 index 000000000..44c99f6a9 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/arguments.h @@ -0,0 +1,454 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__ARGUMENTS_H_ +#define RCL__ARGUMENTS_H_ + +#include "rcl/allocator.h" +#include "rcl/log_level.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" +#include "rcl_yaml_param_parser/types.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct rcl_arguments_impl_s rcl_arguments_impl_t; + +/// Hold output of parsing command line arguments. +typedef struct rcl_arguments_s +{ + /// Private implementation pointer. + rcl_arguments_impl_t * impl; +} rcl_arguments_t; + +/// The command-line flag that delineates the start of ROS arguments. +#define RCL_ROS_ARGS_FLAG "--ros-args" + +/// The token that delineates the explicit end of ROS arguments. +#define RCL_ROS_ARGS_EXPLICIT_END_TOKEN "--" + +/// The ROS flag that precedes the setting of a ROS parameter. +#define RCL_PARAM_FLAG "--param" + +/// The short version of the ROS flag that precedes the setting of a ROS parameter. +#define RCL_SHORT_PARAM_FLAG "-p" + +/// The ROS flag that precedes a path to a file containing ROS parameters. +#define RCL_PARAM_FILE_FLAG "--params-file" + +/// The ROS flag that precedes a ROS remapping rule. +#define RCL_REMAP_FLAG "--remap" + +/// The short version of the ROS flag that precedes a ROS remapping rule. +#define RCL_SHORT_REMAP_FLAG "-r" + +/// The ROS flag that precedes the name of a ROS security enclave. +#define RCL_ENCLAVE_FLAG "--enclave" + +/// The short version of the ROS flag that precedes the name of a ROS security enclave. +#define RCL_SHORT_ENCLAVE_FLAG "-e" + +/// The ROS flag that precedes the ROS logging level to set. +#define RCL_LOG_LEVEL_FLAG "--log-level" + +/// The ROS flag that precedes the name of a configuration file to configure logging. +#define RCL_EXTERNAL_LOG_CONFIG_FLAG "--log-config-file" + +/// The suffix of the ROS flag to enable or disable stdout +/// logging (must be preceded with --enable- or --disable-). +#define RCL_LOG_STDOUT_FLAG_SUFFIX "stdout-logs" + +/// The suffix of the ROS flag to enable or disable rosout +/// logging (must be preceded with --enable- or --disable-). +#define RCL_LOG_ROSOUT_FLAG_SUFFIX "rosout-logs" + +/// The suffix of the ROS flag to enable or disable external library +/// logging (must be preceded with --enable- or --disable-). +#define RCL_LOG_EXT_LIB_FLAG_SUFFIX "external-lib-logs" + +/// Return a rcl_arguments_t struct with members initialized to `NULL`. +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_arguments_t +rcl_get_zero_initialized_arguments(void); + +/// Parse command line arguments into a structure usable by code. +/** + * \sa rcl_get_zero_initialized_arguments() + * + * ROS arguments are expected to be scoped by a leading `--ros-args` flag and a trailing double + * dash token `--` which may be elided if no non-ROS arguments follow after the last `--ros-args`. + * + * Remap rule parsing is supported via `-r/--remap` flags e.g. `--remap from:=to` or `-r from:=to`. + * Successfully parsed remap rules are stored in the order they were given in `argv`. + * If given arguments `{"__ns:=/foo", "__ns:=/bar"}` then the namespace used by nodes in this + * process will be `/foo` and not `/bar`. + * + * \sa rcl_remap_topic_name() + * \sa rcl_remap_service_name() + * \sa rcl_remap_node_name() + * \sa rcl_remap_node_namespace() + * + * Parameter override rule parsing is supported via `-p/--param` flags e.g. `--param name:=value` + * or `-p name:=value`. + * + * The default log level will be parsed as `--log-level level` and logger levels will be parsed as + * multiple `--log-level name:=level`, where `level` is a name representing one of the log levels + * in the `RCUTILS_LOG_SEVERITY` enum, e.g. `info`, `debug`, `warn`, not case sensitive. + * If multiple of these rules are found, the last one parsed will be used. + * + * If an argument does not appear to be a valid ROS argument e.g. a `-r/--remap` flag followed by + * anything but a valid remap rule, parsing will fail immediately. + * + * If an argument does not appear to be a known ROS argument, then it is skipped and left unparsed. + * + * \sa rcl_arguments_get_count_unparsed_ros() + * \sa rcl_arguments_get_unparsed_ros() + * + * All arguments found outside a `--ros-args ... --` scope are skipped and left unparsed. + * + * \sa rcl_arguments_get_count_unparsed() + * \sa rcl_arguments_get_unparsed() + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] argc The number of arguments in argv. + * \param[in] argv The values of the arguments. + * \param[in] allocator A valid allocator. + * \param[out] args_output A structure that will contain the result of parsing. + * Must be zero initialized before use. + * \return #RCL_RET_OK if the arguments were parsed successfully, or + * \return #RCL_RET_INVALID_ROS_ARGS if an invalid ROS argument is found, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_parse_arguments( + int argc, + const char * const * argv, + rcl_allocator_t allocator, + rcl_arguments_t * args_output); + +/// Return the number of arguments that were not ROS specific arguments. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args An arguments structure that has been parsed. + * \return number of unparsed arguments, or + * \return -1 if args is `NULL` or zero initialized. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +int +rcl_arguments_get_count_unparsed( + const rcl_arguments_t * args); + +/// Return a list of indices to non ROS specific arguments. +/** + * Non ROS specific arguments may have been provided i.e. arguments outside a '--ros-args' scope. + * This function populates an array of indices to these arguments in the original argv array. + * Since the first argument is always assumed to be a process name, the list will always contain + * the index 0. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args An arguments structure that has been parsed. + * \param[in] allocator A valid allocator. + * \param[out] output_unparsed_indices An allocated array of indices into the original argv array. + * This array must be deallocated by the caller using the given allocator. + * If there are no unparsed args then the output will be set to NULL. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_get_unparsed( + const rcl_arguments_t * args, + rcl_allocator_t allocator, + int ** output_unparsed_indices); + +/// Return the number of ROS specific arguments that were not successfully parsed. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args An arguments structure that has been parsed. + * \return number of unparsed ROS specific arguments, or + * \return -1 if args is `NULL` or zero initialized. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +int +rcl_arguments_get_count_unparsed_ros( + const rcl_arguments_t * args); + +/// Return a list of indices to unknown ROS specific arguments that were left unparsed. +/** + * Some ROS specific arguments may not have been recognized, or were not intended to be + * parsed by rcl. + * This function populates an array of indices to these arguments in the original argv array. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args An arguments structure that has been parsed. + * \param[in] allocator A valid allocator. + * \param[out] output_unparsed_ros_indices An allocated array of indices into the original argv array. + * This array must be deallocated by the caller using the given allocator. + * If there are no unparsed ROS specific arguments then the output will be set to NULL. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_get_unparsed_ros( + const rcl_arguments_t * args, + rcl_allocator_t allocator, + int ** output_unparsed_ros_indices); + +/// Return the number of parameter yaml files given in the arguments. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args An arguments structure that has been parsed. + * \return number of yaml files, or + * \return -1 if args is `NULL` or zero initialized. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +int +rcl_arguments_get_param_files_count( + const rcl_arguments_t * args); + + +/// Return a list of yaml parameter file paths specified on the command line. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] arguments An arguments structure that has been parsed. + * \param[in] allocator A valid allocator. + * \param[out] parameter_files An allocated array of paramter file names. + * This array must be deallocated by the caller using the given allocator. + * The output is NULL if there were no paramter files. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_get_param_files( + const rcl_arguments_t * arguments, + rcl_allocator_t allocator, + char *** parameter_files); + +/// Return all parameter overrides parsed from the command line. +/** + * Parameter overrides are parsed directly from command line arguments and + * parameter files provided in the command line. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] arguments An arguments structure that has been parsed. + * \param[out] parameter_overrides Parameter overrides as parsed from command line arguments. + * This structure must be finalized by the caller. + * The output is NULL if no parameter overrides were parsed. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_get_param_overrides( + const rcl_arguments_t * arguments, + rcl_params_t ** parameter_overrides); + +/// Return a list of arguments with ROS-specific arguments removed. +/** + * Some arguments may not have been intended as ROS arguments. + * This function populates an array of the aruments in a new argv array. + * Since the first argument is always assumed to be a process name, the list + * will always contain the first value from the argument vector. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] argv The argument vector + * \param[in] args An arguments structure that has been parsed. + * \param[in] allocator A valid allocator. + * \param[out] nonros_argc The count of arguments that aren't ROS-specific + * \param[out] nonros_argv An allocated array of arguments that aren't ROS-specific + * This array must be deallocated by the caller using the given allocator. + * If there are no non-ROS args, then the output will be set to NULL. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_remove_ros_arguments( + const char * const * argv, + const rcl_arguments_t * args, + rcl_allocator_t allocator, + int * nonros_argc, + const char *** nonros_argv); + +/// Return log levels parsed from the command line. +/** + * Log levels are parsed directly from command line arguments. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] arguments An arguments structure that has been parsed. + * \param[out] log_levels Log levels as parsed from command line arguments. + * The output must be finished by the caller if the function successes. + * \return #RCL_RET_OK if everything goes correctly, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_get_log_levels( + const rcl_arguments_t * arguments, + rcl_log_levels_t * log_levels); + +/// Copy one arguments structure into another. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args The structure to be copied. + * Its allocator is used to copy memory into the new structure. + * \param[out] args_out A zero-initialized arguments structure to be copied into. + * \return #RCL_RET_OK if the structure was copied successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_copy( + const rcl_arguments_t * args, + rcl_arguments_t * args_out); + +/// Reclaim resources held inside rcl_arguments_t structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] args The structure to be deallocated. + * \return #RCL_RET_OK if the memory was successfully freed, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_arguments_fini( + rcl_arguments_t * args); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__ARGUMENTS_H_ diff --git a/ThirdParty/ros/include/rcl/client.h b/ThirdParty/ros/include/rcl/rcl/client.h similarity index 75% rename from ThirdParty/ros/include/rcl/client.h rename to ThirdParty/ros/include/rcl/rcl/client.h index 97dade4f2..224f74b8c 100644 --- a/ThirdParty/ros/include/rcl/client.h +++ b/ThirdParty/ros/include/rcl/rcl/client.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__CLIENT_H_ #define RCL__CLIENT_H_ @@ -22,22 +24,23 @@ extern "C" #include "rosidl_runtime_c/service_type_support_struct.h" +#include "rcl/event_callback.h" #include "rcl/macros.h" #include "rcl/node.h" #include "rcl/visibility_control.h" /// Internal rcl client implementation struct. -struct rcl_client_impl_t; +typedef struct rcl_client_impl_s rcl_client_impl_t; /// Structure which encapsulates a ROS Client. -typedef struct rcl_client_t +typedef struct rcl_client_s { /// Pointer to the client implementation - struct rcl_client_impl_t * impl; + rcl_client_impl_t * impl; } rcl_client_t; /// Options available for a rcl_client_t. -typedef struct rcl_client_options_t +typedef struct rcl_client_options_s { /// Middleware quality of service settings for the client. rmw_qos_profile_t qos; @@ -142,13 +145,13 @@ rcl_get_zero_initialized_client(void); * \param[in] type_support type support object for the service's type * \param[in] service_name the name of the service to request * \param[in] options client options, including quality of service settings - * \return `RCL_RET_OK` if the client was initialized successfully, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ALREADY_INIT` if the client is already initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory fails, or - * \return `RCL_RET_SERVICE_NAME_INVALID` if the given service name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the client was initialized successfully, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ALREADY_INIT if the client is already initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory fails, or + * \return #RCL_RET_SERVICE_NAME_INVALID if the given service name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -176,10 +179,10 @@ rcl_client_init( * * \param[inout] client handle to the client to be finalized * \param[in] node a valid (not finalized) handle to the node used to create the client - * \return `RCL_RET_OK` if client was finalized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if client was finalized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -237,10 +240,10 @@ rcl_client_get_default_options(void); * \param[in] client handle to the client which will make the response * \param[in] ros_request type-erased pointer to the ROS request message * \param[out] sequence_number the sequence number - * \return `RCL_RET_OK` if the request was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_CLIENT_INVALID` if the client is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the request was sent successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_CLIENT_INVALID if the client is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -276,12 +279,12 @@ rcl_send_request(const rcl_client_t * client, const void * ros_request, int64_t * \param[in] client handle to the client which will take the response * \param[inout] request_header pointer to the request header * \param[inout] ros_response type-erased pointer to the ROS response message - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_CLIENT_INVALID` if the client is invalid, or - * \return `RCL_RET_CLIENT_TAKE_FAILED` if take failed but no error occurred + * \return #RCL_RET_OK if the response was taken successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_CLIENT_INVALID if the client is invalid, or + * \return #RCL_RET_CLIENT_TAKE_FAILED if take failed but no error occurred * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -407,6 +410,89 @@ RCL_PUBLIC bool rcl_client_is_valid(const rcl_client_t * client); +/// Get the actual qos settings of the client's request publisher. +/** + * Used to get the actual qos settings of the client's request publisher. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the client, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * The returned struct is only valid as long as the rcl_client_t is valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] client pointer to the rcl client + * \return qos struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rmw_qos_profile_t * +rcl_client_request_publisher_get_actual_qos(const rcl_client_t * client); + +/// Get the actual qos settings of the client's response subscription. +/** + * Used to get the actual qos settings of the client's response subscription. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the client, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * The returned struct is only valid as long as the rcl_client_t is valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] client pointer to the rcl client + * \return qos struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rmw_qos_profile_t * +rcl_client_response_subscription_get_actual_qos(const rcl_client_t * client); + +/// Set the on new response callback function for the client. +/** + * This API sets the callback function to be called whenever the + * client is notified about a new response. + * + * \sa rmw_client_set_on_new_response_callback for details about this function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined + * + * \param[in] client The client on which to set the callback + * \param[in] callback The callback to be called when new responses arrive, may be NULL + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RCL_RET_OK` if callback was set to the listener, or + * \return `RCL_RET_INVALID_ARGUMENT` if `client` is NULL, or + * \return `RCL_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_client_set_on_new_response_callback( + const rcl_client_t * client, + rcl_event_callback_t callback, + const void * user_data); + #ifdef __cplusplus } #endif diff --git a/ThirdParty/ros/include/rcl/context.h b/ThirdParty/ros/include/rcl/rcl/context.h similarity index 76% rename from ThirdParty/ros/include/rcl/context.h rename to ThirdParty/ros/include/rcl/rcl/context.h index 89995a9f9..68500da81 100644 --- a/ThirdParty/ros/include/rcl/context.h +++ b/ThirdParty/ros/include/rcl/rcl/context.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__CONTEXT_H_ #define RCL__CONTEXT_H_ @@ -29,16 +31,19 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" +/// @cond Doxygen_Suppress #ifdef _MSC_VER #define RCL_ALIGNAS(N) __declspec(align(N)) #else #include #define RCL_ALIGNAS(N) alignas(N) #endif +/// @endcond +/// A unique ID per context instance. typedef uint64_t rcl_context_instance_id_t; -struct rcl_context_impl_t; +typedef struct rcl_context_impl_s rcl_context_impl_t; /// Encapsulates the non-global state of an init/shutdown cycle. /** @@ -73,57 +78,59 @@ struct rcl_context_impl_t; * +---------------------------------------------------------------------------------+ * ``` * - * A declared but not defined `rcl_context_t` instance is considered to be + * A declared but not defined rcl_context_t instance is considered to be * "uninitialized", and passing an uninitialized context to any functions will * result in undefined behavior. - * Some functions, like `rcl_init()` require the context instance to be + * Some functions, like rcl_init() require the context instance to be * zero initialized (all members set to "zero" state) before use. * - * Zero initialization of an `rcl_context_t` should be done with - * `rcl_get_zero_initialized_context()`, which ensures the context is in a safe - * state for initialization with `rcl_init()`. + * Zero initialization of an rcl_context_t should be done with + * rcl_get_zero_initialized_context(), which ensures the context is in a safe + * state for initialization with rcl_init(). * - * Initialization of an `rcl_context_t` should be done with `rcl_init()`, after + * Initialization of an rcl_context_t should be done with rcl_init(), after * which the context is considered both initialized and valid. * After initialization it can be used in the creation of other entities like * nodes and guard conditions. * - * At any time the context can be invalidated by calling `rcl_shutdown()` on - * the `rcl_context_t`, after which the context is still initialized but now + * At any time the context can be invalidated by calling rcl_shutdown() on + * the rcl_context_t, after which the context is still initialized but now * invalid. * * Invalidation indicates to other entities that the context was shutdown, but * is still accessible for use during cleanup of themselves. * * After being invalidated, and after all of the entities which used it have - * been finalized, the context should be finalized with `rcl_context_fini()`. + * been finalized, the context should be finalized with rcl_context_fini(). * * Finalizing the context while entities which have copies of it have not yet * been finalized is undefined behavior. - * Therefore, the context's lifetime (between calls to `rcl_init()` and - * `rcl_context_fini()`) should exceed the lifetime of all entities which use + * Therefore, the context's lifetime (between calls to rcl_init() and + * rcl_context_fini()) should exceed the lifetime of all entities which use * it directly (e.g. nodes and guard conditions) or indirectly (e.g. * subscriptions and topics). */ -typedef struct rcl_context_t +typedef struct rcl_context_s { /// Global arguments for all nodes which share this context. - /** Typically generated by the parsing of argc/argv in `rcl_init()`. */ + /** Typically generated by the parsing of argc/argv in rcl_init(). */ rcl_arguments_t global_arguments; /// Implementation specific pointer. - struct rcl_context_impl_t * impl; + rcl_context_impl_t * impl; // The assumption that this is big enough for an atomic_uint_least64_t is // ensured with a static_assert in the context.c file. // In most cases it should just be a plain uint64_t. +/// @cond Doxygen_Suppress #if !defined(RCL_CONTEXT_ATOMIC_INSTANCE_ID_STORAGE_SIZE) #define RCL_CONTEXT_ATOMIC_INSTANCE_ID_STORAGE_SIZE sizeof(uint_least64_t) #endif +/// @endcond /// Private storage for instance ID atomic. /** * Accessing the instance id should be done using the function - * `rcl_context_get_instance_id()` because the instance id's type is an + * rcl_context_get_instance_id() because the instance id's type is an * atomic and needs to be accessed properly to ensure safety. * * The instance id should not be changed manually - doing so is undefined @@ -148,17 +155,15 @@ RCL_WARN_UNUSED rcl_context_t rcl_get_zero_initialized_context(void); -// See `rcl_init()` for initialization of the context. - /// Finalize a context. /** * The context to be finalized must have been previously initialized with - * `rcl_init()`, and then later invalidated with `rcl_shutdown()`. + * rcl_init(), and then later invalidated with rcl_shutdown(). * A zero-initialized context that has not been initialized can be finalized. - * If context is `NULL`, then `RCL_RET_INVALID_ARGUMENT` is returned. - * If context is zero-initialized, then `RCL_RET_OK` is returned. - * If context is initialized and valid (`rcl_shutdown()` was not called on it), - * then `RCL_RET_INVALID_ARGUMENT` is returned. + * If context is `NULL`, then #RCL_RET_INVALID_ARGUMENT is returned. + * If context is zero-initialized, then #RCL_RET_OK is returned. + * If context is initialized and valid (rcl_shutdown() was not called on it), + * then #RCL_RET_INVALID_ARGUMENT is returned. * *
* Attribute | Adherence @@ -170,17 +175,15 @@ rcl_get_zero_initialized_context(void); * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` * * \param[inout] context object to be finalized. - * \return `RCL_RET_OK` if the shutdown was completed successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occur. + * \return #RCL_RET_OK if the shutdown was completed successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_context_fini(rcl_context_t * context); -// See `rcl_shutdown()` for invalidation of the context. - /// Return the init options used during initialization for this context. /** * This function can fail and return `NULL` if: @@ -211,7 +214,7 @@ rcl_context_fini(rcl_context_t * context); RCL_PUBLIC RCL_WARN_UNUSED const rcl_init_options_t * -rcl_context_get_init_options(rcl_context_t * context); +rcl_context_get_init_options(const rcl_context_t * context); /// Returns an unsigned integer that is unique to the given context, or `0` if invalid. /** @@ -220,7 +223,7 @@ rcl_context_get_init_options(rcl_context_t * context); * If context is uninitialized, then it is undefined behavior. * * The instance ID may be `0` if the context is zero-initialized or if the - * context has been invalidated by `rcl_shutdown()`. + * context has been invalidated by rcl_shutdown(). * *
* Attribute | Adherence @@ -239,7 +242,33 @@ rcl_context_get_init_options(rcl_context_t * context); RCL_PUBLIC RCL_WARN_UNUSED rcl_context_instance_id_t -rcl_context_get_instance_id(rcl_context_t * context); +rcl_context_get_instance_id(const rcl_context_t * context); + +/// Returns the context domain id. +/** + * \pre If context is uninitialized, then it is undefined behavior. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | No + * + * [1] Calling the function asynchronously with rcl_init() or rcl_shutdown() can result + * in the function sometimes succeeding and sometimes returning #RCL_RET_INVALID_ARGUMENT. + * + * \param[in] context from which the domain id should be retrieved. + * \param[out] domain_id output variable where the domain id will be returned. + * \return #RCL_RET_INVALID_ARGUMENT if `context` is invalid (see rcl_context_is_valid()), or + * \return #RCL_RET_INVALID_ARGUMENT if `domain_id` is `NULL`, or + * \return #RCL_RET_OK if the domain id was correctly retrieved. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_context_get_domain_id(rcl_context_t * context, size_t * domain_id); /// Return `true` if the given context is currently valid, otherwise `false`. /** @@ -261,7 +290,7 @@ rcl_context_get_instance_id(rcl_context_t * context); RCL_PUBLIC RCL_WARN_UNUSED bool -rcl_context_is_valid(rcl_context_t * context); +rcl_context_is_valid(const rcl_context_t * context); /// Return pointer to the rmw context if the given context is currently valid, otherwise `NULL`. /** diff --git a/ThirdParty/ros/include/rcl/domain_id.h b/ThirdParty/ros/include/rcl/rcl/domain_id.h similarity index 84% rename from ThirdParty/ros/include/rcl/domain_id.h rename to ThirdParty/ros/include/rcl/rcl/domain_id.h index 5cb696aec..946c6830d 100644 --- a/ThirdParty/ros/include/rcl/domain_id.h +++ b/ThirdParty/ros/include/rcl/rcl/domain_id.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__DOMAIN_ID_H_ #define RCL__DOMAIN_ID_H_ @@ -26,6 +28,7 @@ extern "C" #include "rcl/visibility_control.h" #include "rmw/domain_id.h" +/// The default domain ID used by RCL. #define RCL_DEFAULT_DOMAIN_ID RMW_DEFAULT_DOMAIN_ID extern const char * const RCL_DOMAIN_ID_ENV_VAR; @@ -33,9 +36,9 @@ extern const char * const RCL_DOMAIN_ID_ENV_VAR; /// Determine the default domain ID, based on the environment. /** * \param[out] domain_id Must not be NULL. - * \returns RCL_RET_INVALID_ARGUMENT if an argument is invalid, or, - * \returns RCL_RET_ERROR in case of an unexpected error, or, - * \returns RCL_RET_OK. + * \returns #RCL_RET_INVALID_ARGUMENT if an argument is invalid, or, + * \returns #RCL_RET_ERROR in case of an unexpected error, or, + * \returns #RCL_RET_OK. */ RCL_PUBLIC rcl_ret_t diff --git a/ThirdParty/ros/include/rcl/error_handling.h b/ThirdParty/ros/include/rcl/rcl/error_handling.h similarity index 100% rename from ThirdParty/ros/include/rcl/error_handling.h rename to ThirdParty/ros/include/rcl/rcl/error_handling.h diff --git a/ThirdParty/ros/include/rcl/rcl/event.h b/ThirdParty/ros/include/rcl/rcl/event.h new file mode 100644 index 000000000..fea87d782 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/event.h @@ -0,0 +1,237 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__EVENT_H_ +#define RCL__EVENT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcl/client.h" +#include "rcl/event_callback.h" +#include "rcl/macros.h" +#include "rcl/publisher.h" +#include "rcl/service.h" +#include "rcl/subscription.h" +#include "rcl/visibility_control.h" + +/// Enumeration of all of the publisher events that may fire. +typedef enum rcl_publisher_event_type_e +{ + RCL_PUBLISHER_OFFERED_DEADLINE_MISSED, + RCL_PUBLISHER_LIVELINESS_LOST, + RCL_PUBLISHER_OFFERED_INCOMPATIBLE_QOS, +} rcl_publisher_event_type_t; + +/// Enumeration of all of the subscription events that may fire. +typedef enum rcl_subscription_event_type_e +{ + RCL_SUBSCRIPTION_REQUESTED_DEADLINE_MISSED, + RCL_SUBSCRIPTION_LIVELINESS_CHANGED, + RCL_SUBSCRIPTION_REQUESTED_INCOMPATIBLE_QOS, + RCL_SUBSCRIPTION_MESSAGE_LOST, +} rcl_subscription_event_type_t; + +/// Internal rcl implementation struct. +typedef struct rcl_event_impl_s rcl_event_impl_t; + +/// Structure which encapsulates a ROS QoS event handle. +typedef struct rcl_event_s +{ + /// Pointer to the event implementation + rcl_event_impl_t * impl; +} rcl_event_t; + +/// Return a rcl_event_t struct with members set to `NULL`. +/** + * Should be called to get a null rcl_event_t before passing to + * rcl_event_init(). + * + * \return Zero initialized rcl_event_t. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_event_t +rcl_get_zero_initialized_event(void); + +/// Initialize an rcl_event_t with a publisher. +/** + * Fill the rcl_event_t with the publisher and desired event_type. + * + * \param[in,out] event pointer to fill + * \param[in] publisher to get events from + * \param[in] event_type to listen for + * \return #RCL_RET_OK if the rcl_event_t is filled, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory fails, or + * \return #RCL_RET_UNSUPPORTED if event_type is not supported, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_publisher_event_init( + rcl_event_t * event, + const rcl_publisher_t * publisher, + const rcl_publisher_event_type_t event_type); + +/// Initialize an rcl_event_t with a subscription. +/** + * Fill the rcl_event_t with the subscription and desired event_type. + * + * \param[in,out] event pointer to fill + * \param[in] subscription to get events from + * \param[in] event_type to listen for + * \return #RCL_RET_OK if the rcl_event_t is filled, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory fails, or + * \return #RCL_RET_UNSUPPORTED if event_type is not supported, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_event_init( + rcl_event_t * event, + const rcl_subscription_t * subscription, + const rcl_subscription_event_type_t event_type); + +// Take event using the event handle. +/** + * Take an event from the event handle. + * + * \param[in] event event object to take from + * \param[in, out] event_info event info object to write taken data into + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCL_RET_EVENT_TAKE_FAILED if the take event failed, or + * \return #RCL_RET_ERROR if an unexpected error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_event( + const rcl_event_t * event, + void * event_info); + +// Finalize an event. +/** + * Finalize an event. + * + * \param[in] event to finalize + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_EVENT_INVALID if event is null, or + * \return #RCL_RET_ERROR if an unexpected error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_event_fini(rcl_event_t * event); + +/// Return the rmw event handle. +/** + * The handle returned is a pointer to the internally held rmw handle. + * This function can fail, and therefore return `NULL`, if the: + * - event is `NULL` + * - event is invalid (never called init, called fini, or invalid node) + * + * The returned handle is made invalid if the event is finalized or if + * rcl_shutdown() is called. + * The returned handle is not guaranteed to be valid for the life time of the + * event as it may be finalized and recreated itself. + * Therefore it is recommended to get the handle from the event using + * this function each time it is needed and avoid use of the handle + * concurrently with functions that might change it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] event pointer to the rcl event + * \return rmw event handle if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rmw_event_t * +rcl_event_get_rmw_handle(const rcl_event_t * event); + +/// Check that the event is valid. +/** + * The bool returned is `false` if `event` is invalid. + * The bool returned is `true` otherwise. + * In the case where `false` is to be returned, an error message is set. + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] event pointer to the rcl event + * \return `true` if `event` is valid, otherwise `false` + */ +RCL_PUBLIC +bool +rcl_event_is_valid(const rcl_event_t * event); + +/// Set the callback function for the event. +/** + * This API sets the callback function to be called whenever the + * event is notified about a new instance of the event. + * + * \sa rmw_event_set_callback for more details about this function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined + * + * \param[in] event The event on which to set the callback + * \param[in] callback The callback to be called when new events occur, may be NULL + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RCL_RET_OK` if callback was set to the listener, or + * \return `RCL_RET_INVALID_ARGUMENT` if `event` is NULL, or + * \return `RCL_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_event_set_callback( + const rcl_event_t * event, + rcl_event_callback_t callback, + const void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__EVENT_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/event_callback.h b/ThirdParty/ros/include/rcl/rcl/event_callback.h new file mode 100644 index 000000000..9124907ab --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/event_callback.h @@ -0,0 +1,31 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL__EVENT_CALLBACK_H_ +#define RCL__EVENT_CALLBACK_H_ + +#include "rmw/event_callback_type.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef rmw_event_callback_t rcl_event_callback_t; + +#ifdef __cplusplus +} +#endif + +#endif // RCL__EVENT_CALLBACK_H_ diff --git a/ThirdParty/ros/include/rcl/expand_topic_name.h b/ThirdParty/ros/include/rcl/rcl/expand_topic_name.h similarity index 84% rename from ThirdParty/ros/include/rcl/expand_topic_name.h rename to ThirdParty/ros/include/rcl/rcl/expand_topic_name.h index bfcc288de..058e57e23 100644 --- a/ThirdParty/ros/include/rcl/expand_topic_name.h +++ b/ThirdParty/ros/include/rcl/rcl/expand_topic_name.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__EXPAND_TOPIC_NAME_H_ #define RCL__EXPAND_TOPIC_NAME_H_ @@ -29,7 +31,7 @@ extern "C" /// Expand a given topic name into a fully-qualified topic name. /** * The input_topic_name, node_name, and node_namespace arguments must all be - * vaid, null terminated c strings. + * valid, null terminated c strings. * The output_topic_name will not be assigned a value in the event of an error. * * The output_topic_name will be null terminated. @@ -102,14 +104,14 @@ extern "C" * \param[in] substitutions string map with possible substitutions * \param[in] allocator the allocator to be used when creating the output topic * \param[out] output_topic_name output char * pointer - * \return `RCL_RET_OK` if the topic name was expanded successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_TOPIC_NAME_INVALID` if the given topic name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAME` if the name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the namespace_ is invalid, or - * \return `RCL_RET_UNKNOWN_SUBSTITUTION` for unknown substitutions in name, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the topic name was expanded successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_TOPIC_NAME_INVALID if the given topic name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the namespace_ is invalid, or + * \return #RCL_RET_UNKNOWN_SUBSTITUTION for unknown substitutions in name, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -127,10 +129,10 @@ rcl_expand_topic_name( * If the string map is not initialized RCL_RET_INVALID_ARGUMENT is returned. * * \param[inout] string_map rcutils_string_map_t map to be filled with pairs - * \return `RCL_RET_OK` if successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl/graph.h b/ThirdParty/ros/include/rcl/rcl/graph.h new file mode 100644 index 000000000..1c17762b8 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/graph.h @@ -0,0 +1,846 @@ +// Copyright 2016-2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__GRAPH_H_ +#define RCL__GRAPH_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + +#include "rcutils/time.h" +#include "rcutils/types.h" + +#include "rosidl_runtime_c/service_type_support_struct.h" + +#include "rcl/macros.h" +#include "rcl/client.h" +#include "rcl/node.h" +#include "rcl/visibility_control.h" + +/// A structure that contains topic names and types. +typedef rmw_names_and_types_t rcl_names_and_types_t; + +/// A structure that encapsulates the node name, node namespace, +/// topic type, gid, and qos_profile or publishers and subscriptions +/// for a topic. +typedef rmw_topic_endpoint_info_t rcl_topic_endpoint_info_t; + +/// An array of topic endpoint information. +typedef rmw_topic_endpoint_info_array_t rcl_topic_endpoint_info_array_t; + +/// Return a zero-initialized rcl_names_and_types_t structure. +#define rcl_get_zero_initialized_names_and_types rmw_get_zero_initialized_names_and_types + +/// Return a zero-initialized rcl_topic_endpoint_info_t structure. +#define rcl_get_zero_initialized_topic_endpoint_info_array \ + rmw_get_zero_initialized_topic_endpoint_info_array + +/// Finalize a topic_endpoint_info_array_t structure. +#define rcl_topic_endpoint_info_array_fini rmw_topic_endpoint_info_array_fini + +/// Return a list of topic names and types for publishers associated with a node. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * There may be some demangling that occurs when listing the names from the middleware + * implementation. + * If the `no_demangle` argument is set to `true`, then this will be avoided and the names will be + * returned as they appear to the middleware. + * + * \see rmw_get_topic_names_and_types for more details on no_demangle + * + * The returned names are not automatically remapped by this function. + * Attempting to create publishers or subscribers using names returned by this function may not + * result in the desired topic name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[in] no_demangle if true, list all topics without any demangling + * \param[in] node_name the node name of the topics to return + * \param[in] node_namespace the node namespace of the topics to return + * \param[out] topic_names_and_types list of topic names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the node name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the node namespace is invalid, or + * \return #RCL_RET_NODE_NAME_NON_EXISTENT if the node name wasn't found, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_publisher_names_and_types_by_node( + const rcl_node_t * node, + rcl_allocator_t * allocator, + bool no_demangle, + const char * node_name, + const char * node_namespace, + rcl_names_and_types_t * topic_names_and_types); + +/// Return a list of topic names and types for subscriptions associated with a node. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. + * + * The returned names are not automatically remapped by this function. + * Attempting to create publishers or subscribers using names returned by this function may not + * result in the desired topic name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[in] no_demangle if true, list all topics without any demangling + * \param[in] node_name the node name of the topics to return + * \param[in] node_namespace the node namespace of the topics to return + * \param[out] topic_names_and_types list of topic names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the node name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the node namespace is invalid, or + * \return #RCL_RET_NODE_NAME_NON_EXISTENT if the node name wasn't found, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_subscriber_names_and_types_by_node( + const rcl_node_t * node, + rcl_allocator_t * allocator, + bool no_demangle, + const char * node_name, + const char * node_namespace, + rcl_names_and_types_t * topic_names_and_types); + +/// Return a list of service names and types associated with a node. +/** + * The `node` parameter must point to a valid node. + * + * The `service_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. + * + * The returned names are not automatically remapped by this function. + * Attempting to create service clients using names returned by this function may not + * result in the desired service name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[in] node_name the node name of the services to return + * \param[in] node_namespace the node namespace of the services to return + * \param[out] service_names_and_types list of service names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the node name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the node namespace is invalid, or + * \return #RCL_RET_NODE_NAME_NON_EXISTENT if the node name wasn't found, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_service_names_and_types_by_node( + const rcl_node_t * node, + rcl_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + rcl_names_and_types_t * service_names_and_types); + +/// Return a list of service client names and types associated with a node. +/** + * The `node` parameter must point to a valid node. + * + * The `service_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. + * + * The returned names are not automatically remapped by this function. + * Attempting to create service servers using names returned by this function may not + * result in the desired service name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[in] node_name the node name of the services to return + * \param[in] node_namespace the node namespace of the services to return + * \param[out] service_names_and_types list of service client names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the node name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the node namespace is invalid, or + * \return #RCL_RET_NODE_NAME_NON_EXISTENT if the node name wasn't found, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_client_names_and_types_by_node( + const rcl_node_t * node, + rcl_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + rcl_names_and_types_t * service_names_and_types); + +/// Return a list of topic names and their types. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `topic_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * \see rcl_get_publisher_names_and_types_by_node for details on the `no_demangle` parameter. + * + * The returned names are not automatically remapped by this function. + * Attempting to create publishers or subscribers using names returned by this function may not + * result in the desired topic name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[in] no_demangle if true, list all topics without any demangling + * \param[out] topic_names_and_types list of topic names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if the node name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the node namespace is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_topic_names_and_types( + const rcl_node_t * node, + rcl_allocator_t * allocator, + bool no_demangle, + rcl_names_and_types_t * topic_names_and_types); + +/// Return a list of service names and their types. +/** + * The `node` parameter must point to a valid node. + * + * The `service_names_and_types` parameter must be allocated and zero initialized. + * This function allocates memory for the returned list of names and types and so it is the + * callers responsibility to pass `service_names_and_types` to rcl_names_and_types_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * The returned names are not automatically remapped by this function. + * Attempting to create clients or services using names returned by this function may not result in + * the desired service name being used depending on the remap rules in use. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for strings + * \param[out] service_names_and_types list of service names and their types + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_service_names_and_types( + const rcl_node_t * node, + rcl_allocator_t * allocator, + rcl_names_and_types_t * service_names_and_types); + +/// Initialize a rcl_names_and_types_t object. +/** + * This function initializes the string array for the names and allocates space + * for all the string arrays for the types according to the given size, but + * it does not initialize the string array for each set of types. + * However, the string arrays for each set of types is zero initialized. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] names_and_types object to be initialized + * \param[in] size the number of names and sets of types to be stored + * \param[in] allocator to be used to allocate and deallocate memory + * \return #RCL_RET_OK on success, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCL_RET_ERROR when an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_names_and_types_init( + rcl_names_and_types_t * names_and_types, + size_t size, + rcl_allocator_t * allocator); + +/// Finalize a rcl_names_and_types_t object. +/** + * The object is populated when given to one of the rcl_get_*_names_and_types() + * functions. + * This function reclaims any resources allocated during population. + * + * The `names_and_types` parameter must not be `NULL`, and must point to an + * already allocated rcl_names_and_types_t struct that was previously + * passed to a successful rcl_get_*_names_and_types() function call. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] names_and_types struct to be finalized + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_names_and_types_fini(rcl_names_and_types_t * names_and_types); + +/// Return a list of available nodes in the ROS graph. +/** + * The `node` parameter must point to a valid node. + * + * The `node_names` parameter must be allocated and zero initialized. + * `node_names` is the output for this function, and contains allocated memory. + * Use rcutils_get_zero_initialized_string_array() for initializing an empty + * rcutils_string_array_t struct. + * This `node_names` struct should therefore be passed to rcutils_string_array_fini() + * when it is no longer needed. + * Failing to do so will result in leaked memory. + * + * Example: + * + * ```c + * rcutils_string_array_t node_names = + * rcutils_get_zero_initialized_string_array(); + * rcl_ret_t ret = rcl_get_node_names(node, &node_names); + * if (ret != RCL_RET_OK) { + * // ... error handling + * } + * // ... use the node_names struct, and when done: + * rcutils_ret_t rcutils_ret = rcutils_string_array_fini(&node_names); + * if (rcutils_ret != RCUTILS_RET_OK) { + * // ... error handling + * } + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator used to control allocation and deallocation of names + * \param[out] node_names struct storing discovered node names + * \param[out] node_namespaces struct storing discovered node namespaces + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_BAD_ALLOC if an error occurred while allocating memory, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_NODE_INVALID_NAME if a node with an invalid name is detected, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if a node with an invalid namespace is detected, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_node_names( + const rcl_node_t * node, + rcl_allocator_t allocator, + rcutils_string_array_t * node_names, + rcutils_string_array_t * node_namespaces); + +/// Return a list of available nodes in the ROS graph, including their enclave names. +/** + * An rcl_get_node_names() equivalent, but including in its output the enclave + * name the node is using. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] RMW implementation in use may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator used to control allocation and deallocation of names + * \param[out] node_names struct storing discovered node names + * \param[out] node_namespaces struct storing discovered node namespaces + * \param[out] enclaves struct storing discovered node enclaves + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_BAD_ALLOC if an error occurred while allocating memory, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_node_names_with_enclaves( + const rcl_node_t * node, + rcl_allocator_t allocator, + rcutils_string_array_t * node_names, + rcutils_string_array_t * node_namespaces, + rcutils_string_array_t * enclaves); + +/// Return the number of publishers on a given topic. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_name` parameter must not be `NULL`, and must not be an empty string. + * It should also follow the topic name rules. + * \todo TODO(wjwwood): link to the topic name rules. + * + * The `count` parameter must point to a valid bool. + * The `count` parameter is the output for this function and will be set. + * + * In the event that error handling needs to allocate memory, this function + * will try to use the node's allocator. + * + * The topic name is not automatically remapped by this function. + * If there is a publisher created with topic name `foo` and remap rule `foo:=bar` then calling + * this with `topic_name` set to `bar` will return a count of 1, and with `topic_name` set to `foo` + * will return a count of 0. + * /sa rcl_remap_topic_name() + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] topic_name the name of the topic in question + * \param[out] count number of publishers on the given topic + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_count_publishers( + const rcl_node_t * node, + const char * topic_name, + size_t * count); + +/// Return the number of subscriptions on a given topic. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_name` parameter must not be `NULL`, and must not be an empty string. + * It should also follow the topic name rules. + * \todo TODO(wjwwood): link to the topic name rules. + * + * The `count` parameter must point to a valid bool. + * The `count` parameter is the output for this function and will be set. + * + * In the event that error handling needs to allocate memory, this function + * will try to use the node's allocator. + * + * The topic name is not automatically remapped by this function. + * If there is a subscriber created with topic name `foo` and remap rule `foo:=bar` then calling + * this with `topic_name` set to `bar` will return a count of 1, and with `topic_name` set to `foo` + * will return a count of 0. + * /sa rcl_remap_topic_name() + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] topic_name the name of the topic in question + * \param[out] count number of subscriptions on the given topic + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_count_subscribers( + const rcl_node_t * node, + const char * topic_name, + size_t * count); + +/// Wait for there to be a specified number of publishers on a given topic. +/** + * The `node` parameter must point to a valid node. + * The nodes graph guard condition is used by this function, and therefore the caller should + * take care not to use the guard condition concurrently in any other wait sets. + * + * The `allocator` parameter must point to a valid allocator. + * + * The `topic_name` parameter must not be `NULL`, and must not be an empty string. + * It should also follow the topic name rules. + * + * This function blocks and will return when the number of publishers for `topic_name` + * is greater than or equal to the `count` parameter, or the specified `timeout` is reached. + * + * The `timeout` parameter is in nanoseconds. + * The timeout is based on system time elapsed. + * A negative value disables the timeout (i.e. this function blocks until the number of + * publishers is greater than or equals to `count`). + * + * The `success` parameter must point to a valid bool. + * The `success` parameter is the output for this function and will be set. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator to allocate space for the rcl_wait_set_t used to wait for graph events + * \param[in] topic_name the name of the topic in question + * \param[in] count number of publishers to wait for + * \param[in] timeout maximum duration to wait for publishers + * \param[out] success `true` if the number of publishers is equal to or greater than count, or + * `false` if a timeout occurred waiting for publishers. + * \return #RCL_RET_OK if there was no errors, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMEOUT if a timeout occurs before the number of publishers is detected, or + * \return #RCL_RET_ERROR if an unspecified error occurred. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_wait_for_publishers( + const rcl_node_t * node, + rcl_allocator_t * allocator, + const char * topic_name, + const size_t count, + rcutils_duration_value_t timeout, + bool * success); + +/// Wait for there to be a specified number of subscribers on a given topic. +/** + * \see rcl_wait_for_publishers + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator to allocate space for the rcl_wait_set_t used to wait for graph events + * \param[in] topic_name the name of the topic in question + * \param[in] count number of subscribers to wait for + * \param[in] timeout maximum duration to wait for subscribers + * \param[out] success `true` if the number of subscribers is equal to or greater than count, or + * `false` if a timeout occurred waiting for subscribers. + * \return #RCL_RET_OK if there was no errors, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMEOUT if a timeout occurs before the number of subscribers is detected, or + * \return #RCL_RET_ERROR if an unspecified error occurred. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_wait_for_subscribers( + const rcl_node_t * node, + rcl_allocator_t * allocator, + const char * topic_name, + const size_t count, + rcutils_duration_value_t timeout, + bool * success); + +/// Return a list of all publishers to a topic. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_name` parameter must not be `NULL`. + * + * When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic name + * for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps). + * When the `no_mangle` parameter is `false`, the provided `topic_name` should follow + * ROS topic name conventions. + * In either case, the topic name should always be fully qualified. + * + * Each element in the `publishers_info` array will contain the node name, node namespace, + * topic type, gid and the qos profile of the publisher. + * It is the responsibility of the caller to ensure that `publishers_info` parameter points + * to a valid struct of type rcl_topic_endpoint_info_array_t. + * The `count` field inside the struct must be set to 0 and the `info_array` field inside + * the struct must be set to null. + * \see rmw_get_zero_initialized_topic_endpoint_info_array + * + * The `allocator` will be used to allocate memory to the `info_array` member + * inside of `publishers_info`. + * Moreover, every const char * member inside of + * rmw_topic_endpoint_info_t will be assigned a copied value on allocated memory. + * \see rmw_topic_endpoint_info_set_node_name and the likes. + * However, it is the responsibility of the caller to + * reclaim any allocated resources to `publishers_info` to avoid leaking memory. + * \see rmw_topic_endpoint_info_array_fini + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for + * the array inside publishers_info + * \param[in] topic_name the name of the topic in question + * \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name, + * otherwise it should be a valid ROS topic name + * \param[out] publishers_info a struct representing a list of publisher information + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_publishers_info_by_topic( + const rcl_node_t * node, + rcutils_allocator_t * allocator, + const char * topic_name, + bool no_mangle, + rcl_topic_endpoint_info_array_t * publishers_info); + +/// Return a list of all subscriptions to a topic. +/** + * The `node` parameter must point to a valid node. + * + * The `topic_name` parameter must not be `NULL`. + * + * When the `no_mangle` parameter is `true`, the provided `topic_name` should be a valid topic name + * for the middleware (useful when combining ROS with native middleware (e.g. DDS) apps). + * When the `no_mangle` parameter is `false`, the provided `topic_name` should follow + * ROS topic name conventions. + * In either case, the topic name should always be fully qualified. + * + * Each element in the `subscriptions_info` array will contain the node name, node namespace, + * topic type, gid and the qos profile of the subscription. + * It is the responsibility of the caller to ensure that `subscriptions_info` parameter points + * to a valid struct of type rcl_topic_endpoint_info_array_t. + * The `count` field inside the struct must be set to 0 and the `info_array` field inside + * the struct must be set to null. + * \see rmw_get_zero_initialized_topic_endpoint_info_array + * + * The `allocator` will be used to allocate memory to the `info_array` member + * inside of `subscriptions_info`. + * Moreover, every const char * member inside of + * rmw_topic_endpoint_info_t will be assigned a copied value on allocated memory. + * \see rmw_topic_endpoint_info_set_node_name and the likes. + * However, it is the responsibility of the caller to + * reclaim any allocated resources to `subscriptions_info` to avoid leaking memory. + * \see rmw_topic_endpoint_info_array_fini + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] allocator allocator to be used when allocating space for + * the array inside publishers_info + * \param[in] topic_name the name of the topic in question + * \param[in] no_mangle if `true`, `topic_name` needs to be a valid middleware topic name, + * otherwise it should be a valid ROS topic name + * \param[out] subscriptions_info a struct representing a list of subscriptions information + * \return #RCL_RET_OK if the query was successful, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_get_subscriptions_info_by_topic( + const rcl_node_t * node, + rcutils_allocator_t * allocator, + const char * topic_name, + bool no_mangle, + rcl_topic_endpoint_info_array_t * subscriptions_info); + +/// Check if a service server is available for the given service client. +/** + * This function will return true for `is_available` if there is a service server + * available for the given client. + * + * The `node` parameter must point to a valid node. + * + * The `client` parameter must point to a valid client. + * + * The given client and node must match, i.e. the client must have been created + * using the given node. + * + * The `is_available` parameter must not be `NULL`, and must point a bool variable. + * The result of the check will be stored in the `is_available` parameter. + * + * In the event that error handling needs to allocate memory, this function + * will try to use the node's allocator. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] client the handle to the service client being queried + * \param[out] is_available set to true if there is a service server available, else false + * \return #RCL_RET_OK if the check was made successfully (regardless of the service readiness), or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_service_server_is_available( + const rcl_node_t * node, + const rcl_client_t * client, + bool * is_available); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__GRAPH_H_ diff --git a/ThirdParty/ros/include/rcl/guard_condition.h b/ThirdParty/ros/include/rcl/rcl/guard_condition.h similarity index 84% rename from ThirdParty/ros/include/rcl/guard_condition.h rename to ThirdParty/ros/include/rcl/rcl/guard_condition.h index 9f40ccd6c..368a9a6b4 100644 --- a/ThirdParty/ros/include/rcl/guard_condition.h +++ b/ThirdParty/ros/include/rcl/rcl/guard_condition.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__GUARD_CONDITION_H_ #define RCL__GUARD_CONDITION_H_ @@ -27,20 +29,20 @@ extern "C" #include "rcl/visibility_control.h" /// Internal rcl guard condition implementation struct. -struct rcl_guard_condition_impl_t; +typedef struct rcl_guard_condition_impl_s rcl_guard_condition_impl_t; /// Handle for a rcl guard condition. -typedef struct rcl_guard_condition_t +typedef struct rcl_guard_condition_s { /// Context associated with this guard condition. rcl_context_t * context; /// Pointer to the guard condition implementation - struct rcl_guard_condition_impl_t * impl; + rcl_guard_condition_impl_t * impl; } rcl_guard_condition_t; /// Options available for a rcl guard condition. -typedef struct rcl_guard_condition_options_t +typedef struct rcl_guard_condition_options_s { /// Custom allocator for the guard condition, used for internal allocations. rcl_allocator_t allocator; @@ -84,12 +86,12 @@ rcl_get_zero_initialized_guard_condition(void); * \param[in] context the context instance with which the guard condition * should be associated * \param[in] options the guard_condition's options - * \return `RCL_RET_OK` if guard_condition was initialized successfully, or - * \return `RCL_RET_ALREADY_INIT` if the guard condition is already initialized, or - * \return `RCL_RET_NOT_INIT` if the given context is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if guard_condition was initialized successfully, or + * \return #RCL_RET_ALREADY_INIT if the guard condition is already initialized, or + * \return #RCL_RET_NOT_INIT if the given context is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -127,11 +129,11 @@ rcl_guard_condition_init( * was initialized with, i.e. the rmw context inside rcl context needs to * match rmw context in rmw guard condition * \param[in] options the guard_condition's options - * \return `RCL_RET_OK` if guard_condition was initialized successfully, or - * \return `RCL_RET_ALREADY_INIT` if the guard condition is already initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if guard_condition was initialized successfully, or + * \return #RCL_RET_ALREADY_INIT if the guard condition is already initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ rcl_ret_t rcl_guard_condition_init_from_rmw( @@ -155,9 +157,9 @@ rcl_guard_condition_init_from_rmw( * [1] specifically not thread-safe with rcl_trigger_guard_condition() * * \param[inout] guard_condition handle to the guard_condition to be finalized - * \return `RCL_RET_OK` if guard_condition was finalized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if guard_condition was finalized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -169,6 +171,8 @@ rcl_guard_condition_fini(rcl_guard_condition_t * guard_condition); * The defaults are: * * - allocator = rcl_get_default_allocator() + * + * \return the default options in an rcl_guard_condition_options_t struct. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -193,9 +197,9 @@ rcl_guard_condition_get_default_options(void); * [1] it can be called concurrently with itself, even on the same guard condition * * \param[in] guard_condition handle to the guard_condition to be triggered - * \return `RCL_RET_OK` if the guard condition was triggered, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the guard condition was triggered, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl/init.h b/ThirdParty/ros/include/rcl/rcl/init.h new file mode 100644 index 000000000..a85aae609 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/init.h @@ -0,0 +1,121 @@ +// Copyright 2014 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__INIT_H_ +#define RCL__INIT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl/allocator.h" +#include "rcl/context.h" +#include "rcl/init_options.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +/// Initialization of rcl. +/** + * This function can be run any number of times, so long as the given context + * has been properly prepared. + * + * The given rcl_context_t must be zero initialized with the function + * rcl_get_zero_initialized_context() and must not be already initialized + * by this function. + * If the context is already initialized this function will fail and return the + * #RCL_RET_ALREADY_INIT error code. + * A context may be initialized again after it has been finalized with the + * rcl_shutdown() function and zero initialized again with + * rcl_get_zero_initialized_context(). + * + * The `argc` and `argv` parameters may contain command line arguments for the + * program. + * rcl specific arguments will be parsed, but not removed. + * If `argc` is `0` and `argv` is `NULL` no parameters will be parsed. + * + * The `options` argument must be non-`NULL` and must have been initialized + * with rcl_init_options_init(). + * It is unmodified by this function, and the ownership is not transfered to + * the context, but instead a copy is made into the context for later reference. + * Therefore, the given options need to be cleaned up with + * rcl_init_options_fini() after this function returns. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes [1] + * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` + * + * \param[in] argc number of strings in argv + * \param[in] argv command line arguments; rcl specific arguments are removed + * \param[in] options options used during initialization + * \param[out] context resulting context object that represents this init + * \return #RCL_RET_OK if initialization is successful, or + * \return #RCL_RET_ALREADY_INIT if rcl_init has already been called, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_INVALID_ROS_ARGS if an invalid ROS argument is found, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init( + int argc, + char const * const * argv, + const rcl_init_options_t * options, + rcl_context_t * context); + +/// Shutdown a given rcl context. +/** + * The given context must have been initialized with rcl_init(). + * If not, this function will fail with #RCL_RET_ALREADY_SHUTDOWN. + * + * When this function is called: + * - Any rcl objects created using this context are invalidated. + * - Functions called on invalid objects may or may not fail. + * - Calls to rcl_context_is_initialized() will return `false`. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | Yes + * Lock-Free | Yes [1] + * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` + * + * \param[inout] context object to shutdown + * \return #RCL_RET_OK if the shutdown was completed successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ALREADY_SHUTDOWN if the context is not currently valid, or + * \return #RCL_RET_ERROR if an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_shutdown(rcl_context_t * context); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__INIT_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/init_options.h b/ThirdParty/ros/include/rcl/rcl/init_options.h new file mode 100644 index 000000000..f80dd7759 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/init_options.h @@ -0,0 +1,230 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__INIT_OPTIONS_H_ +#define RCL__INIT_OPTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rmw/init.h" + +#include "rcl/allocator.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +typedef struct rcl_init_options_impl_s rcl_init_options_impl_t; + +/// Encapsulation of init options and implementation defined init options. +typedef struct rcl_init_options_s +{ + /// Implementation specific pointer. + rcl_init_options_impl_t * impl; +} rcl_init_options_t; + +/// Return a zero initialized rcl_init_options_t struct. +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_init_options_t +rcl_get_zero_initialized_init_options(void); + +/// Initialize given init_options with the default values and implementation specific values. +/** + * The given allocator is used, if required, during setup of the init options, + * but is also used during initialization. + * + * In either case the given allocator is stored in the returned init options. + * + * The `impl` pointer should not be changed manually. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * \param[inout] init_options object to be setup + * \param[in] allocator to be used during setup and during initialization + * \return #RCL_RET_OK if setup is successful, or + * \return #RCL_RET_ALREADY_INIT if init_options has already be initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init_options_init(rcl_init_options_t * init_options, rcl_allocator_t allocator); + +/// Copy the given source init_options to the destination init_options. +/** + * The allocator from the source is used for any allocations and stored in the + * destination. + * + * The destination should either be zero initialized with + * rcl_get_zero_initialized_init_options() or should have had + * rcl_init_options_fini() called on it. + * Giving an already initialized init options for the destination will result + * in a failure with return code #RCL_RET_ALREADY_INIT. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * \param[in] src rcl_init_options_t object to be copied from + * \param[out] dst rcl_init_options_t object to be copied into + * \return #RCL_RET_OK if the copy is successful, or + * \return #RCL_RET_ALREADY_INIT if the dst has already be initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init_options_copy(const rcl_init_options_t * src, rcl_init_options_t * dst); + +/// Finalize the given init_options. +/** + * The given init_options must be non-`NULL` and valid, i.e. had + * rcl_init_options_init() called on it but not this function yet. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * \param[inout] init_options object to be setup + * \return #RCL_RET_OK if setup is successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init_options_fini(rcl_init_options_t * init_options); + +/// Return the domain_id stored in the init options. +/** + * Get the domain id from the specified rcl_init_options_t object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] init_options object from which the domain id should be retrieved. + * \param[out] domain_id domain id to be set in init_options object. + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init_options_get_domain_id(const rcl_init_options_t * init_options, size_t * domain_id); + +/// Set a domain id in the init options provided. +/** + * Store the domain id in the specified init_options object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] init_options objects in which to set the specified domain id. + * \param[in] domain_id domain id to be set in init_options object. + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_init_options_set_domain_id(rcl_init_options_t * init_options, size_t domain_id); + +/// Return the rmw init options which are stored internally. +/** + * This function can fail and return `NULL` if: + * - init_options is NULL + * - init_options is invalid, e.g. init_options->impl is NULL + * + * If NULL is returned an error message will have been set. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * \param[in] init_options object from which the rmw init options should be retrieved + * \return pointer to the the rcl init options, or + * \return `NULL` if there was an error + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rmw_init_options_t * +rcl_init_options_get_rmw_init_options(rcl_init_options_t * init_options); + +/// Return the allocator stored in the init_options. +/** + * This function can fail and return `NULL` if: + * - init_options is NULL + * - init_options is invalid, e.g. init_options->impl is NULL + * + * If NULL is returned an error message will have been set. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] init_options object from which the allocator should be retrieved + * \return pointer to the rcl allocator, or + * \return `NULL` if there was an error + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rcl_allocator_t * +rcl_init_options_get_allocator(const rcl_init_options_t * init_options); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__INIT_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rcl/lexer.h b/ThirdParty/ros/include/rcl/rcl/lexer.h similarity index 91% rename from ThirdParty/ros/include/rcl/lexer.h rename to ThirdParty/ros/include/rcl/rcl/lexer.h index 3b66c13c5..5c41ad149 100644 --- a/ThirdParty/ros/include/rcl/lexer.h +++ b/ThirdParty/ros/include/rcl/rcl/lexer.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__LEXER_H_ #define RCL__LEXER_H_ @@ -28,7 +30,7 @@ extern "C" #endif /// Type of lexeme found by lexical analysis. -typedef enum rcl_lexeme_t +typedef enum rcl_lexeme_e { /// Indicates no valid lexeme was found (end of input not reached) RCL_LEXEME_NONE = 0, @@ -76,7 +78,7 @@ typedef enum rcl_lexeme_t RCL_LEXEME_WILD_MULTI = 21, // TODO(hidmic): remove when parameter names are standardized to // use slashes in lieu of dots - /// . + /// \. RCL_LEXEME_DOT = 22, } rcl_lexeme_t; @@ -100,9 +102,9 @@ typedef enum rcl_lexeme_t * \param[in] text The string to analyze. * \param[out] lexeme The type of lexeme found in the string. * \param[out] length The length of text in the string that constitutes the found lexeme. - * \return `RCL_RET_OK` if analysis is successful regardless whether a valid lexeme is found, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an internal bug is detected. + * \return #RCL_RET_OK if analysis is successful regardless whether a valid lexeme is found, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an internal bug is detected. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/lexer_lookahead.h b/ThirdParty/ros/include/rcl/rcl/lexer_lookahead.h similarity index 82% rename from ThirdParty/ros/include/rcl/lexer_lookahead.h rename to ThirdParty/ros/include/rcl/rcl/lexer_lookahead.h index d50166e3f..2bf523ca7 100644 --- a/ThirdParty/ros/include/rcl/lexer_lookahead.h +++ b/ThirdParty/ros/include/rcl/rcl/lexer_lookahead.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__LEXER_LOOKAHEAD_H_ #define RCL__LEXER_LOOKAHEAD_H_ @@ -29,13 +31,13 @@ extern "C" #endif // Forward declaration -struct rcl_lexer_lookahead2_impl_t; +typedef struct rcl_lexer_lookahead2_impl_s rcl_lexer_lookahead2_impl_t; /// Track lexical analysis and allow looking ahead 2 lexemes. -typedef struct rcl_lexer_lookahead2_t +typedef struct rcl_lexer_lookahead2_s { /// Pointer to the lexer look ahead2 implementation - struct rcl_lexer_lookahead2_impl_t * impl; + rcl_lexer_lookahead2_impl_t * impl; } rcl_lexer_lookahead2_t; /// Get a zero initialized rcl_lexer_lookahead2_t instance. @@ -75,10 +77,10 @@ rcl_get_zero_initialized_lexer_lookahead2(); * \sa rcl_get_zero_initialized_lexer_lookahead2() * \param[in] text The string to analyze. * \param[in] allocator An allocator to use if an error occurs. - * \return `RCL_RET_OK` if the buffer is successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurrs. + * \return #RCL_RET_OK if the buffer is successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurrs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -102,9 +104,9 @@ rcl_lexer_lookahead2_init( * [1] Only allocates if an argument is invalid. * * \param[in] buffer The structure to be deallocated. - * \return `RCL_RET_OK` if the structure was successfully finalized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the structure was successfully finalized, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -129,9 +131,9 @@ rcl_lexer_lookahead2_fini( * * \param[in] buffer the lookahead2 buffer being used to analyze a string. * \param[out] next_type an output variable for the next lexeme in the string. - * \return `RCL_RET_OK` if peeking was successfull, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if peeking was successfull, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -158,9 +160,9 @@ rcl_lexer_lookahead2_peek( * \param[in] buffer the lookahead2 buffer being used to analyze a string. * \param[out] next_type1 an output variable for the next lexeme in the string. * \param[out] next_type2 an output variable for the lexeme after the next lexeme in the string. - * \return `RCL_RET_OK` if peeking was successfull, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if peeking was successfull, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -188,9 +190,9 @@ rcl_lexer_lookahead2_peek2( * \param[in] buffer the lookahead2 buffer being used to analyze a string. * \param[out] lexeme_text pointer to where lexeme begins in string. * \param[out] lexeme_text_length length of lexeme_text. - * \return `RCL_RET_OK` if peeking was successfull, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if peeking was successfull, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -220,10 +222,10 @@ rcl_lexer_lookahead2_accept( * \param[in] type the type the next lexeme must be. * \param[out] lexeme_text pointer to where lexeme begins in string. * \param[out] lexeme_text_length length of lexeme_text. - * \return `RCL_RET_OK` if the next lexeme was the expected one, or - * \return `RCL_RET_WRONG_LEXEME` if the next lexeme was not the expected one, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the next lexeme was the expected one, or + * \return #RCL_RET_WRONG_LEXEME if the next lexeme was not the expected one, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl/localhost.h b/ThirdParty/ros/include/rcl/rcl/localhost.h new file mode 100644 index 000000000..2c5123a59 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/localhost.h @@ -0,0 +1,48 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__LOCALHOST_H_ +#define RCL__LOCALHOST_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl/types.h" +#include "rcl/visibility_control.h" +#include "rmw/localhost.h" + +extern const char * const RCL_LOCALHOST_ENV_VAR; + +/// Determine if the user wants to communicate using loopback only. +/** + * Checks if localhost should be used for network communication based on environment. + * + * \param[out] localhost_only Must not be NULL. + * \return #RCL_RET_INVALID_ARGUMENT if an argument is invalid, or + * \return #RCL_RET_ERROR if an unexpected error happened, or + * \return #RCL_RET_OK. + */ +RCL_PUBLIC +rcl_ret_t +rcl_get_localhost_only(rmw_localhost_only_t * localhost_only); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__LOCALHOST_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/log_level.h b/ThirdParty/ros/include/rcl/rcl/log_level.h new file mode 100644 index 000000000..64942ec8a --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/log_level.h @@ -0,0 +1,193 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__LOG_LEVEL_H_ +#define RCL__LOG_LEVEL_H_ + +#include "rcl/allocator.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// typedef for RCUTILS_LOG_SEVERITY; +typedef enum RCUTILS_LOG_SEVERITY rcl_log_severity_t; + +/// A logger item to specify a name and a log level. +typedef struct rcl_logger_setting_s +{ + /// Name for the logger. + const char * name; + /// Minimum log level severity of the logger. + rcl_log_severity_t level; +} rcl_logger_setting_t; + +/// Hold default logger level and other logger setting. +typedef struct rcl_log_levels_s +{ + /// Minimum default logger level severity. + rcl_log_severity_t default_logger_level; + /// Array of logger setting. + rcl_logger_setting_t * logger_settings; + /// Number of logger settings. + size_t num_logger_settings; + /// Capacity of logger settings. + size_t capacity_logger_settings; + /// Allocator used to allocate objects in this struct. + rcl_allocator_t allocator; +} rcl_log_levels_t; + +/// Return a rcl_log_levels_t struct with members initialized to zero value. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \return a rcl_log_levels_t struct with members initialized to zero value. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_log_levels_t +rcl_get_zero_initialized_log_levels(); + +/// Initialize a log levels structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] log_levels The structure to be initialized. + * \param[in] allocator Memory allocator to be used and assigned into log_levels. + * \param[in] logger_count Number of logger settings to be allocated. + * This reserves memory for logger_settings, but doesn't initialize it. + * \return #RCL_RET_OK if the structure was initialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels contains initialized memory, or + * \return #RCL_RET_INVALID_ARGUMENT if allocator is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_log_levels_init( + rcl_log_levels_t * log_levels, const rcl_allocator_t * allocator, size_t logger_count); + +/// Copy one log levels structure into another. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] src The structure to be copied. + * Its allocator is used to copy memory into the new structure. + * \param[out] dst A log levels structure to be copied into. + * \return #RCL_RET_OK if the structure was copied successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if src is NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if src allocator is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if dst is NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if dst contains already allocated memory, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_log_levels_copy(const rcl_log_levels_t * src, rcl_log_levels_t * dst); + +/// Reclaim resources held inside rcl_log_levels_t structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] log_levels The structure which its resources have to be deallocated. + * \return #RCL_RET_OK if the memory was successfully freed, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if the log_levels allocator is invalid and the structure contains initialized memory. + */ +RCL_PUBLIC +rcl_ret_t +rcl_log_levels_fini(rcl_log_levels_t * log_levels); + +/// Shrink log levels structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] log_levels The structure to be shrunk. + * \return #RCL_RET_OK if the memory was successfully shrunk, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels is NULL or if its allocator is invalid, or + * \return #RCL_RET_BAD_ALLOC if reallocating memory failed. + */ +RCL_PUBLIC +rcl_ret_t +rcl_log_levels_shrink_to_size(rcl_log_levels_t * log_levels); + +/// Add logger setting with a name and a level. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] log_levels The structure where to set the logger log level. + * \param[in] logger_name Name for the logger, a copy of it will be stored in the structure. + * \param[in] log_level Minimum log level severity to be set for logger_name. + * \return #RCL_RET_OK if add logger setting successfully, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels was not initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if log_levels allocator is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if logger_name is NULL, or + * \return #RCL_RET_ERROR if the log_levels structure is already full. + */ +RCL_PUBLIC +rcl_ret_t +rcl_log_levels_add_logger_setting( + rcl_log_levels_t * log_levels, const char * logger_name, rcl_log_severity_t log_level); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__LOG_LEVEL_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/logging.h b/ThirdParty/ros/include/rcl/rcl/logging.h new file mode 100644 index 000000000..23f54b29d --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/logging.h @@ -0,0 +1,162 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__LOGGING_H_ +#define RCL__LOGGING_H_ + +#include "rcl/allocator.h" +#include "rcl/arguments.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +#include "rcutils/logging.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// The function signature to log messages. +typedef rcutils_logging_output_handler_t rcl_logging_output_handler_t; + +/// Configure the logging system. +/** + * This function should be called during the ROS initialization process. + * It will add the enabled log output appenders to the root logger. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] global_args The global arguments for the system + * \param[in] allocator Used to allocate memory used by the logging system + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if a general error occurs + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_configure( + const rcl_arguments_t * global_args, + const rcl_allocator_t * allocator); + +/// Configure the logging system with the provided output handler. +/** + * Similar to rcl_logging_configure, but it uses the provided output handler. + * \sa rcl_logging_configure + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] global_args The global arguments for the system + * \param[in] allocator Used to allocate memory used by the logging system + * \param[in] output_handler Output handler to be installed + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if a general error occurs + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_configure_with_output_handler( + const rcl_arguments_t * global_args, + const rcl_allocator_t * allocator, + rcl_logging_output_handler_t output_handler); + +/** + * This function should be called to tear down the logging setup by the configure function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return #RCL_RET_OK if successful. + * \return #RCL_RET_ERROR if a general error occurs + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t rcl_logging_fini(void); + +/// See if logging rosout is enabled. +/** + * This function is meant to be used to check if logging rosout is enabled. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \return `TRUE` if logging rosout is enabled, or + * \return `FALSE` if logging rosout is disabled. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +bool rcl_logging_rosout_enabled(void); + +/// Default output handler used by rcl. +/** + * This function can be wrapped in a language specific client library, + * adding the necessary mutual exclusion protection there, and then use + * rcl_logging_configure_with_output_handler() instead of + * rcl_logging_configure(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string + * \param[in] timestamp The timestamp for when the log message was made + * \param[in] format The list of arguments to insert into the formatted log message + * \param[in] args argument for the string format + */ +RCL_PUBLIC +void +rcl_logging_multiple_output_handler( + const rcutils_log_location_t * location, + int severity, const char * name, rcutils_time_point_value_t timestamp, + const char * format, va_list * args); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__LOGGING_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/logging_rosout.h b/ThirdParty/ros/include/rcl/rcl/logging_rosout.h new file mode 100644 index 000000000..4e42629ad --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/logging_rosout.h @@ -0,0 +1,195 @@ +// Copyright 2018-2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__LOGGING_ROSOUT_H_ +#define RCL__LOGGING_ROSOUT_H_ + +#include "rcl/allocator.h" +#include "rcl/error_handling.h" +#include "rcl/node.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// The default qos profile setting for topic /rosout +/** + * - depth = 1000 + * - durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL + * - lifespan = {10, 0} + */ +static const rmw_qos_profile_t rcl_qos_profile_rosout_default = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 1000, + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL, + RMW_QOS_DEADLINE_DEFAULT, + {10, 0}, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +/// Initializes the rcl_logging_rosout features +/** + * Calling this will initialize the rcl_logging_rosout features. This function must be called + * before any other rcl_logging_rosout_* functions can be called. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] allocator The allocator used for metadata related to the rcl_logging_rosout features + * \return #RCL_RET_OK if the rcl_logging_rosout features are successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_rosout_init( + const rcl_allocator_t * allocator); + +/// Uninitializes the rcl_logging_rosout features +/** + * Calling this will set the rcl_logging_rosout features into the an unitialized state that is + * functionally the same as before rcl_logging_rosout_init was called. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return #RCL_RET_OK if the rcl_logging_rosout feature was successfully unitialized, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_rosout_fini(); + +/// Creates a rosout publisher for a node and registers it to be used by the logging system +/** + * Calling this for an rcl_node_t will create a new publisher on that node that will be + * used by the logging system to publish all log messages from that Node's logger. + * + * If a publisher already exists for this node then a new publisher will NOT be created. + * + * It is expected that after creating a rosout publisher with this function + * rcl_logging_destroy_rosout_publisher_for_node() will be called for the node to cleanup + * the publisher while the Node is still valid. + * + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] node a valid rcl_node_t that the publisher will be created on + * \return #RCL_RET_OK if the logging publisher was created successfully, or + * \return #RCL_RET_NODE_INVALID if the argument is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_rosout_init_publisher_for_node( + rcl_node_t * node); + +/// Deregisters a rosout publisher for a node and cleans up allocated resources +/** + * Calling this for an rcl_node_t will destroy the rosout publisher on that node and remove it from + * the logging system so that no more Log messages are published to this function. + * + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] node a valid rcl_node_t that the publisher will be created on + * \return #RCL_RET_OK if the logging publisher was finalized successfully, or + * \return #RCL_RET_NODE_INVALID if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_logging_rosout_fini_publisher_for_node( + rcl_node_t * node); + +/// The output handler outputs log messages to rosout topics. +/** + * When called with a logger name and log message this function will attempt to + * find a rosout publisher correlated with the logger name and publish a Log + * message out via that publisher. If there is no publisher directly correlated + * with the logger then nothing will be done. + * + * This function is meant to be registered with the logging functions for + * rcutils, and shouldn't be used outside of that context. + * Additionally, arguments like args should be non-null and properly initialized + * otherwise it is undefined behavior. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string + * \param[in] timestamp The timestamp for when the log message was made + * \param[in] format The list of arguments to insert into the formatted log message + * \param[in] args argument for the string format + */ +RCL_PUBLIC +void +rcl_logging_rosout_output_handler( + const rcutils_log_location_t * location, + int severity, + const char * name, + rcutils_time_point_value_t timestamp, + const char * format, + va_list * args); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__LOGGING_ROSOUT_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/macros.h b/ThirdParty/ros/include/rcl/rcl/macros.h new file mode 100644 index 000000000..4df9ff427 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/macros.h @@ -0,0 +1,34 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL__MACROS_H_ +#define RCL__MACROS_H_ + +#include "rcutils/macros.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Ignored return values of functions with this macro will emit a warning. +#define RCL_WARN_UNUSED RCUTILS_WARN_UNUSED + +#define RCL_UNUSED(x) RCUTILS_UNUSED(x) + +#ifdef __cplusplus +} +#endif + +#endif // RCL__MACROS_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/network_flow_endpoints.h b/ThirdParty/ros/include/rcl/rcl/network_flow_endpoints.h new file mode 100644 index 000000000..4b0988124 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/network_flow_endpoints.h @@ -0,0 +1,136 @@ +// Copyright 2020 Ericsson AB +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef RCL__NETWORK_FLOW_ENDPOINTS_H_ +#define RCL__NETWORK_FLOW_ENDPOINTS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rcl/allocator.h" +#include "rcl/arguments.h" +#include "rcl/context.h" +#include "rcl/macros.h" +#include "rcl/publisher.h" +#include "rcl/subscription.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +typedef rmw_network_flow_endpoint_t rcl_network_flow_endpoint_t; +typedef rmw_network_flow_endpoint_array_t rcl_network_flow_endpoint_array_t; +typedef rmw_transport_protocol_t rcl_transport_protocol_t; +typedef rmw_internet_protocol_t rcl_internet_protocol_t; + +#define rcl_get_zero_initialized_network_flow_endpoint_array \ + rmw_get_zero_initialized_network_flow_endpoint_array +#define rcl_network_flow_endpoint_array_fini rmw_network_flow_endpoint_array_fini + +#define rcl_network_flow_endpoint_get_transport_protocol_string \ + rmw_network_flow_endpoint_get_transport_protocol_string +#define rcl_network_flow_endpoint_get_internet_protocol_string \ + rmw_network_flow_endpoint_get_internet_protocol_string + +/// Get network flow endpoints of a publisher +/** + * Query the underlying middleware for a given publisher's network flow endpoints + * + * The `publisher` argument must point to a valid publisher. + * + * The `allocator` argument must be a valid allocator. + * + * The `network_flow_endpoint_array` argument must be allocated and zero-initialized. + * The function returns network flow endpoints in the `network_flow_endpoint_array` argument, + * using the allocator to allocate memory for the `network_flow_endpoint_array` + * argument's internal data structures whenever required. The caller is + * reponsible for memory deallocation by passing the `network_flow_endpoint_array` + * argument to `rcl_network_flow_endpoint_array_fini` function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] publisher the publisher instance to inspect + * \param[in] allocator allocator to be used when allocating space for network_flow_endpoint_array_t + * \param[out] network_flow_endpoint_array the network flow endpoints + * \return `RCL_RET_OK` if successful, or + * \return `RCL_RET_INVALID_ARGUMENT` if any argument is null, or + * \return `RCL_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RCL_RET_UNSUPPORTED` if not supported, or + * \return `RCL_RET_ERROR` if an unexpected error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_publisher_get_network_flow_endpoints( + const rcl_publisher_t * publisher, + rcutils_allocator_t * allocator, + rcl_network_flow_endpoint_array_t * network_flow_endpoint_array); + +/// Get network flow endpoints of a subscription +/** + * Query the underlying middleware for a given subscription's network flow endpoints + * + * The `subscription` argument must point to a valid subscription. + * + * The `allocator` argument must be a valid allocator. + * + * The `network_flow_endpoint_array` argument must be allocated and zero-initialized. + * The function returns network flow endpoints in the `network_flow_endpoint_array` argument, + * using the allocator to allocate memory for the `network_flow_endpoint_array` + * argument's internal data structures whenever required. The caller is + * reponsible for memory deallocation by passing the `network_flow_endpoint_array` + * argument to `rcl_network_flow_endpoint_array_fini` function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] subscription the subscription instance to inspect + * \param[in] allocator allocator to be used when allocating space for network_flow_endpoint_array_t + * \param[out] network_flow_endpoint_array the network flow endpoints + * \return `RCL_RET_OK` if successful, or + * \return `RCL_RET_INVALID_ARGUMENT` if any argument is null, or + * \return `RCL_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RCL_RET_UNSUPPORTED` if not supported, or + * \return `RCL_RET_ERROR` if an unexpected error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_get_network_flow_endpoints( + const rcl_subscription_t * subscription, + rcutils_allocator_t * allocator, + rcl_network_flow_endpoint_array_t * network_flow_endpoint_array); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__NETWORK_FLOW_ENDPOINTS_H_ diff --git a/ThirdParty/ros/include/rcl/node.h b/ThirdParty/ros/include/rcl/rcl/node.h similarity index 81% rename from ThirdParty/ros/include/rcl/node.h rename to ThirdParty/ros/include/rcl/rcl/node.h index 0d5de91df..b9b864358 100644 --- a/ThirdParty/ros/include/rcl/node.h +++ b/ThirdParty/ros/include/rcl/rcl/node.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__NODE_H_ #define RCL__NODE_H_ @@ -25,22 +27,24 @@ extern "C" #include "rcl/allocator.h" #include "rcl/arguments.h" #include "rcl/context.h" +#include "rcl/guard_condition.h" #include "rcl/macros.h" #include "rcl/node_options.h" #include "rcl/types.h" #include "rcl/visibility_control.h" -struct rcl_guard_condition_t; -struct rcl_node_impl_t; +extern const char * const RCL_DISABLE_LOANED_MESSAGES_ENV_VAR; + +typedef struct rcl_node_impl_s rcl_node_impl_t; /// Structure which encapsulates a ROS Node. -typedef struct rcl_node_t +typedef struct rcl_node_s { /// Context associated with this node. rcl_context_t * context; /// Private implementation pointer. - struct rcl_node_impl_t * impl; + rcl_node_impl_t * impl; } rcl_node_t; /// Return a rcl_node_t struct with members initialized to `NULL`. @@ -60,7 +64,7 @@ rcl_get_zero_initialized_node(void); * The name of the node must not be NULL and adhere to naming restrictions, * see the rmw_validate_node_name() function for rules. * - * \todo TODO(wjwwood): node name uniqueness is no yet enforced + * \todo TODO(wjwwood): node name uniqueness is not yet enforced * * The name of the node cannot coincide with another node of the same name. * If a node of the same name is already in the domain, it will be shutdown. @@ -72,7 +76,7 @@ rcl_get_zero_initialized_node(void); * slash. * Because there is no notion of a relative namespace, there is no difference * between a namespace which lacks a forward and the same namespace with a - * leasing forward slash. + * leading forward slash. * Therefore, a namespace like ``"foo/bar"`` is automatically changed to * ``"/foo/bar"`` by this function. * Similarly, the namespace ``""`` will implicitly become ``"/"`` which is a @@ -130,14 +134,14 @@ rcl_get_zero_initialized_node(void); * The options are deep copied into the node. * The caller is always responsible for freeing memory used options they * pass in. - * \return `RCL_RET_OK` if the node was initialized successfully, or - * \return `RCL_RET_ALREADY_INIT` if the node has already be initialized, or - * \return `RCL_RET_NOT_INIT` if the given context is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_NODE_INVALID_NAME` if the name is invalid, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the namespace_ is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the node was initialized successfully, or + * \return #RCL_RET_ALREADY_INIT if the node has already be initialized, or + * \return #RCL_RET_NOT_INIT if the given context is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_NODE_INVALID_NAME if the name is invalid, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the namespace_ is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -172,9 +176,9 @@ rcl_node_init( * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` * * \param[in] node rcl_node_t to be finalized - * \return `RCL_RET_OK` if node was finalized successfully, or - * \return `RCL_RET_NODE_INVALID` if the node pointer is null, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if node was finalized successfully, or + * \return #RCL_RET_NODE_INVALID if the node pointer is null, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -343,7 +347,7 @@ rcl_node_get_options(const rcl_node_t * node); * * This function should be used to determine what `domain_id` was used rather * than checking the domain_id field in the node options, because if - * `RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID` is used when creating the node then + * #RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID is used when creating the node then * it is not changed after creation, but this function will return the actual * `domain_id` used. * @@ -360,10 +364,10 @@ rcl_node_get_options(const rcl_node_t * node); * * \param[in] node the handle to the node being queried * \param[out] domain_id storage for the domain id - * \return `RCL_RET_OK` if node the domain ID was retrieved successfully, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if node the domain ID was retrieved successfully, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -460,7 +464,7 @@ rcl_node_get_rcl_instance_id(const rcl_node_t * node); */ RCL_PUBLIC RCL_WARN_UNUSED -const struct rcl_guard_condition_t * +const rcl_guard_condition_t * rcl_node_get_graph_guard_condition(const rcl_node_t * node); /// Return the logger name of the node. @@ -490,6 +494,61 @@ RCL_WARN_UNUSED const char * rcl_node_get_logger_name(const rcl_node_t * node); +/// Expand a given name into a fully-qualified topic name and apply remapping rules. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] node Node object. Its name, namespace, local/global command line arguments are used. + * \param[in] input_name Topic name to be expanded and remapped. + * \param[in] allocator The allocator to be used when creating the output topic. + * \param[in] is_service For services use `true`, for topics use `false`. + * \param[in] only_expand When `true`, remapping rules are ignored. + * \param[out] output_name Output char * pointer. + * \return #RCL_RET_OK if the topic name was expanded successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any of input_name, node_name, node_namespace + * or output_name are NULL, or + * \return #RCL_RET_INVALID_ARGUMENT if both local_args and global_args are NULL, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_TOPIC_NAME_INVALID if the given topic name is invalid + * (see rcl_validate_topic_name()), or + * \return #RCL_RET_NODE_INVALID_NAME if the given node name is invalid + * (see rmw_validate_node_name()), or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the given node namespace is invalid + * (see rmw_validate_namespace()), or + * \return #RCL_RET_UNKNOWN_SUBSTITUTION for unknown substitutions in name, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_node_resolve_name( + const rcl_node_t * node, + const char * input_name, + rcl_allocator_t allocator, + bool is_service, + bool only_expand, + char ** output_name); + +/// Check if loaned message is disabled, according to the environment variable. +/** + * If the `ROS_DISABLE_LOANED_MESSAGES` environment variable is set to "1", + * `disable_loaned_message` will be set to true. + * + * \param[out] disable_loaned_message Must not be NULL. + * \return #RCL_RET_INVALID_ARGUMENT if an argument is not valid, or + * \return #RCL_RET_ERROR if an unexpected error happened, or + * \return #RCL_RET_OK. + */ +RCL_PUBLIC +rcl_ret_t +rcl_get_disable_loaned_message(bool * disable_loaned_message); + #ifdef __cplusplus } #endif diff --git a/ThirdParty/ros/include/rcl/rcl/node_options.h b/ThirdParty/ros/include/rcl/rcl/node_options.h new file mode 100644 index 000000000..551d79437 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/node_options.h @@ -0,0 +1,127 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__NODE_OPTIONS_H_ +#define RCL__NODE_OPTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl/allocator.h" +#include "rcl/arguments.h" + +#include "rcl/domain_id.h" + +/// Constant which indicates that the default domain id should be used. +#define RCL_NODE_OPTIONS_DEFAULT_DOMAIN_ID RCL_DEFAULT_DOMAIN_ID + +/// Structure which encapsulates the options for creating a rcl_node_t. +typedef struct rcl_node_options_s +{ + // bool anonymous_name; + + // rmw_qos_profile_t parameter_qos; + + /// If true, no parameter infrastructure will be setup. + // bool no_parameters; + + /// Custom allocator used for internal allocations. + rcl_allocator_t allocator; + + /// If false then only use arguments in this struct, otherwise use global arguments also. + bool use_global_arguments; + + /// Command line arguments that apply only to this node. + rcl_arguments_t arguments; + + /// Flag to enable rosout for this node + bool enable_rosout; + + /// Middleware quality of service settings for /rosout. + rmw_qos_profile_t rosout_qos; +} rcl_node_options_t; + +/// Return the default node options in a rcl_node_options_t. +/** + * The default values are: + * + * - allocator = rcl_get_default_allocator() + * - use_global_arguments = true + * - enable_rosout = true + * - arguments = rcl_get_zero_initialized_arguments() + * - rosout_qos = rcl_qos_profile_rosout_default + * + * \return A structure with the default node options. + */ +RCL_PUBLIC +rcl_node_options_t +rcl_node_get_default_options(void); + +/// Copy one options structure into another. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] options The structure to be copied. + * Its allocator is used to copy memory into the new structure. + * \param[out] options_out An options structure containing default values. + * \return #RCL_RET_OK if the structure was copied successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_node_options_copy( + const rcl_node_options_t * options, + rcl_node_options_t * options_out); + +/// Finalize the given node_options. +/** + * The given node_options must be non-`NULL` and valid, i.e. had + * rcl_node_get_default_options() called on it but not this function yet. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * \param[inout] options object to be finalized + * \return #RCL_RET_OK if setup is successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_node_options_fini(rcl_node_options_t * options); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__NODE_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rcl/publisher.h b/ThirdParty/ros/include/rcl/rcl/publisher.h similarity index 80% rename from ThirdParty/ros/include/rcl/publisher.h rename to ThirdParty/ros/include/rcl/rcl/publisher.h index 3c274d95a..c39f5cfc5 100644 --- a/ThirdParty/ros/include/rcl/publisher.h +++ b/ThirdParty/ros/include/rcl/rcl/publisher.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__PUBLISHER_H_ #define RCL__PUBLISHER_H_ @@ -25,19 +27,20 @@ extern "C" #include "rcl/macros.h" #include "rcl/node.h" #include "rcl/visibility_control.h" +#include "rcl/time.h" /// Internal rcl publisher implementation struct. -struct rcl_publisher_impl_t; +typedef struct rcl_publisher_impl_s rcl_publisher_impl_t; /// Structure which encapsulates a ROS Publisher. -typedef struct rcl_publisher_t +typedef struct rcl_publisher_s { /// Pointer to the publisher implementation - struct rcl_publisher_impl_t * impl; + rcl_publisher_impl_t * impl; } rcl_publisher_t; /// Options available for a rcl publisher. -typedef struct rcl_publisher_options_t +typedef struct rcl_publisher_options_s { /// Middleware quality of service settings for the publisher. rmw_qos_profile_t qos; @@ -137,13 +140,13 @@ rcl_get_zero_initialized_publisher(void); * \param[in] type_support type support object for the topic's type * \param[in] topic_name the name of the topic to publish on * \param[in] options publisher options, including quality of service settings - * \return `RCL_RET_OK` if the publisher was initialized successfully, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ALREADY_INIT` if the publisher is already initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory fails, or - * \return `RCL_RET_TOPIC_NAME_INVALID` if the given topic name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the publisher was initialized successfully, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ALREADY_INIT if the publisher is already initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory fails, or + * \return #RCL_RET_TOPIC_NAME_INVALID if the given topic name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -173,11 +176,11 @@ rcl_publisher_init( * * \param[inout] publisher handle to the publisher to be finalized * \param[in] node a valid (not finalized) handle to the node used to create the publisher - * \return `RCL_RET_OK` if publisher was finalized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if publisher was finalized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -191,6 +194,8 @@ rcl_publisher_fini(rcl_publisher_t * publisher, rcl_node_t * node); * - qos = rmw_qos_profile_default * - allocator = rcl_get_default_allocator() * - rmw_publisher_options = rmw_get_default_publisher_options() + * + * \return A structure with the default publisher options. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -215,11 +220,12 @@ rcl_publisher_get_default_options(void); * \param[in] publisher Publisher to which the allocated message is associated. * \param[in] type_support Typesupport to which the internal ros message is allocated. * \param[out] ros_message The pointer to be filled to a valid ros message by the middleware. - * \return `RCL_RET_OK` if the ros message was correctly initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if an argument other than the ros message is null, or - * \return `RCL_RET_BAD_ALLOC` if the ros message could not be correctly created, or - * \return `RCL_RET_UNIMPLEMENTED` if the middleware does not support that feature, or - * \return `RCL_RET_ERROR` if an unexpected error occured. + * \return #RCL_RET_OK if the ros message was correctly initialized, or + * \return #RCL_RET_PUBLISHER_INVALID if the passed publisher is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if an argument other than the ros message is null, or + * \return #RCL_RET_BAD_ALLOC if the ros message could not be correctly created, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature, or + * \return #RCL_RET_ERROR if an unexpected error occured. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -245,11 +251,11 @@ rcl_borrow_loaned_message( * * \param[in] publisher Publisher to which the loaned message is associated. * \param[in] loaned_message Loaned message to be deallocated and destroyed. - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if an argument is null, or - * \return `RCL_RET_UNIMPLEMENTED` if the middleware does not support that feature, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_ERROR` if an unexpected error occurs and no message can be initialized. + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_INVALID_ARGUMENT if an argument is null, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_ERROR if an unexpected error occurs and no message can be initialized. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -310,10 +316,10 @@ rcl_return_loaned_message_from_publisher( * \param[in] publisher handle to the publisher which will do the publishing * \param[in] ros_message type-erased pointer to the ROS message * \param[in] allocation structure pointer, used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the message was published successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the message was published successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -334,7 +340,7 @@ rcl_publish( * The publish call might be able to send any abitrary serialized message, it is however * not garantueed that the subscriber side successfully deserializes this byte stream. * - * Apart from this, the `publish_serialized` function has the same behavior as `rcl_publish` + * Apart from this, the `publish_serialized` function has the same behavior as rcl_publish() * expect that no serialization step is done. * *
@@ -349,11 +355,11 @@ rcl_publish( * \param[in] publisher handle to the publisher which will do the publishing * \param[in] serialized_message pointer to the already serialized message in raw form * \param[in] allocation structure pointer, used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the message was published successfully, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the message was published successfully, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -365,15 +371,15 @@ rcl_publish_serialized_message( /// Publish a loaned message on a topic using a publisher. /** - * A previously borrowed loaned message can be sent via this call to `rcl_publish_loaned_message`. + * A previously borrowed loaned message can be sent via this call to rcl_publish_loaned_message(). * By calling this function, the ownership of the loaned message is getting transferred back * to the middleware. * The pointer to the `ros_message` is not guaranteed to be valid after as the middleware * migth deallocate the memory for this message internally. * It is thus recommended to call this function only in combination with - * \sa `rcl_borrow_loaned_message`. + * \sa rcl_borrow_loaned_message(). * - * Apart from this, the `publish_loaned_message` function has the same behavior as `rcl_publish` + * Apart from this, the `publish_loaned_message` function has the same behavior as rcl_publish() * except that no serialization step is done. * *
@@ -390,11 +396,11 @@ rcl_publish_serialized_message( * \param[in] publisher handle to the publisher which will do the publishing * \param[in] ros_message pointer to the previously borrow loaned message * \param[in] allocation structure pointer, used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the message was published successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_UNIMPLEMENTED` if the middleware does not support that feature, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the message was published successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -420,15 +426,56 @@ rcl_publish_loaned_message( * Lock-Free | Yes * * \param[in] publisher handle to the publisher that needs liveliness to be asserted - * \return `RCL_RET_OK` if the liveliness assertion was completed successfully, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the liveliness assertion was completed successfully, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_publisher_assert_liveliness(const rcl_publisher_t * publisher); +/// Wait until all published message data is acknowledged or until the specified timeout elapses. +/** + * This function waits until all published message data were acknowledged by peer node or timeout. + * + * The timeout unit is nanoseconds. + * If the timeout is negative then this function will block indefinitely until all published message + * data were acknowledged. + * If the timeout is 0 then this function will be non-blocking; checking all published message data + * were acknowledged (If acknowledged, return RCL_RET_OK. Otherwise, return RCL_RET_TIMEOUT), but + * not waiting. + * If the timeout is greater than 0 then this function will return after that period of time has + * elapsed (return RCL_RET_TIMEOUT) or all published message data were acknowledged (return + * RCL_RET_OK). + * + * This function only waits for acknowledgments if the publisher's QOS profile is RELIABLE. + * Otherwise this function will immediately return RCL_RET_OK. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] publisher handle to the publisher that needs to wait for all acked. + * \param[in] timeout the duration to wait for all published message data were acknowledged, in + * nanoseconds. + * \return #RCL_RET_OK if successful, or + * \return #RCL_RET_TIMEOUT if timed out, or + * \return #RCL_RET_PUBLISHER_INVALID if publisher is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_publisher_wait_for_all_acked( + const rcl_publisher_t * publisher, + rcl_duration_value_t timeout); + /// Get the topic name for the publisher. /** * This function returns the publisher's internal topic name string. @@ -592,10 +639,10 @@ rcl_publisher_is_valid_except_context(const rcl_publisher_t * publisher); * * \param[in] publisher pointer to the rcl publisher * \param[out] subscription_count number of matched subscriptions - * \return `RCL_RET_OK` if the count was retrieved, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_PUBLISHER_INVALID` if the publisher is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the count was retrieved, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_PUBLISHER_INVALID if the publisher is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl.h b/ThirdParty/ros/include/rcl/rcl/rcl.h similarity index 100% rename from ThirdParty/ros/include/rcl/rcl.h rename to ThirdParty/ros/include/rcl/rcl/rcl.h diff --git a/ThirdParty/ros/include/rcl/remap.h b/ThirdParty/ros/include/rcl/rcl/remap.h similarity index 82% rename from ThirdParty/ros/include/rcl/remap.h rename to ThirdParty/ros/include/rcl/rcl/remap.h index 82f0b0e04..5acf5e48e 100644 --- a/ThirdParty/ros/include/rcl/remap.h +++ b/ThirdParty/ros/include/rcl/rcl/remap.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__REMAP_H_ #define RCL__REMAP_H_ @@ -26,13 +28,13 @@ extern "C" { #endif -struct rcl_remap_impl_t; +typedef struct rcl_remap_impl_s rcl_remap_impl_t; /// Hold remapping rules. -typedef struct rcl_remap_t +typedef struct rcl_remap_s { /// Private implementation pointer. - struct rcl_remap_impl_t * impl; + rcl_remap_impl_t * impl; } rcl_remap_t; /// Return a rcl_remap_t struct with members initialized to `NULL`. @@ -53,12 +55,12 @@ rcl_get_zero_initialized_remap(void); * If both `local_arguments` and global_arguments are NULL or zero intialized then the function will * return RCL_RET_INVALID_ARGUMENT. * - * `global_arguments` is usually the arguments passed to `rcl_init()`. + * `global_arguments` is usually the arguments passed to rcl_init(). * \sa rcl_init() * \sa rcl_get_global_arguments() * * Remap rules are checked in the order they were given. - * For rules passed to `rcl_init` this usually is the order they were passed on the command line. + * For rules passed to rcl_init() this usually is the order they were passed on the command line. * \sa rcl_parse_arguments() * * Only the first remap rule that matches is used to remap a name. @@ -98,11 +100,11 @@ rcl_get_zero_initialized_remap(void); * \param[in] allocator A valid allocator to use. * \param[out] output_name Either an allocated string with the remapped name, or * `NULL` if no remap rules matched the name. - * \return `RCL_RET_OK` if the topic name was remapped or no rules matched, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_TOPIC_NAME_INVALID` if the given topic name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the topic name was remapped or no rules matched, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_TOPIC_NAME_INVALID if the given topic name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -143,11 +145,11 @@ rcl_remap_topic_name( * \param[in] allocator A valid allocator to use. * \param[out] output_name Either an allocated string with the remapped name, or * `NULL` if no remap rules matched the name. - * \return `RCL_RET_OK` if the name was remapped or no rules matched, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SERVICE_NAME_INVALID` if the given name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the name was remapped or no rules matched, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SERVICE_NAME_INVALID if the given name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -190,11 +192,11 @@ rcl_remap_service_name( * \param[in] allocator A valid allocator to use. * \param[out] output_name Either an allocated string with the remapped name, or * `NULL` if no remap rules matched the name. - * \return `RCL_RET_OK` If the name was remapped or no rules matched, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_NODE_INVALID_NAME` if the name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK If the name was remapped or no rules matched, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_NODE_INVALID_NAME if the name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -231,11 +233,11 @@ rcl_remap_node_name( * \param[in] allocator A valid allocator to be used. * \param[out] output_namespace Either an allocated string with the remapped namespace, or * `NULL` if no remap rules matched the name. - * \return `RCL_RET_OK` if the node name was remapped or no rules matched, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_NODE_INVALID_NAMESPACE` if the remapped namespace is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the node name was remapped or no rules matched, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_NODE_INVALID_NAMESPACE if the remapped namespace is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -260,10 +262,10 @@ rcl_remap_node_namespace( * \param[in] rule The structure to be copied. * Its allocator is used to copy memory into the new structure. * \param[out] rule_out A zero-initialized rcl_remap_t structure to be copied into. - * \return `RCL_RET_OK` if the structure was copied successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the structure was copied successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -283,9 +285,9 @@ rcl_remap_copy( * Lock-Free | Yes * * \param[in] remap The structure to be deallocated. - * \return `RCL_RET_OK` if the memory was successfully freed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the memory was successfully freed, or + * \return #RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl/rmw_implementation_identifier_check.h b/ThirdParty/ros/include/rcl/rcl/rmw_implementation_identifier_check.h new file mode 100644 index 000000000..cf39fc077 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/rmw_implementation_identifier_check.h @@ -0,0 +1,48 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ +#define RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl/visibility_control.h" + +/// The environment variable name to control which RMW implementation is used. +#define RMW_IMPLEMENTATION_ENV_VAR_NAME "RMW_IMPLEMENTATION" + +/// The environment variable name to control whether the chosen RMW implementation +/// matches the one that is in use. +#define RCL_ASSERT_RMW_ID_MATCHES_ENV_VAR_NAME "RCL_ASSERT_RMW_ID_MATCHES" + +/// Check whether the RMW implementation in use matches what the user requested. +/** + * \return #RCL_RET_OK if the RMW implementation in use matches what the user requested, or + * \return #RCL_RET_MISMATCHED_RMW_ID if the RMW implementation does not match, or + * \return #RCL_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCL_RET_ERROR if some other error occurred. + */ +RCL_PUBLIC +rcl_ret_t rcl_rmw_implementation_identifier_check(void); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/security.h b/ThirdParty/ros/include/rcl/rcl/security.h new file mode 100644 index 000000000..b37fd92cf --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/security.h @@ -0,0 +1,133 @@ +// Copyright 2018-2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__SECURITY_H_ +#define RCL__SECURITY_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcl/allocator.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" +#include "rmw/security_options.h" + +#ifndef ROS_SECURITY_ENCLAVE_OVERRIDE +/// The name of the environment variable containing the security enclave override. +# define ROS_SECURITY_ENCLAVE_OVERRIDE "ROS_SECURITY_ENCLAVE_OVERRIDE" +#endif + +#ifndef ROS_SECURITY_KEYSTORE_VAR_NAME +/// The name of the environment variable containing the path to the keystore. +# define ROS_SECURITY_KEYSTORE_VAR_NAME "ROS_SECURITY_KEYSTORE" +#endif + +#ifndef ROS_SECURITY_STRATEGY_VAR_NAME +/// The name of the environment variable containing the security strategy. +# define ROS_SECURITY_STRATEGY_VAR_NAME "ROS_SECURITY_STRATEGY" +#endif + +#ifndef ROS_SECURITY_ENABLE_VAR_NAME +/// The name of the environment variable controlling whether security is enabled. +# define ROS_SECURITY_ENABLE_VAR_NAME "ROS_SECURITY_ENABLE" +#endif + +/// Initialize security options from values in the environment variables and given names. +/** + * Initialize the given security options based on the environment. + * For more details: + * \sa rcl_security_enabled() + * \sa rcl_get_enforcement_policy() + * \sa rcl_get_secure_root() + * + * \param[in] name name used to find the security root path. + * \param[in] allocator used to do allocations. + * \param[out] security_options security options that will be configured according to + * the environment. + * \return #RCL_RET_OK If the security options are returned properly, or + * \return #RCL_RET_INVALID_ARGUMENT if an argument is not valid, or + * \return #RCL_RET_ERROR if an unexpected error happened + */ +RCL_PUBLIC +rcl_ret_t +rcl_get_security_options_from_environment( + const char * name, + const rcutils_allocator_t * allocator, + rmw_security_options_t * security_options); + +/// Check if security has to be used, according to the environment. +/** + * If the `ROS_SECURITY_ENABLE` environment variable is set to "true", `use_security` will be set to + * true. + * + * \param[out] use_security Must not be NULL. + * \return #RCL_RET_INVALID_ARGUMENT if an argument is not valid, or + * \return #RCL_RET_ERROR if an unexpected error happened, or + * \return #RCL_RET_OK. + */ +RCL_PUBLIC +rcl_ret_t +rcl_security_enabled(bool * use_security); + +/// Get security enforcement policy from the environment. +/** + * Sets `policy` based on the value of the `ROS_SECURITY_STRATEGY` environment variable. + * If `ROS_SECURITY_STRATEGY` is "Enforce", `policy` will be `RMW_SECURITY_ENFORCEMENT_ENFORCE`. + * If not, `policy` will be `RMW_SECURITY_ENFORCEMENT_PERMISSIVE`. + * + * \param[out] policy Must not be NULL. + * \return #RCL_RET_INVALID_ARGUMENT if an argument is not valid, or + * \return #RCL_RET_ERROR if an unexpected error happened, or + * \return #RCL_RET_OK. + */ +RCL_PUBLIC +rcl_ret_t +rcl_get_enforcement_policy(rmw_security_enforcement_policy_t * policy); + +/// Return the secure root given a enclave name. +/** + * Return the security directory associated with the enclave name. + * + * The value of the environment variable `ROS_SECURITY_KEYSTORE` is used as a root. + * The specific directory to be used is found from that root using the `name` passed. + * E.g. for a context named "/a/b/c" and root "/r", the secure root path will be + * "/r/a/b/c", where the delimiter "/" is native for target file system (e.g. "\\" for _WIN32). + * + * However, this expansion can be overridden by setting the secure enclave override environment + * (`ROS_SECURITY_ENCLAVE_OVERRIDE`) variable, allowing users to explicitly specify the exact enclave + * `name` to be utilized. + * Such an override is useful for applications where the enclave is non-deterministic + * before runtime, or when testing and using additional tools that may not otherwise be easily + * provisioned. + * + * \param[in] name validated name (a single token) + * \param[in] allocator the allocator to use for allocation + * \return Machine specific (absolute) enclave directory path or NULL on failure. + * Returned pointer must be deallocated by the caller of this function + */ +RCL_PUBLIC +char * +rcl_get_secure_root(const char * name, const rcl_allocator_t * allocator); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__SECURITY_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/service.h b/ThirdParty/ros/include/rcl/rcl/service.h new file mode 100644 index 000000000..2461bd551 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/service.h @@ -0,0 +1,531 @@ +// Copyright 2016 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__SERVICE_H_ +#define RCL__SERVICE_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" + +#include "rcl/event_callback.h" +#include "rcl/macros.h" +#include "rcl/node.h" +#include "rcl/visibility_control.h" + +/// Internal rcl implementation struct. +typedef struct rcl_service_impl_s rcl_service_impl_t; + +/// Structure which encapsulates a ROS Service. +typedef struct rcl_service_s +{ + /// Pointer to the service implementation + rcl_service_impl_t * impl; +} rcl_service_t; + +/// Options available for a rcl service. +typedef struct rcl_service_options_s +{ + /// Middleware quality of service settings for the service. + rmw_qos_profile_t qos; + /// Custom allocator for the service, used for incidental allocations. + /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ + rcl_allocator_t allocator; +} rcl_service_options_t; + +/// Return a rcl_service_t struct with members set to `NULL`. +/** + * Should be called to get a null rcl_service_t before passing to + * rcl_service_init(). + * + * \return A structure with a zero initialized service. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_service_t +rcl_get_zero_initialized_service(void); + +/// Initialize a rcl service. +/** + * After calling this function on a rcl_service_t, it can be used to take + * requests of the given type to the given topic using rcl_take_request(). + * It can also send a response to a request using rcl_send_response(). + * + * The given rcl_node_t must be valid and the resulting rcl_service_t is + * only valid as long as the given rcl_node_t remains valid. + * + * The rosidl_service_type_support_t is obtained on a per .srv type basis. + * When the user defines a ROS service, code is generated which provides the + * required rosidl_service_type_support_t object. + * This object can be obtained using a language appropriate mechanism. + * \todo TODO(wjwwood) write these instructions once and link to it instead + * + * For C, a macro can be used (for example `example_interfaces/AddTwoInts`): + * + * ```c + * #include + * #include + * const rosidl_service_type_support_t * ts = + * ROSIDL_GET_SRV_TYPE_SUPPORT(example_interfaces, srv, AddTwoInts); + * ``` + * + * For C++, a template function is used: + * + * ```cpp + * #include + * #include + * using rosidl_typesupport_cpp::get_service_type_support_handle; + * const rosidl_service_type_support_t * ts = + * get_service_type_support_handle(); + * ``` + * + * The rosidl_service_type_support_t object contains service type specific + * information used to send or take requests and responses. + * + * The topic name must be a c string which follows the topic and service name + * format rules for unexpanded names, also known as non-fully qualified names: + * + * \see rcl_expand_topic_name + * + * The options struct allows the user to set the quality of service settings as + * well as a custom allocator which is used when initializing/finalizing the + * client to allocate space for incidentals, e.g. the service name string. + * + * Expected usage (for C services): + * + * ```c + * #include + * #include + * #include + * + * rcl_node_t node = rcl_get_zero_initialized_node(); + * rcl_node_options_t node_ops = rcl_node_get_default_options(); + * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); + * // ... error handling + * const rosidl_service_type_support_t * ts = + * ROSIDL_GET_SRV_TYPE_SUPPORT(example_interfaces, srv, AddTwoInts); + * rcl_service_t service = rcl_get_zero_initialized_service(); + * rcl_service_options_t service_ops = rcl_service_get_default_options(); + * ret = rcl_service_init(&service, &node, ts, "add_two_ints", &service_ops); + * // ... error handling, and on shutdown do finalization: + * ret = rcl_service_fini(&service, &node); + * // ... error handling for rcl_service_fini() + * ret = rcl_node_fini(&node); + * // ... error handling for rcl_node_fini() + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] service preallocated service structure + * \param[in] node valid rcl node handle + * \param[in] type_support type support object for the service's type + * \param[in] service_name the name of the service + * \param[in] options service options, including quality of service settings + * \return #RCL_RET_OK if service was initialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ALREADY_INIT if the service is already initialized, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SERVICE_NAME_INVALID if the given service name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_service_init( + rcl_service_t * service, + const rcl_node_t * node, + const rosidl_service_type_support_t * type_support, + const char * service_name, + const rcl_service_options_t * options); + +/// Finalize a rcl_service_t. +/** + * After calling, the node will no longer listen for requests for this service. + * (assuming this is the only service of this type in this node). + * + * After calling, calls to rcl_wait(), rcl_take_request(), and + * rcl_send_response() will fail when using this service. + * Additionally rcl_wait() will be interrupted if currently blocking. + * However, the given node handle is still valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] service handle to the service to be deinitialized + * \param[in] node a valid (not finalized) handle to the node used to create the service + * \return #RCL_RET_OK if service was deinitialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SERVICE_INVALID if the service is invalid, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_service_fini(rcl_service_t * service, rcl_node_t * node); + +/// Return the default service options in a rcl_service_options_t. +/** + * The defaults are: + * + * - qos = rmw_qos_profile_services_default + * - allocator = rcl_get_default_allocator() + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_service_options_t +rcl_service_get_default_options(void); + +/// Take a pending ROS request using a rcl service. +/** + * It is the job of the caller to ensure that the type of the ros_request + * argument and the type associate with the service, via the type + * support, match. + * Passing a different type to rcl_take produces undefined behavior and cannot + * be checked by this function and therefore no deliberate error will occur. + * + * TODO(jacquelinekay) blocking of take? + * TODO(jacquelinekay) pre-, during-, and post-conditions for message ownership? + * TODO(jacquelinekay) is rcl_take_request thread-safe? + * TODO(jacquelinekay) Should there be an rcl_request_id_t? + * + * The ros_request pointer should point to an already allocated ROS request message + * struct of the correct type, into which the taken ROS request will be copied + * if one is available. + * If taken is false after calling, then the ROS request will be unmodified. + * + * If allocation is required when taking the request, e.g. if space needs to + * be allocated for a dynamically sized array in the target message, then the + * allocator given in the service options is used. + * + * request_header is a pointer to pre-allocated a rmw struct containing + * meta-information about the request (e.g. the sequence number). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if required when filling the request, avoided for fixed sizes + * + * \param[in] service the handle to the service from which to take + * \param[inout] request_header ptr to the struct holding metadata about the request + * \param[inout] ros_request type-erased ptr to an allocated ROS request message + * \return #RCL_RET_OK if the request was taken, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SERVICE_INVALID if the service is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SERVICE_TAKE_FAILED if take failed but no error occurred + * in the middleware, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_request_with_info( + const rcl_service_t * service, + rmw_service_info_t * request_header, + void * ros_request); + +/// Backwards compatibility function to take a pending ROS request using a rcl service. +/** + * This version takes a request ID only. See rcl_take_request_with_info() for a full + * explanation of what this does. + * + * \param[in] service the handle to the service from which to take + * \param[inout] request_header ptr to the struct holding the id of the request + * \param[inout] ros_request type-erased ptr to an allocated ROS request message + * \return #RCL_RET_OK if the request was taken, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SERVICE_INVALID if the service is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SERVICE_TAKE_FAILED if take failed but no error occurred + * in the middleware, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_request( + const rcl_service_t * service, + rmw_request_id_t * request_header, + void * ros_request); + +/// Send a ROS response to a client using a service. +/** + * It is the job of the caller to ensure that the type of the `ros_response` + * parameter and the type associate with the service (via the type support) + * match. + * Passing a different type to send_response produces undefined behavior and + * cannot be checked by this function and therefore no deliberate error will + * occur. + * + * send_response() is an non-blocking call. + * + * The ROS response message given by the `ros_response` void pointer is always + * owned by the calling code, but should remain constant during + * rcl_send_response(). + * + * This function is thread safe so long as access to both the service and the + * `ros_response` is synchronized. + * That means that calling rcl_send_response() from multiple threads is + * allowed, but calling rcl_send_response() at the same time as non-thread safe + * service functions is not, e.g. calling rcl_send_response() and + * rcl_service_fini() concurrently is not allowed. + * Before calling rcl_send_response() the message can change and after calling + * rcl_send_response() the message can change, but it cannot be changed during + * the rcl_send_response() call. + * The same `ros_response`, however, can be passed to multiple calls of + * rcl_send_response() simultaneously, even if the services differ. + * The `ros_response` is unmodified by rcl_send_response(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | Yes + * [1] for unique pairs of services and responses, see above for more + * + * \param[in] service handle to the service which will make the response + * \param[inout] response_header ptr to the struct holding metadata about the request ID + * \param[in] ros_response type-erased pointer to the ROS response message + * \return #RCL_RET_OK if the response was sent successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SERVICE_INVALID if the service is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_send_response( + const rcl_service_t * service, + rmw_request_id_t * response_header, + void * ros_response); + +/// Get the topic name for the service. +/** + * This function returns the service's internal topic name string. + * This function can fail, and therefore return `NULL`, if the: + * - service is `NULL` + * - service is invalid (never called init, called fini, or invalid) + * + * The returned string is only valid as long as the service is valid. + * The value of the string may change if the topic name changes, and therefore + * copying the string is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service the pointer to the service + * \return name string if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const char * +rcl_service_get_service_name(const rcl_service_t * service); + +/// Return the rcl service options. +/** + * This function returns the service's internal options struct. + * This function can fail, and therefore return `NULL`, if the: + * - service is `NULL` + * - service is invalid (never called init, called fini, or invalid) + * + * The returned struct is only valid as long as the service is valid. + * The values in the struct may change if the service's options change, + * and therefore copying the struct is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service pointer to the service + * \return options struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rcl_service_options_t * +rcl_service_get_options(const rcl_service_t * service); + +/// Return the rmw service handle. +/** + * The handle returned is a pointer to the internally held rmw handle. + * This function can fail, and therefore return `NULL`, if the: + * - service is `NULL` + * - service is invalid (never called init, called fini, or invalid) + * + * The returned handle is made invalid if the service is finalized or if + * rcl_shutdown() is called. + * The returned handle is not guaranteed to be valid for the life time of the + * service as it may be finalized and recreated itself. + * Therefore it is recommended to get the handle from the service using + * this function each time it is needed and avoid use of the handle + * concurrently with functions that might change it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service pointer to the rcl service + * \return rmw service handle if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rmw_service_t * +rcl_service_get_rmw_handle(const rcl_service_t * service); + +/// Check that the service is valid. +/** + * The bool returned is `false` if `service` is invalid. + * The bool returned is `true` otherwise. + * In the case where `false` is to be returned, an error message is set. + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service pointer to the rcl service + * \return `true` if `service` is valid, otherwise `false` + */ +RCL_PUBLIC +bool +rcl_service_is_valid(const rcl_service_t * service); + +/// Get the actual qos settings of the service's request subscription. +/** + * Used to get the actual qos settings of the service's request subscription. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the service, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * The returned struct is only valid as long as the rcl_service_t is valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service pointer to the rcl service + * \return qos struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rmw_qos_profile_t * +rcl_service_request_subscription_get_actual_qos(const rcl_service_t * service); + +/// Get the actual qos settings of the service's response publisher. +/** + * Used to get the actual qos settings of the service's response publisher. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the service, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * The returned struct is only valid as long as the rcl_service_t is valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] service pointer to the rcl service + * \return qos struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rmw_qos_profile_t * +rcl_service_response_publisher_get_actual_qos(const rcl_service_t * service); + +/// Set the on new request callback function for the service. +/** + * This API sets the callback function to be called whenever the + * service is notified about a new request. + * + * \sa rmw_service_set_on_new_request_callback for details about this function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined + * + * \param[in] service The service on which to set the callback + * \param[in] callback The callback to be called when new requests arrive, may be NULL + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RCL_RET_OK` if callback was set to the listener, or + * \return `RCL_RET_INVALID_ARGUMENT` if `service` is NULL, or + * \return `RCL_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_service_set_on_new_request_callback( + const rcl_service_t * service, + rcl_event_callback_t callback, + const void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__SERVICE_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/subscription.h b/ThirdParty/ros/include/rcl/rcl/subscription.h new file mode 100644 index 000000000..28bbf1713 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/subscription.h @@ -0,0 +1,875 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__SUBSCRIPTION_H_ +#define RCL__SUBSCRIPTION_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +#include "rcl/event_callback.h" +#include "rcl/macros.h" +#include "rcl/node.h" +#include "rcl/visibility_control.h" + +#include "rmw/message_sequence.h" + +/// Internal rcl implementation struct. +typedef struct rcl_subscription_impl_s rcl_subscription_impl_t; + +/// Structure which encapsulates a ROS Subscription. +typedef struct rcl_subscription_s +{ + /// Pointer to the subscription implementation + rcl_subscription_impl_t * impl; +} rcl_subscription_t; + +/// Options available for a rcl subscription. +typedef struct rcl_subscription_options_s +{ + /// Middleware quality of service settings for the subscription. + rmw_qos_profile_t qos; + /// Custom allocator for the subscription, used for incidental allocations. + /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ + rcl_allocator_t allocator; + /// rmw specific subscription options, e.g. the rmw implementation specific payload. + rmw_subscription_options_t rmw_subscription_options; +} rcl_subscription_options_t; + +typedef struct rcl_subscription_content_filter_options_s +{ + rmw_subscription_content_filter_options_t rmw_subscription_content_filter_options; +} rcl_subscription_content_filter_options_t; + +/// Return a rcl_subscription_t struct with members set to `NULL`. +/** + * Should be called to get a null rcl_subscription_t before passing to + * rcl_subscription_init(). + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_subscription_t +rcl_get_zero_initialized_subscription(void); + +/// Initialize a ROS subscription. +/** + * After calling this function on a rcl_subscription_t, it can be used to take + * messages of the given type to the given topic using rcl_take(). + * + * The given rcl_node_t must be valid and the resulting rcl_subscription_t is + * only valid as long as the given rcl_node_t remains valid. + * + * The rosidl_message_type_support_t is obtained on a per .msg type basis. + * When the user defines a ROS message, code is generated which provides the + * required rosidl_message_type_support_t object. + * This object can be obtained using a language appropriate mechanism. + * \todo TODO(wjwwood) write these instructions once and link to it instead + * For C a macro can be used (for example `std_msgs/String`): + * + * ```c + * #include + * #include + * const rosidl_message_type_support_t * string_ts = + * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); + * ``` + * + * For C++ a template function is used: + * + * ```cpp + * #include + * #include + * using rosidl_typesupport_cpp::get_message_type_support_handle; + * const rosidl_message_type_support_t * string_ts = + * get_message_type_support_handle(); + * ``` + * + * The rosidl_message_type_support_t object contains message type specific + * information used to publish messages. + * + * The topic name must be a c string which follows the topic and service name + * format rules for unexpanded names, also known as non-fully qualified names: + * + * \see rcl_expand_topic_name + * + * The options struct allows the user to set the quality of service settings as + * well as a custom allocator which is used when (de)initializing the + * subscription to allocate space for incidental things, e.g. the topic + * name string. + * + * Expected usage (for C messages): + * + * ```c + * #include + * #include + * #include + * + * rcl_node_t node = rcl_get_zero_initialized_node(); + * rcl_node_options_t node_ops = rcl_node_get_default_options(); + * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); + * // ... error handling + * const rosidl_message_type_support_t * ts = + * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); + * rcl_subscription_t subscription = rcl_get_zero_initialized_subscription(); + * rcl_subscription_options_t subscription_ops = rcl_subscription_get_default_options(); + * ret = rcl_subscription_init(&subscription, &node, ts, "chatter", &subscription_ops); + * // ... error handling, and when finished deinitialization + * ret = rcl_subscription_fini(&subscription, &node); + * // ... error handling for rcl_subscription_fini() + * ret = rcl_node_fini(&node); + * // ... error handling for rcl_node_fini() + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] subscription preallocated subscription structure + * \param[in] node valid rcl node handle + * \param[in] type_support type support object for the topic's type + * \param[in] topic_name the name of the topic + * \param[in] options subscription options, including quality of service settings + * \return #RCL_RET_OK if subscription was initialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ALREADY_INIT if the subcription is already initialized, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_TOPIC_NAME_INVALID if the given topic name is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_init( + rcl_subscription_t * subscription, + const rcl_node_t * node, + const rosidl_message_type_support_t * type_support, + const char * topic_name, + const rcl_subscription_options_t * options +); + +/// Finalize a rcl_subscription_t. +/** + * After calling, the node will no longer be subscribed on this topic + * (assuming this is the only subscription on this topic in this node). + * + * After calling, calls to rcl_wait and rcl_take will fail when using this + * subscription. + * Additioanlly rcl_wait will be interrupted if currently blocking. + * However, the given node handle is still valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] subscription handle to the subscription to be deinitialized + * \param[in] node a valid (not finalized) handle to the node used to create the subscription + * \return #RCL_RET_OK if subscription was deinitialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_NODE_INVALID if the node is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_fini(rcl_subscription_t * subscription, rcl_node_t * node); + +/// Return the default subscription options in a rcl_subscription_options_t. +/** + * The defaults are: + * + * - qos = rmw_qos_profile_default + * - allocator = rcl_get_default_allocator() + * - rmw_subscription_options = rmw_get_default_subscription_options(); + * + * \return A structure containing the default options for a subscription. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_subscription_options_t +rcl_subscription_get_default_options(void); + +/// Reclaim resources held inside rcl_subscription_options_t structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] option The structure which its resources have to be deallocated. + * \return `RCL_RET_OK` if the memory was successfully freed, or + * \return `RCL_RET_INVALID_ARGUMENT` if option is NULL, or + * \return `RCL_RET_BAD_ALLOC` if deallocating memory fails. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_options_fini(rcl_subscription_options_t * option); + +/// Set the content filter options for the given subscription options. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] filter_expression The filter expression is similar to the WHERE part of an SQL clause. + * \param[in] expression_parameters_argc The maximum of expression parameters argc is 100. + * \param[in] expression_parameter_argv The expression parameters argv are the tokens placeholder + * ‘parameters’ (i.e., "%n" tokens begin from 0) in the filter_expression. + * + * It can be NULL if there is no "%n" tokens placeholder in filter_expression. + * \param[out] options The subscription options to be set. + * \return `RCL_RET_OK` if set options successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if arguments invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory fails. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_options_set_content_filter_options( + const char * filter_expression, + size_t expression_parameters_argc, + const char * expression_parameter_argv[], + rcl_subscription_options_t * options); + +/// Return the zero initialized subscription content filter options. +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_subscription_content_filter_options_t +rcl_get_zero_initialized_subscription_content_filter_options(void); + +/// Initialize the content filter options for the given subscription options. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] subscription the handle to the subscription. + * \param[in] filter_expression The filter expression is similar to the WHERE part of an SQL clause, + * use empty ("") can reset (or clear) the content filter setting of a subscription. + * \param[in] expression_parameters_argc The maximum of expression parameters argc is 100. + * \param[in] expression_parameter_argv The expression parameters argv are the tokens placeholder + * ‘parameters’ (i.e., "%n" tokens begin from 0) in the filter_expression. + * + * It can be NULL if there is no "%n" tokens placeholder in filter_expression. + * \param[out] options The subscription options to be set. + * \return `RCL_RET_OK` if set options successfully, or + * \return `RCL_RET_SUBSCRIPTION_INVALID` if subscription is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if arguments invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory fails. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_content_filter_options_init( + const rcl_subscription_t * subscription, + const char * filter_expression, + size_t expression_parameters_argc, + const char * expression_parameter_argv[], + rcl_subscription_content_filter_options_t * options); + +/// Set the content filter options for the given subscription options. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] subscription the handle to the subscription. + * \param[in] filter_expression The filter expression is similar to the WHERE part of an SQL clause, + * use empty ("") can reset (or clear) the content filter setting of a subscription. + * \param[in] expression_parameters_argc The maximum of expression parameters argc is 100. + * \param[in] expression_parameter_argv The expression parameters argv are the tokens placeholder + * ‘parameters’ (i.e., "%n" tokens begin from 0) in the filter_expression. + * + * It can be NULL if there is no "%n" tokens placeholder in filter_expression. + * \param[out] options The subscription options to be set. + * \return `RCL_RET_OK` if set options successfully, or + * \return `RCL_RET_SUBSCRIPTION_INVALID` if subscription is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if arguments invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory fails. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_content_filter_options_set( + const rcl_subscription_t * subscription, + const char * filter_expression, + size_t expression_parameters_argc, + const char * expression_parameter_argv[], + rcl_subscription_content_filter_options_t * options); + +/// Reclaim rcl_subscription_content_filter_options_t structure. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] subscription the handle to the subscription. + * \param[in] options The structure which its resources have to be deallocated. + * \return `RCL_RET_OK` if the memory was successfully freed, or + * \return `RCL_RET_SUBSCRIPTION_INVALID` if subscription is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if option is NULL, or + * if its allocator is invalid and the structure contains initialized memory. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_content_filter_options_fini( + const rcl_subscription_t * subscription, + rcl_subscription_content_filter_options_t * options); + +/// Check if the content filtered topic feature is enabled in the subscription. +/** + * Depending on the middleware and whether cft is enabled in the subscription. + * + * \return `true` if the content filtered topic of `subscription` is enabled, otherwise `false` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +bool +rcl_subscription_is_cft_enabled(const rcl_subscription_t * subscription); + +/// Set the filter expression and expression parameters for the subscription. +/** + * This function will set a filter expression and an array of expression parameters + * for the given subscription. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * + * \param[in] subscription The subscription to set content filter options. + * \param[in] options The rcl content filter options. + * \return `RCL_RET_OK` if the query was successful, or + * \return `RCL_RET_INVALID_ARGUMENT` if `subscription` is NULL, or + * \return `RCL_RET_INVALID_ARGUMENT` if `options` is NULL, or + * \return `RCL_RET_UNSUPPORTED` if the implementation does not support content filter topic, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_set_content_filter( + const rcl_subscription_t * subscription, + const rcl_subscription_content_filter_options_t * options +); + +/// Retrieve the filter expression of the subscription. +/** + * This function will return an filter expression by the given subscription. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * + * \param[in] subscription The subscription object to inspect. + * \param[out] options The rcl content filter options. + * It is up to the caller to finalize this options later on, using + * rcl_subscription_content_filter_options_fini(). + * \return `RCL_RET_OK` if the query was successful, or + * \return `RCL_RET_INVALID_ARGUMENT` if `subscription` is NULL, or + * \return `RCL_RET_INVALID_ARGUMENT` if `options` is NULL, or + * \return `RCL_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RCL_RET_UNSUPPORTED` if the implementation does not support content filter topic, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_get_content_filter( + const rcl_subscription_t * subscription, + rcl_subscription_content_filter_options_t * options +); + +/// Take a ROS message from a topic using a rcl subscription. +/** + * It is the job of the caller to ensure that the type of the ros_message + * argument and the type associated with the subscription, via the type + * support, match. + * Passing a different type to rcl_take produces undefined behavior and cannot + * be checked by this function and therefore no deliberate error will occur. + * + * TODO(wjwwood) blocking of take? + * TODO(wjwwood) pre-, during-, and post-conditions for message ownership? + * TODO(wjwwood) is rcl_take thread-safe? + * TODO(wjwwood) Should there be an rcl_message_info_t? + * + * The ros_message pointer should point to an already allocated ROS message + * struct of the correct type, into which the taken ROS message will be copied + * if one is available. + * If taken is false after calling, then the ROS message will be unmodified. + * + * The taken boolean may be false even if a wait set reports that the + * subscription was ready to be taken from in some cases, e.g. when the + * state of the subscription changes it may cause the wait set to wake up + * but subsequent takes to fail to take anything. + * + * If allocation is required when taking the message, e.g. if space needs to + * be allocated for a dynamically sized array in the target message, then the + * allocator given in the subscription options is used. + * + * The rmw_message_info struct contains meta information about this particular + * message instance, like what the GUID of the publisher which published it + * originally or whether or not the message received from within the same + * process. + * The message_info argument should be an already allocated rmw_message_info_t + * structure. + * Passing `NULL` for message_info will result in the argument being ignored. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if required when filling the message, avoided for fixed sizes + * + * \param[in] subscription the handle to the subscription from which to take + * \param[inout] ros_message type-erased ptr to a allocated ROS message + * \param[out] message_info rmw struct which contains meta-data for the message + * \param[in] allocation structure pointer used for memory preallocation (may be NULL) + * \return #RCL_RET_OK if the message was taken, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SUBSCRIPTION_TAKE_FAILED if take failed but no error + * occurred in the middleware, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take( + const rcl_subscription_t * subscription, + void * ros_message, + rmw_message_info_t * message_info, + rmw_subscription_allocation_t * allocation +); + +/// Take a sequence of messages from a topic using a rcl subscription. +/** + * In contrast to rcl_take(), this function can take multiple messages at + * the same time. + * It is the job of the caller to ensure that the type of the message_sequence + * argument and the type associated with the subscription, via the type + * support, match. + * + * The message_sequence pointer should point to an already allocated sequence + * of ROS messages of the correct type, into which the taken ROS messages will + * be copied if messages are available. + * The message_sequence `size` member will be set to the number of messages + * correctly taken. + * + * The rmw_message_info_sequence struct contains meta information about the + * corresponding message instance index. + * The message_info_sequence argument should be an already allocated + * rmw_message_info_sequence_t structure. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if storage in the serialized_message is insufficient + * + * \param[in] subscription the handle to the subscription from which to take. + * \param[in] count number of messages to attempt to take. + * \param[inout] message_sequence pointer to a (pre-allocated) message sequence. + * \param[inout] message_info_sequence pointer to a (pre-allocated) message info sequence. + * \param[in] allocation structure pointer used for memory preallocation (may be NULL) + * \return #RCL_RET_OK if one or more messages was taken, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SUBSCRIPTION_TAKE_FAILED if take failed but no error + * occurred in the middleware, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_sequence( + const rcl_subscription_t * subscription, + size_t count, + rmw_message_sequence_t * message_sequence, + rmw_message_info_sequence_t * message_info_sequence, + rmw_subscription_allocation_t * allocation +); + +/// Take a serialized raw message from a topic using a rcl subscription. +/** + * In contrast to rcl_take(), this function stores the taken message in + * its raw binary representation. + * It is the job of the caller to ensure that the type associate with the subscription + * matches, and can optionally be deserialized into its ROS message via, the correct + * type support. + * If the `serialized_message` parameter contains enough preallocated memory, the incoming + * message can be taken without any additional memory allocation. + * If not, the function will dynamically allocate enough memory for the message. + * Passing a different type to rcl_take produces undefined behavior and cannot + * be checked by this function and therefore no deliberate error will occur. + * + * Apart from the differences above, this function behaves like rcl_take(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if storage in the serialized_message is insufficient + * + * \param[in] subscription the handle to the subscription from which to take + * \param[inout] serialized_message pointer to a (pre-allocated) serialized message. + * \param[out] message_info rmw struct which contains meta-data for the message + * \param[in] allocation structure pointer used for memory preallocation (may be NULL) + * \return #RCL_RET_OK if the message was published, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SUBSCRIPTION_TAKE_FAILED if take failed but no error + * occurred in the middleware, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_serialized_message( + const rcl_subscription_t * subscription, + rcl_serialized_message_t * serialized_message, + rmw_message_info_t * message_info, + rmw_subscription_allocation_t * allocation); + +/// Take a loaned message from a topic using a rcl subscription. +/** + * Depending on the middleware, incoming messages can be loaned to the user's callback + * without further copying. + * The implicit contract here is that the middleware owns the memory allocated for this message. + * The user must not destroy the message, but rather has to return it with a call to + * \sa rcl_return_loaned_message to the middleware. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription the handle to the subscription from which to take + * \param[inout] loaned_message a pointer to the loaned messages. + * \param[out] message_info rmw struct which contains meta-data for the message. + * \param[in] allocation structure pointer used for memory preallocation (may be NULL) + * \return #RCL_RET_OK if the loaned message sequence was taken, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_SUBSCRIPTION_TAKE_FAILED if take failed but no error + * occurred in the middleware, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_take_loaned_message( + const rcl_subscription_t * subscription, + void ** loaned_message, + rmw_message_info_t * message_info, + rmw_subscription_allocation_t * allocation); + +/// Return a loaned message from a topic using a rcl subscription. +/** + * If a loaned message was previously obtained from the middleware with a call to + * \sa rcl_take_loaned_message, this message has to be returned to indicate to the middleware + * that the user no longer needs that memory. + * The user must not delete the message. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription the handle to the subscription from which to take + * \param[in] loaned_message a pointer to the loaned messages. + * \return #RCL_RET_OK if the message was published, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_UNSUPPORTED if the middleware does not support that feature, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_return_loaned_message_from_subscription( + const rcl_subscription_t * subscription, + void * loaned_message); + +/// Get the topic name for the subscription. +/** + * This function returns the subscription's internal topic name string. + * This function can fail, and therefore return `NULL`, if the: + * - subscription is `NULL` + * - subscription is invalid (never called init, called fini, or invalid) + * + * The returned string is only valid as long as the subscription is valid. + * The value of the string may change if the topic name changes, and therefore + * copying the string is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription the pointer to the subscription + * \return name string if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const char * +rcl_subscription_get_topic_name(const rcl_subscription_t * subscription); + +/// Return the rcl subscription options. +/** + * This function returns the subscription's internal options struct. + * This function can fail, and therefore return `NULL`, if the: + * - subscription is `NULL` + * - subscription is invalid (never called init, called fini, or invalid) + * + * The returned struct is only valid as long as the subscription is valid. + * The values in the struct may change if the subscription's options change, + * and therefore copying the struct is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription pointer to the subscription + * \return options struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rcl_subscription_options_t * +rcl_subscription_get_options(const rcl_subscription_t * subscription); + +/// Return the rmw subscription handle. +/** + * The handle returned is a pointer to the internally held rmw handle. + * This function can fail, and therefore return `NULL`, if the: + * - subscription is `NULL` + * - subscription is invalid (never called init, called fini, or invalid) + * + * The returned handle is made invalid if the subscription is finalized or if + * rcl_shutdown() is called. + * The returned handle is not guaranteed to be valid for the life time of the + * subscription as it may be finalized and recreated itself. + * Therefore it is recommended to get the handle from the subscription using + * this function each time it is needed and avoid use of the handle + * concurrently with functions that might change it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription pointer to the rcl subscription + * \return rmw subscription handle if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rmw_subscription_t * +rcl_subscription_get_rmw_handle(const rcl_subscription_t * subscription); + +/// Check that the subscription is valid. +/** + * The bool returned is `false` if `subscription` is invalid. + * The bool returned is `true` otherwise. + * In the case where `false` is to be returned, an error message is set. + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription pointer to the rcl subscription + * \return `true` if `subscription` is valid, otherwise `false` + */ +RCL_PUBLIC +bool +rcl_subscription_is_valid(const rcl_subscription_t * subscription); + +/// Get the number of publishers matched to a subscription. +/** + * Used to get the internal count of publishers matched to a subscription. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] only if the underlying rmw doesn't make use of this feature + * + * \param[in] subscription pointer to the rcl subscription + * \param[out] publisher_count number of matched publishers + * \return #RCL_RET_OK if the count was retrieved, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_SUBSCRIPTION_INVALID if the subscription is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rmw_ret_t +rcl_subscription_get_publisher_count( + const rcl_subscription_t * subscription, + size_t * publisher_count); + +/// Get the actual qos settings of the subscription. +/** + * Used to get the actual qos settings of the subscription. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the subscription, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * The returned struct is only valid as long as the rcl_subscription_t is valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] subscription pointer to the rcl subscription + * \return qos struct if successful, otherwise `NULL` + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const rmw_qos_profile_t * +rcl_subscription_get_actual_qos(const rcl_subscription_t * subscription); + +/// Check if subscription instance can loan messages. +/** + * Depending on the middleware and the message type, this will return true if the middleware + * can allocate a ROS message instance. + * + * \param[in] subscription The subscription instance to check for the ability to loan messages + * \return `true` if the subscription instance can loan messages, `false` otherwise. + */ +RCL_PUBLIC +bool +rcl_subscription_can_loan_messages(const rcl_subscription_t * subscription); + +/// Set the on new message callback function for the subscription. +/** + * This API sets the callback function to be called whenever the + * subscription is notified about a new message. + * + * \sa rmw_subscription_set_on_new_message_callback for details about this + * function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined + * + * \param[in] subscription The subscription on which to set the callback + * \param[in] callback The callback to be called when new messages arrive, may be NULL + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RCL_RET_OK` if successful, or + * \return `RCL_RET_INVALID_ARGUMENT` if `subscription` is NULL, or + * \return `RCL_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_subscription_set_on_new_message_callback( + const rcl_subscription_t * subscription, + rcl_event_callback_t callback, + const void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__SUBSCRIPTION_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/time.h b/ThirdParty/ros/include/rcl/rcl/time.h new file mode 100644 index 000000000..606a79f33 --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/time.h @@ -0,0 +1,708 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__TIME_H_ +#define RCL__TIME_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl/allocator.h" +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" +#include "rcutils/time.h" + +/// Convenience macro to convert seconds to nanoseconds. +#define RCL_S_TO_NS RCUTILS_S_TO_NS +/// Convenience macro to convert milliseconds to nanoseconds. +#define RCL_MS_TO_NS RCUTILS_MS_TO_NS +/// Convenience macro to convert microseconds to nanoseconds. +#define RCL_US_TO_NS RCUTILS_US_TO_NS + +/// Convenience macro to convert nanoseconds to seconds. +#define RCL_NS_TO_S RCUTILS_NS_TO_S +/// Convenience macro to convert nanoseconds to milliseconds. +#define RCL_NS_TO_MS RCUTILS_NS_TO_MS +/// Convenience macro to convert nanoseconds to microseconds. +#define RCL_NS_TO_US RCUTILS_NS_TO_US + +/// A single point in time, measured in nanoseconds since the Unix epoch. +typedef rcutils_time_point_value_t rcl_time_point_value_t; +/// A duration of time, measured in nanoseconds. +typedef rcutils_duration_value_t rcl_duration_value_t; + +/// Time source type, used to indicate the source of a time measurement. +/** + * RCL_ROS_TIME will report the latest value reported by a ROS time source, or + * if a ROS time source is not active it reports the same as RCL_SYSTEM_TIME. + * For more information about ROS time sources, refer to the design document: + * http://design.ros2.org/articles/clock_and_time.html + * + * RCL_SYSTEM_TIME reports the same value as the system clock. + * + * RCL_STEADY_TIME reports a value from a monotonically increasing clock. + */ +typedef enum rcl_clock_type_e +{ + /// Clock uninitialized + RCL_CLOCK_UNINITIALIZED = 0, + /// Use ROS time + RCL_ROS_TIME, + /// Use system time + RCL_SYSTEM_TIME, + /// Use a steady clock time + RCL_STEADY_TIME +} rcl_clock_type_t; + +/// A duration of time, measured in nanoseconds and its source. +typedef struct rcl_duration_s +{ + /// Duration in nanoseconds and its source. + rcl_duration_value_t nanoseconds; +} rcl_duration_t; + +/// Enumeration to describe the type of time jump. +typedef enum rcl_clock_change_e +{ + /// The source before and after the jump is ROS_TIME. + RCL_ROS_TIME_NO_CHANGE = 1, + /// The source switched to ROS_TIME from SYSTEM_TIME. + RCL_ROS_TIME_ACTIVATED = 2, + /// The source switched to SYSTEM_TIME from ROS_TIME. + RCL_ROS_TIME_DEACTIVATED = 3, + /// The source before and after the jump is SYSTEM_TIME. + RCL_SYSTEM_TIME_NO_CHANGE = 4 +} rcl_clock_change_t; + +/// Struct to describe a jump in time. +typedef struct rcl_time_jump_s +{ + /// Indicate whether or not the source of time changed. + rcl_clock_change_t clock_change; + /// The new time minus the last time before the jump. + rcl_duration_t delta; +} rcl_time_jump_t; + +/// Signature of a time jump callback. +/// \param[in] time_jump A description of the jump in time. +/// \param[in] before_jump Every jump callback is called twice: once before the clock changes and +/// once after. This is true the first call and false the second. +/// \param[in] user_data A pointer given at callback registration which is passed to the callback. +typedef void (* rcl_jump_callback_t)( + const rcl_time_jump_t * time_jump, + bool before_jump, + void * user_data); + +/// Describe the prerequisites for calling a time jump callback. +typedef struct rcl_jump_threshold_s +{ + /// True to call callback when the clock type changes. + bool on_clock_change; + /// A positive duration indicating the minimum jump forwards to be considered exceeded, or zero + /// to disable. + rcl_duration_t min_forward; + /// A negative duration indicating the minimum jump backwards to be considered exceeded, or zero + /// to disable. + rcl_duration_t min_backward; +} rcl_jump_threshold_t; + +/// Struct to describe an added callback. +typedef struct rcl_jump_callback_info_s +{ + /// Callback to fucntion. + rcl_jump_callback_t callback; + /// Threshold to decide when to call the callback. + rcl_jump_threshold_t threshold; + /// Pointer passed to the callback. + void * user_data; +} rcl_jump_callback_info_t; + +/// Encapsulation of a time source. +typedef struct rcl_clock_s +{ + /// Clock type + rcl_clock_type_t type; + /// An array of added jump callbacks. + rcl_jump_callback_info_t * jump_callbacks; + /// Number of callbacks in jump_callbacks. + size_t num_jump_callbacks; + /// Pointer to get_now function + rcl_ret_t (* get_now)(void * data, rcl_time_point_value_t * now); + // void (*set_now) (rcl_time_point_value_t); + /// Clock storage + void * data; + /// Custom allocator used for internal allocations. + rcl_allocator_t allocator; +} rcl_clock_t; + +/// A single point in time, measured in nanoseconds, the reference point is based on the source. +typedef struct rcl_time_point_s +{ + /// Nanoseconds of the point in time + rcl_time_point_value_t nanoseconds; + /// Clock type of the point in time + rcl_clock_type_t clock_type; +} rcl_time_point_t; + +// typedef struct rcl_rate_t +// { +// rcl_time_point_value_t trigger_time; +// int64_t period; +// rcl_clock_type_t clock;; +// } rcl_rate_t; +// TODO(tfoote) integrate rate and timer implementations + +/// Check if the clock has valid values. +/** + * This function returns true if the time source appears to be valid. + * It will check that the type is not uninitialized, and that pointers + * are not invalid. + * Note that if data is uninitialized it may give a false positive. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] clock the handle to the clock which is being queried + * \return true if the source is believed to be valid, otherwise return false. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +bool +rcl_clock_valid(rcl_clock_t * clock); + +/// Initialize a clock based on the passed type. +/** + * This will allocate all necessary internal structures, and initialize variables. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes [1] + * Thread-Safe | No [2] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] If `clock_type` is #RCL_ROS_TIME + * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object. + * + * \param[in] clock_type the type identifying the time source to provide + * \param[in] clock the handle to the clock which is being initialized + * \param[in] allocator The allocator to use for allocations + * \return #RCL_RET_OK if the time source was successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_clock_init( + rcl_clock_type_t clock_type, rcl_clock_t * clock, + rcl_allocator_t * allocator); + +/// Finalize a clock. +/** + * This will deallocate all necessary internal structures, and clean up any variables. + * It can be combined with any of the init functions. + * + * Passing a clock with type #RCL_CLOCK_UNINITIALIZED will result in + * #RCL_RET_INVALID_ARGUMENT being returned. + * + * This function is not thread-safe with any other function operating on the same + * clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock the handle to the clock which is being finalized + * \return #RCL_RET_OK if the time source was successfully finalized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_clock_fini( + rcl_clock_t * clock); + +/// Initialize a clock as a #RCL_ROS_TIME time source. +/** + * This will allocate all necessary internal structures, and initialize variables. + * It is specifically setting up a #RCL_ROS_TIME time source. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object. + * + * \param[in] clock the handle to the clock which is being initialized + * \param[in] allocator The allocator to use for allocations + * \return #RCL_RET_OK if the time source was successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_ros_clock_init( + rcl_clock_t * clock, + rcl_allocator_t * allocator); + +/// Finalize a clock as a #RCL_ROS_TIME time source. +/** + * This will deallocate all necessary internal structures, and clean up any variables. + * It is specifically setting up a #RCL_ROS_TIME time source. It is expected + * to be paired with the init fuction. + * + * This function is not thread-safe with any other function operating on the same + * clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock the handle to the clock which is being initialized + * \return #RCL_RET_OK if the time source was successfully finalized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_ros_clock_fini( + rcl_clock_t * clock); + +/// Initialize a clock as a #RCL_STEADY_TIME time source. +/** + * This will allocate all necessary internal structures, and initialize variables. + * It is specifically setting up a #RCL_STEADY_TIME time source. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object. + * + * \param[in] clock the handle to the clock which is being initialized + * \param[in] allocator The allocator to use for allocations + * \return #RCL_RET_OK if the time source was successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_steady_clock_init( + rcl_clock_t * clock, + rcl_allocator_t * allocator); + +/// Finalize a clock as a #RCL_STEADY_TIME time source. +/** + * Finalize the clock as a #RCL_STEADY_TIME time source. + * + * This will deallocate all necessary internal structures, and clean up any variables. + * It is specifically setting up a steady time source. It is expected to be + * paired with the init fuction. + * + * This function is not thread-safe with any other function operating on the same + * clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock the handle to the clock which is being initialized + * \return #RCL_RET_OK if the time source was successfully finalized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_steady_clock_fini( + rcl_clock_t * clock); + +/// Initialize a clock as a #RCL_SYSTEM_TIME time source. +/** + * Initialize the clock as a #RCL_SYSTEM_TIME time source. + * + * This will allocate all necessary internal structures, and initialize variables. + * It is specifically setting up a system time source. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock the handle to the clock which is being initialized + * \param[in] allocator The allocator to use for allocations + * \return #RCL_RET_OK if the time source was successfully initialized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_system_clock_init( + rcl_clock_t * clock, + rcl_allocator_t * allocator); + +/// Finalize a clock as a #RCL_SYSTEM_TIME time source. +/** + * Finalize the clock as a #RCL_SYSTEM_TIME time source. + * + * This will deallocate all necessary internal structures, and clean up any variables. + * It is specifically setting up a system time source. It is expected to be paired with + * the init fuction. + * + * This function is not thread-safe with any function operating on the same clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock the handle to the clock which is being initialized. + * \return #RCL_RET_OK if the time source was successfully finalized, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_system_clock_fini( + rcl_clock_t * clock); + +/// Compute the difference between two time points +/** + * This function takes two time points and computes the duration between them. + * The two time points must be using the same time abstraction, and the + * resultant duration will also be of the same abstraction. + * + * The value will be computed as duration = finish - start. If start is after + * finish the duration will be negative. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] start The time point for the start of the duration. + * \param[in] finish The time point for the end of the duration. + * \param[out] delta The duration between the start and finish. + * \return #RCL_RET_OK if the difference was computed successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_difference_times( + const rcl_time_point_t * start, const rcl_time_point_t * finish, rcl_duration_t * delta); + +/// Fill the time point value with the current value of the associated clock. +/** + * This function will populate the data of the time_point_value object with the + * current value from it's associated time abstraction. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Yes [1] + * Lock-Free | Yes + * + * [1] If `clock` is of #RCL_ROS_TIME type. + * + * \param[in] clock The time source from which to set the value. + * \param[out] time_point_value The time_point value to populate. + * \return #RCL_RET_OK if the last call time was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_clock_get_now(rcl_clock_t * clock, rcl_time_point_value_t * time_point_value); + + +/// Enable the ROS time abstraction override. +/** + * This method will enable the ROS time abstraction override values, + * such that the time source will report the set value instead of falling + * back to system time. + * + * This function is not thread-safe with rcl_clock_add_jump_callback(), + * nor rcl_clock_remove_jump_callback() functions when used on the same + * clock object. + * + *
+ * Attribute | Adherence [1] + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [2] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Only applies to the function itself, as jump callbacks may not abide to it. + * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * + * \param[in] clock The clock to enable. + * \return #RCL_RET_OK if the time source was enabled successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_enable_ros_time_override(rcl_clock_t * clock); + +/// Disable the ROS time abstraction override. +/** + * This method will disable the #RCL_ROS_TIME time abstraction override values, + * such that the time source will report the system time even if a custom + * value has been set. + * + * This function is not thread-safe with rcl_clock_add_jump_callback(), + * nor rcl_clock_remove_jump_callback() functions when used on the same + * clock object. + * + *
+ * Attribute | Adherence [1] + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [2] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Only applies to the function itself, as jump callbacks may not abide to it. + * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * + * \param[in] clock The clock to disable. + * \return #RCL_RET_OK if the time source was disabled successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_disable_ros_time_override(rcl_clock_t * clock); + + +/// Check if the #RCL_ROS_TIME time source has the override enabled. +/** + * This will populate the is_enabled object to indicate if the + * time overide is enabled. If it is enabled, the set value will be returned. + * Otherwise this time source will return the equivalent to system time abstraction. + * + * This function is not thread-safe with rcl_enable_ros_time_override() nor + * rcl_disable_ros_time_override() functions when used on the same clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * + * \param[in] clock The clock to query. + * \param[out] is_enabled Whether the override is enabled.. + * \return #RCL_RET_OK if the time source was queried successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_is_enabled_ros_time_override( + rcl_clock_t * clock, bool * is_enabled); + +/// Set the current time for this #RCL_ROS_TIME time source. +/** + * This function will update the internal storage for the #RCL_ROS_TIME + * time source. + * If queried and override enabled the time source will return this value, + * otherwise it will return the system time. + * + * This function is not thread-safe with rcl_clock_add_jump_callback(), + * nor rcl_clock_remove_jump_callback() functions when used on the same + * clock object. + * + *
+ * Attribute | Adherence [1] + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No [2] + * Uses Atomics | Yes + * Lock-Free | Yes + * + * [1] Only applies to the function itself, as jump callbacks may not abide to it. + * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * + * \param[in] clock The clock to update. + * \param[in] time_value The new current time. + * \return #RCL_RET_OK if the time source was set successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_set_ros_time_override( + rcl_clock_t * clock, rcl_time_point_value_t time_value); + +/// Add a callback to be called when a time jump exceeds a threshold. +/** + * The callback is called twice when the threshold is exceeded: once before the clock is + * updated, and once after. + * The user_data pointer is passed to the callback as the last argument. + * A callback and user_data pair must be unique among the callbacks added to a clock. + * + * This function is not thread-safe with rcl_clock_remove_jump_callback(), + * rcl_enable_ros_time_override(), rcl_disable_ros_time_override() nor + * rcl_set_ros_time_override() functions when used on the same clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock A clock to add a jump callback to. + * \param[in] threshold Criteria indicating when to call the callback. + * \param[in] callback A callback to call. + * \param[in] user_data A pointer to be passed to the callback. + * \return #RCL_RET_OK if the callback was added successfully, or + * \return #RCL_RET_BAD_ALLOC if a memory allocation failed, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_clock_add_jump_callback( + rcl_clock_t * clock, rcl_jump_threshold_t threshold, rcl_jump_callback_t callback, + void * user_data); + +/// Remove a previously added time jump callback. +/** + * This function is not thread-safe with rcl_clock_add_jump_callback() + * rcl_enable_ros_time_override(), rcl_disable_ros_time_override() nor + * rcl_set_ros_time_override() functions when used on the same clock object. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No [1] + * Uses Atomics | No + * Lock-Free | Yes + * + * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. + * Thread-safety is also affected by that of the `allocator` object associated with the + * `clock` object. + * + * \param[in] clock The clock to remove a jump callback from. + * \param[in] callback The callback to call. + * \param[in] user_data A pointer to be passed to the callback. + * \return #RCL_RET_OK if the callback was added successfully, or + * \return #RCL_RET_BAD_ALLOC if a memory allocation failed, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR the callback was not found or an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_clock_remove_jump_callback( + rcl_clock_t * clock, rcl_jump_callback_t callback, void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__TIME_H_ diff --git a/ThirdParty/ros/include/rcl/timer.h b/ThirdParty/ros/include/rcl/rcl/timer.h similarity index 85% rename from ThirdParty/ros/include/rcl/timer.h rename to ThirdParty/ros/include/rcl/rcl/timer.h index ecc35f073..ec08acf0b 100644 --- a/ThirdParty/ros/include/rcl/timer.h +++ b/ThirdParty/ros/include/rcl/rcl/timer.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__TIMER_H_ #define RCL__TIMER_H_ @@ -30,14 +32,13 @@ extern "C" #include "rcl/types.h" #include "rmw/rmw.h" -struct rcl_clock_t; -struct rcl_timer_impl_t; +typedef struct rcl_timer_impl_s rcl_timer_impl_t; /// Structure which encapsulates a ROS Timer. -typedef struct rcl_timer_t +typedef struct rcl_timer_s { /// Private implementation pointer. - struct rcl_timer_impl_t * impl; + rcl_timer_impl_t * impl; } rcl_timer_t; /// User callback signature for timers. @@ -141,11 +142,11 @@ rcl_get_zero_initialized_timer(void); * \param[in] period the duration between calls to the callback in nanoseconds * \param[in] callback the user defined function to be called every period * \param[in] allocator the allocator to use for allocations - * \return `RCL_RET_OK` if the timer was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_INIT` if the timer was already initialized, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer was initialized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ALREADY_INIT if the timer was already initialized, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -181,8 +182,8 @@ rcl_timer_init( * [3] if `atomic_is_lock_free()` returns true for `atomic_bool` * * \param[inout] timer the handle to the timer to be finalized. - * \return `RCL_RET_OK` if the timer was finalized successfully, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer was finalized successfully, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -222,11 +223,11 @@ rcl_timer_fini(rcl_timer_t * timer); * [2] if `atomic_is_lock_free()` returns true for `atomic_int_least64_t` * * \param[inout] timer the handle to the timer to call - * \return `RCL_RET_OK` if the timer was called successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_TIMER_CANCELED` if the timer has been canceled, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer was called successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_TIMER_CANCELED if the timer has been canceled, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -249,10 +250,9 @@ rcl_timer_call(rcl_timer_t * timer); * * \param[in] timer the handle to the timer which is being queried * \param[out] clock the rcl_clock_t * in which the clock is stored - * \return `RCL_RET_OK` if the period was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the clock was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer is invalid. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -279,10 +279,10 @@ rcl_timer_clock(rcl_timer_t * timer, rcl_clock_t ** clock); * * \param[in] timer the handle to the timer which is being checked * \param[out] is_ready the bool used to store the result of the calculation - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the last call time was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -314,10 +314,11 @@ rcl_timer_is_ready(const rcl_timer_t * timer, bool * is_ready); * * \param[in] timer the handle to the timer that is being queried * \param[out] time_until_next_call the output variable for the result - * \return `RCL_RET_OK` if the timer until next call was successfully calculated, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer until next call was successfully calculated, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_TIMER_CANCELED if the timer is canceled, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -346,10 +347,10 @@ rcl_timer_get_time_until_next_call(const rcl_timer_t * timer, int64_t * time_unt * * \param[in] timer the handle to the timer which is being queried * \param[out] time_since_last_call the struct in which the time is stored - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the last call time was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -373,9 +374,10 @@ rcl_timer_get_time_since_last_call(const rcl_timer_t * timer, int64_t * time_sin * * \param[in] timer the handle to the timer which is being queried * \param[out] period the int64_t in which the period is stored - * \return `RCL_RET_OK` if the period was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the period was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -403,9 +405,10 @@ rcl_timer_get_period(const rcl_timer_t * timer, int64_t * period); * \param[in] timer the handle to the timer which is being modified * \param[out] new_period the int64_t to exchange into the timer * \param[out] old_period the int64_t in which the previous period is stored - * \return `RCL_RET_OK` if the period was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the period was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -480,10 +483,9 @@ rcl_timer_exchange_callback(rcl_timer_t * timer, const rcl_timer_callback_t new_ * [1] if `atomic_is_lock_free()` returns true for `atomic_int_least64_t` * * \param[inout] timer the timer to be canceled - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer was canceled successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer is invalid. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -509,9 +511,10 @@ rcl_timer_cancel(rcl_timer_t * timer); * * \param[in] timer the timer to be queried * \param[out] is_canceled storage for the is canceled bool - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the last call time was retrieved successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer->impl is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -534,10 +537,10 @@ rcl_timer_is_canceled(const rcl_timer_t * timer, bool * is_canceled); * [1] if `atomic_is_lock_free()` returns true for `atomic_int_least64_t` * * \param[inout] timer the timer to be reset - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_TIMER_INVALID` if the timer is invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK if the timer was reset successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_TIMER_INVALID if the timer is invalid, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rcl/types.h b/ThirdParty/ros/include/rcl/rcl/types.h new file mode 100644 index 000000000..15ef8b5ae --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/types.h @@ -0,0 +1,129 @@ +// Copyright 2014 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__TYPES_H_ +#define RCL__TYPES_H_ + +#include + +/// The type that holds an rcl return code. +typedef rmw_ret_t rcl_ret_t; + +/// Success return code. +#define RCL_RET_OK RMW_RET_OK +/// Unspecified error return code. +#define RCL_RET_ERROR RMW_RET_ERROR +/// Timeout occurred return code. +#define RCL_RET_TIMEOUT RMW_RET_TIMEOUT +/// Failed to allocate memory return code. +#define RCL_RET_BAD_ALLOC RMW_RET_BAD_ALLOC +/// Invalid argument return code. +#define RCL_RET_INVALID_ARGUMENT RMW_RET_INVALID_ARGUMENT +/// Unsupported return code. +#define RCL_RET_UNSUPPORTED RMW_RET_UNSUPPORTED + +// rcl specific ret codes start at 100 +/// rcl_init() already called return code. +#define RCL_RET_ALREADY_INIT 100 +/// rcl_init() not yet called return code. +#define RCL_RET_NOT_INIT 101 +/// Mismatched rmw identifier return code. +#define RCL_RET_MISMATCHED_RMW_ID 102 +/// Topic name does not pass validation. +#define RCL_RET_TOPIC_NAME_INVALID 103 +/// Service name (same as topic name) does not pass validation. +#define RCL_RET_SERVICE_NAME_INVALID 104 +/// Topic name substitution is unknown. +#define RCL_RET_UNKNOWN_SUBSTITUTION 105 +/// rcl_shutdown() already called return code. +#define RCL_RET_ALREADY_SHUTDOWN 106 + +// rcl node specific ret codes in 2XX +/// Invalid rcl_node_t given return code. +#define RCL_RET_NODE_INVALID 200 +/// Invalid node name return code. +#define RCL_RET_NODE_INVALID_NAME 201 +/// Invalid node namespace return code. +#define RCL_RET_NODE_INVALID_NAMESPACE 202 +/// Failed to find node name +#define RCL_RET_NODE_NAME_NON_EXISTENT 203 + +// rcl publisher specific ret codes in 3XX +/// Invalid rcl_publisher_t given return code. +#define RCL_RET_PUBLISHER_INVALID 300 + +// rcl subscription specific ret codes in 4XX +/// Invalid rcl_subscription_t given return code. +#define RCL_RET_SUBSCRIPTION_INVALID 400 +/// Failed to take a message from the subscription return code. +#define RCL_RET_SUBSCRIPTION_TAKE_FAILED 401 + +// rcl service client specific ret codes in 5XX +/// Invalid rcl_client_t given return code. +#define RCL_RET_CLIENT_INVALID 500 +/// Failed to take a response from the client return code. +#define RCL_RET_CLIENT_TAKE_FAILED 501 + +// rcl service server specific ret codes in 6XX +/// Invalid rcl_service_t given return code. +#define RCL_RET_SERVICE_INVALID 600 +/// Failed to take a request from the service return code. +#define RCL_RET_SERVICE_TAKE_FAILED 601 + +// rcl guard condition specific ret codes in 7XX + +// rcl timer specific ret codes in 8XX +/// Invalid rcl_timer_t given return code. +#define RCL_RET_TIMER_INVALID 800 +/// Given timer was canceled return code. +#define RCL_RET_TIMER_CANCELED 801 + +// rcl wait and wait set specific ret codes in 9XX +/// Invalid rcl_wait_set_t given return code. +#define RCL_RET_WAIT_SET_INVALID 900 +/// Given rcl_wait_set_t is empty return code. +#define RCL_RET_WAIT_SET_EMPTY 901 +/// Given rcl_wait_set_t is full return code. +#define RCL_RET_WAIT_SET_FULL 902 + +// rcl argument parsing specific ret codes in 1XXX +/// Argument is not a valid remap rule +#define RCL_RET_INVALID_REMAP_RULE 1001 +/// Expected one type of lexeme but got another +#define RCL_RET_WRONG_LEXEME 1002 +/// Found invalid ros argument while parsing +#define RCL_RET_INVALID_ROS_ARGS 1003 +/// Argument is not a valid parameter rule +#define RCL_RET_INVALID_PARAM_RULE 1010 +/// Argument is not a valid log level rule +#define RCL_RET_INVALID_LOG_LEVEL_RULE 1020 + +// rcl event specific ret codes in 20XX +/// Invalid rcl_event_t given return code. +#define RCL_RET_EVENT_INVALID 2000 +/// Failed to take an event from the event handle +#define RCL_RET_EVENT_TAKE_FAILED 2001 + +/// rcl_lifecycle state register ret codes in 30XX +/// rcl_lifecycle state registered +#define RCL_RET_LIFECYCLE_STATE_REGISTERED 3000 +/// rcl_lifecycle state not registered +#define RCL_RET_LIFECYCLE_STATE_NOT_REGISTERED 3001 + +/// typedef for rmw_serialized_message_t; +typedef rmw_serialized_message_t rcl_serialized_message_t; + +#endif // RCL__TYPES_H_ diff --git a/ThirdParty/ros/include/rcl/rcl/validate_enclave_name.h b/ThirdParty/ros/include/rcl/rcl/validate_enclave_name.h new file mode 100644 index 000000000..d6c44de5a --- /dev/null +++ b/ThirdParty/ros/include/rcl/rcl/validate_enclave_name.h @@ -0,0 +1,120 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// @file + +#ifndef RCL__VALIDATE_ENCLAVE_NAME_H_ +#define RCL__VALIDATE_ENCLAVE_NAME_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rmw/validate_namespace.h" +#include "rmw/validate_node_name.h" + +#include "rcl/macros.h" +#include "rcl/types.h" +#include "rcl/visibility_control.h" + +/// The enclave name is valid. +#define RCL_ENCLAVE_NAME_VALID RMW_NAMESPACE_VALID + +/// The enclave name is invalid because it is an empty string. +#define RCL_ENCLAVE_NAME_INVALID_IS_EMPTY_STRING RMW_NAMESPACE_INVALID_IS_EMPTY_STRING + +/// The enclave name is invalid because it is not absolute. +#define RCL_ENCLAVE_NAME_INVALID_NOT_ABSOLUTE RMW_NAMESPACE_INVALID_NOT_ABSOLUTE + +/// The enclave name is invalid because it ends with a forward slash. +#define RCL_ENCLAVE_NAME_INVALID_ENDS_WITH_FORWARD_SLASH \ + RMW_NAMESPACE_INVALID_ENDS_WITH_FORWARD_SLASH + +/// The enclave name is invalid because it has characters that are not allowed. +#define RCL_ENCLAVE_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS \ + RMW_NAMESPACE_INVALID_CONTAINS_UNALLOWED_CHARACTERS + +/// The enclave name is invalid because it contains repeated forward slashes. +#define RCL_ENCLAVE_NAME_INVALID_CONTAINS_REPEATED_FORWARD_SLASH \ + RMW_NAMESPACE_INVALID_CONTAINS_REPEATED_FORWARD_SLASH + +/// The enclave name is invalid because one of the tokens starts with a number. +#define RCL_ENCLAVE_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER \ + RMW_NAMESPACE_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER + +/// The enclave name is invalid because the name is too long. +#define RCL_ENCLAVE_NAME_INVALID_TOO_LONG RMW_NAMESPACE_INVALID_TOO_LONG + +/// The maximum length of an enclave name. +#define RCL_ENCLAVE_NAME_MAX_LENGTH RMW_NODE_NAME_MAX_NAME_LENGTH + +/// Determine if a given enclave name is valid. +/** + * The same rules as rmw_validate_namespace() are used. + * The only difference is in the maximum allowed length, which can be up to 255 characters. + * + * \param[in] enclave enclave to be validated + * \param[out] validation_result int in which the result of the check is stored + * \param[out] invalid_index index of the input string where an error occurred + * \return #RCL_RET_OK on successfully running the check, or + * \return #RCL_RET_INVALID_ARGUMENT on invalid parameters, or + * \return #RCL_RET_ERROR when an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_validate_enclave_name( + const char * enclave, + int * validation_result, + size_t * invalid_index); + +/// Deterimine if a given enclave name is valid. +/** + * This is an overload of rcl_validate_enclave_name() with an extra parameter + * for the length of enclave. + * + * \param[in] enclave enclave to be validated + * \param[in] enclave_length The number of characters in enclave + * \param[out] validation_result int in which the result of the check is stored + * \param[out] invalid_index index of the input string where an error occurred + * \return #RCL_RET_OK on successfully running the check, or + * \return #RCL_RET_INVALID_ARGUMENT on invalid parameters, or + * \return #RCL_RET_ERROR when an unspecified error occurs. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_validate_enclave_name_with_size( + const char * enclave, + size_t enclave_length, + int * validation_result, + size_t * invalid_index); + +/// Return a validation result description, or NULL if unknown or RCL_ENCLAVE_NAME_VALID. +/** + * \param[in] validation_result The validation result to get the string for + * \return A string description of the validation result if successful, or + * \return NULL if the validation result is invalid. + */ +RCL_PUBLIC +RCL_WARN_UNUSED +const char * +rcl_enclave_name_validation_result_string(int validation_result); + +#ifdef __cplusplus +} +#endif + +#endif // RCL__VALIDATE_ENCLAVE_NAME_H_ diff --git a/ThirdParty/ros/include/rcl/validate_topic_name.h b/ThirdParty/ros/include/rcl/rcl/validate_topic_name.h similarity index 77% rename from ThirdParty/ros/include/rcl/validate_topic_name.h rename to ThirdParty/ros/include/rcl/rcl/validate_topic_name.h index ed884ac1f..76696f212 100644 --- a/ThirdParty/ros/include/rcl/validate_topic_name.h +++ b/ThirdParty/ros/include/rcl/rcl/validate_topic_name.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__VALIDATE_TOPIC_NAME_H_ #define RCL__VALIDATE_TOPIC_NAME_H_ @@ -24,15 +26,34 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" +/// The topic name is valid. #define RCL_TOPIC_NAME_VALID 0 + +/// The topic name is invalid because it is an empty string. #define RCL_TOPIC_NAME_INVALID_IS_EMPTY_STRING 1 + +/// The topic name is invalid because it ends with a forward slash. #define RCL_TOPIC_NAME_INVALID_ENDS_WITH_FORWARD_SLASH 2 + +/// The topic name is invalid because it has characters that are not allowed. #define RCL_TOPIC_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS 3 + +/// The topic name is invalid because one of the tokens starts with a number. #define RCL_TOPIC_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER 4 + +/// The topic name is invalid because it has an unmatched curly brace. #define RCL_TOPIC_NAME_INVALID_UNMATCHED_CURLY_BRACE 5 + +/// The topic name is invalid because it has a misplaced tilde in it. #define RCL_TOPIC_NAME_INVALID_MISPLACED_TILDE 6 + +/// The topic name is invalid because a tilde is not directly followed by a forward slash. #define RCL_TOPIC_NAME_INVALID_TILDE_NOT_FOLLOWED_BY_FORWARD_SLASH 7 + +/// The topic name is invalid because one of the substitutions has characters that are not allowed. #define RCL_TOPIC_NAME_INVALID_SUBSTITUTION_CONTAINS_UNALLOWED_CHARACTERS 8 + +/// The topic name is invalid because one of the substitutions starts with a number. #define RCL_TOPIC_NAME_INVALID_SUBSTITUTION_STARTS_WITH_NUMBER 9 /// Validate a given topic name. @@ -82,9 +103,9 @@ extern "C" * \param[in] topic_name the topic name to be validated, must be null terminated * \param[out] validation_result the reason for validation failure, if any * \param[out] invalid_index index of violation if the input topic is invalid - * \return `RCL_RET_OK` if the topic name was expanded successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the topic name was expanded successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -101,8 +122,11 @@ rcl_validate_topic_name( * \param[in] topic_name_length The number of characters in topic_name. * \param[out] validation_result the reason for validation failure, if any * \param[out] invalid_index index of violation if the input topic is invalid + * \return #RCL_RET_OK if the topic name was expanded successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. * - * \sa rcl_validate_topic_name(const char *, int *, size_t *) + * \sa rcl_validate_topic_name() */ RCL_PUBLIC RCL_WARN_UNUSED @@ -114,6 +138,11 @@ rcl_validate_topic_name_with_size( size_t * invalid_index); /// Return a validation result description, or NULL if unknown or RCL_TOPIC_NAME_VALID. +/** + * \param[in] validation_result The validation result to get the string for + * \return A string description of the validation result if successful, or + * \return NULL if the validation result is invalid. + */ RCL_PUBLIC RCL_WARN_UNUSED const char * diff --git a/ThirdParty/ros/include/rcl/visibility_control.h b/ThirdParty/ros/include/rcl/rcl/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl/visibility_control.h rename to ThirdParty/ros/include/rcl/rcl/visibility_control.h diff --git a/ThirdParty/ros/include/rcl/wait.h b/ThirdParty/ros/include/rcl/rcl/wait.h similarity index 86% rename from ThirdParty/ros/include/rcl/wait.h rename to ThirdParty/ros/include/rcl/rcl/wait.h index f900d1107..60e21a291 100644 --- a/ThirdParty/ros/include/rcl/wait.h +++ b/ThirdParty/ros/include/rcl/rcl/wait.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// @file + #ifndef RCL__WAIT_H_ #define RCL__WAIT_H_ @@ -33,10 +35,10 @@ extern "C" #include "rcl/types.h" #include "rcl/visibility_control.h" -struct rcl_wait_set_impl_t; +typedef struct rcl_wait_set_impl_s rcl_wait_set_impl_t; /// Container for subscription's, guard condition's, etc to be waited on. -typedef struct rcl_wait_set_t +typedef struct rcl_wait_set_s { /// Storage for subscription pointers. const rcl_subscription_t ** subscriptions; @@ -63,7 +65,7 @@ typedef struct rcl_wait_set_t /// Number of events size_t size_of_events; /// Implementation specific storage. - struct rcl_wait_set_impl_t * impl; + rcl_wait_set_impl_t * impl; } rcl_wait_set_t; /// Return a rcl_wait_set_t struct with members set to `NULL`. @@ -118,13 +120,13 @@ rcl_get_zero_initialized_wait_set(void); * \param[in] number_of_events non-zero size of the events set * \param[in] context the context that the wait set should be associated with * \param[in] allocator the allocator to use when allocating space in the sets - * \return `RCL_RET_OK` if the wait set is initialized successfully, or - * \return `RCL_RET_ALREADY_INIT` if the wait set is not zero initialized, or - * \return `RCL_RET_NOT_INIT` if the given context is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is not destroyed properly, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the wait set is initialized successfully, or + * \return #RCL_RET_ALREADY_INIT if the wait set is not zero initialized, or + * \return #RCL_RET_NOT_INIT if the given context is invalid, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is not destroyed properly, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -161,10 +163,10 @@ rcl_wait_set_init( * Lock-Free | Yes * * \param[inout] wait_set the wait set struct to be finalized. - * \return `RCL_RET_OK` if the finalization was successful, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is not destroyed properly, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the finalization was successful, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is not destroyed properly, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -186,10 +188,10 @@ rcl_wait_set_fini(rcl_wait_set_t * wait_set); * * \param[in] wait_set the handle to the wait set * \param[out] allocator the rcl_allocator_t struct to which the result is copied - * \return `RCL_RET_OK` if the allocator was successfully retrieved, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if the allocator was successfully retrieved, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is invalid, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -216,11 +218,11 @@ rcl_wait_set_get_allocator(const rcl_wait_set_t * wait_set, rcl_allocator_t * al * \param[in] subscription the subscription to be added to the wait set * \param[out] index the index of the added subscription in the storage container. * This parameter is optional and can be set to `NULL` to be ignored. - * \return `RCL_RET_OK` if added successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is zero initialized, or - * \return `RCL_RET_WAIT_SET_FULL` if the subscription set is full, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if added successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is zero initialized, or + * \return #RCL_RET_WAIT_SET_FULL if the subscription set is full, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -248,10 +250,10 @@ rcl_wait_set_add_subscription( * Lock-Free | Yes * * \param[inout] wait_set struct to have its entities cleared - * \return `RCL_RET_OK` if cleared successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is zero initialized, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if cleared successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is zero initialized, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -291,10 +293,10 @@ rcl_wait_set_clear(rcl_wait_set_t * wait_set); * \param[in] clients_size a size for the new clients set * \param[in] services_size a size for the new services set * \param[in] events_size a size for the new events set - * \return `RCL_RET_OK` if resized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. + * \return #RCL_RET_OK if resized successfully, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_BAD_ALLOC if allocating memory failed, or + * \return #RCL_RET_ERROR if an unspecified error occurs. */ RCL_PUBLIC RCL_WARN_UNUSED @@ -458,12 +460,12 @@ rcl_wait_set_add_event( * * \param[inout] wait_set the set of things to be waited on and to be pruned if not ready * \param[in] timeout the duration to wait for the wait set to be ready, in nanoseconds - * \return `RCL_RET_OK` something in the wait set became ready, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_WAIT_SET_INVALID` if the wait set is zero initialized, or - * \return `RCL_RET_WAIT_SET_EMPTY` if the wait set contains no items, or - * \return `RCL_RET_TIMEOUT` if the timeout expired before something was ready, or - * \return `RCL_RET_ERROR` an unspecified error occur. + * \return #RCL_RET_OK something in the wait set became ready, or + * \return #RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCL_RET_WAIT_SET_INVALID if the wait set is zero initialized, or + * \return #RCL_RET_WAIT_SET_EMPTY if the wait set contains no items, or + * \return #RCL_RET_TIMEOUT if the timeout expired before something was ready, or + * \return #RCL_RET_ERROR an unspecified error occur. */ RCL_PUBLIC RCL_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcl/rmw_implementation_identifier_check.h b/ThirdParty/ros/include/rcl/rmw_implementation_identifier_check.h deleted file mode 100644 index 2a1ecd35a..000000000 --- a/ThirdParty/ros/include/rcl/rmw_implementation_identifier_check.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ -#define RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/visibility_control.h" - -#define RMW_IMPLEMENTATION_ENV_VAR_NAME "RMW_IMPLEMENTATION" -#define RCL_ASSERT_RMW_ID_MATCHES_ENV_VAR_NAME "RCL_ASSERT_RMW_ID_MATCHES" - -RCL_PUBLIC -rcl_ret_t rcl_rmw_implementation_identifier_check(void); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__RMW_IMPLEMENTATION_IDENTIFIER_CHECK_H_ diff --git a/ThirdParty/ros/include/rcl/security.h b/ThirdParty/ros/include/rcl/security.h deleted file mode 100644 index b21bc3f01..000000000 --- a/ThirdParty/ros/include/rcl/security.h +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2018-2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__SECURITY_H_ -#define RCL__SECURITY_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcl/allocator.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" -#include "rmw/security_options.h" - -#ifndef ROS_SECURITY_ENCLAVE_OVERRIDE -# define ROS_SECURITY_ENCLAVE_OVERRIDE "ROS_SECURITY_ENCLAVE_OVERRIDE" -#endif - -#ifndef ROS_SECURITY_KEYSTORE_VAR_NAME -# define ROS_SECURITY_KEYSTORE_VAR_NAME "ROS_SECURITY_KEYSTORE" -#endif - -#ifndef ROS_SECURITY_STRATEGY_VAR_NAME -# define ROS_SECURITY_STRATEGY_VAR_NAME "ROS_SECURITY_STRATEGY" -#endif - -#ifndef ROS_SECURITY_ENABLE_VAR_NAME -# define ROS_SECURITY_ENABLE_VAR_NAME "ROS_SECURITY_ENABLE" -#endif - -/// Initialize security options from values in the environment variables and given names. -/** - * Initialize the given security options based on the environment. - * For more details: - * \sa rcl_security_enabled - * \sa rcl_get_enforcement_policy - * \sa rcl_get_secure_root - * - * \param[in] name name used to find the securiy root path. - * \param[in] allocator used to do allocations. - * \param[out] security_options security options that will be configured according to - * the environment. - * \return `RCL_RET_OK` If the security options are returned properly, or - * \returns RCL_RET_INVALID_ARGUMENT if an argument is not valid, or - * \returns RCL_RET_ERROR if an unexpected error happened - */ -RCL_PUBLIC -rcl_ret_t -rcl_get_security_options_from_environment( - const char * name, - const rcutils_allocator_t * allocator, - rmw_security_options_t * security_options); - -/// Check if security has to be used, according to the environment. -/** - * If `ROS_SECURITY_ENABLE` environment variable is set to "true", `use_security` will be set to - * true. - * - * \param[out] use_security Must not be NULL. - * \returns RCL_RET_INVALID_ARGUMENT if an argument is not valid, or - * \returns RCL_RET_ERROR if an unexpected error happened, or - * \returns RCL_RET_OK. - */ -RCL_PUBLIC -rcl_ret_t -rcl_security_enabled(bool * use_security); - -/// Get security enforcement policy from the environment. -/** - * Sets `policy` based on the value of `ROS_SECURITY_STRATEGY` environment variable. - * If `ROS_SECURITY_STRATEGY` is "Enforce", `policy` will be `RMW_SECURITY_ENFORCEMENT_ENFORCE`. - * If not, `policy` will be `RMW_SECURITY_ENFORCEMENT_PERMISSIVE`. - * - * \param[out] policy Must not be NULL. - * \returns RCL_RET_INVALID_ARGUMENT if an argument is not valid, or - * \returns RCL_RET_ERROR if an unexpected error happened, or - * \returns RCL_RET_OK. - */ -RCL_PUBLIC -rcl_ret_t -rcl_get_enforcement_policy(rmw_security_enforcement_policy_t * policy); - -/// Return the secure root given a enclave name. -/** - * Return the security directory associated with the enclave name. - * - * The value of the environment variable `ROS_SECURITY_KEYSTORE` is used as a root. - * The specific directory to be used, is found from that root using the `name` passed. - * E.g. for a context named "/a/b/c" and root "/r", the secure root path will be - * "/r/a/b/c", where the delimiter "/" is native for target file system (e.g. "\\" for _WIN32). - * - * However, this expansion can be overridden by setting the secure enclave override environment - * (`ROS_SECURITY_ENCLAVE_OVERRIDE`) variable, allowing users to explicitly specify the exact enclave - * `name` to be utilized. - * Such an override is useful for applications where the enclave is non-deterministic - * before runtime, or when testing and using additional tools that may not otherwise be easily - * provisioned. - * - * \param[in] name validated name (a single token) - * \param[in] allocator the allocator to use for allocation - * \returns Machine specific (absolute) enclave directory path or NULL on failure. - * Returned pointer must be deallocated by the caller of this function - */ -RCL_PUBLIC -char * -rcl_get_secure_root(const char * name, const rcl_allocator_t * allocator); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__SECURITY_H_ diff --git a/ThirdParty/ros/include/rcl/service.h b/ThirdParty/ros/include/rcl/service.h deleted file mode 100644 index a73cb3802..000000000 --- a/ThirdParty/ros/include/rcl/service.h +++ /dev/null @@ -1,428 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__SERVICE_H_ -#define RCL__SERVICE_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" - -#include "rcl/macros.h" -#include "rcl/node.h" -#include "rcl/visibility_control.h" - -/// Internal rcl implementation struct. -struct rcl_service_impl_t; - -/// Structure which encapsulates a ROS Service. -typedef struct rcl_service_t -{ - /// Pointer to the service implementation - struct rcl_service_impl_t * impl; -} rcl_service_t; - -/// Options available for a rcl service. -typedef struct rcl_service_options_t -{ - /// Middleware quality of service settings for the service. - rmw_qos_profile_t qos; - /// Custom allocator for the service, used for incidental allocations. - /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ - rcl_allocator_t allocator; -} rcl_service_options_t; - -/// Return a rcl_service_t struct with members set to `NULL`. -/** - * Should be called to get a null rcl_service_t before passing to - * rcl_service_init(). - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_service_t -rcl_get_zero_initialized_service(void); - -/// Initialize a rcl service. -/** - * After calling this function on a rcl_service_t, it can be used to take - * requests of the given type to the given topic using rcl_take_request(). - * It can also send a response to a request using rcl_send_response(). - * - * The given rcl_node_t must be valid and the resulting rcl_service_t is - * only valid as long as the given rcl_node_t remains valid. - * - * The rosidl_service_type_support_t is obtained on a per .srv type basis. - * When the user defines a ROS service, code is generated which provides the - * required rosidl_service_type_support_t object. - * This object can be obtained using a language appropriate mechanism. - * \todo TODO(wjwwood) write these instructions once and link to it instead - * - * For C, a macro can be used (for example `example_interfaces/AddTwoInts`): - * - * ```c - * #include - * #include - * const rosidl_service_type_support_t * ts = - * ROSIDL_GET_SRV_TYPE_SUPPORT(example_interfaces, srv, AddTwoInts); - * ``` - * - * For C++, a template function is used: - * - * ```cpp - * #include - * #include - * using rosidl_typesupport_cpp::get_service_type_support_handle; - * const rosidl_service_type_support_t * ts = - * get_service_type_support_handle(); - * ``` - * - * The rosidl_service_type_support_t object contains service type specific - * information used to send or take requests and responses. - * - * The topic name must be a c string which follows the topic and service name - * format rules for unexpanded names, also known as non-fully qualified names: - * - * \see rcl_expand_topic_name - * - * The options struct allows the user to set the quality of service settings as - * well as a custom allocator which is used when initializing/finalizing the - * client to allocate space for incidentals, e.g. the service name string. - * - * Expected usage (for C services): - * - * ```c - * #include - * #include - * #include - * - * rcl_node_t node = rcl_get_zero_initialized_node(); - * rcl_node_options_t node_ops = rcl_node_get_default_options(); - * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); - * // ... error handling - * const rosidl_service_type_support_t * ts = - * ROSIDL_GET_SRV_TYPE_SUPPORT(example_interfaces, srv, AddTwoInts); - * rcl_service_t service = rcl_get_zero_initialized_service(); - * rcl_service_options_t service_ops = rcl_service_get_default_options(); - * ret = rcl_service_init(&service, &node, ts, "add_two_ints", &service_ops); - * // ... error handling, and on shutdown do finalization: - * ret = rcl_service_fini(&service, &node); - * // ... error handling for rcl_service_fini() - * ret = rcl_node_fini(&node); - * // ... error handling for rcl_node_fini() - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] service preallocated service structure - * \param[in] node valid rcl node handle - * \param[in] type_support type support object for the service's type - * \param[in] service_name the name of the service - * \param[in] options service options, including quality of service settings - * \return `RCL_RET_OK` if service was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_INIT` if the service is already initialized, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SERVICE_NAME_INVALID` if the given service name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_service_init( - rcl_service_t * service, - const rcl_node_t * node, - const rosidl_service_type_support_t * type_support, - const char * service_name, - const rcl_service_options_t * options); - -/// Finalize a rcl_service_t. -/** - * After calling, the node will no longer listen for requests for this service. - * (assuming this is the only service of this type in this node). - * - * After calling, calls to rcl_wait(), rcl_take_request(), and - * rcl_send_response() will fail when using this service. - * Additionally rcl_wait() will be interrupted if currently blocking. - * However, the given node handle is still valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] service handle to the service to be deinitialized - * \param[in] node a valid (not finalized) handle to the node used to create the service - * \return `RCL_RET_OK` if service was deinitialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SERVICE_INVALID` if the service is invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_service_fini(rcl_service_t * service, rcl_node_t * node); - -/// Return the default service options in a rcl_service_options_t. -/** - * The defaults are: - * - * - qos = rmw_qos_profile_services_default - * - allocator = rcl_get_default_allocator() - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_service_options_t -rcl_service_get_default_options(void); - -/// Take a pending ROS request using a rcl service. -/** - * It is the job of the caller to ensure that the type of the ros_request - * argument and the type associate with the service, via the type - * support, match. - * Passing a different type to rcl_take produces undefined behavior and cannot - * be checked by this function and therefore no deliberate error will occur. - * - * TODO(jacquelinekay) blocking of take? - * TODO(jacquelinekay) pre-, during-, and post-conditions for message ownership? - * TODO(jacquelinekay) is rcl_take_request thread-safe? - * TODO(jacquelinekay) Should there be an rcl_request_id_t? - * - * The ros_request pointer should point to an already allocated ROS request message - * struct of the correct type, into which the taken ROS request will be copied - * if one is available. - * If taken is false after calling, then the ROS request will be unmodified. - * - * If allocation is required when taking the request, e.g. if space needs to - * be allocated for a dynamically sized array in the target message, then the - * allocator given in the service options is used. - * - * request_header is a pointer to pre-allocated a rmw struct containing - * meta-information about the request (e.g. the sequence number). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if required when filling the request, avoided for fixed sizes - * - * \param[in] service the handle to the service from which to take - * \param[inout] request_header ptr to the struct holding metadata about the request - * \param[inout] ros_request type-erased ptr to an allocated ROS request message - * \return `RCL_RET_OK` if the request was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SERVICE_INVALID` if the service is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SERVICE_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_request_with_info( - const rcl_service_t * service, - rmw_service_info_t * request_header, - void * ros_request); - -/// backwards compatibility version that takes a request_id only -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_request( - const rcl_service_t * service, - rmw_request_id_t * request_header, - void * ros_request); - -/// Send a ROS response to a client using a service. -/** - * It is the job of the caller to ensure that the type of the `ros_response` - * parameter and the type associate with the service (via the type support) - * match. - * Passing a different type to send_response produces undefined behavior and - * cannot be checked by this function and therefore no deliberate error will - * occur. - * - * send_response() is an non-blocking call. - * - * The ROS response message given by the `ros_response` void pointer is always - * owned by the calling code, but should remain constant during - * rcl_send_response(). - * - * This function is thread safe so long as access to both the service and the - * `ros_response` is synchronized. - * That means that calling rcl_send_response() from multiple threads is - * allowed, but calling rcl_send_response() at the same time as non-thread safe - * service functions is not, e.g. calling rcl_send_response() and - * rcl_service_fini() concurrently is not allowed. - * Before calling rcl_send_response() the message can change and after calling - * rcl_send_response() the message can change, but it cannot be changed during - * the rcl_send_response() call. - * The same `ros_response`, however, can be passed to multiple calls of - * rcl_send_response() simultaneously, even if the services differ. - * The `ros_response` is unmodified by rcl_send_response(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes [1] - * Uses Atomics | No - * Lock-Free | Yes - * [1] for unique pairs of services and responses, see above for more - * - * \param[in] service handle to the service which will make the response - * \param[inout] response_header ptr to the struct holding metadata about the request ID - * \param[in] ros_response type-erased pointer to the ROS response message - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SERVICE_INVALID` if the service is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_send_response( - const rcl_service_t * service, - rmw_request_id_t * response_header, - void * ros_response); - -/// Get the topic name for the service. -/** - * This function returns the service's internal topic name string. - * This function can fail, and therefore return `NULL`, if the: - * - service is `NULL` - * - service is invalid (never called init, called fini, or invalid) - * - * The returned string is only valid as long as the service is valid. - * The value of the string may change if the topic name changes, and therefore - * copying the string is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] service the pointer to the service - * \return name string if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const char * -rcl_service_get_service_name(const rcl_service_t * service); - -/// Return the rcl service options. -/** - * This function returns the service's internal options struct. - * This function can fail, and therefore return `NULL`, if the: - * - service is `NULL` - * - service is invalid (never called init, called fini, or invalid) - * - * The returned struct is only valid as long as the service is valid. - * The values in the struct may change if the service's options change, - * and therefore copying the struct is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] service pointer to the service - * \return options struct if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const rcl_service_options_t * -rcl_service_get_options(const rcl_service_t * service); - -/// Return the rmw service handle. -/** - * The handle returned is a pointer to the internally held rmw handle. - * This function can fail, and therefore return `NULL`, if the: - * - service is `NULL` - * - service is invalid (never called init, called fini, or invalid) - * - * The returned handle is made invalid if the service is finalized or if - * rcl_shutdown() is called. - * The returned handle is not guaranteed to be valid for the life time of the - * service as it may be finalized and recreated itself. - * Therefore it is recommended to get the handle from the service using - * this function each time it is needed and avoid use of the handle - * concurrently with functions that might change it. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] service pointer to the rcl service - * \return rmw service handle if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rmw_service_t * -rcl_service_get_rmw_handle(const rcl_service_t * service); - -/// Check that the service is valid. -/** - * The bool returned is `false` if `service` is invalid. - * The bool returned is `true` otherwise. - * In the case where `false` is to be returned, an error message is set. - * This function cannot fail. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] service pointer to the rcl service - * \return `true` if `service` is valid, otherwise `false` - */ -RCL_PUBLIC -bool -rcl_service_is_valid(const rcl_service_t * service); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__SERVICE_H_ diff --git a/ThirdParty/ros/include/rcl/subscription.h b/ThirdParty/ros/include/rcl/subscription.h deleted file mode 100644 index e0d2dce5f..000000000 --- a/ThirdParty/ros/include/rcl/subscription.h +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__SUBSCRIPTION_H_ -#define RCL__SUBSCRIPTION_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rosidl_runtime_c/message_type_support_struct.h" - -#include "rcl/macros.h" -#include "rcl/node.h" -#include "rcl/visibility_control.h" - -#include "rmw/message_sequence.h" - -/// Internal rcl implementation struct. -struct rcl_subscription_impl_t; - -/// Structure which encapsulates a ROS Subscription. -typedef struct rcl_subscription_t -{ - /// Pointer to the subscription implementation - struct rcl_subscription_impl_t * impl; -} rcl_subscription_t; - -/// Options available for a rcl subscription. -typedef struct rcl_subscription_options_t -{ - /// Middleware quality of service settings for the subscription. - rmw_qos_profile_t qos; - /// Custom allocator for the subscription, used for incidental allocations. - /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ - rcl_allocator_t allocator; - /// rmw specific subscription options, e.g. the rmw implementation specific payload. - rmw_subscription_options_t rmw_subscription_options; -} rcl_subscription_options_t; - -/// Return a rcl_subscription_t struct with members set to `NULL`. -/** - * Should be called to get a null rcl_subscription_t before passing to - * rcl_subscription_init(). - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_subscription_t -rcl_get_zero_initialized_subscription(void); - -/// Initialize a ROS subscription. -/** - * After calling this function on a rcl_subscription_t, it can be used to take - * messages of the given type to the given topic using rcl_take(). - * - * The given rcl_node_t must be valid and the resulting rcl_subscription_t is - * only valid as long as the given rcl_node_t remains valid. - * - * The rosidl_message_type_support_t is obtained on a per .msg type basis. - * When the user defines a ROS message, code is generated which provides the - * required rosidl_message_type_support_t object. - * This object can be obtained using a language appropriate mechanism. - * \todo TODO(wjwwood) write these instructions once and link to it instead - * For C a macro can be used (for example `std_msgs/String`): - * - * ```c - * #include - * #include - * const rosidl_message_type_support_t * string_ts = - * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); - * ``` - * - * For C++ a template function is used: - * - * ```cpp - * #include - * #include - * using rosidl_typesupport_cpp::get_message_type_support_handle; - * const rosidl_message_type_support_t * string_ts = - * get_message_type_support_handle(); - * ``` - * - * The rosidl_message_type_support_t object contains message type specific - * information used to publish messages. - * - * The topic name must be a c string which follows the topic and service name - * format rules for unexpanded names, also known as non-fully qualified names: - * - * \see rcl_expand_topic_name - * - * The options struct allows the user to set the quality of service settings as - * well as a custom allocator which is used when (de)initializing the - * subscription to allocate space for incidental things, e.g. the topic - * name string. - * - * Expected usage (for C messages): - * - * ```c - * #include - * #include - * #include - * - * rcl_node_t node = rcl_get_zero_initialized_node(); - * rcl_node_options_t node_ops = rcl_node_get_default_options(); - * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); - * // ... error handling - * const rosidl_message_type_support_t * ts = - * ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, String); - * rcl_subscription_t subscription = rcl_get_zero_initialized_subscription(); - * rcl_subscription_options_t subscription_ops = rcl_subscription_get_default_options(); - * ret = rcl_subscription_init(&subscription, &node, ts, "chatter", &subscription_ops); - * // ... error handling, and when finished deinitialization - * ret = rcl_subscription_fini(&subscription, &node); - * // ... error handling for rcl_subscription_fini() - * ret = rcl_node_fini(&node); - * // ... error handling for rcl_node_fini() - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] subscription preallocated subscription structure - * \param[in] node valid rcl node handle - * \param[in] type_support type support object for the topic's type - * \param[in] topic_name the name of the topic - * \param[in] options subscription options, including quality of service settings - * \return `RCL_RET_OK` if subscription was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_INIT` if the subcription is already initialized, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_TOPIC_NAME_INVALID` if the given topic name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_subscription_init( - rcl_subscription_t * subscription, - const rcl_node_t * node, - const rosidl_message_type_support_t * type_support, - const char * topic_name, - const rcl_subscription_options_t * options -); - -/// Finalize a rcl_subscription_t. -/** - * After calling, the node will no longer be subscribed on this topic - * (assuming this is the only subscription on this topic in this node). - * - * After calling, calls to rcl_wait and rcl_take will fail when using this - * subscription. - * Additioanlly rcl_wait will be interrupted if currently blocking. - * However, the given node handle is still valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] subscription handle to the subscription to be deinitialized - * \param[in] node a valid (not finalized) handle to the node used to create the subscription - * \return `RCL_RET_OK` if subscription was deinitialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_subscription_fini(rcl_subscription_t * subscription, rcl_node_t * node); - -/// Return the default subscription options in a rcl_subscription_options_t. -/** - * The defaults are: - * - * - qos = rmw_qos_profile_default - * - allocator = rcl_get_default_allocator() - * - rmw_subscription_options = rmw_get_default_subscription_options(); - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_subscription_options_t -rcl_subscription_get_default_options(void); - -/// Take a ROS message from a topic using a rcl subscription. -/** - * It is the job of the caller to ensure that the type of the ros_message - * argument and the type associated with the subscription, via the type - * support, match. - * Passing a different type to rcl_take produces undefined behavior and cannot - * be checked by this function and therefore no deliberate error will occur. - * - * TODO(wjwwood) blocking of take? - * TODO(wjwwood) pre-, during-, and post-conditions for message ownership? - * TODO(wjwwood) is rcl_take thread-safe? - * TODO(wjwwood) Should there be an rcl_message_info_t? - * - * The ros_message pointer should point to an already allocated ROS message - * struct of the correct type, into which the taken ROS message will be copied - * if one is available. - * If taken is false after calling, then the ROS message will be unmodified. - * - * The taken boolean may be false even if a wait set reports that the - * subscription was ready to be taken from in some cases, e.g. when the - * state of the subscription changes it may cause the wait set to wake up - * but subsequent takes to fail to take anything. - * - * If allocation is required when taking the message, e.g. if space needs to - * be allocated for a dynamically sized array in the target message, then the - * allocator given in the subscription options is used. - * - * The rmw_message_info struct contains meta information about this particular - * message instance, like what the GUID of the publisher which published it - * originally or whether or not the message received from within the same - * process. - * The message_info argument should be an already allocated rmw_message_info_t - * structure. - * Passing `NULL` for message_info will result in the argument being ignored. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if required when filling the message, avoided for fixed sizes - * - * \param[in] subscription the handle to the subscription from which to take - * \param[inout] ros_message type-erased ptr to a allocated ROS message - * \param[out] message_info rmw struct which contains meta-data for the message - * \param[in] allocation structure pointer used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the message was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SUBSCRIPTION_TAKE_FAILED` if take failed but no error - * occurred in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take( - const rcl_subscription_t * subscription, - void * ros_message, - rmw_message_info_t * message_info, - rmw_subscription_allocation_t * allocation -); - -/// Take a sequence of messages from a topic using a rcl subscription. -/** - * In contrast to `rcl_take`, this function can take multiple messages at - * the same time. - * It is the job of the caller to ensure that the type of the message_sequence - * argument and the type associated with the subscription, via the type - * support, match. - * - * The message_sequence pointer should point to an already allocated sequence - * of ROS messages of the correct type, into which the taken ROS messages will - * be copied if messages are available. - * The message_sequence `size` member will be set to the number of messages - * correctly taken. - * - * The rmw_message_info_sequence struct contains meta information about the - * corresponding message instance index. - * The message_info_sequence argument should be an already allocated - * rmw_message_info_sequence_t structure. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if storage in the serialized_message is insufficient - * - * \param[in] subscription the handle to the subscription from which to take. - * \param[in] count number of messages to attempt to take. - * \param[inout] message_sequence pointer to a (pre-allocated) message sequence. - * \param[inout] message_info_sequence pointer to a (pre-allocated) message info sequence. - * \param[in] allocation structure pointer used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if one or more messages was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SUBSCRIPTION_TAKE_FAILED` if take failed but no error - * occurred in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_sequence( - const rcl_subscription_t * subscription, - size_t count, - rmw_message_sequence_t * message_sequence, - rmw_message_info_sequence_t * message_info_sequence, - rmw_subscription_allocation_t * allocation -); - -/// Take a serialized raw message from a topic using a rcl subscription. -/** - * In contrast to `rcl_take`, this function stores the taken message in - * its raw binary representation. - * It is the job of the caller to ensure that the type associate with the subscription - * matches, and can optionally be deserialized into its ROS message via, the correct - * type support. - * If the `serialized_message` parameter contains enough preallocated memory, the incoming - * message can be taken without any additional memory allocation. - * If not, the function will dynamically allocate enough memory for the message. - * Passing a different type to rcl_take produces undefined behavior and cannot - * be checked by this function and therefore no deliberate error will occur. - * - * Apart from the differences above, this function behaves like `rcl_take`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if storage in the serialized_message is insufficient - * - * \param[in] subscription the handle to the subscription from which to take - * \param[inout] serialized_message pointer to a (pre-allocated) serialized message. - * \param[out] message_info rmw struct which contains meta-data for the message - * \param[in] allocation structure pointer used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the message was published, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SUBSCRIPTION_TAKE_FAILED` if take failed but no error - * occurred in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_serialized_message( - const rcl_subscription_t * subscription, - rcl_serialized_message_t * serialized_message, - rmw_message_info_t * message_info, - rmw_subscription_allocation_t * allocation); - -/// Take a loaned message from a topic using a rcl subscription. -/** - * Depending on the middleware, incoming messages can be loaned to the user's callback - * without further copying. - * The implicit contract here is that the middleware owns the memory allocated for this message. - * The user must not destroy the message, but rather has to return it with a call to - * \sa rcl_return_loaned_message to the middleware. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription the handle to the subscription from which to take - * \param[inout] loaned_message a pointer to the loaned messages. - * \param[out] message_info rmw struct which contains meta-data for the message. - * \param[in] allocation structure pointer used for memory preallocation (may be NULL) - * \return `RCL_RET_OK` if the loaned message sequence was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_SUBSCRIPTION_TAKE_FAILED` if take failed but no error - * occurred in the middleware, or - * \return `RCL_RET_UNIMPLEMENTED` if the middleware does not support that feature, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_take_loaned_message( - const rcl_subscription_t * subscription, - void ** loaned_message, - rmw_message_info_t * message_info, - rmw_subscription_allocation_t * allocation); - -/// Return a loaned message from a topic using a rcl subscription. -/** - * If a loaned message was previously obtained from the middleware with a call to - * \sa rcl_take_loaned_message, this message has to be returned to indicate to the middleware - * that the user no longer needs that memory. - * The user must not delete the message. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription the handle to the subscription from which to take - * \param[in] loaned_message a pointer to the loaned messages. - * \return `RCL_RET_OK` if the message was published, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_UNIMPLEMENTED` if the middleware does not support that feature, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_return_loaned_message_from_subscription( - const rcl_subscription_t * subscription, - void * loaned_message); - -/// Get the topic name for the subscription. -/** - * This function returns the subscription's internal topic name string. - * This function can fail, and therefore return `NULL`, if the: - * - subscription is `NULL` - * - subscription is invalid (never called init, called fini, or invalid) - * - * The returned string is only valid as long as the subscription is valid. - * The value of the string may change if the topic name changes, and therefore - * copying the string is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription the pointer to the subscription - * \return name string if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const char * -rcl_subscription_get_topic_name(const rcl_subscription_t * subscription); - -/// Return the rcl subscription options. -/** - * This function returns the subscription's internal options struct. - * This function can fail, and therefore return `NULL`, if the: - * - subscription is `NULL` - * - subscription is invalid (never called init, called fini, or invalid) - * - * The returned struct is only valid as long as the subscription is valid. - * The values in the struct may change if the subscription's options change, - * and therefore copying the struct is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription pointer to the subscription - * \return options struct if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const rcl_subscription_options_t * -rcl_subscription_get_options(const rcl_subscription_t * subscription); - -/// Return the rmw subscription handle. -/** - * The handle returned is a pointer to the internally held rmw handle. - * This function can fail, and therefore return `NULL`, if the: - * - subscription is `NULL` - * - subscription is invalid (never called init, called fini, or invalid) - * - * The returned handle is made invalid if the subscription is finalized or if - * rcl_shutdown() is called. - * The returned handle is not guaranteed to be valid for the life time of the - * subscription as it may be finalized and recreated itself. - * Therefore it is recommended to get the handle from the subscription using - * this function each time it is needed and avoid use of the handle - * concurrently with functions that might change it. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription pointer to the rcl subscription - * \return rmw subscription handle if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rmw_subscription_t * -rcl_subscription_get_rmw_handle(const rcl_subscription_t * subscription); - -/// Check that the subscription is valid. -/** - * The bool returned is `false` if `subscription` is invalid. - * The bool returned is `true` otherwise. - * In the case where `false` is to be returned, an error message is set. - * This function cannot fail. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription pointer to the rcl subscription - * \return `true` if `subscription` is valid, otherwise `false` - */ -RCL_PUBLIC -bool -rcl_subscription_is_valid(const rcl_subscription_t * subscription); - -/// Get the number of publishers matched to a subscription. -/** - * Used to get the internal count of publishers matched to a subscription. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | Maybe [1] - * Lock-Free | Maybe [1] - * [1] only if the underlying rmw doesn't make use of this feature - * - * \param[in] subscription pointer to the rcl subscription - * \param[out] publisher_count number of matched publishers - * \return `RCL_RET_OK` if the count was retrieved, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_SUBSCRIPTION_INVALID` if the subscription is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rmw_ret_t -rcl_subscription_get_publisher_count( - const rcl_subscription_t * subscription, - size_t * publisher_count); - -/// Get the actual qos settings of the subscription. -/** - * Used to get the actual qos settings of the subscription. - * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT - * can only be resolved after the creation of the subscription, and it - * depends on the underlying rmw implementation. - * If the underlying setting in use can't be represented in ROS terms, - * it will be set to RMW_*_UNKNOWN. - * The returned struct is only valid as long as the rcl_subscription_t is valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] subscription pointer to the rcl subscription - * \return qos struct if successful, otherwise `NULL` - */ -RCL_PUBLIC -RCL_WARN_UNUSED -const rmw_qos_profile_t * -rcl_subscription_get_actual_qos(const rcl_subscription_t * subscription); - -/// Check if subscription instance can loan messages. -/** - * Depending on the middleware and the message type, this will return true if the middleware - * can allocate a ROS message instance. - */ -RCL_PUBLIC -bool -rcl_subscription_can_loan_messages(const rcl_subscription_t * subscription); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__SUBSCRIPTION_H_ diff --git a/ThirdParty/ros/include/rcl/time.h b/ThirdParty/ros/include/rcl/time.h deleted file mode 100644 index a7bf53864..000000000 --- a/ThirdParty/ros/include/rcl/time.h +++ /dev/null @@ -1,702 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__TIME_H_ -#define RCL__TIME_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl/allocator.h" -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" -#include "rcutils/time.h" - -/// Convenience macro to convert seconds to nanoseconds. -#define RCL_S_TO_NS RCUTILS_S_TO_NS -/// Convenience macro to convert milliseconds to nanoseconds. -#define RCL_MS_TO_NS RCUTILS_MS_TO_NS -/// Convenience macro to convert microseconds to nanoseconds. -#define RCL_US_TO_NS RCUTILS_US_TO_NS - -/// Convenience macro to convert nanoseconds to seconds. -#define RCL_NS_TO_S RCUTILS_NS_TO_S -/// Convenience macro to convert nanoseconds to milliseconds. -#define RCL_NS_TO_MS RCUTILS_NS_TO_MS -/// Convenience macro to convert nanoseconds to microseconds. -#define RCL_NS_TO_US RCUTILS_NS_TO_US - -/// A single point in time, measured in nanoseconds since the Unix epoch. -typedef rcutils_time_point_value_t rcl_time_point_value_t; -/// A duration of time, measured in nanoseconds. -typedef rcutils_duration_value_t rcl_duration_value_t; - -/// Time source type, used to indicate the source of a time measurement. -/** - * RCL_ROS_TIME will report the latest value reported by a ROS time source, or - * if a ROS time source is not active it reports the same as RCL_SYSTEM_TIME. - * For more information about ROS time sources, refer to the design document: - * http://design.ros2.org/articles/clock_and_time.html - * - * RCL_SYSTEM_TIME reports the same value as the system clock. - * - * RCL_STEADY_TIME reports a value from a monotonically increasing clock. - */ -typedef enum rcl_clock_type_t -{ - RCL_CLOCK_UNINITIALIZED = 0, - RCL_ROS_TIME, - RCL_SYSTEM_TIME, - RCL_STEADY_TIME -} rcl_clock_type_t; - -/// A duration of time, measured in nanoseconds and its source. -typedef struct rcl_duration_t -{ - /// Duration in nanoseconds and its source. - rcl_duration_value_t nanoseconds; -} rcl_duration_t; - -/// Enumeration to describe the type of time jump. -typedef enum rcl_clock_change_t -{ - /// The source before and after the jump is ROS_TIME. - RCL_ROS_TIME_NO_CHANGE = 1, - /// The source switched to ROS_TIME from SYSTEM_TIME. - RCL_ROS_TIME_ACTIVATED = 2, - /// The source switched to SYSTEM_TIME from ROS_TIME. - RCL_ROS_TIME_DEACTIVATED = 3, - /// The source before and after the jump is SYSTEM_TIME. - RCL_SYSTEM_TIME_NO_CHANGE = 4 -} rcl_clock_change_t; - -/// Struct to describe a jump in time. -typedef struct rcl_time_jump_t -{ - /// Indicate whether or not the source of time changed. - rcl_clock_change_t clock_change; - /// The new time minus the last time before the jump. - rcl_duration_t delta; -} rcl_time_jump_t; - -/// Signature of a time jump callback. -/// \param[in] time_jump A description of the jump in time. -/// \param[in] before_jump Every jump callback is called twice: once before the clock changes and -/// once after. This is true the first call and false the second. -/// \param[in] user_data A pointer given at callback registration which is passed to the callback. -typedef void (* rcl_jump_callback_t)( - const struct rcl_time_jump_t * time_jump, - bool before_jump, - void * user_data); - -/// Describe the prerequisites for calling a time jump callback. -typedef struct rcl_jump_threshold_t -{ - /// True to call callback when the clock type changes. - bool on_clock_change; - /// A positive duration indicating the minimum jump forwards to be considered exceeded, or zero - /// to disable. - rcl_duration_t min_forward; - /// A negative duration indicating the minimum jump backwards to be considered exceeded, or zero - /// to disable. - rcl_duration_t min_backward; -} rcl_jump_threshold_t; - -/// Struct to describe an added callback. -typedef struct rcl_jump_callback_info_t -{ - /// Callback to fucntion. - rcl_jump_callback_t callback; - /// Threshold to decide when to call the callback. - rcl_jump_threshold_t threshold; - /// Pointer passed to the callback. - void * user_data; -} rcl_jump_callback_info_t; - -/// Encapsulation of a time source. -typedef struct rcl_clock_t -{ - /// Clock type - enum rcl_clock_type_t type; - /// An array of added jump callbacks. - rcl_jump_callback_info_t * jump_callbacks; - /// Number of callbacks in jump_callbacks. - size_t num_jump_callbacks; - /// Pointer to get_now function - rcl_ret_t (* get_now)(void * data, rcl_time_point_value_t * now); - // void (*set_now) (rcl_time_point_value_t); - /// Clock storage - void * data; - /// Custom allocator used for internal allocations. - rcl_allocator_t allocator; -} rcl_clock_t; - -/// A single point in time, measured in nanoseconds, the reference point is based on the source. -typedef struct rcl_time_point_t -{ - /// Nanoseconds of the point in time - rcl_time_point_value_t nanoseconds; - /// Clock type of the point in time - rcl_clock_type_t clock_type; -} rcl_time_point_t; - -// typedef struct rcl_rate_t -// { -// rcl_time_point_value_t trigger_time; -// int64_t period; -// rcl_clock_type_t clock;; -// } rcl_rate_t; -// TODO(tfoote) integrate rate and timer implementations - -/// Check if the clock has valid values. -/** - * This function returns true if the time source appears to be valid. - * It will check that the type is not uninitialized, and that pointers - * are not invalid. - * Note that if data is uninitialized it may give a false positive. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] clock the handle to the clock which is being queried - * \return true if the source is believed to be valid, otherwise return false. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -bool -rcl_clock_valid(rcl_clock_t * clock); - -/// Initialize a clock based on the passed type. -/** - * This will allocate all necessary internal structures, and initialize variables. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes [1] - * Thread-Safe | No [2] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] If `clock_type` is `RCL_ROS_TIME` - * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object. - * - * \param[in] clock_type the type identifying the time source to provide - * \param[in] clock the handle to the clock which is being initialized - * \param[in] allocator The allocator to use for allocations - * \return `RCL_RET_OK` if the time source was successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_clock_init( - enum rcl_clock_type_t clock_type, rcl_clock_t * clock, - rcl_allocator_t * allocator); - -/// Finalize a clock. -/** - * This will deallocate all necessary internal structures, and clean up any variables. - * It can be combined with any of the init functions. - * - * Passing a clock with type RCL_CLOCK_UNINITIALIZED will result in - * RCL_RET_INVALID_ARGUMENT being returned. - * - * This function is not thread-safe with any other function operating on the same - * clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock the handle to the clock which is being finalized - * \return `RCL_RET_OK` if the time source was successfully finalized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_clock_fini( - rcl_clock_t * clock); - -/// Initialize a clock as a RCL_ROS_TIME time source. -/** - * This will allocate all necessary internal structures, and initialize variables. - * It is specifically setting up a RCL_ROS_TIME time source. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object. - * - * \param[in] clock the handle to the clock which is being initialized - * \param[in] allocator The allocator to use for allocations - * \return `RCL_RET_OK` if the time source was successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_ros_clock_init( - rcl_clock_t * clock, - rcl_allocator_t * allocator); - -/// Finalize a clock as a `RCL_ROS_TIME` time source. -/** - * This will deallocate all necessary internal structures, and clean up any variables. - * It is specifically setting up a `RCL_ROS_TIME` time source. It is expected - * to be paired with the init fuction. - * - * This function is not thread-safe with any other function operating on the same - * clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock the handle to the clock which is being initialized - * \return `RCL_RET_OK` if the time source was successfully finalized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_ros_clock_fini( - rcl_clock_t * clock); - -/// Initialize a clock as a `RCL_STEADY_TIME` time source. -/** - * This will allocate all necessary internal structures, and initialize variables. - * It is specifically setting up a `RCL_STEADY_TIME` time source. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object. - * - * \param[in] clock the handle to the clock which is being initialized - * \param[in] allocator The allocator to use for allocations - * \return `RCL_RET_OK` if the time source was successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_steady_clock_init( - rcl_clock_t * clock, - rcl_allocator_t * allocator); - -/// Finalize a clock as a `RCL_STEADY_TIME` time source. -/** - * Finalize the clock as a `RCL_STEADY_TIME` time source. - * - * This will deallocate all necessary internal structures, and clean up any variables. - * It is specifically setting up a steady time source. It is expected to be - * paired with the init fuction. - * - * This function is not thread-safe with any other function operating on the same - * clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock the handle to the clock which is being initialized - * \return `RCL_RET_OK` if the time source was successfully finalized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_steady_clock_fini( - rcl_clock_t * clock); - -/// Initialize a clock as a `RCL_SYSTEM_TIME` time source. -/** - * Initialize the clock as a `RCL_SYSTEM_TIME` time source. - * - * This will allocate all necessary internal structures, and initialize variables. - * It is specifically setting up a system time source. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock the handle to the clock which is being initialized - * \param[in] allocator The allocator to use for allocations - * \return `RCL_RET_OK` if the time source was successfully initialized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_system_clock_init( - rcl_clock_t * clock, - rcl_allocator_t * allocator); - -/// Finalize a clock as a `RCL_SYSTEM_TIME` time source. -/** - * Finalize the clock as a `RCL_SYSTEM_TIME` time source. - * - * This will deallocate all necessary internal structures, and clean up any variables. - * It is specifically setting up a system time source. It is expected to be paired with - * the init fuction. - * - * This function is not thread-safe with any function operating on the same clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock the handle to the clock which is being initialized. - * \return `RCL_RET_OK` if the time source was successfully finalized, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_system_clock_fini( - rcl_clock_t * clock); - -/// Compute the difference between two time points -/** - * This function takes two time points and computes the duration between them. - * The two time points must be using the same time abstraction, and the - * resultant duration will also be of the same abstraction. - * - * The value will be computed as duration = finish - start. If start is after - * finish the duration will be negative. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] start The time point for the start of the duration. - * \param[in] finish The time point for the end of the duration. - * \param[out] delta The duration between the start and finish. - * \return `RCL_RET_OK` if the difference was computed successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_difference_times( - rcl_time_point_t * start, rcl_time_point_t * finish, rcl_duration_t * delta); - -/// Fill the time point value with the current value of the associated clock. -/** - * This function will populate the data of the time_point_value object with the - * current value from it's associated time abstraction. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | Yes [1] - * Lock-Free | Yes - * - * [1] If `clock` is of `RCL_ROS_TIME` type. - * - * \param[in] clock The time source from which to set the value. - * \param[out] time_point_value The time_point value to populate. - * \return `RCL_RET_OK` if the last call time was retrieved successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_clock_get_now(rcl_clock_t * clock, rcl_time_point_value_t * time_point_value); - - -/// Enable the ROS time abstraction override. -/** - * This method will enable the ROS time abstraction override values, - * such that the time source will report the set value instead of falling - * back to system time. - * - * This function is not thread-safe with `rcl_clock_add_jump_callback`, - * nor `rcl_clock_remove_jump_callback` functions when used on the same - * clock object. - * - *
- * Attribute | Adherence [1] - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [2] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Only applies to the function itself, as jump callbacks may not abide to it. - * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * - * \param[in] clock The clock to enable. - * \return `RCL_RET_OK` if the time source was enabled successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_enable_ros_time_override(rcl_clock_t * clock); - -/// Disable the ROS time abstraction override. -/** - * This method will disable the `RCL_ROS_TIME` time abstraction override values, - * such that the time source will report the system time even if a custom - * value has been set. - * - * This function is not thread-safe with `rcl_clock_add_jump_callback`, - * nor `rcl_clock_remove_jump_callback` functions when used on the same - * clock object. - * - *
- * Attribute | Adherence [1] - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [2] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Only applies to the function itself, as jump callbacks may not abide to it. - * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * - * \param[in] clock The clock to disable. - * \return `RCL_RET_OK` if the time source was disabled successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_disable_ros_time_override(rcl_clock_t * clock); - - -/// Check if the `RCL_ROS_TIME` time source has the override enabled. -/** - * This will populate the is_enabled object to indicate if the - * time overide is enabled. If it is enabled, the set value will be returned. - * Otherwise this time source will return the equivalent to system time abstraction. - * - * This function is not thread-safe with `rcl_enable_ros_time_override` nor - * `rcl_disable_ros_time_override` functions when used on the same clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * - * \param[in] clock The clock to query. - * \param[out] is_enabled Whether the override is enabled.. - * \return `RCL_RET_OK` if the time source was queried successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_is_enabled_ros_time_override( - rcl_clock_t * clock, bool * is_enabled); - -/// Set the current time for this `RCL_ROS_TIME` time source. -/** - * This function will update the internal storage for the `RCL_ROS_TIME` - * time source. - * If queried and override enabled the time source will return this value, - * otherwise it will return the system time. - * - * This function is not thread-safe with `rcl_clock_add_jump_callback`, - * nor `rcl_clock_remove_jump_callback` functions when used on the same - * clock object. - * - *
- * Attribute | Adherence [1] - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No [2] - * Uses Atomics | Yes - * Lock-Free | Yes - * - * [1] Only applies to the function itself, as jump callbacks may not abide to it. - * [2] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * - * \param[in] clock The clock to update. - * \param[in] time_value The new current time. - * \return `RCL_RET_OK` if the time source was set successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occur. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_set_ros_time_override( - rcl_clock_t * clock, rcl_time_point_value_t time_value); - -/// Add a callback to be called when a time jump exceeds a threshold. -/** - * The callback is called twice when the threshold is exceeded: once before the clock is - * updated, and once after. - * The user_data pointer is passed to the callback as the last argument. - * A callback and user_data pair must be unique among the callbacks added to a clock. - * - * This function is not thread-safe with `rcl_clock_remove_jump_callback`, - * `rcl_enable_ros_time_override`, `rcl_disable_ros_time_override` nor - * `rcl_set_ros_time_override` functions when used on the same clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock A clock to add a jump callback to. - * \param[in] threshold Criteria indicating when to call the callback. - * \param[in] callback A callback to call. - * \param[in] user_data A pointer to be passed to the callback. - * \return `RCL_RET_OK` if the callback was added successfully, or - * \return `RCL_RET_BAD_ALLOC` if a memory allocation failed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_clock_add_jump_callback( - rcl_clock_t * clock, rcl_jump_threshold_t threshold, rcl_jump_callback_t callback, - void * user_data); - -/// Remove a previously added time jump callback. -/** - * This function is not thread-safe with `rcl_clock_add_jump_callback` - * `rcl_enable_ros_time_override`, `rcl_disable_ros_time_override` nor - * `rcl_set_ros_time_override` functions when used on the same clock object. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No [1] - * Uses Atomics | No - * Lock-Free | Yes - * - * [1] Function is reentrant, but concurrent calls on the same `clock` object are not safe. - * Thread-safety is also affected by that of the `allocator` object associated with the - * `clock` object. - * - * \param[in] clock The clock to remove a jump callback from. - * \param[in] callback The callback to call. - * \param[in] user_data A pointer to be passed to the callback. - * \return `RCL_RET_OK` if the callback was added successfully, or - * \return `RCL_RET_BAD_ALLOC` if a memory allocation failed, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` the callback was not found or an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_clock_remove_jump_callback( - rcl_clock_t * clock, rcl_jump_callback_t callback, void * user_data); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__TIME_H_ diff --git a/ThirdParty/ros/include/rcl/types.h b/ThirdParty/ros/include/rcl/types.h deleted file mode 100644 index f837a9c2a..000000000 --- a/ThirdParty/ros/include/rcl/types.h +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2014 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__TYPES_H_ -#define RCL__TYPES_H_ - -#include - -typedef rmw_ret_t rcl_ret_t; -/// Success return code. -#define RCL_RET_OK RMW_RET_OK -/// Unspecified error return code. -#define RCL_RET_ERROR RMW_RET_ERROR -/// Timeout occurred return code. -#define RCL_RET_TIMEOUT RMW_RET_TIMEOUT -/// Failed to allocate memory return code. -#define RCL_RET_BAD_ALLOC RMW_RET_BAD_ALLOC -/// Invalid argument return code. -#define RCL_RET_INVALID_ARGUMENT RMW_RET_INVALID_ARGUMENT -/// Unsupported return code. -#define RCL_RET_UNSUPPORTED RMW_RET_UNSUPPORTED - -// rcl specific ret codes start at 100 -/// rcl_init() already called return code. -#define RCL_RET_ALREADY_INIT 100 -/// rcl_init() not yet called return code. -#define RCL_RET_NOT_INIT 101 -/// Mismatched rmw identifier return code. -#define RCL_RET_MISMATCHED_RMW_ID 102 -/// Topic name does not pass validation. -#define RCL_RET_TOPIC_NAME_INVALID 103 -/// Service name (same as topic name) does not pass validation. -#define RCL_RET_SERVICE_NAME_INVALID 104 -/// Topic name substitution is unknown. -#define RCL_RET_UNKNOWN_SUBSTITUTION 105 -/// rcl_shutdown() already called return code. -#define RCL_RET_ALREADY_SHUTDOWN 106 - -// rcl node specific ret codes in 2XX -/// Invalid rcl_node_t given return code. -#define RCL_RET_NODE_INVALID 200 -#define RCL_RET_NODE_INVALID_NAME 201 -#define RCL_RET_NODE_INVALID_NAMESPACE 202 -/// Failed to find node name -#define RCL_RET_NODE_NAME_NON_EXISTENT 203 - -// rcl publisher specific ret codes in 3XX -/// Invalid rcl_publisher_t given return code. -#define RCL_RET_PUBLISHER_INVALID 300 - -// rcl subscription specific ret codes in 4XX -/// Invalid rcl_subscription_t given return code. -#define RCL_RET_SUBSCRIPTION_INVALID 400 -/// Failed to take a message from the subscription return code. -#define RCL_RET_SUBSCRIPTION_TAKE_FAILED 401 - -// rcl service client specific ret codes in 5XX -/// Invalid rcl_client_t given return code. -#define RCL_RET_CLIENT_INVALID 500 -/// Failed to take a response from the client return code. -#define RCL_RET_CLIENT_TAKE_FAILED 501 - -// rcl service server specific ret codes in 6XX -/// Invalid rcl_service_t given return code. -#define RCL_RET_SERVICE_INVALID 600 -/// Failed to take a request from the service return code. -#define RCL_RET_SERVICE_TAKE_FAILED 601 - -// rcl guard condition specific ret codes in 7XX - -// rcl timer specific ret codes in 8XX -/// Invalid rcl_timer_t given return code. -#define RCL_RET_TIMER_INVALID 800 -/// Given timer was canceled return code. -#define RCL_RET_TIMER_CANCELED 801 - -// rcl wait and wait set specific ret codes in 9XX -/// Invalid rcl_wait_set_t given return code. -#define RCL_RET_WAIT_SET_INVALID 900 -/// Given rcl_wait_set_t is empty return code. -#define RCL_RET_WAIT_SET_EMPTY 901 -/// Given rcl_wait_set_t is full return code. -#define RCL_RET_WAIT_SET_FULL 902 - -// rcl argument parsing specific ret codes in 1XXX -/// Argument is not a valid remap rule -#define RCL_RET_INVALID_REMAP_RULE 1001 -/// Expected one type of lexeme but got another -#define RCL_RET_WRONG_LEXEME 1002 -/// Found invalid ros argument while parsing -#define RCL_RET_INVALID_ROS_ARGS 1003 -/// Argument is not a valid parameter rule -#define RCL_RET_INVALID_PARAM_RULE 1010 -/// Argument is not a valid log level rule -#define RCL_RET_INVALID_LOG_LEVEL_RULE 1020 - -// rcl event specific ret codes in 20XX -/// Invalid rcl_event_t given return code. -#define RCL_RET_EVENT_INVALID 2000 -/// Failed to take an event from the event handle -#define RCL_RET_EVENT_TAKE_FAILED 2001 - -/// typedef for rmw_serialized_message_t; -typedef rmw_serialized_message_t rcl_serialized_message_t; - -#endif // RCL__TYPES_H_ diff --git a/ThirdParty/ros/include/rcl/validate_enclave_name.h b/ThirdParty/ros/include/rcl/validate_enclave_name.h deleted file mode 100644 index 7daee9bd7..000000000 --- a/ThirdParty/ros/include/rcl/validate_enclave_name.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL__VALIDATE_ENCLAVE_NAME_H_ -#define RCL__VALIDATE_ENCLAVE_NAME_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rmw/validate_namespace.h" -#include "rmw/validate_node_name.h" - -#include "rcl/macros.h" -#include "rcl/types.h" -#include "rcl/visibility_control.h" - -#define RCL_ENCLAVE_NAME_VALID RMW_NAMESPACE_VALID -#define RCL_ENCLAVE_NAME_INVALID_IS_EMPTY_STRING RMW_NAMESPACE_INVALID_IS_EMPTY_STRING -#define RCL_ENCLAVE_NAME_INVALID_NOT_ABSOLUTE RMW_NAMESPACE_INVALID_NOT_ABSOLUTE -#define RCL_ENCLAVE_NAME_INVALID_ENDS_WITH_FORWARD_SLASH \ - RMW_NAMESPACE_INVALID_ENDS_WITH_FORWARD_SLASH -#define RCL_ENCLAVE_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS \ - RMW_NAMESPACE_INVALID_CONTAINS_UNALLOWED_CHARACTERS -#define RCL_ENCLAVE_NAME_INVALID_CONTAINS_REPEATED_FORWARD_SLASH \ - RMW_NAMESPACE_INVALID_CONTAINS_REPEATED_FORWARD_SLASH -#define RCL_ENCLAVE_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER \ - RMW_NAMESPACE_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER -#define RCL_ENCLAVE_NAME_INVALID_TOO_LONG RMW_NAMESPACE_INVALID_TOO_LONG - -#define RCL_ENCLAVE_NAME_MAX_LENGTH RMW_NODE_NAME_MAX_NAME_LENGTH - -/// Determine if a given enclave name is valid. -/** - * The same rules as \ref rmw_validate_namespace are used. - * The only difference is in the maximum allowed length, which can be up to 255 characters. - * - * \param[in] enclave enclave to be validated - * \param[out] validation_result int in which the result of the check is stored - * \param[out] invalid_index index of the input string where an error occurred - * \returns `RMW_RET_OK` on successfully running the check, or - * \returns `RMW_RET_INVALID_ARGUMENT` on invalid parameters, or - * \returns `RMW_RET_ERROR` when an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_validate_enclave_name( - const char * enclave, - int * validation_result, - size_t * invalid_index); - -/// Deterimine if a given enclave name is valid. -/** - * This is an overload of \ref rcl_validate_enclave_name with an extra parameter - * for the length of enclave. - * - * \param[in] enclave_length The number of characters in enclave. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_validate_enclave_name_with_size( - const char * enclave, - size_t enclave_length, - int * validation_result, - size_t * invalid_index); - -/// Return a validation result description, or NULL if unknown or RCL_ENCLAVE_NAME_VALID. -RCL_PUBLIC -RCL_WARN_UNUSED -const char * -rcl_enclave_name_validation_result_string(int validation_result); - -#ifdef __cplusplus -} -#endif - -#endif // RCL__VALIDATE_ENCLAVE_NAME_H_ diff --git a/ThirdParty/ros/include/rcl_action/action_client.h b/ThirdParty/ros/include/rcl_action/action_client.h deleted file mode 100644 index 430d05e66..000000000 --- a/ThirdParty/ros/include/rcl_action/action_client.h +++ /dev/null @@ -1,748 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL_ACTION__ACTION_CLIENT_H_ -#define RCL_ACTION__ACTION_CLIENT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl_action/types.h" -#include "rcl_action/visibility_control.h" -#include "rcl/macros.h" -#include "rcl/node.h" - - -/// Internal action client implementation struct. -struct rcl_action_client_impl_t; - -/// Structure which encapsulates a ROS action client. -typedef struct rcl_action_client_t -{ - /// Pointer to the action client implementation - struct rcl_action_client_impl_t * impl; -} rcl_action_client_t; - -/// Options available for a rcl_action_client_t. -typedef struct rcl_action_client_options_t -{ - /// Middleware quality of service settings for the action client. - /// Goal service quality of service - rmw_qos_profile_t goal_service_qos; - /// Result service quality of service - rmw_qos_profile_t result_service_qos; - /// Cancel service quality of service - rmw_qos_profile_t cancel_service_qos; - /// Feedback topic quality of service - rmw_qos_profile_t feedback_topic_qos; - /// Status topic quality of service - rmw_qos_profile_t status_topic_qos; - /// Custom allocator for the action client, used for incidental allocations. - /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ - rcl_allocator_t allocator; -} rcl_action_client_options_t; - -/// Return a rcl_action_client_t struct with members set to `NULL`. -/** - * Should be called to get a null rcl_action_client_t before passing to - * rcl_action_client_init(). - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_client_t -rcl_action_get_zero_initialized_client(void); - -/// Initialize a rcl_action_client_t. -/** - * After calling this function on a rcl_action_client_t, it can be used to send - * goals of the given type to the given topic using rcl_action_send_goal_request(). - * If a goal request is sent to a (possibly remote) server and if the server - * sends a response, the client can access the response with - * rcl_take_goal_response() once the response is available. - * - * After a goal request has been accepted, the rcl_action_client_t associated with the - * goal can perform the following operations: - * - * - Send a request for the result with rcl_action_send_result_request(). - * If the server sends a response when the goal terminates, the result can be accessed - * with rcl_action_take_result_response(), once the response is available. - * - Send a cancel request for the goal with rcl_action_send_cancel_request(). - * If the server sends a response to a cancel request, the client can access the - * response with rcl_action_take_cancel_response() once the response is available. - * - Take feedback about the goal with rcl_action_take_feedback(). - * - * A rcl_action_client_t can be used to access the current status of all accepted goals - * communicated by the action server with rcl_action_take_status(). - * - * The given rcl_node_t must be valid and the resulting rcl_action_client_t is - * only valid as long as the given rcl_node_t remains valid. - * - * The rosidl_action_type_support_t is obtained on a per .action type basis. - * When the user defines a ROS action, code is generated which provides the - * required rosidl_action_type_support_t object. - * This object can be obtained using a language appropriate mechanism. - * - * \todo TODO(jacobperron) write these instructions once and link to it instead - * - * For C, a macro can be used (for example `example_interfaces/Fibonacci`): - * - * ```c - * #include - * #include - * const rosidl_action_type_support_t * ts = - * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); - * ``` - * - * For C++, a template function is used: - * - * ```cpp - * #include - * #include - * using rosidl_typesupport_cpp::get_action_type_support_handle; - * const rosidl_action_type_support_t * ts = - * get_action_type_support_handle(); - * ``` - * - * The rosidl_action_type_support_t object contains action type specific - * information used to send or take goals, results, and feedback. - * - * The topic name must be a c string that follows the topic and service name - * format rules for unexpanded names, also known as non-fully qualified names: - * - * \see rcl_expand_topic_name - * - * The options struct allows the user to set the quality of service settings as - * well as a custom allocator that is used when initializing/finalizing the - * client to allocate space for incidentals, e.g. the action client name string. - * - * Expected usage (for C action clients): - * - * ```c - * #include - * #include - * #include - * #include - * - * rcl_node_t node = rcl_get_zero_initialized_node(); - * rcl_node_options_t node_ops = rcl_node_get_default_options(); - * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); - * // ... error handling - * const rosidl_action_type_support_t * ts = - * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); - * rcl_action_client_t action_client = rcl_action_get_zero_initialized_client(); - * rcl_action_client_options_t action_client_ops = rcl_action_client_get_default_options(); - * ret = rcl_action_client_init(&action_client, &node, ts, "fibonacci", &action_client_ops); - * // ... error handling, and on shutdown do finalization: - * ret = rcl_action_client_fini(&action_client, &node); - * // ... error handling for rcl_action_client_fini() - * ret = rcl_node_fini(&node); - * // ... error handling for rcl_node_fini() - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] action_client a preallocated, zero-initialized action client structure - * to be initialized - * \param[in] node valid rcl node handle - * \param[in] type_support type support object for the action's type - * \param[in] action_name the name of the action - * \param[in] options action_client options, including quality of service settings - * \return `RCL_RET_OK` if action_client was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ALREADY_INIT` if the action client is already initialized, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_NAME_INVALID` if the given action name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_client_init( - rcl_action_client_t * action_client, - rcl_node_t * node, - const rosidl_action_type_support_t * type_support, - const char * action_name, - const rcl_action_client_options_t * options); - -/// Finalize a rcl_action_client_t. -/** - * After calling, the node will no longer listen for goals for this action client - * (assuming this is the only action client of this type in this node). - * - * After calling, calls to rcl_wait(), rcl_action_send_goal_request(), - * rcl_action_take_goal_response(), rcl_action_send_cancel_request(), - * rcl_action_take_cancel_response(), rcl_action_send_result_request(), - * rcl_action_take_result_response(), rcl_action_take_feedback(), and - * rcl_action_take_status(), will fail when using this action client. - * - * Additionally, rcl_wait() will be interrupted if currently blocking. - * - * The given node handle is still valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] action_client handle to the action_client to be deinitialized - * \param[in] node handle to the node used to create the action client - * \return `RCL_RET_OK` if the action client was deinitialized successfully, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_client_fini(rcl_action_client_t * action_client, rcl_node_t * node); - -/// Return the default action client options in a rcl_action_client_options_t. -/** - * The defaults are: - * - * - goal_service_qos = rmw_qos_profile_services_default; - * - result_service_qos = rmw_qos_profile_services_default; - * - cancel_service_qos = rmw_qos_profile_services_default; - * - feedback_topic_qos = rmw_qos_profile_default; - * - status_topic_qos = rcl_action_qos_profile_status_default; - * - allocator = rcl_get_default_allocator() - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_client_options_t -rcl_action_client_get_default_options(void); - -/// Check if an action server is available for the given action client. -/** - * This function will return true for is_available if there is an action server - * available for the given action client. - * - * The node parameter must not be `NULL`, and must point to a valid node. - * - * The client parameter must not be `NULL`, and must point to a valid client. - * - * The given client and node must match, i.e. the client must have been created - * using the given node. - * - * The is_available parameter must not be `NULL`, and must point a bool variable. - * The result of the check will be stored in the is_available parameter. - * - * In the event that error handling needs to allocate memory, this function - * will try to use the node's allocator. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Maybe [1] - * [1] implementation may need to protect the data structure with a lock - * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] client the handle to the action client being queried - * \param[out] is_available set to true if there is an action server available, else false - * \return `RCL_RET_OK` if successful (regardless of the action server availability), or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_server_is_available( - const rcl_node_t * node, - const rcl_action_client_t * client, - bool * is_available); - -/// Send a ROS goal using a rcl_action_client_t. -/** - * This is a non-blocking call. - * - * The caller is responsible for ensuring that the type of `ros_goal_request` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * The ROS goal message given by the `ros_goal_request` void pointer is always - * owned by the calling code, but should remain constant during execution of this - * function. i.e. Before and after calling rcl_action_send_goal_request() the - * `ros_goal_request` message can change, but it cannot be changed during the call to - * rcl_action_send_goal_request(). - * The same `ros_goal_request` can be passed to multiple calls of this function - * simultaneously, even if the action clients differ. - * - * This function is thread safe so long as access to both the rcl_action_client_t - * and the `ros_goal_request` are synchronized. - * That means that calling rcl_action_send_goal_request() from multiple threads is allowed, - * but calling rcl_action_send_goal_request() at the same time as non-thread safe action - * client functions is not, e.g. calling rcl_action_send_goal_request() and - * rcl_action_client_fini() concurrently is not allowed. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes [1] - * Uses Atomics | No - * Lock-Free | Yes - * [1] for unique pairs of clients and goals, see above for more - * - * \param[in] action_client handle to the client that will make the goal request - * \param[in] ros_goal_request pointer to the ROS goal message - * \param[out] sequence_number pointer to the goal request sequence number - * \return `RCL_RET_OK` if the request was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the client is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_goal_request( - const rcl_action_client_t * action_client, - const void * ros_goal_request, - int64_t * sequence_number); - -/// Take a response for a goal request from an action server using a rcl_action_client_t. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_goal_response` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * The caller must provide a pointer to an allocated message for the `ros_goal_response`. - * If the take is successful, this function will populate the fields of `ros_goal_response`. - * The ROS message given by the `ros_goal_response` void pointer is always - * owned by the calling code, but should remain constant during execution of this - * function. i.e. Before and after calling rcl_action_send_goal_response() the - * `ros_goal_response` message can change, but it cannot be changed during the call to - * rcl_action_send_goal_response(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client handle to the client that will take the goal response - * \param[out] response_header pointer to the goal response header - * \param[out] ros_goal_response pointer to the response of a goal request - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_goal_response( - const rcl_action_client_t * action_client, - rmw_request_id_t * response_header, - void * ros_goal_response); - -/// Take a ROS feedback message for an active goal associated with a rcl_action_client_t. -/** - * The caller is responsible for ensuring that the type of `ros_feedback` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * `ros_feedback` should point to a preallocated ROS message struct of the - * correct type. - * If feedback is successfully taken, the feedback message is copied to into the - * `ros_feedback` struct. - * - * If allocation is required when taking the feedback, e.g. if space needs to - * be allocated for a dynamically sized array in the target message, then the - * allocator given in the action client options is used. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if required when filling the feedback message, avoided for fixed sizes - * - * \param[in] action_client handle to the client that will take action feedback - * \param[out] ros_feedback pointer to the ROS feedback message. - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_feedback( - const rcl_action_client_t * action_client, - void * ros_feedback); - -/// Take a ROS status message using a rcl_action_client_t. -/** - * The caller is responsible for ensuring that the type of `ros_status_array` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for allocating the `ros_status_array` struct with a - * zero-initialization (the internal array should not be allocated). - * If there is a successful take, then `ros_status_array` is populated - * with the allocator given in the action client options. - * It is the callers responsibility to deallocate the `ros_status_array` struct using - * the allocator given in the action client options. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client handle to the client that will take status message - * \param[out] ros_status_array pointer to ROS aciton_msgs/StatusArray message that - * will be populated with information about goals that have accepted the cancel request. - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_status( - const rcl_action_client_t * action_client, - void * ros_status_array); - -/// Send a request for the result of a completed goal associated with a rcl_action_client_t. -/** - * This is a non-blocking call. - * - * The caller is responsible for ensuring that the type of `ros_result_request` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * The ROS message given by the `ros_result_request` void pointer is always - * owned by the calling code, but should remain constant during execution of this - * function. i.e. Before and after calling rcl_action_send_result_request() the - * `ros_result_request` message can change, but it cannot be changed during the call to - * rcl_action_send_result_request(). - * The same `ros_result_request` can be passed to multiple calls of this function - * simultaneously, even if the action clients differ. - * - * This function is thread safe so long as access to both the rcl_action_client_t - * and the `ros_result_request` are synchronized. - * That means that calling rcl_action_send_result_request() from multiple threads is allowed, - * but calling rcl_action_send_result_request() at the same time as non-thread safe action - * client functions is not, e.g. calling rcl_action_send_result_request() and - * rcl_action_client_fini() concurrently is not allowed. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes [1] - * Uses Atomics | No - * Lock-Free | Yes - * [1] for unique pairs of clients and result requests, see above for more - - * \param[in] action_client handle to the client that will send the result request - * \param[in] ros_result_request pointer to a ROS result request message - * \param[out] sequence_number pointer to the result request sequence number - * \return `RCL_RET_OK` if the request was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_result_request( - const rcl_action_client_t * action_client, - const void * ros_result_request, - int64_t * sequence_number); - -/// Take a ROS result message for a completed goal associated with a rcl_action_client_t. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_result_response` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * The caller must provide a pointer to an allocated message for the `ros_result_response`. - * If the take is successful, this function will populate the fields of `ros_result_response`. - * The ROS message given by the `ros_result_response` void pointer is always - * owned by the calling code, but should remain constant during execution of this - * function. i.e. Before and after calling rcl_action_take_result_response() the - * `ros_result_response` message can change, but it cannot be changed during the call to - * rcl_action_take_result_response(). - * - * If allocation is required when taking the result, e.g. if space needs to - * be allocated for a dynamically sized array in the target message, then the - * allocator given in the action client options is used. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if required when filling the result response message, avoided for fixed sizes - * - * \param[in] action_client handle to the client that will take the result response - * \param[out] response_header pointer to the result response header - * \param[out] ros_result preallocated, zero-initialized, struct where the ROS - * result message is copied. - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_result_response( - const rcl_action_client_t * action_client, - rmw_request_id_t * response_header, - void * ros_result); - -/// Send a cancel request for a goal using a rcl_action_client_t. -/** - * This is a non-blocking call. - * - * The caller is responsible for ensuring that the type of `ros_cancel_request` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * The following cancel policy applies based on the goal ID and the timestamp provided - * by the `ros_cancel_request` message: - * - * - If the goal ID is zero and timestamp is zero, cancel all goals. - * - If the goal ID is zero and timestamp is not zero, cancel all goals accepted - * at or before the timestamp. - * - If the goal ID is not zero and timestamp is zero, cancel the goal with the - * given ID regardless of the time it was accepted. - * - If the goal ID is not zero and timestamp is not zero, cancel the goal with the - * given ID and all goals accepted at or before the timestamp. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client handle to the client that will make the cancel request - * \param[in] ros_cancel_request pointer the ROS cancel request message - * \param[out] sequence_number pointer to the cancel request sequence number - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_cancel_request( - const rcl_action_client_t * action_client, - const void * ros_cancel_request, - int64_t * sequence_number); - -/// Take a cancel response using a rcl_action_client_t. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_cancel_response` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - - * The caller is responsible for allocating the `ros_cancel_response` message - * with a zero-initialization (the internal array should not be allocated). - * If a successful response is taken, then `ros_cancel_response` is populated - * using the allocator given in the action client options. - * It is the callers responsibility to deallocate `ros_cancel_response` using - * the allocator given in the action client options. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client handle to the client that will take the cancel response - * \param[out] response_header pointer to the cancel response header - * \param[out] ros_cancel_response a zero-initialized ROS cancel response message where - * the cancel response is copied. - * \return `RCL_RET_OK` if the response was taken successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_cancel_response( - const rcl_action_client_t * action_client, - rmw_request_id_t * response_header, - void * ros_cancel_response); - -/// Get the name of the action for a rcl_action_client_t. -/** - * This function returns the action client's name string. - * This function can fail, and therefore return `NULL`, if the: - * - action client is `NULL` - * - action client is invalid (never called init, called fini, or invalid) - * - * The returned string is only valid as long as the action client is valid. - * The value of the string may change if the topic name changes, and therefore - * copying the string is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client the pointer to the action client - * \return name string if successful, otherwise `NULL` - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -const char * -rcl_action_client_get_action_name(const rcl_action_client_t * action_client); - -/// Return the options for a rcl_action_client_t. -/** - * This function returns the action client's internal options struct. - * This function can fail, and therefore return `NULL`, if the: - * - action client is `NULL` - * - action client is invalid (never called init, called fini, or invalid) - * - * The returned struct is only valid as long as the action client is valid. - * The values in the struct may change if the action client's options change, - * and therefore copying the struct is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client pointer to the action client - * \return options struct if successful, otherwise `NULL` - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -const rcl_action_client_options_t * -rcl_action_client_get_options(const rcl_action_client_t * action_client); - -/// Check that a rcl_action_client_t is valid. -/** - * The bool returned is `false` if `action_client` is invalid. - * The bool returned is `true` otherwise. - * In the case where `false` is to be returned, an error message is set. - * This function cannot fail. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_client pointer to the rcl action client - * \return `true` if `action_client` is valid, otherwise `false` - */ -RCL_ACTION_PUBLIC -bool -rcl_action_client_is_valid( - const rcl_action_client_t * action_client); - -#ifdef __cplusplus -} -#endif - -#endif // RCL_ACTION__ACTION_CLIENT_H_ diff --git a/ThirdParty/ros/include/rcl_action/action_server.h b/ThirdParty/ros/include/rcl_action/action_server.h deleted file mode 100644 index 79abff41f..000000000 --- a/ThirdParty/ros/include/rcl_action/action_server.h +++ /dev/null @@ -1,937 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL_ACTION__ACTION_SERVER_H_ -#define RCL_ACTION__ACTION_SERVER_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl_action/goal_handle.h" -#include "rcl_action/types.h" -#include "rcl_action/visibility_control.h" -#include "rcl/macros.h" -#include "rcl/node.h" -#include "rcl/time.h" - -#include "rosidl_runtime_c/action_type_support_struct.h" - -/// Internal rcl_action implementation struct. -struct rcl_action_server_impl_t; - -/// Structure which encapsulates a ROS Action Server. -typedef struct rcl_action_server_t -{ - /// Pointer to the action server implementation - struct rcl_action_server_impl_t * impl; -} rcl_action_server_t; - -/// Options available for a rcl_action_server_t. -typedef struct rcl_action_server_options_t -{ - /// Middleware quality of service settings for the action server. - /// Goal service quality of service - rmw_qos_profile_t goal_service_qos; - /// Cancel service quality of service - rmw_qos_profile_t cancel_service_qos; - /// Result service quality of service - rmw_qos_profile_t result_service_qos; - /// Feedback topic quality of service - rmw_qos_profile_t feedback_topic_qos; - /// Status topic quality of service - rmw_qos_profile_t status_topic_qos; - /// Custom allocator for the action server, used for incidental allocations. - /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ - rcl_allocator_t allocator; - /// Goal handles that have results longer than this time are deallocated. - rcl_duration_t result_timeout; -} rcl_action_server_options_t; - -/// Return a rcl_action_server_t struct with members set to `NULL`. -/** - * Should be called to get a null rcl_action_server_t before passing to - * rcl_action_server_init(). - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_server_t -rcl_action_get_zero_initialized_server(void); - -/// Initialize an action server. -/** - * After calling this function on a rcl_action_server_t, it can be used to take - * goals of the given type for the given action name using rcl_action_take_goal_request() - * and take cancel requests with rcl_action_take_cancel_request(). - * It can also send a result for a request using rcl_action_send_result() or - * rcl_action_send_cancel_response(). - * - * After accepting a goal with rcl_action_take_goal_request(), the action server can - * be used to send feedback with rcl_action_publish_feedback() and send status - * messages with rcl_action_publish_status(). - * - * The given rcl_node_t must be valid and the resulting rcl_action_server_t is - * only valid as long as the given rcl_node_t remains valid. - * - * The give rcl_clock_t must be valid and the resulting rcl_ction_server_t is - * only valid as long ast he given rcl_clock_t remains valid. - * - * The rosidl_action_type_support_t is obtained on a per .action type basis. - * When the user defines a ROS action, code is generated which provides the - * required rosidl_action_type_support_t object. - * This object can be obtained using a language appropriate mechanism. - * \todo TODO(jacobperron) write these instructions once and link to it instead - * - * For C, a macro can be used (for example `example_interfaces/Fibonacci`): - * - * ```c - * #include - * #include - * const rosidl_action_type_support_t * ts = - * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); - * ``` - * - * For C++, a template function is used: - * - * ```cpp - * #include - * #include - * using rosidl_typesupport_cpp::get_action_type_support_handle; - * const rosidl_action_type_support_t * ts = - * get_action_type_support_handle(); - * ``` - * - * The rosidl_action_type_support_t object contains action type specific - * information used to send or take goals, results, and feedback. - * - * The topic name must be a c string that follows the topic and service name - * format rules for unexpanded names, also known as non-fully qualified names: - * - * \see rcl_expand_topic_name - * - * The options struct allows the user to set the quality of service settings as - * well as a custom allocator that is used when initializing/finalizing the - * client to allocate space for incidentals, e.g. the action server name string. - * - * Expected usage (for C action servers): - * - * ```c - * #include - * #include - * #include - * #include - * - * rcl_node_t node = rcl_get_zero_initialized_node(); - * rcl_node_options_t node_ops = rcl_node_get_default_options(); - * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); - * // ... error handling - * const rosidl_action_type_support_t * ts = - * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); - * rcl_action_server_t action_server = rcl_action_get_zero_initialized_server(); - * rcl_action_server_options_t action_server_ops = rcl_action_server_get_default_options(); - * ret = rcl_action_server_init(&action_server, &node, ts, "fibonacci", &action_server_ops); - * // ... error handling, and on shutdown do finalization: - * ret = rcl_action_server_fini(&action_server, &node); - * // ... error handling for rcl_action_server_fini() - * ret = rcl_node_fini(&node); - * // ... error handling for rcl_node_fini() - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] action_server handle to a preallocated, zero-initialized action server structure - * to be initialized. - * \param[in] node valid node handle - * \param[in] clock valid clock handle - * \param[in] type_support type support object for the action's type - * \param[in] action_name the name of the action - * \param[in] options action_server options, including quality of service settings - * \return `RCL_RET_OK` if action_server was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_NAME_INVALID` if the given action name is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_server_init( - rcl_action_server_t * action_server, - rcl_node_t * node, - rcl_clock_t * clock, - const rosidl_action_type_support_t * type_support, - const char * action_name, - const rcl_action_server_options_t * options); - -/// Finalize an action server. -/** - * After calling, the node will no longer listen to services and topics for this action server. - * (assuming this is the only action server of this type in this node). - * - * After calling, calls to rcl_wait(), rcl_action_take_goal_request(), - * rcl_action_take_cancel_request(), rcl_action_publish_feedback(), - * rcl_action_publish_status(), rcl_action_send_result(), and - * rcl_action_send_cancel_response() will fail when using this action server. - * Additionally, rcl_wait() will be interrupted if currently blocking. - * However, the given node handle is still valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] action_server handle to the action_server to be deinitialized - * \param[in] node handle to the node used to create the action server - * \return `RCL_RET_OK` if the action server was deinitialized successfully, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server pointer is null, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_server_fini(rcl_action_server_t * action_server, rcl_node_t * node); - -/// Return the default action server options in a rcl_action_server_options_t. -/** - * The defaults are: - * - * - goal_service_qos = rmw_qos_profile_services_default; - * - cancel_service_qos = rmw_qos_profile_services_default; - * - result_service_qos = rmw_qos_profile_services_default; - * - feedback_topic_qos = rmw_qos_profile_default; - * - status_topic_qos = rcl_action_qos_profile_status_default; - * - allocator = rcl_get_default_allocator(); - * - result_timeout = RCUTILS_S_TO_NS(15 * 60); // 15 minutes - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_server_options_t -rcl_action_server_get_default_options(void); - -/// Take a pending ROS goal using an action server. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_goal_request` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * `ros_goal_request` should point to a preallocated, zero-initialized, - * ROS goal message. - * If a goal request is taken successfully, it will be copied into `ros_goal_request`. - * - * If allocation is required when taking the request, e.g. if space needs to - * be allocated for a dynamically sized array in the target message, then the - * allocator given in the action server options is used. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe [1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] only if required when filling the request, avoided for fixed sizes - * - * \param[in] action_server handle to the action server that will take the request - * \param[out] request_header pointer to the goal request header - * \param[out] ros_goal_request a preallocated, zero-initialized, ROS goal request message - * where the request is copied - * \return `RCL_RET_OK` if the request was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_goal_request( - const rcl_action_server_t * action_server, - rmw_request_id_t * request_header, - void * ros_goal_request); - -/// Send a response for a goal request to an action client using an action server. -/** - * This is a non-blocking call. - * - * The caller is responsible for ensuring that the type of `ros_goal_response` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * If the caller intends to send an 'accepted' response, before calling this function - * the caller should use rcl_action_accept_new_goal() to get a rcl_action_goal_handle_t - * for future interaction with the goal (e.g. publishing feedback and canceling the goal). - * - * This function is thread safe so long as access to both the action server and the - * `ros_goal_response` are synchronized. - * That means that calling rcl_action_send_goal_response() from multiple threads is - * allowed, but calling rcl_action_send_goal_response() at the same time as non-thread safe - * action server functions is not, e.g. calling rcl_action_send_goal_response() and - * rcl_action_server_fini() concurrently is not allowed. - * Before calling rcl_action_send_goal_response() the `ros_goal_request` can change and - * after calling rcl_action_send_goal_response() the `ros_goal_request` can change, but it - * cannot be changed during the rcl_action_send_goal_response() call. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes [1] - * Uses Atomics | No - * Lock-Free | Yes - * [1] for unique pairs of action servers and responses, see above for more - * - * \param[in] action_server handle to the action server that will make the goal response - * \param[in] response_header pointer to the goal response header - * \param[in] ros_goal_response a ROS goal response message to send - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_goal_response( - const rcl_action_server_t * action_server, - rmw_request_id_t * response_header, - void * ros_goal_response); - -/// Accept a new goal using an action server. -/** - * This is a non-blocking call. - * - * Creates and returns a new goal handle. - * The action server starts tracking it internally. - * If a failure occurs, `NULL` is returned and an error message is set. - * Possible reasons for failure: - * - action server is invalid - * - goal info is invalid - * - goal ID is already being tracked by the action server - * - memory allocation failure - * - * This function should be called after receiving a new goal request with - * rcl_action_take_goal_request() and before sending a response with - * rcl_action_send_goal_response(). - * - * After calling this function, the action server will start tracking the goal. - * The pointer to the goal handle becomes invalid after `rcl_action_server_fini()` is called. - * The caller becomes responsible for finalizing the goal handle later. - * - * Example usage: - * - * ```c - * #include - * - * // ... init an action server - * // Take a goal request (client library type) - * rcl_ret_t ret = rcl_action_take_goal_request(&action_server, &goal_request); - * // ... error handling - * // If the goal is accepted, then tell the action server - * // First, create a goal info message - * rcl_action_goal_info_t goal_info = rcl_action_get_zero_initialized_goal_info(); - * // ... populate goal_info.uuid (unique_identifier_msgs/UUID) - * // ... populate goal_info.stamp (builtin_interfaces/Time) - * rcl_action_goal_handle_t * goal_handle = rcl_action_accept_new_goal(&action_server, &goal_info); - * // ... error_handling - * // ... Populate goal response (client library type) - * ret = rcl_action_send_goal_response(&action_server, &goal_response); - * // ... error handling, and sometime before shutdown finalize goal info message - * ret = rcl_action_goal_info_fini(&goal_info, &action_server); - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that is accepting the goal - * \param[in] goal_info a message containing info about the goal being accepted - * \return a pointer to a new goal handle representing the accepted goal, or - * \return `NULL` if a failure occured. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_goal_handle_t * -rcl_action_accept_new_goal( - rcl_action_server_t * action_server, - const rcl_action_goal_info_t * goal_info); - -/// Publish a ROS feedback message for an active goal using an action server. -/** - * The caller is responsible for ensuring that the type of `ros_feedback` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * This function acts like a ROS publisher and is potentially a blocking call. - * \see rcl_publish() - * - * This function is thread safe so long as access to both the action server and - * `ros_feedback` is synchronized. - * That means that calling rcl_action_publish_feedback() from multiple threads - * is allowed, but calling rcl_action_publish_feedback() at the same time as - * non-thread safe action server functions is not, e.g. calling - * rcl_action_publish_feedback() and rcl_action_server_fini() concurrently is not - * allowed. - * - * Before calling rcl_action_publish_feedback() the `ros_feedback` message ca - * change and after calling rcl_action_publish_feedback() the `ros_feedback` message - * can change, but it cannot be changed during the publish call. - * The same `ros_feedback` can be passed to multiple calls of - * rcl_action_publish_feedback() simultaneously, even if the action servers differ. - * `ros_feedback` is unmodified by rcl_action_publish_feedback(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes [1] - * Uses Atomics | No - * Lock-Free | Yes - * [1] for unique pairs of action servers and feedback, see above for more - * - * \param[in] action_server handle to the action server that will publish the feedback - * \param[in] ros_feedback a ROS message containing the goal feedback - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. * - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_publish_feedback( - const rcl_action_server_t * action_server, - void * ros_feedback); - -/// Get a status array message for accepted goals associated with an action server. -/** - * The provided `status_message` should be zero-initialized with - * rcl_action_get_zero_initialized_goal_status_array() before calling this function. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will publish the status message - * \param[out] status_message an action_msgs/StatusArray ROS message - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_get_goal_status_array( - const rcl_action_server_t * action_server, - rcl_action_goal_status_array_t * status_message); - -/// Publish a status array message for accepted goals associated with an action server. -/** - * This function acts like a ROS publisher and is potentially a blocking call. - * \see rcl_publish() - * - * A status array message associated with the action server can be created with - * rcl_action_get_goal_status_array(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will publish the status message - * \param[in] status_message an action_msgs/StatusArray ROS message to publish - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_publish_status( - const rcl_action_server_t * action_server, - const void * status_message); - -/// Take a pending result request using an action server. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_result_request` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will take the result request - * \param[out] request_header pointer to the result request header - * \param[out] ros_result_request a preallocated ROS result request message where the - * request is copied. - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_result_request( - const rcl_action_server_t * action_server, - rmw_request_id_t * request_header, - void * ros_result_request); - -/// Send a result response using an action server. -/** - * This is a non-blocking call. - * - * The caller is responsible for ensuring that the type of `ros_result_response` - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * Before calling this function, the caller should use rcl_action_update_goal_state() - * to update the goals state to the appropriate terminal state. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will send the result response - * \param[in] response_header pointer to the result response header - * \param[in] ros_result_response a ROS result response message to send - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_result_response( - const rcl_action_server_t * action_server, - rmw_request_id_t * response_header, - void * ros_result_response); - -/// Expires goals associated with an action server. -/** - * A goal is 'expired' if it has been in a terminal state (has a result) for longer - * than some duration. - * The timeout duration is set as part of the action server options. - * - * If a negative timeout value if provided, then goal results never expire (kept forever). - * If a timeout of zero is set, then goal results are discarded immediately (ie. goal - * results are discarded whenever this function is called). - * - * Expired goals are removed from the internal array of goal handles. - * rcl_action_server_goal_exists() will return false for any goals that have expired. - * - * \attention If one or more goals are expired then a previously returned goal handle - * array from rcl_action_server_get_goal_handles() becomes invalid. - * - * `expired_goals`, `expired_goals_capacity` and `num_expired` are optional arguments. - * If set to (`NULL`, 0u, `NULL`) then they are not used. - * To use them allocate an array with size equal to the maximum number of goals that you want to - * expire. - * Pass the number of goals the array can hold in as `expired_goals_capacity`. - * This function will set `num_expired` to the number of goals that were expired. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Maybe[1] - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * [1] if one or more goals expires, then the internal goal handle array may be - * resized or deallocated - * - * \param[in] action_server handle to the action server from which expired goals - * will be cleared. - * \param[inout] expired_goals the identifiers of goals that expired, or set to `NULL` if unused - * \param[inout] expired_goals_capacity the allocated size of `expired_goals`, or 0 if unused - * \param[out] num_expired the number of expired goals, or set to `NULL` if unused - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_expire_goals( - const rcl_action_server_t * action_server, - rcl_action_goal_info_t * expired_goals, - size_t expired_goals_capacity, - size_t * num_expired); - -/// Notifies action server that a goal handle reached a terminal state. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \return `RCL_RET_OK` if everything is ok, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_notify_goal_done( - const rcl_action_server_t * action_server); - -/// Take a pending cancel request using an action server. -/** - * \todo TODO(jacobperron) blocking of take? - * - * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? - * - * \todo TODO(jacobperron) is this thread-safe? - * - * The caller is responsible for ensuring that the type of `ros_cancel_request`_ - * and the type associate with the client (via the type support) match. - * Passing a different type produces undefined behavior and cannot be checked - * by this function and therefore no deliberate error will occur. - * - * After receiving a successful cancel request, the appropriate goals can be - * transitioned to the state CANCELING using rcl_action_process_cancel_request(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will take the cancel request - * \param[out] request_header pointer to the cancel request header - * \param[out] ros_cancel_request a preallocated ROS cancel request where the request - * message is copied - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred - * in the middleware, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_take_cancel_request( - const rcl_action_server_t * action_server, - rmw_request_id_t * request_header, - void * ros_cancel_request); - -/// Process a cancel request using an action server. -/** - * This is a non-blocking call. - * - * This function will compute a list of goals that a cancelation request is attempting to cancel. - * It does not change the state of any goal. - * The following cancel policy applies based on the goal ID and the timestamp - * contained in the cancel request: - * - * - If the goal ID is zero and timestamp is zero, cancel all goals. - * - If the goal ID is zero and timestamp is not zero, cancel all goals accepted - * at or before the timestamp. - * - If the goal ID is not zero and timestamp is zero, cancel the goal with the - * given ID regardless of the time it was accepted. - * - If the goal ID is not zero and timestamp is not zero, cancel the goal with the - * given ID and all goals accepted at or before the timestamp. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will process the cancel request - * \param[in] cancel_request a C-typed ROS cancel request to process - * \param[out] cancel_response a zero-initialized cancel response struct - * where the goal info of goals which should be cancelled are copied - * \return `RCL_RET_OK` if the response was sent successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_process_cancel_request( - const rcl_action_server_t * action_server, - const rcl_action_cancel_request_t * cancel_request, - rcl_action_cancel_response_t * cancel_response); - -/// Send a cancel response using an action server. -/** - * This is a non-blocking call. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server that will send the cancel response - * \param[in] response_header pointer to the cancel response header - * \param[in] ros_cancel_response a ROS cancel response to send - * \return `RCL_RET_OK` if the request was taken, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_send_cancel_response( - const rcl_action_server_t * action_server, - rmw_request_id_t * response_header, - void * ros_cancel_response); - -/// Get the action name for an action server. -/** - * This function returns the action server's internal topic name string. - * This function can fail, and therefore return `NULL`, if the: - * - action server is `NULL` - * - action server is invalid (e.g. never called init or called fini) - * - * The returned string is only valid as long as the action server is valid. - * The value of the string may change if the topic name changes, and therefore - * copying the string is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server pointer to the action server - * \return name string if successful, or - * \return `NULL` otherwise. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -const char * -rcl_action_server_get_action_name(const rcl_action_server_t * action_server); - -/// Return the rcl_action_server_options_t for an action server. -/** - * This function returns the action server's internal options struct. - * This function can fail, and therefore return `NULL`, if the: - * - action server is `NULL` - * - action server is invalid (e.g. never called init or called fini) - * - * The returned struct is only valid as long as the action server is valid. - * The values in the struct may change if the action server's options change, - * and therefore copying the struct is recommended if this is a concern. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \return options struct if successful, or - * \return `NULL` otherwise. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -const rcl_action_server_options_t * -rcl_action_server_get_options(const rcl_action_server_t * action_server); - -/// Get the goal handles for all goals an action server is tracking. -/** - * A pointer to the internally held array of pointers to goal handle structs is returned - * along with the number of items in the array. - * - * The returned handle is made invalid if the action server is finalized, if - * rcl_shutdown() is called, or if rcl_action_expire_goals() is called and one or more - * goals are expired. - * The returned handle is not guaranteed to be valid for the life time of the - * action server as it may be finalized and recreated itself. - * Therefore, it is recommended to get the handle from the action server using - * this function each time it is needed and avoid use of the handle - * concurrently with functions that might change it. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \param[out] goal_handles is set to the array of pointers to goal handles if successful. - * \param[out] num_goals is set to the number of goals in the returned array if successful, - * not set otherwise. - * \return `RCL_RET_OK` if successful, or - * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_server_get_goal_handles( - const rcl_action_server_t * action_server, - rcl_action_goal_handle_t *** goal_handles, - size_t * num_goals); - -/// Check if a goal is already being tracked by an action server. -/** - * Checks whether or not a goal is being tracked in the internal goal array. - * The goal state has no effect on the return value. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \param[in] goal_info handle to a struct containing the goal ID to check for - * \return `true` if `action_server` is currently tracking a goal with the provided goal ID, or - * \return `false` otherwise. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -bool -rcl_action_server_goal_exists( - const rcl_action_server_t * action_server, - const rcl_action_goal_info_t * goal_info); - -/// Check if an action server is valid. -/** - * In the case where `false` is returned (ie. the action server is invalid), - * an error message is set. - * - * This function cannot fail. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \return `true` if `action_server` is valid, or - * \return `false` otherwise. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -bool -rcl_action_server_is_valid(const rcl_action_server_t * action_server); - -/// Check if an action server is valid without erroring if the library is shutting down. -/** - * In the case where `false` is returned (ie. the action server is invalid), - * an error message is set. - * - * This function cannot fail. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] action_server handle to the action server - * \return `true` if `action_server` is valid, or - * \return `false` otherwise. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -bool -rcl_action_server_is_valid_except_context(const rcl_action_server_t * action_server); - -#ifdef __cplusplus -} -#endif - -#endif // RCL_ACTION__ACTION_SERVER_H_ diff --git a/ThirdParty/ros/include/rcl_action/rcl_action/action_client.h b/ThirdParty/ros/include/rcl_action/rcl_action/action_client.h new file mode 100644 index 000000000..b686b65f1 --- /dev/null +++ b/ThirdParty/ros/include/rcl_action/rcl_action/action_client.h @@ -0,0 +1,789 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL_ACTION__ACTION_CLIENT_H_ +#define RCL_ACTION__ACTION_CLIENT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl_action/types.h" +#include "rcl_action/visibility_control.h" +#include "rcl/event_callback.h" +#include "rcl/macros.h" +#include "rcl/node.h" + + +/// Internal action client implementation struct. +typedef struct rcl_action_client_impl_s rcl_action_client_impl_t; + +/// Structure which encapsulates a ROS action client. +typedef struct rcl_action_client_s +{ + /// Pointer to the action client implementation + rcl_action_client_impl_t * impl; +} rcl_action_client_t; + +/// Options available for a rcl_action_client_t. +typedef struct rcl_action_client_options_s +{ + /// Middleware quality of service settings for the action client. + /// Goal service quality of service + rmw_qos_profile_t goal_service_qos; + /// Result service quality of service + rmw_qos_profile_t result_service_qos; + /// Cancel service quality of service + rmw_qos_profile_t cancel_service_qos; + /// Feedback topic quality of service + rmw_qos_profile_t feedback_topic_qos; + /// Status topic quality of service + rmw_qos_profile_t status_topic_qos; + /// Custom allocator for the action client, used for incidental allocations. + /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ + rcl_allocator_t allocator; +} rcl_action_client_options_t; + +/// Return a rcl_action_client_t struct with members set to `NULL`. +/** + * Should be called to get a null rcl_action_client_t before passing to + * rcl_action_client_init(). + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_client_t +rcl_action_get_zero_initialized_client(void); + +/// Initialize a rcl_action_client_t. +/** + * After calling this function on a rcl_action_client_t, it can be used to send + * goals of the given type to the given topic using rcl_action_send_goal_request(). + * If a goal request is sent to a (possibly remote) server and if the server + * sends a response, the client can access the response with + * rcl_take_goal_response() once the response is available. + * + * After a goal request has been accepted, the rcl_action_client_t associated with the + * goal can perform the following operations: + * + * - Send a request for the result with rcl_action_send_result_request(). + * If the server sends a response when the goal terminates, the result can be accessed + * with rcl_action_take_result_response(), once the response is available. + * - Send a cancel request for the goal with rcl_action_send_cancel_request(). + * If the server sends a response to a cancel request, the client can access the + * response with rcl_action_take_cancel_response() once the response is available. + * - Take feedback about the goal with rcl_action_take_feedback(). + * + * A rcl_action_client_t can be used to access the current status of all accepted goals + * communicated by the action server with rcl_action_take_status(). + * + * The given rcl_node_t must be valid and the resulting rcl_action_client_t is + * only valid as long as the given rcl_node_t remains valid. + * + * The rosidl_action_type_support_t is obtained on a per .action type basis. + * When the user defines a ROS action, code is generated which provides the + * required rosidl_action_type_support_t object. + * This object can be obtained using a language appropriate mechanism. + * + * \todo TODO(jacobperron) write these instructions once and link to it instead + * + * For C, a macro can be used (for example `example_interfaces/Fibonacci`): + * + * ```c + * #include + * #include + * const rosidl_action_type_support_t * ts = + * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); + * ``` + * + * For C++, a template function is used: + * + * ```cpp + * #include + * #include + * using rosidl_typesupport_cpp::get_action_type_support_handle; + * const rosidl_action_type_support_t * ts = + * get_action_type_support_handle(); + * ``` + * + * The rosidl_action_type_support_t object contains action type specific + * information used to send or take goals, results, and feedback. + * + * The topic name must be a c string that follows the topic and service name + * format rules for unexpanded names, also known as non-fully qualified names: + * + * \see rcl_expand_topic_name + * + * The options struct allows the user to set the quality of service settings as + * well as a custom allocator that is used when initializing/finalizing the + * client to allocate space for incidentals, e.g. the action client name string. + * + * Expected usage (for C action clients): + * + * ```c + * #include + * #include + * #include + * #include + * + * rcl_node_t node = rcl_get_zero_initialized_node(); + * rcl_node_options_t node_ops = rcl_node_get_default_options(); + * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); + * // ... error handling + * const rosidl_action_type_support_t * ts = + * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); + * rcl_action_client_t action_client = rcl_action_get_zero_initialized_client(); + * rcl_action_client_options_t action_client_ops = rcl_action_client_get_default_options(); + * ret = rcl_action_client_init(&action_client, &node, ts, "fibonacci", &action_client_ops); + * // ... error handling, and on shutdown do finalization: + * ret = rcl_action_client_fini(&action_client, &node); + * // ... error handling for rcl_action_client_fini() + * ret = rcl_node_fini(&node); + * // ... error handling for rcl_node_fini() + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] action_client a preallocated, zero-initialized action client structure + * to be initialized + * \param[in] node valid rcl node handle + * \param[in] type_support type support object for the action's type + * \param[in] action_name the name of the action + * \param[in] options action_client options, including quality of service settings + * \return `RCL_RET_OK` if action_client was initialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_NODE_INVALID` if the node is invalid, or + * \return `RCL_RET_ALREADY_INIT` if the action client is already initialized, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_NAME_INVALID` if the given action name is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_init( + rcl_action_client_t * action_client, + rcl_node_t * node, + const rosidl_action_type_support_t * type_support, + const char * action_name, + const rcl_action_client_options_t * options); + +/// Finalize a rcl_action_client_t. +/** + * After calling, the node will no longer listen for goals for this action client + * (assuming this is the only action client of this type in this node). + * + * After calling, calls to rcl_wait(), rcl_action_send_goal_request(), + * rcl_action_take_goal_response(), rcl_action_send_cancel_request(), + * rcl_action_take_cancel_response(), rcl_action_send_result_request(), + * rcl_action_take_result_response(), rcl_action_take_feedback(), and + * rcl_action_take_status(), will fail when using this action client. + * + * Additionally, rcl_wait() will be interrupted if currently blocking. + * + * The given node handle is still valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] action_client handle to the action_client to be deinitialized + * \param[in] node handle to the node used to create the action client + * \return `RCL_RET_OK` if the action client was deinitialized successfully, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_NODE_INVALID` if the node is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_fini(rcl_action_client_t * action_client, rcl_node_t * node); + +/// Return the default action client options in a rcl_action_client_options_t. +/** + * The defaults are: + * + * - goal_service_qos = rmw_qos_profile_services_default; + * - result_service_qos = rmw_qos_profile_services_default; + * - cancel_service_qos = rmw_qos_profile_services_default; + * - feedback_topic_qos = rmw_qos_profile_default; + * - status_topic_qos = rcl_action_qos_profile_status_default; + * - allocator = rcl_get_default_allocator() + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_client_options_t +rcl_action_client_get_default_options(void); + +/// Check if an action server is available for the given action client. +/** + * This function will return true for is_available if there is an action server + * available for the given action client. + * + * The node parameter must not be `NULL`, and must point to a valid node. + * + * The client parameter must not be `NULL`, and must point to a valid client. + * + * The given client and node must match, i.e. the client must have been created + * using the given node. + * + * The is_available parameter must not be `NULL`, and must point a bool variable. + * The result of the check will be stored in the is_available parameter. + * + * In the event that error handling needs to allocate memory, this function + * will try to use the node's allocator. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Maybe [1] + * [1] implementation may need to protect the data structure with a lock + * + * \param[in] node the handle to the node being used to query the ROS graph + * \param[in] client the handle to the action client being queried + * \param[out] is_available set to true if there is an action server available, else false + * \return `RCL_RET_OK` if successful (regardless of the action server availability), or + * \return `RCL_RET_NODE_INVALID` if the node is invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_is_available( + const rcl_node_t * node, + const rcl_action_client_t * client, + bool * is_available); + +/// Send a ROS goal using a rcl_action_client_t. +/** + * This is a non-blocking call. + * + * The caller is responsible for ensuring that the type of `ros_goal_request` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * The ROS goal message given by the `ros_goal_request` void pointer is always + * owned by the calling code, but should remain constant during execution of this + * function. i.e. Before and after calling rcl_action_send_goal_request() the + * `ros_goal_request` message can change, but it cannot be changed during the call to + * rcl_action_send_goal_request(). + * The same `ros_goal_request` can be passed to multiple calls of this function + * simultaneously, even if the action clients differ. + * + * This function is thread safe so long as access to both the rcl_action_client_t + * and the `ros_goal_request` are synchronized. + * That means that calling rcl_action_send_goal_request() from multiple threads is allowed, + * but calling rcl_action_send_goal_request() at the same time as non-thread safe action + * client functions is not, e.g. calling rcl_action_send_goal_request() and + * rcl_action_client_fini() concurrently is not allowed. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | Yes + * [1] for unique pairs of clients and goals, see above for more + * + * \param[in] action_client handle to the client that will make the goal request + * \param[in] ros_goal_request pointer to the ROS goal message + * \param[out] sequence_number pointer to the goal request sequence number + * \return `RCL_RET_OK` if the request was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the client is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_goal_request( + const rcl_action_client_t * action_client, + const void * ros_goal_request, + int64_t * sequence_number); + +/// Take a response for a goal request from an action server using a rcl_action_client_t. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_goal_response` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * The caller must provide a pointer to an allocated message for the `ros_goal_response`. + * If the take is successful, this function will populate the fields of `ros_goal_response`. + * The ROS message given by the `ros_goal_response` void pointer is always + * owned by the calling code, but should remain constant during execution of this + * function. i.e. Before and after calling rcl_action_send_goal_response() the + * `ros_goal_response` message can change, but it cannot be changed during the call to + * rcl_action_send_goal_response(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client handle to the client that will take the goal response + * \param[out] response_header pointer to the goal response header + * \param[out] ros_goal_response pointer to the response of a goal request + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_goal_response( + const rcl_action_client_t * action_client, + rmw_request_id_t * response_header, + void * ros_goal_response); + +/// Take a ROS feedback message for an active goal associated with a rcl_action_client_t. +/** + * The caller is responsible for ensuring that the type of `ros_feedback` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * `ros_feedback` should point to a preallocated ROS message struct of the + * correct type. + * If feedback is successfully taken, the feedback message is copied to into the + * `ros_feedback` struct. + * + * If allocation is required when taking the feedback, e.g. if space needs to + * be allocated for a dynamically sized array in the target message, then the + * allocator given in the action client options is used. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if required when filling the feedback message, avoided for fixed sizes + * + * \param[in] action_client handle to the client that will take action feedback + * \param[out] ros_feedback pointer to the ROS feedback message. + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_feedback( + const rcl_action_client_t * action_client, + void * ros_feedback); + +/// Take a ROS status message using a rcl_action_client_t. +/** + * The caller is responsible for ensuring that the type of `ros_status_array` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for allocating the `ros_status_array` struct with a + * zero-initialization (the internal array should not be allocated). + * If there is a successful take, then `ros_status_array` is populated + * with the allocator given in the action client options. + * It is the callers responsibility to deallocate the `ros_status_array` struct using + * the allocator given in the action client options. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client handle to the client that will take status message + * \param[out] ros_status_array pointer to ROS aciton_msgs/StatusArray message that + * will be populated with information about goals that have accepted the cancel request. + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_status( + const rcl_action_client_t * action_client, + void * ros_status_array); + +/// Send a request for the result of a completed goal associated with a rcl_action_client_t. +/** + * This is a non-blocking call. + * + * The caller is responsible for ensuring that the type of `ros_result_request` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * The ROS message given by the `ros_result_request` void pointer is always + * owned by the calling code, but should remain constant during execution of this + * function. i.e. Before and after calling rcl_action_send_result_request() the + * `ros_result_request` message can change, but it cannot be changed during the call to + * rcl_action_send_result_request(). + * The same `ros_result_request` can be passed to multiple calls of this function + * simultaneously, even if the action clients differ. + * + * This function is thread safe so long as access to both the rcl_action_client_t + * and the `ros_result_request` are synchronized. + * That means that calling rcl_action_send_result_request() from multiple threads is allowed, + * but calling rcl_action_send_result_request() at the same time as non-thread safe action + * client functions is not, e.g. calling rcl_action_send_result_request() and + * rcl_action_client_fini() concurrently is not allowed. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | Yes + * [1] for unique pairs of clients and result requests, see above for more + + * \param[in] action_client handle to the client that will send the result request + * \param[in] ros_result_request pointer to a ROS result request message + * \param[out] sequence_number pointer to the result request sequence number + * \return `RCL_RET_OK` if the request was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_result_request( + const rcl_action_client_t * action_client, + const void * ros_result_request, + int64_t * sequence_number); + +/// Take a ROS result message for a completed goal associated with a rcl_action_client_t. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_result_response` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * The caller must provide a pointer to an allocated message for the `ros_result_response`. + * If the take is successful, this function will populate the fields of `ros_result_response`. + * The ROS message given by the `ros_result_response` void pointer is always + * owned by the calling code, but should remain constant during execution of this + * function. i.e. Before and after calling rcl_action_take_result_response() the + * `ros_result_response` message can change, but it cannot be changed during the call to + * rcl_action_take_result_response(). + * + * If allocation is required when taking the result, e.g. if space needs to + * be allocated for a dynamically sized array in the target message, then the + * allocator given in the action client options is used. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if required when filling the result response message, avoided for fixed sizes + * + * \param[in] action_client handle to the client that will take the result response + * \param[out] response_header pointer to the result response header + * \param[out] ros_result preallocated, zero-initialized, struct where the ROS + * result message is copied. + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_result_response( + const rcl_action_client_t * action_client, + rmw_request_id_t * response_header, + void * ros_result); + +/// Send a cancel request for a goal using a rcl_action_client_t. +/** + * This is a non-blocking call. + * + * The caller is responsible for ensuring that the type of `ros_cancel_request` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * The following cancel policy applies based on the goal ID and the timestamp provided + * by the `ros_cancel_request` message: + * + * - If the goal ID is zero and timestamp is zero, cancel all goals. + * - If the goal ID is zero and timestamp is not zero, cancel all goals accepted + * at or before the timestamp. + * - If the goal ID is not zero and timestamp is zero, cancel the goal with the + * given ID regardless of the time it was accepted. + * - If the goal ID is not zero and timestamp is not zero, cancel the goal with the + * given ID and all goals accepted at or before the timestamp. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client handle to the client that will make the cancel request + * \param[in] ros_cancel_request pointer the ROS cancel request message + * \param[out] sequence_number pointer to the cancel request sequence number + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_cancel_request( + const rcl_action_client_t * action_client, + const void * ros_cancel_request, + int64_t * sequence_number); + +/// Take a cancel response using a rcl_action_client_t. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_cancel_response` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + + * The caller is responsible for allocating the `ros_cancel_response` message + * with a zero-initialization (the internal array should not be allocated). + * If a successful response is taken, then `ros_cancel_response` is populated + * using the allocator given in the action client options. + * It is the callers responsibility to deallocate `ros_cancel_response` using + * the allocator given in the action client options. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client handle to the client that will take the cancel response + * \param[out] response_header pointer to the cancel response header + * \param[out] ros_cancel_response a zero-initialized ROS cancel response message where + * the cancel response is copied. + * \return `RCL_RET_OK` if the response was taken successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_CLIENT_INVALID` if the action client is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_CLIENT_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_cancel_response( + const rcl_action_client_t * action_client, + rmw_request_id_t * response_header, + void * ros_cancel_response); + +/// Get the name of the action for a rcl_action_client_t. +/** + * This function returns the action client's name string. + * This function can fail, and therefore return `NULL`, if the: + * - action client is `NULL` + * - action client is invalid (never called init, called fini, or invalid) + * + * The returned string is only valid as long as the action client is valid. + * The value of the string may change if the topic name changes, and therefore + * copying the string is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client the pointer to the action client + * \return name string if successful, otherwise `NULL` + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +const char * +rcl_action_client_get_action_name(const rcl_action_client_t * action_client); + +/// Return the options for a rcl_action_client_t. +/** + * This function returns the action client's internal options struct. + * This function can fail, and therefore return `NULL`, if the: + * - action client is `NULL` + * - action client is invalid (never called init, called fini, or invalid) + * + * The returned struct is only valid as long as the action client is valid. + * The values in the struct may change if the action client's options change, + * and therefore copying the struct is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client pointer to the action client + * \return options struct if successful, otherwise `NULL` + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +const rcl_action_client_options_t * +rcl_action_client_get_options(const rcl_action_client_t * action_client); + +/// Check that a rcl_action_client_t is valid. +/** + * The bool returned is `false` if `action_client` is invalid. + * The bool returned is `true` otherwise. + * In the case where `false` is to be returned, an error message is set. + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_client pointer to the rcl action client + * \return `true` if `action_client` is valid, otherwise `false` + */ +RCL_ACTION_PUBLIC +bool +rcl_action_client_is_valid( + const rcl_action_client_t * action_client); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_set_goal_client_callback( + const rcl_action_client_t * action_client, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_set_cancel_client_callback( + const rcl_action_client_t * action_client, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_set_result_client_callback( + const rcl_action_client_t * action_client, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_set_feedback_subscription_callback( + const rcl_action_client_t * action_client, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_client_set_status_subscription_callback( + const rcl_action_client_t * action_client, + rcl_event_callback_t callback, + const void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL_ACTION__ACTION_CLIENT_H_ diff --git a/ThirdParty/ros/include/rcl_action/rcl_action/action_server.h b/ThirdParty/ros/include/rcl_action/rcl_action/action_server.h new file mode 100644 index 000000000..eb4f95ce9 --- /dev/null +++ b/ThirdParty/ros/include/rcl_action/rcl_action/action_server.h @@ -0,0 +1,962 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL_ACTION__ACTION_SERVER_H_ +#define RCL_ACTION__ACTION_SERVER_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl_action/goal_handle.h" +#include "rcl_action/types.h" +#include "rcl_action/visibility_control.h" +#include "rcl/event_callback.h" +#include "rcl/macros.h" +#include "rcl/node.h" +#include "rcl/time.h" + +#include "rosidl_runtime_c/action_type_support_struct.h" + +/// Internal rcl_action implementation struct. +typedef struct rcl_action_server_impl_s rcl_action_server_impl_t; + +/// Structure which encapsulates a ROS Action Server. +typedef struct rcl_action_server_s +{ + /// Pointer to the action server implementation + rcl_action_server_impl_t * impl; +} rcl_action_server_t; + +/// Options available for a rcl_action_server_t. +typedef struct rcl_action_server_options_s +{ + /// Middleware quality of service settings for the action server. + /// Goal service quality of service + rmw_qos_profile_t goal_service_qos; + /// Cancel service quality of service + rmw_qos_profile_t cancel_service_qos; + /// Result service quality of service + rmw_qos_profile_t result_service_qos; + /// Feedback topic quality of service + rmw_qos_profile_t feedback_topic_qos; + /// Status topic quality of service + rmw_qos_profile_t status_topic_qos; + /// Custom allocator for the action server, used for incidental allocations. + /** For default behavior (malloc/free), see: rcl_get_default_allocator() */ + rcl_allocator_t allocator; + /// Goal handles that have results longer than this time are deallocated. + rcl_duration_t result_timeout; +} rcl_action_server_options_t; + +/// Return a rcl_action_server_t struct with members set to `NULL`. +/** + * Should be called to get a null rcl_action_server_t before passing to + * rcl_action_server_init(). + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_server_t +rcl_action_get_zero_initialized_server(void); + +/// Initialize an action server. +/** + * After calling this function on a rcl_action_server_t, it can be used to take + * goals of the given type for the given action name using rcl_action_take_goal_request() + * and take cancel requests with rcl_action_take_cancel_request(). + * It can also send a result for a request using rcl_action_send_result() or + * rcl_action_send_cancel_response(). + * + * After accepting a goal with rcl_action_take_goal_request(), the action server can + * be used to send feedback with rcl_action_publish_feedback() and send status + * messages with rcl_action_publish_status(). + * + * The given rcl_node_t must be valid and the resulting rcl_action_server_t is + * only valid as long as the given rcl_node_t remains valid. + * + * The give rcl_clock_t must be valid and the resulting rcl_ction_server_t is + * only valid as long ast he given rcl_clock_t remains valid. + * + * The rosidl_action_type_support_t is obtained on a per .action type basis. + * When the user defines a ROS action, code is generated which provides the + * required rosidl_action_type_support_t object. + * This object can be obtained using a language appropriate mechanism. + * \todo TODO(jacobperron) write these instructions once and link to it instead + * + * For C, a macro can be used (for example `example_interfaces/Fibonacci`): + * + * ```c + * #include + * #include + * const rosidl_action_type_support_t * ts = + * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); + * ``` + * + * For C++, a template function is used: + * + * ```cpp + * #include + * #include + * using rosidl_typesupport_cpp::get_action_type_support_handle; + * const rosidl_action_type_support_t * ts = + * get_action_type_support_handle(); + * ``` + * + * The rosidl_action_type_support_t object contains action type specific + * information used to send or take goals, results, and feedback. + * + * The topic name must be a c string that follows the topic and service name + * format rules for unexpanded names, also known as non-fully qualified names: + * + * \see rcl_expand_topic_name + * + * The options struct allows the user to set the quality of service settings as + * well as a custom allocator that is used when initializing/finalizing the + * client to allocate space for incidentals, e.g. the action server name string. + * + * Expected usage (for C action servers): + * + * ```c + * #include + * #include + * #include + * #include + * + * rcl_node_t node = rcl_get_zero_initialized_node(); + * rcl_node_options_t node_ops = rcl_node_get_default_options(); + * rcl_ret_t ret = rcl_node_init(&node, "node_name", "/my_namespace", &node_ops); + * // ... error handling + * const rosidl_action_type_support_t * ts = + * ROSIDL_GET_ACTION_TYPE_SUPPORT(example_interfaces, Fibonacci); + * rcl_action_server_t action_server = rcl_action_get_zero_initialized_server(); + * rcl_action_server_options_t action_server_ops = rcl_action_server_get_default_options(); + * ret = rcl_action_server_init(&action_server, &node, ts, "fibonacci", &action_server_ops); + * // ... error handling, and on shutdown do finalization: + * ret = rcl_action_server_fini(&action_server, &node); + * // ... error handling for rcl_action_server_fini() + * ret = rcl_node_fini(&node); + * // ... error handling for rcl_node_fini() + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] action_server handle to a preallocated, zero-initialized action server structure + * to be initialized. + * \param[in] node valid node handle + * \param[in] clock valid clock handle + * \param[in] type_support type support object for the action's type + * \param[in] action_name the name of the action + * \param[in] options action_server options, including quality of service settings + * \return `RCL_RET_OK` if action_server was initialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_NODE_INVALID` if the node is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_NAME_INVALID` if the given action name is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_init( + rcl_action_server_t * action_server, + rcl_node_t * node, + rcl_clock_t * clock, + const rosidl_action_type_support_t * type_support, + const char * action_name, + const rcl_action_server_options_t * options); + +/// Finalize an action server. +/** + * After calling, the node will no longer listen to services and topics for this action server. + * (assuming this is the only action server of this type in this node). + * + * After calling, calls to rcl_wait(), rcl_action_take_goal_request(), + * rcl_action_take_cancel_request(), rcl_action_publish_feedback(), + * rcl_action_publish_status(), rcl_action_send_result(), and + * rcl_action_send_cancel_response() will fail when using this action server. + * Additionally, rcl_wait() will be interrupted if currently blocking. + * However, the given node handle is still valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] action_server handle to the action_server to be deinitialized + * \param[in] node handle to the node used to create the action server + * \return `RCL_RET_OK` if the action server was deinitialized successfully, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server pointer is null, or + * \return `RCL_RET_NODE_INVALID` if the node is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_fini(rcl_action_server_t * action_server, rcl_node_t * node); + +/// Return the default action server options in a rcl_action_server_options_t. +/** + * The defaults are: + * + * - goal_service_qos = rmw_qos_profile_services_default; + * - cancel_service_qos = rmw_qos_profile_services_default; + * - result_service_qos = rmw_qos_profile_services_default; + * - feedback_topic_qos = rmw_qos_profile_default; + * - status_topic_qos = rcl_action_qos_profile_status_default; + * - allocator = rcl_get_default_allocator(); + * - result_timeout = RCUTILS_S_TO_NS(15 * 60); // 15 minutes + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_server_options_t +rcl_action_server_get_default_options(void); + +/// Take a pending ROS goal using an action server. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_goal_request` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * `ros_goal_request` should point to a preallocated, zero-initialized, + * ROS goal message. + * If a goal request is taken successfully, it will be copied into `ros_goal_request`. + * + * If allocation is required when taking the request, e.g. if space needs to + * be allocated for a dynamically sized array in the target message, then the + * allocator given in the action server options is used. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] only if required when filling the request, avoided for fixed sizes + * + * \param[in] action_server handle to the action server that will take the request + * \param[out] request_header pointer to the goal request header + * \param[out] ros_goal_request a preallocated, zero-initialized, ROS goal request message + * where the request is copied + * \return `RCL_RET_OK` if the request was taken, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_goal_request( + const rcl_action_server_t * action_server, + rmw_request_id_t * request_header, + void * ros_goal_request); + +/// Send a response for a goal request to an action client using an action server. +/** + * This is a non-blocking call. + * + * The caller is responsible for ensuring that the type of `ros_goal_response` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * If the caller intends to send an 'accepted' response, before calling this function + * the caller should use rcl_action_accept_new_goal() to get a rcl_action_goal_handle_t + * for future interaction with the goal (e.g. publishing feedback and canceling the goal). + * + * This function is thread safe so long as access to both the action server and the + * `ros_goal_response` are synchronized. + * That means that calling rcl_action_send_goal_response() from multiple threads is + * allowed, but calling rcl_action_send_goal_response() at the same time as non-thread safe + * action server functions is not, e.g. calling rcl_action_send_goal_response() and + * rcl_action_server_fini() concurrently is not allowed. + * Before calling rcl_action_send_goal_response() the `ros_goal_request` can change and + * after calling rcl_action_send_goal_response() the `ros_goal_request` can change, but it + * cannot be changed during the rcl_action_send_goal_response() call. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | Yes + * [1] for unique pairs of action servers and responses, see above for more + * + * \param[in] action_server handle to the action server that will make the goal response + * \param[in] response_header pointer to the goal response header + * \param[in] ros_goal_response a ROS goal response message to send + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_goal_response( + const rcl_action_server_t * action_server, + rmw_request_id_t * response_header, + void * ros_goal_response); + +/// Accept a new goal using an action server. +/** + * This is a non-blocking call. + * + * Creates and returns a new goal handle. + * The action server starts tracking it internally. + * If a failure occurs, `NULL` is returned and an error message is set. + * Possible reasons for failure: + * - action server is invalid + * - goal info is invalid + * - goal ID is already being tracked by the action server + * - memory allocation failure + * + * This function should be called after receiving a new goal request with + * rcl_action_take_goal_request() and before sending a response with + * rcl_action_send_goal_response(). + * + * After calling this function, the action server will start tracking the goal. + * The pointer to the goal handle becomes invalid after `rcl_action_server_fini()` is called. + * The caller becomes responsible for finalizing the goal handle later. + * + * Example usage: + * + * ```c + * #include + * + * // ... init an action server + * // Take a goal request (client library type) + * rcl_ret_t ret = rcl_action_take_goal_request(&action_server, &goal_request); + * // ... error handling + * // If the goal is accepted, then tell the action server + * // First, create a goal info message + * rcl_action_goal_info_t goal_info = rcl_action_get_zero_initialized_goal_info(); + * // ... populate goal_info.uuid (unique_identifier_msgs/UUID) + * // ... populate goal_info.stamp (builtin_interfaces/Time) + * rcl_action_goal_handle_t * goal_handle = rcl_action_accept_new_goal(&action_server, &goal_info); + * // ... error_handling + * // ... Populate goal response (client library type) + * ret = rcl_action_send_goal_response(&action_server, &goal_response); + * // ... error handling, and sometime before shutdown finalize goal info message + * ret = rcl_action_goal_info_fini(&goal_info, &action_server); + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that is accepting the goal + * \param[in] goal_info a message containing info about the goal being accepted + * \return a pointer to a new goal handle representing the accepted goal, or + * \return `NULL` if a failure occured. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_goal_handle_t * +rcl_action_accept_new_goal( + rcl_action_server_t * action_server, + const rcl_action_goal_info_t * goal_info); + +/// Publish a ROS feedback message for an active goal using an action server. +/** + * The caller is responsible for ensuring that the type of `ros_feedback` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * This function acts like a ROS publisher and is potentially a blocking call. + * \see rcl_publish() + * + * This function is thread safe so long as access to both the action server and + * `ros_feedback` is synchronized. + * That means that calling rcl_action_publish_feedback() from multiple threads + * is allowed, but calling rcl_action_publish_feedback() at the same time as + * non-thread safe action server functions is not, e.g. calling + * rcl_action_publish_feedback() and rcl_action_server_fini() concurrently is not + * allowed. + * + * Before calling rcl_action_publish_feedback() the `ros_feedback` message ca + * change and after calling rcl_action_publish_feedback() the `ros_feedback` message + * can change, but it cannot be changed during the publish call. + * The same `ros_feedback` can be passed to multiple calls of + * rcl_action_publish_feedback() simultaneously, even if the action servers differ. + * `ros_feedback` is unmodified by rcl_action_publish_feedback(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes [1] + * Uses Atomics | No + * Lock-Free | Yes + * [1] for unique pairs of action servers and feedback, see above for more + * + * \param[in] action_server handle to the action server that will publish the feedback + * \param[in] ros_feedback a ROS message containing the goal feedback + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. * + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_publish_feedback( + const rcl_action_server_t * action_server, + void * ros_feedback); + +/// Get a status array message for accepted goals associated with an action server. +/** + * The provided `status_message` should be zero-initialized with + * rcl_action_get_zero_initialized_goal_status_array() before calling this function. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will publish the status message + * \param[out] status_message an action_msgs/StatusArray ROS message + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_get_goal_status_array( + const rcl_action_server_t * action_server, + rcl_action_goal_status_array_t * status_message); + +/// Publish a status array message for accepted goals associated with an action server. +/** + * This function acts like a ROS publisher and is potentially a blocking call. + * \see rcl_publish() + * + * A status array message associated with the action server can be created with + * rcl_action_get_goal_status_array(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will publish the status message + * \param[in] status_message an action_msgs/StatusArray ROS message to publish + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_publish_status( + const rcl_action_server_t * action_server, + const void * status_message); + +/// Take a pending result request using an action server. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_result_request` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will take the result request + * \param[out] request_header pointer to the result request header + * \param[out] ros_result_request a preallocated ROS result request message where the + * request is copied. + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_result_request( + const rcl_action_server_t * action_server, + rmw_request_id_t * request_header, + void * ros_result_request); + +/// Send a result response using an action server. +/** + * This is a non-blocking call. + * + * The caller is responsible for ensuring that the type of `ros_result_response` + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * Before calling this function, the caller should use rcl_action_update_goal_state() + * to update the goals state to the appropriate terminal state. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will send the result response + * \param[in] response_header pointer to the result response header + * \param[in] ros_result_response a ROS result response message to send + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_result_response( + const rcl_action_server_t * action_server, + rmw_request_id_t * response_header, + void * ros_result_response); + +/// Expires goals associated with an action server. +/** + * A goal is 'expired' if it has been in a terminal state (has a result) for longer + * than some duration. + * The timeout duration is set as part of the action server options. + * + * If a negative timeout value if provided, then goal results never expire (kept forever). + * If a timeout of zero is set, then goal results are discarded immediately (ie. goal + * results are discarded whenever this function is called). + * + * Expired goals are removed from the internal array of goal handles. + * rcl_action_server_goal_exists() will return false for any goals that have expired. + * + * \attention If one or more goals are expired then a previously returned goal handle + * array from rcl_action_server_get_goal_handles() becomes invalid. + * + * `expired_goals`, `expired_goals_capacity` and `num_expired` are optional arguments. + * If set to (`NULL`, 0u, `NULL`) then they are not used. + * To use them allocate an array with size equal to the maximum number of goals that you want to + * expire. + * Pass the number of goals the array can hold in as `expired_goals_capacity`. + * This function will set `num_expired` to the number of goals that were expired. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe[1] + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * [1] if one or more goals expires, then the internal goal handle array may be + * resized or deallocated + * + * \param[in] action_server handle to the action server from which expired goals + * will be cleared. + * \param[inout] expired_goals the identifiers of goals that expired, or set to `NULL` if unused + * \param[inout] expired_goals_capacity the allocated size of `expired_goals`, or 0 if unused + * \param[out] num_expired the number of expired goals, or set to `NULL` if unused + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_expire_goals( + const rcl_action_server_t * action_server, + rcl_action_goal_info_t * expired_goals, + size_t expired_goals_capacity, + size_t * num_expired); + +/// Notifies action server that a goal handle reached a terminal state. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \return `RCL_RET_OK` if everything is ok, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_notify_goal_done( + const rcl_action_server_t * action_server); + +/// Take a pending cancel request using an action server. +/** + * \todo TODO(jacobperron) blocking of take? + * + * \todo TODO(jacobperron) pre-, during-, and post-conditions for message ownership? + * + * \todo TODO(jacobperron) is this thread-safe? + * + * The caller is responsible for ensuring that the type of `ros_cancel_request`_ + * and the type associate with the client (via the type support) match. + * Passing a different type produces undefined behavior and cannot be checked + * by this function and therefore no deliberate error will occur. + * + * After receiving a successful cancel request, the appropriate goals can be + * transitioned to the state CANCELING using rcl_action_process_cancel_request(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will take the cancel request + * \param[out] request_header pointer to the cancel request header + * \param[out] ros_cancel_request a preallocated ROS cancel request where the request + * message is copied + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ACTION_SERVER_TAKE_FAILED` if take failed but no error occurred + * in the middleware, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_take_cancel_request( + const rcl_action_server_t * action_server, + rmw_request_id_t * request_header, + void * ros_cancel_request); + +/// Process a cancel request using an action server. +/** + * This is a non-blocking call. + * + * This function will compute a list of goals that a cancelation request is attempting to cancel. + * It does not change the state of any goal. + * The following cancel policy applies based on the goal ID and the timestamp + * contained in the cancel request: + * + * - If the goal ID is zero and timestamp is zero, cancel all goals. + * - If the goal ID is zero and timestamp is not zero, cancel all goals accepted + * at or before the timestamp. + * - If the goal ID is not zero and timestamp is zero, cancel the goal with the + * given ID regardless of the time it was accepted. + * - If the goal ID is not zero and timestamp is not zero, cancel the goal with the + * given ID and all goals accepted at or before the timestamp. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will process the cancel request + * \param[in] cancel_request a C-typed ROS cancel request to process + * \param[out] cancel_response a zero-initialized cancel response struct + * where the goal info of goals which should be cancelled are copied + * \return `RCL_RET_OK` if the response was sent successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_process_cancel_request( + const rcl_action_server_t * action_server, + const rcl_action_cancel_request_t * cancel_request, + rcl_action_cancel_response_t * cancel_response); + +/// Send a cancel response using an action server. +/** + * This is a non-blocking call. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server that will send the cancel response + * \param[in] response_header pointer to the cancel response header + * \param[in] ros_cancel_response a ROS cancel response to send + * \return `RCL_RET_OK` if the request was taken, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_send_cancel_response( + const rcl_action_server_t * action_server, + rmw_request_id_t * response_header, + void * ros_cancel_response); + +/// Get the action name for an action server. +/** + * This function returns the action server's internal topic name string. + * This function can fail, and therefore return `NULL`, if the: + * - action server is `NULL` + * - action server is invalid (e.g. never called init or called fini) + * + * The returned string is only valid as long as the action server is valid. + * The value of the string may change if the topic name changes, and therefore + * copying the string is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server pointer to the action server + * \return name string if successful, or + * \return `NULL` otherwise. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +const char * +rcl_action_server_get_action_name(const rcl_action_server_t * action_server); + +/// Return the rcl_action_server_options_t for an action server. +/** + * This function returns the action server's internal options struct. + * This function can fail, and therefore return `NULL`, if the: + * - action server is `NULL` + * - action server is invalid (e.g. never called init or called fini) + * + * The returned struct is only valid as long as the action server is valid. + * The values in the struct may change if the action server's options change, + * and therefore copying the struct is recommended if this is a concern. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \return options struct if successful, or + * \return `NULL` otherwise. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +const rcl_action_server_options_t * +rcl_action_server_get_options(const rcl_action_server_t * action_server); + +/// Get the goal handles for all goals an action server is tracking. +/** + * A pointer to the internally held array of pointers to goal handle structs is returned + * along with the number of items in the array. + * + * The returned handle is made invalid if the action server is finalized, if + * rcl_shutdown() is called, or if rcl_action_expire_goals() is called and one or more + * goals are expired. + * The returned handle is not guaranteed to be valid for the life time of the + * action server as it may be finalized and recreated itself. + * Therefore, it is recommended to get the handle from the action server using + * this function each time it is needed and avoid use of the handle + * concurrently with functions that might change it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \param[out] goal_handles is set to the array of pointers to goal handles if successful. + * \param[out] num_goals is set to the number of goals in the returned array if successful, + * not set otherwise. + * \return `RCL_RET_OK` if successful, or + * \return `RCL_RET_ACTION_SERVER_INVALID` if the action server is invalid, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_get_goal_handles( + const rcl_action_server_t * action_server, + rcl_action_goal_handle_t *** goal_handles, + size_t * num_goals); + +/// Check if a goal is already being tracked by an action server. +/** + * Checks whether or not a goal is being tracked in the internal goal array. + * The goal state has no effect on the return value. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \param[in] goal_info handle to a struct containing the goal ID to check for + * \return `true` if `action_server` is currently tracking a goal with the provided goal ID, or + * \return `false` otherwise. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +bool +rcl_action_server_goal_exists( + const rcl_action_server_t * action_server, + const rcl_action_goal_info_t * goal_info); + +/// Check if an action server is valid. +/** + * In the case where `false` is returned (ie. the action server is invalid), + * an error message is set. + * + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \return `true` if `action_server` is valid, or + * \return `false` otherwise. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +bool +rcl_action_server_is_valid(const rcl_action_server_t * action_server); + +/// Check if an action server is valid without erroring if the library is shutting down. +/** + * In the case where `false` is returned (ie. the action server is invalid), + * an error message is set. + * + * This function cannot fail. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] action_server handle to the action server + * \return `true` if `action_server` is valid, or + * \return `false` otherwise. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +bool +rcl_action_server_is_valid_except_context(const rcl_action_server_t * action_server); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_set_goal_service_callback( + const rcl_action_server_t * action_server, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_set_cancel_service_callback( + const rcl_action_server_t * action_server, + rcl_event_callback_t callback, + const void * user_data); + +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_server_set_result_service_callback( + const rcl_action_server_t * action_server, + rcl_event_callback_t callback, + const void * user_data); + +#ifdef __cplusplus +} +#endif + +#endif // RCL_ACTION__ACTION_SERVER_H_ diff --git a/ThirdParty/ros/include/rcl_action/default_qos.h b/ThirdParty/ros/include/rcl_action/rcl_action/default_qos.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/default_qos.h rename to ThirdParty/ros/include/rcl_action/rcl_action/default_qos.h diff --git a/ThirdParty/ros/include/rcl_action/goal_handle.h b/ThirdParty/ros/include/rcl_action/rcl_action/goal_handle.h similarity index 98% rename from ThirdParty/ros/include/rcl_action/goal_handle.h rename to ThirdParty/ros/include/rcl_action/rcl_action/goal_handle.h index 8fd336776..1cabc7088 100644 --- a/ThirdParty/ros/include/rcl_action/goal_handle.h +++ b/ThirdParty/ros/include/rcl_action/rcl_action/goal_handle.h @@ -27,13 +27,13 @@ extern "C" /// Internal rcl action goal implementation struct. -struct rcl_action_goal_handle_impl_t; +typedef struct rcl_action_goal_handle_impl_s rcl_action_goal_handle_impl_t; /// Goal handle for an action. -typedef struct rcl_action_goal_handle_t +typedef struct rcl_action_goal_handle_s { /// Pointer to the action goal handle implementation - struct rcl_action_goal_handle_impl_t * impl; + rcl_action_goal_handle_impl_t * impl; } rcl_action_goal_handle_t; /// Return a rcl_action_goal_handle_t struct with members set to `NULL`. diff --git a/ThirdParty/ros/include/rcl_action/goal_state_machine.h b/ThirdParty/ros/include/rcl_action/rcl_action/goal_state_machine.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/goal_state_machine.h rename to ThirdParty/ros/include/rcl_action/rcl_action/goal_state_machine.h diff --git a/ThirdParty/ros/include/rcl_action/graph.h b/ThirdParty/ros/include/rcl_action/rcl_action/graph.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/graph.h rename to ThirdParty/ros/include/rcl_action/rcl_action/graph.h diff --git a/ThirdParty/ros/include/rcl_action/names.h b/ThirdParty/ros/include/rcl_action/rcl_action/names.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/names.h rename to ThirdParty/ros/include/rcl_action/rcl_action/names.h diff --git a/ThirdParty/ros/include/rcl_action/rcl_action.h b/ThirdParty/ros/include/rcl_action/rcl_action/rcl_action.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/rcl_action.h rename to ThirdParty/ros/include/rcl_action/rcl_action/rcl_action.h diff --git a/ThirdParty/ros/include/rcl_action/rcl_action/types.h b/ThirdParty/ros/include/rcl_action/rcl_action/types.h new file mode 100644 index 000000000..c34bd42db --- /dev/null +++ b/ThirdParty/ros/include/rcl_action/rcl_action/types.h @@ -0,0 +1,300 @@ +// Copyright 2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL_ACTION__TYPES_H_ +#define RCL_ACTION__TYPES_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcl_action/visibility_control.h" + +#include "action_msgs/msg/goal_info.h" +#include "action_msgs/msg/goal_status.h" +#include "action_msgs/msg/goal_status_array.h" +#include "action_msgs/srv/cancel_goal.h" + +#include "rcl/allocator.h" +#include "rcl/macros.h" +#include "rcl/types.h" + +#include "rosidl_runtime_c/action_type_support_struct.h" + +// rcl action specific ret codes in 2XXX +/// Action name does not pass validation return code. +#define RCL_RET_ACTION_NAME_INVALID 2000 +/// Action goal accepted return code. +#define RCL_RET_ACTION_GOAL_ACCEPTED 2100 +/// Action goal rejected return code. +#define RCL_RET_ACTION_GOAL_REJECTED 2101 +/// Action client is invalid return code. +#define RCL_RET_ACTION_CLIENT_INVALID 2102 +/// Action client failed to take response return code. +#define RCL_RET_ACTION_CLIENT_TAKE_FAILED 2103 +/// Action server is invalid return code. +#define RCL_RET_ACTION_SERVER_INVALID 2200 +/// Action server failed to take request return code. +#define RCL_RET_ACTION_SERVER_TAKE_FAILED 2201 +/// Action goal handle invalid return code. +#define RCL_RET_ACTION_GOAL_HANDLE_INVALID 2300 +/// Action invalid event return code. +#define RCL_RET_ACTION_GOAL_EVENT_INVALID 2301 + +// TODO(jacobperron): Move these to a common place for UUIDs +#define UUID_SIZE 16 +#define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE)) +#define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +#define uuidcmpzero(uuid) uuidcmp(uuid, (zerouuid)) + +// Typedef generated messages for convenience +typedef action_msgs__msg__GoalInfo rcl_action_goal_info_t; +typedef action_msgs__msg__GoalStatus rcl_action_goal_status_t; +/// Struct with the action goal status array +typedef struct rcl_action_goal_status_array_s +{ + /// Goal status array message + action_msgs__msg__GoalStatusArray msg; + /// Allocator used to initialize this struct. + rcl_allocator_t allocator; +} rcl_action_goal_status_array_t; +typedef action_msgs__srv__CancelGoal_Request rcl_action_cancel_request_t; +/// Struct with the action cancel response +typedef struct rcl_action_cancel_response_s +{ + /// Cancel goal response message + action_msgs__srv__CancelGoal_Response msg; + /// Allocator used to initialize this struct. + rcl_allocator_t allocator; +} rcl_action_cancel_response_t; + +/// Goal states +// TODO(jacobperron): Let states be defined by action_msgs/msg/goal_status.h +// Ideally, we could use an enum type directly from the message when the feature +// is available. Issue: https://github.com/ros2/rosidl/issues/260 +typedef int8_t rcl_action_goal_state_t; +#define GOAL_STATE_UNKNOWN action_msgs__msg__GoalStatus__STATUS_UNKNOWN +#define GOAL_STATE_ACCEPTED action_msgs__msg__GoalStatus__STATUS_ACCEPTED +#define GOAL_STATE_EXECUTING action_msgs__msg__GoalStatus__STATUS_EXECUTING +#define GOAL_STATE_CANCELING action_msgs__msg__GoalStatus__STATUS_CANCELING +#define GOAL_STATE_SUCCEEDED action_msgs__msg__GoalStatus__STATUS_SUCCEEDED +#define GOAL_STATE_CANCELED action_msgs__msg__GoalStatus__STATUS_CANCELED +#define GOAL_STATE_ABORTED action_msgs__msg__GoalStatus__STATUS_ABORTED +#define GOAL_STATE_NUM_STATES 7 + +/// User friendly error messages for invalid trasntions +// Description variables in types.c should be changed if enum values change +extern const char * goal_state_descriptions[]; +extern const char * goal_event_descriptions[]; + +/// Goal state transition events +typedef enum rcl_action_goal_event_e +{ + GOAL_EVENT_EXECUTE = 0, + GOAL_EVENT_CANCEL_GOAL, + GOAL_EVENT_SUCCEED, + GOAL_EVENT_ABORT, + GOAL_EVENT_CANCELED, + GOAL_EVENT_NUM_EVENTS +} rcl_action_goal_event_t; + +/// Return a rcl_action_goal_info_t with members set to zero values. +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_goal_info_t +rcl_action_get_zero_initialized_goal_info(void); + +/// Return a rcl_action_goal_status_array_t with members set to `NULL`. +/** + * Should be called to get a null rcl_action_goal_status_array_t before passing to + * rcl_action_server_get_goal_status_array(). + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_goal_status_array_t +rcl_action_get_zero_initialized_goal_status_array(void); + +/// Return a rcl_action_cancel_request_t with members set to `NULL`. +/** + * Should be called to get a null rcl_action_cancel_request_t before passing to + * + * rcl_action_cancel_request_init(). + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_cancel_request_t +rcl_action_get_zero_initialized_cancel_request(void); + +/// Return a rcl_action_cancel_response_t with members set to `NULL`. +/** + * Should be called to get a null rcl_action_cancel_response_t before passing to + * rcl_action_cancel_response_init(). + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_action_cancel_response_t +rcl_action_get_zero_initialized_cancel_response(void); + +/// Initialize a rcl_action_goal_status_array_t. +/** + * After calling this function on a rcl_action_goal_status_array_t, it can be populated + * and used to get and send status array messages with an action server using + * rcl_action_get_goal_status_array() and rcl_action_publish_status() respectively. + * + * Example usage: + * + * ```c + * #include + * #include + * + * rcl_action_goal_status_array_t goal_status_array = + * rcl_action_get_zero_initialized_goal_status_array(); + * size_t num_status = 42; + * ret = rcl_action_goal_status_array_init( + * &goal_status_array, + * num_status, + * rcl_get_default_allocator()); + * // ... error handling, and when done with message, finalize + * ret = rcl_action_goal_status_array_fini(&goal_status_array, rcl_get_default_allocator()); + * // ... error handling + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] status_array a preallocated, zero-initialized, goal status array message + * to be initialized. + * \param[in] num_status the number of status messages to allocate space for. + * Must be greater than zero + * \param[in] allocator a valid allocator + * \return `RCL_RET_OK` if cancel response was initialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ALREADY_INIT` if the status array has already been initialized, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_goal_status_array_init( + rcl_action_goal_status_array_t * status_array, + const size_t num_status, + const rcl_allocator_t allocator); + +/// Finalize a rcl_action_goal_status_array_t. +/** + * After calling, the goal status array message will no longer be valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] status_array the goal status array message to be deinitialized + * \return `RCL_RET_OK` if the goal status array was deinitialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_goal_status_array_fini(rcl_action_goal_status_array_t * status_array); + +/// Initialize a rcl_action_cancel_response_t. +/** + * After calling this function on a rcl_action_cancel_response_t, it can be populated + * and used to process cancel requests with an action server using + * rcl_action_process_cancel_request(). + * + * Example usage: + * + * ```c + * #include + * #include + * + * rcl_action_cancel_response_t cancel_response = + * rcl_action_get_zero_initialized_cancel_response(); + * size_t num_goals_canceling = 10; + * ret = rcl_action_cancel_response_init( + * &cancel_response, + * num_goals_canceling, + * rcl_get_default_allocator()); + * // ... error handling, and when done processing response, finalize + * ret = rcl_action_cancel_response_fini(&cancel_response, rcl_get_default_allocator()); + * // ... error handling + * ``` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] cancel_response a preallocated, zero-initialized, cancel response message + * to be initialized. + * \param[in] num_goals_canceling the number of goals that are canceling to add to the response + * Must be greater than zero + * \param[in] allocator a valid allocator + * \return `RCL_RET_OK` if cancel response was initialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ALREADY_INIT` if the cancel response has already been initialized, or + * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_cancel_response_init( + rcl_action_cancel_response_t * cancel_response, + const size_t num_goals_canceling, + const rcl_allocator_t allocator); + +/// Finalize a rcl_action_cancel_response_t. +/** + * After calling, the cancel response message will no longer be valid. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[inout] cancel_response the cancel response message to be deinitialized + * \return `RCL_RET_OK` if the cancel response was deinitialized successfully, or + * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RCL_RET_ERROR` if an unspecified error occurs. + */ +RCL_ACTION_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_action_cancel_response_fini(rcl_action_cancel_response_t * cancel_response); + +#ifdef __cplusplus +} +#endif + +#endif // RCL_ACTION__TYPES_H_ diff --git a/ThirdParty/ros/include/rcl_action/visibility_control.h b/ThirdParty/ros/include/rcl_action/rcl_action/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/visibility_control.h rename to ThirdParty/ros/include/rcl_action/rcl_action/visibility_control.h diff --git a/ThirdParty/ros/include/rcl_action/wait.h b/ThirdParty/ros/include/rcl_action/rcl_action/wait.h similarity index 100% rename from ThirdParty/ros/include/rcl_action/wait.h rename to ThirdParty/ros/include/rcl_action/rcl_action/wait.h diff --git a/ThirdParty/ros/include/rcl_action/types.h b/ThirdParty/ros/include/rcl_action/types.h deleted file mode 100644 index d5f60e446..000000000 --- a/ThirdParty/ros/include/rcl_action/types.h +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL_ACTION__TYPES_H_ -#define RCL_ACTION__TYPES_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcl_action/visibility_control.h" - -#include "action_msgs/msg/goal_info.h" -#include "action_msgs/msg/goal_status.h" -#include "action_msgs/msg/goal_status_array.h" -#include "action_msgs/srv/cancel_goal.h" - -#include "rcl/allocator.h" -#include "rcl/macros.h" -#include "rcl/types.h" - -#include "rosidl_runtime_c/action_type_support_struct.h" - -// rcl action specific ret codes in 2XXX -/// Action name does not pass validation return code. -#define RCL_RET_ACTION_NAME_INVALID 2000 -/// Action goal accepted return code. -#define RCL_RET_ACTION_GOAL_ACCEPTED 2100 -/// Action goal rejected return code. -#define RCL_RET_ACTION_GOAL_REJECTED 2101 -/// Action client is invalid return code. -#define RCL_RET_ACTION_CLIENT_INVALID 2102 -/// Action client failed to take response return code. -#define RCL_RET_ACTION_CLIENT_TAKE_FAILED 2103 -/// Action server is invalid return code. -#define RCL_RET_ACTION_SERVER_INVALID 2200 -/// Action server failed to take request return code. -#define RCL_RET_ACTION_SERVER_TAKE_FAILED 2201 -/// Action goal handle invalid return code. -#define RCL_RET_ACTION_GOAL_HANDLE_INVALID 2300 -/// Action invalid event return code. -#define RCL_RET_ACTION_GOAL_EVENT_INVALID 2301 - -// TODO(jacobperron): Move these to a common place for UUIDs -#define UUID_SIZE 16 -#define uuidcmp(uuid0, uuid1) (0 == memcmp(uuid0, uuid1, UUID_SIZE)) -#define zerouuid (uint8_t[UUID_SIZE]) {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define uuidcmpzero(uuid) uuidcmp(uuid, (zerouuid)) - -// Forward declare -typedef struct rcl_action_server_t rcl_action_server_t; - -// Typedef generated messages for convenience -typedef action_msgs__msg__GoalInfo rcl_action_goal_info_t; -typedef action_msgs__msg__GoalStatus rcl_action_goal_status_t; -/// Struct with the action goal status array -typedef struct rcl_action_goal_status_array_t -{ - /// Goal status array message - action_msgs__msg__GoalStatusArray msg; - /// Allocator used to initialize this struct. - rcl_allocator_t allocator; -} rcl_action_goal_status_array_t; -typedef action_msgs__srv__CancelGoal_Request rcl_action_cancel_request_t; -/// Struct with the action cancel response -typedef struct rcl_action_cancel_response_t -{ - /// Cancel goal response message - action_msgs__srv__CancelGoal_Response msg; - /// Allocator used to initialize this struct. - rcl_allocator_t allocator; -} rcl_action_cancel_response_t; - -/// Goal states -// TODO(jacobperron): Let states be defined by action_msgs/msg/goal_status.h -// Ideally, we could use an enum type directly from the message when the feature -// is available. Issue: https://github.com/ros2/rosidl/issues/260 -typedef int8_t rcl_action_goal_state_t; -#define GOAL_STATE_UNKNOWN action_msgs__msg__GoalStatus__STATUS_UNKNOWN -#define GOAL_STATE_ACCEPTED action_msgs__msg__GoalStatus__STATUS_ACCEPTED -#define GOAL_STATE_EXECUTING action_msgs__msg__GoalStatus__STATUS_EXECUTING -#define GOAL_STATE_CANCELING action_msgs__msg__GoalStatus__STATUS_CANCELING -#define GOAL_STATE_SUCCEEDED action_msgs__msg__GoalStatus__STATUS_SUCCEEDED -#define GOAL_STATE_CANCELED action_msgs__msg__GoalStatus__STATUS_CANCELED -#define GOAL_STATE_ABORTED action_msgs__msg__GoalStatus__STATUS_ABORTED -#define GOAL_STATE_NUM_STATES 7 - -/// User friendly error messages for invalid trasntions -// Description variables in types.c should be changed if enum values change -extern const char * goal_state_descriptions[]; -extern const char * goal_event_descriptions[]; - -/// Goal state transition events -typedef enum rcl_action_goal_event_t -{ - GOAL_EVENT_EXECUTE = 0, - GOAL_EVENT_CANCEL_GOAL, - GOAL_EVENT_SUCCEED, - GOAL_EVENT_ABORT, - GOAL_EVENT_CANCELED, - GOAL_EVENT_NUM_EVENTS -} rcl_action_goal_event_t; - -/// Return a rcl_action_goal_info_t with members set to zero values. -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_goal_info_t -rcl_action_get_zero_initialized_goal_info(void); - -/// Return a rcl_action_goal_status_array_t with members set to `NULL`. -/** - * Should be called to get a null rcl_action_goal_status_array_t before passing to - * rcl_action_server_get_goal_status_array(). - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_goal_status_array_t -rcl_action_get_zero_initialized_goal_status_array(void); - -/// Return a rcl_action_cancel_request_t with members set to `NULL`. -/** - * Should be called to get a null rcl_action_cancel_request_t before passing to - * - * rcl_action_cancel_request_init(). - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_cancel_request_t -rcl_action_get_zero_initialized_cancel_request(void); - -/// Return a rcl_action_cancel_response_t with members set to `NULL`. -/** - * Should be called to get a null rcl_action_cancel_response_t before passing to - * rcl_action_cancel_response_init(). - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_action_cancel_response_t -rcl_action_get_zero_initialized_cancel_response(void); - -/// Initialize a rcl_action_goal_status_array_t. -/** - * After calling this function on a rcl_action_goal_status_array_t, it can be populated - * and used to get and send status array messages with an action server using - * rcl_action_get_goal_status_array() and rcl_action_publish_status() respectively. - * - * Example usage: - * - * ```c - * #include - * #include - * - * rcl_action_goal_status_array_t goal_status_array = - * rcl_action_get_zero_initialized_goal_status_array(); - * size_t num_status = 42; - * ret = rcl_action_goal_status_array_init( - * &goal_status_array, - * num_status, - * rcl_get_default_allocator()); - * // ... error handling, and when done with message, finalize - * ret = rcl_action_goal_status_array_fini(&goal_status_array, rcl_get_default_allocator()); - * // ... error handling - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] status_array a preallocated, zero-initialized, goal status array message - * to be initialized. - * \param[in] num_status the number of status messages to allocate space for. - * Must be greater than zero - * \param[in] allocator a valid allocator - * \return `RCL_RET_OK` if cancel response was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_INIT` if the status array has already been initialized, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_goal_status_array_init( - rcl_action_goal_status_array_t * status_array, - const size_t num_status, - const rcl_allocator_t allocator); - -/// Finalize a rcl_action_goal_status_array_t. -/** - * After calling, the goal status array message will no longer be valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] status_array the goal status array message to be deinitialized - * \return `RCL_RET_OK` if the goal status array was deinitialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_goal_status_array_fini(rcl_action_goal_status_array_t * status_array); - -/// Initialize a rcl_action_cancel_response_t. -/** - * After calling this function on a rcl_action_cancel_response_t, it can be populated - * and used to process cancel requests with an action server using - * rcl_action_process_cancel_request(). - * - * Example usage: - * - * ```c - * #include - * #include - * - * rcl_action_cancel_response_t cancel_response = - * rcl_action_get_zero_initialized_cancel_response(); - * size_t num_goals_canceling = 10; - * ret = rcl_action_cancel_response_init( - * &cancel_response, - * num_goals_canceling, - * rcl_get_default_allocator()); - * // ... error handling, and when done processing response, finalize - * ret = rcl_action_cancel_response_fini(&cancel_response, rcl_get_default_allocator()); - * // ... error handling - * ``` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] cancel_response a preallocated, zero-initialized, cancel response message - * to be initialized. - * \param[in] num_goals_canceling the number of goals that are canceling to add to the response - * Must be greater than zero - * \param[in] allocator a valid allocator - * \return `RCL_RET_OK` if cancel response was initialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ALREADY_INIT` if the cancel response has already been initialized, or - * \return `RCL_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_cancel_response_init( - rcl_action_cancel_response_t * cancel_response, - const size_t num_goals_canceling, - const rcl_allocator_t allocator); - -/// Finalize a rcl_action_cancel_response_t. -/** - * After calling, the cancel response message will no longer be valid. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[inout] cancel_response the cancel response message to be deinitialized - * \return `RCL_RET_OK` if the cancel response was deinitialized successfully, or - * \return `RCL_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_ACTION_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_action_cancel_response_fini(rcl_action_cancel_response_t * cancel_response); - -#ifdef __cplusplus -} -#endif - -#endif // RCL_ACTION__TYPES_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.h deleted file mode 100644 index 6d5d5654f..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.h +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/FloatingPointRange.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/FloatingPointRange in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__FloatingPointRange -{ - double from_value; - double to_value; - double step; -} rcl_interfaces__msg__FloatingPointRange; - -// Struct for a sequence of rcl_interfaces__msg__FloatingPointRange. -typedef struct rcl_interfaces__msg__FloatingPointRange__Sequence -{ - rcl_interfaces__msg__FloatingPointRange * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__FloatingPointRange__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__traits.hpp deleted file mode 100644 index f84b683d6..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/FloatingPointRange.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/floating_point_range__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::FloatingPointRange"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/FloatingPointRange"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.c deleted file mode 100644 index f19430c88..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/FloatingPointRange.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/floating_point_range__functions.h" -#include "rcl_interfaces/msg/detail/floating_point_range__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_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; - rcl_interfaces__msg__FloatingPointRange__init(message_memory); -} - -void FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_fini_function(void * message_memory) -{ - rcl_interfaces__msg__FloatingPointRange__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_member_array[3] = { - { - "from_value", // 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(rcl_interfaces__msg__FloatingPointRange, from_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "to_value", // 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(rcl_interfaces__msg__FloatingPointRange, to_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "step", // 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(rcl_interfaces__msg__FloatingPointRange, step), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_members = { - "rcl_interfaces__msg", // message namespace - "FloatingPointRange", // message name - 3, // number of fields - sizeof(rcl_interfaces__msg__FloatingPointRange), - FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_member_array, // message members - FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_init_function, // function to initialize message memory (memory has to be allocated) - FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_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 FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle = { - 0, - &FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, FloatingPointRange)() { - if (!FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle.typesupport_identifier) { - FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.h deleted file mode 100644 index 377149d48..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.h +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/IntegerRange.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/IntegerRange in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__IntegerRange -{ - int64_t from_value; - int64_t to_value; - uint64_t step; -} rcl_interfaces__msg__IntegerRange; - -// Struct for a sequence of rcl_interfaces__msg__IntegerRange. -typedef struct rcl_interfaces__msg__IntegerRange__Sequence -{ - rcl_interfaces__msg__IntegerRange * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__IntegerRange__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__traits.hpp deleted file mode 100644 index 6279b4f05..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/IntegerRange.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/integer_range__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::IntegerRange"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/IntegerRange"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.c deleted file mode 100644 index f67c1b9ee..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/IntegerRange.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/integer_range__functions.h" -#include "rcl_interfaces/msg/detail/integer_range__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_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; - rcl_interfaces__msg__IntegerRange__init(message_memory); -} - -void IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_fini_function(void * message_memory) -{ - rcl_interfaces__msg__IntegerRange__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_member_array[3] = { - { - "from_value", // 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(rcl_interfaces__msg__IntegerRange, from_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "to_value", // 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(rcl_interfaces__msg__IntegerRange, to_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "step", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__IntegerRange, step), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_members = { - "rcl_interfaces__msg", // message namespace - "IntegerRange", // message name - 3, // number of fields - sizeof(rcl_interfaces__msg__IntegerRange), - IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_member_array, // message members - IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_init_function, // function to initialize message memory (memory has to be allocated) - IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_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 IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle = { - 0, - &IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, IntegerRange)() { - if (!IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle.typesupport_identifier) { - IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp deleted file mode 100644 index 4de3c7504..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ListParametersResult.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/list_parameters_result__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ListParametersResult"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ListParametersResult"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.c deleted file mode 100644 index b9b3f271f..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.c +++ /dev/null @@ -1,101 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ListParametersResult.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/list_parameters_result__functions.h" -#include "rcl_interfaces/msg/detail/list_parameters_result__struct.h" - - -// Include directives for member types -// Member `names` -// Member `prefixes` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_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; - rcl_interfaces__msg__ListParametersResult__init(message_memory); -} - -void ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ListParametersResult__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_member_array[2] = { - { - "names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ListParametersResult, names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "prefixes", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ListParametersResult, prefixes), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_members = { - "rcl_interfaces__msg", // message namespace - "ListParametersResult", // message name - 2, // number of fields - sizeof(rcl_interfaces__msg__ListParametersResult), - ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_member_array, // message members - ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_init_function, // function to initialize message memory (memory has to be allocated) - ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_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 ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle = { - 0, - &ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ListParametersResult)() { - if (!ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle.typesupport_identifier) { - ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.h deleted file mode 100644 index 26cc5fffb..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.h +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/Log.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'DEBUG'. -enum -{ - rcl_interfaces__msg__Log__DEBUG = 10 -}; - -/// Constant 'INFO'. -enum -{ - rcl_interfaces__msg__Log__INFO = 20 -}; - -/// Constant 'WARN'. -enum -{ - rcl_interfaces__msg__Log__WARN = 30 -}; - -/// Constant 'ERROR'. -enum -{ - rcl_interfaces__msg__Log__ERROR = 40 -}; - -/// Constant 'FATAL'. -enum -{ - rcl_interfaces__msg__Log__FATAL = 50 -}; - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__struct.h" -// Member 'name' -// Member 'msg' -// Member 'file' -// Member 'function' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/Log in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__Log -{ - builtin_interfaces__msg__Time stamp; - uint8_t level; - rosidl_runtime_c__String name; - rosidl_runtime_c__String msg; - rosidl_runtime_c__String file; - rosidl_runtime_c__String function; - uint32_t line; -} rcl_interfaces__msg__Log; - -// Struct for a sequence of rcl_interfaces__msg__Log. -typedef struct rcl_interfaces__msg__Log__Sequence -{ - rcl_interfaces__msg__Log * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__Log__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__traits.hpp deleted file mode 100644 index 3ec4040e6..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/Log.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/log__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::Log"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/Log"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.c deleted file mode 100644 index 63f5f98e2..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.c +++ /dev/null @@ -1,184 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/Log.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/log__functions.h" -#include "rcl_interfaces/msg/detail/log__struct.h" - - -// Include directives for member types -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `name` -// Member `msg` -// Member `file` -// Member `function` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Log__rosidl_typesupport_introspection_c__Log_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; - rcl_interfaces__msg__Log__init(message_memory); -} - -void Log__rosidl_typesupport_introspection_c__Log_fini_function(void * message_memory) -{ - rcl_interfaces__msg__Log__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Log__rosidl_typesupport_introspection_c__Log_message_member_array[7] = { - { - "stamp", // 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(rcl_interfaces__msg__Log, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "level", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, level), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "msg", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, msg), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "file", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, file), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "function", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, function), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "line", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Log, line), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Log__rosidl_typesupport_introspection_c__Log_message_members = { - "rcl_interfaces__msg", // message namespace - "Log", // message name - 7, // number of fields - sizeof(rcl_interfaces__msg__Log), - Log__rosidl_typesupport_introspection_c__Log_message_member_array, // message members - Log__rosidl_typesupport_introspection_c__Log_init_function, // function to initialize message memory (memory has to be allocated) - Log__rosidl_typesupport_introspection_c__Log_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 Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle = { - 0, - &Log__rosidl_typesupport_introspection_c__Log_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Log)() { - Log__rosidl_typesupport_introspection_c__Log_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle.typesupport_identifier) { - Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__traits.hpp deleted file mode 100644 index 23a64a14d..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/Parameter.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'value' -#include "rcl_interfaces/msg/detail/parameter_value__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::Parameter"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/Parameter"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.c deleted file mode 100644 index fa7052950..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/Parameter.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter__functions.h" -#include "rcl_interfaces/msg/detail/parameter__struct.h" - - -// Include directives for member types -// Member `name` -#include "rosidl_runtime_c/string_functions.h" -// Member `value` -#include "rcl_interfaces/msg/parameter_value.h" -// Member `value` -#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Parameter__rosidl_typesupport_introspection_c__Parameter_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; - rcl_interfaces__msg__Parameter__init(message_memory); -} - -void Parameter__rosidl_typesupport_introspection_c__Parameter_fini_function(void * message_memory) -{ - rcl_interfaces__msg__Parameter__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array[2] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__Parameter, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "value", // 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(rcl_interfaces__msg__Parameter, value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Parameter__rosidl_typesupport_introspection_c__Parameter_message_members = { - "rcl_interfaces__msg", // message namespace - "Parameter", // message name - 2, // number of fields - sizeof(rcl_interfaces__msg__Parameter), - Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array, // message members - Parameter__rosidl_typesupport_introspection_c__Parameter_init_function, // function to initialize message memory (memory has to be allocated) - Parameter__rosidl_typesupport_introspection_c__Parameter_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 Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle = { - 0, - &Parameter__rosidl_typesupport_introspection_c__Parameter_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)() { - Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)(); - if (!Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle.typesupport_identifier) { - Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.h deleted file mode 100644 index 222a45970..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.h +++ /dev/null @@ -1,68 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/ParameterDescriptor.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'name' -// Member 'description' -// Member 'additional_constraints' -#include "rosidl_runtime_c/string.h" -// Member 'floating_point_range' -#include "rcl_interfaces/msg/detail/floating_point_range__struct.h" -// Member 'integer_range' -#include "rcl_interfaces/msg/detail/integer_range__struct.h" - -// constants for array fields with an upper bound -// floating_point_range -enum -{ - rcl_interfaces__msg__ParameterDescriptor__floating_point_range__MAX_SIZE = 1 -}; -// integer_range -enum -{ - rcl_interfaces__msg__ParameterDescriptor__integer_range__MAX_SIZE = 1 -}; - -// Struct defined in msg/ParameterDescriptor in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__ParameterDescriptor -{ - rosidl_runtime_c__String name; - uint8_t type; - rosidl_runtime_c__String description; - rosidl_runtime_c__String additional_constraints; - bool read_only; - rcl_interfaces__msg__FloatingPointRange__Sequence floating_point_range; - rcl_interfaces__msg__IntegerRange__Sequence integer_range; -} rcl_interfaces__msg__ParameterDescriptor; - -// Struct for a sequence of rcl_interfaces__msg__ParameterDescriptor. -typedef struct rcl_interfaces__msg__ParameterDescriptor__Sequence -{ - rcl_interfaces__msg__ParameterDescriptor * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__ParameterDescriptor__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp deleted file mode 100644 index 52ec3eaee..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ParameterDescriptor.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'floating_point_range' -#include "rcl_interfaces/msg/detail/floating_point_range__traits.hpp" -// Member 'integer_range' -#include "rcl_interfaces/msg/detail/integer_range__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ParameterDescriptor"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ParameterDescriptor"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c deleted file mode 100644 index 75956873c..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c +++ /dev/null @@ -1,255 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ParameterDescriptor.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter_descriptor__functions.h" -#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.h" - - -// Include directives for member types -// Member `name` -// Member `description` -// Member `additional_constraints` -#include "rosidl_runtime_c/string_functions.h" -// Member `floating_point_range` -#include "rcl_interfaces/msg/floating_point_range.h" -// Member `floating_point_range` -#include "rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h" -// Member `integer_range` -#include "rcl_interfaces/msg/integer_range.h" -// Member `integer_range` -#include "rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_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; - rcl_interfaces__msg__ParameterDescriptor__init(message_memory); -} - -void ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ParameterDescriptor__fini(message_memory); -} - -size_t ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__FloatingPointRange__floating_point_range( - const void * untyped_member) -{ - const rcl_interfaces__msg__FloatingPointRange__Sequence * member = - (const rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__FloatingPointRange__floating_point_range( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__FloatingPointRange__Sequence * member = - (const rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__FloatingPointRange__floating_point_range( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__FloatingPointRange__Sequence * member = - (rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__FloatingPointRange__floating_point_range( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__FloatingPointRange__Sequence * member = - (rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); - rcl_interfaces__msg__FloatingPointRange__Sequence__fini(member); - return rcl_interfaces__msg__FloatingPointRange__Sequence__init(member, size); -} - -size_t ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__IntegerRange__integer_range( - const void * untyped_member) -{ - const rcl_interfaces__msg__IntegerRange__Sequence * member = - (const rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__IntegerRange__integer_range( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__IntegerRange__Sequence * member = - (const rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__IntegerRange__integer_range( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__IntegerRange__Sequence * member = - (rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__IntegerRange__integer_range( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__IntegerRange__Sequence * member = - (rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); - rcl_interfaces__msg__IntegerRange__Sequence__fini(member); - return rcl_interfaces__msg__IntegerRange__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[7] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "description", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, description), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "additional_constraints", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, additional_constraints), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "read_only", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, read_only), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "floating_point_range", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 1, // array size - true, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, floating_point_range), // bytes offset in struct - NULL, // default value - ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__FloatingPointRange__floating_point_range, // size() function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__FloatingPointRange__floating_point_range, // get_const(index) function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__FloatingPointRange__floating_point_range, // get(index) function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__FloatingPointRange__floating_point_range // resize(index) function pointer - }, - { - "integer_range", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 1, // array size - true, // is upper bound - offsetof(rcl_interfaces__msg__ParameterDescriptor, integer_range), // bytes offset in struct - NULL, // default value - ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__IntegerRange__integer_range, // size() function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__IntegerRange__integer_range, // get_const(index) function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__IntegerRange__integer_range, // get(index) function pointer - ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__IntegerRange__integer_range // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_members = { - "rcl_interfaces__msg", // message namespace - "ParameterDescriptor", // message name - 7, // number of fields - sizeof(rcl_interfaces__msg__ParameterDescriptor), - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array, // message members - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_init_function, // function to initialize message memory (memory has to be allocated) - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_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 ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle = { - 0, - &ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)() { - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, FloatingPointRange)(); - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[6].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, IntegerRange)(); - if (!ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle.typesupport_identifier) { - ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp deleted file mode 100644 index 6e87533de..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp +++ /dev/null @@ -1,251 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from rcl_interfaces:msg/ParameterDescriptor.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 "rcl_interfaces/msg/detail/parameter_descriptor__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 rcl_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void ParameterDescriptor_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) rcl_interfaces::msg::ParameterDescriptor(_init); -} - -void ParameterDescriptor_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~ParameterDescriptor(); -} - -size_t size_function__ParameterDescriptor__floating_point_range(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterDescriptor__floating_point_range(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterDescriptor__floating_point_range(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterDescriptor__floating_point_range(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterDescriptor__integer_range(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterDescriptor__integer_range(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterDescriptor__integer_range(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterDescriptor__integer_range(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterDescriptor_message_member_array[7] = { - { - "name", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, name), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "type", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, type), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "description", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, description), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "additional_constraints", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, additional_constraints), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "read_only", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, read_only), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "floating_point_range", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 1, // array size - true, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, floating_point_range), // bytes offset in struct - nullptr, // default value - size_function__ParameterDescriptor__floating_point_range, // size() function pointer - get_const_function__ParameterDescriptor__floating_point_range, // get_const(index) function pointer - get_function__ParameterDescriptor__floating_point_range, // get(index) function pointer - resize_function__ParameterDescriptor__floating_point_range // resize(index) function pointer - }, - { - "integer_range", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 1, // array size - true, // is upper bound - offsetof(rcl_interfaces::msg::ParameterDescriptor, integer_range), // bytes offset in struct - nullptr, // default value - size_function__ParameterDescriptor__integer_range, // size() function pointer - get_const_function__ParameterDescriptor__integer_range, // get_const(index) function pointer - get_function__ParameterDescriptor__integer_range, // get(index) function pointer - resize_function__ParameterDescriptor__integer_range // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterDescriptor_message_members = { - "rcl_interfaces::msg", // message namespace - "ParameterDescriptor", // message name - 7, // number of fields - sizeof(rcl_interfaces::msg::ParameterDescriptor), - ParameterDescriptor_message_member_array, // message members - ParameterDescriptor_init_function, // function to initialize message memory (memory has to be allocated) - ParameterDescriptor_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t ParameterDescriptor_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &ParameterDescriptor_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace rcl_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterDescriptor_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, rcl_interfaces, msg, ParameterDescriptor)() { - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterDescriptor_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.h deleted file mode 100644 index 9bf20b0af..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.h +++ /dev/null @@ -1,54 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/ParameterEvent.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__struct.h" -// Member 'node' -#include "rosidl_runtime_c/string.h" -// Member 'new_parameters' -// Member 'changed_parameters' -// Member 'deleted_parameters' -#include "rcl_interfaces/msg/detail/parameter__struct.h" - -// Struct defined in msg/ParameterEvent in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__ParameterEvent -{ - builtin_interfaces__msg__Time stamp; - rosidl_runtime_c__String node; - rcl_interfaces__msg__Parameter__Sequence new_parameters; - rcl_interfaces__msg__Parameter__Sequence changed_parameters; - rcl_interfaces__msg__Parameter__Sequence deleted_parameters; -} rcl_interfaces__msg__ParameterEvent; - -// Struct for a sequence of rcl_interfaces__msg__ParameterEvent. -typedef struct rcl_interfaces__msg__ParameterEvent__Sequence -{ - rcl_interfaces__msg__ParameterEvent * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__ParameterEvent__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__traits.hpp deleted file mode 100644 index 9bc7fc3c3..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ParameterEvent.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter_event__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ParameterEvent"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ParameterEvent"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.c deleted file mode 100644 index 71eca6335..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.c +++ /dev/null @@ -1,264 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ParameterEvent.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter_event__functions.h" -#include "rcl_interfaces/msg/detail/parameter_event__struct.h" - - -// Include directives for member types -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `node` -#include "rosidl_runtime_c/string_functions.h" -// Member `new_parameters` -// Member `changed_parameters` -// Member `deleted_parameters` -#include "rcl_interfaces/msg/parameter.h" -// Member `new_parameters` -// Member `changed_parameters` -// Member `deleted_parameters` -#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_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; - rcl_interfaces__msg__ParameterEvent__init(message_memory); -} - -void ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ParameterEvent__fini(message_memory); -} - -size_t ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__new_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__new_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__new_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__new_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - rcl_interfaces__msg__Parameter__Sequence__fini(member); - return rcl_interfaces__msg__Parameter__Sequence__init(member, size); -} - -size_t ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__changed_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__changed_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__changed_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__changed_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - rcl_interfaces__msg__Parameter__Sequence__fini(member); - return rcl_interfaces__msg__Parameter__Sequence__init(member, size); -} - -size_t ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__deleted_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__deleted_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__deleted_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__deleted_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - rcl_interfaces__msg__Parameter__Sequence__fini(member); - return rcl_interfaces__msg__Parameter__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[5] = { - { - "stamp", // 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(rcl_interfaces__msg__ParameterEvent, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "node", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEvent, node), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "new_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEvent, new_parameters), // bytes offset in struct - NULL, // default value - ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__new_parameters, // size() function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__new_parameters, // get_const(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__new_parameters, // get(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__new_parameters // resize(index) function pointer - }, - { - "changed_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEvent, changed_parameters), // bytes offset in struct - NULL, // default value - ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__changed_parameters, // size() function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__changed_parameters, // get_const(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__changed_parameters, // get(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__changed_parameters // resize(index) function pointer - }, - { - "deleted_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEvent, deleted_parameters), // bytes offset in struct - NULL, // default value - ParameterEvent__rosidl_typesupport_introspection_c__size_function__Parameter__deleted_parameters, // size() function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__Parameter__deleted_parameters, // get_const(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__get_function__Parameter__deleted_parameters, // get(index) function pointer - ParameterEvent__rosidl_typesupport_introspection_c__resize_function__Parameter__deleted_parameters // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_members = { - "rcl_interfaces__msg", // message namespace - "ParameterEvent", // message name - 5, // number of fields - sizeof(rcl_interfaces__msg__ParameterEvent), - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array, // message members - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_init_function, // function to initialize message memory (memory has to be allocated) - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_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 ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle = { - 0, - &ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterEvent)() { - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); - if (!ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle.typesupport_identifier) { - ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp deleted file mode 100644 index 90d3aefd7..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ParameterEventDescriptors.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ParameterEventDescriptors"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ParameterEventDescriptors"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c deleted file mode 100644 index 891671158..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c +++ /dev/null @@ -1,226 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ParameterEventDescriptors.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h" -#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h" - - -// Include directives for member types -// Member `new_parameters` -// Member `changed_parameters` -// Member `deleted_parameters` -#include "rcl_interfaces/msg/parameter_descriptor.h" -// Member `new_parameters` -// Member `changed_parameters` -// Member `deleted_parameters` -#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_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; - rcl_interfaces__msg__ParameterEventDescriptors__init(message_memory); -} - -void ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ParameterEventDescriptors__fini(message_memory); -} - -size_t ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__new_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__new_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__new_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__new_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); - return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); -} - -size_t ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__changed_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__changed_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__changed_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__changed_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); - return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); -} - -size_t ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__deleted_parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return member->size; -} - -const void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__deleted_parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__deleted_parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__deleted_parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); - return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[3] = { - { - "new_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEventDescriptors, new_parameters), // bytes offset in struct - NULL, // default value - ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__new_parameters, // size() function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__new_parameters, // get_const(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__new_parameters, // get(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__new_parameters // resize(index) function pointer - }, - { - "changed_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEventDescriptors, changed_parameters), // bytes offset in struct - NULL, // default value - ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__changed_parameters, // size() function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__changed_parameters, // get_const(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__changed_parameters, // get(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__changed_parameters // resize(index) function pointer - }, - { - "deleted_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterEventDescriptors, deleted_parameters), // bytes offset in struct - NULL, // default value - ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__deleted_parameters, // size() function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__deleted_parameters, // get_const(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__deleted_parameters, // get(index) function pointer - ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__deleted_parameters // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_members = { - "rcl_interfaces__msg", // message namespace - "ParameterEventDescriptors", // message name - 3, // number of fields - sizeof(rcl_interfaces__msg__ParameterEventDescriptors), - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array, // message members - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_init_function, // function to initialize message memory (memory has to be allocated) - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_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 ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle = { - 0, - &ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterEventDescriptors)() { - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); - if (!ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle.typesupport_identifier) { - ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp deleted file mode 100644 index 831f6cb08..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from rcl_interfaces:msg/ParameterEventDescriptors.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 "rcl_interfaces/msg/detail/parameter_event_descriptors__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 rcl_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void ParameterEventDescriptors_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) rcl_interfaces::msg::ParameterEventDescriptors(_init); -} - -void ParameterEventDescriptors_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~ParameterEventDescriptors(); -} - -size_t size_function__ParameterEventDescriptors__new_parameters(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterEventDescriptors__new_parameters(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterEventDescriptors__new_parameters(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterEventDescriptors__new_parameters(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterEventDescriptors__changed_parameters(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterEventDescriptors__changed_parameters(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterEventDescriptors__changed_parameters(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterEventDescriptors__changed_parameters(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterEventDescriptors__deleted_parameters(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterEventDescriptors__deleted_parameters(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterEventDescriptors__deleted_parameters(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterEventDescriptors__deleted_parameters(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEventDescriptors_message_member_array[3] = { - { - "new_parameters", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterEventDescriptors, new_parameters), // bytes offset in struct - nullptr, // default value - size_function__ParameterEventDescriptors__new_parameters, // size() function pointer - get_const_function__ParameterEventDescriptors__new_parameters, // get_const(index) function pointer - get_function__ParameterEventDescriptors__new_parameters, // get(index) function pointer - resize_function__ParameterEventDescriptors__new_parameters // resize(index) function pointer - }, - { - "changed_parameters", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterEventDescriptors, changed_parameters), // bytes offset in struct - nullptr, // default value - size_function__ParameterEventDescriptors__changed_parameters, // size() function pointer - get_const_function__ParameterEventDescriptors__changed_parameters, // get_const(index) function pointer - get_function__ParameterEventDescriptors__changed_parameters, // get(index) function pointer - resize_function__ParameterEventDescriptors__changed_parameters // resize(index) function pointer - }, - { - "deleted_parameters", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterEventDescriptors, deleted_parameters), // bytes offset in struct - nullptr, // default value - size_function__ParameterEventDescriptors__deleted_parameters, // size() function pointer - get_const_function__ParameterEventDescriptors__deleted_parameters, // get_const(index) function pointer - get_function__ParameterEventDescriptors__deleted_parameters, // get(index) function pointer - resize_function__ParameterEventDescriptors__deleted_parameters // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterEventDescriptors_message_members = { - "rcl_interfaces::msg", // message namespace - "ParameterEventDescriptors", // message name - 3, // number of fields - sizeof(rcl_interfaces::msg::ParameterEventDescriptors), - ParameterEventDescriptors_message_member_array, // message members - ParameterEventDescriptors_init_function, // function to initialize message memory (memory has to be allocated) - ParameterEventDescriptors_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t ParameterEventDescriptors_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &ParameterEventDescriptors_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace rcl_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterEventDescriptors_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, rcl_interfaces, msg, ParameterEventDescriptors)() { - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterEventDescriptors_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__traits.hpp deleted file mode 100644 index c1f6e3eb1..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ParameterType.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter_type__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ParameterType"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ParameterType"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.c deleted file mode 100644 index 1334eb85b..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ParameterType.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter_type__functions.h" -#include "rcl_interfaces/msg/detail/parameter_type__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParameterType__rosidl_typesupport_introspection_c__ParameterType_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; - rcl_interfaces__msg__ParameterType__init(message_memory); -} - -void ParameterType__rosidl_typesupport_introspection_c__ParameterType_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ParameterType__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterType, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_members = { - "rcl_interfaces__msg", // message namespace - "ParameterType", // message name - 1, // number of fields - sizeof(rcl_interfaces__msg__ParameterType), - ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_member_array, // message members - ParameterType__rosidl_typesupport_introspection_c__ParameterType_init_function, // function to initialize message memory (memory has to be allocated) - ParameterType__rosidl_typesupport_introspection_c__ParameterType_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 ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle = { - 0, - &ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterType)() { - if (!ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle.typesupport_identifier) { - ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.h b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.h deleted file mode 100644 index a09fb4d54..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.h +++ /dev/null @@ -1,59 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from rcl_interfaces:msg/ParameterValue.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'string_value' -// Member 'string_array_value' -#include "rosidl_runtime_c/string.h" -// Member 'byte_array_value' -// Member 'bool_array_value' -// Member 'integer_array_value' -// Member 'double_array_value' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/ParameterValue in the package rcl_interfaces. -typedef struct rcl_interfaces__msg__ParameterValue -{ - uint8_t type; - bool bool_value; - int64_t integer_value; - double double_value; - rosidl_runtime_c__String string_value; - rosidl_runtime_c__octet__Sequence byte_array_value; - rosidl_runtime_c__boolean__Sequence bool_array_value; - rosidl_runtime_c__int64__Sequence integer_array_value; - rosidl_runtime_c__double__Sequence double_array_value; - rosidl_runtime_c__String__Sequence string_array_value; -} rcl_interfaces__msg__ParameterValue; - -// Struct for a sequence of rcl_interfaces__msg__ParameterValue. -typedef struct rcl_interfaces__msg__ParameterValue__Sequence -{ - rcl_interfaces__msg__ParameterValue * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} rcl_interfaces__msg__ParameterValue__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__traits.hpp deleted file mode 100644 index fecff5ba8..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/ParameterValue.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/parameter_value__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::ParameterValue"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/ParameterValue"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.c deleted file mode 100644 index 8e2171c07..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.c +++ /dev/null @@ -1,226 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/ParameterValue.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/parameter_value__functions.h" -#include "rcl_interfaces/msg/detail/parameter_value__struct.h" - - -// Include directives for member types -// Member `string_value` -// Member `string_array_value` -#include "rosidl_runtime_c/string_functions.h" -// Member `byte_array_value` -// Member `bool_array_value` -// Member `integer_array_value` -// Member `double_array_value` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_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; - rcl_interfaces__msg__ParameterValue__init(message_memory); -} - -void ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_fini_function(void * message_memory) -{ - rcl_interfaces__msg__ParameterValue__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_member_array[10] = { - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "bool_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, bool_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "integer_value", // 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(rcl_interfaces__msg__ParameterValue, integer_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "double_value", // 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(rcl_interfaces__msg__ParameterValue, double_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "string_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, string_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "byte_array_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, byte_array_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "bool_array_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, bool_array_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "integer_array_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, integer_array_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "double_array_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, double_array_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "string_array_value", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__ParameterValue, string_array_value), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_members = { - "rcl_interfaces__msg", // message namespace - "ParameterValue", // message name - 10, // number of fields - sizeof(rcl_interfaces__msg__ParameterValue), - ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_member_array, // message members - ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_init_function, // function to initialize message memory (memory has to be allocated) - ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_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 ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle = { - 0, - &ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)() { - if (!ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle.typesupport_identifier) { - ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.cpp deleted file mode 100644 index 13528196e..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.cpp +++ /dev/null @@ -1,350 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from rcl_interfaces:msg/ParameterValue.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 "rcl_interfaces/msg/detail/parameter_value__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 rcl_interfaces -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void ParameterValue_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) rcl_interfaces::msg::ParameterValue(_init); -} - -void ParameterValue_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~ParameterValue(); -} - -size_t size_function__ParameterValue__byte_array_value(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterValue__byte_array_value(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterValue__byte_array_value(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterValue__byte_array_value(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterValue__integer_array_value(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterValue__integer_array_value(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterValue__integer_array_value(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterValue__integer_array_value(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterValue__double_array_value(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterValue__double_array_value(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterValue__double_array_value(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterValue__double_array_value(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__ParameterValue__string_array_value(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ParameterValue__string_array_value(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ParameterValue__string_array_value(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ParameterValue__string_array_value(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterValue_message_member_array[10] = { - { - "type", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, type), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "bool_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, bool_value), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "integer_value", // 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(rcl_interfaces::msg::ParameterValue, integer_value), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "double_value", // 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(rcl_interfaces::msg::ParameterValue, double_value), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "string_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, string_value), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "byte_array_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, byte_array_value), // bytes offset in struct - nullptr, // default value - size_function__ParameterValue__byte_array_value, // size() function pointer - get_const_function__ParameterValue__byte_array_value, // get_const(index) function pointer - get_function__ParameterValue__byte_array_value, // get(index) function pointer - resize_function__ParameterValue__byte_array_value // resize(index) function pointer - }, - { - "bool_array_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, bool_array_value), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "integer_array_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, integer_array_value), // bytes offset in struct - nullptr, // default value - size_function__ParameterValue__integer_array_value, // size() function pointer - get_const_function__ParameterValue__integer_array_value, // get_const(index) function pointer - get_function__ParameterValue__integer_array_value, // get(index) function pointer - resize_function__ParameterValue__integer_array_value // resize(index) function pointer - }, - { - "double_array_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, double_array_value), // bytes offset in struct - nullptr, // default value - size_function__ParameterValue__double_array_value, // size() function pointer - get_const_function__ParameterValue__double_array_value, // get_const(index) function pointer - get_function__ParameterValue__double_array_value, // get(index) function pointer - resize_function__ParameterValue__double_array_value // resize(index) function pointer - }, - { - "string_array_value", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces::msg::ParameterValue, string_array_value), // bytes offset in struct - nullptr, // default value - size_function__ParameterValue__string_array_value, // size() function pointer - get_const_function__ParameterValue__string_array_value, // get_const(index) function pointer - get_function__ParameterValue__string_array_value, // get(index) function pointer - resize_function__ParameterValue__string_array_value // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterValue_message_members = { - "rcl_interfaces::msg", // message namespace - "ParameterValue", // message name - 10, // number of fields - sizeof(rcl_interfaces::msg::ParameterValue), - ParameterValue_message_member_array, // message members - ParameterValue_init_function, // function to initialize message memory (memory has to be allocated) - ParameterValue_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t ParameterValue_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &ParameterValue_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace rcl_interfaces - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterValue_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, rcl_interfaces, msg, ParameterValue)() { - return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterValue_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp deleted file mode 100644 index 1fa13edf0..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:msg/SetParametersResult.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ -#define RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ - -#include "rcl_interfaces/msg/detail/set_parameters_result__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::msg::SetParametersResult"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/msg/SetParametersResult"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.c b/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.c deleted file mode 100644 index be039af02..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.c +++ /dev/null @@ -1,100 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:msg/SetParametersResult.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/msg/detail/set_parameters_result__functions.h" -#include "rcl_interfaces/msg/detail/set_parameters_result__struct.h" - - -// Include directives for member types -// Member `reason` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_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; - rcl_interfaces__msg__SetParametersResult__init(message_memory); -} - -void SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_fini_function(void * message_memory) -{ - rcl_interfaces__msg__SetParametersResult__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_member_array[2] = { - { - "successful", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__SetParametersResult, successful), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "reason", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__msg__SetParametersResult, reason), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_members = { - "rcl_interfaces__msg", // message namespace - "SetParametersResult", // message name - 2, // number of fields - sizeof(rcl_interfaces__msg__SetParametersResult), - SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_member_array, // message members - SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_init_function, // function to initialize message memory (memory has to be allocated) - SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_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 SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle = { - 0, - &SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)() { - if (!SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle.typesupport_identifier) { - SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__builder.hpp index c3b5041a5..69f27a2c4 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/floating_point_range__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/floating_point_range__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__functions.c index fc516a881..e90081017 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__functions.c @@ -217,22 +217,27 @@ rcl_interfaces__msg__FloatingPointRange__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__FloatingPointRange); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__FloatingPointRange * data = - (rcl_interfaces__msg__FloatingPointRange *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__FloatingPointRange *)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 (!rcl_interfaces__msg__FloatingPointRange__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__FloatingPointRange__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; ) { - rcl_interfaces__msg__FloatingPointRange__fini(&data[i]); + rcl_interfaces__msg__FloatingPointRange__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h index 0d20ad24f..265870b97 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__FloatingPointRange( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__FloatingPointRange( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp index 7a2389e7c..b3f6c06e4 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_FloatingPointRange( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.h new file mode 100644 index 000000000..72697685f --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.h @@ -0,0 +1,66 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/FloatingPointRange.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/FloatingPointRange in the package rcl_interfaces. +/** + * Represents bounds and a step value for a floating point typed parameter. + */ +typedef struct rcl_interfaces__msg__FloatingPointRange +{ + /// Start value for valid values, inclusive. + double from_value; + /// End value for valid values, inclusive. + double to_value; + /// Size of valid steps between the from and to bound. + /// + /// Step is considered to be a magnitude, therefore negative values are treated + /// the same as positive values, and a step value of zero implies a continuous + /// range of values. + /// + /// Ideally, the step would be less than or equal to the distance between the + /// bounds, as well as an even multiple of the distance between the bounds, but + /// neither are required. + /// + /// If the absolute value of the step is larger than or equal to the distance + /// between the two bounds, then the bounds will be the only valid values. e.g. if + /// the range is defined as {from_value: 1.0, to_value: 2.0, step: 5.0} then the + /// valid values will be 1.0 and 2.0. + /// + /// If the step is less than the distance between the bounds, but the distance is + /// not a multiple of the step, then the "to" bound will always be a valid value, + /// e.g. if the range is defined as {from_value: 2.0, to_value: 5.0, step: 2.0} + /// then the valid values will be 2.0, 4.0, and 5.0. + double step; +} rcl_interfaces__msg__FloatingPointRange; + +// Struct for a sequence of rcl_interfaces__msg__FloatingPointRange. +typedef struct rcl_interfaces__msg__FloatingPointRange__Sequence +{ + rcl_interfaces__msg__FloatingPointRange * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__FloatingPointRange__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp index 4537ac6ad..a1ba5e0ca 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__FloatingPointRange __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp new file mode 100644 index 000000000..74d4729f0 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/FloatingPointRange.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/floating_point_range__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const FloatingPointRange & msg, + std::ostream & out) +{ + out << "{"; + // member: from_value + { + out << "from_value: "; + rosidl_generator_traits::value_to_yaml(msg.from_value, out); + out << ", "; + } + + // member: to_value + { + out << "to_value: "; + rosidl_generator_traits::value_to_yaml(msg.to_value, out); + out << ", "; + } + + // member: step + { + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const FloatingPointRange & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: from_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "from_value: "; + rosidl_generator_traits::value_to_yaml(msg.from_value, out); + out << "\n"; + } + + // member: to_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "to_value: "; + rosidl_generator_traits::value_to_yaml(msg.to_value, out); + out << "\n"; + } + + // member: step + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const FloatingPointRange & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::FloatingPointRange & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::FloatingPointRange & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::FloatingPointRange"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/FloatingPointRange"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__FLOATING_POINT_RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.c new file mode 100644 index 000000000..99318f77c --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/FloatingPointRange.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/floating_point_range__functions.h" +#include "rcl_interfaces/msg/detail/floating_point_range__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_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; + rcl_interfaces__msg__FloatingPointRange__init(message_memory); +} + +void rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_fini_function(void * message_memory) +{ + rcl_interfaces__msg__FloatingPointRange__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_member_array[3] = { + { + "from_value", // 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(rcl_interfaces__msg__FloatingPointRange, from_value), // 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 + }, + { + "to_value", // 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(rcl_interfaces__msg__FloatingPointRange, to_value), // 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 + }, + { + "step", // 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(rcl_interfaces__msg__FloatingPointRange, step), // 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 rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_members = { + "rcl_interfaces__msg", // message namespace + "FloatingPointRange", // message name + 3, // number of fields + sizeof(rcl_interfaces__msg__FloatingPointRange), + rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_member_array, // message members + rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_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 rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle = { + 0, + &rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, FloatingPointRange)() { + if (!rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__FloatingPointRange__rosidl_typesupport_introspection_c__FloatingPointRange_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp index c4a70b966..23b4d0f88 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FloatingPoint 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FloatingPoint 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FloatingPoint 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/floating_point_range__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__builder.hpp index 7bb5271b4..15ac6f797 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/integer_range__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/integer_range__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__functions.c similarity index 90% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__functions.c index de8953a99..f3c69baff 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__functions.c @@ -217,22 +217,27 @@ rcl_interfaces__msg__IntegerRange__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__IntegerRange); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__IntegerRange * data = - (rcl_interfaces__msg__IntegerRange *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__IntegerRange *)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 (!rcl_interfaces__msg__IntegerRange__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__IntegerRange__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; ) { - rcl_interfaces__msg__IntegerRange__fini(&data[i]); + rcl_interfaces__msg__IntegerRange__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h index f120a6bcd..8b8840883 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__IntegerRange( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__IntegerRange( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp index a679a3e13..80246796f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_IntegerRange( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.h new file mode 100644 index 000000000..93f7f365a --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/IntegerRange.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/IntegerRange in the package rcl_interfaces. +/** + * Represents bounds and a step value for an integer typed parameter. + */ +typedef struct rcl_interfaces__msg__IntegerRange +{ + /// Start value for valid values, inclusive. + int64_t from_value; + /// End value for valid values, inclusive. + int64_t to_value; + /// Size of valid steps between the from and to bound. + /// + /// A step value of zero implies a continuous range of values. Ideally, the step + /// would be less than or equal to the distance between the bounds, as well as an + /// even multiple of the distance between the bounds, but neither are required. + /// + /// If the absolute value of the step is larger than or equal to the distance + /// between the two bounds, then the bounds will be the only valid values. e.g. if + /// the range is defined as {from_value: 1, to_value: 2, step: 5} then the valid + /// values will be 1 and 2. + /// + /// If the step is less than the distance between the bounds, but the distance is + /// not a multiple of the step, then the "to" bound will always be a valid value, + /// e.g. if the range is defined as {from_value: 2, to_value: 5, step: 2} then + /// the valid values will be 2, 4, and 5. + uint64_t step; +} rcl_interfaces__msg__IntegerRange; + +// Struct for a sequence of rcl_interfaces__msg__IntegerRange. +typedef struct rcl_interfaces__msg__IntegerRange__Sequence +{ + rcl_interfaces__msg__IntegerRange * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__IntegerRange__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp index e4f92fa4e..3ed96918f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__IntegerRange __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp new file mode 100644 index 000000000..f62a49e2e --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/IntegerRange.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/integer_range__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const IntegerRange & msg, + std::ostream & out) +{ + out << "{"; + // member: from_value + { + out << "from_value: "; + rosidl_generator_traits::value_to_yaml(msg.from_value, out); + out << ", "; + } + + // member: to_value + { + out << "to_value: "; + rosidl_generator_traits::value_to_yaml(msg.to_value, out); + out << ", "; + } + + // member: step + { + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const IntegerRange & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: from_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "from_value: "; + rosidl_generator_traits::value_to_yaml(msg.from_value, out); + out << "\n"; + } + + // member: to_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "to_value: "; + rosidl_generator_traits::value_to_yaml(msg.to_value, out); + out << "\n"; + } + + // member: step + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const IntegerRange & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::IntegerRange & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::IntegerRange & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::IntegerRange"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/IntegerRange"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__INTEGER_RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.c new file mode 100644 index 000000000..ffe03ff12 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/IntegerRange.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/integer_range__functions.h" +#include "rcl_interfaces/msg/detail/integer_range__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_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; + rcl_interfaces__msg__IntegerRange__init(message_memory); +} + +void rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_fini_function(void * message_memory) +{ + rcl_interfaces__msg__IntegerRange__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_member_array[3] = { + { + "from_value", // 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(rcl_interfaces__msg__IntegerRange, from_value), // 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 + }, + { + "to_value", // 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(rcl_interfaces__msg__IntegerRange, to_value), // 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 + }, + { + "step", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__IntegerRange, step), // 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 rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_members = { + "rcl_interfaces__msg", // message namespace + "IntegerRange", // message name + 3, // number of fields + sizeof(rcl_interfaces__msg__IntegerRange), + rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_member_array, // message members + rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_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 rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle = { + 0, + &rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, IntegerRange)() { + if (!rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__IntegerRange__rosidl_typesupport_introspection_c__IntegerRange_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.cpp index 99f16d397..ec140c0ca 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember IntegerRange_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember IntegerRange_ 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember IntegerRange_ 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/integer_range__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp similarity index 96% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp index 6a8f66e48..01ab0ada7 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/list_parameters_result__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/list_parameters_result__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__functions.c index 884da39d4..ce8194be1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__functions.c @@ -236,22 +236,27 @@ rcl_interfaces__msg__ListParametersResult__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ListParametersResult); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ListParametersResult * data = - (rcl_interfaces__msg__ListParametersResult *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ListParametersResult *)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 (!rcl_interfaces__msg__ListParametersResult__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ListParametersResult__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; ) { - rcl_interfaces__msg__ListParametersResult__fini(&data[i]); + rcl_interfaces__msg__ListParametersResult__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h index b9afd8d71..fd74a0c9b 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ListParametersResult( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ListParametersResult( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp index 2b6f63819..07cda25bb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ListParametersResult( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.h similarity index 83% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.h index 45db80191..e06e6d49f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.h @@ -22,10 +22,15 @@ extern "C" // Member 'prefixes' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/ListParametersResult in the package rcl_interfaces. +/// Struct defined in msg/ListParametersResult in the package rcl_interfaces. +/** + * The resulting parameters under the given prefixes. + */ typedef struct rcl_interfaces__msg__ListParametersResult { rosidl_runtime_c__String__Sequence names; + /// The resulting prefixes under the given prefixes. + /// TODO(wjwwood): link to prefix definition and rules. rosidl_runtime_c__String__Sequence prefixes; } rcl_interfaces__msg__ListParametersResult; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp similarity index 76% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp index 095f4b482..7315a39e1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__ListParametersResult __attribute__((deprecated)) @@ -45,21 +46,21 @@ struct ListParametersResult_ // field types and members using _names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _names_type names; using _prefixes_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _prefixes_type prefixes; // setters for named parameter idiom Type & set__names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->names = _arg; return *this; } Type & set__prefixes( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->prefixes = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp new file mode 100644 index 000000000..5fe93cae8 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp @@ -0,0 +1,168 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ListParametersResult.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/list_parameters_result__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ListParametersResult & msg, + std::ostream & out) +{ + out << "{"; + // member: names + { + if (msg.names.size() == 0) { + out << "names: []"; + } else { + out << "names: ["; + size_t pending_items = msg.names.size(); + for (auto item : msg.names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: prefixes + { + if (msg.prefixes.size() == 0) { + out << "prefixes: []"; + } else { + out << "prefixes: ["; + size_t pending_items = msg.prefixes.size(); + for (auto item : msg.prefixes) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ListParametersResult & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.names.size() == 0) { + out << "names: []\n"; + } else { + out << "names:\n"; + for (auto item : msg.names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: prefixes + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.prefixes.size() == 0) { + out << "prefixes: []\n"; + } else { + out << "prefixes:\n"; + for (auto item : msg.prefixes) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ListParametersResult & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ListParametersResult & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ListParametersResult & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ListParametersResult"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ListParametersResult"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__LIST_PARAMETERS_RESULT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.c new file mode 100644 index 000000000..2a590afa9 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.c @@ -0,0 +1,215 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ListParametersResult.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/list_parameters_result__functions.h" +#include "rcl_interfaces/msg/detail/list_parameters_result__struct.h" + + +// Include directives for member types +// Member `names` +// Member `prefixes` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_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; + rcl_interfaces__msg__ListParametersResult__init(message_memory); +} + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ListParametersResult__fini(message_memory); +} + +size_t rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__size_function__ListParametersResult__names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__fetch_function__ListParametersResult__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__assign_function__ListParametersResult__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__resize_function__ListParametersResult__names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__size_function__ListParametersResult__prefixes( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__prefixes( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__prefixes( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__fetch_function__ListParametersResult__prefixes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__prefixes(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__assign_function__ListParametersResult__prefixes( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__prefixes(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__resize_function__ListParametersResult__prefixes( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_member_array[2] = { + { + "names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ListParametersResult, names), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__size_function__ListParametersResult__names, // size() function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__names, // get_const(index) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__names, // get(index) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__fetch_function__ListParametersResult__names, // fetch(index, &value) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__assign_function__ListParametersResult__names, // assign(index, value) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__resize_function__ListParametersResult__names // resize(index) function pointer + }, + { + "prefixes", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ListParametersResult, prefixes), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__size_function__ListParametersResult__prefixes, // size() function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_const_function__ListParametersResult__prefixes, // get_const(index) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__get_function__ListParametersResult__prefixes, // get(index) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__fetch_function__ListParametersResult__prefixes, // fetch(index, &value) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__assign_function__ListParametersResult__prefixes, // assign(index, value) function pointer + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__resize_function__ListParametersResult__prefixes // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_members = { + "rcl_interfaces__msg", // message namespace + "ListParametersResult", // message name + 2, // number of fields + sizeof(rcl_interfaces__msg__ListParametersResult), + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_member_array, // message members + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_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 rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ListParametersResult)() { + if (!rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ListParametersResult__rosidl_typesupport_introspection_c__ListParametersResult_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp similarity index 78% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp index 8ae549c95..17e6cb93f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ListParametersResult__names(void * untyped_member, size_t i return &member[index]; } +void fetch_function__ListParametersResult__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ListParametersResult__names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ListParametersResult__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ListParametersResult__names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ListParametersResult__names(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__ListParametersResult__prefixes(void * untyped_member, size_ return &member[index]; } +void fetch_function__ListParametersResult__prefixes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ListParametersResult__prefixes(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ListParametersResult__prefixes( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ListParametersResult__prefixes(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ListParametersResult__prefixes(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ListParameter size_function__ListParametersResult__names, // size() function pointer get_const_function__ListParametersResult__names, // get_const(index) function pointer get_function__ListParametersResult__names, // get(index) function pointer + fetch_function__ListParametersResult__names, // fetch(index, &value) function pointer + assign_function__ListParametersResult__names, // assign(index, value) function pointer resize_function__ListParametersResult__names // resize(index) function pointer }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ListParameter size_function__ListParametersResult__prefixes, // size() function pointer get_const_function__ListParametersResult__prefixes, // get_const(index) function pointer get_function__ListParametersResult__prefixes, // get(index) function pointer + fetch_function__ListParametersResult__prefixes, // fetch(index, &value) function pointer + assign_function__ListParametersResult__prefixes, // assign(index, value) function pointer resize_function__ListParametersResult__prefixes // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/list_parameters_result__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__builder.hpp similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__builder.hpp index 9bd7100da..ed89ea2e0 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__LOG__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__LOG__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/log__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/log__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__functions.c similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__functions.c index 4c4f81cc8..773f1e18a 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__functions.c @@ -313,22 +313,27 @@ rcl_interfaces__msg__Log__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__Log); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__Log * data = - (rcl_interfaces__msg__Log *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__Log *)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 (!rcl_interfaces__msg__Log__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__Log__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; ) { - rcl_interfaces__msg__Log__fini(&data[i]); + rcl_interfaces__msg__Log__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h index 30517aebf..1a62415af 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__Log( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__Log( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp index 5267d5729..72260a37b 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_Log( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.h new file mode 100644 index 000000000..6b04f0f9f --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.h @@ -0,0 +1,123 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/Log.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'DEBUG'. +/** + * Debug is for pedantic information, which is useful when debugging issues. + */ +enum +{ + rcl_interfaces__msg__Log__DEBUG = 10 +}; + +/// Constant 'INFO'. +/** + * Info is the standard informational level and is used to report expected + * information. + */ +enum +{ + rcl_interfaces__msg__Log__INFO = 20 +}; + +/// Constant 'WARN'. +/** + * Warning is for information that may potentially cause issues or possibly unexpected + * behavior. + */ +enum +{ + rcl_interfaces__msg__Log__WARN = 30 +}; + +/// Constant 'ERROR'. +/** + * Error is for information that this node cannot resolve. + */ +enum +{ + rcl_interfaces__msg__Log__ERROR = 40 +}; + +/// Constant 'FATAL'. +/** + * Information about a impending node shutdown. + */ +enum +{ + rcl_interfaces__msg__Log__FATAL = 50 +}; + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__struct.h" +// Member 'name' +// Member 'msg' +// Member 'file' +// Member 'function' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/Log in the package rcl_interfaces. +/** + * Severity level constants + * + * These logging levels follow the Python Standard + * https://docs.python.org/3/library/logging.html#logging-levels + * And are implemented in rcutils as well + * https://github.com/ros2/rcutils/blob/35f29850064e0c33a4063cbc947ebbfeada11dba/include/rcutils/logging.h#L164-L172 + * This leaves space for other standard logging levels to be inserted in the middle in the future, + * as well as custom user defined levels. + * Since there are several other logging enumeration standard for different implementations, + * other logging implementations may need to provide level mappings to match their internal implementations. + */ +typedef struct rcl_interfaces__msg__Log +{ + /// Fields + /// + /// Timestamp when this message was generated by the node. + builtin_interfaces__msg__Time stamp; + /// Corresponding log level, see above definitions. + uint8_t level; + /// The name representing the logger this message came from. + rosidl_runtime_c__String name; + /// The full log message. + rosidl_runtime_c__String msg; + /// The file the message came from. + rosidl_runtime_c__String file; + /// The function the message came from. + rosidl_runtime_c__String function; + /// The line in the file the message came from. + uint32_t line; +} rcl_interfaces__msg__Log; + +// Struct for a sequence of rcl_interfaces__msg__Log. +typedef struct rcl_interfaces__msg__Log__Sequence +{ + rcl_interfaces__msg__Log * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__Log__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.hpp similarity index 87% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.hpp index 351ee5f48..72f739834 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__LOG__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'stamp' @@ -78,16 +79,16 @@ struct Log_ uint8_t; _level_type level; using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _msg_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _msg_type msg; using _file_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _file_type file; using _function_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _function_type function; using _line_type = uint32_t; @@ -107,25 +108,25 @@ struct Log_ return *this; } Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; } Type & set__msg( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->msg = _arg; return *this; } Type & set__file( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->file = _arg; return *this; } Type & set__function( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->function = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__traits.hpp new file mode 100644 index 000000000..ad7b7db4d --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__traits.hpp @@ -0,0 +1,214 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/Log.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/log__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Log & msg, + std::ostream & out) +{ + out << "{"; + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + out << ", "; + } + + // member: level + { + out << "level: "; + rosidl_generator_traits::value_to_yaml(msg.level, out); + out << ", "; + } + + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: msg + { + out << "msg: "; + rosidl_generator_traits::value_to_yaml(msg.msg, out); + out << ", "; + } + + // member: file + { + out << "file: "; + rosidl_generator_traits::value_to_yaml(msg.file, out); + out << ", "; + } + + // member: function + { + out << "function: "; + rosidl_generator_traits::value_to_yaml(msg.function, out); + out << ", "; + } + + // member: line + { + out << "line: "; + rosidl_generator_traits::value_to_yaml(msg.line, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Log & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } + + // member: level + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "level: "; + rosidl_generator_traits::value_to_yaml(msg.level, out); + out << "\n"; + } + + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: msg + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "msg: "; + rosidl_generator_traits::value_to_yaml(msg.msg, out); + out << "\n"; + } + + // member: file + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "file: "; + rosidl_generator_traits::value_to_yaml(msg.file, out); + out << "\n"; + } + + // member: function + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "function: "; + rosidl_generator_traits::value_to_yaml(msg.function, out); + out << "\n"; + } + + // member: line + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "line: "; + rosidl_generator_traits::value_to_yaml(msg.line, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Log & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::Log & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::Log & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::Log"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/Log"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__LOG__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.c new file mode 100644 index 000000000..cb5642b26 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.c @@ -0,0 +1,198 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/Log.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/log__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/log__functions.h" +#include "rcl_interfaces/msg/detail/log__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `name` +// Member `msg` +// Member `file` +// Member `function` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_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; + rcl_interfaces__msg__Log__init(message_memory); +} + +void rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_fini_function(void * message_memory) +{ + rcl_interfaces__msg__Log__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_member_array[7] = { + { + "stamp", // 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(rcl_interfaces__msg__Log, stamp), // 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 + }, + { + "level", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, level), // 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 + }, + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, name), // 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 + }, + { + "msg", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, msg), // 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 + }, + { + "file", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, file), // 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 + }, + { + "function", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, function), // 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 + }, + { + "line", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Log, line), // 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 rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_members = { + "rcl_interfaces__msg", // message namespace + "Log", // message name + 7, // number of fields + sizeof(rcl_interfaces__msg__Log), + rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_member_array, // message members + rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_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 rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle = { + 0, + &rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Log)() { + rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__Log__rosidl_typesupport_introspection_c__Log_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.cpp similarity index 89% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.cpp index 71f019a5a..c8a481166 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 }, { @@ -141,6 +153,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Log_message_m 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/log__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/log__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp similarity index 96% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp index 750dd185c..42803086a 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__functions.c index 352666406..3f9a2ef36 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__functions.c @@ -237,22 +237,27 @@ rcl_interfaces__msg__Parameter__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__Parameter); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__Parameter * data = - (rcl_interfaces__msg__Parameter *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__Parameter *)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 (!rcl_interfaces__msg__Parameter__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__Parameter__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; ) { - rcl_interfaces__msg__Parameter__fini(&data[i]); + rcl_interfaces__msg__Parameter__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h index e7ba4d439..bd3dc00c9 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__Parameter( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__Parameter( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp index bc6f68aca..9fdc7cf68 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_Parameter( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.h similarity index 75% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.h index b5f61206b..de50f396d 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.h @@ -23,10 +23,17 @@ extern "C" // Member 'value' #include "rcl_interfaces/msg/detail/parameter_value__struct.h" -// Struct defined in msg/Parameter in the package rcl_interfaces. +/// Struct defined in msg/Parameter in the package rcl_interfaces. +/** + * This is the message to communicate a parameter. It is an open struct with an enum in + * the descriptor to select which value is active. + */ typedef struct rcl_interfaces__msg__Parameter { + /// The full name of the parameter. rosidl_runtime_c__String name; + /// The parameter's value which can be one of several types, see + /// `ParameterValue.msg` and `ParameterType.msg`. rcl_interfaces__msg__ParameterValue value; } rcl_interfaces__msg__Parameter; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp index 71d0497eb..4a21e18f1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'value' @@ -59,7 +60,7 @@ struct Parameter_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _value_type = rcl_interfaces::msg::ParameterValue_; @@ -67,7 +68,7 @@ struct Parameter_ // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp new file mode 100644 index 000000000..22d9d7b66 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/Parameter.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'value' +#include "rcl_interfaces/msg/detail/parameter_value__traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Parameter & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: value + { + out << "value: "; + to_flow_style_yaml(msg.value, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Parameter & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "value:\n"; + to_block_style_yaml(msg.value, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Parameter & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::Parameter & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::Parameter & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::Parameter"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/Parameter"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.c new file mode 100644 index 000000000..09188aa78 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.c @@ -0,0 +1,110 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/Parameter.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter__functions.h" +#include "rcl_interfaces/msg/detail/parameter__struct.h" + + +// Include directives for member types +// Member `name` +#include "rosidl_runtime_c/string_functions.h" +// Member `value` +#include "rcl_interfaces/msg/parameter_value.h" +// Member `value` +#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_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; + rcl_interfaces__msg__Parameter__init(message_memory); +} + +void rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_fini_function(void * message_memory) +{ + rcl_interfaces__msg__Parameter__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array[2] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__Parameter, name), // 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 + }, + { + "value", // 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(rcl_interfaces__msg__Parameter, value), // 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 rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_members = { + "rcl_interfaces__msg", // message namespace + "Parameter", // message name + 2, // number of fields + sizeof(rcl_interfaces__msg__Parameter), + rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array, // message members + rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_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 rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle = { + 0, + &rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)() { + rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)(); + if (!rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__Parameter__rosidl_typesupport_introspection_c__Parameter_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.cpp index e374c4186..986b28002 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Parameter_mes 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Parameter_mes 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp similarity index 85% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp index 0f76dbf74..98cdbed6c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { @@ -52,16 +53,32 @@ class Init_ParameterDescriptor_floating_point_range ::rcl_interfaces::msg::ParameterDescriptor msg_; }; +class Init_ParameterDescriptor_dynamic_typing +{ +public: + explicit Init_ParameterDescriptor_dynamic_typing(::rcl_interfaces::msg::ParameterDescriptor & msg) + : msg_(msg) + {} + Init_ParameterDescriptor_floating_point_range dynamic_typing(::rcl_interfaces::msg::ParameterDescriptor::_dynamic_typing_type arg) + { + msg_.dynamic_typing = std::move(arg); + return Init_ParameterDescriptor_floating_point_range(msg_); + } + +private: + ::rcl_interfaces::msg::ParameterDescriptor msg_; +}; + class Init_ParameterDescriptor_read_only { public: explicit Init_ParameterDescriptor_read_only(::rcl_interfaces::msg::ParameterDescriptor & msg) : msg_(msg) {} - Init_ParameterDescriptor_floating_point_range read_only(::rcl_interfaces::msg::ParameterDescriptor::_read_only_type arg) + Init_ParameterDescriptor_dynamic_typing read_only(::rcl_interfaces::msg::ParameterDescriptor::_read_only_type arg) { msg_.read_only = std::move(arg); - return Init_ParameterDescriptor_floating_point_range(msg_); + return Init_ParameterDescriptor_dynamic_typing(msg_); } private: diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__functions.c index bcb77ceaa..ad43486b1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__functions.c @@ -45,6 +45,8 @@ rcl_interfaces__msg__ParameterDescriptor__init(rcl_interfaces__msg__ParameterDes } // read_only msg->read_only = false; + // dynamic_typing + msg->dynamic_typing = false; // floating_point_range if (!rcl_interfaces__msg__FloatingPointRange__Sequence__init(&msg->floating_point_range, 0)) { rcl_interfaces__msg__ParameterDescriptor__fini(msg); @@ -72,6 +74,7 @@ rcl_interfaces__msg__ParameterDescriptor__fini(rcl_interfaces__msg__ParameterDes // additional_constraints rosidl_runtime_c__String__fini(&msg->additional_constraints); // read_only + // dynamic_typing // floating_point_range rcl_interfaces__msg__FloatingPointRange__Sequence__fini(&msg->floating_point_range); // integer_range @@ -110,6 +113,10 @@ rcl_interfaces__msg__ParameterDescriptor__are_equal(const rcl_interfaces__msg__P if (lhs->read_only != rhs->read_only) { return false; } + // dynamic_typing + if (lhs->dynamic_typing != rhs->dynamic_typing) { + return false; + } // floating_point_range if (!rcl_interfaces__msg__FloatingPointRange__Sequence__are_equal( &(lhs->floating_point_range), &(rhs->floating_point_range))) @@ -155,6 +162,8 @@ rcl_interfaces__msg__ParameterDescriptor__copy( } // read_only output->read_only = input->read_only; + // dynamic_typing + output->dynamic_typing = input->dynamic_typing; // floating_point_range if (!rcl_interfaces__msg__FloatingPointRange__Sequence__copy( &(input->floating_point_range), &(output->floating_point_range))) @@ -315,22 +324,27 @@ rcl_interfaces__msg__ParameterDescriptor__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ParameterDescriptor); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ParameterDescriptor * data = - (rcl_interfaces__msg__ParameterDescriptor *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ParameterDescriptor *)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 (!rcl_interfaces__msg__ParameterDescriptor__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ParameterDescriptor__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; ) { - rcl_interfaces__msg__ParameterDescriptor__fini(&data[i]); + rcl_interfaces__msg__ParameterDescriptor__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h index 8ce823563..d41ccf8c5 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ParameterDescriptor( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ParameterDescriptor( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp index 46b5ee47a..970450ff7 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ParameterDescriptor( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.h new file mode 100644 index 000000000..e58a05b91 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.h @@ -0,0 +1,89 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/ParameterDescriptor.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'name' +// Member 'description' +// Member 'additional_constraints' +#include "rosidl_runtime_c/string.h" +// Member 'floating_point_range' +#include "rcl_interfaces/msg/detail/floating_point_range__struct.h" +// Member 'integer_range' +#include "rcl_interfaces/msg/detail/integer_range__struct.h" + +// constants for array fields with an upper bound +// floating_point_range +enum +{ + rcl_interfaces__msg__ParameterDescriptor__floating_point_range__MAX_SIZE = 1 +}; +// integer_range +enum +{ + rcl_interfaces__msg__ParameterDescriptor__integer_range__MAX_SIZE = 1 +}; + +/// Struct defined in msg/ParameterDescriptor in the package rcl_interfaces. +/** + * This is the message to communicate a parameter's descriptor. + */ +typedef struct rcl_interfaces__msg__ParameterDescriptor +{ + /// The name of the parameter. + rosidl_runtime_c__String name; + /// Enum values are defined in the `ParameterType.msg` message. + uint8_t type; + /// Description of the parameter, visible from introspection tools. + rosidl_runtime_c__String description; + /// Parameter constraints + /// Plain English description of additional constraints which cannot be expressed + /// with the available constraints, e.g. "only prime numbers". + /// + /// By convention, this should only be used to clarify constraints which cannot + /// be completely expressed with the parameter constraints below. + rosidl_runtime_c__String additional_constraints; + /// If 'true' then the value cannot change after it has been initialized. + bool read_only; + /// If true, the parameter is allowed to change type. + bool dynamic_typing; + /// If any of the following sequences are not empty, then the constraint inside of + /// them apply to this parameter. + /// + /// FloatingPointRange and IntegerRange are mutually exclusive. + /// FloatingPointRange consists of a from_value, a to_value, and a step. + rcl_interfaces__msg__FloatingPointRange__Sequence floating_point_range; + /// IntegerRange consists of a from_value, a to_value, and a step. + rcl_interfaces__msg__IntegerRange__Sequence integer_range; +} rcl_interfaces__msg__ParameterDescriptor; + +// Struct for a sequence of rcl_interfaces__msg__ParameterDescriptor. +typedef struct rcl_interfaces__msg__ParameterDescriptor__Sequence +{ + rcl_interfaces__msg__ParameterDescriptor * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__ParameterDescriptor__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp similarity index 79% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp index 76281213f..e6e12be9f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'floating_point_range' @@ -44,12 +45,14 @@ struct ParameterDescriptor_ rosidl_runtime_cpp::MessageInitialization::DEFAULTS_ONLY == _init) { this->read_only = false; + this->dynamic_typing = false; } else if (rosidl_runtime_cpp::MessageInitialization::ZERO == _init) { this->name = ""; this->type = 0; this->description = ""; this->additional_constraints = ""; this->read_only = false; + this->dynamic_typing = false; } if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || rosidl_runtime_cpp::MessageInitialization::ZERO == _init) @@ -70,12 +73,14 @@ struct ParameterDescriptor_ rosidl_runtime_cpp::MessageInitialization::DEFAULTS_ONLY == _init) { this->read_only = false; + this->dynamic_typing = false; } else if (rosidl_runtime_cpp::MessageInitialization::ZERO == _init) { this->name = ""; this->type = 0; this->description = ""; this->additional_constraints = ""; this->read_only = false; + this->dynamic_typing = false; } if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || rosidl_runtime_cpp::MessageInitialization::ZERO == _init) @@ -89,30 +94,33 @@ struct ParameterDescriptor_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _type_type = uint8_t; _type_type type; using _description_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _description_type description; using _additional_constraints_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _additional_constraints_type additional_constraints; using _read_only_type = bool; _read_only_type read_only; + using _dynamic_typing_type = + bool; + _dynamic_typing_type dynamic_typing; using _floating_point_range_type = - rosidl_runtime_cpp::BoundedVector, 1, typename ContainerAllocator::template rebind>::other>; + rosidl_runtime_cpp::BoundedVector, 1, typename std::allocator_traits::template rebind_alloc>>; _floating_point_range_type floating_point_range; using _integer_range_type = - rosidl_runtime_cpp::BoundedVector, 1, typename ContainerAllocator::template rebind>::other>; + rosidl_runtime_cpp::BoundedVector, 1, typename std::allocator_traits::template rebind_alloc>>; _integer_range_type integer_range; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; @@ -124,13 +132,13 @@ struct ParameterDescriptor_ return *this; } Type & set__description( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->description = _arg; return *this; } Type & set__additional_constraints( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->additional_constraints = _arg; return *this; @@ -141,14 +149,20 @@ struct ParameterDescriptor_ this->read_only = _arg; return *this; } + Type & set__dynamic_typing( + const bool & _arg) + { + this->dynamic_typing = _arg; + return *this; + } Type & set__floating_point_range( - const rosidl_runtime_cpp::BoundedVector, 1, typename ContainerAllocator::template rebind>::other> & _arg) + const rosidl_runtime_cpp::BoundedVector, 1, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->floating_point_range = _arg; return *this; } Type & set__integer_range( - const rosidl_runtime_cpp::BoundedVector, 1, typename ContainerAllocator::template rebind>::other> & _arg) + const rosidl_runtime_cpp::BoundedVector, 1, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->integer_range = _arg; return *this; @@ -211,6 +225,9 @@ struct ParameterDescriptor_ if (this->read_only != other.read_only) { return false; } + if (this->dynamic_typing != other.dynamic_typing) { + return false; + } if (this->floating_point_range != other.floating_point_range) { return false; } diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp new file mode 100644 index 000000000..650b5599d --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp @@ -0,0 +1,274 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ParameterDescriptor.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'floating_point_range' +#include "rcl_interfaces/msg/detail/floating_point_range__traits.hpp" +// Member 'integer_range' +#include "rcl_interfaces/msg/detail/integer_range__traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParameterDescriptor & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: description + { + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + out << ", "; + } + + // member: additional_constraints + { + out << "additional_constraints: "; + rosidl_generator_traits::value_to_yaml(msg.additional_constraints, out); + out << ", "; + } + + // member: read_only + { + out << "read_only: "; + rosidl_generator_traits::value_to_yaml(msg.read_only, out); + out << ", "; + } + + // member: dynamic_typing + { + out << "dynamic_typing: "; + rosidl_generator_traits::value_to_yaml(msg.dynamic_typing, out); + out << ", "; + } + + // member: floating_point_range + { + if (msg.floating_point_range.size() == 0) { + out << "floating_point_range: []"; + } else { + out << "floating_point_range: ["; + size_t pending_items = msg.floating_point_range.size(); + for (auto item : msg.floating_point_range) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: integer_range + { + if (msg.integer_range.size() == 0) { + out << "integer_range: []"; + } else { + out << "integer_range: ["; + size_t pending_items = msg.integer_range.size(); + for (auto item : msg.integer_range) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParameterDescriptor & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: description + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + out << "\n"; + } + + // member: additional_constraints + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "additional_constraints: "; + rosidl_generator_traits::value_to_yaml(msg.additional_constraints, out); + out << "\n"; + } + + // member: read_only + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "read_only: "; + rosidl_generator_traits::value_to_yaml(msg.read_only, out); + out << "\n"; + } + + // member: dynamic_typing + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "dynamic_typing: "; + rosidl_generator_traits::value_to_yaml(msg.dynamic_typing, out); + out << "\n"; + } + + // member: floating_point_range + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.floating_point_range.size() == 0) { + out << "floating_point_range: []\n"; + } else { + out << "floating_point_range:\n"; + for (auto item : msg.floating_point_range) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: integer_range + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.integer_range.size() == 0) { + out << "integer_range: []\n"; + } else { + out << "integer_range:\n"; + for (auto item : msg.integer_range) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParameterDescriptor & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ParameterDescriptor & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ParameterDescriptor & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ParameterDescriptor"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ParameterDescriptor"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_DESCRIPTOR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c new file mode 100644 index 000000000..5b74ab9bc --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.c @@ -0,0 +1,330 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ParameterDescriptor.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter_descriptor__functions.h" +#include "rcl_interfaces/msg/detail/parameter_descriptor__struct.h" + + +// Include directives for member types +// Member `name` +// Member `description` +// Member `additional_constraints` +#include "rosidl_runtime_c/string_functions.h" +// Member `floating_point_range` +#include "rcl_interfaces/msg/floating_point_range.h" +// Member `floating_point_range` +#include "rcl_interfaces/msg/detail/floating_point_range__rosidl_typesupport_introspection_c.h" +// Member `integer_range` +#include "rcl_interfaces/msg/integer_range.h" +// Member `integer_range` +#include "rcl_interfaces/msg/detail/integer_range__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_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; + rcl_interfaces__msg__ParameterDescriptor__init(message_memory); +} + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ParameterDescriptor__fini(message_memory); +} + +size_t rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__floating_point_range( + const void * untyped_member) +{ + const rcl_interfaces__msg__FloatingPointRange__Sequence * member = + (const rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__floating_point_range( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__FloatingPointRange__Sequence * member = + (const rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__floating_point_range( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__FloatingPointRange__Sequence * member = + (rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__fetch_function__ParameterDescriptor__floating_point_range( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__FloatingPointRange * item = + ((const rcl_interfaces__msg__FloatingPointRange *) + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__floating_point_range(untyped_member, index)); + rcl_interfaces__msg__FloatingPointRange * value = + (rcl_interfaces__msg__FloatingPointRange *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__assign_function__ParameterDescriptor__floating_point_range( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__FloatingPointRange * item = + ((rcl_interfaces__msg__FloatingPointRange *) + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__floating_point_range(untyped_member, index)); + const rcl_interfaces__msg__FloatingPointRange * value = + (const rcl_interfaces__msg__FloatingPointRange *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__floating_point_range( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__FloatingPointRange__Sequence * member = + (rcl_interfaces__msg__FloatingPointRange__Sequence *)(untyped_member); + rcl_interfaces__msg__FloatingPointRange__Sequence__fini(member); + return rcl_interfaces__msg__FloatingPointRange__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__integer_range( + const void * untyped_member) +{ + const rcl_interfaces__msg__IntegerRange__Sequence * member = + (const rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__integer_range( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__IntegerRange__Sequence * member = + (const rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__integer_range( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__IntegerRange__Sequence * member = + (rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__fetch_function__ParameterDescriptor__integer_range( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__IntegerRange * item = + ((const rcl_interfaces__msg__IntegerRange *) + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__integer_range(untyped_member, index)); + rcl_interfaces__msg__IntegerRange * value = + (rcl_interfaces__msg__IntegerRange *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__assign_function__ParameterDescriptor__integer_range( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__IntegerRange * item = + ((rcl_interfaces__msg__IntegerRange *) + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__integer_range(untyped_member, index)); + const rcl_interfaces__msg__IntegerRange * value = + (const rcl_interfaces__msg__IntegerRange *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__integer_range( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__IntegerRange__Sequence * member = + (rcl_interfaces__msg__IntegerRange__Sequence *)(untyped_member); + rcl_interfaces__msg__IntegerRange__Sequence__fini(member); + return rcl_interfaces__msg__IntegerRange__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[8] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, name), // 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 + }, + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, type), // 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 + }, + { + "description", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, description), // 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 + }, + { + "additional_constraints", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, additional_constraints), // 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 + }, + { + "read_only", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, read_only), // 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 + }, + { + "dynamic_typing", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, dynamic_typing), // 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 + }, + { + "floating_point_range", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 1, // array size + true, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, floating_point_range), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__floating_point_range, // size() function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__floating_point_range, // get_const(index) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__floating_point_range, // get(index) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__fetch_function__ParameterDescriptor__floating_point_range, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__assign_function__ParameterDescriptor__floating_point_range, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__floating_point_range // resize(index) function pointer + }, + { + "integer_range", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 1, // array size + true, // is upper bound + offsetof(rcl_interfaces__msg__ParameterDescriptor, integer_range), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__integer_range, // size() function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__integer_range, // get_const(index) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__integer_range, // get(index) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__fetch_function__ParameterDescriptor__integer_range, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__assign_function__ParameterDescriptor__integer_range, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__integer_range // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_members = { + "rcl_interfaces__msg", // message namespace + "ParameterDescriptor", // message name + 8, // number of fields + sizeof(rcl_interfaces__msg__ParameterDescriptor), + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array, // message members + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_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 rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)() { + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, FloatingPointRange)(); + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, IntegerRange)(); + if (!rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ParameterDescriptor__rosidl_typesupport_introspection_c__ParameterDescriptor_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp new file mode 100644 index 000000000..21af2a798 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.cpp @@ -0,0 +1,318 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from rcl_interfaces:msg/ParameterDescriptor.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 "rcl_interfaces/msg/detail/parameter_descriptor__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 rcl_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ParameterDescriptor_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) rcl_interfaces::msg::ParameterDescriptor(_init); +} + +void ParameterDescriptor_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ParameterDescriptor(); +} + +size_t size_function__ParameterDescriptor__floating_point_range(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterDescriptor__floating_point_range(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterDescriptor__floating_point_range(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterDescriptor__floating_point_range( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterDescriptor__floating_point_range(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterDescriptor__floating_point_range( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterDescriptor__floating_point_range(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterDescriptor__floating_point_range(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterDescriptor__integer_range(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterDescriptor__integer_range(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterDescriptor__integer_range(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterDescriptor__integer_range( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterDescriptor__integer_range(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterDescriptor__integer_range( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterDescriptor__integer_range(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterDescriptor__integer_range(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterDescriptor_message_member_array[8] = { + { + "name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, name), // 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 + }, + { + "type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, type), // 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 + }, + { + "description", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, description), // 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 + }, + { + "additional_constraints", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, additional_constraints), // 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 + }, + { + "read_only", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, read_only), // 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 + }, + { + "dynamic_typing", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, dynamic_typing), // 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 + }, + { + "floating_point_range", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 1, // array size + true, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, floating_point_range), // bytes offset in struct + nullptr, // default value + size_function__ParameterDescriptor__floating_point_range, // size() function pointer + get_const_function__ParameterDescriptor__floating_point_range, // get_const(index) function pointer + get_function__ParameterDescriptor__floating_point_range, // get(index) function pointer + fetch_function__ParameterDescriptor__floating_point_range, // fetch(index, &value) function pointer + assign_function__ParameterDescriptor__floating_point_range, // assign(index, value) function pointer + resize_function__ParameterDescriptor__floating_point_range // resize(index) function pointer + }, + { + "integer_range", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 1, // array size + true, // is upper bound + offsetof(rcl_interfaces::msg::ParameterDescriptor, integer_range), // bytes offset in struct + nullptr, // default value + size_function__ParameterDescriptor__integer_range, // size() function pointer + get_const_function__ParameterDescriptor__integer_range, // get_const(index) function pointer + get_function__ParameterDescriptor__integer_range, // get(index) function pointer + fetch_function__ParameterDescriptor__integer_range, // fetch(index, &value) function pointer + assign_function__ParameterDescriptor__integer_range, // assign(index, value) function pointer + resize_function__ParameterDescriptor__integer_range // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterDescriptor_message_members = { + "rcl_interfaces::msg", // message namespace + "ParameterDescriptor", // message name + 8, // number of fields + sizeof(rcl_interfaces::msg::ParameterDescriptor), + ParameterDescriptor_message_member_array, // message members + ParameterDescriptor_init_function, // function to initialize message memory (memory has to be allocated) + ParameterDescriptor_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ParameterDescriptor_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ParameterDescriptor_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace rcl_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterDescriptor_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, rcl_interfaces, msg, ParameterDescriptor)() { + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterDescriptor_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_descriptor__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp index 8ad0d96a4..96845d7b4 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter_event__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter_event__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__functions.c similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__functions.c index 5e2825904..f8e575e8c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__functions.c @@ -298,22 +298,27 @@ rcl_interfaces__msg__ParameterEvent__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ParameterEvent); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ParameterEvent * data = - (rcl_interfaces__msg__ParameterEvent *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ParameterEvent *)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 (!rcl_interfaces__msg__ParameterEvent__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ParameterEvent__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; ) { - rcl_interfaces__msg__ParameterEvent__fini(&data[i]); + rcl_interfaces__msg__ParameterEvent__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h index cbfe0cdaf..937d15fdc 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ParameterEvent( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ParameterEvent( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp index 287374389..ad1ff4efa 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ParameterEvent( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.h new file mode 100644 index 000000000..355033109 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.h @@ -0,0 +1,64 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/ParameterEvent.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__struct.h" +// Member 'node' +#include "rosidl_runtime_c/string.h" +// Member 'new_parameters' +// Member 'changed_parameters' +// Member 'deleted_parameters' +#include "rcl_interfaces/msg/detail/parameter__struct.h" + +/// Struct defined in msg/ParameterEvent in the package rcl_interfaces. +/** + * This message contains a parameter event. + * Because the parameter event was an atomic update, a specific parameter name + * can only be in one of the three sets. + */ +typedef struct rcl_interfaces__msg__ParameterEvent +{ + /// The time stamp when this parameter event occurred. + builtin_interfaces__msg__Time stamp; + /// Fully qualified ROS path to node. + rosidl_runtime_c__String node; + /// New parameters that have been set for this node. + rcl_interfaces__msg__Parameter__Sequence new_parameters; + /// Parameters that have been changed during this event. + rcl_interfaces__msg__Parameter__Sequence changed_parameters; + /// Parameters that have been deleted during this event. + rcl_interfaces__msg__Parameter__Sequence deleted_parameters; +} rcl_interfaces__msg__ParameterEvent; + +// Struct for a sequence of rcl_interfaces__msg__ParameterEvent. +typedef struct rcl_interfaces__msg__ParameterEvent__Sequence +{ + rcl_interfaces__msg__ParameterEvent * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__ParameterEvent__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp similarity index 83% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp index 0ababbc7f..cab973b08 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'stamp' @@ -66,16 +67,16 @@ struct ParameterEvent_ builtin_interfaces::msg::Time_; _stamp_type stamp; using _node_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _node_type node; using _new_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _new_parameters_type new_parameters; using _changed_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _changed_parameters_type changed_parameters; using _deleted_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _deleted_parameters_type deleted_parameters; // setters for named parameter idiom @@ -86,25 +87,25 @@ struct ParameterEvent_ return *this; } Type & set__node( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->node = _arg; return *this; } Type & set__new_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->new_parameters = _arg; return *this; } Type & set__changed_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->changed_parameters = _arg; return *this; } Type & set__deleted_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->deleted_parameters = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp new file mode 100644 index 000000000..342efcb29 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp @@ -0,0 +1,244 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ParameterEvent.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter_event__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" +// Member 'new_parameters' +// Member 'changed_parameters' +// Member 'deleted_parameters' +#include "rcl_interfaces/msg/detail/parameter__traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParameterEvent & msg, + std::ostream & out) +{ + out << "{"; + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + out << ", "; + } + + // member: node + { + out << "node: "; + rosidl_generator_traits::value_to_yaml(msg.node, out); + out << ", "; + } + + // member: new_parameters + { + if (msg.new_parameters.size() == 0) { + out << "new_parameters: []"; + } else { + out << "new_parameters: ["; + size_t pending_items = msg.new_parameters.size(); + for (auto item : msg.new_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: changed_parameters + { + if (msg.changed_parameters.size() == 0) { + out << "changed_parameters: []"; + } else { + out << "changed_parameters: ["; + size_t pending_items = msg.changed_parameters.size(); + for (auto item : msg.changed_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: deleted_parameters + { + if (msg.deleted_parameters.size() == 0) { + out << "deleted_parameters: []"; + } else { + out << "deleted_parameters: ["; + size_t pending_items = msg.deleted_parameters.size(); + for (auto item : msg.deleted_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParameterEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } + + // member: node + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "node: "; + rosidl_generator_traits::value_to_yaml(msg.node, out); + out << "\n"; + } + + // member: new_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.new_parameters.size() == 0) { + out << "new_parameters: []\n"; + } else { + out << "new_parameters:\n"; + for (auto item : msg.new_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: changed_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.changed_parameters.size() == 0) { + out << "changed_parameters: []\n"; + } else { + out << "changed_parameters:\n"; + for (auto item : msg.changed_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: deleted_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.deleted_parameters.size() == 0) { + out << "deleted_parameters: []\n"; + } else { + out << "deleted_parameters:\n"; + for (auto item : msg.deleted_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParameterEvent & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ParameterEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ParameterEvent & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ParameterEvent"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ParameterEvent"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.c new file mode 100644 index 000000000..f471796e4 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.c @@ -0,0 +1,340 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ParameterEvent.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter_event__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter_event__functions.h" +#include "rcl_interfaces/msg/detail/parameter_event__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `node` +#include "rosidl_runtime_c/string_functions.h" +// Member `new_parameters` +// Member `changed_parameters` +// Member `deleted_parameters` +#include "rcl_interfaces/msg/parameter.h" +// Member `new_parameters` +// Member `changed_parameters` +// Member `deleted_parameters` +#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_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; + rcl_interfaces__msg__ParameterEvent__init(message_memory); +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ParameterEvent__fini(message_memory); +} + +size_t rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__new_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__new_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__new_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__new_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__Parameter * item = + ((const rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__new_parameters(untyped_member, index)); + rcl_interfaces__msg__Parameter * value = + (rcl_interfaces__msg__Parameter *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__new_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__Parameter * item = + ((rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__new_parameters(untyped_member, index)); + const rcl_interfaces__msg__Parameter * value = + (const rcl_interfaces__msg__Parameter *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__new_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + rcl_interfaces__msg__Parameter__Sequence__fini(member); + return rcl_interfaces__msg__Parameter__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__changed_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__changed_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__changed_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__changed_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__Parameter * item = + ((const rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__changed_parameters(untyped_member, index)); + rcl_interfaces__msg__Parameter * value = + (rcl_interfaces__msg__Parameter *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__changed_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__Parameter * item = + ((rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__changed_parameters(untyped_member, index)); + const rcl_interfaces__msg__Parameter * value = + (const rcl_interfaces__msg__Parameter *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__changed_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + rcl_interfaces__msg__Parameter__Sequence__fini(member); + return rcl_interfaces__msg__Parameter__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__deleted_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__deleted_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__deleted_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__deleted_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__Parameter * item = + ((const rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__deleted_parameters(untyped_member, index)); + rcl_interfaces__msg__Parameter * value = + (rcl_interfaces__msg__Parameter *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__deleted_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__Parameter * item = + ((rcl_interfaces__msg__Parameter *) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__deleted_parameters(untyped_member, index)); + const rcl_interfaces__msg__Parameter * value = + (const rcl_interfaces__msg__Parameter *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__deleted_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + rcl_interfaces__msg__Parameter__Sequence__fini(member); + return rcl_interfaces__msg__Parameter__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[5] = { + { + "stamp", // 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(rcl_interfaces__msg__ParameterEvent, stamp), // 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 + }, + { + "node", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEvent, node), // 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 + }, + { + "new_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEvent, new_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__new_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__new_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__new_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__new_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__new_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__new_parameters // resize(index) function pointer + }, + { + "changed_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEvent, changed_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__changed_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__changed_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__changed_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__changed_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__changed_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__changed_parameters // resize(index) function pointer + }, + { + "deleted_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEvent, deleted_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__size_function__ParameterEvent__deleted_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_const_function__ParameterEvent__deleted_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__get_function__ParameterEvent__deleted_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__fetch_function__ParameterEvent__deleted_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__assign_function__ParameterEvent__deleted_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__resize_function__ParameterEvent__deleted_parameters // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_members = { + "rcl_interfaces__msg", // message namespace + "ParameterEvent", // message name + 5, // number of fields + sizeof(rcl_interfaces__msg__ParameterEvent), + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array, // message members + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_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 rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterEvent)() { + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); + if (!rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ParameterEvent__rosidl_typesupport_introspection_c__ParameterEvent_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.cpp similarity index 75% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.cpp index 4112ae9ef..dcaf5f3dc 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ParameterEvent__new_parameters(void * untyped_member, size_ return &member[index]; } +void fetch_function__ParameterEvent__new_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEvent__new_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEvent__new_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEvent__new_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ParameterEvent__new_parameters(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__ParameterEvent__changed_parameters(void * untyped_member, s return &member[index]; } +void fetch_function__ParameterEvent__changed_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEvent__changed_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEvent__changed_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEvent__changed_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ParameterEvent__changed_parameters(void * untyped_member, size_t size) { auto * member = @@ -111,6 +147,24 @@ void * get_function__ParameterEvent__deleted_parameters(void * untyped_member, s return &member[index]; } +void fetch_function__ParameterEvent__deleted_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEvent__deleted_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEvent__deleted_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEvent__deleted_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ParameterEvent__deleted_parameters(void * untyped_member, size_t size) { auto * member = @@ -132,6 +186,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEven 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 }, { @@ -147,6 +203,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEven 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 }, { @@ -162,6 +220,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEven size_function__ParameterEvent__new_parameters, // size() function pointer get_const_function__ParameterEvent__new_parameters, // get_const(index) function pointer get_function__ParameterEvent__new_parameters, // get(index) function pointer + fetch_function__ParameterEvent__new_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEvent__new_parameters, // assign(index, value) function pointer resize_function__ParameterEvent__new_parameters // resize(index) function pointer }, { @@ -177,6 +237,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEven size_function__ParameterEvent__changed_parameters, // size() function pointer get_const_function__ParameterEvent__changed_parameters, // get_const(index) function pointer get_function__ParameterEvent__changed_parameters, // get(index) function pointer + fetch_function__ParameterEvent__changed_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEvent__changed_parameters, // assign(index, value) function pointer resize_function__ParameterEvent__changed_parameters // resize(index) function pointer }, { @@ -192,6 +254,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEven size_function__ParameterEvent__deleted_parameters, // size() function pointer get_const_function__ParameterEvent__deleted_parameters, // get_const(index) function pointer get_function__ParameterEvent__deleted_parameters, // get(index) function pointer + fetch_function__ParameterEvent__deleted_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEvent__deleted_parameters, // assign(index, value) function pointer resize_function__ParameterEvent__deleted_parameters // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp index 4b46b15c8..70a929f2e 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c similarity index 94% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c index 0be0016fb..2e5796fdb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.c @@ -256,22 +256,27 @@ rcl_interfaces__msg__ParameterEventDescriptors__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ParameterEventDescriptors); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ParameterEventDescriptors * data = - (rcl_interfaces__msg__ParameterEventDescriptors *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ParameterEventDescriptors *)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 (!rcl_interfaces__msg__ParameterEventDescriptors__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ParameterEventDescriptors__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; ) { - rcl_interfaces__msg__ParameterEventDescriptors__fini(&data[i]); + rcl_interfaces__msg__ParameterEventDescriptors__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h index 4f456ea4d..b4ba7b844 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ParameterEventDescriptors( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ParameterEventDescriptors( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp index fbe8f6059..3a698068e 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ParameterEventDescriptors( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h similarity index 85% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h index cc26c0485..64cb847e2 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h @@ -23,7 +23,12 @@ extern "C" // Member 'deleted_parameters' #include "rcl_interfaces/msg/detail/parameter_descriptor__struct.h" -// Struct defined in msg/ParameterEventDescriptors in the package rcl_interfaces. +/// Struct defined in msg/ParameterEventDescriptors in the package rcl_interfaces. +/** + * This message contains descriptors of a parameter event. + * It was an atomic update. + * A specific parameter name can only be in one of the three sets. + */ typedef struct rcl_interfaces__msg__ParameterEventDescriptors { rcl_interfaces__msg__ParameterDescriptor__Sequence new_parameters; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp similarity index 82% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp index dea54f275..0afc2ceef 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'new_parameters' @@ -51,30 +52,30 @@ struct ParameterEventDescriptors_ // field types and members using _new_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _new_parameters_type new_parameters; using _changed_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _changed_parameters_type changed_parameters; using _deleted_parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _deleted_parameters_type deleted_parameters; // setters for named parameter idiom Type & set__new_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->new_parameters = _arg; return *this; } Type & set__changed_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->changed_parameters = _arg; return *this; } Type & set__deleted_parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->deleted_parameters = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp new file mode 100644 index 000000000..f22ca6802 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__traits.hpp @@ -0,0 +1,209 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ParameterEventDescriptors.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'new_parameters' +// Member 'changed_parameters' +// Member 'deleted_parameters' +#include "rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParameterEventDescriptors & msg, + std::ostream & out) +{ + out << "{"; + // member: new_parameters + { + if (msg.new_parameters.size() == 0) { + out << "new_parameters: []"; + } else { + out << "new_parameters: ["; + size_t pending_items = msg.new_parameters.size(); + for (auto item : msg.new_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: changed_parameters + { + if (msg.changed_parameters.size() == 0) { + out << "changed_parameters: []"; + } else { + out << "changed_parameters: ["; + size_t pending_items = msg.changed_parameters.size(); + for (auto item : msg.changed_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: deleted_parameters + { + if (msg.deleted_parameters.size() == 0) { + out << "deleted_parameters: []"; + } else { + out << "deleted_parameters: ["; + size_t pending_items = msg.deleted_parameters.size(); + for (auto item : msg.deleted_parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParameterEventDescriptors & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: new_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.new_parameters.size() == 0) { + out << "new_parameters: []\n"; + } else { + out << "new_parameters:\n"; + for (auto item : msg.new_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: changed_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.changed_parameters.size() == 0) { + out << "changed_parameters: []\n"; + } else { + out << "changed_parameters:\n"; + for (auto item : msg.changed_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: deleted_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.deleted_parameters.size() == 0) { + out << "deleted_parameters: []\n"; + } else { + out << "deleted_parameters:\n"; + for (auto item : msg.deleted_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParameterEventDescriptors & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ParameterEventDescriptors & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ParameterEventDescriptors & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ParameterEventDescriptors"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ParameterEventDescriptors"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_EVENT_DESCRIPTORS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c new file mode 100644 index 000000000..9b5de8b73 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.c @@ -0,0 +1,298 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ParameterEventDescriptors.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter_event_descriptors__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter_event_descriptors__functions.h" +#include "rcl_interfaces/msg/detail/parameter_event_descriptors__struct.h" + + +// Include directives for member types +// Member `new_parameters` +// Member `changed_parameters` +// Member `deleted_parameters` +#include "rcl_interfaces/msg/parameter_descriptor.h" +// Member `new_parameters` +// Member `changed_parameters` +// Member `deleted_parameters` +#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_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; + rcl_interfaces__msg__ParameterEventDescriptors__init(message_memory); +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ParameterEventDescriptors__fini(message_memory); +} + +size_t rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__new_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__new_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__new_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__new_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__ParameterDescriptor * item = + ((const rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__new_parameters(untyped_member, index)); + rcl_interfaces__msg__ParameterDescriptor * value = + (rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__new_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__ParameterDescriptor * item = + ((rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__new_parameters(untyped_member, index)); + const rcl_interfaces__msg__ParameterDescriptor * value = + (const rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__new_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); + return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__changed_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__changed_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__changed_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__changed_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__ParameterDescriptor * item = + ((const rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__changed_parameters(untyped_member, index)); + rcl_interfaces__msg__ParameterDescriptor * value = + (rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__changed_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__ParameterDescriptor * item = + ((rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__changed_parameters(untyped_member, index)); + const rcl_interfaces__msg__ParameterDescriptor * value = + (const rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__changed_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); + return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__deleted_parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__deleted_parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__deleted_parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__deleted_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__ParameterDescriptor * item = + ((const rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__deleted_parameters(untyped_member, index)); + rcl_interfaces__msg__ParameterDescriptor * value = + (rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__deleted_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__ParameterDescriptor * item = + ((rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__deleted_parameters(untyped_member, index)); + const rcl_interfaces__msg__ParameterDescriptor * value = + (const rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__deleted_parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); + return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[3] = { + { + "new_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEventDescriptors, new_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__new_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__new_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__new_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__new_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__new_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__new_parameters // resize(index) function pointer + }, + { + "changed_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEventDescriptors, changed_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__changed_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__changed_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__changed_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__changed_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__changed_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__changed_parameters // resize(index) function pointer + }, + { + "deleted_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterEventDescriptors, deleted_parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__size_function__ParameterEventDescriptors__deleted_parameters, // size() function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_const_function__ParameterEventDescriptors__deleted_parameters, // get_const(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__get_function__ParameterEventDescriptors__deleted_parameters, // get(index) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__fetch_function__ParameterEventDescriptors__deleted_parameters, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__assign_function__ParameterEventDescriptors__deleted_parameters, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__resize_function__ParameterEventDescriptors__deleted_parameters // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_members = { + "rcl_interfaces__msg", // message namespace + "ParameterEventDescriptors", // message name + 3, // number of fields + sizeof(rcl_interfaces__msg__ParameterEventDescriptors), + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array, // message members + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_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 rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterEventDescriptors)() { + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); + if (!rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ParameterEventDescriptors__rosidl_typesupport_introspection_c__ParameterEventDescriptors_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp new file mode 100644 index 000000000..6db6eb88e --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.cpp @@ -0,0 +1,278 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from rcl_interfaces:msg/ParameterEventDescriptors.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 "rcl_interfaces/msg/detail/parameter_event_descriptors__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 rcl_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ParameterEventDescriptors_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) rcl_interfaces::msg::ParameterEventDescriptors(_init); +} + +void ParameterEventDescriptors_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ParameterEventDescriptors(); +} + +size_t size_function__ParameterEventDescriptors__new_parameters(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterEventDescriptors__new_parameters(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterEventDescriptors__new_parameters(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterEventDescriptors__new_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEventDescriptors__new_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEventDescriptors__new_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEventDescriptors__new_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterEventDescriptors__new_parameters(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterEventDescriptors__changed_parameters(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterEventDescriptors__changed_parameters(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterEventDescriptors__changed_parameters(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterEventDescriptors__changed_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEventDescriptors__changed_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEventDescriptors__changed_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEventDescriptors__changed_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterEventDescriptors__changed_parameters(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterEventDescriptors__deleted_parameters(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterEventDescriptors__deleted_parameters(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterEventDescriptors__deleted_parameters(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterEventDescriptors__deleted_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterEventDescriptors__deleted_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterEventDescriptors__deleted_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterEventDescriptors__deleted_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterEventDescriptors__deleted_parameters(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterEventDescriptors_message_member_array[3] = { + { + "new_parameters", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterEventDescriptors, new_parameters), // bytes offset in struct + nullptr, // default value + size_function__ParameterEventDescriptors__new_parameters, // size() function pointer + get_const_function__ParameterEventDescriptors__new_parameters, // get_const(index) function pointer + get_function__ParameterEventDescriptors__new_parameters, // get(index) function pointer + fetch_function__ParameterEventDescriptors__new_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEventDescriptors__new_parameters, // assign(index, value) function pointer + resize_function__ParameterEventDescriptors__new_parameters // resize(index) function pointer + }, + { + "changed_parameters", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterEventDescriptors, changed_parameters), // bytes offset in struct + nullptr, // default value + size_function__ParameterEventDescriptors__changed_parameters, // size() function pointer + get_const_function__ParameterEventDescriptors__changed_parameters, // get_const(index) function pointer + get_function__ParameterEventDescriptors__changed_parameters, // get(index) function pointer + fetch_function__ParameterEventDescriptors__changed_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEventDescriptors__changed_parameters, // assign(index, value) function pointer + resize_function__ParameterEventDescriptors__changed_parameters // resize(index) function pointer + }, + { + "deleted_parameters", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterEventDescriptors, deleted_parameters), // bytes offset in struct + nullptr, // default value + size_function__ParameterEventDescriptors__deleted_parameters, // size() function pointer + get_const_function__ParameterEventDescriptors__deleted_parameters, // get_const(index) function pointer + get_function__ParameterEventDescriptors__deleted_parameters, // get(index) function pointer + fetch_function__ParameterEventDescriptors__deleted_parameters, // fetch(index, &value) function pointer + assign_function__ParameterEventDescriptors__deleted_parameters, // assign(index, value) function pointer + resize_function__ParameterEventDescriptors__deleted_parameters // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterEventDescriptors_message_members = { + "rcl_interfaces::msg", // message namespace + "ParameterEventDescriptors", // message name + 3, // number of fields + sizeof(rcl_interfaces::msg::ParameterEventDescriptors), + ParameterEventDescriptors_message_member_array, // message members + ParameterEventDescriptors_init_function, // function to initialize message memory (memory has to be allocated) + ParameterEventDescriptors_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ParameterEventDescriptors_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ParameterEventDescriptors_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace rcl_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterEventDescriptors_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, rcl_interfaces, msg, ParameterEventDescriptors)() { + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterEventDescriptors_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event_descriptors__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp index 6ea3e5a16..f63af2c6c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter_type__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter_type__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__functions.c similarity index 90% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__functions.c index 32d14355b..831fe080c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__functions.c @@ -201,22 +201,27 @@ rcl_interfaces__msg__ParameterType__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ParameterType); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ParameterType * data = - (rcl_interfaces__msg__ParameterType *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ParameterType *)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 (!rcl_interfaces__msg__ParameterType__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ParameterType__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; ) { - rcl_interfaces__msg__ParameterType__fini(&data[i]); + rcl_interfaces__msg__ParameterType__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h index 2427f9069..2903c6a2c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ParameterType( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ParameterType( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp index 5edb829c6..4653b6cd0 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ParameterType( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.h similarity index 89% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.h index fa8552bbf..4987060a1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.h @@ -18,6 +18,9 @@ extern "C" // Constants defined in the message /// Constant 'PARAMETER_NOT_SET'. +/** + * Default value, which implies this is not a valid parameter. + */ enum { rcl_interfaces__msg__ParameterType__PARAMETER_NOT_SET = 0 @@ -77,7 +80,10 @@ enum rcl_interfaces__msg__ParameterType__PARAMETER_STRING_ARRAY = 9 }; -// Struct defined in msg/ParameterType in the package rcl_interfaces. +/// Struct defined in msg/ParameterType in the package rcl_interfaces. +/** + * These types correspond to the value that is set in the ParameterValue message. + */ typedef struct rcl_interfaces__msg__ParameterType { uint8_t structure_needs_at_least_one_member; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp index 441bd9775..8c3a225e5 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__ParameterType __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp new file mode 100644 index 000000000..f96cc148d --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp @@ -0,0 +1,98 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ParameterType.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter_type__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParameterType & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParameterType & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParameterType & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ParameterType & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ParameterType & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ParameterType"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ParameterType"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_TYPE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.c new file mode 100644 index 000000000..fbf4bebbd --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ParameterType.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter_type__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter_type__functions.h" +#include "rcl_interfaces/msg/detail/parameter_type__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_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; + rcl_interfaces__msg__ParameterType__init(message_memory); +} + +void rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ParameterType__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterType, structure_needs_at_least_one_member), // 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 rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_members = { + "rcl_interfaces__msg", // message namespace + "ParameterType", // message name + 1, // number of fields + sizeof(rcl_interfaces__msg__ParameterType), + rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_member_array, // message members + rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_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 rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterType)() { + if (!rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ParameterType__rosidl_typesupport_introspection_c__ParameterType_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.cpp index 0ad37ce2b..581fd54af 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterType 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_type__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp index 38b859632..6474408ee 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/parameter_value__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/parameter_value__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__functions.c similarity index 94% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__functions.c index 98dbd8ce3..1bc9deb52 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__functions.c @@ -349,22 +349,27 @@ rcl_interfaces__msg__ParameterValue__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__ParameterValue); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__ParameterValue * data = - (rcl_interfaces__msg__ParameterValue *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__ParameterValue *)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 (!rcl_interfaces__msg__ParameterValue__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__ParameterValue__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; ) { - rcl_interfaces__msg__ParameterValue__fini(&data[i]); + rcl_interfaces__msg__ParameterValue__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h index 8d3de8364..2f7ceb104 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__ParameterValue( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__ParameterValue( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp index 54bd73408..31089d92a 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ParameterValue( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.h new file mode 100644 index 000000000..4d5b3b59d --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.h @@ -0,0 +1,78 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from rcl_interfaces:msg/ParameterValue.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'string_value' +// Member 'string_array_value' +#include "rosidl_runtime_c/string.h" +// Member 'byte_array_value' +// Member 'bool_array_value' +// Member 'integer_array_value' +// Member 'double_array_value' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/ParameterValue in the package rcl_interfaces. +/** + * Used to determine which of the next *_value fields are set. + * ParameterType.PARAMETER_NOT_SET indicates that the parameter was not set + * (if gotten) or is uninitialized. + * Values are enumerated in `ParameterType.msg`. + */ +typedef struct rcl_interfaces__msg__ParameterValue +{ + /// The type of this parameter, which corresponds to the appropriate field below. + uint8_t type; + /// "Variant" style storage of the parameter value. Only the value corresponding + /// the type field will have valid information. + /// Boolean value, can be either true or false. + bool bool_value; + /// Integer value ranging from -9,223,372,036,854,775,808 to + /// 9,223,372,036,854,775,807. + int64_t integer_value; + /// A double precision floating point value following IEEE 754. + double double_value; + /// A textual value with no practical length limit. + rosidl_runtime_c__String string_value; + /// An array of bytes, used for non-textual information. + rosidl_runtime_c__octet__Sequence byte_array_value; + /// An array of boolean values. + rosidl_runtime_c__boolean__Sequence bool_array_value; + /// An array of 64-bit integer values. + rosidl_runtime_c__int64__Sequence integer_array_value; + /// An array of 64-bit floating point values. + rosidl_runtime_c__double__Sequence double_array_value; + /// An array of string values. + rosidl_runtime_c__String__Sequence string_array_value; +} rcl_interfaces__msg__ParameterValue; + +// Struct for a sequence of rcl_interfaces__msg__ParameterValue. +typedef struct rcl_interfaces__msg__ParameterValue__Sequence +{ + rcl_interfaces__msg__ParameterValue * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} rcl_interfaces__msg__ParameterValue__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_H_ diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp similarity index 78% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp index d653f76b2..b4eca1634 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__ParameterValue __attribute__((deprecated)) @@ -73,22 +74,22 @@ struct ParameterValue_ double; _double_value_type double_value; using _string_value_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _string_value_type string_value; using _byte_array_value_type = - std::vector::other>; + std::vector::template rebind_alloc>; _byte_array_value_type byte_array_value; using _bool_array_value_type = - std::vector::other>; + std::vector::template rebind_alloc>; _bool_array_value_type bool_array_value; using _integer_array_value_type = - std::vector::other>; + std::vector::template rebind_alloc>; _integer_array_value_type integer_array_value; using _double_array_value_type = - std::vector::other>; + std::vector::template rebind_alloc>; _double_array_value_type double_array_value; using _string_array_value_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _string_array_value_type string_array_value; // setters for named parameter idiom @@ -117,37 +118,37 @@ struct ParameterValue_ return *this; } Type & set__string_value( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->string_value = _arg; return *this; } Type & set__byte_array_value( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->byte_array_value = _arg; return *this; } Type & set__bool_array_value( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->bool_array_value = _arg; return *this; } Type & set__integer_array_value( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->integer_array_value = _arg; return *this; } Type & set__double_array_value( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->double_array_value = _arg; return *this; } Type & set__string_array_value( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->string_array_value = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp new file mode 100644 index 000000000..81592276a --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp @@ -0,0 +1,367 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/ParameterValue.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/parameter_value__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParameterValue & msg, + std::ostream & out) +{ + out << "{"; + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: bool_value + { + out << "bool_value: "; + rosidl_generator_traits::value_to_yaml(msg.bool_value, out); + out << ", "; + } + + // member: integer_value + { + out << "integer_value: "; + rosidl_generator_traits::value_to_yaml(msg.integer_value, out); + out << ", "; + } + + // member: double_value + { + out << "double_value: "; + rosidl_generator_traits::value_to_yaml(msg.double_value, out); + out << ", "; + } + + // member: string_value + { + out << "string_value: "; + rosidl_generator_traits::value_to_yaml(msg.string_value, out); + out << ", "; + } + + // member: byte_array_value + { + if (msg.byte_array_value.size() == 0) { + out << "byte_array_value: []"; + } else { + out << "byte_array_value: ["; + size_t pending_items = msg.byte_array_value.size(); + for (auto item : msg.byte_array_value) { + rosidl_generator_traits::character_value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: bool_array_value + { + if (msg.bool_array_value.size() == 0) { + out << "bool_array_value: []"; + } else { + out << "bool_array_value: ["; + size_t pending_items = msg.bool_array_value.size(); + for (auto item : msg.bool_array_value) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: integer_array_value + { + if (msg.integer_array_value.size() == 0) { + out << "integer_array_value: []"; + } else { + out << "integer_array_value: ["; + size_t pending_items = msg.integer_array_value.size(); + for (auto item : msg.integer_array_value) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: double_array_value + { + if (msg.double_array_value.size() == 0) { + out << "double_array_value: []"; + } else { + out << "double_array_value: ["; + size_t pending_items = msg.double_array_value.size(); + for (auto item : msg.double_array_value) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: string_array_value + { + if (msg.string_array_value.size() == 0) { + out << "string_array_value: []"; + } else { + out << "string_array_value: ["; + size_t pending_items = msg.string_array_value.size(); + for (auto item : msg.string_array_value) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParameterValue & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: bool_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "bool_value: "; + rosidl_generator_traits::value_to_yaml(msg.bool_value, out); + out << "\n"; + } + + // member: integer_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "integer_value: "; + rosidl_generator_traits::value_to_yaml(msg.integer_value, out); + out << "\n"; + } + + // member: double_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "double_value: "; + rosidl_generator_traits::value_to_yaml(msg.double_value, out); + out << "\n"; + } + + // member: string_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "string_value: "; + rosidl_generator_traits::value_to_yaml(msg.string_value, out); + out << "\n"; + } + + // member: byte_array_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.byte_array_value.size() == 0) { + out << "byte_array_value: []\n"; + } else { + out << "byte_array_value:\n"; + for (auto item : msg.byte_array_value) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::character_value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: bool_array_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.bool_array_value.size() == 0) { + out << "bool_array_value: []\n"; + } else { + out << "bool_array_value:\n"; + for (auto item : msg.bool_array_value) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: integer_array_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.integer_array_value.size() == 0) { + out << "integer_array_value: []\n"; + } else { + out << "integer_array_value:\n"; + for (auto item : msg.integer_array_value) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: double_array_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.double_array_value.size() == 0) { + out << "double_array_value: []\n"; + } else { + out << "double_array_value:\n"; + for (auto item : msg.double_array_value) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: string_array_value + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.string_array_value.size() == 0) { + out << "string_array_value: []\n"; + } else { + out << "string_array_value:\n"; + for (auto item : msg.string_array_value) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParameterValue & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::ParameterValue & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::ParameterValue & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::ParameterValue"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/ParameterValue"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__PARAMETER_VALUE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.c new file mode 100644 index 000000000..e01954f48 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.c @@ -0,0 +1,521 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/ParameterValue.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/parameter_value__functions.h" +#include "rcl_interfaces/msg/detail/parameter_value__struct.h" + + +// Include directives for member types +// Member `string_value` +// Member `string_array_value` +#include "rosidl_runtime_c/string_functions.h" +// Member `byte_array_value` +// Member `bool_array_value` +// Member `integer_array_value` +// Member `double_array_value` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_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; + rcl_interfaces__msg__ParameterValue__init(message_memory); +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_fini_function(void * message_memory) +{ + rcl_interfaces__msg__ParameterValue__fini(message_memory); +} + +size_t rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__byte_array_value( + const void * untyped_member) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__byte_array_value( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__byte_array_value( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__byte_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__byte_array_value(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__byte_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__byte_array_value(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__byte_array_value( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + rosidl_runtime_c__octet__Sequence__fini(member); + return rosidl_runtime_c__octet__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__bool_array_value( + const void * untyped_member) +{ + const rosidl_runtime_c__boolean__Sequence * member = + (const rosidl_runtime_c__boolean__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__bool_array_value( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__boolean__Sequence * member = + (const rosidl_runtime_c__boolean__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__bool_array_value( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__boolean__Sequence * member = + (rosidl_runtime_c__boolean__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__bool_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const bool * item = + ((const bool *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__bool_array_value(untyped_member, index)); + bool * value = + (bool *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__bool_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + bool * item = + ((bool *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__bool_array_value(untyped_member, index)); + const bool * value = + (const bool *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__bool_array_value( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__boolean__Sequence * member = + (rosidl_runtime_c__boolean__Sequence *)(untyped_member); + rosidl_runtime_c__boolean__Sequence__fini(member); + return rosidl_runtime_c__boolean__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__integer_array_value( + const void * untyped_member) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__integer_array_value( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__integer_array_value( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__integer_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int64_t * item = + ((const int64_t *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__integer_array_value(untyped_member, index)); + int64_t * value = + (int64_t *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__integer_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + int64_t * item = + ((int64_t *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__integer_array_value(untyped_member, index)); + const int64_t * value = + (const int64_t *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__integer_array_value( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + rosidl_runtime_c__int64__Sequence__fini(member); + return rosidl_runtime_c__int64__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__double_array_value( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__double_array_value( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__double_array_value( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__double_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__double_array_value(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__double_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__double_array_value(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__double_array_value( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__string_array_value( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__string_array_value( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__string_array_value( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__string_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__string_array_value(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__string_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__string_array_value(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__string_array_value( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_member_array[10] = { + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, type), // 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 + }, + { + "bool_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, bool_value), // 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 + }, + { + "integer_value", // 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(rcl_interfaces__msg__ParameterValue, integer_value), // 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 + }, + { + "double_value", // 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(rcl_interfaces__msg__ParameterValue, double_value), // 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 + }, + { + "string_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, string_value), // 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 + }, + { + "byte_array_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, byte_array_value), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__byte_array_value, // size() function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__byte_array_value, // get_const(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__byte_array_value, // get(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__byte_array_value, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__byte_array_value, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__byte_array_value // resize(index) function pointer + }, + { + "bool_array_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, bool_array_value), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__bool_array_value, // size() function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__bool_array_value, // get_const(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__bool_array_value, // get(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__bool_array_value, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__bool_array_value, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__bool_array_value // resize(index) function pointer + }, + { + "integer_array_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, integer_array_value), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__integer_array_value, // size() function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__integer_array_value, // get_const(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__integer_array_value, // get(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__integer_array_value, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__integer_array_value, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__integer_array_value // resize(index) function pointer + }, + { + "double_array_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, double_array_value), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__double_array_value, // size() function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__double_array_value, // get_const(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__double_array_value, // get(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__double_array_value, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__double_array_value, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__double_array_value // resize(index) function pointer + }, + { + "string_array_value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__ParameterValue, string_array_value), // bytes offset in struct + NULL, // default value + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__size_function__ParameterValue__string_array_value, // size() function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__string_array_value, // get_const(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__get_function__ParameterValue__string_array_value, // get(index) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__fetch_function__ParameterValue__string_array_value, // fetch(index, &value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__assign_function__ParameterValue__string_array_value, // assign(index, value) function pointer + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__resize_function__ParameterValue__string_array_value // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_members = { + "rcl_interfaces__msg", // message namespace + "ParameterValue", // message name + 10, // number of fields + sizeof(rcl_interfaces__msg__ParameterValue), + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_member_array, // message members + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_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 rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle = { + 0, + &rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)() { + if (!rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__ParameterValue__rosidl_typesupport_introspection_c__ParameterValue_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.cpp new file mode 100644 index 000000000..120847372 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.cpp @@ -0,0 +1,471 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from rcl_interfaces:msg/ParameterValue.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 "rcl_interfaces/msg/detail/parameter_value__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 rcl_interfaces +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ParameterValue_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) rcl_interfaces::msg::ParameterValue(_init); +} + +void ParameterValue_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ParameterValue(); +} + +size_t size_function__ParameterValue__byte_array_value(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterValue__byte_array_value(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterValue__byte_array_value(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterValue__byte_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterValue__byte_array_value(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterValue__byte_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterValue__byte_array_value(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterValue__byte_array_value(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterValue__bool_array_value(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +void fetch_function__ParameterValue__bool_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & member = *reinterpret_cast *>(untyped_member); + auto & value = *reinterpret_cast(untyped_value); + value = member[index]; +} + +void assign_function__ParameterValue__bool_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & member = *reinterpret_cast *>(untyped_member); + const auto & value = *reinterpret_cast(untyped_value); + member[index] = value; +} + +void resize_function__ParameterValue__bool_array_value(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterValue__integer_array_value(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterValue__integer_array_value(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterValue__integer_array_value(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterValue__integer_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterValue__integer_array_value(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterValue__integer_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterValue__integer_array_value(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterValue__integer_array_value(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterValue__double_array_value(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterValue__double_array_value(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterValue__double_array_value(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterValue__double_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterValue__double_array_value(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterValue__double_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterValue__double_array_value(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterValue__double_array_value(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__ParameterValue__string_array_value(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ParameterValue__string_array_value(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ParameterValue__string_array_value(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ParameterValue__string_array_value( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParameterValue__string_array_value(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParameterValue__string_array_value( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParameterValue__string_array_value(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ParameterValue__string_array_value(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ParameterValue_message_member_array[10] = { + { + "type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, type), // 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 + }, + { + "bool_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, bool_value), // 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 + }, + { + "integer_value", // 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(rcl_interfaces::msg::ParameterValue, integer_value), // 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 + }, + { + "double_value", // 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(rcl_interfaces::msg::ParameterValue, double_value), // 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 + }, + { + "string_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, string_value), // 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 + }, + { + "byte_array_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, byte_array_value), // bytes offset in struct + nullptr, // default value + size_function__ParameterValue__byte_array_value, // size() function pointer + get_const_function__ParameterValue__byte_array_value, // get_const(index) function pointer + get_function__ParameterValue__byte_array_value, // get(index) function pointer + fetch_function__ParameterValue__byte_array_value, // fetch(index, &value) function pointer + assign_function__ParameterValue__byte_array_value, // assign(index, value) function pointer + resize_function__ParameterValue__byte_array_value // resize(index) function pointer + }, + { + "bool_array_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, bool_array_value), // bytes offset in struct + nullptr, // default value + size_function__ParameterValue__bool_array_value, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + fetch_function__ParameterValue__bool_array_value, // fetch(index, &value) function pointer + assign_function__ParameterValue__bool_array_value, // assign(index, value) function pointer + resize_function__ParameterValue__bool_array_value // resize(index) function pointer + }, + { + "integer_array_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, integer_array_value), // bytes offset in struct + nullptr, // default value + size_function__ParameterValue__integer_array_value, // size() function pointer + get_const_function__ParameterValue__integer_array_value, // get_const(index) function pointer + get_function__ParameterValue__integer_array_value, // get(index) function pointer + fetch_function__ParameterValue__integer_array_value, // fetch(index, &value) function pointer + assign_function__ParameterValue__integer_array_value, // assign(index, value) function pointer + resize_function__ParameterValue__integer_array_value // resize(index) function pointer + }, + { + "double_array_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, double_array_value), // bytes offset in struct + nullptr, // default value + size_function__ParameterValue__double_array_value, // size() function pointer + get_const_function__ParameterValue__double_array_value, // get_const(index) function pointer + get_function__ParameterValue__double_array_value, // get(index) function pointer + fetch_function__ParameterValue__double_array_value, // fetch(index, &value) function pointer + assign_function__ParameterValue__double_array_value, // assign(index, value) function pointer + resize_function__ParameterValue__double_array_value // resize(index) function pointer + }, + { + "string_array_value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces::msg::ParameterValue, string_array_value), // bytes offset in struct + nullptr, // default value + size_function__ParameterValue__string_array_value, // size() function pointer + get_const_function__ParameterValue__string_array_value, // get_const(index) function pointer + get_function__ParameterValue__string_array_value, // get(index) function pointer + fetch_function__ParameterValue__string_array_value, // fetch(index, &value) function pointer + assign_function__ParameterValue__string_array_value, // assign(index, value) function pointer + resize_function__ParameterValue__string_array_value // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ParameterValue_message_members = { + "rcl_interfaces::msg", // message namespace + "ParameterValue", // message name + 10, // number of fields + sizeof(rcl_interfaces::msg::ParameterValue), + ParameterValue_message_member_array, // message members + ParameterValue_init_function, // function to initialize message memory (memory has to be allocated) + ParameterValue_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ParameterValue_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ParameterValue_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace rcl_interfaces + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterValue_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, rcl_interfaces, msg, ParameterValue)() { + return &::rcl_interfaces::msg::rosidl_typesupport_introspection_cpp::ParameterValue_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/parameter_value__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp similarity index 96% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp index 18efa50ae..0bfc499a3 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__BUILDER_HPP_ #define RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__BUILDER_HPP_ -#include "rcl_interfaces/msg/detail/set_parameters_result__struct.hpp" -#include #include #include +#include "rcl_interfaces/msg/detail/set_parameters_result__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__functions.c index bfc88f476..3e4e290ea 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__functions.c @@ -224,22 +224,27 @@ rcl_interfaces__msg__SetParametersResult__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__msg__SetParametersResult); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__msg__SetParametersResult * data = - (rcl_interfaces__msg__SetParametersResult *)realloc(output->data, allocation_size); + (rcl_interfaces__msg__SetParametersResult *)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 (!rcl_interfaces__msg__SetParametersResult__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__msg__SetParametersResult__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; ) { - rcl_interfaces__msg__SetParametersResult__fini(&data[i]); + rcl_interfaces__msg__SetParametersResult__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h index 8459526ed..aa72b0363 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__msg__SetParametersResult( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__msg__SetParametersResult( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp index bb0e0418a..accef6878 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_SetParametersResult( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.h similarity index 76% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.h index a35c8aefa..331a5f4cd 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.h @@ -21,10 +21,16 @@ extern "C" // Member 'reason' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/SetParametersResult in the package rcl_interfaces. +/// Struct defined in msg/SetParametersResult in the package rcl_interfaces. +/** + * A true value of the same index indicates that the parameter was set + * successfully. A false value indicates the change was rejected. + */ typedef struct rcl_interfaces__msg__SetParametersResult { bool successful; + /// Reason why the setting was either successful or a failure. This should only be + /// used for logging and user interfaces. rosidl_runtime_c__String reason; } rcl_interfaces__msg__SetParametersResult; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp index fd2b4ce4d..8616184fd 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__STRUCT_HPP_ #define RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__msg__SetParametersResult __attribute__((deprecated)) @@ -58,7 +59,7 @@ struct SetParametersResult_ bool; _successful_type successful; using _reason_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _reason_type reason; // setters for named parameter idiom @@ -69,7 +70,7 @@ struct SetParametersResult_ return *this; } Type & set__reason( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->reason = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp new file mode 100644 index 000000000..c7a5d090f --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:msg/SetParametersResult.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ +#define RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/msg/detail/set_parameters_result__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const SetParametersResult & msg, + std::ostream & out) +{ + out << "{"; + // member: successful + { + out << "successful: "; + rosidl_generator_traits::value_to_yaml(msg.successful, out); + out << ", "; + } + + // member: reason + { + out << "reason: "; + rosidl_generator_traits::value_to_yaml(msg.reason, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetParametersResult & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: successful + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "successful: "; + rosidl_generator_traits::value_to_yaml(msg.successful, out); + out << "\n"; + } + + // member: reason + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "reason: "; + rosidl_generator_traits::value_to_yaml(msg.reason, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetParametersResult & 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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::msg::SetParametersResult & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::msg::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::msg::SetParametersResult & msg) +{ + return rcl_interfaces::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::msg::SetParametersResult"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/msg/SetParametersResult"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__MSG__DETAIL__SET_PARAMETERS_RESULT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.c new file mode 100644 index 000000000..9f9eba6e9 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.c @@ -0,0 +1,104 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:msg/SetParametersResult.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/msg/detail/set_parameters_result__functions.h" +#include "rcl_interfaces/msg/detail/set_parameters_result__struct.h" + + +// Include directives for member types +// Member `reason` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_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; + rcl_interfaces__msg__SetParametersResult__init(message_memory); +} + +void rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_fini_function(void * message_memory) +{ + rcl_interfaces__msg__SetParametersResult__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_member_array[2] = { + { + "successful", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__SetParametersResult, successful), // 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 + }, + { + "reason", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__msg__SetParametersResult, reason), // 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 rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_members = { + "rcl_interfaces__msg", // message namespace + "SetParametersResult", // message name + 2, // number of fields + sizeof(rcl_interfaces__msg__SetParametersResult), + rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_member_array, // message members + rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_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 rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle = { + 0, + &rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)() { + if (!rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__msg__SetParametersResult__rosidl_typesupport_introspection_c__SetParametersResult_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp index c69b7fab0..2651dfebc 100644 --- a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/detail/set_parameters_result__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/floating_point_range.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/floating_point_range.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/floating_point_range.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/floating_point_range.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/floating_point_range.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/floating_point_range.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/floating_point_range.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/floating_point_range.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/integer_range.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/integer_range.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/integer_range.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/integer_range.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/integer_range.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/integer_range.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/integer_range.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/integer_range.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/list_parameters_result.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/list_parameters_result.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/list_parameters_result.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/list_parameters_result.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/log.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/log.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/log.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/log.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/log.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/log.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/log.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/log.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_descriptor.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_descriptor.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_descriptor.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_descriptor.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_event.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_event.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_event.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_event.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_event_descriptors.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event_descriptors.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_event_descriptors.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event_descriptors.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_event_descriptors.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event_descriptors.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_event_descriptors.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_event_descriptors.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_type.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_type.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_type.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_type.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_value.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_value.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/parameter_value.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/parameter_value.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/set_parameters_result.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/set_parameters_result.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.h diff --git a/ThirdParty/ros/include/rcl_interfaces/msg/set_parameters_result.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/msg/set_parameters_result.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/describe_parameters.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/describe_parameters.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/describe_parameters.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/describe_parameters.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp index fb9d05062..7e136df3f 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/describe_parameters__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/describe_parameters__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__functions.c similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__functions.c index 086a1cdd9..cf794a0fb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__functions.c @@ -215,22 +215,27 @@ rcl_interfaces__srv__DescribeParameters_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__DescribeParameters_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__DescribeParameters_Request * data = - (rcl_interfaces__srv__DescribeParameters_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__DescribeParameters_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 (!rcl_interfaces__srv__DescribeParameters_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__DescribeParameters_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; ) { - rcl_interfaces__srv__DescribeParameters_Request__fini(&data[i]); + rcl_interfaces__srv__DescribeParameters_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -450,22 +455,27 @@ rcl_interfaces__srv__DescribeParameters_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__DescribeParameters_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__DescribeParameters_Response * data = - (rcl_interfaces__srv__DescribeParameters_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__DescribeParameters_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 (!rcl_interfaces__srv__DescribeParameters_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__DescribeParameters_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; ) { - rcl_interfaces__srv__DescribeParameters_Response__fini(&data[i]); + rcl_interfaces__srv__DescribeParameters_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h index b46c6f472..3baf42fe2 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__DescribeParameters_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__DescribeParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__DescribeParameters_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__DescribeParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp index d7926c666..87b998dcd 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_DescribeParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_DescribeParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.h similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.h index d2002ecc0..290206115 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'names' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/DescribeParameters in the package rcl_interfaces. +/// Struct defined in srv/DescribeParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__DescribeParameters_Request { rosidl_runtime_c__String__Sequence names; @@ -44,7 +44,7 @@ typedef struct rcl_interfaces__srv__DescribeParameters_Request__Sequence // Member 'descriptors' #include "rcl_interfaces/msg/detail/parameter_descriptor__struct.h" -// Struct defined in srv/DescribeParameters in the package rcl_interfaces. +/// Struct defined in srv/DescribeParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__DescribeParameters_Response { rcl_interfaces__msg__ParameterDescriptor__Sequence descriptors; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp similarity index 88% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp index 1f105e5ec..fbd9e8a4d 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__srv__DescribeParameters_Request __attribute__((deprecated)) @@ -45,12 +46,12 @@ struct DescribeParameters_Request_ // field types and members using _names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _names_type names; // setters for named parameter idiom Type & set__names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->names = _arg; return *this; @@ -155,12 +156,12 @@ struct DescribeParameters_Response_ // field types and members using _descriptors_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _descriptors_type descriptors; // setters for named parameter idiom Type & set__descriptors( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->descriptors = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp new file mode 100644 index 000000000..3ffe4df45 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp @@ -0,0 +1,301 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/DescribeParameters.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/describe_parameters__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const DescribeParameters_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: names + { + if (msg.names.size() == 0) { + out << "names: []"; + } else { + out << "names: ["; + size_t pending_items = msg.names.size(); + for (auto item : msg.names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DescribeParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.names.size() == 0) { + out << "names: []\n"; + } else { + out << "names:\n"; + for (auto item : msg.names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DescribeParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::DescribeParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::DescribeParameters_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::DescribeParameters_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/DescribeParameters_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'descriptors' +#include "rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const DescribeParameters_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: descriptors + { + if (msg.descriptors.size() == 0) { + out << "descriptors: []"; + } else { + out << "descriptors: ["; + size_t pending_items = msg.descriptors.size(); + for (auto item : msg.descriptors) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DescribeParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: descriptors + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.descriptors.size() == 0) { + out << "descriptors: []\n"; + } else { + out << "descriptors:\n"; + for (auto item : msg.descriptors) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DescribeParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::DescribeParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::DescribeParameters_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::DescribeParameters_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/DescribeParameters_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::DescribeParameters"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/DescribeParameters"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.c new file mode 100644 index 000000000..7ace916e8 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.c @@ -0,0 +1,350 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/DescribeParameters.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/describe_parameters__functions.h" +#include "rcl_interfaces/srv/detail/describe_parameters__struct.h" + + +// Include directives for member types +// Member `names` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_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; + rcl_interfaces__srv__DescribeParameters_Request__init(message_memory); +} + +void rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__DescribeParameters_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__size_function__DescribeParameters_Request__names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Request__names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Request__names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__fetch_function__DescribeParameters_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Request__names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__assign_function__DescribeParameters_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Request__names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__resize_function__DescribeParameters_Request__names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_member_array[1] = { + { + "names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__DescribeParameters_Request, names), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__size_function__DescribeParameters_Request__names, // size() function pointer + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Request__names, // get_const(index) function pointer + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Request__names, // get(index) function pointer + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__fetch_function__DescribeParameters_Request__names, // fetch(index, &value) function pointer + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__assign_function__DescribeParameters_Request__names, // assign(index, value) function pointer + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__resize_function__DescribeParameters_Request__names // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "DescribeParameters_Request", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__DescribeParameters_Request), + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_member_array, // message members + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_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 rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Request)() { + if (!rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/describe_parameters__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/describe_parameters__struct.h" + + +// Include directives for member types +// Member `descriptors` +#include "rcl_interfaces/msg/parameter_descriptor.h" +// Member `descriptors` +#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_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; + rcl_interfaces__srv__DescribeParameters_Response__init(message_memory); +} + +void rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__DescribeParameters_Response__fini(message_memory); +} + +size_t rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__size_function__DescribeParameters_Response__descriptors( + const void * untyped_member) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Response__descriptors( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Response__descriptors( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__fetch_function__DescribeParameters_Response__descriptors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__ParameterDescriptor * item = + ((const rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Response__descriptors(untyped_member, index)); + rcl_interfaces__msg__ParameterDescriptor * value = + (rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__assign_function__DescribeParameters_Response__descriptors( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__ParameterDescriptor * item = + ((rcl_interfaces__msg__ParameterDescriptor *) + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Response__descriptors(untyped_member, index)); + const rcl_interfaces__msg__ParameterDescriptor * value = + (const rcl_interfaces__msg__ParameterDescriptor *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__resize_function__DescribeParameters_Response__descriptors( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__ParameterDescriptor__Sequence * member = + (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); + rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); + return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array[1] = { + { + "descriptors", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__DescribeParameters_Response, descriptors), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__size_function__DescribeParameters_Response__descriptors, // size() function pointer + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_const_function__DescribeParameters_Response__descriptors, // get_const(index) function pointer + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__get_function__DescribeParameters_Response__descriptors, // get(index) function pointer + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__fetch_function__DescribeParameters_Response__descriptors, // fetch(index, &value) function pointer + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__assign_function__DescribeParameters_Response__descriptors, // assign(index, value) function pointer + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__resize_function__DescribeParameters_Response__descriptors // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "DescribeParameters_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__DescribeParameters_Response), + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array, // message members + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_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 rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Response)() { + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); + if (!rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/describe_parameters__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 rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_members = { + "rcl_interfaces__srv", // service namespace + "DescribeParameters", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters)() { + if (!rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_Response)()->data; + } + + return &rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp similarity index 87% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp index b6ffc355f..7d3636fc1 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__DescribeParameters_Request__names(void * untyped_member, si return &member[index]; } +void fetch_function__DescribeParameters_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__DescribeParameters_Request__names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__DescribeParameters_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__DescribeParameters_Request__names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__DescribeParameters_Request__names(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DescribeParam size_function__DescribeParameters_Request__names, // size() function pointer get_const_function__DescribeParameters_Request__names, // get_const(index) function pointer get_function__DescribeParameters_Request__names, // get(index) function pointer + fetch_function__DescribeParameters_Request__names, // fetch(index, &value) function pointer + assign_function__DescribeParameters_Request__names, // assign(index, value) function pointer resize_function__DescribeParameters_Request__names // resize(index) function pointer } }; @@ -201,6 +221,24 @@ void * get_function__DescribeParameters_Response__descriptors(void * untyped_mem return &member[index]; } +void fetch_function__DescribeParameters_Response__descriptors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__DescribeParameters_Response__descriptors(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__DescribeParameters_Response__descriptors( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__DescribeParameters_Response__descriptors(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__DescribeParameters_Response__descriptors(void * untyped_member, size_t size) { auto * member = @@ -222,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DescribeParam size_function__DescribeParameters_Response__descriptors, // size() function pointer get_const_function__DescribeParameters_Response__descriptors, // get_const(index) function pointer get_function__DescribeParameters_Response__descriptors, // get(index) function pointer + fetch_function__DescribeParameters_Response__descriptors, // fetch(index, &value) function pointer + assign_function__DescribeParameters_Response__descriptors, // assign(index, value) function pointer resize_function__DescribeParameters_Response__descriptors // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp index 48cd1aafb..195e15acc 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/get_parameter_types__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/get_parameter_types__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__functions.c similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__functions.c index 8330ec32c..d6897d928 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__functions.c @@ -215,22 +215,27 @@ rcl_interfaces__srv__GetParameterTypes_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__GetParameterTypes_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__GetParameterTypes_Request * data = - (rcl_interfaces__srv__GetParameterTypes_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__GetParameterTypes_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 (!rcl_interfaces__srv__GetParameterTypes_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__GetParameterTypes_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; ) { - rcl_interfaces__srv__GetParameterTypes_Request__fini(&data[i]); + rcl_interfaces__srv__GetParameterTypes_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -450,22 +455,27 @@ rcl_interfaces__srv__GetParameterTypes_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__GetParameterTypes_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__GetParameterTypes_Response * data = - (rcl_interfaces__srv__GetParameterTypes_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__GetParameterTypes_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 (!rcl_interfaces__srv__GetParameterTypes_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__GetParameterTypes_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; ) { - rcl_interfaces__srv__GetParameterTypes_Response__fini(&data[i]); + rcl_interfaces__srv__GetParameterTypes_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h index 163579120..3105d0974 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__GetParameterTypes_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__GetParameterTypes_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__GetParameterTypes_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__GetParameterTypes_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp index 0419f5811..bb064746c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_GetParameterTypes_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_GetParameterTypes_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.h similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.h index 664499766..6d41f4603 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'names' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/GetParameterTypes in the package rcl_interfaces. +/// Struct defined in srv/GetParameterTypes in the package rcl_interfaces. typedef struct rcl_interfaces__srv__GetParameterTypes_Request { rosidl_runtime_c__String__Sequence names; @@ -44,7 +44,7 @@ typedef struct rcl_interfaces__srv__GetParameterTypes_Request__Sequence // Member 'types' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in srv/GetParameterTypes in the package rcl_interfaces. +/// Struct defined in srv/GetParameterTypes in the package rcl_interfaces. typedef struct rcl_interfaces__srv__GetParameterTypes_Response { rosidl_runtime_c__uint8__Sequence types; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp similarity index 89% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp index 1fc6a1362..0f90db6ba 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__srv__GetParameterTypes_Request __attribute__((deprecated)) @@ -45,12 +46,12 @@ struct GetParameterTypes_Request_ // field types and members using _names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _names_type names; // setters for named parameter idiom Type & set__names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->names = _arg; return *this; @@ -151,12 +152,12 @@ struct GetParameterTypes_Response_ // field types and members using _types_type = - std::vector::other>; + std::vector::template rebind_alloc>; _types_type types; // setters for named parameter idiom Type & set__types( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->types = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp new file mode 100644 index 000000000..d87e28a60 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp @@ -0,0 +1,298 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/GetParameterTypes.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/get_parameter_types__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetParameterTypes_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: names + { + if (msg.names.size() == 0) { + out << "names: []"; + } else { + out << "names: ["; + size_t pending_items = msg.names.size(); + for (auto item : msg.names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetParameterTypes_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.names.size() == 0) { + out << "names: []\n"; + } else { + out << "names:\n"; + for (auto item : msg.names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetParameterTypes_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::GetParameterTypes_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::GetParameterTypes_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameterTypes_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameterTypes_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetParameterTypes_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: types + { + if (msg.types.size() == 0) { + out << "types: []"; + } else { + out << "types: ["; + size_t pending_items = msg.types.size(); + for (auto item : msg.types) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetParameterTypes_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: types + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.types.size() == 0) { + out << "types: []\n"; + } else { + out << "types:\n"; + for (auto item : msg.types) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetParameterTypes_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::GetParameterTypes_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::GetParameterTypes_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameterTypes_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameterTypes_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameterTypes"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameterTypes"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.c new file mode 100644 index 000000000..bed75bb7f --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.c @@ -0,0 +1,346 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/GetParameterTypes.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/get_parameter_types__functions.h" +#include "rcl_interfaces/srv/detail/get_parameter_types__struct.h" + + +// Include directives for member types +// Member `names` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_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; + rcl_interfaces__srv__GetParameterTypes_Request__init(message_memory); +} + +void rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__GetParameterTypes_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__size_function__GetParameterTypes_Request__names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Request__names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Request__names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__fetch_function__GetParameterTypes_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Request__names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__assign_function__GetParameterTypes_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Request__names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__resize_function__GetParameterTypes_Request__names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_member_array[1] = { + { + "names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__GetParameterTypes_Request, names), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__size_function__GetParameterTypes_Request__names, // size() function pointer + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Request__names, // get_const(index) function pointer + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Request__names, // get(index) function pointer + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__fetch_function__GetParameterTypes_Request__names, // fetch(index, &value) function pointer + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__assign_function__GetParameterTypes_Request__names, // assign(index, value) function pointer + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__resize_function__GetParameterTypes_Request__names // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "GetParameterTypes_Request", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__GetParameterTypes_Request), + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_member_array, // message members + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_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 rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Request)() { + if (!rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/get_parameter_types__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/get_parameter_types__struct.h" + + +// Include directives for member types +// Member `types` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_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; + rcl_interfaces__srv__GetParameterTypes_Response__init(message_memory); +} + +void rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__GetParameterTypes_Response__fini(message_memory); +} + +size_t rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__size_function__GetParameterTypes_Response__types( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Response__types( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Response__types( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__fetch_function__GetParameterTypes_Response__types( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Response__types(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__assign_function__GetParameterTypes_Response__types( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Response__types(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__resize_function__GetParameterTypes_Response__types( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_member_array[1] = { + { + "types", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__GetParameterTypes_Response, types), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__size_function__GetParameterTypes_Response__types, // size() function pointer + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameterTypes_Response__types, // get_const(index) function pointer + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__get_function__GetParameterTypes_Response__types, // get(index) function pointer + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__fetch_function__GetParameterTypes_Response__types, // fetch(index, &value) function pointer + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__assign_function__GetParameterTypes_Response__types, // assign(index, value) function pointer + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__resize_function__GetParameterTypes_Response__types // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "GetParameterTypes_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__GetParameterTypes_Response), + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_member_array, // message members + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_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 rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Response)() { + if (!rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/get_parameter_types__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 rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_members = { + "rcl_interfaces__srv", // service namespace + "GetParameterTypes", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes)() { + if (!rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_Response)()->data; + } + + return &rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp similarity index 88% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp index 1357927ca..fd5559753 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__GetParameterTypes_Request__names(void * untyped_member, siz return &member[index]; } +void fetch_function__GetParameterTypes_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GetParameterTypes_Request__names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GetParameterTypes_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GetParameterTypes_Request__names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GetParameterTypes_Request__names(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetParameterT size_function__GetParameterTypes_Request__names, // size() function pointer get_const_function__GetParameterTypes_Request__names, // get_const(index) function pointer get_function__GetParameterTypes_Request__names, // get(index) function pointer + fetch_function__GetParameterTypes_Request__names, // fetch(index, &value) function pointer + assign_function__GetParameterTypes_Request__names, // assign(index, value) function pointer resize_function__GetParameterTypes_Request__names // resize(index) function pointer } }; @@ -201,6 +221,24 @@ void * get_function__GetParameterTypes_Response__types(void * untyped_member, si return &member[index]; } +void fetch_function__GetParameterTypes_Response__types( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GetParameterTypes_Response__types(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GetParameterTypes_Response__types( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GetParameterTypes_Response__types(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GetParameterTypes_Response__types(void * untyped_member, size_t size) { auto * member = @@ -222,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetParameterT size_function__GetParameterTypes_Response__types, // size() function pointer get_const_function__GetParameterTypes_Response__types, // get_const(index) function pointer get_function__GetParameterTypes_Response__types, // get(index) function pointer + fetch_function__GetParameterTypes_Response__types, // fetch(index, &value) function pointer + assign_function__GetParameterTypes_Response__types, // assign(index, value) function pointer resize_function__GetParameterTypes_Response__types // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp index 00bc5bc72..d37e6cc0e 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/get_parameters__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/get_parameters__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__functions.c index 0f60fadcc..0a014eaeb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__functions.c @@ -215,22 +215,27 @@ rcl_interfaces__srv__GetParameters_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__GetParameters_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__GetParameters_Request * data = - (rcl_interfaces__srv__GetParameters_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__GetParameters_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 (!rcl_interfaces__srv__GetParameters_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__GetParameters_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; ) { - rcl_interfaces__srv__GetParameters_Request__fini(&data[i]); + rcl_interfaces__srv__GetParameters_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -450,22 +455,27 @@ rcl_interfaces__srv__GetParameters_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__GetParameters_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__GetParameters_Response * data = - (rcl_interfaces__srv__GetParameters_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__GetParameters_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 (!rcl_interfaces__srv__GetParameters_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__GetParameters_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; ) { - rcl_interfaces__srv__GetParameters_Response__fini(&data[i]); + rcl_interfaces__srv__GetParameters_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h index d89a59228..8dce6e6d0 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__GetParameters_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__GetParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__GetParameters_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__GetParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp index 555892f58..427f8d3e8 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_GetParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_GetParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.h similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.h index de7a1e477..b6399e0e5 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.h @@ -21,9 +21,10 @@ extern "C" // Member 'names' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/GetParameters in the package rcl_interfaces. +/// Struct defined in srv/GetParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__GetParameters_Request { + /// A list of parameter names to get. rosidl_runtime_c__String__Sequence names; } rcl_interfaces__srv__GetParameters_Request; @@ -44,7 +45,7 @@ typedef struct rcl_interfaces__srv__GetParameters_Request__Sequence // Member 'values' #include "rcl_interfaces/msg/detail/parameter_value__struct.h" -// Struct defined in srv/GetParameters in the package rcl_interfaces. +/// Struct defined in srv/GetParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__GetParameters_Response { rcl_interfaces__msg__ParameterValue__Sequence values; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp similarity index 88% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp index 71566acb2..9a922d856 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__srv__GetParameters_Request __attribute__((deprecated)) @@ -45,12 +46,12 @@ struct GetParameters_Request_ // field types and members using _names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _names_type names; // setters for named parameter idiom Type & set__names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->names = _arg; return *this; @@ -155,12 +156,12 @@ struct GetParameters_Response_ // field types and members using _values_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _values_type values; // setters for named parameter idiom Type & set__values( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->values = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp new file mode 100644 index 000000000..682c3eacf --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp @@ -0,0 +1,301 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/GetParameters.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/get_parameters__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetParameters_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: names + { + if (msg.names.size() == 0) { + out << "names: []"; + } else { + out << "names: ["; + size_t pending_items = msg.names.size(); + for (auto item : msg.names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.names.size() == 0) { + out << "names: []\n"; + } else { + out << "names:\n"; + for (auto item : msg.names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::GetParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::GetParameters_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameters_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameters_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'values' +#include "rcl_interfaces/msg/detail/parameter_value__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetParameters_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: values + { + if (msg.values.size() == 0) { + out << "values: []"; + } else { + out << "values: ["; + size_t pending_items = msg.values.size(); + for (auto item : msg.values) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: values + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.values.size() == 0) { + out << "values: []\n"; + } else { + out << "values:\n"; + for (auto item : msg.values) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::GetParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::GetParameters_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameters_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameters_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::GetParameters"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/GetParameters"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.c new file mode 100644 index 000000000..5d438f73b --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.c @@ -0,0 +1,350 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/GetParameters.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/get_parameters__functions.h" +#include "rcl_interfaces/srv/detail/get_parameters__struct.h" + + +// Include directives for member types +// Member `names` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_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; + rcl_interfaces__srv__GetParameters_Request__init(message_memory); +} + +void rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__GetParameters_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__size_function__GetParameters_Request__names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Request__names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_function__GetParameters_Request__names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__fetch_function__GetParameters_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Request__names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__assign_function__GetParameters_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_function__GetParameters_Request__names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__resize_function__GetParameters_Request__names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_member_array[1] = { + { + "names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__GetParameters_Request, names), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__size_function__GetParameters_Request__names, // size() function pointer + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Request__names, // get_const(index) function pointer + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__get_function__GetParameters_Request__names, // get(index) function pointer + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__fetch_function__GetParameters_Request__names, // fetch(index, &value) function pointer + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__assign_function__GetParameters_Request__names, // assign(index, value) function pointer + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__resize_function__GetParameters_Request__names // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "GetParameters_Request", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__GetParameters_Request), + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_member_array, // message members + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_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 rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Request)() { + if (!rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/get_parameters__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/get_parameters__struct.h" + + +// Include directives for member types +// Member `values` +#include "rcl_interfaces/msg/parameter_value.h" +// Member `values` +#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_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; + rcl_interfaces__srv__GetParameters_Response__init(message_memory); +} + +void rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__GetParameters_Response__fini(message_memory); +} + +size_t rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__size_function__GetParameters_Response__values( + const void * untyped_member) +{ + const rcl_interfaces__msg__ParameterValue__Sequence * member = + (const rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Response__values( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__ParameterValue__Sequence * member = + (const rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_function__GetParameters_Response__values( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__ParameterValue__Sequence * member = + (rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__fetch_function__GetParameters_Response__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__ParameterValue * item = + ((const rcl_interfaces__msg__ParameterValue *) + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Response__values(untyped_member, index)); + rcl_interfaces__msg__ParameterValue * value = + (rcl_interfaces__msg__ParameterValue *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__assign_function__GetParameters_Response__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__ParameterValue * item = + ((rcl_interfaces__msg__ParameterValue *) + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_function__GetParameters_Response__values(untyped_member, index)); + const rcl_interfaces__msg__ParameterValue * value = + (const rcl_interfaces__msg__ParameterValue *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__resize_function__GetParameters_Response__values( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__ParameterValue__Sequence * member = + (rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); + rcl_interfaces__msg__ParameterValue__Sequence__fini(member); + return rcl_interfaces__msg__ParameterValue__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array[1] = { + { + "values", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__GetParameters_Response, values), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__size_function__GetParameters_Response__values, // size() function pointer + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__GetParameters_Response__values, // get_const(index) function pointer + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__get_function__GetParameters_Response__values, // get(index) function pointer + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__fetch_function__GetParameters_Response__values, // fetch(index, &value) function pointer + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__assign_function__GetParameters_Response__values, // assign(index, value) function pointer + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__resize_function__GetParameters_Response__values // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "GetParameters_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__GetParameters_Response), + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array, // message members + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_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 rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Response)() { + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)(); + if (!rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/get_parameters__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 rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_members = { + "rcl_interfaces__srv", // service namespace + "GetParameters", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_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, rcl_interfaces, srv, GetParameters_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters)() { + if (!rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_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, rcl_interfaces, srv, GetParameters_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, rcl_interfaces, srv, GetParameters_Response)()->data; + } + + return &rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.cpp similarity index 88% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.cpp index a72d29b8f..e5f00fefc 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__GetParameters_Request__names(void * untyped_member, size_t return &member[index]; } +void fetch_function__GetParameters_Request__names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GetParameters_Request__names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GetParameters_Request__names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GetParameters_Request__names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GetParameters_Request__names(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetParameters size_function__GetParameters_Request__names, // size() function pointer get_const_function__GetParameters_Request__names, // get_const(index) function pointer get_function__GetParameters_Request__names, // get(index) function pointer + fetch_function__GetParameters_Request__names, // fetch(index, &value) function pointer + assign_function__GetParameters_Request__names, // assign(index, value) function pointer resize_function__GetParameters_Request__names // resize(index) function pointer } }; @@ -201,6 +221,24 @@ void * get_function__GetParameters_Response__values(void * untyped_member, size_ return &member[index]; } +void fetch_function__GetParameters_Response__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GetParameters_Response__values(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GetParameters_Response__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GetParameters_Response__values(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GetParameters_Response__values(void * untyped_member, size_t size) { auto * member = @@ -222,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetParameters size_function__GetParameters_Response__values, // size() function pointer get_const_function__GetParameters_Response__values, // get_const(index) function pointer get_function__GetParameters_Response__values, // get(index) function pointer + fetch_function__GetParameters_Response__values, // fetch(index, &value) function pointer + assign_function__GetParameters_Response__values, // assign(index, value) function pointer resize_function__GetParameters_Response__values // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp index 78132a865..645e105cd 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/list_parameters__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/list_parameters__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__functions.c index 79f7ce45c..8f9f20aac 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__functions.c @@ -223,22 +223,27 @@ rcl_interfaces__srv__ListParameters_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__ListParameters_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__ListParameters_Request * data = - (rcl_interfaces__srv__ListParameters_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__ListParameters_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 (!rcl_interfaces__srv__ListParameters_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__ListParameters_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; ) { - rcl_interfaces__srv__ListParameters_Request__fini(&data[i]); + rcl_interfaces__srv__ListParameters_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -458,22 +463,27 @@ rcl_interfaces__srv__ListParameters_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__ListParameters_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__ListParameters_Response * data = - (rcl_interfaces__srv__ListParameters_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__ListParameters_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 (!rcl_interfaces__srv__ListParameters_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__ListParameters_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; ) { - rcl_interfaces__srv__ListParameters_Response__fini(&data[i]); + rcl_interfaces__srv__ListParameters_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h index 0828eb1b4..27bfc05cf 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__ListParameters_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__ListParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__ListParameters_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__ListParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp index edb5e31fc..c0e97bdfd 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ListParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_ListParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.h similarity index 85% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.h index 46aed41be..b035f4576 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.h @@ -27,10 +27,14 @@ enum // Member 'prefixes' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/ListParameters in the package rcl_interfaces. +/// Struct defined in srv/ListParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__ListParameters_Request { + /// The list of parameter prefixes to query. rosidl_runtime_c__String__Sequence prefixes; + /// Relative depth from given prefixes to return. + /// + /// Use DEPTH_RECURSIVE to get the recursive parameters and prefixes for each prefix. uint64_t depth; } rcl_interfaces__srv__ListParameters_Request; @@ -51,7 +55,7 @@ typedef struct rcl_interfaces__srv__ListParameters_Request__Sequence // Member 'result' #include "rcl_interfaces/msg/detail/list_parameters_result__struct.h" -// Struct defined in srv/ListParameters in the package rcl_interfaces. +/// Struct defined in srv/ListParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__ListParameters_Response { rcl_interfaces__msg__ListParametersResult result; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp index 41683af11..b2f1f861b 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rcl_interfaces__srv__ListParameters_Request __attribute__((deprecated)) @@ -53,7 +54,7 @@ struct ListParameters_Request_ // field types and members using _prefixes_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _prefixes_type prefixes; using _depth_type = uint64_t; @@ -61,7 +62,7 @@ struct ListParameters_Request_ // setters for named parameter idiom Type & set__prefixes( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->prefixes = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp new file mode 100644 index 000000000..fcc14e7e4 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp @@ -0,0 +1,297 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/ListParameters.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/list_parameters__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const ListParameters_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: prefixes + { + if (msg.prefixes.size() == 0) { + out << "prefixes: []"; + } else { + out << "prefixes: ["; + size_t pending_items = msg.prefixes.size(); + for (auto item : msg.prefixes) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: depth + { + out << "depth: "; + rosidl_generator_traits::value_to_yaml(msg.depth, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ListParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: prefixes + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.prefixes.size() == 0) { + out << "prefixes: []\n"; + } else { + out << "prefixes:\n"; + for (auto item : msg.prefixes) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: depth + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "depth: "; + rosidl_generator_traits::value_to_yaml(msg.depth, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ListParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::ListParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::ListParameters_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::ListParameters_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/ListParameters_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'result' +#include "rcl_interfaces/msg/detail/list_parameters_result__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const ListParameters_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: result + { + out << "result: "; + to_flow_style_yaml(msg.result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ListParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "result:\n"; + to_block_style_yaml(msg.result, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ListParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::ListParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::ListParameters_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::ListParameters_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/ListParameters_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::ListParameters"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/ListParameters"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.c new file mode 100644 index 000000000..5cfebbd55 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.c @@ -0,0 +1,312 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/ListParameters.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/list_parameters__functions.h" +#include "rcl_interfaces/srv/detail/list_parameters__struct.h" + + +// Include directives for member types +// Member `prefixes` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_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; + rcl_interfaces__srv__ListParameters_Request__init(message_memory); +} + +void rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__ListParameters_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__size_function__ListParameters_Request__prefixes( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_const_function__ListParameters_Request__prefixes( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_function__ListParameters_Request__prefixes( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__fetch_function__ListParameters_Request__prefixes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_const_function__ListParameters_Request__prefixes(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__assign_function__ListParameters_Request__prefixes( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_function__ListParameters_Request__prefixes(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__resize_function__ListParameters_Request__prefixes( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_member_array[2] = { + { + "prefixes", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__ListParameters_Request, prefixes), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__size_function__ListParameters_Request__prefixes, // size() function pointer + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_const_function__ListParameters_Request__prefixes, // get_const(index) function pointer + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__get_function__ListParameters_Request__prefixes, // get(index) function pointer + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__fetch_function__ListParameters_Request__prefixes, // fetch(index, &value) function pointer + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__assign_function__ListParameters_Request__prefixes, // assign(index, value) function pointer + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__resize_function__ListParameters_Request__prefixes // resize(index) function pointer + }, + { + "depth", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__ListParameters_Request, depth), // 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 rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "ListParameters_Request", // message name + 2, // number of fields + sizeof(rcl_interfaces__srv__ListParameters_Request), + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_member_array, // message members + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_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 rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Request)() { + if (!rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/list_parameters__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/list_parameters__struct.h" + + +// Include directives for member types +// Member `result` +#include "rcl_interfaces/msg/list_parameters_result.h" +// Member `result` +#include "rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_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; + rcl_interfaces__srv__ListParameters_Response__init(message_memory); +} + +void rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__ListParameters_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array[1] = { + { + "result", // 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(rcl_interfaces__srv__ListParameters_Response, result), // 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 rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "ListParameters_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__ListParameters_Response), + rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array, // message members + rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_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 rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Response)() { + rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ListParametersResult)(); + if (!rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/list_parameters__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 rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_members = { + "rcl_interfaces__srv", // service namespace + "ListParameters", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_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, rcl_interfaces, srv, ListParameters_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters)() { + if (!rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_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, rcl_interfaces, srv, ListParameters_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, rcl_interfaces, srv, ListParameters_Response)()->data; + } + + return &rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.cpp index cc5865988..0269e11b6 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ListParameters_Request__prefixes(void * untyped_member, siz return &member[index]; } +void fetch_function__ListParameters_Request__prefixes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ListParameters_Request__prefixes(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ListParameters_Request__prefixes( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ListParameters_Request__prefixes(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ListParameters_Request__prefixes(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ListParameter size_function__ListParameters_Request__prefixes, // size() function pointer get_const_function__ListParameters_Request__prefixes, // get_const(index) function pointer get_function__ListParameters_Request__prefixes, // get(index) function pointer + fetch_function__ListParameters_Request__prefixes, // fetch(index, &value) function pointer + assign_function__ListParameters_Request__prefixes, // assign(index, value) function pointer resize_function__ListParameters_Request__prefixes // resize(index) function pointer }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ListParameter 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 } }; @@ -210,6 +232,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ListParameter 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp index 4188fd153..437d3a571 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/set_parameters__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/set_parameters__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__functions.c similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__functions.c index 9e4ec23d5..1cf9815a0 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__functions.c @@ -215,22 +215,27 @@ rcl_interfaces__srv__SetParameters_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__SetParameters_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__SetParameters_Request * data = - (rcl_interfaces__srv__SetParameters_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__SetParameters_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 (!rcl_interfaces__srv__SetParameters_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__SetParameters_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; ) { - rcl_interfaces__srv__SetParameters_Request__fini(&data[i]); + rcl_interfaces__srv__SetParameters_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -450,22 +455,27 @@ rcl_interfaces__srv__SetParameters_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__SetParameters_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__SetParameters_Response * data = - (rcl_interfaces__srv__SetParameters_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__SetParameters_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 (!rcl_interfaces__srv__SetParameters_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__SetParameters_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; ) { - rcl_interfaces__srv__SetParameters_Response__fini(&data[i]); + rcl_interfaces__srv__SetParameters_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h index 287de7b47..4c18fde33 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__SetParameters_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__SetParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__SetParameters_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__SetParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp index 7bc1b4109..8d58f1297 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_SetParameters_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_SetParameters_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.h similarity index 93% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.h index 2c6d00a00..47f368cf8 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'parameters' #include "rcl_interfaces/msg/detail/parameter__struct.h" -// Struct defined in srv/SetParameters in the package rcl_interfaces. +/// Struct defined in srv/SetParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__SetParameters_Request { rcl_interfaces__msg__Parameter__Sequence parameters; @@ -44,7 +44,7 @@ typedef struct rcl_interfaces__srv__SetParameters_Request__Sequence // Member 'results' #include "rcl_interfaces/msg/detail/set_parameters_result__struct.h" -// Struct defined in srv/SetParameters in the package rcl_interfaces. +/// Struct defined in srv/SetParameters in the package rcl_interfaces. typedef struct rcl_interfaces__srv__SetParameters_Response { rcl_interfaces__msg__SetParametersResult__Sequence results; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp similarity index 91% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp index de7709dbd..1566ea87a 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'parameters' @@ -49,12 +50,12 @@ struct SetParameters_Request_ // field types and members using _parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _parameters_type parameters; // setters for named parameter idiom Type & set__parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->parameters = _arg; return *this; @@ -159,12 +160,12 @@ struct SetParameters_Response_ // field types and members using _results_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _results_type results; // setters for named parameter idiom Type & set__results( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->results = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp new file mode 100644 index 000000000..2d8b124cc --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp @@ -0,0 +1,304 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/SetParameters.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/set_parameters__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'parameters' +#include "rcl_interfaces/msg/detail/parameter__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetParameters_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: parameters + { + if (msg.parameters.size() == 0) { + out << "parameters: []"; + } else { + out << "parameters: ["; + size_t pending_items = msg.parameters.size(); + for (auto item : msg.parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.parameters.size() == 0) { + out << "parameters: []\n"; + } else { + out << "parameters:\n"; + for (auto item : msg.parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::SetParameters_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::SetParameters_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParameters_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParameters_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'results' +#include "rcl_interfaces/msg/detail/set_parameters_result__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetParameters_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: results + { + if (msg.results.size() == 0) { + out << "results: []"; + } else { + out << "results: ["; + size_t pending_items = msg.results.size(); + for (auto item : msg.results) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: results + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.results.size() == 0) { + out << "results: []\n"; + } else { + out << "results:\n"; + for (auto item : msg.results) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetParameters_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::SetParameters_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::SetParameters_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParameters_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParameters_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParameters"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParameters"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.c new file mode 100644 index 000000000..9ab81b5f1 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.c @@ -0,0 +1,354 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/SetParameters.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/set_parameters__functions.h" +#include "rcl_interfaces/srv/detail/set_parameters__struct.h" + + +// Include directives for member types +// Member `parameters` +#include "rcl_interfaces/msg/parameter.h" +// Member `parameters` +#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_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; + rcl_interfaces__srv__SetParameters_Request__init(message_memory); +} + +void rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__SetParameters_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__size_function__SetParameters_Request__parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Request__parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_function__SetParameters_Request__parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__fetch_function__SetParameters_Request__parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__Parameter * item = + ((const rcl_interfaces__msg__Parameter *) + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Request__parameters(untyped_member, index)); + rcl_interfaces__msg__Parameter * value = + (rcl_interfaces__msg__Parameter *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__assign_function__SetParameters_Request__parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__Parameter * item = + ((rcl_interfaces__msg__Parameter *) + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_function__SetParameters_Request__parameters(untyped_member, index)); + const rcl_interfaces__msg__Parameter * value = + (const rcl_interfaces__msg__Parameter *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__resize_function__SetParameters_Request__parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + rcl_interfaces__msg__Parameter__Sequence__fini(member); + return rcl_interfaces__msg__Parameter__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array[1] = { + { + "parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__SetParameters_Request, parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__size_function__SetParameters_Request__parameters, // size() function pointer + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Request__parameters, // get_const(index) function pointer + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__get_function__SetParameters_Request__parameters, // get(index) function pointer + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__fetch_function__SetParameters_Request__parameters, // fetch(index, &value) function pointer + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__assign_function__SetParameters_Request__parameters, // assign(index, value) function pointer + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__resize_function__SetParameters_Request__parameters // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "SetParameters_Request", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__SetParameters_Request), + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array, // message members + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_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 rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Request)() { + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); + if (!rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/set_parameters__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters__struct.h" + + +// Include directives for member types +// Member `results` +#include "rcl_interfaces/msg/set_parameters_result.h" +// Member `results` +#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_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; + rcl_interfaces__srv__SetParameters_Response__init(message_memory); +} + +void rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__SetParameters_Response__fini(message_memory); +} + +size_t rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__size_function__SetParameters_Response__results( + const void * untyped_member) +{ + const rcl_interfaces__msg__SetParametersResult__Sequence * member = + (const rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Response__results( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__SetParametersResult__Sequence * member = + (const rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_function__SetParameters_Response__results( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__SetParametersResult__Sequence * member = + (rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__fetch_function__SetParameters_Response__results( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__SetParametersResult * item = + ((const rcl_interfaces__msg__SetParametersResult *) + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Response__results(untyped_member, index)); + rcl_interfaces__msg__SetParametersResult * value = + (rcl_interfaces__msg__SetParametersResult *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__assign_function__SetParameters_Response__results( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__SetParametersResult * item = + ((rcl_interfaces__msg__SetParametersResult *) + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_function__SetParameters_Response__results(untyped_member, index)); + const rcl_interfaces__msg__SetParametersResult * value = + (const rcl_interfaces__msg__SetParametersResult *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__resize_function__SetParameters_Response__results( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__SetParametersResult__Sequence * member = + (rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); + rcl_interfaces__msg__SetParametersResult__Sequence__fini(member); + return rcl_interfaces__msg__SetParametersResult__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array[1] = { + { + "results", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__SetParameters_Response, results), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__size_function__SetParameters_Response__results, // size() function pointer + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__SetParameters_Response__results, // get_const(index) function pointer + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__get_function__SetParameters_Response__results, // get(index) function pointer + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__fetch_function__SetParameters_Response__results, // fetch(index, &value) function pointer + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__assign_function__SetParameters_Response__results, // assign(index, value) function pointer + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__resize_function__SetParameters_Response__results // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "SetParameters_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__SetParameters_Response), + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array, // message members + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_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 rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Response)() { + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)(); + if (!rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters__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 rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_members = { + "rcl_interfaces__srv", // service namespace + "SetParameters", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_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, rcl_interfaces, srv, SetParameters_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters)() { + if (!rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_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, rcl_interfaces, srv, SetParameters_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, rcl_interfaces, srv, SetParameters_Response)()->data; + } + + return &rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.cpp similarity index 87% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.cpp index c02e0bef7..7e13128c5 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__SetParameters_Request__parameters(void * untyped_member, si return &member[index]; } +void fetch_function__SetParameters_Request__parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SetParameters_Request__parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SetParameters_Request__parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SetParameters_Request__parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SetParameters_Request__parameters(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters size_function__SetParameters_Request__parameters, // size() function pointer get_const_function__SetParameters_Request__parameters, // get_const(index) function pointer get_function__SetParameters_Request__parameters, // get(index) function pointer + fetch_function__SetParameters_Request__parameters, // fetch(index, &value) function pointer + assign_function__SetParameters_Request__parameters, // assign(index, value) function pointer resize_function__SetParameters_Request__parameters // resize(index) function pointer } }; @@ -201,6 +221,24 @@ void * get_function__SetParameters_Response__results(void * untyped_member, size return &member[index]; } +void fetch_function__SetParameters_Response__results( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SetParameters_Response__results(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SetParameters_Response__results( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SetParameters_Response__results(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SetParameters_Response__results(void * untyped_member, size_t size) { auto * member = @@ -222,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters size_function__SetParameters_Response__results, // size() function pointer get_const_function__SetParameters_Response__results, // get_const(index) function pointer get_function__SetParameters_Response__results, // get(index) function pointer + fetch_function__SetParameters_Response__results, // fetch(index, &value) function pointer + assign_function__SetParameters_Response__results, // assign(index, value) function pointer resize_function__SetParameters_Response__results // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp index 7a67cb20d..ab93487eb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp @@ -5,11 +5,12 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__BUILDER_HPP_ #define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__BUILDER_HPP_ -#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp" -#include #include #include +#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rcl_interfaces { diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c index 6f7c017dd..2e990f4ad 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__functions.c @@ -215,22 +215,27 @@ rcl_interfaces__srv__SetParametersAtomically_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__SetParametersAtomically_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__SetParametersAtomically_Request * data = - (rcl_interfaces__srv__SetParametersAtomically_Request *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__SetParametersAtomically_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 (!rcl_interfaces__srv__SetParametersAtomically_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__SetParametersAtomically_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; ) { - rcl_interfaces__srv__SetParametersAtomically_Request__fini(&data[i]); + rcl_interfaces__srv__SetParametersAtomically_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -450,22 +455,27 @@ rcl_interfaces__srv__SetParametersAtomically_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rcl_interfaces__srv__SetParametersAtomically_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rcl_interfaces__srv__SetParametersAtomically_Response * data = - (rcl_interfaces__srv__SetParametersAtomically_Response *)realloc(output->data, allocation_size); + (rcl_interfaces__srv__SetParametersAtomically_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 (!rcl_interfaces__srv__SetParametersAtomically_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!rcl_interfaces__srv__SetParametersAtomically_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; ) { - rcl_interfaces__srv__SetParametersAtomically_Response__fini(&data[i]); + rcl_interfaces__srv__SetParametersAtomically_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__functions.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__functions.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__functions.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__functions.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h index 84c13ebd3..e1069e62d 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rcl_interfaces__srv__SetParametersAtomically_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__SetParametersAtomically_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces @@ -55,6 +56,7 @@ size_t get_serialized_size_rcl_interfaces__srv__SetParametersAtomically_Response ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces size_t max_serialized_size_rcl_interfaces__srv__SetParametersAtomically_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rcl_interfaces diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp index e1027140c..0f852760e 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_SetParametersAtomically_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rcl_interfaces max_serialized_size_SetParametersAtomically_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h index a28b97747..0aed8fb9c 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'parameters' #include "rcl_interfaces/msg/detail/parameter__struct.h" -// Struct defined in srv/SetParametersAtomically in the package rcl_interfaces. +/// Struct defined in srv/SetParametersAtomically in the package rcl_interfaces. typedef struct rcl_interfaces__srv__SetParametersAtomically_Request { rcl_interfaces__msg__Parameter__Sequence parameters; @@ -44,7 +44,7 @@ typedef struct rcl_interfaces__srv__SetParametersAtomically_Request__Sequence // Member 'result' #include "rcl_interfaces/msg/detail/set_parameters_result__struct.h" -// Struct defined in srv/SetParametersAtomically in the package rcl_interfaces. +/// Struct defined in srv/SetParametersAtomically in the package rcl_interfaces. typedef struct rcl_interfaces__srv__SetParametersAtomically_Response { rcl_interfaces__msg__SetParametersResult result; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp similarity index 95% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp index 921c56597..f2753993b 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp @@ -5,14 +5,15 @@ #ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__STRUCT_HPP_ #define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'parameters' @@ -49,12 +50,12 @@ struct SetParametersAtomically_Request_ // field types and members using _parameters_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _parameters_type parameters; // setters for named parameter idiom Type & set__parameters( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->parameters = _arg; return *this; diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp new file mode 100644 index 000000000..23268a36d --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp @@ -0,0 +1,283 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rcl_interfaces:srv/SetParametersAtomically.idl +// generated code does not contain a copyright notice + +#ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ +#define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'parameters' +#include "rcl_interfaces/msg/detail/parameter__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetParametersAtomically_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: parameters + { + if (msg.parameters.size() == 0) { + out << "parameters: []"; + } else { + out << "parameters: ["; + size_t pending_items = msg.parameters.size(); + for (auto item : msg.parameters) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetParametersAtomically_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.parameters.size() == 0) { + out << "parameters: []\n"; + } else { + out << "parameters:\n"; + for (auto item : msg.parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetParametersAtomically_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::SetParametersAtomically_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::SetParametersAtomically_Request & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParametersAtomically_Request"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParametersAtomically_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'result' +#include "rcl_interfaces/msg/detail/set_parameters_result__traits.hpp" + +namespace rcl_interfaces +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetParametersAtomically_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: result + { + out << "result: "; + to_flow_style_yaml(msg.result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetParametersAtomically_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "result:\n"; + to_block_style_yaml(msg.result, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetParametersAtomically_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 rcl_interfaces + +namespace rosidl_generator_traits +{ + +[[deprecated("use rcl_interfaces::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const rcl_interfaces::srv::SetParametersAtomically_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + rcl_interfaces::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rcl_interfaces::srv::to_yaml() instead")]] +inline std::string to_yaml(const rcl_interfaces::srv::SetParametersAtomically_Response & msg) +{ + return rcl_interfaces::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParametersAtomically_Response"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParametersAtomically_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "rcl_interfaces::srv::SetParametersAtomically"; +} + +template<> +inline const char * name() +{ + return "rcl_interfaces/srv/SetParametersAtomically"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c new file mode 100644 index 000000000..2adb96b57 --- /dev/null +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c @@ -0,0 +1,299 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rcl_interfaces:srv/SetParametersAtomically.idl +// generated code does not contain a copyright notice + +#include +#include "rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h" +#include "rcl_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 "rcl_interfaces/srv/detail/set_parameters_atomically__functions.h" +#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.h" + + +// Include directives for member types +// Member `parameters` +#include "rcl_interfaces/msg/parameter.h" +// Member `parameters` +#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_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; + rcl_interfaces__srv__SetParametersAtomically_Request__init(message_memory); +} + +void rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_fini_function(void * message_memory) +{ + rcl_interfaces__srv__SetParametersAtomically_Request__fini(message_memory); +} + +size_t rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__size_function__SetParametersAtomically_Request__parameters( + const void * untyped_member) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return member->size; +} + +const void * rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_const_function__SetParametersAtomically_Request__parameters( + const void * untyped_member, size_t index) +{ + const rcl_interfaces__msg__Parameter__Sequence * member = + (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_function__SetParametersAtomically_Request__parameters( + void * untyped_member, size_t index) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__fetch_function__SetParametersAtomically_Request__parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rcl_interfaces__msg__Parameter * item = + ((const rcl_interfaces__msg__Parameter *) + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_const_function__SetParametersAtomically_Request__parameters(untyped_member, index)); + rcl_interfaces__msg__Parameter * value = + (rcl_interfaces__msg__Parameter *)(untyped_value); + *value = *item; +} + +void rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__assign_function__SetParametersAtomically_Request__parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rcl_interfaces__msg__Parameter * item = + ((rcl_interfaces__msg__Parameter *) + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_function__SetParametersAtomically_Request__parameters(untyped_member, index)); + const rcl_interfaces__msg__Parameter * value = + (const rcl_interfaces__msg__Parameter *)(untyped_value); + *item = *value; +} + +bool rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__resize_function__SetParametersAtomically_Request__parameters( + void * untyped_member, size_t size) +{ + rcl_interfaces__msg__Parameter__Sequence * member = + (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); + rcl_interfaces__msg__Parameter__Sequence__fini(member); + return rcl_interfaces__msg__Parameter__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array[1] = { + { + "parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rcl_interfaces__srv__SetParametersAtomically_Request, parameters), // bytes offset in struct + NULL, // default value + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__size_function__SetParametersAtomically_Request__parameters, // size() function pointer + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_const_function__SetParametersAtomically_Request__parameters, // get_const(index) function pointer + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_function__SetParametersAtomically_Request__parameters, // get(index) function pointer + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__fetch_function__SetParametersAtomically_Request__parameters, // fetch(index, &value) function pointer + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__assign_function__SetParametersAtomically_Request__parameters, // assign(index, value) function pointer + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__resize_function__SetParametersAtomically_Request__parameters // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_members = { + "rcl_interfaces__srv", // message namespace + "SetParametersAtomically_Request", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__SetParametersAtomically_Request), + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array, // message members + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_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 rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle = { + 0, + &rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Request)() { + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); + if (!rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rcl_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 "rcl_interfaces/srv/detail/set_parameters_atomically__functions.h" +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.h" + + +// Include directives for member types +// Member `result` +#include "rcl_interfaces/msg/set_parameters_result.h" +// Member `result` +#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_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; + rcl_interfaces__srv__SetParametersAtomically_Response__init(message_memory); +} + +void rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_fini_function(void * message_memory) +{ + rcl_interfaces__srv__SetParametersAtomically_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array[1] = { + { + "result", // 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(rcl_interfaces__srv__SetParametersAtomically_Response, result), // 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 rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_members = { + "rcl_interfaces__srv", // message namespace + "SetParametersAtomically_Response", // message name + 1, // number of fields + sizeof(rcl_interfaces__srv__SetParametersAtomically_Response), + rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array, // message members + rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_init_function, // function to initialize message memory (memory has to be allocated) + rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_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 rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle = { + 0, + &rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Response)() { + rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)(); + if (!rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rcl_interfaces__srv__SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "rcl_interfaces/srv/detail/set_parameters_atomically__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 rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_members = { + "rcl_interfaces__srv", // service namespace + "SetParametersAtomically", // service name + // these two fields are initialized below on the first access + NULL, // request message + // rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle, + NULL // response message + // rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle = { + 0, + &rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically)() { + if (!rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle.typesupport_identifier) { + rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_Response)()->data; + } + + return &rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp index 11e267e82..1cdc022bb 100644 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp +++ b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__SetParametersAtomically_Request__parameters(void * untyped_ return &member[index]; } +void fetch_function__SetParametersAtomically_Request__parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SetParametersAtomically_Request__parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SetParametersAtomically_Request__parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SetParametersAtomically_Request__parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SetParametersAtomically_Request__parameters(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters size_function__SetParametersAtomically_Request__parameters, // size() function pointer get_const_function__SetParametersAtomically_Request__parameters, // get_const(index) function pointer get_function__SetParametersAtomically_Request__parameters, // get(index) function pointer + fetch_function__SetParametersAtomically_Request__parameters, // fetch(index, &value) function pointer + assign_function__SetParametersAtomically_Request__parameters, // assign(index, value) function pointer resize_function__SetParametersAtomically_Request__parameters // resize(index) function pointer } }; @@ -195,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetParameters 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 } }; diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/get_parameter_types.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/get_parameter_types.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/get_parameter_types.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/get_parameter_types.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/get_parameters.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/get_parameters.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/get_parameters.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/get_parameters.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/list_parameters.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/list_parameters.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/list_parameters.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/list_parameters.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/set_parameters.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/set_parameters.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/set_parameters.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/set_parameters.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/set_parameters_atomically.h b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.h similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/set_parameters_atomically.h rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.h diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/set_parameters_atomically.hpp b/ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp similarity index 100% rename from ThirdParty/ros/include/rcl_interfaces/srv/set_parameters_atomically.hpp rename to ThirdParty/ros/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__traits.hpp deleted file mode 100644 index d066b623a..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/DescribeParameters.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/describe_parameters__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::DescribeParameters_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/DescribeParameters_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::DescribeParameters_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/DescribeParameters_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::DescribeParameters"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/DescribeParameters"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__DESCRIBE_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.c deleted file mode 100644 index 0f0bad47a..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/describe_parameters__type_support.c +++ /dev/null @@ -1,269 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/DescribeParameters.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/describe_parameters__functions.h" -#include "rcl_interfaces/srv/detail/describe_parameters__struct.h" - - -// Include directives for member types -// Member `names` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_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; - rcl_interfaces__srv__DescribeParameters_Request__init(message_memory); -} - -void DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__DescribeParameters_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_member_array[1] = { - { - "names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__DescribeParameters_Request, names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "DescribeParameters_Request", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__DescribeParameters_Request), - DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_member_array, // message members - DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) - DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_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 DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle = { - 0, - &DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Request)() { - if (!DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle.typesupport_identifier) { - DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DescribeParameters_Request__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/describe_parameters__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/describe_parameters__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/describe_parameters__struct.h" - - -// Include directives for member types -// Member `descriptors` -#include "rcl_interfaces/msg/parameter_descriptor.h" -// Member `descriptors` -#include "rcl_interfaces/msg/detail/parameter_descriptor__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_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; - rcl_interfaces__srv__DescribeParameters_Response__init(message_memory); -} - -void DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__DescribeParameters_Response__fini(message_memory); -} - -size_t DescribeParameters_Response__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__descriptors( - const void * untyped_member) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return member->size; -} - -const void * DescribeParameters_Response__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__descriptors( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (const rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * DescribeParameters_Response__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__descriptors( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool DescribeParameters_Response__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__descriptors( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__ParameterDescriptor__Sequence * member = - (rcl_interfaces__msg__ParameterDescriptor__Sequence *)(untyped_member); - rcl_interfaces__msg__ParameterDescriptor__Sequence__fini(member); - return rcl_interfaces__msg__ParameterDescriptor__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array[1] = { - { - "descriptors", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__DescribeParameters_Response, descriptors), // bytes offset in struct - NULL, // default value - DescribeParameters_Response__rosidl_typesupport_introspection_c__size_function__ParameterDescriptor__descriptors, // size() function pointer - DescribeParameters_Response__rosidl_typesupport_introspection_c__get_const_function__ParameterDescriptor__descriptors, // get_const(index) function pointer - DescribeParameters_Response__rosidl_typesupport_introspection_c__get_function__ParameterDescriptor__descriptors, // get(index) function pointer - DescribeParameters_Response__rosidl_typesupport_introspection_c__resize_function__ParameterDescriptor__descriptors // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "DescribeParameters_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__DescribeParameters_Response), - DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array, // message members - DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) - DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_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 DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle = { - 0, - &DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Response)() { - DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterDescriptor)(); - if (!DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle.typesupport_identifier) { - DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DescribeParameters_Response__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/describe_parameters__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 rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_members = { - "rcl_interfaces__srv", // service namespace - "DescribeParameters", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, DescribeParameters)() { - if (!rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_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, rcl_interfaces, srv, DescribeParameters_Response)()->data; - } - - return &rcl_interfaces__srv__detail__describe_parameters__rosidl_typesupport_introspection_c__DescribeParameters_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp deleted file mode 100644 index 78633a7db..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/GetParameterTypes.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/get_parameter_types__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameterTypes_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameterTypes_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameterTypes_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameterTypes_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameterTypes"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameterTypes"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__GET_PARAMETER_TYPES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.c deleted file mode 100644 index ca1e01855..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameter_types__type_support.c +++ /dev/null @@ -1,232 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/GetParameterTypes.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/get_parameter_types__functions.h" -#include "rcl_interfaces/srv/detail/get_parameter_types__struct.h" - - -// Include directives for member types -// Member `names` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_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; - rcl_interfaces__srv__GetParameterTypes_Request__init(message_memory); -} - -void GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__GetParameterTypes_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_member_array[1] = { - { - "names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__GetParameterTypes_Request, names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "GetParameterTypes_Request", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__GetParameterTypes_Request), - GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_member_array, // message members - GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_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 GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle = { - 0, - &GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Request)() { - if (!GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle.typesupport_identifier) { - GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetParameterTypes_Request__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/get_parameter_types__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/get_parameter_types__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/get_parameter_types__struct.h" - - -// Include directives for member types -// Member `types` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_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; - rcl_interfaces__srv__GetParameterTypes_Response__init(message_memory); -} - -void GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__GetParameterTypes_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_member_array[1] = { - { - "types", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__GetParameterTypes_Response, types), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "GetParameterTypes_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__GetParameterTypes_Response), - GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_member_array, // message members - GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_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 GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle = { - 0, - &GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Response)() { - if (!GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle.typesupport_identifier) { - GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetParameterTypes_Response__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/get_parameter_types__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 rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_members = { - "rcl_interfaces__srv", // service namespace - "GetParameterTypes", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameterTypes)() { - if (!rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_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, rcl_interfaces, srv, GetParameterTypes_Response)()->data; - } - - return &rcl_interfaces__srv__detail__get_parameter_types__rosidl_typesupport_introspection_c__GetParameterTypes_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__traits.hpp deleted file mode 100644 index 81908e8f1..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/GetParameters.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/get_parameters__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameters_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameters_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameters_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameters_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::GetParameters"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/GetParameters"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__GET_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.c deleted file mode 100644 index 5555e9655..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/get_parameters__type_support.c +++ /dev/null @@ -1,269 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/GetParameters.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/get_parameters__functions.h" -#include "rcl_interfaces/srv/detail/get_parameters__struct.h" - - -// Include directives for member types -// Member `names` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_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; - rcl_interfaces__srv__GetParameters_Request__init(message_memory); -} - -void GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__GetParameters_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_member_array[1] = { - { - "names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__GetParameters_Request, names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "GetParameters_Request", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__GetParameters_Request), - GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_member_array, // message members - GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_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 GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle = { - 0, - &GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Request)() { - if (!GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle.typesupport_identifier) { - GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetParameters_Request__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/get_parameters__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/get_parameters__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/get_parameters__struct.h" - - -// Include directives for member types -// Member `values` -#include "rcl_interfaces/msg/parameter_value.h" -// Member `values` -#include "rcl_interfaces/msg/detail/parameter_value__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_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; - rcl_interfaces__srv__GetParameters_Response__init(message_memory); -} - -void GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__GetParameters_Response__fini(message_memory); -} - -size_t GetParameters_Response__rosidl_typesupport_introspection_c__size_function__ParameterValue__values( - const void * untyped_member) -{ - const rcl_interfaces__msg__ParameterValue__Sequence * member = - (const rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); - return member->size; -} - -const void * GetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__values( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__ParameterValue__Sequence * member = - (const rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * GetParameters_Response__rosidl_typesupport_introspection_c__get_function__ParameterValue__values( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__ParameterValue__Sequence * member = - (rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool GetParameters_Response__rosidl_typesupport_introspection_c__resize_function__ParameterValue__values( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__ParameterValue__Sequence * member = - (rcl_interfaces__msg__ParameterValue__Sequence *)(untyped_member); - rcl_interfaces__msg__ParameterValue__Sequence__fini(member); - return rcl_interfaces__msg__ParameterValue__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array[1] = { - { - "values", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__GetParameters_Response, values), // bytes offset in struct - NULL, // default value - GetParameters_Response__rosidl_typesupport_introspection_c__size_function__ParameterValue__values, // size() function pointer - GetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__ParameterValue__values, // get_const(index) function pointer - GetParameters_Response__rosidl_typesupport_introspection_c__get_function__ParameterValue__values, // get(index) function pointer - GetParameters_Response__rosidl_typesupport_introspection_c__resize_function__ParameterValue__values // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "GetParameters_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__GetParameters_Response), - GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array, // message members - GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_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 GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle = { - 0, - &GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Response)() { - GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ParameterValue)(); - if (!GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle.typesupport_identifier) { - GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetParameters_Response__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/get_parameters__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 rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_members = { - "rcl_interfaces__srv", // service namespace - "GetParameters", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_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, rcl_interfaces, srv, GetParameters_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, GetParameters)() { - if (!rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_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, rcl_interfaces, srv, GetParameters_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, rcl_interfaces, srv, GetParameters_Response)()->data; - } - - return &rcl_interfaces__srv__detail__get_parameters__rosidl_typesupport_introspection_c__GetParameters_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__traits.hpp deleted file mode 100644 index 6a9114b16..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/ListParameters.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/list_parameters__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::ListParameters_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/ListParameters_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'result' -#include "rcl_interfaces/msg/detail/list_parameters_result__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::ListParameters_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/ListParameters_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::ListParameters"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/ListParameters"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__LIST_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.c deleted file mode 100644 index 8fcfec87e..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/list_parameters__type_support.c +++ /dev/null @@ -1,251 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/ListParameters.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/list_parameters__functions.h" -#include "rcl_interfaces/srv/detail/list_parameters__struct.h" - - -// Include directives for member types -// Member `prefixes` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_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; - rcl_interfaces__srv__ListParameters_Request__init(message_memory); -} - -void ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__ListParameters_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_member_array[2] = { - { - "prefixes", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__ListParameters_Request, prefixes), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "depth", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__ListParameters_Request, depth), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "ListParameters_Request", // message name - 2, // number of fields - sizeof(rcl_interfaces__srv__ListParameters_Request), - ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_member_array, // message members - ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) - ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_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 ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle = { - 0, - &ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Request)() { - if (!ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle.typesupport_identifier) { - ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ListParameters_Request__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/list_parameters__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/list_parameters__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/list_parameters__struct.h" - - -// Include directives for member types -// Member `result` -#include "rcl_interfaces/msg/list_parameters_result.h" -// Member `result` -#include "rcl_interfaces/msg/detail/list_parameters_result__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_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; - rcl_interfaces__srv__ListParameters_Response__init(message_memory); -} - -void ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__ListParameters_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array[1] = { - { - "result", // 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(rcl_interfaces__srv__ListParameters_Response, result), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "ListParameters_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__ListParameters_Response), - ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array, // message members - ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) - ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_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 ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle = { - 0, - &ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Response)() { - ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, ListParametersResult)(); - if (!ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle.typesupport_identifier) { - ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ListParameters_Response__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/list_parameters__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 rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_members = { - "rcl_interfaces__srv", // service namespace - "ListParameters", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_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, rcl_interfaces, srv, ListParameters_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, ListParameters)() { - if (!rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_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, rcl_interfaces, srv, ListParameters_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, rcl_interfaces, srv, ListParameters_Response)()->data; - } - - return &rcl_interfaces__srv__detail__list_parameters__rosidl_typesupport_introspection_c__ListParameters_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__traits.hpp deleted file mode 100644 index f97b69c1e..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/SetParameters.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/set_parameters__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParameters_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParameters_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParameters_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParameters_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParameters"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParameters"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.c deleted file mode 100644 index a27aeb23f..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters__type_support.c +++ /dev/null @@ -1,306 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/SetParameters.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/set_parameters__functions.h" -#include "rcl_interfaces/srv/detail/set_parameters__struct.h" - - -// Include directives for member types -// Member `parameters` -#include "rcl_interfaces/msg/parameter.h" -// Member `parameters` -#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_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; - rcl_interfaces__srv__SetParameters_Request__init(message_memory); -} - -void SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__SetParameters_Request__fini(message_memory); -} - -size_t SetParameters_Request__rosidl_typesupport_introspection_c__size_function__Parameter__parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return member->size; -} - -const void * SetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__Parameter__parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * SetParameters_Request__rosidl_typesupport_introspection_c__get_function__Parameter__parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool SetParameters_Request__rosidl_typesupport_introspection_c__resize_function__Parameter__parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - rcl_interfaces__msg__Parameter__Sequence__fini(member); - return rcl_interfaces__msg__Parameter__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array[1] = { - { - "parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__SetParameters_Request, parameters), // bytes offset in struct - NULL, // default value - SetParameters_Request__rosidl_typesupport_introspection_c__size_function__Parameter__parameters, // size() function pointer - SetParameters_Request__rosidl_typesupport_introspection_c__get_const_function__Parameter__parameters, // get_const(index) function pointer - SetParameters_Request__rosidl_typesupport_introspection_c__get_function__Parameter__parameters, // get(index) function pointer - SetParameters_Request__rosidl_typesupport_introspection_c__resize_function__Parameter__parameters // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "SetParameters_Request", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__SetParameters_Request), - SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array, // message members - SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_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 SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle = { - 0, - &SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Request)() { - SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); - if (!SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle.typesupport_identifier) { - SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetParameters_Request__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/set_parameters__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters__struct.h" - - -// Include directives for member types -// Member `results` -#include "rcl_interfaces/msg/set_parameters_result.h" -// Member `results` -#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_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; - rcl_interfaces__srv__SetParameters_Response__init(message_memory); -} - -void SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__SetParameters_Response__fini(message_memory); -} - -size_t SetParameters_Response__rosidl_typesupport_introspection_c__size_function__SetParametersResult__results( - const void * untyped_member) -{ - const rcl_interfaces__msg__SetParametersResult__Sequence * member = - (const rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); - return member->size; -} - -const void * SetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__SetParametersResult__results( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__SetParametersResult__Sequence * member = - (const rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * SetParameters_Response__rosidl_typesupport_introspection_c__get_function__SetParametersResult__results( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__SetParametersResult__Sequence * member = - (rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool SetParameters_Response__rosidl_typesupport_introspection_c__resize_function__SetParametersResult__results( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__SetParametersResult__Sequence * member = - (rcl_interfaces__msg__SetParametersResult__Sequence *)(untyped_member); - rcl_interfaces__msg__SetParametersResult__Sequence__fini(member); - return rcl_interfaces__msg__SetParametersResult__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array[1] = { - { - "results", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__SetParameters_Response, results), // bytes offset in struct - NULL, // default value - SetParameters_Response__rosidl_typesupport_introspection_c__size_function__SetParametersResult__results, // size() function pointer - SetParameters_Response__rosidl_typesupport_introspection_c__get_const_function__SetParametersResult__results, // get_const(index) function pointer - SetParameters_Response__rosidl_typesupport_introspection_c__get_function__SetParametersResult__results, // get(index) function pointer - SetParameters_Response__rosidl_typesupport_introspection_c__resize_function__SetParametersResult__results // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "SetParameters_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__SetParameters_Response), - SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array, // message members - SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_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 SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle = { - 0, - &SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Response)() { - SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)(); - if (!SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle.typesupport_identifier) { - SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetParameters_Response__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters__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 rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_members = { - "rcl_interfaces__srv", // service namespace - "SetParameters", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_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, rcl_interfaces, srv, SetParameters_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParameters)() { - if (!rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_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, rcl_interfaces, srv, SetParameters_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, rcl_interfaces, srv, SetParameters_Response)()->data; - } - - return &rcl_interfaces__srv__detail__set_parameters__rosidl_typesupport_introspection_c__SetParameters_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp b/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp deleted file mode 100644 index 2f03b1eba..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rcl_interfaces:srv/SetParametersAtomically.idl -// generated code does not contain a copyright notice - -#ifndef RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ -#define RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ - -#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParametersAtomically_Request"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParametersAtomically_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'result' -#include "rcl_interfaces/msg/detail/set_parameters_result__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParametersAtomically_Response"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParametersAtomically_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rcl_interfaces::srv::SetParametersAtomically"; -} - -template<> -inline const char * name() -{ - return "rcl_interfaces/srv/SetParametersAtomically"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // RCL_INTERFACES__SRV__DETAIL__SET_PARAMETERS_ATOMICALLY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c b/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c deleted file mode 100644 index b11d4a1fb..000000000 --- a/ThirdParty/ros/include/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.c +++ /dev/null @@ -1,273 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rcl_interfaces:srv/SetParametersAtomically.idl -// generated code does not contain a copyright notice - -#include -#include "rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h" -#include "rcl_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 "rcl_interfaces/srv/detail/set_parameters_atomically__functions.h" -#include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.h" - - -// Include directives for member types -// Member `parameters` -#include "rcl_interfaces/msg/parameter.h" -// Member `parameters` -#include "rcl_interfaces/msg/detail/parameter__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_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; - rcl_interfaces__srv__SetParametersAtomically_Request__init(message_memory); -} - -void SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_fini_function(void * message_memory) -{ - rcl_interfaces__srv__SetParametersAtomically_Request__fini(message_memory); -} - -size_t SetParametersAtomically_Request__rosidl_typesupport_introspection_c__size_function__Parameter__parameters( - const void * untyped_member) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return member->size; -} - -const void * SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_const_function__Parameter__parameters( - const void * untyped_member, size_t index) -{ - const rcl_interfaces__msg__Parameter__Sequence * member = - (const rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_function__Parameter__parameters( - void * untyped_member, size_t index) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool SetParametersAtomically_Request__rosidl_typesupport_introspection_c__resize_function__Parameter__parameters( - void * untyped_member, size_t size) -{ - rcl_interfaces__msg__Parameter__Sequence * member = - (rcl_interfaces__msg__Parameter__Sequence *)(untyped_member); - rcl_interfaces__msg__Parameter__Sequence__fini(member); - return rcl_interfaces__msg__Parameter__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array[1] = { - { - "parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rcl_interfaces__srv__SetParametersAtomically_Request, parameters), // bytes offset in struct - NULL, // default value - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__size_function__Parameter__parameters, // size() function pointer - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_const_function__Parameter__parameters, // get_const(index) function pointer - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__get_function__Parameter__parameters, // get(index) function pointer - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__resize_function__Parameter__parameters // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_members = { - "rcl_interfaces__srv", // message namespace - "SetParametersAtomically_Request", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__SetParametersAtomically_Request), - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array, // message members - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_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 SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle = { - 0, - &SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Request)() { - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, Parameter)(); - if (!SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle.typesupport_identifier) { - SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetParametersAtomically_Request__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters_atomically__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rcl_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 "rcl_interfaces/srv/detail/set_parameters_atomically__functions.h" -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters_atomically__struct.h" - - -// Include directives for member types -// Member `result` -#include "rcl_interfaces/msg/set_parameters_result.h" -// Member `result` -#include "rcl_interfaces/msg/detail/set_parameters_result__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_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; - rcl_interfaces__srv__SetParametersAtomically_Response__init(message_memory); -} - -void SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_fini_function(void * message_memory) -{ - rcl_interfaces__srv__SetParametersAtomically_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array[1] = { - { - "result", // 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(rcl_interfaces__srv__SetParametersAtomically_Response, result), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_members = { - "rcl_interfaces__srv", // message namespace - "SetParametersAtomically_Response", // message name - 1, // number of fields - sizeof(rcl_interfaces__srv__SetParametersAtomically_Response), - SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array, // message members - SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_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 SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle = { - 0, - &SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Response)() { - SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, msg, SetParametersResult)(); - if (!SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle.typesupport_identifier) { - SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetParametersAtomically_Response__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "rcl_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "rcl_interfaces/srv/detail/set_parameters_atomically__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 rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_members = { - "rcl_interfaces__srv", // service namespace - "SetParametersAtomically", // service name - // these two fields are initialized below on the first access - NULL, // request message - // rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_Request_message_type_support_handle, - NULL // response message - // rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle = { - 0, - &rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rcl_interfaces -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rcl_interfaces, srv, SetParametersAtomically)() { - if (!rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle.typesupport_identifier) { - rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_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, rcl_interfaces, srv, SetParametersAtomically_Response)()->data; - } - - return &rcl_interfaces__srv__detail__set_parameters_atomically__rosidl_typesupport_introspection_c__SetParametersAtomically_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/rcl_logging_interface.h b/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/rcl_logging_interface.h new file mode 100644 index 000000000..074f86aff --- /dev/null +++ b/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/rcl_logging_interface.h @@ -0,0 +1,123 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_ +#define RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_ + +#include "rcl_logging_interface/visibility_control.h" +#include "rcutils/allocator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum +{ + RCL_LOGGING_RET_OK = 0, + RCL_LOGGING_RET_ERROR = 2, + RCL_LOGGING_RET_INVALID_ARGUMENT = 11, + RCL_LOGGING_RET_CONFIG_FILE_DOESNT_EXIST = 21, + RCL_LOGGING_RET_CONFIG_FILE_INVALID = 22, +} rcl_logging_ret_t; + +/// Initialize the external logging library. +/** + * \param[in] config_file The location of a config file that the external + * logging library should use to configure itself. + * If provided, it must be a null terminated C string. + * If set to NULL or the empty string, the logging library will use defaults. + * \param[in] allocator The allocator to use for memory allocation. This is + * an rcutils_allocator_t rather than an rcl_allocator_t to ensure that the + * rcl_logging_* packages don't have a circular dependency back to rcl. + * \return RCL_LOGGING_RET_OK if initialized successfully. + * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. + * \return RCL_LOGGING_RET_CONFIG_FILE_DOESNT_EXIST if a config_file is provided + * but the file doesn't exist. + * \return RCL_LOGGING_RET_CONFIG_FILE_INVALID if a config_file is provided but + * the logging backend doesn't understand it. + */ +RCL_LOGGING_INTERFACE_PUBLIC +RCUTILS_WARN_UNUSED +rcl_logging_ret_t +rcl_logging_external_initialize(const char * config_file, rcutils_allocator_t allocator); + +/// Free the resources allocated for the external logging system. +/** + * This puts the system into a state equivalent to being uninitialized. + * + * \return RCL_LOGGING_RET_OK if successfully shutdown, or + * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. + */ +RCL_LOGGING_INTERFACE_PUBLIC +RCUTILS_WARN_UNUSED +rcl_logging_ret_t +rcl_logging_external_shutdown(); + +/// Log a message. +/** + * \param[in] severity The severity level of the message being logged. + * \param[in] name The name of the logger, must either be a null terminated + * C string or NULL. + * If NULL or empty the root logger will be used. + * \param[in] msg The message to be logged. Must be a null terminated C string. + */ +RCL_LOGGING_INTERFACE_PUBLIC +void +rcl_logging_external_log(int severity, const char * name, const char * msg); + +/// Set the severity level for a logger. +/** + * This function sets the severity level for the specified logger. + * If the name provided is an empty string or NULL it will change the level of + * the root logger. + * + * \param[in] name The name of the logger. + * Must be a null terminated C string or NULL. + * \param[in] level The severity level to be used for the specified logger. + * \return RCL_LOGGING_RET_OK if set successfully, or + * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. + */ +RCL_LOGGING_INTERFACE_PUBLIC +RCUTILS_WARN_UNUSED +rcl_logging_ret_t rcl_logging_external_set_logger_level(const char * name, int level); + +/// Get the logging directory. +/** + * Uses various environment variables to construct a logging directory path. + * + * Use $ROS_LOG_DIR if ROS_LOG_DIR is set and not empty. + * Otherwise, use $ROS_HOME/log, using ~/.ros for ROS_HOME if not set or if empty. + * + * It also expands an initial '~' to the current user's home directory, + * and converts the path separator if necessary. + * + * If successful, the directory C string should be deallocated using the given allocator when it is + * no longer needed. + * + * \param[in] allocator The allocator to use for memory allocation. + * \param[out] directory The C string pointer at which to write the directory path. + * Only meaningful if the call is successful. Must not be nullptr and must point to nullptr. + * \return RCL_LOGGING_RET_OK if successful, or + * \return RCL_LOGGING_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. + */ +RCL_LOGGING_INTERFACE_PUBLIC +rcl_logging_ret_t +rcl_logging_get_logging_directory(rcutils_allocator_t allocator, char ** directory); + +#ifdef __cplusplus +} +#endif + +#endif // RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_ diff --git a/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/visibility_control.h b/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/visibility_control.h new file mode 100644 index 000000000..ddb436c56 --- /dev/null +++ b/ThirdParty/ros/include/rcl_logging_interface/rcl_logging_interface/visibility_control.h @@ -0,0 +1,57 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCL_LOGGING_INTERFACE__VISIBILITY_CONTROL_H_ +#define RCL_LOGGING_INTERFACE__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 RCL_LOGGING_INTERFACE_EXPORT __attribute__ ((dllexport)) + #define RCL_LOGGING_INTERFACE_IMPORT __attribute__ ((dllimport)) + #else + #define RCL_LOGGING_INTERFACE_EXPORT __declspec(dllexport) + #define RCL_LOGGING_INTERFACE_IMPORT __declspec(dllimport) + #endif + #ifdef RCL_LOGGING_INTERFACE_BUILDING_DLL + #define RCL_LOGGING_INTERFACE_PUBLIC RCL_LOGGING_INTERFACE_EXPORT + #else + #define RCL_LOGGING_INTERFACE_PUBLIC RCL_LOGGING_INTERFACE_IMPORT + #endif + #define RCL_LOGGING_INTERFACE_PUBLIC_TYPE RCL_LOGGING_INTERFACE_PUBLIC + #define RCL_LOGGING_INTERFACE_LOCAL +#else + #define RCL_LOGGING_INTERFACE_EXPORT __attribute__ ((visibility("default"))) + #define RCL_LOGGING_INTERFACE_IMPORT + #if __GNUC__ >= 4 + #define RCL_LOGGING_INTERFACE_PUBLIC __attribute__ ((visibility("default"))) + #define RCL_LOGGING_INTERFACE_LOCAL __attribute__ ((visibility("hidden"))) + #else + #define RCL_LOGGING_INTERFACE_PUBLIC + #define RCL_LOGGING_INTERFACE_LOCAL + #endif + #define RCL_LOGGING_INTERFACE_PUBLIC_TYPE +#endif + +#ifdef __cplusplus +} +#endif + +#endif // RCL_LOGGING_INTERFACE__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/rcl_logging_spdlog/logging_interface.h b/ThirdParty/ros/include/rcl_logging_spdlog/logging_interface.h deleted file mode 100644 index d422f04aa..000000000 --- a/ThirdParty/ros/include/rcl_logging_spdlog/logging_interface.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL_LOGGING_SPDLOG__LOGGING_INTERFACE_H_ -#define RCL_LOGGING_SPDLOG__LOGGING_INTERFACE_H_ - -#include "rcl_logging_spdlog/visibility_control.h" -#include "rcutils/allocator.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int rcl_logging_ret_t; - -/// Initialize spdlog logging library. -/* - * \param[in] config_file The location of a config file that the external - * logging library should use to configure itself. - * If no config file is provided this will be set to an empty string. - * Must be a NULL terminated c string. - * \param[in] allocator The allocator to use for memory allocation. This is - * an rcutils_allocator_t rather than an rcl_allocator_t to ensure that the - * rcl_logging_* packages don't have a circular dependency back to rcl. - * \return RCL_LOGGING_RET_OK if initialized successfully, or - * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. - */ -RCL_LOGGING_PUBLIC -rcl_logging_ret_t rcl_logging_external_initialize( - const char * config_file, - rcutils_allocator_t allocator); - -/// Free the resources allocated for the spdlog external logging system. -/** - * This puts the system into a state equivalent to being uninitialized. - * - * \return always RCL_LOGGING_RET_OK. - */ -RCL_LOGGING_PUBLIC -rcl_logging_ret_t rcl_logging_external_shutdown(); - -/// Log a message. -/** - * \param[in] severity The severity level of the message being logged. - * \param[in] name The name of the logger (unused). - * \param[in] msg The message to be logged. Must be a null terminated c string. - */ -RCL_LOGGING_PUBLIC -void rcl_logging_external_log(int severity, const char * name, const char * msg); - -/// Set the severity level for a logger. -/** - * This function sets the severity level for the specified logger. - * If the name provided is an empty string or NULL it will change the level of - * the root logger. - * - * \param[in] name The name of the logger (unused). - * \param[in] level The severity level to be used for the specified logger. Values: - * RCUTILS_LOG_SEVERITY_DEBUG, RCUTILS_LOG_SEVERITY_UNSET, RCUTILS_LOG_SEVERITY_DEBUG, - * RCUTILS_LOG_SEVERITY_INFO, RCUTILS_LOG_SEVERITY_WARN, RCUTILS_LOG_SEVERITY_ERROR, - * RCUTILS_LOG_SEVERITY_FATAL - * \return always RCL_LOGGING_RET_OK. - */ -RCL_LOGGING_PUBLIC -RCUTILS_WARN_UNUSED -rcl_logging_ret_t rcl_logging_external_set_logger_level(const char * name, int level); - -/// Get the logging directory. -/** - * Uses various environment variables to construct a logging directory path. - * - * Use $ROS_LOG_DIR if ROS_LOG_DIR is set and not empty. - * Otherwise, use $ROS_HOME/log, using ~/.ros for ROS_HOME if not set or if empty. - * - * It also expands an initial '~' to the current user's home directory, - * and converts the path separator if necessary. - * - * If successful, the directory C string should be deallocated using the given allocator when it is - * no longer needed. - * - * \param[in] allocator The allocator to use for memory allocation. - * \param[out] directory The C string pointer at which to write the directory path. - * Only meaningful if the call is successful. Must not be nullptr and must point to nullptr. - * \return RCL_LOGGING_RET_OK if successful, or - * \return RCL_LOGGING_RET_INVALID_ARGUMENT if any arguments are invalid, or - * \return RCL_LOGGING_RET_ERROR if an unspecified error occurs. - */ -RCL_LOGGING_PUBLIC -rcl_logging_ret_t -rcl_logging_get_logging_directory(rcutils_allocator_t allocator, char ** directory); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // RCL_LOGGING_SPDLOG__LOGGING_INTERFACE_H_ diff --git a/ThirdParty/ros/include/rcl_logging_spdlog/visibility_control.h b/ThirdParty/ros/include/rcl_logging_spdlog/visibility_control.h deleted file mode 100644 index 2095ba876..000000000 --- a/ThirdParty/ros/include/rcl_logging_spdlog/visibility_control.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCL_LOGGING_SPDLOG__VISIBILITY_CONTROL_H_ -#define RCL_LOGGING_SPDLOG__VISIBILITY_CONTROL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined _WIN32 || defined __CYGWIN__ - #ifdef __GNUC__ - #define RCL_LOGGING_EXPORT __attribute__ ((dllexport)) - #define RCL_LOGGING_IMPORT __attribute__ ((dllimport)) - #else - #define RCL_LOGGING_EXPORT __declspec(dllexport) - #define RCL_LOGGING_IMPORT __declspec(dllimport) - #endif - #ifdef RCL_LOGGING_BUILDING_DLL - #define RCL_LOGGING_PUBLIC RCL_LOGGING_EXPORT - #else - #define RCL_LOGGING_PUBLIC RCL_LOGGING_IMPORT - #endif - #define RCL_LOGGING_PUBLIC_TYPE RCL_LOGGING_PUBLIC - #define RCL_LOGGING_LOCAL -#else - #define RCL_LOGGING_EXPORT __attribute__ ((visibility("default"))) - #define RCL_LOGGING_IMPORT - #if __GNUC__ >= 4 - #define RCL_LOGGING_PUBLIC __attribute__ ((visibility("default"))) - #define RCL_LOGGING_LOCAL __attribute__ ((visibility("hidden"))) - #else - #define RCL_LOGGING_PUBLIC - #define RCL_LOGGING_LOCAL - #endif - #define RCL_LOGGING_PUBLIC_TYPE -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif // RCL_LOGGING_SPDLOG__VISIBILITY_CONTROL_H_ diff --git a/ThirdParty/ros/include/rcl_yaml_param_parser/parser.h b/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h similarity index 76% rename from ThirdParty/ros/include/rcl_yaml_param_parser/parser.h rename to ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h index 293e1fbf1..23cb04d06 100644 --- a/ThirdParty/ros/include/rcl_yaml_param_parser/parser.h +++ b/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h @@ -44,6 +44,32 @@ RCL_YAML_PARAM_PARSER_PUBLIC rcl_params_t * rcl_yaml_node_struct_init( const rcutils_allocator_t allocator); +/// \brief Initialize parameter structure with a capacity +/// \param[in] capacity a capacity to param structure +/// \param[in] allocator memory allocator to be used +/// \return a pointer to param structure on success or NULL on failure +RCL_YAML_PARAM_PARSER_PUBLIC +rcl_params_t * rcl_yaml_node_struct_init_with_capacity( + size_t capacity, + const rcutils_allocator_t allocator); + +/// \brief Reallocate parameter structure with a new capacity +/// \post the address of \p node_names in \p params_st might be changed +/// even if the result value is `RCL_RET_BAD_ALLOC`. +/// \param[in] params_st a parameter structure +/// \param[in] new_capacity a new capacity to param structure that must be greater than num_params +/// \param[in] allocator memory allocator to be used +/// \return `RCL_RET_OK` if the structure was reallocated successfully, or +/// \return `RCL_RET_INVALID_ARGUMENT` if params_st is NULL, or +/// allocator is invalid, or +/// new_capacity is less than num_nodes +/// \return `RCL_RET_BAD_ALLOC` if allocating memory failed. +RCL_YAML_PARAM_PARSER_PUBLIC +rcutils_ret_t rcl_yaml_node_struct_reallocate( + rcl_params_t * params_st, + size_t new_capacity, + const rcutils_allocator_t allocator); + /// \brief Copy parameter structure /// \param[in] params_st points to the parameter struct to be copied /// \return a pointer to the copied param structure on success or NULL on failure diff --git a/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h b/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h new file mode 100644 index 000000000..e0e4b5f1c --- /dev/null +++ b/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h @@ -0,0 +1,111 @@ +// Copyright 2018 Apex.AI, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef RCL_YAML_PARAM_PARSER__TYPES_H_ +#define RCL_YAML_PARAM_PARSER__TYPES_H_ + +#include "rcutils/allocator.h" +#include "rcutils/types/string_array.h" + +/// Array of bool values +/* + * \typedef rcl_bool_array_t + */ +typedef struct rcl_bool_array_s +{ + /// Array with bool values + bool * values; + /// Number of values in the array + size_t size; +} rcl_bool_array_t; + +/// Array of int64_t values +/* + * \typedef rcl_int64_array_t + */ +typedef struct rcl_int64_array_s +{ + /// Array with int64 values + int64_t * values; + /// Number of values in the array + size_t size; +} rcl_int64_array_t; + +/// Array of double values +/* + * \typedef rcl_double_array_t + */ +typedef struct rcl_double_array_s +{ + /// Array with double values + double * values; + /// Number of values in the array + size_t size; +} rcl_double_array_t; + +/// Array of byte values +/* + * \typedef rcl_byte_array_t + */ +typedef struct rcl_byte_array_s +{ + /// Array with uint8_t values + uint8_t * values; + /// Number of values in the array + size_t size; +} rcl_byte_array_t; + +/// variant_t stores the value of a parameter +/* + * Only one pointer in this struct will store the value + * \typedef rcl_variant_t + */ +typedef struct rcl_variant_s +{ + bool * bool_value; ///< If bool, gets stored here + int64_t * integer_value; ///< If integer, gets stored here + double * double_value; ///< If double, gets stored here + char * string_value; ///< If string, gets stored here + rcl_byte_array_t * byte_array_value; ///< If array of bytes + rcl_bool_array_t * bool_array_value; ///< If array of bool's + rcl_int64_array_t * integer_array_value; ///< If array of integers + rcl_double_array_t * double_array_value; ///< If array of doubles + rcutils_string_array_t * string_array_value; ///< If array of strings +} rcl_variant_t; + +/// node_params_t stores all the parameters(key:value) of a single node +/* +* \typedef rcl_node_params_t +*/ +typedef struct rcl_node_params_s +{ + char ** parameter_names; ///< Array of parameter names (keys) + rcl_variant_t * parameter_values; ///< Array of coressponding parameter values + size_t num_params; ///< Number of parameters in the node + size_t capacity_params; ///< Capacity of parameters in the node +} rcl_node_params_t; + +/// stores all the parameters of all nodes of a process +/* +* \typedef rcl_params_t +*/ +typedef struct rcl_params_s +{ + char ** node_names; ///< List of names of the node + rcl_node_params_t * params; ///< Array of parameters + size_t num_nodes; ///< Number of nodes + size_t capacity_nodes; ///< Capacity of nodes + rcutils_allocator_t allocator; ///< Allocator used +} rcl_params_t; + +#endif // RCL_YAML_PARAM_PARSER__TYPES_H_ diff --git a/ThirdParty/ros/include/rcl_yaml_param_parser/visibility_control.h b/ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcl_yaml_param_parser/visibility_control.h rename to ThirdParty/ros/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h diff --git a/ThirdParty/ros/include/rcl_yaml_param_parser/types.h b/ThirdParty/ros/include/rcl_yaml_param_parser/types.h deleted file mode 100644 index a6c6bf89d..000000000 --- a/ThirdParty/ros/include/rcl_yaml_param_parser/types.h +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2018 Apex.AI, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef RCL_YAML_PARAM_PARSER__TYPES_H_ -#define RCL_YAML_PARAM_PARSER__TYPES_H_ - -#include - -#include "rcutils/allocator.h" -#include "rcutils/types/string_array.h" - -/// Array of bool values -/* - * \typedef rcl_bool_array_t - */ -typedef struct rcl_bool_array_s -{ - /// Array with bool values - bool * values; - /// Number of values in the array - size_t size; -} rcl_bool_array_t; - -/// Array of int64_t values -/* - * \typedef rcl_int64_array_t - */ -typedef struct rcl_int64_array_s -{ - /// Array with int64 values - int64_t * values; - /// Number of values in the array - size_t size; -} rcl_int64_array_t; - -/// Array of double values -/* - * \typedef rcl_double_array_t - */ -typedef struct rcl_double_array_s -{ - /// Array with double values - double * values; - /// Number of values in the array - size_t size; -} rcl_double_array_t; - -/// Array of byte values -/* - * \typedef rcl_byte_array_t - */ -typedef struct rcl_byte_array_s -{ - /// Array with uint8_t values - uint8_t * values; - /// Number of values in the array - size_t size; -} rcl_byte_array_t; - -/// variant_t stores the value of a parameter -/* - * Only one pointer in this struct will store the value - * \typedef rcl_variant_t - */ -typedef struct rcl_variant_s -{ - bool * bool_value; ///< If bool, gets stored here - int64_t * integer_value; ///< If integer, gets stored here - double * double_value; ///< If double, gets stored here - char * string_value; ///< If string, gets stored here - rcl_byte_array_t * byte_array_value; ///< If array of bytes - rcl_bool_array_t * bool_array_value; ///< If array of bool's - rcl_int64_array_t * integer_array_value; ///< If array of integers - rcl_double_array_t * double_array_value; ///< If array of doubles - rcutils_string_array_t * string_array_value; ///< If array of strings -} rcl_variant_t; - -/// node_params_t stores all the parameters(key:value) of a single node -/* -* \typedef rcl_node_params_t -*/ -typedef struct rcl_node_params_s -{ - char ** parameter_names; ///< Array of parameter names (keys) - rcl_variant_t * parameter_values; ///< Array of coressponding parameter values - size_t num_params; ///< Number of parameters in the node -} rcl_node_params_t; - -/// stores all the parameters of all nodes of a process -/* -* \typedef rcl_params_t -*/ -typedef struct rcl_params_s -{ - char ** node_names; ///< List of names of the node - rcl_node_params_t * params; ///< Array of parameters - size_t num_nodes; ///< Number of nodes - rcutils_allocator_t allocator; ///< Allocator used -} rcl_params_t; - -#endif // RCL_YAML_PARAM_PARSER__TYPES_H_ diff --git a/ThirdParty/ros/include/rclc/action_client.h b/ThirdParty/ros/include/rclc/action_client.h new file mode 100644 index 000000000..990e0144a --- /dev/null +++ b/ThirdParty/ros/include/rclc/action_client.h @@ -0,0 +1,168 @@ +// Copyright (c) 2021 - for information on the respective copyright owner +// see the NOTICE file and/or the repository https://github.com/ros2/rclc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef RCLC__ACTION_CLIENT_H_ +#define RCLC__ACTION_CLIENT_H_ + +#if __cplusplus +extern "C" +{ +#endif + +#include +#include +#include +#include +#include "rclc/visibility_control.h" + +typedef void (* rclc_action_client_goal_callback_t)( + rclc_action_goal_handle_t * goal_handle, + bool accepted, + void * args); +typedef void (* rclc_action_client_feedback_callback_t)( + rclc_action_goal_handle_t * goal_handle, + void * ros_feedback, + void * args); +typedef void (* rclc_action_client_result_callback_t)( + rclc_action_goal_handle_t * goal_handle, + void * ros_result_response, + void * args); +typedef void (* rclc_action_client_cancel_callback_t)( + rclc_action_goal_handle_t * goal_handle, + bool cancelled, + void * args); + +typedef struct rclc_action_client_t +{ + DECLARE_GOAL_HANDLE_POOL + + rcl_action_client_t rcl_handle; + const rcl_allocator_t * allocator; + + // Callbacks + rclc_action_client_goal_callback_t goal_callback; + rclc_action_client_feedback_callback_t feedback_callback; + rclc_action_client_result_callback_t result_callback; + rclc_action_client_cancel_callback_t cancel_callback; + + // Action messages + struct Generic_FeedbackMessage * ros_feedback; + struct Generic_GetResult_Response * ros_result_response; + action_msgs__srv__CancelGoal_Response ros_cancel_response; + + // Available flags + bool feedback_available; + bool status_available; + bool goal_response_available; + bool result_response_available; + bool cancel_response_available; +} rclc_action_client_t; + +/** + * Creates an rcl action client. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[inout] action_client the action client of type rclc_action_client_t to be initialized + * \param[in] node the rcl node + * \param[in] type_support the message data type + * \param[in] action_name the name of the action + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_client_init_default( + rclc_action_client_t * action_client, + rcl_node_t * node, + const rosidl_action_type_support_t * type_support, + const char * action_name); + +/** + * Send a goal to an action server. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] action_client the action client for this action request + * \param[in] ros_request untyped ros action request + * \param[inout] goal_handle (optional) returns the goal handle used to track the goal + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_send_goal_request( + rclc_action_client_t * action_client, + void * ros_request, + rclc_action_goal_handle_t ** goal_handle); + +/** + * Send a cancel request for a goal to an action server. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] goal_handle goal handle to be cancelled + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_send_cancel_request( + rclc_action_goal_handle_t * goal_handle); + +/** + * Fini a action client and free all resources. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] action_client the action client to be finialized + * \param[in] node owner node + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_client_fini( + rclc_action_client_t * action_client, + rcl_node_t * node); + +#if __cplusplus +} +#endif + +#endif // RCLC__ACTION_CLIENT_H_ diff --git a/ThirdParty/ros/include/rclc/action_goal_handle.h b/ThirdParty/ros/include/rclc/action_goal_handle.h new file mode 100644 index 000000000..35a3576fe --- /dev/null +++ b/ThirdParty/ros/include/rclc/action_goal_handle.h @@ -0,0 +1,76 @@ +// Copyright (c) 2021 - for information on the respective copyright owner +// see the NOTICE file and/or the repository https://github.com/ros2/rclc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef RCLC__ACTION_GOAL_HANDLE_H_ +#define RCLC__ACTION_GOAL_HANDLE_H_ + +#if __cplusplus +extern "C" +{ +#endif + +#include + +struct rclc_generic_entity_t; +struct rclc_action_client_t; + +typedef struct rclc_action_goal_handle_t +{ + struct rclc_action_goal_handle_t * next; + + union { + struct rclc_action_server_t * action_server; + struct rclc_action_client_t * action_client; + }; + + rcl_action_goal_state_t status; + + unique_identifier_msgs__msg__UUID goal_id; + struct Generic_SendGoal_Request * ros_goal_request; + + bool available_goal_response; + bool goal_accepted; + bool available_feedback; + bool available_result_response; + bool available_cancel_response; + bool goal_cancelled; + + // Goal requests header + union { + rmw_request_id_t goal_request_header; + int64_t goal_request_sequence_number; + }; + + union { + rmw_request_id_t result_request_header; + int64_t result_request_sequence_number; + }; + + union { + rmw_request_id_t cancel_request_header; + int64_t cancel_request_sequence_number; + }; +} rclc_action_goal_handle_t; + +#define DECLARE_GOAL_HANDLE_POOL \ + rclc_action_goal_handle_t * goal_handles_memory; \ + size_t goal_handles_memory_size; \ + rclc_action_goal_handle_t * free_goal_handles; \ + rclc_action_goal_handle_t * used_goal_handles; + +#if __cplusplus +} +#endif + +#endif // RCLC__ACTION_GOAL_HANDLE_H_ diff --git a/ThirdParty/ros/include/rclc/action_server.h b/ThirdParty/ros/include/rclc/action_server.h new file mode 100644 index 000000000..becd56ca9 --- /dev/null +++ b/ThirdParty/ros/include/rclc/action_server.h @@ -0,0 +1,163 @@ +// Copyright (c) 2021 - for information on the respective copyright owner +// see the NOTICE file and/or the repository https://github.com/ros2/rclc. +// Copyright 2014 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef RCLC__ACTION_SERVER_H_ +#define RCLC__ACTION_SERVER_H_ + +#if __cplusplus +extern "C" +{ +#endif + +#include + +#include +#include + +#include +#include + +#define RCLC_RET_ACTION_WAIT_RESULT_REQUEST 2104 + +typedef rcl_ret_t (* rclc_action_server_handle_goal_callback_t)( + rclc_action_goal_handle_t * goal_handle, + void * args); + +typedef bool (* rclc_action_server_handle_cancel_callback_t)( + rclc_action_goal_handle_t * ros_cancel_request, + void * args); + +typedef struct rclc_action_server_t +{ + DECLARE_GOAL_HANDLE_POOL + + rcl_action_server_t rcl_handle; + const rcl_allocator_t * allocator; + + // Callbacks + rclc_action_server_handle_goal_callback_t goal_callback; + rclc_action_server_handle_cancel_callback_t cancel_callback; + + // Available flags + bool goal_request_available; + bool cancel_request_available; + bool result_request_available; + bool goal_expired_available; // TODO(acuadros95): implement expired goals + bool goal_ended; +} rclc_action_server_t; + +/** + * Creates an rcl action server. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[inout] action_server a rcl_action_server_t to be initialized + * \param[in] node the rcl node + * \param[in] support the rclc_support_t object + * \param[in] type_support the message data type + * \param[in] action_name the name of the action + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_server_init_default( + rclc_action_server_t * action_server, + rcl_node_t * node, + rclc_support_t * support, + const rosidl_action_type_support_t * type_support, + const char * action_name); + +/** + * Finish a goal with a given status and result. + * If successful, the goal_handle will be released on the next executor spin. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | No + * + * \param[inout] goal_handle goal handle to be finished + * \param[in] status goal terminal state + * \param[in] ros_response action result message + * \return `RCL_RET_OK` if successful + * \return `RCLC_RET_ACTION_WAIT_RESULT_REQUEST` if the result has not been requested yet. + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_send_result( + rclc_action_goal_handle_t * goal_handle, + rcl_action_goal_state_t status, + void * ros_response); + +/** + * Publish feedback for a goal. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[inout] goal_handle goal handle to be cancelled + * \param[in] ros_feedback feedback to be published + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_publish_feedback( + rclc_action_goal_handle_t * goal_handle, + void * ros_feedback); + +/** + * Fini a action server and free all resources. + * + * *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | No + * + * \param[in] action_server the action server to be finialized + * \param[in] node owner node + * \return `RCL_RET_OK` if successful + * \return `RCL_ERROR` (or other error code) if an error has occurred + */ +RCLC_PUBLIC +rcl_ret_t +rclc_action_server_fini( + rclc_action_server_t * action_server, + rcl_node_t * node); + +#if __cplusplus +} +#endif + +#endif // RCLC__ACTION_SERVER_H_ diff --git a/ThirdParty/ros/include/rclc/executor.h b/ThirdParty/ros/include/rclc/executor.h index 5402a72de..1f685e816 100644 --- a/ThirdParty/ros/include/rclc/executor.h +++ b/ThirdParty/ros/include/rclc/executor.h @@ -32,6 +32,9 @@ extern "C" #include "rclc/sleep.h" #include "rclc/visibility_control.h" +#include "rclc/action_client.h" +#include "rclc/action_server.h" + /*! \file executor.h \brief The RCLC-Executor provides an Executor based on RCL in which all callbacks are processed in a user-defined order. @@ -98,7 +101,15 @@ rclc_executor_get_zero_initialized_executor(void); * Therefore at initialization of the RCLC-Executor, the user defines the total \p number_of_handles. * A handle is a term for subscriptions, timers, services, clients and guard conditions. The * heap will be allocated only in this phase and no more memory will be allocated in the - * running phase in the executor. However, the heap memory of corresponding wait-set is + * running phase in the executor. + * + * Also in the XRCE-DDS middleware the maximum number are configured. See [Memory Management Tutorial](https://docs.vulcanexus.org/en/humble/rst/tutorials/micro/memory_management/memory_management.html#entity-creation) + * for the default values. If you need larger values, you need to update your colcon.meta + * configuration file and rebuild. To make sure that the changes were applied, you can check + * the defined values in the following library include file: + * build/rmw_microxrcedds/include/rmw_microxrcedds_c/config.h + * + * The heap memory of corresponding wait-set is * allocated in the first iteration of a spin-method, which calls internally rclc_executor_prepare. * Optionally, you can also call rclc_executor_prepare before calling any of the spin-methods. * Then all wait-set related memory allocation will be done in rclc_executor_prepare and not @@ -389,6 +400,85 @@ rclc_executor_add_service( void * response_msg, rclc_service_callback_t callback); +/** + * Adds a action client to an executor. + * An error is returned if {@link rclc_executor_t.handles} array is full. + * The total number_of_action_clients field of {@link rclc_executor_t.info} + * is incremented by one. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param [inout] executor pointer to initialized executor + * \param [in] action_client pointer to a allocated and initialized action client + * \param [in] handles_number max number of goals to handle with the client + * \param [in] ros_result_response type-erased ptr to an allocated ROS result message + * \param [in] ros_feedback type-erased ptr to an allocated ROS feedback message + * \param [in] goal_callback function pointer to a goal callback + * \param [in] feedback_callback function pointer to a feedback callback + * \param [in] result_callback function pointer to a result callback + * \param [in] cancel_callback function pointer to a result cancel callback + * \param [in] context context to pass to the callback functions + * \return `RCL_RET_OK` if add-operation was successful + * \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer + * \return `RCL_RET_ERROR` if any other error occured + */ +rcl_ret_t +rclc_executor_add_action_client( + rclc_executor_t * executor, + rclc_action_client_t * action_client, + size_t handles_number, + void * ros_result_response, + void * ros_feedback, + rclc_action_client_goal_callback_t goal_callback, + rclc_action_client_feedback_callback_t feedback_callback, + rclc_action_client_result_callback_t result_callback, + rclc_action_client_cancel_callback_t cancel_callback, + void * context); + +/** + * Adds a action server to an executor. + * * An error is returned if {@link rclc_executor_t.handles} array is full. + * * The total number_of_action_servers field of {@link rclc_executor_t.info} + * is incremented by one. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param [inout] executor pointer to initialized executor + * \param [in] action_server pointer to a allocated and initialized action server + * \param [in] handles_number max number of goals to handle with the server + * \param [in] ros_goal_request type-erased ptr to an allocated ROS goal request message + * \param [in] ros_goal_request_size size of the ROS goal request message type + * \param [in] goal_callback function pointer to a goal request callback + * \param [in] cancel_callback function pointer to a cancel request callback + * \param [in] context context to pass to the callback functions + * \return `RCL_RET_OK` if add-operation was successful + * \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer + * \return `RCL_RET_ERROR` if any other error occured + */ + +rcl_ret_t +rclc_executor_add_action_server( + rclc_executor_t * executor, + rclc_action_server_t * action_server, + size_t handles_number, + void * ros_goal_request, + size_t ros_goal_request_size, + rclc_action_server_handle_goal_callback_t goal_callback, + rclc_action_server_handle_cancel_callback_t cancel_callback, + void * context); + /** * Adds a service to an executor. * * An error is returned if {@link rclc_executor_t.handles} array is full. diff --git a/ThirdParty/ros/include/rclc/executor_handle.h b/ThirdParty/ros/include/rclc/executor_handle.h index 4423fcac4..444a4ffde 100644 --- a/ThirdParty/ros/include/rclc/executor_handle.h +++ b/ThirdParty/ros/include/rclc/executor_handle.h @@ -24,6 +24,9 @@ extern "C" #include #include +#include +#include + /// TODO (jst3si) Where is this defined? - in my build environment this variable is not set. // #define ROS_PACKAGE_NAME "rclc" @@ -40,6 +43,8 @@ typedef enum RCLC_SERVICE, RCLC_SERVICE_WITH_REQUEST_ID, RCLC_SERVICE_WITH_CONTEXT, + RCLC_ACTION_CLIENT, + RCLC_ACTION_SERVER, RCLC_GUARD_CONDITION, // RCLC_GUARD_CONDITION_WITH_CONTEXT, //TODO RCLC_NONE @@ -110,6 +115,8 @@ typedef struct rcl_client_t * client; rcl_service_t * service; rcl_guard_condition_t * gc; + rclc_action_client_t * action_client; + rclc_action_server_t * action_server; }; /// Storage of data, which holds the message of a subscription, service, etc. /// subscription: ptr to message @@ -171,6 +178,10 @@ typedef struct size_t number_of_clients; /// Total number of services size_t number_of_services; + /// Total number of action clients + size_t number_of_action_clients; + /// Total number of action servers + size_t number_of_action_servers; /// Total number of guard conditions size_t number_of_guard_conditions; /// Total number of events diff --git a/ThirdParty/ros/include/rclc/rclc.h b/ThirdParty/ros/include/rclc/rclc.h index 40d4bdbdb..97896c998 100644 --- a/ThirdParty/ros/include/rclc/rclc.h +++ b/ThirdParty/ros/include/rclc/rclc.h @@ -32,6 +32,8 @@ extern "C" #include "rclc/timer.h" #include "rclc/client.h" #include "rclc/service.h" +#include "rclc/action_client.h" +#include "rclc/action_server.h" #include "rclc/types.h" #include "rclc/visibility_control.h" #if __cplusplus diff --git a/ThirdParty/ros/include/rclc/types.h b/ThirdParty/ros/include/rclc/types.h index 5db299da9..dc2cb7f78 100644 --- a/ThirdParty/ros/include/rclc/types.h +++ b/ThirdParty/ros/include/rclc/types.h @@ -22,14 +22,12 @@ extern "C" { #endif -#include #include #include #include typedef struct { - rcl_init_options_t init_options; rcl_context_t context; rcl_allocator_t * allocator; rcl_clock_t clock; diff --git a/ThirdParty/ros/include/rcppmath/clamp.hpp b/ThirdParty/ros/include/rcppmath/clamp.hpp deleted file mode 100644 index a25067c0e..000000000 --- a/ThirdParty/ros/include/rcppmath/clamp.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2020 PAL Robotics S.L. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! \file clamp.hpp - * \brief Restrict a value between two bounds - */ - -#ifndef RCPPMATH__CLAMP_HPP_ -#define RCPPMATH__CLAMP_HPP_ - -#include - -namespace rcppmath -{ -/// If v compares less than lo, returns lo; otherwise if hi compares less -// than v, returns hi; otherwise returns v. Uses operator< to compare the values -/** - * \param[in] v the value to clamp - * \param[in] lo the lower boundary - * \param[in] hi the higher boundary - * \return Reference to lo if v is less than lo, reference to hi if hi is less than v, otherwise - * reference to v. - * \note Implementation from https://en.cppreference.com/w/cpp/algorithm/clamp - * \warning Capturing the result of clamp by reference if one of the parameters is rvalue produces - * a dangling reference if that parameter is returned - **/ -template -constexpr const T & clamp(const T & v, const T & lo, const T & hi) -{ - assert(!(hi < lo) ); - return (v < lo) ? lo : (hi < v) ? hi : v; -} - -/// Like the function above, but uses comp to compare the values. -/** - * \param[in] comp Comparison object that returns true if the first argument is - * less than the second - **/ -template -constexpr const T & clamp(const T & v, const T & lo, const T & hi, Compare comp) -{ - assert(!comp(hi, lo) ); - return comp(v, lo) ? lo : comp(hi, v) ? hi : v; -} - -} // namespace rcppmath - -#endif // RCPPMATH__CLAMP_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/filesystem_helper.hpp b/ThirdParty/ros/include/rcpputils/filesystem_helper.hpp deleted file mode 100644 index 51df262b4..000000000 --- a/ThirdParty/ros/include/rcpputils/filesystem_helper.hpp +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright (c) 2019, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holders nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -// This file is originally from: -// https://github.com/ros/pluginlib/blob/1a4de29fa55173e9b897ca8ff57ebc88c047e0b3/pluginlib/include/pluginlib/impl/filesystem_helper.hpp - -/*! \file filesystem_helper.hpp - * \brief Cross-platform filesystem helper functions and additional emulation of [std::filesystem](https://en.cppreference.com/w/cpp/filesystem). - * - * If std::filesystem is not available the necessary functions are emulated. - * Note: Once std::filesystem is supported on all ROS2 platforms, this class - * can be deprecated in favor of the built-in functionality. - */ - -#ifndef RCPPUTILS__FILESYSTEM_HELPER_HPP_ -#define RCPPUTILS__FILESYSTEM_HELPER_HPP_ - -#include -#include - -#include -#include -#include -#include -#include - -/** - * \def RCPPUTILS_IMPL_OS_DIRSEP - * - * A definition for this platforms string path separator - */ - -#ifdef _WIN32 -# define RCPPUTILS_IMPL_OS_DIRSEP '\\' -#else -# define RCPPUTILS_IMPL_OS_DIRSEP '/' -#endif - -#ifdef _WIN32 -# include -# include -# include -# include -# define access _access_s -#else -# include -# include -# include -#endif - -#include "rcpputils/split.hpp" - -namespace rcpputils -{ -namespace fs -{ - -static constexpr const char kPreferredSeparator = RCPPUTILS_IMPL_OS_DIRSEP; - -/** - * \brief Drop-in replacement for [std::filesystem::path](https://en.cppreference.com/w/cpp/filesystem/path). - * - * It must conform to the same standard described and cannot include methods that are not - * incorporated there. - */ -class path -{ -public: - /** - * \brief Constructs an empty path. - */ - path() - : path("") - {} - - /** - * \brief Conversion constructor from a std::string path. - * - * \param p A string path split by the platform's string path separator. - */ - path(const std::string & p) // NOLINT(runtime/explicit): this is a conversion constructor - : path_(p), path_as_vector_(split(p, kPreferredSeparator)) - { - std::replace(path_.begin(), path_.end(), '\\', kPreferredSeparator); - std::replace(path_.begin(), path_.end(), '/', kPreferredSeparator); - } - - /** - * \brief Copy constructor. - */ - path(const path & p) = default; - - /** - * \brief Get the path delimited using this system's path separator. - * - * \return The path as a string - */ - std::string string() const - { - return path_; - } - - /** - * \brief Check if this path exists. - * - * \return True if the path exists, false otherwise. - */ - bool exists() const - { - return access(path_.c_str(), 0) == 0; - } - - /** - * \brief Check if the path exists and it is a directory. - * - * \return True if the path is an existing directory, false otherwise. - */ - bool is_directory() const noexcept - { - struct stat stat_buffer; - const auto rc = stat(path_.c_str(), &stat_buffer); - - if (rc != 0) { - return false; - } - -#ifdef _WIN32 - return (stat_buffer.st_mode & S_IFDIR) == S_IFDIR; -#else - return S_ISDIR(stat_buffer.st_mode); -#endif - } - - /** - * \brief Check if the path is a regular file. - * - * \return True if the file is an existing regular file, false otherwise. - */ - bool is_regular_file() const noexcept - { - struct stat stat_buffer; - const auto rc = stat(path_.c_str(), &stat_buffer); - - if (rc != 0) { - return false; - } - -#ifdef _WIN32 - return (stat_buffer.st_mode & S_IFREG) == S_IFREG; -#else - return S_ISREG(stat_buffer.st_mode); -#endif - } - - /** - * \brief Return the size of the file in bytes. - * - * \return size of file in bytes - * \throws std::system_error - */ - uint64_t file_size() const - { - if (is_directory()) { - auto ec = std::make_error_code(std::errc::is_a_directory); - throw std::system_error{ec, "cannot get file size"}; - } - - struct stat stat_buffer; - const auto rc = stat(path_.c_str(), &stat_buffer); - - if (rc != 0) { - std::error_code ec{errno, std::system_category()}; - errno = 0; - throw std::system_error{ec, "cannot get file size"}; - } else { - return static_cast(stat_buffer.st_size); - } - } - - /** - * \brief Check if the path is empty. - * - * \return True if the path is empty, false otherwise. - */ - bool empty() const - { - return path_.empty(); - } - - /** - * \brief Check if the path is an absolute path. - * - * \return True if the path is absolute, false otherwise. - */ - bool is_absolute() const - { - return path_.size() > 0 && - (path_.compare(0, 1, std::string(1, kPreferredSeparator)) == 0 || - this->is_absolute_with_drive_letter()); - } - - /** - * \brief Const iterator to first element of this path. - * - * \return A const iterator to the first element. - */ - std::vector::const_iterator cbegin() const - { - return path_as_vector_.cbegin(); - } - - /** - * Const iterator to one past the last element of this path. - * - * return A const iterator to one past the last element of the path. - */ - std::vector::const_iterator cend() const - { - return path_as_vector_.cend(); - } - - /** - * \brief Get the parent directory of this path. - * - * \return A path to the parent directory. - */ - path parent_path() const - { - // Edge case: empty path - if (this->empty()) { - return path(""); - } - - // Edge case: if path only consists of one part, then return '.' or '/' - // depending if the path is absolute or not - if (1u == path_as_vector_.size()) { - if (this->is_absolute()) { - // Windows is tricky, since an absolute path may start with 'C:\\' or '\\' - if (this->is_absolute_with_drive_letter()) { - return path(path_as_vector_[0] + kPreferredSeparator); - } - return path(std::string(1, kPreferredSeparator)); - } - return path("."); - } - - // Edge case: with a path 'C:\\foo' we want to return 'C:\\' not 'C:' - // Don't drop the root directory from an absolute path on Windows starting with a letter drive - if (2u == path_as_vector_.size() && this->is_absolute_with_drive_letter()) { - return path(path_as_vector_[0] + kPreferredSeparator); - } - - path parent; - for (auto it = this->cbegin(); it != --this->cend(); ++it) { - if (!parent.empty() || it->empty()) { - parent /= *it; - } else { - parent = *it; - } - } - return parent; - } - - /** - * \brief Get the last element in this path. - * - * If this path points to a directory, it will return the directory name. - * - * \return The last element in this path - */ - path filename() const - { - return path_.empty() ? path() : *--this->cend(); - } - - /** - * \brief Get a relative path to the component including and following the last '.'. - * - * \return The string extension - */ - path extension() const - { - const char * delimiter = "."; - auto split_fname = split(this->string(), *delimiter); - return split_fname.size() == 1 ? path("") : path("." + split_fname.back()); - } - - /** - * \brief Concatenate a path and a string into a single path. - * - * \param other the string compnoent to concatenate - * \return The combined path of this and other. - */ - path operator/(const std::string & other) - { - return this->operator/(path(other)); - } - - /** - * \brief Append a string component to this path. - * - * \param other the string component to append - * \return *this - */ - path & operator/=(const std::string & other) - { - this->operator/=(path(other)); - return *this; - } - - /** - * \brief Concatenate two paths together. - * - * \param other the path to append - * \return The combined path. - */ - path operator/(const path & other) - { - return path(*this).operator/=(other); - } - - /** - * \brief Append a string component to this path. - * - * \param other the string component to append - * \return *this - */ - path & operator/=(const path & other) - { - if (other.is_absolute()) { - this->path_ = other.path_; - this->path_as_vector_ = other.path_as_vector_; - } else { - this->path_ += kPreferredSeparator + other.string(); - this->path_as_vector_.insert( - std::end(this->path_as_vector_), - std::begin(other.path_as_vector_), std::end(other.path_as_vector_)); - } - return *this; - } - -private: - /// Returns true if the path is an absolute path with a drive letter on Windows - bool is_absolute_with_drive_letter() const - { -#ifdef _WIN32 - if (path_.empty()) { - return false; - } - return 0 == path_.compare(1, 2, ":\\"); -#else - return false; // only Windows contains absolute paths starting with drive letters -#endif - } - - std::string path_; - std::vector path_as_vector_; -}; - -/** - * \brief Check if the path is a regular file. - * - * \param p The path to check - * \return True if the path exists, false otherwise. - */ -inline bool is_regular_file(const path & p) noexcept -{ - return p.is_regular_file(); -} - -/** - * \brief Check if the path is a directory. - * - * \param p The path to check - * \return True if the path is an existing directory, false otherwise. - */ -inline bool is_directory(const path & p) noexcept -{ - return p.is_directory(); -} - -/** - * \brief Get the file size of the path. - * - * \param p The path to get the file size of. - * \return The file size in bytes. - * - * \throws std::sytem_error - */ -inline uint64_t file_size(const path & p) -{ - return p.file_size(); -} - -/** - * \brief Check if a path exists. - * - * \param path_to_check The path to check. - * \return True if the path exists, false otherwise. - */ -inline bool exists(const path & path_to_check) -{ - return path_to_check.exists(); -} - - -/** - * \brief Get a path to a location in the temporary directory, if it's available. - * - * \return A path to a directory for storing temporary files and directories. - */ -inline path temp_directory_path() -{ -#ifdef _WIN32 -#ifdef UNICODE -#error "rcpputils::fs does not support Unicode paths" -#endif - TCHAR temp_path[MAX_PATH]; - DWORD size = GetTempPathA(MAX_PATH, temp_path); - if (size > MAX_PATH || size == 0) { - std::error_code ec(static_cast(GetLastError()), std::system_category()); - throw std::system_error(ec, "cannot get temporary directory path"); - } - temp_path[size] = '\0'; -#else - const char * temp_path = getenv("TMPDIR"); - if (!temp_path) { - temp_path = "/tmp"; - } -#endif - return path(temp_path); -} - -/** - * \brief Return current working directory. - * - * \return The current working directory. - * - * \throws std::system_error - */ -inline path current_path() -{ -#ifdef _WIN32 -#ifdef UNICODE -#error "rcpputils::fs does not support Unicode paths" -#endif - char cwd[MAX_PATH]; - if (nullptr == _getcwd(cwd, MAX_PATH)) { -#else - char cwd[PATH_MAX]; - if (nullptr == getcwd(cwd, PATH_MAX)) { -#endif - std::error_code ec{errno, std::system_category()}; - errno = 0; - throw std::system_error{ec, "cannot get current working directory"}; - } - - return path(cwd); -} - -/** - * \brief Create a directory with the given path p. - * - * This builds directories recursively and will skip directories if they are already created. - * \return Return true if the directory is created, false otherwise. - */ -inline bool create_directories(const path & p) -{ - path p_built; - int status = 0; - - for (auto it = p.cbegin(); it != p.cend() && status == 0; ++it) { - if (!p_built.empty() || it->empty()) { - p_built /= *it; - } else { - p_built = *it; - } - if (!p_built.exists()) { -#ifdef _WIN32 - status = _mkdir(p_built.string().c_str()); -#else - status = mkdir(p_built.string().c_str(), S_IRWXU | S_IRWXG | S_IRWXO); -#endif - } - } - return status == 0; -} - -/** - * \brief Remove the file or directory at the path p. - * - * \param p The path of the object to remove. - * \return true if the file exists and it was successfully removed, false otherwise. - */ -inline bool remove(const path & p) -{ -#ifdef _WIN32 - struct _stat s; - if (_stat(p.string().c_str(), &s) == 0) { - if (s.st_mode & S_IFDIR) { - return _rmdir(p.string().c_str()) == 0; - } - if (s.st_mode & S_IFREG) { - return ::remove(p.string().c_str()) == 0; - } - } - return false; -#else - return ::remove(p.string().c_str()) == 0; -#endif -} - -/** - * \brief Remove the directory at the path p and its content. - * - * Additionally to \sa remove, remove_all removes a directory and its containing files. - * - * \param The path of the directory to remove. - * \return true if the directory exists and it was successfully removed, false otherwise. - */ -inline bool remove_all(const path & p) -{ - if (!is_directory(p)) {return remove(p);} - -#ifdef _WIN32 - // We need a string of type PCZZTSTR, which is a double null terminated char ptr - size_t length = p.string().size(); - TCHAR * temp_dir = new TCHAR[length + 2]; - memcpy(temp_dir, p.string().c_str(), length); - temp_dir[length] = '\0'; - temp_dir[length + 1] = '\0'; // double null terminated - - SHFILEOPSTRUCT file_options; - file_options.hwnd = nullptr; - file_options.wFunc = FO_DELETE; // delete (recursively) - file_options.pFrom = temp_dir; - file_options.pTo = nullptr; - file_options.fFlags = FOF_NOCONFIRMATION | FOF_SILENT; // do not prompt user - file_options.fAnyOperationsAborted = FALSE; - file_options.lpszProgressTitle = nullptr; - file_options.hNameMappings = nullptr; - - auto ret = SHFileOperation(&file_options); - delete[] temp_dir; - - return 0 == ret && false == file_options.fAnyOperationsAborted; -#else - DIR * dir = opendir(p.string().c_str()); - struct dirent * directory_entry; - while ((directory_entry = readdir(dir)) != nullptr) { - // Make sure to not call ".." or "." entries in directory (might delete everything) - if (strcmp(directory_entry->d_name, ".") != 0 && strcmp(directory_entry->d_name, "..") != 0) { - auto sub_path = rcpputils::fs::path(p) / directory_entry->d_name; - // if directory, call recursively - if (sub_path.is_directory() && !remove_all(sub_path)) { - return false; - // if not, call regular remove - } else if (!remove(sub_path)) { - return false; - } - } - } - closedir(dir); - // directory is empty now, call remove - remove(p); - return !rcpputils::fs::exists(p); -#endif -} - -/** - * \brief Remove extension(s) from a path. - * - * An extension is defined as text starting from the end of a path to the first period (.) character. - * - * \param file_path The file path string. - * \param n_times The number of extensions to remove if there are multiple extensions. - * \return The path object. - */ -inline path remove_extension(const path & file_path, int n_times = 1) -{ - path new_path(file_path); - for (int i = 0; i < n_times; i++) { - const auto new_path_str = new_path.string(); - const auto last_dot = new_path_str.find_last_of('.'); - if (last_dot == std::string::npos) { - return new_path; - } - new_path = path(new_path_str.substr(0, last_dot)); - } - return new_path; -} - -#undef RCPPUTILS_IMPL_OS_DIRSEP - -/** -* \brief Convert the path to a string for ostream usage, such as in logging or string formatting. -* -* \param os The stream to send the path string to -* \param p The path to stringify -* \return The ostream, for chaining -*/ -inline std::ostream & operator<<(std::ostream & os, const path & p) -{ - os << p.string(); - return os; -} - -} // namespace fs -} // namespace rcpputils - -#endif // RCPPUTILS__FILESYSTEM_HELPER_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/find_library.hpp b/ThirdParty/ros/include/rcpputils/find_library.hpp deleted file mode 100644 index e1a26c765..000000000 --- a/ThirdParty/ros/include/rcpputils/find_library.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*! \file find_library.hpp - * \brief Find library located in OS's library paths environment variable. - */ - -#ifndef RCPPUTILS__FIND_LIBRARY_HPP_ -#define RCPPUTILS__FIND_LIBRARY_HPP_ - -#include -#include - -#include "rcpputils/visibility_control.hpp" - -namespace rcpputils -{ - -/// Find a library located in the OS's specified environment variable for library paths. -/** - * - * The environment variable and file format per platform: - * * Linux: `${LD_LIBRARY_PATH}`, `lib{}.so` - * * Apple: `${DYLD_LIBRARY_PATH}`, `lib{}.dyld` - * * Windows: `%PATH%`, `{}.dll` - * - * \param[in] library_name Name of the library to find. - * \return The absolute filesystem path, including the appropriate prefix and extension - * \throws std::runtime_error if an error is encountered when accessing environment variables. - */ -RCPPUTILS_PUBLIC -std::string find_library_path(const std::string & library_name); - -} // namespace rcpputils - -#endif // RCPPUTILS__FIND_LIBRARY_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/get_env.hpp b/ThirdParty/ros/include/rcpputils/get_env.hpp deleted file mode 100644 index 341455e7b..000000000 --- a/ThirdParty/ros/include/rcpputils/get_env.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2020, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holders nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef RCPPUTILS__GET_ENV_HPP_ -#define RCPPUTILS__GET_ENV_HPP_ - -#include "rcutils/get_env.h" - -#include -#include - -#include "rcpputils/visibility_control.hpp" - -namespace rcpputils -{ - -/// Retrieve the value of the given environment variable if it exists, or "". -/* - * \param[in] env_var the name of the environment variable - * \return The value of the environment variable if it exists, or "". - * \throws std::runtime_error on error - */ -std::string get_env_var(const char * env_var) -{ - const char * value{}; - const char * err = rcutils_get_env(env_var, &value); - if (err) { - throw std::runtime_error(err); - } - return value ? value : ""; -} - -} // namespace rcpputils - -#endif // RCPPUTILS__GET_ENV_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcppmath/clamp.hpp b/ThirdParty/ros/include/rcpputils/rcppmath/clamp.hpp new file mode 100644 index 000000000..fa33c7e06 --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcppmath/clamp.hpp @@ -0,0 +1,69 @@ +// Copyright 2020 PAL Robotics S.L. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! \file clamp.hpp + * \brief Restrict a value between two bounds. + */ + +#ifndef RCPPMATH__CLAMP_HPP_ +#define RCPPMATH__CLAMP_HPP_ + +#include + +namespace rcppmath +{ +/** + * If v compares less than lo, returns lo; otherwise if hi compares less + * than v, returns hi; otherwise returns v. Uses operator< to compare the values. + * + * \param[in] v The value to clamp. + * \param[in] lo The lower boundary. + * \param[in] hi The higher boundary. + * \return Reference to lo if v is less than lo, reference to hi if hi is less than v, otherwise + * reference to v. + * \note Implementation from https://en.cppreference.com/w/cpp/algorithm/clamp. + * \warning Capturing the result of clamp by reference if one of the parameters is rvalue produces + * a dangling reference if that parameter is returned. + */ +template +constexpr const T & clamp(const T & v, const T & lo, const T & hi) +{ + assert(!(hi < lo) ); + return (v < lo) ? lo : (hi < v) ? hi : v; +} + +/** + * Performs clamping with a provided Comparison object (comp). + * + * \param[in] v The value to clamp. + * \param[in] lo The lower boundary. + * \param[in] hi The higher boundary. + * \param[in] comp Comparison object that returns true if the first argument is + * less than the second. + * \return Reference to lo if v is less than lo, reference to hi if hi is less than v, otherwise + * reference to v. "Less than" semantics determined by Comparison object. + * \warning Capturing the result of clamp by reference if one of the parameters is rvalue produces + * a dangling reference if that parameter is returned. + * \sa rcppmath::clamp(const T&, const T&, const T&) + */ +template +constexpr const T & clamp(const T & v, const T & lo, const T & hi, Compare comp) +{ + assert(!comp(hi, lo) ); + return comp(v, lo) ? lo : comp(hi, v) ? hi : v; +} + +} // namespace rcppmath + +#endif // RCPPMATH__CLAMP_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcppmath/rolling_mean_accumulator.hpp b/ThirdParty/ros/include/rcpputils/rcppmath/rolling_mean_accumulator.hpp new file mode 100644 index 000000000..b2a6cd9ea --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcppmath/rolling_mean_accumulator.hpp @@ -0,0 +1,84 @@ +// Copyright 2020 PAL Robotics S.L. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* + * Author: Víctor López + */ + +#ifndef RCPPMATH__ROLLING_MEAN_ACCUMULATOR_HPP_ +#define RCPPMATH__ROLLING_MEAN_ACCUMULATOR_HPP_ + +#include +#include +#include + +namespace rcppmath +{ + +/** + * \brief Computes the mean of the last accumulated elements. + * + * This is a simplified version of boost's rolling mean accumulator, + * written to avoid dragging in boost dependencies. + */ +template +class RollingMeanAccumulator +{ +public: + /** + * Constructs the rolling mean accumulator with a specified window size. + * + * \param[in] rolling_window_size The unsigned integral length of the accumulator's window length. + */ + explicit RollingMeanAccumulator(size_t rolling_window_size) + : buffer_(rolling_window_size, 0.0), next_insert_(0), + sum_(0.0), buffer_filled_(false) + { + } + + /** + * Collects the provided value in the accumulator's buffer. + * + * \param[in] val The value to accumulate. + */ + void accumulate(T val) + { + sum_ -= buffer_[next_insert_]; + sum_ += val; + buffer_[next_insert_] = val; + next_insert_++; + buffer_filled_ |= next_insert_ >= buffer_.size(); + next_insert_ = next_insert_ % buffer_.size(); + } + + /** + * Calculates the rolling mean accumulated insofar. + * + * \return Rolling mean of the accumulated values. + */ + T getRollingMean() const + { + size_t valid_data_count = buffer_filled_ * buffer_.size() + !buffer_filled_ * next_insert_; + assert(valid_data_count > 0); + return sum_ / valid_data_count; + } + +private: + std::vector buffer_; + size_t next_insert_; + T sum_; + bool buffer_filled_; +}; +} // namespace rcppmath +#endif // RCPPMATH__ROLLING_MEAN_ACCUMULATOR_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/asserts.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/asserts.hpp similarity index 83% rename from ThirdParty/ros/include/rcpputils/asserts.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/asserts.hpp index dceb55f1a..09ce97fba 100644 --- a/ThirdParty/ros/include/rcpputils/asserts.hpp +++ b/ThirdParty/ros/include/rcpputils/rcpputils/asserts.hpp @@ -48,7 +48,7 @@ class RCPPUTILS_PUBLIC AssertionException : public std::exception /** * \brief Constructor for AssertionException * - * \param msg The message to display when this exception is thrown. + * \param[in] msg The message to display when this exception is thrown. */ explicit AssertionException(const char * msg); @@ -57,7 +57,7 @@ class RCPPUTILS_PUBLIC AssertionException : public std::exception * * \return The string message */ - virtual const char * what() const throw(); + virtual const char * what() const noexcept; }; /** @@ -72,7 +72,7 @@ class RCPPUTILS_PUBLIC IllegalStateException : public std::exception /** * \brief Constructor for IllegalStateException * - * \param msg The message to display when this exception is thrown. + * \param[in] msg The message to display when this exception is thrown. */ explicit IllegalStateException(const char * msg); @@ -82,14 +82,14 @@ class RCPPUTILS_PUBLIC IllegalStateException : public std::exception * * \return The string message */ - virtual const char * what() const throw(); + virtual const char * what() const noexcept; }; /** * \brief Check that an argument condition passes. * - * \param condition condition that is asserted to be true - * \param msg message to pass to exception when condition is false + * \param[in] condition condition that is asserted to be true + * \param[in] msg message to pass to exception when condition is false * \throw std::invalid_argument if the condition is not met. */ inline void require_true(bool condition, const std::string & msg = "invalid argument passed") @@ -102,8 +102,8 @@ inline void require_true(bool condition, const std::string & msg = "invalid argu /** * \brief Check that a state condition passes. * - * \param condition condition to check whether it is true or not - * \param msg message to pass to exception when condition is false + * \param[in] condition condition to check whether it is true or not + * \param[in] msg message to pass to exception when condition is false * \throw rcpputils::IllegalStateException if the condition is not met. */ inline void check_true(bool condition, const std::string & msg = "check reported invalid state") @@ -119,8 +119,8 @@ inline void check_true(bool condition, const std::string & msg = "check reported * This function behaves similar to assert, except that it throws instead of invoking abort(). * It is only enabled when NDEBUG is not defined * - * \param condition condition to check whether it's true or not - * \param msg message to pass to exception when condition is not met. + * \param[in] condition condition to check whether it's true or not + * \param[in] msg message to pass to exception when condition is not met. * \throw rcpputils::AssertionException if the macro NDEBUG is not set and the condition is not met. */ inline void assert_true(bool condition, const std::string & msg = "assertion failed") diff --git a/ThirdParty/ros/include/rcpputils/endian.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/endian.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/endian.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/endian.hpp diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/env.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/env.hpp new file mode 100644 index 000000000..032ee84b6 --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/env.hpp @@ -0,0 +1,63 @@ +// Copyright (c) 2020, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#ifndef RCPPUTILS__ENV_HPP_ +#define RCPPUTILS__ENV_HPP_ + +#include + +#include "rcpputils/visibility_control.hpp" + +namespace rcpputils +{ + +/// Retrieve the value of the given environment variable if it exists, or "". +/* + * \param[in] env_var the name of the environment variable + * \return The value of the environment variable if it exists, or "". + * \throws std::runtime_error on error + */ +RCPPUTILS_PUBLIC +std::string get_env_var(const char * env_var); + +/// Set/un-set a process-scoped environment variable. +/* + * \param[in] env_var The name of the environment variable. + * \param[in] env_value Value to set the environment variable to, or `NULL` + * to un-set. + * \return Boolean representing whether the operation was successful. + * \throws std::runtime_error if env_name is invalid/NULL, or if setting + * the environment variable fails. + * + */ +RCPPUTILS_PUBLIC +bool set_env_var(const char * env_var, const char * env_value); + +} // namespace rcpputils + +#endif // RCPPUTILS__ENV_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/filesystem_helper.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/filesystem_helper.hpp new file mode 100644 index 000000000..9fd1090df --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/filesystem_helper.hpp @@ -0,0 +1,357 @@ +// Copyright (c) 2019, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally from: +// https://github.com/ros/pluginlib/blob/1a4de29fa55173e9b897ca8ff57ebc88c047e0b3/pluginlib/include/pluginlib/impl/filesystem_helper.hpp + +/*! \file filesystem_helper.hpp + * \brief Cross-platform filesystem helper functions and additional emulation of [std::filesystem](https://en.cppreference.com/w/cpp/filesystem). + * + * Note: Once std::filesystem is supported on all ROS2 platforms, this class + * can be deprecated/removed in favor of the built-in functionality. + */ + +#ifndef RCPPUTILS__FILESYSTEM_HELPER_HPP_ +#define RCPPUTILS__FILESYSTEM_HELPER_HPP_ + +#include +#include + +#include "rcpputils/visibility_control.hpp" + +namespace rcpputils +{ +namespace fs +{ + +#ifdef _WIN32 +# define RCPPUTILS_IMPL_OS_DIRSEP '\\' +#else +# define RCPPUTILS_IMPL_OS_DIRSEP '/' +#endif + +/** + * \def kPreferredSeparator + * + * A definition for this platforms string path separator + */ +static constexpr const char kPreferredSeparator = RCPPUTILS_IMPL_OS_DIRSEP; + +#undef RCPPUTILS_IMPL_OS_DIRSEP + + +/** + * \brief Drop-in replacement for [std::filesystem::path](https://en.cppreference.com/w/cpp/filesystem/path). + * + * It must conform to the same standard described and cannot include methods that are not + * incorporated there. + */ +class path +{ +public: + /** + * \brief Constructs an empty path. + */ + RCPPUTILS_PUBLIC + path() = default; + + /** + * \brief Conversion constructor from a std::string path. + * + * \param[in] p A string path split by the platform's string path separator. + */ + RCPPUTILS_PUBLIC + path(const std::string & p); // NOLINT(runtime/explicit): this is a conversion constructor + + /** + * \brief Copy constructor. + */ + RCPPUTILS_PUBLIC path(const path & p) = default; + + /** + * \brief Copy assignment operator. + * + * \return Reference to the copied path. + */ + RCPPUTILS_PUBLIC path & operator=(const path &) = default; + + /** + * \brief Get the path delimited using this system's path separator. + * + * \return The path as a string + */ + RCPPUTILS_PUBLIC std::string string() const; + + /** + * \brief Check if this path exists. + * + * \return True if the path exists, false otherwise. + */ + RCPPUTILS_PUBLIC bool exists() const; + + /** + * \brief Check if the path exists and it is a directory. + * + * \return True if the path is an existing directory, false otherwise. + */ + RCPPUTILS_PUBLIC bool is_directory() const noexcept; + + /** + * \brief Check if the path is a regular file. + * + * \return True if the file is an existing regular file, false otherwise. + */ + RCPPUTILS_PUBLIC bool is_regular_file() const noexcept; + + /** + * \brief Return the size of the file in bytes. + * + * \return size of file in bytes + * \throws std::system_error + */ + RCPPUTILS_PUBLIC uint64_t file_size() const; + + /** + * \brief Check if the path is empty. + * + * \return True if the path is empty, false otherwise. + */ + RCPPUTILS_PUBLIC bool empty() const; + + /** + * \brief Check if the path is an absolute path. + * + * \return True if the path is absolute, false otherwise. + */ + RCPPUTILS_PUBLIC bool is_absolute() const; + + /** + * \brief Const iterator to first element of this path. + * + * \return A const iterator to the first element. + */ + RCPPUTILS_PUBLIC std::vector::const_iterator cbegin() const; + + /** + * Const iterator to one past the last element of this path. + * + * return A const iterator to one past the last element of the path. + */ + RCPPUTILS_PUBLIC std::vector::const_iterator cend() const; + + /** + * \brief Get the parent directory of this path. + * + * \return A path to the parent directory. + */ + RCPPUTILS_PUBLIC path parent_path() const; + + /** + * \brief Get the last element in this path. + * + * If this path points to a directory, it will return the directory name. + * + * \return The last element in this path + */ + RCPPUTILS_PUBLIC path filename() const; + + /** + * \brief Get a relative path to the component including and following the last '.'. + * + * \return The string extension + */ + RCPPUTILS_PUBLIC path extension() const; + + /** + * \brief Concatenate a path and a string into a single path. + * + * \param[in] other the string compnoent to concatenate + * \return The combined path of this and other. + */ + RCPPUTILS_PUBLIC path operator/(const std::string & other) const; + + /** + * \brief Append a string component to this path. + * + * \param[in] other the string component to append + * \return *this + */ + RCPPUTILS_PUBLIC path & operator/=(const std::string & other); + + /** + * \brief Concatenate two paths together. + * + * \param[in] other the path to append + * \return The combined path. + */ + RCPPUTILS_PUBLIC path operator/(const path & other) const; + + /** + * \brief Append a string component to this path. + * + * \param[in] other the string component to append + * \return *this + */ + RCPPUTILS_PUBLIC path & operator/=(const path & other); + +private: + std::string path_; + std::vector path_as_vector_; +}; + +/** + * \brief Check if the path is a regular file. + * + * \param[in] p The path to check + * \return True if the path exists, false otherwise. + */ +RCPPUTILS_PUBLIC bool is_regular_file(const path & p) noexcept; + +/** + * \brief Check if the path is a directory. + * + * \param[in] p The path to check + * \return True if the path is an existing directory, false otherwise. + */ +RCPPUTILS_PUBLIC bool is_directory(const path & p) noexcept; + +/** + * \brief Get the file size of the path. + * + * \param[in] p The path to get the file size of. + * \return The file size in bytes. + * + * \throws std::sytem_error + */ +RCPPUTILS_PUBLIC uint64_t file_size(const path & p); + +/** + * \brief Check if a path exists. + * + * \param[in] path_to_check The path to check. + * \return True if the path exists, false otherwise. + */ +RCPPUTILS_PUBLIC bool exists(const path & path_to_check); + + +/** + * \brief Get a path to a location in the temporary directory, if it's available. + * + * This does not create any directories. + * On Windows, this uses "GetTempPathA" + * On non-Windows, this prefers the environment variable TMPDIR, falling back to /tmp + * + * \return A path to a directory for storing temporary files and directories. + */ +RCPPUTILS_PUBLIC path temp_directory_path(); + +/** + * \brief Construct a uniquely named temporary directory, in "parent", with format base_nameXXXXXX + * + * The output, if successful, is guaranteed to be a newly-created directory. + * The underlying implementation keeps generating paths until one that does not exist is found. + * This guarantees that there will be no existing files in the returned directory. + * + * \param[in] base_name User-specified portion of the created directory + * \param[in] parent_path The parent path of the directory that will be created + * \return A path to a newly-created directory with base_name and a 6-character unique suffix + * + * \throws std::system_error If any OS APIs do not succeed. + */ +RCPPUTILS_PUBLIC path create_temp_directory( + const std::string & base_name, + const path & parent_path = temp_directory_path()); + +/** + * \brief Return current working directory. + * + * \return The current working directory. + * + * \throws std::system_error + */ +RCPPUTILS_PUBLIC path current_path(); + +/** + * \brief Create a directory with the given path p. + * + * This builds directories recursively and will skip directories if they are already created. + * \param[in] p The path at which to create the directory. + * \return Return true if the directory already exists or is created, false otherwise. + */ +RCPPUTILS_PUBLIC bool create_directories(const path & p); + +/** + * \brief Remove the file or directory at the path p. + * + * \param[in] p The path of the object to remove. + * \return true if the file exists and it was successfully removed, false otherwise. + */ +RCPPUTILS_PUBLIC bool remove(const path & p); + +/** + * \brief Remove the directory at the path p and its content. + * + * Additionally to \sa remove, remove_all removes a directory and its containing files. + * + * \param[in] p The path of the directory to remove. + * \return true if the directory exists and it was successfully removed, false otherwise. + */ +RCPPUTILS_PUBLIC bool remove_all(const path & p); + +/** + * \brief Remove extension(s) from a path. + * + * An extension is defined as text starting from the end of a path to the first period (.) character. + * + * \param[in] file_path The file path string. + * \param[in] n_times The number of extensions to remove if there are multiple extensions. + * \return The path object. + */ +RCPPUTILS_PUBLIC path remove_extension(const path & file_path, int n_times = 1); + +/** + * \brief Compare two paths for equality. + * + * \return True if both paths are equal as strings. + */ +RCPPUTILS_PUBLIC bool operator==(const path & a, const path & b); +RCPPUTILS_PUBLIC bool operator!=(const path & a, const path & b); + +/** +* \brief Convert the path to a string for ostream usage, such as in logging or string formatting. +* +* \param[in] os The stream to send the path string to +* \param[in] p The path to stringify +* \return The ostream, for chaining +*/ +RCPPUTILS_PUBLIC std::ostream & operator<<(std::ostream & os, const path & p); + +} // namespace fs +} // namespace rcpputils + +#endif // RCPPUTILS__FILESYSTEM_HELPER_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/find_and_replace.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/find_and_replace.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/find_and_replace.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/find_and_replace.hpp diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/find_library.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/find_library.hpp new file mode 100644 index 000000000..fbe8547a1 --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/find_library.hpp @@ -0,0 +1,68 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*! \file find_library.hpp + * \brief Find library located in OS's library paths environment variable. + */ + +#ifndef RCPPUTILS__FIND_LIBRARY_HPP_ +#define RCPPUTILS__FIND_LIBRARY_HPP_ + +#include + +#include "rcpputils/visibility_control.hpp" + +namespace rcpputils +{ + +/// Find a library located in the OS's specified environment variable for library paths. +/** + * + * The environment variable and file format per platform: + * * Linux: `${LD_LIBRARY_PATH}`, `lib{}.so` + * * Apple: `${DYLD_LIBRARY_PATH}`, `lib{}.dyld` + * * Windows: `%PATH%`, `{}.dll` + * + * \param[in] library_name Name of the library to find. + * \return The absolute filesystem path, including the appropriate prefix and extension, or the + * empty string when the library was not found. + * \throws std::runtime_error if an error is encountered when accessing environment variables. + */ +RCPPUTILS_PUBLIC +std::string find_library_path(const std::string & library_name); + +/// Construct the filepath for a library given its directory, and checks that it exists. +/** + * \param[in] directory The directory that contains the library. + * \param[in] library_name Name of the library to find. + * \return The absolute filesystem path, including the appropriate prefix and extension, or the + * empty string when the library does not exist. + */ +RCPPUTILS_PUBLIC +std::string path_for_library(const std::string & directory, const std::string & library_name); + +/// Create the filename corresponding to the library name. +/** + * + * \sa find_library_path() for information about the platform-specific filenames. + * + * \param[in] library_name Name of the library. + * \return The filename for the library. + */ +RCPPUTILS_PUBLIC +std::string filename_for_library(const std::string & library_name); + +} // namespace rcpputils + +#endif // RCPPUTILS__FIND_LIBRARY_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/get_env.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/get_env.hpp new file mode 100644 index 000000000..e52f4290c --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/get_env.hpp @@ -0,0 +1,41 @@ +// Copyright (c) 2020, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#ifndef RCPPUTILS__GET_ENV_HPP_ +#define RCPPUTILS__GET_ENV_HPP_ + +#ifdef _MSC_VER +#pragma message \ + ("rcpputils/get_env.hpp has been deprecated, please include rcpputils/env.hpp instead") +#else +#warning rcpputils/get_env.hpp has been deprecated, please include rcpputils/env.hpp instead +#endif + +#include "rcpputils/env.hpp" + +#endif // RCPPUTILS__GET_ENV_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/join.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/join.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/join.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/join.hpp diff --git a/ThirdParty/ros/include/rcpputils/pointer_traits.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/pointer_traits.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/pointer_traits.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/pointer_traits.hpp diff --git a/ThirdParty/ros/include/rcpputils/process.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/process.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/process.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/process.hpp diff --git a/ThirdParty/ros/include/rcpputils/scope_exit.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/scope_exit.hpp similarity index 100% rename from ThirdParty/ros/include/rcpputils/scope_exit.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/scope_exit.hpp diff --git a/ThirdParty/ros/include/rcpputils/shared_library.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/shared_library.hpp similarity index 84% rename from ThirdParty/ros/include/rcpputils/shared_library.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/shared_library.hpp index 67f37dd4e..89f5f46f8 100644 --- a/ThirdParty/ros/include/rcpputils/shared_library.hpp +++ b/ThirdParty/ros/include/rcpputils/rcpputils/shared_library.hpp @@ -54,6 +54,14 @@ class SharedLibrary unload_library(); /// Return true if the shared library contains a specific symbol name otherwise returns false. + /** + * \param[in] symbol_name name of the symbol inside the shared library + * \return if symbols exists returns true, otherwise returns false. + */ + RCPPUTILS_PUBLIC + bool + has_symbol(const char * symbol_name); + /** * \param[in] symbol_name name of the symbol inside the shared library * \return if symbols exists returns true, otherwise returns false. @@ -62,6 +70,17 @@ class SharedLibrary bool has_symbol(const std::string & symbol_name); + /// Return shared library symbol pointer. + /** + * \param[in] symbol_name name of the symbol inside the shared library + * \return shared library symbol pointer, if the symbol doesn't exist then throws a + * runtime_error exception + * \throws std::runtime_error if the symbol doesn't exist in the shared library + */ + RCPPUTILS_PUBLIC + void * + get_symbol(const char * symbol_name); + /// Return shared library symbol pointer. /** * \param[in] symbol_name name of the symbol inside the shared library diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/split.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/split.hpp new file mode 100644 index 000000000..a1a8dd733 --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/split.hpp @@ -0,0 +1,98 @@ +// Copyright (c) 2019, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally from: +// https://github.com/ros/pluginlib/blob/1a4de29fa55173e9b897ca8ff57ebc88c047e0b3/pluginlib/include/pluginlib/impl/split.hpp + +/*! \file split.hpp + * \brief Split string by provided delimiter. + */ + +#ifndef RCPPUTILS__SPLIT_HPP_ +#define RCPPUTILS__SPLIT_HPP_ + +#include +#include +#include +#include + +namespace rcpputils +{ + +/// @cond +/// Split a specified input into tokens using a delimiter and a type erased insert iterator. +/** + * The returned vector will contain the tokens split from the input + * + * \param[in] input the input string to be split + * \param[in] delim the delimiter used to split the input string + * \param[in] it iterator pointing to a storage container + * \param[in] skip_empty remove empty strings from the return vector + */ +template< + class InsertIterator, + typename std::enable_if< + std::is_same< + InsertIterator &, + decltype(std::declval().operator=(std::declval()))>::value + >::type * = nullptr> +void +split(const std::string & input, char delim, InsertIterator & it, bool skip_empty = false) +{ + std::stringstream ss; + ss.str(input); + std::string item; + while (std::getline(ss, item, delim)) { + if (skip_empty && item == "") { + continue; + } + it = item; + } +} +/// @endcond + +/// Split a specified input into tokens using a delimiter. +/** + * The returned vector will contain the tokens split from the input + * + * \param[in] input the input string to be split + * \param[in] delim the delimiter used to split the input string + * \param[in] skip_empty remove empty strings from the return vector + * \return A vector of tokens. + */ +inline std::vector +split(const std::string & input, char delim, bool skip_empty = false) +{ + std::vector result; + auto it = std::back_inserter(result); + split(input, delim, it, skip_empty); + return result; +} +} // namespace rcpputils + +#endif // RCPPUTILS__SPLIT_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/thread_safety_annotations.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/thread_safety_annotations.hpp similarity index 85% rename from ThirdParty/ros/include/rcpputils/thread_safety_annotations.hpp rename to ThirdParty/ros/include/rcpputils/rcpputils/thread_safety_annotations.hpp index a3e8aeba7..054766f20 100644 --- a/ThirdParty/ros/include/rcpputils/thread_safety_annotations.hpp +++ b/ThirdParty/ros/include/rcpputils/rcpputils/thread_safety_annotations.hpp @@ -33,10 +33,17 @@ */ // Prefixing all macros to avoid potential conflict with other projects. +/** + * \def RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(x) + * \brief Enable thread safety attributes only with clang. + * + * The attributes can be safely erased when compiling with other compilers. + * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#mutex-h + */ #if defined(__clang__) && defined(_LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS) && (!defined(SWIG)) -#define RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#define RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(x) __attribute__((x)) #else -#define RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op +#define RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(x) // no-op #endif /** @@ -60,7 +67,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#capability-string */ #define RCPPUTILS_TSA_CAPABILITY(x) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(capability(x)) /** * \def RCPPUTILS_TSA_SCOPED_CAPABILITY @@ -72,7 +79,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#scoped-capability */ #define RCPPUTILS_TSA_SCOPED_CAPABILITY \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(scoped_lockable) /** * \def RCPPUTILS_TSA_GUARDED_BY @@ -83,7 +90,7 @@ inline const std::mutex & operator!(const std::mutex & a) * access. https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#guarded-by-c-and-pt-guarded-by-c */ #define RCPPUTILS_TSA_GUARDED_BY(x) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(guarded_by(x)) /** * \def RCPPUTILS_TSA_PT_GUARDED_BY @@ -95,7 +102,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#guarded-by-c-and-pt-guarded-by-c */ #define RCPPUTILS_TSA_PT_GUARDED_BY(x) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(pt_guarded_by(x)) /** * \def RCPPUTILS_TSA_ACQUIRED_BEFORE @@ -107,7 +114,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquired-before-acquired-after */ #define RCPPUTILS_TSA_ACQUIRED_BEFORE(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(acquired_before(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_ACQUIRED_AFTER @@ -119,7 +126,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquired-before-acquired-after */ #define RCPPUTILS_TSA_ACQUIRED_AFTER(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(acquired_after(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_REQUIRES @@ -131,7 +138,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#requires-requires-shared */ #define RCPPUTILS_TSA_REQUIRES(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(requires_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_REQUIRES_SHARED @@ -143,7 +150,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#requires-requires-shared */ #define RCPPUTILS_TSA_REQUIRES_SHARED(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(requires_shared_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_ACQUIRE @@ -154,7 +161,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquire-acquire-shared-release-release-shared */ #define RCPPUTILS_TSA_ACQUIRE(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(acquire_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_ACQUIRE_SHARED @@ -165,7 +172,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquire-acquire-shared-release-release-shared */ #define RCPPUTILS_TSA_ACQUIRE_SHARED(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(acquire_shared_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_RELEASE @@ -176,7 +183,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquire-acquire-shared-release-release-shared */ #define RCPPUTILS_TSA_RELEASE(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(release_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_RELEASE_SHARED @@ -187,7 +194,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#acquire-acquire-shared-release-release-shared */ #define RCPPUTILS_TSA_RELEASE_SHARED(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(release_shared_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_TRY_ACQUIRE @@ -197,7 +204,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#try-acquire-bool-try-acquire-shared-bool */ #define RCPPUTILS_TSA_TRY_ACQUIRE(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(try_acquire_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_TRY_ACQUIRE_SHARED @@ -207,7 +214,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#try-acquire-bool-try-acquire-shared-bool */ #define RCPPUTILS_TSA_TRY_ACQUIRE_SHARED(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(try_acquire_shared_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_EXCLUDES @@ -221,7 +228,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#negative-capabilities */ #define RCPPUTILS_TSA_EXCLUDES(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(locks_excluded(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_ASSERT_CAPABILITY @@ -231,7 +238,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#assert-capability-and-assert-shared-capability */ #define RCPPUTILS_TSA_ASSERT_CAPABILITY(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(assert_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_ASSERT_SHARED_CAPABILITY @@ -242,7 +249,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#assert-capability-and-assert-shared-capability */ #define RCPPUTILS_TSA_ASSERT_SHARED_CAPABILITY(...) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(__VA_ARGS__)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(assert_shared_capability(__VA_ARGS__)) /** * \def RCPPUTILS_TSA_RETURN_CAPABILITY @@ -253,7 +260,7 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#return-capability-c */ #define RCPPUTILS_TSA_RETURN_CAPABILITY(x) \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(lock_returned(x)) /** * \def RCPPUTILS_TSA_NO_THREAD_SAFETY_ANALYSIS @@ -266,6 +273,6 @@ inline const std::mutex & operator!(const std::mutex & a) * https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#return-capability-c */ #define RCPPUTILS_TSA_NO_THREAD_SAFETY_ANALYSIS \ - RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + RCPPUTILS_THREAD_ANNOTATION_ATTRIBUTE_IMPL(no_thread_safety_analysis) #endif // RCPPUTILS__THREAD_SAFETY_ANNOTATIONS_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/time.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/time.hpp new file mode 100644 index 000000000..073f72f9f --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/time.hpp @@ -0,0 +1,60 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCPPUTILS__TIME_HPP_ +#define RCPPUTILS__TIME_HPP_ + +#include + +#include "rcutils/time.h" + +namespace rcpputils +{ + +/// Convert to std::chrono::nanoseconds. +/** + * This function help to convert from std::chrono::duration to std::chrono::nanoseconds and throw + * exception if overflow occurs while coverting. + * + * \param[in] time The time to be converted to std::chrono::nanoseconds. + * \return std::chrono::nanoseconds. + * \throws std::invalid_argument if time is bigger than std::chrono::nanoseconds::max() or less than + * std::chrono::nanoseconds::min(). + */ +template +std::chrono::nanoseconds convert_to_nanoseconds( + const std::chrono::duration & time) +{ + constexpr auto ns_max_as_double = + std::chrono::duration_cast>( + std::chrono::nanoseconds::max()); + if (time > ns_max_as_double) { + throw std::invalid_argument{ + "time must be less than std::chrono::nanoseconds::max()"}; + } + + constexpr auto ns_min_as_double = + std::chrono::duration_cast>( + std::chrono::nanoseconds::min()); + if (time < ns_min_as_double) { + throw std::invalid_argument{ + "time must be bigger than std::chrono::nanoseconds::min()"}; + } + + return std::chrono::duration_cast(time); +} + +} // namespace rcpputils + +#endif // RCPPUTILS__TIME_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/rcpputils/visibility_control.hpp b/ThirdParty/ros/include/rcpputils/rcpputils/visibility_control.hpp new file mode 100644 index 000000000..56f88a7e1 --- /dev/null +++ b/ThirdParty/ros/include/rcpputils/rcpputils/visibility_control.hpp @@ -0,0 +1,87 @@ +// Copyright (c) 2019, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +#ifndef RCPPUTILS__VISIBILITY_CONTROL_HPP_ +#define RCPPUTILS__VISIBILITY_CONTROL_HPP_ + +/*! \file visibility_control.hpp + * \brief Macros for controlling visibilty of exported iterfaces. + * + * This logic was borrowed (then namespaced) from the examples on the gcc wiki: + * https://gcc.gnu.org/wiki/Visibility + */ +/** + * \def RCPPUTILS_EXPORT + * \brief Exposes the function with its decorated name in the compiled library object. + */ +/** + * \def RCPPUTILS_IMPORT + * \brief On Windows declares a function will be imported from a dll, otherwise it is empty + */ +/** + * \def RCPPUTILS_PUBLIC + * \brief Declares symbols and functions will be visible for export. + */ +/** + * \def RCPPUTILS_PUBLIC_TYPE + * \brief On Windows, this is a replica of RCPPUTILS_PUBLIC, otherwise it is empty. + */ +/** + * \def RCPPUTILS_LOCAL + * \brief Declares symbols cannot be exported from the dll. + */ + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define RCPPUTILS_EXPORT __attribute__ ((dllexport)) + #define RCPPUTILS_IMPORT __attribute__ ((dllimport)) + #else + #define RCPPUTILS_EXPORT __declspec(dllexport) + #define RCPPUTILS_IMPORT __declspec(dllimport) + #endif + #ifdef RCPPUTILS_BUILDING_LIBRARY + #define RCPPUTILS_PUBLIC RCPPUTILS_EXPORT + #else + #define RCPPUTILS_PUBLIC RCPPUTILS_IMPORT + #endif + #define RCPPUTILS_PUBLIC_TYPE RCPPUTILS_PUBLIC + #define RCPPUTILS_LOCAL +#else + #define RCPPUTILS_EXPORT __attribute__ ((visibility("default"))) + #define RCPPUTILS_IMPORT + #if __GNUC__ >= 4 + #define RCPPUTILS_PUBLIC __attribute__ ((visibility("default"))) + #define RCPPUTILS_LOCAL __attribute__ ((visibility("hidden"))) + #else + #define RCPPUTILS_PUBLIC + #define RCPPUTILS_LOCAL + #endif + #define RCPPUTILS_PUBLIC_TYPE +#endif + +#endif // RCPPUTILS__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/split.hpp b/ThirdParty/ros/include/rcpputils/split.hpp deleted file mode 100644 index 4b81375c1..000000000 --- a/ThirdParty/ros/include/rcpputils/split.hpp +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2019, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holders nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -// This file is originally from: -// https://github.com/ros/pluginlib/blob/1a4de29fa55173e9b897ca8ff57ebc88c047e0b3/pluginlib/include/pluginlib/impl/split.hpp - -/*! \file split.hpp - * \brief Split string by provided delimiter. - */ - -#ifndef RCPPUTILS__SPLIT_HPP_ -#define RCPPUTILS__SPLIT_HPP_ - -#include -#include -#include -#include - -namespace rcpputils -{ - -/// Split a specified input into tokens using a delimiter and a type erased insert iterator. -/** - * The returned vector will contain the tokens split from the input - * - * \param[in] input the input string to be split - * \param[in] delim the delimiter used to split the input string - * \param[in] it iterator pointing to a storage container - * \param[in] skip_empty remove empty strings from the return vector - */ -template< - class InsertIterator, - typename std::enable_if< - std::is_same< - InsertIterator &, - decltype(std::declval().operator=(std::declval()))>::value - >::type * = nullptr> -void -split(const std::string & input, char delim, InsertIterator & it, bool skip_empty = false) -{ - std::stringstream ss; - ss.str(input); - std::string item; - while (std::getline(ss, item, delim)) { - if (skip_empty && item == "") { - continue; - } - it = item; - } -} - -/// Split a specified input into tokens using a delimiter. -/** - * The returned vector will contain the tokens split from the input - * - * \param[in] input the input string to be split - * \param[in] delim the delimiter used to split the input string - * \param[in] skip_empty remove empty strings from the return vector - * \return A vector of tokens. - */ -inline std::vector -split(const std::string & input, char delim, bool skip_empty = false) -{ - std::vector result; - auto it = std::back_inserter(result); - split(input, delim, it, skip_empty); - return result; -} -} // namespace rcpputils - -#endif // RCPPUTILS__SPLIT_HPP_ diff --git a/ThirdParty/ros/include/rcpputils/visibility_control.hpp b/ThirdParty/ros/include/rcpputils/visibility_control.hpp deleted file mode 100644 index 1ec4dacb6..000000000 --- a/ThirdParty/ros/include/rcpputils/visibility_control.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2019, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holders nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef RCPPUTILS__VISIBILITY_CONTROL_HPP_ -#define RCPPUTILS__VISIBILITY_CONTROL_HPP_ - -/*! \file visibility_control.hpp - * \brief Macros for controlling visibilty of exported iterfaces. - * - * This logic was borrowed (then namespaced) from the examples on the gcc wiki: - * https://gcc.gnu.org/wiki/Visibility - */ -/** - * \def RCPPUTILS_EXPORT - * \brief Exposes the function with its decorated name in the compiled library object. - */ -/** - * \def RCPPUTILS_IMPORT - * \brief On Windows declares a function will be imported from a dll, otherwise it is empty - */ -/** - * \def RCPPUTILS_PUBLIC - * \brief Declares symbols and functions will be visible for export. - */ -/** - * \def RCPPUTILS_PUBLIC_TYPE - * \brief On Windows, this is a replica of RCPPUTILS_PUBLIC, otherwise it is empty. - */ -/** - * \def RCPPUTILS_LOCAL - * \brief Declares symbols cannot be exported from the dll. - */ - -#if defined _WIN32 || defined __CYGWIN__ - #ifdef __GNUC__ - #define RCPPUTILS_EXPORT __attribute__ ((dllexport)) - #define RCPPUTILS_IMPORT __attribute__ ((dllimport)) - #else - #define RCPPUTILS_EXPORT __declspec(dllexport) - #define RCPPUTILS_IMPORT __declspec(dllimport) - #endif - #ifdef RCPPUTILS_BUILDING_LIBRARY - #define RCPPUTILS_PUBLIC RCPPUTILS_EXPORT - #else - #define RCPPUTILS_PUBLIC RCPPUTILS_IMPORT - #endif - #define RCPPUTILS_PUBLIC_TYPE RCPPUTILS_PUBLIC - #define RCPPUTILS_LOCAL -#else - #define RCPPUTILS_EXPORT __attribute__ ((visibility("default"))) - #define RCPPUTILS_IMPORT - #if __GNUC__ >= 4 - #define RCPPUTILS_PUBLIC __attribute__ ((visibility("default"))) - #define RCPPUTILS_LOCAL __attribute__ ((visibility("hidden"))) - #else - #define RCPPUTILS_PUBLIC - #define RCPPUTILS_LOCAL - #endif - #define RCPPUTILS_PUBLIC_TYPE -#endif - -#endif // RCPPUTILS__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/rcutils/allocator.h b/ThirdParty/ros/include/rcutils/allocator.h deleted file mode 100644 index e84706cb0..000000000 --- a/ThirdParty/ros/include/rcutils/allocator.h +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__ALLOCATOR_H_ -#define RCUTILS__ALLOCATOR_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -#include "rcutils/macros.h" -#include "rcutils/types/rcutils_ret.h" -#include "rcutils/visibility_control.h" - -/// Encapsulation of an allocator. -/** - * The default allocator uses malloc(), free(), calloc(), and realloc(). - * It can be obtained using rcutils_get_default_allocator(). - * - * The allocator should be trivially copyable. - * Meaning that the struct should continue to work after being assignment - * copied into a new struct. - * Specifically the object pointed to by the state pointer should remain valid - * until all uses of the allocator have been made. - * Particular care should be taken when giving an allocator to functions like - * rcutils_*_init() where it is stored within another object and used later. - * Developers should note that, while the fields of a const-qualified allocator - * struct cannot be modified, the state of the allocator can be modified. - */ -typedef struct rcutils_allocator_t -{ - /// Allocate memory, given a size and the `state` pointer. - /** An error should be indicated by returning `NULL`. */ - void * (*allocate)(size_t size, void * state); - /// Deallocate previously allocated memory, mimicking free(). - /** Also takes the `state` pointer. */ - void (* deallocate)(void * pointer, void * state); - /// Reallocate if possible, otherwise it deallocates and allocates. - /** - * Also takes the `state` pointer. - * - * If unsupported then do deallocate and then allocate. - * This should behave as realloc() does, as opposed to posix's - * [reallocf](https://linux.die.net/man/3/reallocf), i.e. the memory given - * by pointer will not be free'd automatically if realloc() fails. - * For reallocf-like behavior use rcutils_reallocf(). - * This function must be able to take an input pointer of `NULL` and succeed. - */ - void * (*reallocate)(void * pointer, size_t size, void * state); - /// Allocate memory with all elements set to zero, given a number of elements and their size. - /** An error should be indicated by returning `NULL`. */ - void * (*zero_allocate)(size_t number_of_elements, size_t size_of_element, void * state); - /// Implementation defined state storage. - /** - * This is passed as the final parameter to other allocator functions. - * Note that the contents of the state can be modified even in const-qualified - * allocator objects. - */ - void * state; -} rcutils_allocator_t; - -/// Return a zero initialized allocator. -/** - * Note that this is an invalid allocator and should only be used as a placeholder. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_allocator_t -rcutils_get_zero_initialized_allocator(void); - -/// Return a properly initialized rcutils_allocator_t with default values. -/** - * This defaults to: - * - * - allocate = wraps malloc() - * - deallocate = wraps free() - * - reallocate = wraps realloc() - * - zero_allocate = wraps calloc() - * - state = `NULL` - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_allocator_t -rcutils_get_default_allocator(void); - -/// Return true if the given allocator has non-null function pointers. -/** - * Will also return false if the allocator pointer is null. - * - * \param[in] allocator to be checked by the function - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -bool -rcutils_allocator_is_valid(const rcutils_allocator_t * allocator); - -#define RCUTILS_CHECK_ALLOCATOR(allocator, fail_statement) \ - if (!rcutils_allocator_is_valid(allocator)) { \ - fail_statement; \ - } - -#define RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \ - if (!rcutils_allocator_is_valid(allocator)) { \ - RCUTILS_SET_ERROR_MSG(msg); \ - fail_statement; \ - } - -/// Emulate the behavior of [reallocf](https://linux.die.net/man/3/reallocf). -/** - * This function will return `NULL` if the allocator is `NULL` or has `NULL` for - * function pointer fields. - * \param[inout] pointer to the memory which will be reallocated - * \param[in] size in bytes - * \param[in] allocator to be used to allocate and deallocate memory - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -void * -rcutils_reallocf(void * pointer, size_t size, rcutils_allocator_t * allocator); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__ALLOCATOR_H_ diff --git a/ThirdParty/ros/include/rcutils/cmdline_parser.h b/ThirdParty/ros/include/rcutils/cmdline_parser.h deleted file mode 100644 index 1571244b6..000000000 --- a/ThirdParty/ros/include/rcutils/cmdline_parser.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__CMDLINE_PARSER_H_ -#define RCUTILS__CMDLINE_PARSER_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcutils/visibility_control.h" - -/// Return `true` if the option is defined in the command line arguments or `false` otherwise. -/** -* \param[in] begin first element to check in the array -* \param[in] end last element to check in the array -* \param[in] option string to find in the array of arguments -* \return if the option exists returns true, otherwise returns false. - */ -RCUTILS_PUBLIC -bool -rcutils_cli_option_exist(char ** begin, char ** end, const char * option); - -/// Return the value for a specific option of the command line arguments. -/** -* \param[in] begin first element to check in the array -* \param[in] end last element to check in the array -* \param[in] option string to find in the array of arguments -* \return the value for a specific option of the command line arguments or `NULL` if the option -* doesn't exist - */ -RCUTILS_PUBLIC -char * -rcutils_cli_get_option(char ** begin, char ** end, const char * option); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__CMDLINE_PARSER_H_ diff --git a/ThirdParty/ros/include/rcutils/env.h b/ThirdParty/ros/include/rcutils/env.h deleted file mode 100644 index f5f347a36..000000000 --- a/ThirdParty/ros/include/rcutils/env.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__ENV_H_ -#define RCUTILS__ENV_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcutils/macros.h" -#include "rcutils/visibility_control.h" - -// TODO(cottsay): Deprecate get_env.h and eventually merge it here -#include "rcutils/get_env.h" - -/// Set or un-set a process-scoped environment variable. -/** - * This function modifies the environment variables for the current process by - * copying given string values into the process' global environment variable - * store. - * - * \par Thread Safety: - * This function is not thread-safe, particularly when called concurrently with - * ::rcutils_get_env. Take care not to modify the environment variables while - * another thread might be reading or writing environment variables. - * - * \par Platform Consistency: - * The behavior when setting a variable to an empty string (`""`) differs - * between platforms. On Windows, the variable is un-set (as if \p env_value was - * `NULL`), while on other platforms the variable is set to an empty string as - * expected. - * - * \param[in] env_name Name of the environment variable to modify. - * \param[in] env_value Value to set the environment variable to, or `NULL` to - * un-set. - * \return `True` if success - * \return `False` if env_name is invalid or NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -bool -rcutils_set_env(const char * env_name, const char * env_value); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__ENV_H_ diff --git a/ThirdParty/ros/include/rcutils/filesystem.h b/ThirdParty/ros/include/rcutils/filesystem.h deleted file mode 100644 index 8275a2072..000000000 --- a/ThirdParty/ros/include/rcutils/filesystem.h +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__FILESYSTEM_H_ -#define RCUTILS__FILESYSTEM_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include - -#include "rcutils/allocator.h" -#include "rcutils/macros.h" -#include "rcutils/visibility_control.h" - -/// Return current working directory. -/** - * \param[in] buffer Allocated string to store current directory path to - * \param[in] max_length maximum length to be stored in buffer - * \return `True` if success - * \return `False` if buffer is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -bool -rcutils_get_cwd(char * buffer, size_t max_length); - -/// Check if the provided path points to a directory. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if directory - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_is_directory(const char * abs_path); - -/// Check if the provided path points to a file. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if file - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_is_file(const char * abs_path); - -/// Check if the provided path points to an existing file/folder. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if the path exists - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_exists(const char * abs_path); - -/// Check if the provided path points to a file/folder readable by current user. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if the file is readable - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_is_readable(const char * abs_path); - -/// Check if the provided path points to a file/folder writable by current user. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if the file is writable - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_is_writable(const char * abs_path); - -/// Check if the provided path points to a file/folder both readable and writable by current user. -/** - * \param[in] abs_path Absolute path to check. - * \return `True` if the file is redable and writable False otherwise - * \return `False` if abs_path is NULL - * \return `False` on failure - */ -RCUTILS_PUBLIC -bool -rcutils_is_readable_and_writable(const char * abs_path); - -/// Return newly allocated string with arguments separated by correct delimiter for the platform. -/** - * This function allocates memory and returns it to the caller. - * It is up to the caller to release the memory once it is done with it by - * calling `deallocate` on the same allocator passed here. - * - * \param[in] left_hand_path - * \param[in] right_hand_path - * \param[in] allocator - * \return concatenated path on success - * \return `NULL` on invalid arguments - * \return `NULL` on failure - */ -RCUTILS_PUBLIC -char * -rcutils_join_path( - const char * left_hand_path, - const char * right_hand_path, - rcutils_allocator_t allocator); - -/// Return newly allocated string with all argument's "/" replaced by platform specific separator. -/** - * This function allocates memory and returns it to the caller. - * It is up to the caller to release the memory once it is done with it by - * calling `deallocate` on the same allocator passed here. - * - * \param[in] path - * \param[in] allocator - * \return path using platform specific delimiters on success - * \return `NULL` on invalid arguments - * \return `NULL` on failure - */ -RCUTILS_PUBLIC -char * -rcutils_to_native_path( - const char * path, - rcutils_allocator_t allocator); - -/// Create the specified directory. -/** - * This function creates an absolutely-specified directory. - * If any of the intermediate directories do not exist, this function will - * return False. - * If the abs_path already exists, and is a directory, this function will - * return True. - * - * This function is not thread-safe due to mkdir races as described in the - * openat(2) documentation. - * - * \param[in] abs_path - * \return `True` if making the directory was successful, False otherwise - * \return `False` if path is NULL - * \return `False` if path is empty - * \return `False` if path is not absolute - * \return `False` if any intermediate directories don't exist - */ -RCUTILS_PUBLIC -bool -rcutils_mkdir(const char * abs_path); - -/// Calculate the size of the specified directory. -/* - * Calculates the size of a directory by summarizing the file size of all files. - * \note This operation is not recursive. - * \param[in] directory_path The directory path to calculate the size of. - * \param[in] allocator Allocator being used for internal file path composition. - * \return The size of the directory in bytes. - */ -RCUTILS_PUBLIC -size_t -rcutils_calculate_directory_size(const char * directory_path, rcutils_allocator_t allocator); - -/// Calculate the size of the specifed file. -/* - * \param[in] file_path The path of the file to obtain its size of. - * \return The size of the file in bytes. - */ -RCUTILS_PUBLIC -size_t -rcutils_get_file_size(const char * file_path); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__FILESYSTEM_H_ diff --git a/ThirdParty/ros/include/rcutils/get_env.h b/ThirdParty/ros/include/rcutils/get_env.h deleted file mode 100644 index 80503099b..000000000 --- a/ThirdParty/ros/include/rcutils/get_env.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__GET_ENV_H_ -#define RCUTILS__GET_ENV_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rcutils/macros.h" -#include "rcutils/visibility_control.h" - -/// Retrieve the value of the given environment variable if it exists, or "". -/* The c-string which is returned in the env_value output parameter is only - * valid until the next time this function is called, because it is a direct - * pointer to the static storage. - * The variable env_value populated by this function should never have free() - * called on it. - * If the environment variable is not set, an empty string will be returned. - * - * In both cases, environment variable set or unset, NULL is returned unless - * an exception has occurred, in which case the error string is returned. - * For example: - * - * ```c - * #include - * #include - * const char * env_value; - * const char * error_str; - * error_str = rcutils_get_env("SOME_ENV_VAR", &env_value); - * if (error_str != NULL) { - * fprintf(stderr, "Error getting env var: %s\n", error_str); - * } - * printf("Valued of 'SOME_ENV_VAR': %s\n", env_value); - * ``` - * - * Environment variables will be truncated at 2048 characters on Windows. - * - * This function is not thread-safe. - * - * \param[in] env_name the name of the environment variable - * \param[out] env_value pointer to the value cstring, or "" if unset - * \return NULL on success (success can be returning an empty string) - * error string on failure - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -const char * -rcutils_get_env(const char * env_name, const char ** env_value); - -/// Retrieve the full path to the home directory. -/** - * The c-string which is returned is only valid until the next time this - * function is called, because it is a direct pointer to the static storage. - * Also note that the string returned here should *not* be freed. - * - * The function first tries to get the HOME environment variable. - * If that variable exists and is non-empty, that will be returned. - * Otherwise, the function tries to get the USERPROFILE environment variable. - * If that variable exists and is non-empty, that will be returned. - * If neither exists, NULL will be returned. - * The above algorithm is portable across both Unix and Windows. - * - * The home directory will be truncated at 2048 characters on Windows. - * - * This function is not thread-safe. - * - * \return The home directory on success, NULL on failure. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -const char * -rcutils_get_home_dir(void); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__GET_ENV_H_ diff --git a/ThirdParty/ros/include/rcutils/logging.h b/ThirdParty/ros/include/rcutils/logging.h deleted file mode 100644 index afd083196..000000000 --- a/ThirdParty/ros/include/rcutils/logging.h +++ /dev/null @@ -1,535 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__LOGGING_H_ -#define RCUTILS__LOGGING_H_ - -#include -#include -#include - -#include "rcutils/allocator.h" -#include "rcutils/error_handling.h" -#include "rcutils/macros.h" -#include "rcutils/time.h" -#include "rcutils/types/rcutils_ret.h" -#include "rcutils/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define RCUTILS_LOGGING_SEPARATOR_CHAR '.' -#define RCUTILS_LOGGING_SEPARATOR_STRING "." - -/** - * \def RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL - * \brief The default severity level of the default logger. - */ -#define RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL RCUTILS_LOG_SEVERITY_INFO - -/// The flag if the logging system has been initialized. -RCUTILS_PUBLIC -extern bool g_rcutils_logging_initialized; - -/// Initialize the logging system using the specified allocator. -/** - * Initialize the logging system only if it was not in an initialized state. - * - * If an invalid allocator is passed, the initialization will fail. - * Otherwise, this function will still set the internal state to initialized - * even if an error occurs, to avoid repeated failing initialization attempts - * since this function is called automatically from logging macros. - * To re-attempt initialization, call rcutils_logging_shutdown() before - * re-calling this function. - * - * If multiple errors occur, the error code of the last error will be returned. - * - * The `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable can be used to set - * the output format of messages logged to the console. - * Available tokens are: - * - `file_name`, the full file name of the caller including the path - * - `function_name`, the function name of the caller - * - `line_number`, the line number of the caller - * - `message`, the message string after it has been formatted - * - `name`, the full logger name - * - `severity`, the name of the severity level, e.g. `INFO` - * - `time`, the timestamp of log message in floating point seconds - * - `time_as_nanoseconds`, the timestamp of log message in integer nanoseconds - * - * The `RCUTILS_COLORIZED_OUTPUT` environment variable allows configuring if colours - * are used or not. Available values are: - * - `1`: Force using colours. - * - `0`: Don't use colours. - * If it is unset, colours are used depending if the target stream is a terminal or not. - * See `isatty` documentation. - * - * The format string can use these tokens by referencing them in curly brackets, - * e.g. `"[{severity}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})"`. - * Any number of tokens can be used. - * The limit of the format string is 2048 characters. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] allocator rcutils_allocator_t to be used. - * \return `RCUTILS_RET_OK` if successful. - * \return `RCUTILS_RET_INVALID_ARGUMENT` if the allocator is invalid, in which - * case initialization will fail. - * \return `RCUTILS_RET_INVALID_ARGUMENT` if an error occurs reading the output - * format from the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable, in - * which case the default format will be used. - * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if the internal logger - * severity level map cannot be initialized, in which case logger severity - * levels will not be configurable. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t rcutils_logging_initialize_with_allocator(rcutils_allocator_t allocator); - -/// Initialize the logging system. -/** - * Call rcutils_logging_initialize_with_allocator() using the default allocator. - * This function is called automatically when using the logging macros. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `RCUTILS_RET_OK` if successful. - * \return `RCUTILS_RET_INVALID_ARGUMENT` if an error occurs reading the output - * format from the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable, in - * which case the default format will be used. - * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if the internal logger - * severity level map cannot be initialized, in which case logger levels - * will not be configurable. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t rcutils_logging_initialize(void); - -/// Shutdown the logging system. -/** - * Free the resources allocated for the logging system. - * This puts the system into a state equivalent to being uninitialized. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `RCUTILS_RET_OK` if successful. - * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if the internal logger - * severity level map cannot be finalized. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t rcutils_logging_shutdown(void); - -/// The structure identifying the caller location in the source code. -typedef struct rcutils_log_location_t -{ - /// The name of the function containing the log call. - const char * function_name; - /// The name of the source file containing the log call. - const char * file_name; - /// The line number containing the log call. - size_t line_number; -} rcutils_log_location_t; - -/// The severity levels of log messages / loggers. -enum RCUTILS_LOG_SEVERITY -{ - RCUTILS_LOG_SEVERITY_UNSET = 0, ///< The unset log level - RCUTILS_LOG_SEVERITY_DEBUG = 10, ///< The debug log level - RCUTILS_LOG_SEVERITY_INFO = 20, ///< The info log level - RCUTILS_LOG_SEVERITY_WARN = 30, ///< The warn log level - RCUTILS_LOG_SEVERITY_ERROR = 40, ///< The error log level - RCUTILS_LOG_SEVERITY_FATAL = 50, ///< The fatal log level -}; - -/// The names of severity levels. -RCUTILS_PUBLIC -extern const char * const g_rcutils_log_severity_names[RCUTILS_LOG_SEVERITY_FATAL + 1]; - -/// Get a severity value from its string representation (e.g. DEBUG). -/** - * String representation must match one of the values in - * `g_rcutils_log_severity_names`, but is not case-sensitive. - * Examples: UNSET, DEBUG, INFO, WARN, Error, fatal. - * - * \param[in] severity_string String representation of the severity, must be a - * null terminated c string - * \param[in] allocator rcutils_allocator_t to be used - * \param[in,out] severity The severity level as a represented by the - * `RCUTILS_LOG_SEVERITY` enum - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` on invalid arguments, or - * \return `RCUTILS_RET_LOGGING_SEVERITY_STRING_INVALID` if unable to match - * string, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occured - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t -rcutils_logging_severity_level_from_string( - const char * severity_string, rcutils_allocator_t allocator, int * severity); - -/// The function signature to log messages. -/** - * \param[in] location The location information about where the log came from - * \param[in] severity The severity of the log message expressed as an integer - * \param[in] name The name of the logger that this message came from - * \param[in] timestamp The time at which the log message was generated - * \param[in] format The list of arguments to insert into the formatted log message - * \param[in] args The variable argument list - */ -typedef void (* rcutils_logging_output_handler_t)( - const rcutils_log_location_t *, // location - int, // severity - const char *, // name - rcutils_time_point_value_t, // timestamp - const char *, // format - va_list * // args -); - -/// The function pointer of the current output handler. -RCUTILS_PUBLIC -extern rcutils_logging_output_handler_t g_rcutils_logging_output_handler; - -/// Get the current output handler. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return The function pointer of the current output handler. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_logging_output_handler_t rcutils_logging_get_output_handler(); - -/// Set the current output handler. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] function The function pointer of the output handler to be used. - */ -RCUTILS_PUBLIC -void rcutils_logging_set_output_handler(rcutils_logging_output_handler_t function); - -/// Formats a log message according to RCUTILS_CONSOLE_OUTPUT_FORMAT -/** - * A formatter that is meant to be used by an output handler to format a log message to the match - * the format specified in RCUTILS_CONSOLE_OUTPUT_FORMAT by performing token replacement. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return `RCUTILS_RET_OK` if successful. - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation error occured - * \param[in] location The location information about where the log came from - * \param[in] severity The severity of the log message expressed as an integer - * \param[in] name The name of the logger that this message came from - * \param[in] timestamp The time at which the log message was generated - * \param[in] msg The message being logged - * \param[out] logging_output An output buffer for the formatted message - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t rcutils_logging_format_message( - const rcutils_log_location_t * location, - int severity, const char * name, rcutils_time_point_value_t timestamp, - const char * msg, rcutils_char_array_t * logging_output); - -/// The default severity level for loggers. -/** - * This level is used for (1) nameless log calls and (2) named log - * calls where the effective level of the logger name is unspecified. - * - * \see rcutils_logging_get_logger_effective_level() - */ -RCUTILS_PUBLIC -extern int g_rcutils_logging_default_logger_level; - -/// Get the default level for loggers. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \return The level. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -int rcutils_logging_get_default_logger_level(); - -/// Set the default severity level for loggers. -/** - * If the severity level requested is `RCUTILS_LOG_SEVERITY_UNSET`, the default - * value for the default logger (`RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL`) - * will be restored instead. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] level The level to be used. - */ -RCUTILS_PUBLIC -void rcutils_logging_set_default_logger_level(int level); - -/// Get the severity level for a logger. -/** - * This considers the severity level of the specifed logger only. - * To get the effective level of a logger given the severity level of its - * ancestors, see rcutils_logging_get_logger_effective_level(). - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] name The name of the logger, must be null terminated c string - * \return The level of the logger if it has been set, or - * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or - * \return `g_rcutils_logging_default_logger_level` for an empty name, or - * \return -1 on invalid arguments, or - * \return -1 if an error occurred - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -int rcutils_logging_get_logger_level(const char * name); - -/// Get the level for a logger and its name length. -/** - * Identical to rcutils_logging_get_logger_level() but without - * relying on the logger name to be a null terminated c string. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] name The name of the logger - * \param[in] name_length Logger name length - * \return The level of the logger if it has been set, or - * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or - * \return `g_rcutils_logging_default_logger_level` for `name_length` of `0`, or - * \return -1 on invalid arguments, or - * \return -1 if an error occurred - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -int rcutils_logging_get_logger_leveln(const char * name, size_t name_length); - -/// Set the severity level for a logger. -/** - * If an empty string is specified as the name, the - * `g_rcutils_logging_default_logger_level` will be set. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] name The name of the logger, must be null terminated c string. - * \param[in] level The level to be used. - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` on invalid arguments, or - * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if severity map invalid, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occured - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t rcutils_logging_set_logger_level(const char * name, int level); - -/// Determine if a logger is enabled for a severity level. -/** - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] name The name of the logger, must be null terminated c string or NULL. - * \param[in] severity The severity level. - * - * \return true if the logger is enabled for the level; false otherwise. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -bool rcutils_logging_logger_is_enabled_for(const char * name, int severity); - -/// Determine the effective level for a logger. -/** - * The effective level is determined as the severity level of - * the logger if it is set, otherwise it is the first specified severity - * level of the logger's ancestors, starting with its closest ancestor. - * The ancestor hierarchy is signified by logger names being separated by dots: - * a logger named `x` is an ancestor of `x.y`, and both `x` and `x.y` are - * ancestors of `x.y.z`, etc. - * If the level has not been set for the logger nor any of its - * ancestors, the default level is used. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, provided logging system is already initialized - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] name The name of the logger, must be null terminated c string. - * - * \return The level, or - * \return -1 on invalid arguments, or - * \return -1 if an error occurred. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -int rcutils_logging_get_logger_effective_level(const char * name); - -/// Log a message. -/** - * The attributes of this function are also being influenced by the currently - * set output handler. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No, for formatted outputs <= 1023 characters - * | Yes, for formatted outputs >= 1024 characters - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] location The pointer to the location struct or NULL - * \param[in] severity The severity level - * \param[in] name The name of the logger, must be null terminated c string or NULL - * \param[in] format The format string - * \param[in] ... The variable arguments - */ -RCUTILS_PUBLIC -void rcutils_log( - const rcutils_log_location_t * location, - int severity, - const char * name, - const char * format, - ...) -RCUTILS_ATTRIBUTE_PRINTF_FORMAT(4, 5); - -/// The default output handler outputs log messages to the standard streams. -/** - * The messages with a severity level `DEBUG` and `INFO` are written to `stdout`. - * The messages with a severity level `WARN`, `ERROR`, and `FATAL` are written - * to `stderr`. - * The console output format of the logged message can be configured through - * the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable: see - * rcutils_logging_initialize_with_allocator() for details. - * For configuring if using colours or not, `RCUTILS_COLORIZED_OUTPUT` can be used: - * see rcutils_logging_initialize_with_allocator() for details. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes, if the underlying *printf functions are - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] location The pointer to the location struct or NULL - * \param[in] severity The severity level - * \param[in] name The name of the logger, must be null terminated c string - * \param[in] timestamp The timestamp for when the log message was made - * \param[in] format The format string - * \param[in] args The `va_list` used by the logger - */ -RCUTILS_PUBLIC -void rcutils_logging_console_output_handler( - const rcutils_log_location_t * location, - int severity, const char * name, rcutils_time_point_value_t timestamp, - const char * format, va_list * args); - -/** - * \def RCUTILS_LOGGING_AUTOINIT - * \brief Initialize the rcl logging library. - * Usually it is unnecessary to call the macro directly. - * All logging macros ensure that this has been called once. - */ -#define RCUTILS_LOGGING_AUTOINIT \ - if (RCUTILS_UNLIKELY(!g_rcutils_logging_initialized)) { \ - rcutils_ret_t ret = rcutils_logging_initialize(); \ - if (ret != RCUTILS_RET_OK) { \ - RCUTILS_SAFE_FWRITE_TO_STDERR( \ - "[rcutils|" __FILE__ ":" RCUTILS_STRINGIFY(__LINE__) \ - "] error initializing logging: "); \ - RCUTILS_SAFE_FWRITE_TO_STDERR(rcutils_get_error_string().str); \ - RCUTILS_SAFE_FWRITE_TO_STDERR("\n"); \ - rcutils_reset_error(); \ - } \ - } - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__LOGGING_H_ diff --git a/ThirdParty/ros/include/rcutils/macros.h b/ThirdParty/ros/include/rcutils/macros.h deleted file mode 100644 index 50a54119d..000000000 --- a/ThirdParty/ros/include/rcutils/macros.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__MACROS_H_ -#define RCUTILS__MACROS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#ifndef _WIN32 -#define RCUTILS_WARN_UNUSED __attribute__((warn_unused_result)) -#else -#define RCUTILS_WARN_UNUSED _Check_return_ -#endif - -// Note: this block was migrated from rmw/macros.h -// This block either sets RCUTILS_THREAD_LOCAL or RCUTILS_THREAD_LOCAL_PTHREAD. -#if defined _WIN32 || defined __CYGWIN__ -// Windows or Cygwin - #define RCUTILS_THREAD_LOCAL __declspec(thread) -#elif defined __APPLE__ -// Apple OS's - #include - #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE -// iOS Simulator or iOS device - #include - #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 -// iOS >= 10, thread local storage was added in iOS 10 - #define RCUTILS_THREAD_LOCAL _Thread_local - #else -// iOS < 10, no thread local storage, so use pthread instead - #define RCUTILS_THREAD_LOCAL_PTHREAD 1 - #undef RCUTILS_THREAD_LOCAL - #endif - #else - #error "Unknown iOS version" - #endif - #elif TARGET_OS_MAC -// macOS - #define RCUTILS_THREAD_LOCAL _Thread_local - #else - #error "Unknown Apple platform" - #endif -#else -// Some other non-Windows, non-cygwin, non-apple OS - #define RCUTILS_THREAD_LOCAL _Thread_local -#endif - -#define RCUTILS_STRINGIFY_IMPL(x) #x -#define RCUTILS_STRINGIFY(x) RCUTILS_STRINGIFY_IMPL(x) -#define RCUTILS_UNUSED(x) (void)(x) - -#define RCUTILS_JOIN_IMPL(arg1, arg2) arg1 ## arg2 -#define RCUTILS_JOIN(arg1, arg2) RCUTILS_JOIN_IMPL(arg1, arg2) - -#if defined _WIN32 || defined __CYGWIN__ -/// Macro to annotate printf-like functions on Linux. Disabled on Windows. -#define RCUTILS_ATTRIBUTE_PRINTF_FORMAT(format_string_index, first_to_check_index) -#else -/// Macro to annotate printf-like functions which are relying on a format string and a variable -/// number of arguments. -/** - * This enables GCC to emit warnings if dangerous patterns are detected. - * See GCC documentation for details: - * https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html - * - * For the following function: - * int snprintf(char *str, size_t size, const char *format, ...); - * ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ - * ARG 1 ARG 2 ARG 3 ARG 4 - * format string first optional argument - * - * format_string_index value would be 3, first_to_check_index value would be 4. - * - * IMPORTANT: the first argument has an index of ONE (not zero!). - * - * \param[in] format_string_index index of the format string passed to the function - * \param[in] first_to_check_index index of the first "optional argument" - */ -#define RCUTILS_ATTRIBUTE_PRINTF_FORMAT(format_string_index, first_to_check_index) \ - __attribute__ ((format(printf, format_string_index, first_to_check_index))) -#endif // !defined _WIN32 || defined __CYGWIN__ - -/// Macro to declare deprecation in the platform appropriate manner. -#ifndef _WIN32 -# define RCUTILS_DEPRECATED __attribute__((deprecated)) -#else -# define RCUTILS_DEPRECATED __declspec(deprecated) -#endif - -/// Macro to declare deprecation in the platform appropriate manner with a message. -#ifndef _WIN32 -# define RCUTILS_DEPRECATED_WITH_MSG(msg) __attribute__((deprecated(msg))) -#else -# define RCUTILS_DEPRECATED_WITH_MSG(msg) __declspec(deprecated(msg)) -#endif - -// Provide the compiler with branch prediction information -#ifndef _WIN32 -/** - * \def RCUTILS_LIKELY - * Instruct the compiler to optimize for the case where the argument equals 1. - */ -# define RCUTILS_LIKELY(x) __builtin_expect((x), 1) -/** - * \def RCUTILS_UNLIKELY - * Instruct the compiler to optimize for the case where the argument equals 0. - */ -# define RCUTILS_UNLIKELY(x) __builtin_expect((x), 0) -#else -/** - * \def RCUTILS_LIKELY - * No op since Windows doesn't support providing branch prediction information. - */ -# define RCUTILS_LIKELY(x) (x) -/** - * \def RCUTILS_UNLIKELY - * No op since Windows doesn't support providing branch prediction information. - */ -# define RCUTILS_UNLIKELY(x) (x) -#endif // _WIN32 - -#if defined RCUTILS_ENABLE_FAULT_INJECTION -#include "rcutils/testing/fault_injection.h" - -/** - * \def RCUTILS_CAN_RETURN_WITH_ERROR_OF - * Indicating macro that the function intends to return possible error value. - * - * Put this macro as the first line in the function. For example: - * - * int rcutils_function_that_can_fail() { - * RCUTILS_CAN_RETURN_WITH_ERROR_OF(RCUTILS_RET_INVALID_ARGUMENT); - * ... // rest of function - * } - * - * For now, this macro just simply calls `RCUTILS_FAULT_INJECTION_MAYBE_RETURN_ERROR` if fault - * injection is enabled. However, for source code, the macro annotation - * `RCUTILS_CAN_RETURN_WITH_ERROR_OF` helps clarify that a function may return a value signifying - * an error and what those are. - * - * In general, you should only include a return value that originates in the function you're - * annotating instead of one that is merely passed on from a called function already annotated with - *`RCUTILS_CAN_RETURN_WITH_ERROR_OF`. If you are passing on return values from a called function, - * but that function is not annotated with `RCUTILS_CAN_RETURN_WITH_ERROR_OF`, then you might - * consider annotating that function first. If for some reason that is not desired or possible, - * then annotate your function as if the return values you are passing on originated from your - * function. - * - * If the function can return multiple return values indicating separate failure types, each one - * should go on a separate line. - * - * If in your function, there are expected effects on output parameters that occur during - * the failure case, then it will introduce a discrepancy between fault injection testing and - * production operation. This is because the fault injection will cause the function to return - * where this macro is used, not at the location the error values are typically returned. To help - * protect against this scenario you may consider adding unit tests that check your function does - * not modify output parameters when it actually returns a failing error code if it's possible for - * your code. - * - * If your function is void, this macro can be used without parameters. However, for the above - * reasoning, there should be no side effects on output parameters for all possible early returns. - * - * \param error_return_value the value returned as a result of an error. It does not need to be - * a rcutils_ret_t type. It could also be NULL, -1, a string error message, etc - */ -# define RCUTILS_CAN_RETURN_WITH_ERROR_OF(error_return_value) \ - RCUTILS_FAULT_INJECTION_MAYBE_RETURN_ERROR(error_return_value); - -/** - * \def RCUTILS_CAN_FAIL_WITH - * Indicating macro similar to RCUTILS_CAN_RETURN_WITH_ERROR_OF but for use with more complicated - * statements. - * - * The `failure_code` will be executed inside a scoped if block, so any variables declared within - * will not be available outside of the macro. - * - * One example where you might need this version, is if a side-effect may occur within a function. - * For example, in snprintf, rcutils_snprintf needs to set both errno and return -1 on failure. - * This macro is used to capture both effects. - * - * \param failure_code Code that is representative of the failure case in this function. - */ -# define RCUTILS_CAN_FAIL_WITH(failure_code) \ - RCUTILS_FAULT_INJECTION_MAYBE_FAIL(failure_code); - -#else -# define RCUTILS_CAN_RETURN_WITH_ERROR_OF(error_return_value) -# define RCUTILS_CAN_FAIL_WITH(failure_code) -#endif // defined RCUTILS_ENABLE_FAULT_INJECTION - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__MACROS_H_ diff --git a/ThirdParty/ros/include/rcutils/rcutils/allocator.h b/ThirdParty/ros/include/rcutils/rcutils/allocator.h new file mode 100644 index 000000000..b6c76ba6d --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/allocator.h @@ -0,0 +1,151 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__ALLOCATOR_H_ +#define RCUTILS__ALLOCATOR_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rcutils/macros.h" +#include "rcutils/types/rcutils_ret.h" +#include "rcutils/visibility_control.h" + +/// Encapsulation of an allocator. +/** + * The default allocator uses malloc(), free(), calloc(), and realloc(). + * It can be obtained using rcutils_get_default_allocator(). + * + * The allocator should be trivially copyable. + * Meaning that the struct should continue to work after being assignment + * copied into a new struct. + * Specifically the object pointed to by the state pointer should remain valid + * until all uses of the allocator have been made. + * Particular care should be taken when giving an allocator to functions like + * rcutils_*_init() where it is stored within another object and used later. + * Developers should note that, while the fields of a const-qualified allocator + * struct cannot be modified, the state of the allocator can be modified. + */ +typedef struct rcutils_allocator_s +{ + /// Allocate memory, given a size and the `state` pointer. + /** An error should be indicated by returning `NULL`. */ + void * (*allocate)(size_t size, void * state); + /// Deallocate previously allocated memory, mimicking free(). + /** Also takes the `state` pointer. */ + void (* deallocate)(void * pointer, void * state); + /// Reallocate if possible, otherwise it deallocates and allocates. + /** + * Also takes the `state` pointer. + * + * If unsupported then do deallocate and then allocate. + * This should behave as realloc() does, as opposed to posix's + * [reallocf](https://linux.die.net/man/3/reallocf), i.e. the memory given + * by pointer will not be free'd automatically if realloc() fails. + * For reallocf-like behavior use rcutils_reallocf(). + * This function must be able to take an input pointer of `NULL` and succeed. + */ + void * (*reallocate)(void * pointer, size_t size, void * state); + /// Allocate memory with all elements set to zero, given a number of elements and their size. + /** An error should be indicated by returning `NULL`. */ + void * (*zero_allocate)(size_t number_of_elements, size_t size_of_element, void * state); + /// Implementation defined state storage. + /** + * This is passed as the final parameter to other allocator functions. + * Note that the contents of the state can be modified even in const-qualified + * allocator objects. + */ + void * state; +} rcutils_allocator_t; + +/// Return a zero initialized allocator. +/** + * Note that this is an invalid allocator and should only be used as a placeholder. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_allocator_t +rcutils_get_zero_initialized_allocator(void); + +/// Return a properly initialized rcutils_allocator_t with default values. +/** + * This defaults to: + * + * - allocate = wraps malloc() + * - deallocate = wraps free() + * - reallocate = wraps realloc() + * - zero_allocate = wraps calloc() + * - state = `NULL` + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_allocator_t +rcutils_get_default_allocator(void); + +/// Return true if the given allocator has non-null function pointers. +/** + * \param[in] allocator to be checked by the function + * \return `true` if the allocator is valid, `false` otherwise. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +bool +rcutils_allocator_is_valid(const rcutils_allocator_t * allocator); + +/// Check the given allocator and run fail_statement if it is not valid. +#define RCUTILS_CHECK_ALLOCATOR(allocator, fail_statement) \ + if (!rcutils_allocator_is_valid(allocator)) { \ + fail_statement; \ + } + +/// Check the given allocator, and set the message in msg and run fail_statement if it is not valid. +#define RCUTILS_CHECK_ALLOCATOR_WITH_MSG(allocator, msg, fail_statement) \ + if (!rcutils_allocator_is_valid(allocator)) { \ + RCUTILS_SET_ERROR_MSG(msg); \ + fail_statement; \ + } + +/// Emulate the behavior of [reallocf](https://linux.die.net/man/3/reallocf). +/** + * This function will return `NULL` if the allocator is `NULL` or has `NULL` for + * function pointer fields. + * \param[inout] pointer to the memory which will be reallocated + * \param[in] size in bytes + * \param[in] allocator to be used to allocate and deallocate memory + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +void * +rcutils_reallocf(void * pointer, size_t size, rcutils_allocator_t * allocator); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__ALLOCATOR_H_ diff --git a/ThirdParty/ros/include/rcutils/rcutils/cmdline_parser.h b/ThirdParty/ros/include/rcutils/rcutils/cmdline_parser.h new file mode 100644 index 000000000..1cf9a2624 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/cmdline_parser.h @@ -0,0 +1,57 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__CMDLINE_PARSER_H_ +#define RCUTILS__CMDLINE_PARSER_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/visibility_control.h" + +/// Return `true` if the option is defined in the command line arguments or `false` otherwise. +/** + * \param[in] begin first element to check in the array + * \param[in] end last element to check in the array + * \param[in] option string to find in the array of arguments + * \return `true` if the option exists, or + * \return `false` otherwise. + */ +RCUTILS_PUBLIC +bool +rcutils_cli_option_exist(char ** begin, char ** end, const char * option); + +/// Return the value for a specific option of the command line arguments. +/** + * \param[in] begin first element to check in the array + * \param[in] end last element to check in the array + * \param[in] option string to find in the array of arguments + * \return the value for a specific option of the command line arguments, or + * \return `NULL` if the option doesn't exist. + */ +RCUTILS_PUBLIC +char * +rcutils_cli_get_option(char ** begin, char ** end, const char * option); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__CMDLINE_PARSER_H_ diff --git a/ThirdParty/ros/include/rcutils/rcutils/env.h b/ThirdParty/ros/include/rcutils/rcutils/env.h new file mode 100644 index 000000000..b82b3e0c8 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/env.h @@ -0,0 +1,122 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__ENV_H_ +#define RCUTILS__ENV_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/macros.h" +#include "rcutils/visibility_control.h" + +/// Set or un-set a process-scoped environment variable. +/** + * This function modifies the environment variables for the current process by + * copying given string values into the process' global environment variable + * store. + * + * \par Thread Safety: + * This function is not thread-safe. Take care not to modify the environment variables while + * another thread might be reading or writing environment variables. + * + * \par Platform Consistency: + * The behavior when setting a variable to an empty string (`""`) differs + * between platforms. On Windows, the variable is un-set (as if \p env_value was + * `NULL`), while on other platforms the variable is set to an empty string as + * expected. + * + * \param[in] env_name Name of the environment variable to modify. + * \param[in] env_value Value to set the environment variable to, or `NULL` to + * un-set. + * \return `true` if success, or + * \return `false` if env_name is invalid or NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +bool +rcutils_set_env(const char * env_name, const char * env_value); + +/// Retrieve the value of the given environment variable if it exists, or "". +/** The c-string which is returned in the env_value output parameter is only + * valid until the next time this function is called, because it is a direct + * pointer to the static storage. + * The variable env_value populated by this function should never have free() + * called on it. + * If the environment variable is not set, an empty string will be returned. + * + * In both cases, environment variable set or unset, NULL is returned unless + * an exception has occurred, in which case the error string is returned. + * For example: + * + * ```c + * #include + * #include + * const char * env_value; + * const char * error_str; + * error_str = rcutils_get_env("SOME_ENV_VAR", &env_value); + * if (error_str != NULL) { + * fprintf(stderr, "Error getting env var: %s\n", error_str); + * } + * printf("Valued of 'SOME_ENV_VAR': %s\n", env_value); + * ``` + * + * This function cannot be concurrently called together with rcutils_set_env (or any platform specific equivalent) + * on different threads, but multiple concurrent calls to this function are thread safe. + * + * \param[in] env_name the name of the environment variable + * \param[out] env_value pointer to the value cstring, or "" if unset + * \return NULL on success (success can be returning an empty string), or + * \return an error string on failure. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +const char * +rcutils_get_env(const char * env_name, const char ** env_value); + +/// Retrieve the full path to the home directory. +/** + * The c-string which is returned is only valid until the next time this + * function is called, because it is a direct pointer to the static storage. + * Also note that the string returned here should *not* be freed. + * + * The function first tries to get the HOME environment variable. + * If that variable exists and is non-empty, that will be returned. + * Otherwise, on Windows, the function tries to get the USERPROFILE environment variable. + * If that variable exists and is non-empty, that will be returned. + * Otherwise, NULL will be returned. + * + * This function cannot be thread-safely called together with rcutils_set_env + * (or any platform specific equivalent), but multiple calls to this function are thread safe. + * + * \return The home directory on success, or + * \return `NULL` on failure. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +const char * +rcutils_get_home_dir(void); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__ENV_H_ diff --git a/ThirdParty/ros/include/rcutils/error_handling.h b/ThirdParty/ros/include/rcutils/rcutils/error_handling.h similarity index 83% rename from ThirdParty/ros/include/rcutils/error_handling.h rename to ThirdParty/ros/include/rcutils/rcutils/error_handling.h index f5de2e43e..a6f8c740a 100644 --- a/ThirdParty/ros/include/rcutils/error_handling.h +++ b/ThirdParty/ros/include/rcutils/rcutils/error_handling.h @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Note: migrated from rmw/error_handling.h in 2017-04 +/// \file #ifndef RCUTILS__ERROR_HANDLING_H_ #define RCUTILS__ERROR_HANDLING_H_ @@ -41,27 +41,59 @@ extern "C" #include "rcutils/visibility_control.h" #ifdef __STDC_LIB_EXT1__ -// Limit the buffer size in the `fwrite` call to give an upper bound to buffer overrun in the case -// of non-null terminated `msg`. +/// Write the given msg out to stderr, limiting the buffer size in the `fwrite`. +/** + * This ensures that there is an upper bound to a buffer overrun if `msg` is + * non-null terminated. + */ #define RCUTILS_SAFE_FWRITE_TO_STDERR(msg) \ do {fwrite(msg, sizeof(char), strnlen_s(msg, 4096), stderr);} while (0) #else +/// Write the given msg out to stderr. #define RCUTILS_SAFE_FWRITE_TO_STDERR(msg) \ do {fwrite(msg, sizeof(char), strlen(msg), stderr);} while (0) #endif -// fixed constraints +/// Set the error message to stderr using a format string and format arguments. +/** + * This function sets the error message to stderr using the given format string. + * The resulting formatted string is silently truncated at + * RCUTILS_ERROR_MESSAGE_MAX_LENGTH. + * + * \param[in] format_string The string to be used as the format of the error message. + * \param[in] ... Arguments for the format string. + */ +#define RCUTILS_SAFE_FWRITE_TO_STDERR_WITH_FORMAT_STRING(format_string, ...) \ + do { \ + char output_msg[RCUTILS_ERROR_MESSAGE_MAX_LENGTH]; \ + int ret = rcutils_snprintf(output_msg, sizeof(output_msg), format_string, __VA_ARGS__); \ + if (ret < 0) { \ + RCUTILS_SAFE_FWRITE_TO_STDERR("Failed to call snprintf for error message formatting\n"); \ + } else { \ + RCUTILS_SAFE_FWRITE_TO_STDERR(output_msg); \ + } \ + } while (0) + +/// The maximum length a formatted number is allowed to have. #define RCUTILS_ERROR_STATE_LINE_NUMBER_STR_MAX_LENGTH 20 // "18446744073709551615" + +/// The maximum number of formatting characters allowed. #define RCUTILS_ERROR_FORMATTING_CHARACTERS 6 // ', at ' + ':' -// max formatted string length +/// The maximum formatted string length. #define RCUTILS_ERROR_MESSAGE_MAX_LENGTH 1024 -// adjustable max length for user defined error message -// remember "chained" errors will include previously specified file paths -// e.g. "some error, at /path/to/a.c:42, at /path/to/b.c:42" +/// The maximum length for user defined error message +/** + * Remember that "chained" errors will include previously specified file paths + * e.g. "some error, at /path/to/a.c:42, at /path/to/b.c:42" + */ #define RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH 768 -// with RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH = 768, RCUTILS_ERROR_STATE_FILE_MAX_LENGTH == 229 + +/// The calculated maximum length for the filename. +/** + * With RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH = 768, RCUTILS_ERROR_STATE_FILE_MAX_LENGTH == 229 + */ #define RCUTILS_ERROR_STATE_FILE_MAX_LENGTH ( \ RCUTILS_ERROR_MESSAGE_MAX_LENGTH - \ RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH - \ @@ -70,13 +102,14 @@ extern "C" 1) /// Struct wrapping a fixed-size c string used for returning the formatted error string. -typedef struct rcutils_error_string_t +typedef struct rcutils_error_string_s { + /// The fixed-size C string used for returning the formatted error string. char str[RCUTILS_ERROR_MESSAGE_MAX_LENGTH]; } rcutils_error_string_t; /// Struct which encapsulates the error state set by RCUTILS_SET_ERROR_MSG(). -typedef struct rcutils_error_state_t +typedef struct rcutils_error_state_s { /// User message storage, limited to RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH characters. char message[RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH]; @@ -132,10 +165,10 @@ static_assert( * match the allocator used originally to initialize the thread-local storage. * * \param[in] allocator to be used to allocate and deallocate memory - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if the allocator is invalid, or - * \return `RCUTILS_RET_BAD_ALLOC` if allocating memory fails, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occurs. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if the allocator is invalid, or + * \return #RCUTILS_RET_BAD_ALLOC if allocating memory fails, or + * \return #RCUTILS_RET_ERROR if an unspecified error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/rcutils/filesystem.h b/ThirdParty/ros/include/rcutils/rcutils/filesystem.h new file mode 100644 index 000000000..20dd2c7c7 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/filesystem.h @@ -0,0 +1,300 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__FILESYSTEM_H_ +#define RCUTILS__FILESYSTEM_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + +#include "rcutils/allocator.h" +#include "rcutils/macros.h" +#include "rcutils/visibility_control.h" + +/// Return current working directory. +/** + * \param[in] buffer Allocated string to store current directory path to + * \param[in] max_length maximum length to be stored in buffer + * \return `true` if success, or + * \return `false` if buffer is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +bool +rcutils_get_cwd(char * buffer, size_t max_length); + +/// Check if the provided path points to a directory. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if provided path is a directory, or + * \return `false` if abs_path is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_is_directory(const char * abs_path); + +/// Check if the provided path points to a file. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if provided path is a file, or + * \return `false` if abs_path is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_is_file(const char * abs_path); + +/// Check if the provided path points to an existing file/folder. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if the path exists, or + * \return `false` if abs_path is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_exists(const char * abs_path); + +/// Check if the provided path points to a file/folder readable by current user. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if the file is readable, or + * \return `false` if abs_path is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_is_readable(const char * abs_path); + +/// Check if the provided path points to a file/folder writable by current user. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if the file is writable, or + * \return `false` if abs_path is NULL, or + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_is_writable(const char * abs_path); + +/// Check if the provided path points to a file/folder both readable and writable by current user. +/** + * \param[in] abs_path Absolute path to check. + * \return `true` if the file is readable and writable, or + * \return `false` if abs_path is NULL + * \return `false` on failure. + */ +RCUTILS_PUBLIC +bool +rcutils_is_readable_and_writable(const char * abs_path); + +/// Return newly allocated string with arguments separated by correct delimiter for the platform. +/** + * This function allocates memory and returns it to the caller. + * It is up to the caller to release the memory once it is done with it by + * calling `deallocate` on the same allocator passed here. + * + * \param[in] left_hand_path + * \param[in] right_hand_path + * \param[in] allocator + * \return concatenated path on success + * \return `NULL` on invalid arguments + * \return `NULL` on failure + */ +RCUTILS_PUBLIC +char * +rcutils_join_path( + const char * left_hand_path, + const char * right_hand_path, + rcutils_allocator_t allocator); + +/// Return newly allocated string with all argument's "/" replaced by platform specific separator. +/** + * This function allocates memory and returns it to the caller. + * It is up to the caller to release the memory once it is done with it by + * calling `deallocate` on the same allocator passed here. + * + * \param[in] path + * \param[in] allocator + * \return path using platform specific delimiters on success + * \return `NULL` on invalid arguments + * \return `NULL` on failure + */ +RCUTILS_PUBLIC +char * +rcutils_to_native_path( + const char * path, + rcutils_allocator_t allocator); + +/// Expand user directory in path. +/** + * This function expands an initial '~' to the current user's home directory. + * The home directory is fetched using `rcutils_get_home_dir()`. + * This function returns a newly allocated string on success. + * It is up to the caller to release the memory once it is done with it by + * calling `deallocate` on the same allocator passed here. + * + * \param[in] path A null-terminated C string representing a path. + * \param[in] allocator + * \return path with expanded home directory on success, or + * \return `NULL` on invalid arguments, or + * \return `NULL` on failure. + */ +RCUTILS_PUBLIC +char * +rcutils_expand_user(const char * path, rcutils_allocator_t allocator); + +/// Create the specified directory. +/** + * This function creates an absolutely-specified directory. + * If any of the intermediate directories do not exist, this function will + * return False. + * If the abs_path already exists, and is a directory, this function will + * return true. + * + * This function is not thread-safe due to mkdir races as described in the + * openat(2) documentation. + * + * \param[in] abs_path + * \return `true` if making the directory was successful, or + * \return `false` if path is NULL, or + * \return `false` if path is empty, or + * \return `false` if path is not absolute, or + * \return `false` if any intermediate directories don't exist. + */ +RCUTILS_PUBLIC +bool +rcutils_mkdir(const char * abs_path); + +/// Calculate the size of the specified directory. +/** + * Calculates the size of a directory by summarizing the file size of all files. + * \note This operation is not recursive. + * \param[in] directory_path The directory path to calculate the size of. + * \param[out] size The size of the directory in bytes on success. + * \param[in] allocator Allocator being used for internal file path composition. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails + * \return #RCUTILS_RET_ERROR if other error occurs + */ +RCUTILS_PUBLIC +rcutils_ret_t +rcutils_calculate_directory_size( + const char * directory_path, + uint64_t * size, + rcutils_allocator_t allocator); + +/// Calculate the size of the specified directory with recursion. +/** + * Calculates the size of a directory and subdirectory by summarizing the file size of all files. + * If necessary, you can specify the maximum directory depth to recurse into. + * Depth definition as below. + * \code + * directory_path <= depth 1 + * |- subdirectory <= depth 2 + * |- subdirectory <= depth 3 + * ... + * \endcode + * + * \note This API does not follow symlinks to files or directories. + * \param[in] directory_path The directory path to calculate the size of. + * \param[in] max_depth The maximum depth of subdirectory. 0 means no limitation. + * \param[out] size The size of the directory in bytes on success. + * \param[in] allocator Allocator being used for internal file path composition. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails + * \return #RCUTILS_RET_ERROR if other error occurs + */ +RCUTILS_PUBLIC +rcutils_ret_t +rcutils_calculate_directory_size_with_recursion( + const char * directory_path, + const size_t max_depth, + uint64_t * size, + rcutils_allocator_t allocator); + +/// Calculate the size of the specifed file. +/** + * \param[in] file_path The path of the file to obtain its size of. + * \return The size of the file in bytes. + */ +RCUTILS_PUBLIC +size_t +rcutils_get_file_size(const char * file_path); + +/// An iterator used for enumerating directory contents +typedef struct rcutils_dir_iter_s +{ + /// The name of the enumerated file or directory + const char * entry_name; + /// The allocator used internally by iteration functions + rcutils_allocator_t allocator; + /// The platform-specific iteration state + void * state; +} rcutils_dir_iter_t; + +/// Begin iterating over the contents of the specified directory. +/** + * This function is used to list the files and directories that are contained in + * a specified directory. The structure returned by it must be deallocated using + * ::rcutils_dir_iter_end when the iteration is completed. The name of the + * enumerated entry is stored in the `entry_name` member of the returned object, + * and the first entry is already populated upon completion of this function. To + * populate the entry with the name of the next entry, use the + * ::rcutils_dir_iter_next function. Note that the "." and ".." entries are + * typically among the entries enumerated. + * \param[in] directory_path The directory path to iterate over the contents of. + * \param[in] allocator Allocator used to create the returned structure. + * \return An iterator object used to continue iterating directory contents + * \return NULL if an error occurred + */ +RCUTILS_PUBLIC +rcutils_dir_iter_t * +rcutils_dir_iter_start(const char * directory_path, const rcutils_allocator_t allocator); + +/// Continue iterating over the contents of a directory. +/** + * \param[in] iter An iterator created by ::rcutils_dir_iter_start. + * \return `true` if another entry was found, or + * \return `false` if there are no more entries in the directory. + */ +RCUTILS_PUBLIC +bool +rcutils_dir_iter_next(rcutils_dir_iter_t * iter); + +/// Finish iterating over the contents of a directory. +/** + * \param[in] iter An iterator created by ::rcutils_dir_iter_start. + */ +RCUTILS_PUBLIC +void +rcutils_dir_iter_end(rcutils_dir_iter_t * iter); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__FILESYSTEM_H_ diff --git a/ThirdParty/ros/include/rcutils/find.h b/ThirdParty/ros/include/rcutils/rcutils/find.h similarity index 77% rename from ThirdParty/ros/include/rcutils/find.h rename to ThirdParty/ros/include/rcutils/rcutils/find.h index 454be1352..4569a935a 100644 --- a/ThirdParty/ros/include/rcutils/find.h +++ b/ThirdParty/ros/include/rcutils/rcutils/find.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__FIND_H_ #define RCUTILS__FIND_H_ @@ -29,8 +31,9 @@ extern "C" * * \param[in] str null terminated c string to search * \param[in] delimiter the character to search for - * \returns the index of the first occurence of the delimiter if found, or - * \returns `SIZE_MAX` for invalid arguments or if the delimiter is not found + * \return the index of the first occurence of the delimiter if found, or + * \return `SIZE_MAX` for invalid arguments, or + * \return `SIZE_MAX` if the delimiter is not found. */ RCUTILS_PUBLIC size_t @@ -44,8 +47,9 @@ rcutils_find(const char * str, char delimiter); * \param[in] str string to search * \param[in] delimiter the character to search for * \param[in] string_length length of the string to search - * \returns the index of the first occurence of the delimiter if found, or - * \returns `SIZE_MAX` for invalid arguments or if the delimiter is not found + * \return the index of the first occurence of the delimiter if found, or + * \return `SIZE_MAX` for invalid arguments, or + * \return `SIZE_MAX` if the delimiter is not found. */ RCUTILS_PUBLIC size_t @@ -57,8 +61,9 @@ rcutils_findn(const char * str, char delimiter, size_t string_length); * * \param[in] str null terminated c string to search * \param[in] delimiter the character to search for - * \returns the index of the last occurence of the delimiter if found, or - * \returns `SIZE_MAX` for invalid arguments or if the delimiter is not found + * \return the index of the last occurence of the delimiter if found, or + * \return `SIZE_MAX` for invalid arguments, or + * \return `SIZE_MAX` if the delimiter is not found. */ RCUTILS_PUBLIC size_t @@ -72,8 +77,9 @@ rcutils_find_last(const char * str, char delimiter); * \param[in] str string to search * \param[in] delimiter the character to search for * \param[in] string_length length of the string to search - * \returns the index of the last occurence of the delimiter if found, or - * \returns `SIZE_MAX` for invalid arguments or if the delimiter is not found + * \return the index of the last occurence of the delimiter if found, or + * \return `SIZE_MAX` for invalid arguments, or + * \return `SIZE_MAX` if the delimiter is not found. */ RCUTILS_PUBLIC size_t diff --git a/ThirdParty/ros/include/rcutils/format_string.h b/ThirdParty/ros/include/rcutils/rcutils/format_string.h similarity index 93% rename from ThirdParty/ros/include/rcutils/format_string.h rename to ThirdParty/ros/include/rcutils/rcutils/format_string.h index b4d8090ba..37e5262dc 100644 --- a/ThirdParty/ros/include/rcutils/format_string.h +++ b/ThirdParty/ros/include/rcutils/rcutils/format_string.h @@ -60,7 +60,8 @@ extern "C" * \param[in] allocator the allocator to use for allocation * \param[in] limit maximum length of the output string * \param[in] format_string format of the output, must be null terminated - * \returns output string or null if there was an error + * \return The newly allocated and format output string, or + * \return `NULL` if there was an error. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -70,7 +71,10 @@ rcutils_format_string_limit( size_t limit, const char * format_string, ...) -RCUTILS_ATTRIBUTE_PRINTF_FORMAT(3, 4); +/// @cond Doxygen_Suppress +RCUTILS_ATTRIBUTE_PRINTF_FORMAT(3, 4) +/// @endcond +; #ifdef __cplusplus } diff --git a/ThirdParty/ros/include/rcutils/rcutils/get_env.h b/ThirdParty/ros/include/rcutils/rcutils/get_env.h new file mode 100644 index 000000000..381f3de53 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/get_env.h @@ -0,0 +1,30 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__GET_ENV_H_ +#define RCUTILS__GET_ENV_H_ + +// TODO(christophebedard) remove this header completely in I-turtle + +#ifdef _MSC_VER +#pragma message ("rcutils/get_env.h has been deprecated, please include rcutils/env.h instead") +#else +#warning rcutils/get_env.h has been deprecated, please include rcutils/env.h instead +#endif + +#include "rcutils/env.h" + +#endif // RCUTILS__GET_ENV_H_ diff --git a/ThirdParty/ros/include/rcutils/isalnum_no_locale.h b/ThirdParty/ros/include/rcutils/rcutils/isalnum_no_locale.h similarity index 99% rename from ThirdParty/ros/include/rcutils/isalnum_no_locale.h rename to ThirdParty/ros/include/rcutils/rcutils/isalnum_no_locale.h index 1f02f9140..052ad53e3 100644 --- a/ThirdParty/ros/include/rcutils/isalnum_no_locale.h +++ b/ThirdParty/ros/include/rcutils/rcutils/isalnum_no_locale.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__ISALNUM_NO_LOCALE_H_ #define RCUTILS__ISALNUM_NO_LOCALE_H_ diff --git a/ThirdParty/ros/include/rcutils/rcutils/logging.h b/ThirdParty/ros/include/rcutils/rcutils/logging.h new file mode 100644 index 000000000..851b90727 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/logging.h @@ -0,0 +1,542 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__LOGGING_H_ +#define RCUTILS__LOGGING_H_ + +#include +#include +#include + +#include "rcutils/allocator.h" +#include "rcutils/error_handling.h" +#include "rcutils/macros.h" +#include "rcutils/time.h" +#include "rcutils/types/rcutils_ret.h" +#include "rcutils/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// The separator used when logging node names. +#define RCUTILS_LOGGING_SEPARATOR_STRING "." + +/** + * \def RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL + * \brief The default severity level of the default logger. + */ +#define RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL RCUTILS_LOG_SEVERITY_INFO + +/// The flag if the logging system has been initialized. +RCUTILS_PUBLIC +extern bool g_rcutils_logging_initialized; + +/// Initialize the logging system using the specified allocator. +/** + * Initialize the logging system only if it was not in an initialized state. + * + * If an invalid allocator is passed, the initialization will fail. + * Otherwise, this function will still set the internal state to initialized + * even if an error occurs, to avoid repeated failing initialization attempts + * since this function is called automatically from logging macros. + * To re-attempt initialization, call rcutils_logging_shutdown() before + * re-calling this function. + * + * If multiple errors occur, the error code of the last error will be returned. + * + * The `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable can be used to set + * the output format of messages logged to the console. + * Available tokens are: + * - `file_name`, the full file name of the caller including the path + * - `function_name`, the function name of the caller + * - `line_number`, the line number of the caller + * - `message`, the message string after it has been formatted + * - `name`, the full logger name + * - `severity`, the name of the severity level, e.g. `INFO` + * - `time`, the timestamp of log message in floating point seconds + * - `time_as_nanoseconds`, the timestamp of log message in integer nanoseconds + * + * The `RCUTILS_COLORIZED_OUTPUT` environment variable allows configuring if colours + * are used or not. Available values are: + * - `1`: Force using colours. + * - `0`: Don't use colours. + * If it is unset, colours are used depending if the target stream is a terminal or not. + * See `isatty` documentation. + * + * The format string can use these tokens by referencing them in curly brackets, + * e.g. `"[{severity}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})"`. + * Any number of tokens can be used. + * The limit of the format string is 2048 characters. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] allocator rcutils_allocator_t to be used. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if the allocator is invalid, in which + * case initialization will fail, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if an error occurs reading the output + * format from the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable, in + * which case the default format will be used, or + * \return #RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID if the internal logger + * severity level map cannot be initialized, in which case logger severity + * levels will not be configurable. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t rcutils_logging_initialize_with_allocator(rcutils_allocator_t allocator); + +/// Initialize the logging system. +/** + * Call rcutils_logging_initialize_with_allocator() using the default allocator. + * This function is called automatically when using the logging macros. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if an error occurs reading the output + * format from the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable, in + * which case the default format will be used, or + * \return #RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID if the internal logger + * severity level map cannot be initialized, in which case logger levels + * will not be configurable. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t rcutils_logging_initialize(void); + +/// Shutdown the logging system. +/** + * Free the resources allocated for the logging system. + * This puts the system into a state equivalent to being uninitialized. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID if the internal logger + * severity level map cannot be finalized. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t rcutils_logging_shutdown(void); + +/// The structure identifying the caller location in the source code. +typedef struct rcutils_log_location_s +{ + /// The name of the function containing the log call. + const char * function_name; + /// The name of the source file containing the log call. + const char * file_name; + /// The line number containing the log call. + size_t line_number; +} rcutils_log_location_t; + +/// The severity levels of log messages / loggers. +enum RCUTILS_LOG_SEVERITY +{ + RCUTILS_LOG_SEVERITY_UNSET = 0, ///< The unset log level + RCUTILS_LOG_SEVERITY_DEBUG = 10, ///< The debug log level + RCUTILS_LOG_SEVERITY_INFO = 20, ///< The info log level + RCUTILS_LOG_SEVERITY_WARN = 30, ///< The warn log level + RCUTILS_LOG_SEVERITY_ERROR = 40, ///< The error log level + RCUTILS_LOG_SEVERITY_FATAL = 50, ///< The fatal log level +}; + +/// The names of severity levels. +RCUTILS_PUBLIC +extern const char * const g_rcutils_log_severity_names[RCUTILS_LOG_SEVERITY_FATAL + 1]; + +/// Get a severity value from its string representation (e.g. DEBUG). +/** + * String representation must match one of the values in + * `g_rcutils_log_severity_names`, but is not case-sensitive. + * Examples: UNSET, DEBUG, INFO, WARN, Error, fatal. + * + * \param[in] severity_string String representation of the severity, must be a + * null terminated c string + * \param[in] allocator rcutils_allocator_t to be used + * \param[in,out] severity The severity level as a represented by the + * `RCUTILS_LOG_SEVERITY` enum + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT on invalid arguments, or + * \return #RCUTILS_RET_LOGGING_SEVERITY_STRING_INVALID if unable to match + * string, or + * \return #RCUTILS_RET_ERROR if an unspecified error occured. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t +rcutils_logging_severity_level_from_string( + const char * severity_string, rcutils_allocator_t allocator, int * severity); + +/// The function signature to log messages. +/** + * \param[in] location The location information about where the log came from + * \param[in] severity The severity of the log message expressed as an integer + * \param[in] name The name of the logger that this message came from + * \param[in] timestamp The time at which the log message was generated + * \param[in] format The list of arguments to insert into the formatted log message + * \param[in] args The variable argument list + */ +typedef void (* rcutils_logging_output_handler_t)( + const rcutils_log_location_t *, // location + int, // severity + const char *, // name + rcutils_time_point_value_t, // timestamp + const char *, // format + va_list * // args +); + +/// The function pointer of the current output handler. +RCUTILS_PUBLIC +extern rcutils_logging_output_handler_t g_rcutils_logging_output_handler; + +/// Get the current output handler. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return The function pointer of the current output handler. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_logging_output_handler_t rcutils_logging_get_output_handler(); + +/// Set the current output handler. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] function The function pointer of the output handler to be used. + */ +RCUTILS_PUBLIC +void rcutils_logging_set_output_handler(rcutils_logging_output_handler_t function); + +/// Formats a log message according to RCUTILS_CONSOLE_OUTPUT_FORMAT +/** + * A formatter that is meant to be used by an output handler to format a log message to the match + * the format specified in RCUTILS_CONSOLE_OUTPUT_FORMAT by performing token replacement. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] location The location information about where the log came from + * \param[in] severity The severity of the log message expressed as an integer + * \param[in] name The name of the logger that this message came from + * \param[in] timestamp The time at which the log message was generated + * \param[in] msg The message being logged + * \param[out] logging_output An output buffer for the formatted message + * \return #RCUTILS_RET_OK if successful. + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation error occured + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t rcutils_logging_format_message( + const rcutils_log_location_t * location, + int severity, const char * name, rcutils_time_point_value_t timestamp, + const char * msg, rcutils_char_array_t * logging_output); + +/// The default severity level for loggers. +/** + * This level is used for (1) nameless log calls and (2) named log + * calls where the effective level of the logger name is unspecified. + * + * \see rcutils_logging_get_logger_effective_level() + */ +RCUTILS_PUBLIC +extern int g_rcutils_logging_default_logger_level; + +/// Get the default level for loggers. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \return The level. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int rcutils_logging_get_default_logger_level(); + +/// Set the default severity level for loggers. +/** + * If the severity level requested is `RCUTILS_LOG_SEVERITY_UNSET`, the default + * value for the default logger (`RCUTILS_DEFAULT_LOGGER_DEFAULT_LEVEL`) + * will be restored instead. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] level The level to be used. + */ +RCUTILS_PUBLIC +void rcutils_logging_set_default_logger_level(int level); + +/// Get the severity level for a logger. +/** + * This considers the severity level of the specifed logger only. + * To get the effective level of a logger given the severity level of its + * ancestors, see rcutils_logging_get_logger_effective_level(). + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] name The name of the logger, must be null terminated c string + * \return The level of the logger if it has been set, or + * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or + * \return `g_rcutils_logging_default_logger_level` for an empty name, or + * \return -1 on invalid arguments, or + * \return -1 if an error occurred + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int rcutils_logging_get_logger_level(const char * name); + +/// Get the level for a logger and its name length. +/** + * Identical to rcutils_logging_get_logger_level() but without + * relying on the logger name to be a null terminated c string. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] name The name of the logger + * \param[in] name_length Logger name length + * \return The level of the logger if it has been set, or + * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or + * \return `g_rcutils_logging_default_logger_level` for `name_length` of `0`, or + * \return -1 on invalid arguments, or + * \return -1 if an error occurred + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int rcutils_logging_get_logger_leveln(const char * name, size_t name_length); + +/// Set the severity level for a logger. +/** + * If an empty string is specified as the name, the + * `g_rcutils_logging_default_logger_level` will be set. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] name The name of the logger, must be null terminated c string. + * \param[in] level The level to be used. + * \return `RCUTILS_RET_OK` if successful, or + * \return `RCUTILS_RET_INVALID_ARGUMENT` on invalid arguments, or + * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if severity map invalid, or + * \return `RCUTILS_RET_ERROR` if an unspecified error occured + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t rcutils_logging_set_logger_level(const char * name, int level); + +/// Determine if a logger is enabled for a severity level. +/** + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] name The name of the logger, must be null terminated c string or NULL. + * \param[in] severity The severity level. + * + * \return `true` if the logger is enabled for the level, or + * \return `false` otherwise. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +bool rcutils_logging_logger_is_enabled_for(const char * name, int severity); + +/// Determine the effective level for a logger. +/** + * The effective level is determined as the severity level of + * the logger if it is set, otherwise it is the first specified severity + * level of the logger's ancestors, starting with its closest ancestor. + * The ancestor hierarchy is signified by logger names being separated by dots: + * a logger named `x` is an ancestor of `x.y`, and both `x` and `x.y` are + * ancestors of `x.y.z`, etc. + * If the level has not been set for the logger nor any of its + * ancestors, the default level is used. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, provided logging system is already initialized + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] name The name of the logger, must be null terminated c string. + * + * \return The level, or + * \return -1 on invalid arguments, or + * \return -1 if an error occurred. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int rcutils_logging_get_logger_effective_level(const char * name); + +/// Log a message. +/** + * The attributes of this function are also being influenced by the currently + * set output handler. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No, for formatted outputs <= 1023 characters + * | Yes, for formatted outputs >= 1024 characters + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string or NULL + * \param[in] format The format string + * \param[in] ... The variable arguments + */ +RCUTILS_PUBLIC +void rcutils_log( + const rcutils_log_location_t * location, + int severity, + const char * name, + const char * format, + ...) +/// @cond Doxygen_Suppress +RCUTILS_ATTRIBUTE_PRINTF_FORMAT(4, 5) +/// @endcond +; + +/// The default output handler outputs log messages to the standard streams. +/** + * The messages with a severity level `DEBUG` and `INFO` are written to `stdout`. + * The messages with a severity level `WARN`, `ERROR`, and `FATAL` are written + * to `stderr`. + * The console output format of the logged message can be configured through + * the `RCUTILS_CONSOLE_OUTPUT_FORMAT` environment variable: see + * rcutils_logging_initialize_with_allocator() for details. + * For configuring if using colours or not, `RCUTILS_COLORIZED_OUTPUT` can be used: + * see rcutils_logging_initialize_with_allocator() for details. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes, if the underlying *printf functions are + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string + * \param[in] timestamp The timestamp for when the log message was made + * \param[in] format The format string + * \param[in] args The `va_list` used by the logger + */ +RCUTILS_PUBLIC +void rcutils_logging_console_output_handler( + const rcutils_log_location_t * location, + int severity, const char * name, rcutils_time_point_value_t timestamp, + const char * format, va_list * args); + +/** + * \def RCUTILS_LOGGING_AUTOINIT + * \brief Initialize the rcl logging library. + * Usually it is unnecessary to call the macro directly. + * All logging macros ensure that this has been called once. + */ +#define RCUTILS_LOGGING_AUTOINIT \ + do { \ + if (RCUTILS_UNLIKELY(!g_rcutils_logging_initialized)) { \ + if (rcutils_logging_initialize() != RCUTILS_RET_OK) { \ + RCUTILS_SAFE_FWRITE_TO_STDERR( \ + "[rcutils|" __FILE__ ":" RCUTILS_STRINGIFY(__LINE__) \ + "] error initializing logging: "); \ + RCUTILS_SAFE_FWRITE_TO_STDERR(rcutils_get_error_string().str); \ + RCUTILS_SAFE_FWRITE_TO_STDERR("\n"); \ + rcutils_reset_error(); \ + } \ + } \ + } while (0) + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__LOGGING_H_ diff --git a/ThirdParty/ros/include/rcutils/logging_macros.h b/ThirdParty/ros/include/rcutils/rcutils/logging_macros.h similarity index 99% rename from ThirdParty/ros/include/rcutils/logging_macros.h rename to ThirdParty/ros/include/rcutils/rcutils/logging_macros.h index 2c05f89d3..d7d3b771a 100644 --- a/ThirdParty/ros/include/rcutils/logging_macros.h +++ b/ThirdParty/ros/include/rcutils/rcutils/logging_macros.h @@ -65,7 +65,7 @@ extern "C" */ #define RCUTILS_LOG_COND_NAMED(severity, condition_before, condition_after, name, ...) \ do { \ - RCUTILS_LOGGING_AUTOINIT \ + RCUTILS_LOGGING_AUTOINIT; \ static rcutils_log_location_t __rcutils_logging_location = {__func__, __FILE__, __LINE__}; \ if (rcutils_logging_logger_is_enabled_for(name, severity)) { \ condition_before \ diff --git a/ThirdParty/ros/include/rcutils/rcutils/macros.h b/ThirdParty/ros/include/rcutils/rcutils/macros.h new file mode 100644 index 000000000..f54fb0db3 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/macros.h @@ -0,0 +1,218 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__MACROS_H_ +#define RCUTILS__MACROS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifndef _WIN32 +/// A macro to make the compiler warn when the return value of a function is not used. +#define RCUTILS_WARN_UNUSED __attribute__((warn_unused_result)) +#else +/// A macro to make the compiler warn when the return value of a function is not used. +#define RCUTILS_WARN_UNUSED _Check_return_ +#endif + +/// @cond Doxygen_Suppress +// This block either sets RCUTILS_THREAD_LOCAL or RCUTILS_THREAD_LOCAL_PTHREAD. +#if defined _WIN32 || defined __CYGWIN__ +// Windows or Cygwin + #define RCUTILS_THREAD_LOCAL __declspec(thread) +#elif defined __APPLE__ +// Apple OS's + #include + #if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE +// iOS Simulator or iOS device + #include + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 +// iOS >= 10, thread local storage was added in iOS 10 + #define RCUTILS_THREAD_LOCAL _Thread_local + #else +// iOS < 10, no thread local storage, so use pthread instead + #define RCUTILS_THREAD_LOCAL_PTHREAD 1 + #undef RCUTILS_THREAD_LOCAL + #endif + #else + #error "Unknown iOS version" + #endif + #elif TARGET_OS_MAC +// macOS + #define RCUTILS_THREAD_LOCAL _Thread_local + #else + #error "Unknown Apple platform" + #endif +#else +// Some other non-Windows, non-cygwin, non-apple OS + #define RCUTILS_THREAD_LOCAL _Thread_local +#endif + +#define RCUTILS_STRINGIFY_IMPL(x) #x +#define RCUTILS_STRINGIFY(x) RCUTILS_STRINGIFY_IMPL(x) + +/// A macro to mark an argument or variable as unused. +#define RCUTILS_UNUSED(x) (void)(x) + +#define RCUTILS_JOIN_IMPL(arg1, arg2) arg1 ## arg2 +#define RCUTILS_JOIN(arg1, arg2) RCUTILS_JOIN_IMPL(arg1, arg2) +/// @endcond + +#if defined _WIN32 || defined __CYGWIN__ +/// Macro to annotate printf-like functions on Linux. Disabled on Windows. +#define RCUTILS_ATTRIBUTE_PRINTF_FORMAT(format_string_index, first_to_check_index) +#else +/// Macro to annotate printf-like functions which are relying on a format string and a variable +/// number of arguments. +/** + * This enables GCC to emit warnings if dangerous patterns are detected. + * See GCC documentation for details: + * https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html + * + * For the following function: + * ``` + * int snprintf(char *str, size_t size, const char *format, ...); + * ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^ + * ARG 1 ARG 2 ARG 3 ARG 4 + * format string first optional argument + * ``` + * format_string_index value would be 3, first_to_check_index value would be 4. + * + * IMPORTANT: the first argument has an index of ONE (not zero!). + * + * \param[in] format_string_index index of the format string passed to the function + * \param[in] first_to_check_index index of the first "optional argument" + */ +#define RCUTILS_ATTRIBUTE_PRINTF_FORMAT(format_string_index, first_to_check_index) \ + __attribute__ ((format(printf, format_string_index, first_to_check_index))) +#endif // !defined _WIN32 || defined __CYGWIN__ + +/// Macro to declare deprecation in the platform appropriate manner. +#ifndef _WIN32 +# define RCUTILS_DEPRECATED __attribute__((deprecated)) +#else +# define RCUTILS_DEPRECATED __declspec(deprecated) +#endif + +/// Macro to declare deprecation in the platform appropriate manner with a message. +#ifndef _WIN32 +# define RCUTILS_DEPRECATED_WITH_MSG(msg) __attribute__((deprecated(msg))) +#else +# define RCUTILS_DEPRECATED_WITH_MSG(msg) __declspec(deprecated(msg)) +#endif + +// Provide the compiler with branch prediction information +#ifndef _WIN32 +/** + * \def RCUTILS_LIKELY + * Instruct the compiler to optimize for the case where the argument equals 1. + */ +# define RCUTILS_LIKELY(x) __builtin_expect((x), 1) +/** + * \def RCUTILS_UNLIKELY + * Instruct the compiler to optimize for the case where the argument equals 0. + */ +# define RCUTILS_UNLIKELY(x) __builtin_expect((x), 0) +#else +/** + * \def RCUTILS_LIKELY + * No op since Windows doesn't support providing branch prediction information. + */ +# define RCUTILS_LIKELY(x) (x) +/** + * \def RCUTILS_UNLIKELY + * No op since Windows doesn't support providing branch prediction information. + */ +# define RCUTILS_UNLIKELY(x) (x) +#endif // _WIN32 + +#if defined RCUTILS_ENABLE_FAULT_INJECTION +#include "rcutils/testing/fault_injection.h" + +/** + * \def RCUTILS_CAN_RETURN_WITH_ERROR_OF + * Indicating macro that the function intends to return possible error value. + * + * Put this macro as the first line in the function. For example: + * + * int rcutils_function_that_can_fail() { + * RCUTILS_CAN_RETURN_WITH_ERROR_OF(RCUTILS_RET_INVALID_ARGUMENT); + * ... // rest of function + * } + * + * For now, this macro just simply calls `RCUTILS_FAULT_INJECTION_MAYBE_RETURN_ERROR` if fault + * injection is enabled. However, for source code, the macro annotation + * `RCUTILS_CAN_RETURN_WITH_ERROR_OF` helps clarify that a function may return a value signifying + * an error and what those are. + * + * In general, you should only include a return value that originates in the function you're + * annotating instead of one that is merely passed on from a called function already annotated with + *`RCUTILS_CAN_RETURN_WITH_ERROR_OF`. If you are passing on return values from a called function, + * but that function is not annotated with `RCUTILS_CAN_RETURN_WITH_ERROR_OF`, then you might + * consider annotating that function first. If for some reason that is not desired or possible, + * then annotate your function as if the return values you are passing on originated from your + * function. + * + * If the function can return multiple return values indicating separate failure types, each one + * should go on a separate line. + * + * If in your function, there are expected effects on output parameters that occur during + * the failure case, then it will introduce a discrepancy between fault injection testing and + * production operation. This is because the fault injection will cause the function to return + * where this macro is used, not at the location the error values are typically returned. To help + * protect against this scenario you may consider adding unit tests that check your function does + * not modify output parameters when it actually returns a failing error code if it's possible for + * your code. + * + * If your function is void, this macro can be used without parameters. However, for the above + * reasoning, there should be no side effects on output parameters for all possible early returns. + * + * \param error_return_value the value returned as a result of an error. It does not need to be + * a rcutils_ret_t type. It could also be NULL, -1, a string error message, etc + */ +# define RCUTILS_CAN_RETURN_WITH_ERROR_OF(error_return_value) \ + RCUTILS_FAULT_INJECTION_MAYBE_RETURN_ERROR(error_return_value); + +/** + * \def RCUTILS_CAN_FAIL_WITH + * Indicating macro similar to RCUTILS_CAN_RETURN_WITH_ERROR_OF but for use with more complicated + * statements. + * + * The `failure_code` will be executed inside a scoped if block, so any variables declared within + * will not be available outside of the macro. + * + * One example where you might need this version, is if a side-effect may occur within a function. + * For example, in snprintf, rcutils_snprintf needs to set both errno and return -1 on failure. + * This macro is used to capture both effects. + * + * \param failure_code Code that is representative of the failure case in this function. + */ +# define RCUTILS_CAN_FAIL_WITH(failure_code) \ + RCUTILS_FAULT_INJECTION_MAYBE_FAIL(failure_code); + +#else +# define RCUTILS_CAN_RETURN_WITH_ERROR_OF(error_return_value) +# define RCUTILS_CAN_FAIL_WITH(failure_code) +#endif // defined RCUTILS_ENABLE_FAULT_INJECTION + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__MACROS_H_ diff --git a/ThirdParty/ros/include/rcutils/process.h b/ThirdParty/ros/include/rcutils/rcutils/process.h similarity index 94% rename from ThirdParty/ros/include/rcutils/process.h rename to ThirdParty/ros/include/rcutils/rcutils/process.h index adc914f41..e1bf6e07e 100644 --- a/ThirdParty/ros/include/rcutils/process.h +++ b/ThirdParty/ros/include/rcutils/rcutils/process.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__PROCESS_H_ #define RCUTILS__PROCESS_H_ @@ -45,7 +47,8 @@ int rcutils_get_pid(void); * This function is thread-safe. * * \param[in] allocator the allocator to use - * \return The program name on success, NULL on failure. + * \return The program name on success, or + * \return NULL on failure. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/qsort.h b/ThirdParty/ros/include/rcutils/rcutils/qsort.h similarity index 89% rename from ThirdParty/ros/include/rcutils/qsort.h rename to ThirdParty/ros/include/rcutils/rcutils/qsort.h index 41e848c69..9af8904a1 100644 --- a/ThirdParty/ros/include/rcutils/qsort.h +++ b/ThirdParty/ros/include/rcutils/rcutils/qsort.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__QSORT_H_ #define RCUTILS__QSORT_H_ @@ -35,9 +37,9 @@ extern "C" * \param[in] count number of elements present in the object. * \param[in] size size of each element, in bytes. * \param[in] comp function used to compare two elements. - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/repl_str.h b/ThirdParty/ros/include/rcutils/rcutils/repl_str.h similarity index 99% rename from ThirdParty/ros/include/rcutils/repl_str.h rename to ThirdParty/ros/include/rcutils/rcutils/repl_str.h index 979189fcd..a080b7d16 100644 --- a/ThirdParty/ros/include/rcutils/repl_str.h +++ b/ThirdParty/ros/include/rcutils/rcutils/repl_str.h @@ -23,6 +23,8 @@ // It has been modified to take a custom allocator and to fit some of our // style standards. +/// \file + #ifndef RCUTILS__REPL_STR_H_ #define RCUTILS__REPL_STR_H_ @@ -120,7 +122,7 @@ extern "C" * \param[in] from string to match for replacement * \param[in] to string to replace matched strings with * \param[in] allocator structure defining functions to be used for allocation - * \return duplicated `str` with all matches of `from` replaced with `to` + * \return duplicated `str` with all matches of `from` replaced with `to`. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/shared_library.h b/ThirdParty/ros/include/rcutils/rcutils/shared_library.h similarity index 84% rename from ThirdParty/ros/include/rcutils/shared_library.h rename to ThirdParty/ros/include/rcutils/rcutils/shared_library.h index 51315ea2b..996e0855d 100644 --- a/ThirdParty/ros/include/rcutils/shared_library.h +++ b/ThirdParty/ros/include/rcutils/rcutils/shared_library.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__SHARED_LIBRARY_H_ #define RCUTILS__SHARED_LIBRARY_H_ @@ -28,7 +30,7 @@ extern "C" #include "rcutils/visibility_control.h" /// Handle to a loaded shared library. -typedef struct RCUTILS_PUBLIC_TYPE rcutils_shared_library_t +typedef struct RCUTILS_PUBLIC_TYPE rcutils_shared_library_s { /// The platform-specific pointer to the shared library void * lib_pointer; @@ -39,7 +41,7 @@ typedef struct RCUTILS_PUBLIC_TYPE rcutils_shared_library_t } rcutils_shared_library_t; /// Return an empty shared library struct. -/* +/** * This function returns an empty and zero initialized shared library struct. * * Example: @@ -75,10 +77,10 @@ rcutils_get_zero_initialized_shared_library(void); * \param[inout] lib struct with the shared library pointer and shared library path name * \param[in] library_path string with the path of the library * \param[in] allocator to be used to allocate and deallocate memory - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -92,7 +94,8 @@ rcutils_load_shared_library( /** * \param[in] lib struct with the shared library pointer and shared library path name * \param[in] symbol_name name of the symbol inside the shared library - * \return shared library symbol pointer, if the symbol doesn't exist then returns NULL. + * \return shared library symbol pointer, or + * \return `NULL` if the symbol doesn't exist. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -103,7 +106,8 @@ rcutils_get_symbol(const rcutils_shared_library_t * lib, const char * symbol_nam /** * \param[in] lib struct with the shared library pointer and shared library path name * \param[in] symbol_name name of the symbol inside the shared library - * \return if symbols exists returns true, otherwise returns false. + * \return `true` if the symbol exists, or + * \return `false` otherwise. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -113,9 +117,9 @@ rcutils_has_symbol(const rcutils_shared_library_t * lib, const char * symbol_nam /// Unload the shared library. /** * \param[in] lib rcutils_shared_library_t to be finalized - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -128,7 +132,8 @@ rcutils_unload_shared_library(rcutils_shared_library_t * lib); * It could very well be that a second shared library handle is still open and therefore the library * being loaded. * \param[in] lib rcutils_shared_library_t to check - * \return true if library is loaded, false otherwise + * \return `true` if library is loaded, or + * \return `false` otherwise. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -142,8 +147,8 @@ rcutils_is_shared_library_loaded(rcutils_shared_library_t * lib); * \param[in] buffer_size size of library_name_platform buffer * \param[in] debug if true the library will return a debug library name, otherwise * it returns a normal library path - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/snprintf.h b/ThirdParty/ros/include/rcutils/rcutils/snprintf.h similarity index 89% rename from ThirdParty/ros/include/rcutils/snprintf.h rename to ThirdParty/ros/include/rcutils/rcutils/snprintf.h index 5d39fbded..53a102017 100644 --- a/ThirdParty/ros/include/rcutils/snprintf.h +++ b/ThirdParty/ros/include/rcutils/rcutils/snprintf.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__SNPRINTF_H_ #define RCUTILS__SNPRINTF_H_ @@ -47,15 +49,18 @@ extern "C" * * \see snprintf() * \see _snprintf_s() - * \returns the number of bytes that would have been written given enough space, - * or a negative number if there is an error, but unlike _snprintf_s(), + * \return the number of bytes that would have been written given enough space, or + * \return a negative number if there is an error, but unlike _snprintf_s(), * -1 is not returned if there is truncation. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED int rcutils_snprintf(char * buffer, size_t buffer_size, const char * format, ...) -RCUTILS_ATTRIBUTE_PRINTF_FORMAT(3, 4); +/// @cond Doxygen_Suppress +RCUTILS_ATTRIBUTE_PRINTF_FORMAT(3, 4) +/// @endcond +; /// Format a string with va_list for arguments, see rcutils_snprintf(). RCUTILS_PUBLIC diff --git a/ThirdParty/ros/include/rcutils/split.h b/ThirdParty/ros/include/rcutils/rcutils/split.h similarity index 83% rename from ThirdParty/ros/include/rcutils/split.h rename to ThirdParty/ros/include/rcutils/rcutils/split.h index d681530a2..ec62f772c 100644 --- a/ThirdParty/ros/include/rcutils/split.h +++ b/ThirdParty/ros/include/rcutils/rcutils/split.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__SPLIT_H_ #define RCUTILS__SPLIT_H_ @@ -30,10 +32,10 @@ extern "C" * \param[in] delimiter on where to split * \param[in] allocator for allocating new memory for the output array * \param[out] string_array with the split tokens - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs */ RCUTILS_PUBLIC rcutils_ret_t @@ -49,7 +51,8 @@ rcutils_split( * \param[in] delimiter on where to split * \param[in] allocator for allocating new memory for the output array * \param[out] string_array with the split tokens - * \returns array with split token, NULL in case of error + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs */ RCUTILS_PUBLIC rcutils_ret_t diff --git a/ThirdParty/ros/include/rcutils/stdatomic_helper.h b/ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper.h similarity index 100% rename from ThirdParty/ros/include/rcutils/stdatomic_helper.h rename to ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper.h diff --git a/ThirdParty/ros/include/rcutils/stdatomic_helper/gcc/stdatomic.h b/ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper/gcc/stdatomic.h similarity index 100% rename from ThirdParty/ros/include/rcutils/stdatomic_helper/gcc/stdatomic.h rename to ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper/gcc/stdatomic.h diff --git a/ThirdParty/ros/include/rcutils/stdatomic_helper/win32/stdatomic.h b/ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper/win32/stdatomic.h similarity index 100% rename from ThirdParty/ros/include/rcutils/stdatomic_helper/win32/stdatomic.h rename to ThirdParty/ros/include/rcutils/rcutils/stdatomic_helper/win32/stdatomic.h diff --git a/ThirdParty/ros/include/rcutils/rcutils/strcasecmp.h b/ThirdParty/ros/include/rcutils/rcutils/strcasecmp.h new file mode 100644 index 000000000..8b03ed348 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/strcasecmp.h @@ -0,0 +1,80 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__STRCASECMP_H_ +#define RCUTILS__STRCASECMP_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcutils/macros.h" +#include "rcutils/visibility_control.h" + +/// Case insensitive string compare. +/** + * This function compares two strings ignoring case in a portable way. + * This performs a byte-by-byte comparison of the strings s1 and s2, + * ignoring the case of the characters. + * + * \param[in] s1 Null terminated string to compare. + * \param[in] s2 Null terminated string to compare. + * \param[out] value Pointer to comparison result. + * An integer less than, equal to, or greater than zero if s1 is, after + * ignoring case, found to be less than, to match, or be greater than s2, + * respectively. + * \return 0 if method succeeded, or + * \return -1 if failed. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int +rcutils_strcasecmp( + const char * s1, + const char * s2, + int * value); + +/// Case insensitive string compare up to count characters. +/** + * This function compares two strings ignoring case in a portable way. + * This performs a byte-by-byte comparison of the strings s1 and s2 up to count + * characters of s1 and s2, ignoring the case of the characters. + * + * \param[in] s1 First string to compare. + * \param[in] s2 Second string to compare. + * \param[in] n Count of characters to compare. + * \param[out] value Pointer to comparison result. + * An integer less than, equal to, or greater than zero if s1 is, after + * ignoring case, found to be less than, to match, or be greater than s2, + * respectively. + * \return 0 if method succeeded, or + * \return -1 if failed. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +int +rcutils_strncasecmp( + const char * s1, + const char * s2, + size_t n, + int * value); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__STRCASECMP_H_ diff --git a/ThirdParty/ros/include/rcutils/strdup.h b/ThirdParty/ros/include/rcutils/rcutils/strdup.h similarity index 93% rename from ThirdParty/ros/include/rcutils/strdup.h rename to ThirdParty/ros/include/rcutils/rcutils/strdup.h index 6347656e5..7c6b1d78c 100644 --- a/ThirdParty/ros/include/rcutils/strdup.h +++ b/ThirdParty/ros/include/rcutils/rcutils/strdup.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__STRDUP_H_ #define RCUTILS__STRDUP_H_ @@ -36,7 +38,8 @@ extern "C" * * \param[in] str null terminated c string to be duplicated * \param[in] allocator the allocator to use for allocation - * \returns duplicated string or null if there is an error + * \return duplicated string, or + * \return `NULL` if there is an error. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -60,7 +63,8 @@ rcutils_strdup(const char * str, rcutils_allocator_t allocator); * \param[in] str null terminated c string to be duplicated * \param[in] string_length length of the string to duplicate * \param[in] allocator the allocator to use for allocation - * \returns duplicated string or null if there is an error + * \return duplicated string, or + * \return `NULL` if there is an error. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/strerror.h b/ThirdParty/ros/include/rcutils/rcutils/strerror.h similarity index 99% rename from ThirdParty/ros/include/rcutils/strerror.h rename to ThirdParty/ros/include/rcutils/rcutils/strerror.h index dae10ade8..a3a900a9d 100644 --- a/ThirdParty/ros/include/rcutils/strerror.h +++ b/ThirdParty/ros/include/rcutils/rcutils/strerror.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__STRERROR_H_ #define RCUTILS__STRERROR_H_ diff --git a/ThirdParty/ros/include/rcutils/testing/fault_injection.h b/ThirdParty/ros/include/rcutils/rcutils/testing/fault_injection.h similarity index 100% rename from ThirdParty/ros/include/rcutils/testing/fault_injection.h rename to ThirdParty/ros/include/rcutils/rcutils/testing/fault_injection.h diff --git a/ThirdParty/ros/include/rcutils/rcutils/time.h b/ThirdParty/ros/include/rcutils/rcutils/time.h new file mode 100644 index 000000000..bff3e41a5 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/time.h @@ -0,0 +1,189 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/// \file + +#ifndef RCUTILS__TIME_H_ +#define RCUTILS__TIME_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/macros.h" +#include "rcutils/types.h" +#include "rcutils/visibility_control.h" + +/// Convenience macro to convert seconds to nanoseconds. +#define RCUTILS_S_TO_NS(seconds) ((seconds) * (1000LL * 1000LL * 1000LL)) +/// Convenience macro to convert milliseconds to nanoseconds. +#define RCUTILS_MS_TO_NS(milliseconds) ((milliseconds) * (1000LL * 1000LL)) +/// Convenience macro to convert microseconds to nanoseconds. +#define RCUTILS_US_TO_NS(microseconds) ((microseconds) * 1000LL) + +/// Convenience macro to convert nanoseconds to seconds. +#define RCUTILS_NS_TO_S(nanoseconds) ((nanoseconds) / (1000LL * 1000LL * 1000LL)) +/// Convenience macro to convert nanoseconds to milliseconds. +#define RCUTILS_NS_TO_MS(nanoseconds) ((nanoseconds) / (1000LL * 1000LL)) +/// Convenience macro to convert nanoseconds to microseconds. +#define RCUTILS_NS_TO_US(nanoseconds) ((nanoseconds) / 1000LL) +/// Convenience macro for rcutils_steady_time_now(rcutils_time_point_value_t *). +#define RCUTILS_STEADY_TIME rcutils_steady_time_now + +/// A single point in time, measured in nanoseconds since the Unix epoch. +typedef int64_t rcutils_time_point_value_t; +/// A duration of time, measured in nanoseconds. +typedef int64_t rcutils_duration_value_t; + +/** + * This function returns the time from a system clock. + * The closest equivalent would be to std::chrono::system_clock::now(); + * + * The resolution (e.g. nanoseconds vs microseconds) is not guaranteed. + * + * The now argument must point to an allocated rcutils_time_point_value_t object, + * as the result is copied into this variable. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] now a datafield in which the current time is stored + * \return #RCUTILS_RET_OK if the current time was successfully obtained, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCUTILS_RET_ERROR if an unspecified error occur. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t +rcutils_system_time_now(rcutils_time_point_value_t * now); + +/// Retrieve the current time as a rcutils_time_point_value_t object. +/** + * This function returns the time from a monotonically increasing clock. + * The closest equivalent would be to std::chrono::steady_clock::now(); + * + * The resolution (e.g. nanoseconds vs microseconds) is not guaranteed. + * + * The now argument must point to an allocated rcutils_time_point_value_t object, + * as the result is copied into this variable. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[out] now a struct in which the current time is stored + * \return #RCUTILS_RET_OK if the current time was successfully obtained, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCUTILS_RET_ERROR if an unspecified error occur. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t +rcutils_steady_time_now(rcutils_time_point_value_t * now); + +/// Return a time point as nanoseconds in a string. +/** + * The number is always fixed width, with left padding zeros up to the maximum + * number of digits the time point can represent. + * Right now that is 19 digits (so 19 characters) for a signed 64-bit integer. + * Negative values will have a leading `-`, so they will be one character + * longer than the positive values. + * + * The recommended minimum size of the input string is 32 characters, but + * 21 (` ` or `-` for sign, 19 digits, null terminator) should be sufficiently + * large for both positive and negative values. + * If the given string is not large enough, the result will be truncated. + * If you need a string with variable width, using `snprintf()` directly is + * recommended. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No [1] + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * [1] if `snprintf()` does not allocate additional memory internally + * + * \param[in] time_point the time to be made into a string + * \param[out] str the output string in which it is stored + * \param[in] str_size the size of the output string + * \return #RCUTILS_RET_OK if successful (even if truncated), or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCUTILS_RET_ERROR if an unspecified error occur. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t +rcutils_time_point_value_as_nanoseconds_string( + const rcutils_time_point_value_t * time_point, + char * str, + size_t str_size); + +/// Return a time point as floating point seconds in a string. +/** + * The number is always fixed width, with left padding zeros up to the maximum + * number of digits for the mantissa that the time point can represent and a + * characteristic (fractional-part) with a fixed width of 9 digits. + * Right now that means the mantissa is always 10 digits to add up to 19 total + * for the signed 64-bit time point type. + * Negative values will have a leading `-`, so they will be one character + * longer then positive values. + * + * The recommended minimum size of the input string is 32 characters, but + * 22 (` ` or `-` for sign, 19 digits, decimal point, null terminator) should + * be sufficient for now. + * If the given string is not large enough, the result will be truncated. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No [1] + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * [1] if `snprintf()` does not allocate additional memory internally + * + * \param[in] time_point the time to be made into a string + * \param[out] str the output string in which it is stored + * \param[in] str_size the size of the output string + * \return #RCUTILS_RET_OK if successful (even if truncated), or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCUTILS_RET_ERROR if an unspecified error occur. + */ +RCUTILS_PUBLIC +RCUTILS_WARN_UNUSED +rcutils_ret_t +rcutils_time_point_value_as_seconds_string( + const rcutils_time_point_value_t * time_point, + char * str, + size_t str_size); + +#ifdef __cplusplus +} +#endif + +#endif // RCUTILS__TIME_H_ diff --git a/ThirdParty/ros/include/rcutils/types.h b/ThirdParty/ros/include/rcutils/rcutils/types.h similarity index 100% rename from ThirdParty/ros/include/rcutils/types.h rename to ThirdParty/ros/include/rcutils/rcutils/types.h diff --git a/ThirdParty/ros/include/rcutils/types/array_list.h b/ThirdParty/ros/include/rcutils/rcutils/types/array_list.h similarity index 81% rename from ThirdParty/ros/include/rcutils/types/array_list.h rename to ThirdParty/ros/include/rcutils/rcutils/types/array_list.h index a0d1cc868..ffde41a2d 100644 --- a/ThirdParty/ros/include/rcutils/types/array_list.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/array_list.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__ARRAY_LIST_H_ #define RCUTILS__TYPES__ARRAY_LIST_H_ @@ -27,11 +29,13 @@ extern "C" #include "rcutils/types/rcutils_ret.h" #include "rcutils/visibility_control.h" -struct rcutils_array_list_impl_t; +struct rcutils_array_list_impl_s; -typedef struct RCUTILS_PUBLIC_TYPE rcutils_array_list_t +/// The structure holding the metadata for an array list. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_array_list_s { - struct rcutils_array_list_impl_t * impl; + /// A pointer to the PIMPL implementation type. + struct rcutils_array_list_impl_s * impl; } rcutils_array_list_t; /** @@ -112,10 +116,10 @@ rcutils_get_zero_initialized_array_list(void); * \param[in] initial_capacity the initial capacity to allocate in the list * \param[in] data_size the size (in bytes) of the data object being stored in the list * \param[in] allocator to be used to allocate and deallocate memory - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC rcutils_ret_t @@ -141,9 +145,9 @@ rcutils_array_list_init( * Lock-Free | Yes * * \param[inout] array_list object to be finalized - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -166,10 +170,10 @@ rcutils_array_list_fini(rcutils_array_list_t * array_list); * * \param[in] array_list to add the data to * \param[in] data a pointer to the data to add to the list - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -193,10 +197,10 @@ rcutils_array_list_add(rcutils_array_list_t * array_list, const void * data); * \param[in] array_list to add the data to * \param[in] index the position in the list to set the data * \param[in] data a pointer to the data that will be set in the list - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if index out of bounds, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if index out of bounds, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -218,10 +222,10 @@ rcutils_array_list_set(rcutils_array_list_t * array_list, size_t index, const vo * * \param[in] array_list to add the data to * \param[in] index the index of the item to remove from the list - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if index out of bounds, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if index out of bounds, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -244,9 +248,9 @@ rcutils_array_list_remove(rcutils_array_list_t * array_list, size_t index); * \param[in] array_list to add the data to * \param[in] index the index at which to get the data * \param[out] data a copy of the data stored in the list - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -268,9 +272,9 @@ rcutils_array_list_get(const rcutils_array_list_t * array_list, size_t index, vo * * \param[in] array_list list to get the size of * \param[out] size The number of items currently stored in the list - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/types/char_array.h b/ThirdParty/ros/include/rcutils/rcutils/types/char_array.h similarity index 78% rename from ThirdParty/ros/include/rcutils/types/char_array.h rename to ThirdParty/ros/include/rcutils/rcutils/types/char_array.h index 4d2216618..a0d64f042 100644 --- a/ThirdParty/ros/include/rcutils/types/char_array.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/char_array.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__CHAR_ARRAY_H_ #define RCUTILS__TYPES__CHAR_ARRAY_H_ @@ -26,8 +28,10 @@ extern "C" #include "rcutils/types/rcutils_ret.h" #include "rcutils/visibility_control.h" -typedef struct RCUTILS_PUBLIC_TYPE rcutils_char_array_t +/// The structure holding the metadata for a char array. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_char_array_s { + /// A pointer to the allocated memory for this char array. char * buffer; /** @@ -37,8 +41,13 @@ typedef struct RCUTILS_PUBLIC_TYPE rcutils_char_array_t */ bool owns_buffer; + /// The length of the data stored in the buffer pointer. size_t buffer_length; + + /// The maximum capacity of the buffer pointer. size_t buffer_capacity; + + /// The allocator used to allocate and free the data in the pointer. rcutils_allocator_t allocator; } rcutils_char_array_t; @@ -61,10 +70,10 @@ rcutils_get_zero_initialized_char_array(void); * \param[in] char_array a pointer to the to be initialized char array struct * \param[in] buffer_capacity the size of the memory to allocate for the byte stream * \param[in] allocator the allocator to use for the memory allocation - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENTS` if any arguments are invalid, or - * \return 'RCUTILS_RET_BAD_ALLOC` if no memory could be allocated correctly - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or + * \return #RCUTILS_RET_BAD_ALLOC if no memory could be allocated correctly + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -85,9 +94,9 @@ rcutils_char_array_init( * behavior. * * \param[in] char_array pointer to the rcutils_char_array_t to be cleaned up - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENTS` if the char_array argument is invalid - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if the char_array argument is invalid + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -109,10 +118,10 @@ rcutils_char_array_fini(rcutils_char_array_t * char_array); * * \param[in] char_array pointer to the instance of rcutils_char_array_t which is being resized * \param[in] new_size the new size of the internal buffer - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if new_size is set to zero - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if new_size is set to zero + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -128,9 +137,9 @@ rcutils_char_array_resize(rcutils_char_array_t * char_array, size_t new_size); * * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being resized * \param[in] new_size the new size of the internal buffer - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -149,9 +158,9 @@ rcutils_char_array_expand_as_needed(rcutils_char_array_t * char_array, size_t ne * written to * \param[in] format the format string used by the underlying `vsnprintf` * \param[in] args the `va_list` used by the underlying `vsnprintf` - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -168,9 +177,9 @@ rcutils_char_array_vsprintf(rcutils_char_array_t * char_array, const char * form * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being appended to * \param[in] src the string to be appended to the end of the string in buffer * \param[in] n it uses at most n bytes from the src string - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -187,9 +196,9 @@ rcutils_char_array_strncat(rcutils_char_array_t * char_array, const char * src, * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being * appended to * \param[in] src the string to be appended to the end of the string in buffer - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -204,9 +213,9 @@ rcutils_char_array_strcat(rcutils_char_array_t * char_array, const char * src); * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being resized * \param[in] src the memory to be copied from * \param[in] n a total of n bytes will be copied - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -221,9 +230,9 @@ rcutils_char_array_memcpy(rcutils_char_array_t * char_array, const char * src, s * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being * copied to * \param[in] src the string to be copied from - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/types/hash_map.h b/ThirdParty/ros/include/rcutils/rcutils/types/hash_map.h similarity index 81% rename from ThirdParty/ros/include/rcutils/types/hash_map.h rename to ThirdParty/ros/include/rcutils/rcutils/types/hash_map.h index d96ace355..2c22e0bb8 100644 --- a/ThirdParty/ros/include/rcutils/types/hash_map.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/hash_map.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__HASH_MAP_H_ #define RCUTILS__TYPES__HASH_MAP_H_ @@ -27,11 +29,13 @@ extern "C" #include "rcutils/macros.h" #include "rcutils/visibility_control.h" -struct rcutils_hash_map_impl_t; +struct rcutils_hash_map_impl_s; -typedef struct RCUTILS_PUBLIC_TYPE rcutils_hash_map_t +/// The structure holding the metadata for a hash map. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_hash_map_s { - struct rcutils_hash_map_impl_t * impl; + /// A pointer to the PIMPL implementation type. + struct rcutils_hash_map_impl_s * impl; } rcutils_hash_map_t; /// The function signature for a key hashing function. @@ -49,7 +53,7 @@ typedef size_t (* rcutils_hash_map_key_hasher_t)( * \param[in] val2 The second value to compare * \return A negative number if val1 < val2, or * \return A positve number if val1 > val2, or - * \return Zero if val1 == val2 + * \return Zero if val1 == val2. */ typedef int (* rcutils_hash_map_key_cmp_t)( const void *, // val1 @@ -59,8 +63,8 @@ typedef int (* rcutils_hash_map_key_cmp_t)( /** * Validates that an rcutils_hash_map_t* points to a valid hash map. * \param[in] map A pointer to an rcutils_hash_map_t - * \return RCUTILS_RET_INVALID_ARGUMENT if map is null - * \return RCUTILS_RET_NOT_INITIALIZED if map is not initialized + * \return #RCUTILS_RET_INVALID_ARGUMENT if map is null + * \return #RCUTILS_RET_NOT_INITIALIZED if map is not initialized. */ #define HASH_MAP_VALIDATE_HASH_MAP(map) \ RCUTILS_CHECK_ARGUMENT_FOR_NULL(map, RCUTILS_RET_INVALID_ARGUMENT); \ @@ -88,7 +92,7 @@ int rcutils_hash_map_string_cmp_func(const void * val1, const void * val2); /// Return an empty hash_map struct. -/* +/** * This function returns an empty and zero initialized hash_map struct. * All hash maps should be initialized with this or manually initialized * before being used. @@ -158,11 +162,11 @@ rcutils_get_zero_initialized_hash_map(); * \param[in] key_hashing_func a function that returns a hashed value for a key * \param[in] key_cmp_func a function used to compare keys * \param[in] allocator the allocator to use through out the lifetime of the hash_map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_ALREADY_INIT` if already initialized, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_ALREADY_INIT if alread initialized, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -190,9 +194,9 @@ rcutils_hash_map_init( * Lock-Free | Yes * * \param[inout] hash_map rcutils_hash_map_t to be finalized - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -218,10 +222,10 @@ rcutils_hash_map_fini(rcutils_hash_map_t * hash_map); * * \param[in] hash_map rcutils_hash_map_t to be queried * \param[out] capacity capacity of the hash_map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -244,10 +248,10 @@ rcutils_hash_map_get_capacity(const rcutils_hash_map_t * hash_map, size_t * capa * * \param[in] hash_map rcutils_hash_map_t to be queried * \param[out] size size of the hash_map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -271,11 +275,11 @@ rcutils_hash_map_get_size(const rcutils_hash_map_t * hash_map, size_t * size); * \param[inout] hash_map rcutils_hash_map_t to be updated * \param[in] key hash_map key * \param[in] value value for given hash_map key - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -298,11 +302,11 @@ rcutils_hash_map_set(rcutils_hash_map_t * hash_map, const void * key, const void * * \param[inout] hash_map rcutils_hash_map_t to be updated * \param[in] key hash_map key, must be null terminated c string - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_STRING_KEY_NOT_FOUND` if the key is not found in the map, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_STRING_KEY_NOT_FOUND if the key is not found in the map, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -328,7 +332,7 @@ rcutils_hash_map_unset(rcutils_hash_map_t * hash_map, const void * key); * \return `true` if key is in the hash_map, or * \return `false` if key is not in the hash_map, or * \return `false` for invalid arguments, or - * \return `false` if the hash_map is invalid + * \return `false` if the hash_map is invalid. */ RCUTILS_PUBLIC bool @@ -351,11 +355,11 @@ rcutils_hash_map_key_exists(const rcutils_hash_map_t * hash_map, const void * ke * \param[in] hash_map rcutils_hash_map_t to be searched * \param[in] key hash_map key to look up the data for * \param[out] data A copy of the data stored in the map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_NOT_FOUND` if the key doesn't exist in the map, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_NOT_FOUND if the key doesn't exist in the map, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC rcutils_ret_t @@ -399,12 +403,12 @@ rcutils_hash_map_get(const rcutils_hash_map_t * hash_map, const void * key, void * \param[in] previous_key NULL to get the first key or the previous key to get the next for * \param[out] key A copy of the next key in the sequence * \param[out] data A copy of the next data in the sequence - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_NOT_INITIALIZED` if the hash_map is invalid, or - * \return `RCUTILS_RET_NOT_FOUND` if the previous_key doesn't exist in the map, or - * \return `RCUTILS_RET_HASH_MAP_NO_MORE_ENTRIES` if there is no more data beyound the previous_key, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_NOT_INITIALIZED if the hash_map is invalid, or + * \return #RCUTILS_RET_NOT_FOUND if the previous_key doesn't exist in the map, or + * \return #RCUTILS_RET_HASH_MAP_NO_MORE_ENTRIES if there is no more data beyound the previous_key, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC rcutils_ret_t diff --git a/ThirdParty/ros/include/rcutils/types/rcutils_ret.h b/ThirdParty/ros/include/rcutils/rcutils/types/rcutils_ret.h similarity index 91% rename from ThirdParty/ros/include/rcutils/types/rcutils_ret.h rename to ThirdParty/ros/include/rcutils/rcutils/types/rcutils_ret.h index 598856dab..b4712d2b0 100644 --- a/ThirdParty/ros/include/rcutils/types/rcutils_ret.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/rcutils_ret.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__RCUTILS_RET_H_ #define RCUTILS__TYPES__RCUTILS_RET_H_ @@ -20,9 +22,14 @@ extern "C" { #endif +/// The type that holds a return value for an rcutils operation. typedef int rcutils_ret_t; + +/// Successful operation. #define RCUTILS_RET_OK 0 +/// Operation produced a warning. #define RCUTILS_RET_WARN 1 +/// Generic failure in operation. #define RCUTILS_RET_ERROR 2 /// Failed to allocate memory return code. diff --git a/ThirdParty/ros/include/rcutils/types/string_array.h b/ThirdParty/ros/include/rcutils/rcutils/types/string_array.h similarity index 80% rename from ThirdParty/ros/include/rcutils/types/string_array.h rename to ThirdParty/ros/include/rcutils/rcutils/types/string_array.h index c473e9086..4c4c97e93 100644 --- a/ThirdParty/ros/include/rcutils/types/string_array.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/string_array.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__STRING_ARRAY_H_ #define RCUTILS__TYPES__STRING_ARRAY_H_ @@ -29,10 +31,16 @@ extern "C" #include "rcutils/types/rcutils_ret.h" #include "rcutils/visibility_control.h" -typedef struct RCUTILS_PUBLIC_TYPE rcutils_string_array_t +/// The structure holding the metadata for a string array. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_string_array_s { + /// The number of strings that can be stored in the string array. size_t size; + + /// The allocated memory for the string array. char ** data; + + /// The allocator used to allocate and free memory for the string array. rcutils_allocator_t allocator; } rcutils_string_array_t; @@ -77,15 +85,15 @@ rcutils_get_zero_initialized_string_array(void); * string_array.data[0] = rcutils_strdup("Hello", &allocator); * string_array.data[1] = rcutils_strdup("World", &allocator); * ret = rcutils_string_array_fini(&string_array); + * ``` * * \param[inout] string_array object to be initialized * \param[in] size the size the array should be * \param[in] allocator to be used to allocate and deallocate memory - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs - * ``` + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -104,9 +112,9 @@ rcutils_string_array_init( * string in the array and the array of strings itself. * * \param[inout] string_array object to be finalized - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -121,11 +129,11 @@ rcutils_string_array_fini(rcutils_string_array_t * string_array); * \param[in] rhs The second string array. * \param[out] res Negative value if `lhs` appears before `rhs` in lexicographical order. * Zero if `lhs` and `rhs` are equal. - * Positive value if `lhs` appears after `rhs in lexographical order. - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if any argument is `NULL`, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if `lhs->data` or `rhs->data` is `NULL`, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs. + * Positive value if `lhs` appears after `rhs` in lexographical order. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any argument is `NULL, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if `lhs->data` or `rhs->data` is `NULL, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -152,10 +160,10 @@ rcutils_string_array_cmp( * * \param[inout] string_array object to be resized. * \param[in] new_size the size the array should be changed to. - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -187,9 +195,9 @@ rcutils_string_array_sort_compare(const void * lhs, const void * rhs); * Empty entries are placed at the end of the array. * * \param[inout] string_array object whose elements should be sorted. - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs. + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ inline RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/types/string_map.h b/ThirdParty/ros/include/rcutils/rcutils/types/string_map.h similarity index 80% rename from ThirdParty/ros/include/rcutils/types/string_map.h rename to ThirdParty/ros/include/rcutils/rcutils/types/string_map.h index 33b5b31d3..49b65fdbf 100644 --- a/ThirdParty/ros/include/rcutils/types/string_map.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/string_map.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__STRING_MAP_H_ #define RCUTILS__TYPES__STRING_MAP_H_ @@ -27,15 +29,17 @@ extern "C" #include "rcutils/macros.h" #include "rcutils/visibility_control.h" -struct rcutils_string_map_impl_t; +struct rcutils_string_map_impl_s; -typedef struct RCUTILS_PUBLIC_TYPE rcutils_string_map_t +/// The structure holding the metadata for a string map. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_string_map_s { - struct rcutils_string_map_impl_t * impl; + /// A pointer to the PIMPL implementation type. + struct rcutils_string_map_impl_s * impl; } rcutils_string_map_t; /// Return an empty string map struct. -/* +/** * This function returns an empty and zero initialized string map struct. * * Example: @@ -84,11 +88,11 @@ rcutils_get_zero_initialized_string_map(); * \param[inout] string_map rcutils_string_map_t to be initialized * \param[in] initial_capacity the amount of initial capacity for the string map * \param[in] allocator the allocator to use through out the lifetime of the map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_ALREADY_INIT` if already initialized, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_ALREADY_INIT if already initialized, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -104,9 +108,9 @@ rcutils_string_map_init( * or when calling rcutils_string_map_set(). * * \param[inout] string_map rcutils_string_map_t to be finalized - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -124,10 +128,10 @@ rcutils_string_map_fini(rcutils_string_map_t * string_map); * * \param[in] string_map rcutils_string_map_t to be queried * \param[out] capacity capacity of the string map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -143,10 +147,10 @@ rcutils_string_map_get_capacity(const rcutils_string_map_t * string_map, size_t * * \param[in] string_map rcutils_string_map_t to be queried * \param[out] size size of the string map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -170,11 +174,11 @@ rcutils_string_map_get_size(const rcutils_string_map_t * string_map, size_t * si * * \param[inout] string_map rcutils_string_map_t to have space reserved in * \param[in] capacity requested size to reserve in the map - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -188,10 +192,10 @@ rcutils_string_map_reserve(rcutils_string_map_t * string_map, size_t capacity); * rcutils_string_map_fini() should still be called after this. * * \param[inout] string_map rcutils_string_map_t to be cleared - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -208,11 +212,11 @@ rcutils_string_map_clear(rcutils_string_map_t * string_map); * \param[inout] string_map rcutils_string_map_t to be updated * \param[in] key map key, must be null terminated c string * \param[in] value value for given map key, must be null terminated c string - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -240,12 +244,12 @@ rcutils_string_map_set(rcutils_string_map_t * string_map, const char * key, cons * \param[inout] string_map rcutils_string_map_t to be updated * \param[in] key map key, must be null terminated c string * \param[in] value value for given map key, must be null terminated c string - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_NOT_ENOUGH_SPACE` if map is full, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_NOT_ENOUGH_SPACE if map is full, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -262,11 +266,11 @@ rcutils_string_map_set_no_resize( * * \param[inout] string_map rcutils_string_map_t to be updated * \param[in] key map key, must be null terminated c string - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_STRING_KEY_NOT_FOUND` if key not found, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_STRING_KEY_NOT_FOUND if key not found, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -286,7 +290,7 @@ rcutils_string_map_unset(rcutils_string_map_t * string_map, const char * key); * \return `true` if key is in the map, or * \return `false` if key is not in the map, or * \return `false` for invalid arguments, or - * \return `false` if the string map is invalid + * \return `false` if the string map is invalid. */ RCUTILS_PUBLIC bool @@ -303,7 +307,7 @@ rcutils_string_map_key_exists(const rcutils_string_map_t * string_map, const cha * \return `true` if key is in the map, or * \return `false` if key is not in the map, or * \return `false` for invalid arguments, or - * \return `false` if the string map is invalid + * \return `false` if the string map is invalid. */ RCUTILS_PUBLIC bool @@ -333,7 +337,7 @@ rcutils_string_map_key_existsn( * \return `NULL` for invalid arguments, or * \return `NULL` if the string map is invalid, or * \return `NULL` if key not found, or - * \return `NULL` if an unknown error occurs + * \return `NULL` if an unknown error occurs. */ RCUTILS_PUBLIC const char * @@ -351,7 +355,7 @@ rcutils_string_map_get(const rcutils_string_map_t * string_map, const char * key * \return `NULL` for invalid arguments, or * \return `NULL` if the string map is invalid, or * \return `NULL` if key not found, or - * \return `NULL` if an unknown error occurs + * \return `NULL` if an unknown error occurs. */ RCUTILS_PUBLIC const char * @@ -399,7 +403,7 @@ rcutils_string_map_getn( * \return `NULL` if the string map is invalid, or * \return `NULL` if key not found, or * \return `NULL` if there are no more keys in the map, or - * \return `NULL` if an unknown error occurs + * \return `NULL` if an unknown error occurs. */ RCUTILS_PUBLIC const char * @@ -419,11 +423,11 @@ rcutils_string_map_get_next_key( * * \param[in] src_string_map rcutils_string_map_t to be copied from * \param[inout] dst_string_map rcutils_string_map_t to be copied to - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` for invalid arguments, or - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation fails, or - * \return `RCUTILS_RET_STRING_MAP_INVALID` if the string map is invalid, or - * \return `RCUTILS_RET_ERROR` if an unknown error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation fails, or + * \return #RCUTILS_RET_STRING_MAP_INVALID if the string map is invalid, or + * \return #RCUTILS_RET_ERROR if an unknown error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/types/uint8_array.h b/ThirdParty/ros/include/rcutils/rcutils/types/uint8_array.h similarity index 76% rename from ThirdParty/ros/include/rcutils/types/uint8_array.h rename to ThirdParty/ros/include/rcutils/rcutils/types/uint8_array.h index 512a3c9c1..215e9384a 100644 --- a/ThirdParty/ros/include/rcutils/types/uint8_array.h +++ b/ThirdParty/ros/include/rcutils/rcutils/types/uint8_array.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// \file + #ifndef RCUTILS__TYPES__UINT8_ARRAY_H_ #define RCUTILS__TYPES__UINT8_ARRAY_H_ @@ -26,11 +28,19 @@ extern "C" #include "rcutils/types/rcutils_ret.h" #include "rcutils/visibility_control.h" -typedef struct RCUTILS_PUBLIC_TYPE rcutils_uint8_array_t +/// The structure holding the metadata for a uint8 array. +typedef struct RCUTILS_PUBLIC_TYPE rcutils_uint8_array_s { + /// The allocated memory for the uint8 array. uint8_t * buffer; + + /// The number of valid elements in the uint8 array. size_t buffer_length; + + /// The maximum capacity of the uint8 array. size_t buffer_capacity; + + /// The allocator used to allocate and free memory for the uint8 array. rcutils_allocator_t allocator; } rcutils_uint8_array_t; @@ -52,10 +62,10 @@ rcutils_get_zero_initialized_uint8_array(void); * \param[inout] uint8_array a pointer to the to be initialized uint8 array struct * \param[in] buffer_capacity the size of the memory to allocate for the byte stream * \param[in] allocator the allocator to use for the memory allocation - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENTS` if any arguments are invalid, or + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if any arguments are invalid, or * \return 'RCUTILS_RET_BAD_ALLOC` if no memory could be allocated correctly - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -74,9 +84,9 @@ rcutils_uint8_array_init( * behavior. * * \param[in] uint8_array pointer to the rcutils_uint8_array_t to be cleaned up - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENTS` if the uint8_array argument is invalid - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if the uint8_array argument is invalid + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -94,10 +104,10 @@ rcutils_uint8_array_fini(rcutils_uint8_array_t * uint8_array); * \param[inout] uint8_array pointer to the instance of rcutils_uint8_array_t which is * being resized * \param[in] new_size the new size of the internal buffer - * \return `RCUTILS_RET_OK` if successful, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if new_size is set to zero - * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RCUTILS_RET_ERROR` if an unexpected error occurs + * \return #RCUTILS_RET_OK if successful, or + * \return #RCUTILS_RET_INVALID_ARGUMENT if new_size is set to zero + * \return #RCUTILS_RET_BAD_ALLOC if memory allocation failed, or + * \return #RCUTILS_RET_ERROR if an unexpected error occurs. */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/ThirdParty/ros/include/rcutils/visibility_control.h b/ThirdParty/ros/include/rcutils/rcutils/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rcutils/visibility_control.h rename to ThirdParty/ros/include/rcutils/rcutils/visibility_control.h diff --git a/ThirdParty/ros/include/rcutils/rcutils/visibility_control_macros.h b/ThirdParty/ros/include/rcutils/rcutils/visibility_control_macros.h new file mode 100644 index 000000000..1f0bfa8b6 --- /dev/null +++ b/ThirdParty/ros/include/rcutils/rcutils/visibility_control_macros.h @@ -0,0 +1,65 @@ +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RCUTILS__VISIBILITY_CONTROL_MACROS_H_ +#define RCUTILS__VISIBILITY_CONTROL_MACROS_H_ + +// Defines macros to express whether a symbol is localed, imported, or exported +// +// Those macros are compatible with GCC, clang, and Microsoft Visual C++. They +// can be used to enforce which symbols of a library are publicly accessible. +// +// RCUTILS_IMPORT, RCUTILS_EXPORT, and RCUTILS_LOCAL are respectively declaring +// an imported, exported, or local symbol. +// RCUTILS_LOCAL can be used directly. However, RCUTILS_IMPORT, and +// RCUTILS_EXPORT may not be used directly. Every project need to provide +// an additional header called `visibility_macros.h` containing: +// +// #ifdef _BUILDING_DLL +// # define _PUBLIC RCUTILS_EXPORT +// #else +// # define _PUBLIC RCUTILS_IMPORT +// #endif // !_BUILDING_DLL +// #define _LOCAL RCUTILS_LOCAL +// +// ...where "" has been replaced by the project name, such as +// "MY_PROJECT". +// Your project CMakeLists.txt should also contain the following statement: +// +// target_compile_definitions( PRIVATE "_BUILDING_DLL") +// +// A public (exported) class should then be tagged as _PUBLIC, whereas +// a non-public class should be tagged with _LOCAL. +// +// See GCC documentation: https://gcc.gnu.org/wiki/Visibility + +#if defined(_MSC_VER) || defined(__CYGWIN__) +// Use the Windows syntax when compiling with Microsoft Visual C++. +// +// GCC on Windows also support this syntax. When compiling with cygwin, +// prefer using dllimport/dllexport are the semantic of those flags is closer +// to msvc++ behavior. See GCC documentation: +// https://gcc.gnu.org/onlinedocs/gcc/Microsoft-Windows-Function-Attributes.html +# define RCUTILS_IMPORT __declspec(dllimport) +# define RCUTILS_EXPORT __declspec(dllexport) +# define RCUTILS_LOCAL +#else // defined(_MSC_VER) || defined(__CYGWIN__) +// On Linux, use the GCC syntax. This syntax is understood by other compilers +// such as clang, icpc, and xlc++. +# define RCUTILS_IMPORT __attribute__ ((visibility("default"))) +# define RCUTILS_EXPORT __attribute__ ((visibility("default"))) +# define RCUTILS_LOCAL __attribute__ ((visibility("hidden"))) +#endif // !defined(_MSC_VER) && !defined(__CYGWIN__) + +#endif // RCUTILS__VISIBILITY_CONTROL_MACROS_H_ diff --git a/ThirdParty/ros/include/rcutils/time.h b/ThirdParty/ros/include/rcutils/time.h deleted file mode 100644 index fa000c75a..000000000 --- a/ThirdParty/ros/include/rcutils/time.h +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__TIME_H_ -#define RCUTILS__TIME_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcutils/macros.h" -#include "rcutils/types.h" -#include "rcutils/visibility_control.h" - -/// Convenience macro to convert seconds to nanoseconds. -#define RCUTILS_S_TO_NS(seconds) ((seconds) * (1000LL * 1000LL * 1000LL)) -/// Convenience macro to convert milliseconds to nanoseconds. -#define RCUTILS_MS_TO_NS(milliseconds) ((milliseconds) * (1000LL * 1000LL)) -/// Convenience macro to convert microseconds to nanoseconds. -#define RCUTILS_US_TO_NS(microseconds) ((microseconds) * 1000LL) - -/// Convenience macro to convert nanoseconds to seconds. -#define RCUTILS_NS_TO_S(nanoseconds) ((nanoseconds) / (1000LL * 1000LL * 1000LL)) -/// Convenience macro to convert nanoseconds to milliseconds. -#define RCUTILS_NS_TO_MS(nanoseconds) ((nanoseconds) / (1000LL * 1000LL)) -/// Convenience macro to convert nanoseconds to microseconds. -#define RCUTILS_NS_TO_US(nanoseconds) ((nanoseconds) / 1000LL) -/// Convenience macro for rcutils_steady_time_now(rcutils_time_point_value_t *). -#define RCUTILS_STEADY_TIME rcutils_steady_time_now - -/// A single point in time, measured in nanoseconds since the Unix epoch. -typedef int64_t rcutils_time_point_value_t; -/// A duration of time, measured in nanoseconds. -typedef int64_t rcutils_duration_value_t; - -/** - * This function returns the time from a system clock. - * The closest equivalent would be to std::chrono::system_clock::now(); - * - * The resolution (e.g. nanoseconds vs microseconds) is not guaranteed. - * - * The now argument must point to an allocated rcutils_time_point_value_t object, - * as the result is copied into this variable. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] now a datafield in which the current time is stored - * \return `RCUTILS_RET_OK` if the current time was successfully obtained, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occur. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t -rcutils_system_time_now(rcutils_time_point_value_t * now); - -/// Retrieve the current time as a rcutils_time_point_value_t object. -/** - * This function returns the time from a monotonically increasing clock. - * The closest equivalent would be to std::chrono::steady_clock::now(); - * - * The resolution (e.g. nanoseconds vs microseconds) is not guaranteed. - * - * The now argument must point to an allocated rcutils_time_point_value_t object, - * as the result is copied into this variable. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[out] now a struct in which the current time is stored - * \return `RCUTILS_RET_OK` if the current time was successfully obtained, or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occur. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t -rcutils_steady_time_now(rcutils_time_point_value_t * now); - -/// Return a time point as nanoseconds in a string. -/** - * The number is always fixed width, with left padding zeros up to the maximum - * number of digits the time point can represent. - * Right now that is 19 digits (so 19 characters) for a signed 64-bit integer. - * Negative values will have a leading `-`, so they will be one character - * longer than the positive values. - * - * The recommended minimum size of the input string is 32 characters, but - * 21 (` ` or `-` for sign, 19 digits, null terminator) should be sufficiently - * large for both positive and negative values. - * If the given string is not large enough, the result will be truncated. - * If you need a string with variable width, using `snprintf()` directly is - * recommended. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No [1] - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * [1] if `snprintf()` does not allocate additional memory internally - * - * \param[in] time_point the time to be made into a string - * \param[out] str the output string in which it is stored - * \param[in] str_size the size of the output string - * \return `RCUTILS_RET_OK` if successful (even if truncated), or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occur. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t -rcutils_time_point_value_as_nanoseconds_string( - const rcutils_time_point_value_t * time_point, - char * str, - size_t str_size); - -/// Return a time point as floating point seconds in a string. -/** - * The number is always fixed width, with left padding zeros up to the maximum - * number of digits for the mantissa that the time point can represent and a - * characteristic (fractional-part) with a fixed width of 9 digits. - * Right now that means the mantissa is always 10 digits to add up to 19 total - * for the signed 64-bit time point type. - * Negative values will have a leading `-`, so they will be one character - * longer then positive values. - * - * The recommended minimum size of the input string is 32 characters, but - * 22 (` ` or `-` for sign, 19 digits, decimal point, null terminator) should - * be sufficient for now. - * If the given string is not large enough, the result will be truncated. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No [1] - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * [1] if `snprintf()` does not allocate additional memory internally - * - * \param[in] time_point the time to be made into a string - * \param[out] str the output string in which it is stored - * \param[in] str_size the size of the output string - * \return `RCUTILS_RET_OK` if successful (even if truncated), or - * \return `RCUTILS_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RCUTILS_RET_ERROR` if an unspecified error occur. - */ -RCUTILS_PUBLIC -RCUTILS_WARN_UNUSED -rcutils_ret_t -rcutils_time_point_value_as_seconds_string( - const rcutils_time_point_value_t * time_point, - char * str, - size_t str_size); - -#ifdef __cplusplus -} -#endif - -#endif // RCUTILS__TIME_H_ diff --git a/ThirdParty/ros/include/rcutils/visibility_control_macros.h b/ThirdParty/ros/include/rcutils/visibility_control_macros.h deleted file mode 100644 index dec6d18f4..000000000 --- a/ThirdParty/ros/include/rcutils/visibility_control_macros.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RCUTILS__VISIBILITY_CONTROL_MACROS_H_ -#define RCUTILS__VISIBILITY_CONTROL_MACROS_H_ - -/// Defines macros to express whether a symbol is localed, imported, or exported -/// -/// Those macros are compatible with GCC, clang, and Microsoft Visual C++. They -/// can be used to enforce which symbols of a library are publicly accessible. -/// -/// RCUTILS_IMPORT, RCUTILS_EXPORT, and RCUTILS_LOCAL are respectively declaring -/// an imported, exported, or local symbol. -/// RCUTILS_LOCAL can be used directly. However, RCUTILS_IMPORT, and -/// RCUTILS_EXPORT may not be used directly. Every project need to provide -/// an additional header called `visibility_macros.h` containing: -/// -/// #ifdef _BUILDING_DLL -/// # define _PUBLIC RCUTILS_EXPORT -/// #else -/// # define _PUBLIC RCUTILS_IMPORT -/// #endif // !_BUILDING_DLL -/// #define _LOCAL RCUTILS_LOCAL -/// -/// ...where "" has been replaced by the project name, such as -/// "MY_PROJECT". -/// Your project CMakeLists.txt should also contain the following statement: -/// -/// target_compile_definitions( PRIVATE "_BUILDING_DLL") -/// -/// A public (exported) class should then be tagged as _PUBLIC, whereas -/// a non-public class should be tagged with _LOCAL. -/// -/// See GCC documentation: https://gcc.gnu.org/wiki/Visibility - -#if defined(_MSC_VER) || defined(__CYGWIN__) -// Use the Windows syntax when compiling with Microsoft Visual C++. -// -// GCC on Windows also support this syntax. When compiling with cygwin, -// prefer using dllimport/dllexport are the semantic of those flags is closer -// to msvc++ behavior. See GCC documentation: -// https://gcc.gnu.org/onlinedocs/gcc/Microsoft-Windows-Function-Attributes.html -# define RCUTILS_IMPORT __declspec(dllimport) -# define RCUTILS_EXPORT __declspec(dllexport) -# define RCUTILS_LOCAL -#else // defined(_MSC_VER) || defined(__CYGWIN__) -// On Linux, use the GCC syntax. This syntax is understood by other compilers -// such as clang, icpc, and xlc++. -# define RCUTILS_IMPORT __attribute__ ((visibility("default"))) -# define RCUTILS_EXPORT __attribute__ ((visibility("default"))) -# define RCUTILS_LOCAL __attribute__ ((visibility("hidden"))) -#endif // !defined(_MSC_VER) && !defined(__CYGWIN__) - -#endif // RCUTILS__VISIBILITY_CONTROL_MACROS_H_ diff --git a/ThirdParty/ros/include/rmw/event.h b/ThirdParty/ros/include/rmw/event.h deleted file mode 100644 index 678084deb..000000000 --- a/ThirdParty/ros/include/rmw/event.h +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__EVENT_H_ -#define RMW__EVENT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcutils/allocator.h" - -#include "rmw/macros.h" -#include "rmw/types.h" -#include "rmw/ret_types.h" -#include "rmw/visibility_control.h" - -/// Define QoS policy events -typedef enum rmw_event_type_t -{ - // subscription events - RMW_EVENT_LIVELINESS_CHANGED, - RMW_EVENT_REQUESTED_DEADLINE_MISSED, - RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE, - - // publisher events - RMW_EVENT_LIVELINESS_LOST, - RMW_EVENT_OFFERED_DEADLINE_MISSED, - RMW_EVENT_OFFERED_QOS_INCOMPATIBLE, - - // sentinel value - RMW_EVENT_INVALID -} rmw_event_type_t; - -/// Encapsulate the RMW event implementation, data, and type. -typedef struct RMW_PUBLIC_TYPE rmw_event_t -{ - /// Implementation identifier, used to ensure two different implementations are not being mixed. - const char * implementation_identifier; - /// Data specific to this event type from either the publisher or subscriber. - void * data; - /// The event type that occurred. - rmw_event_type_t event_type; -} rmw_event_t; - -/// Return a zero initialized event structure. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_event_t -rmw_get_zero_initialized_event(void); - -/// Initialize a rmw publisher event. -/** - * \param[in|out] rmw_event to initialize - * \param[in] publisher to initialize with - * \param[in|out] event_type for the event to initialize - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if invalid argument, or - * \return `RMW_RET_UNSUPPORTED` if event_type is not supported, or - * \return `RMW_RET_ERROR` if an unexpected error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_publisher_event_init( - rmw_event_t * rmw_event, - const rmw_publisher_t * publisher, - rmw_event_type_t event_type); - -/// Initialize a rmw subscription event. -/** - * \param[in|out] rmw_event to initialize - * \param[in] subscription to initialize with - * \param[in|out] event_type for the event to handle - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if invalid argument, or - * \return `RMW_RET_UNSUPPORTED` if event_type is not supported, or - * \return `RMW_RET_ERROR` if an unexpected error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_subscription_event_init( - rmw_event_t * rmw_event, - const rmw_subscription_t * subscription, - rmw_event_type_t event_type); - -/// Take an event from the event handle. -/** - * \param[in] event_handle event object to take from - * \param[in|out] event_info event info object to write taken data into - * \param[out] taken boolean flag indicating if an event was taken or not - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_BAD_ALLOC` if memory allocation failed, or - * \return `RMW_RET_ERROR` if an unexpected error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_take_event( - const rmw_event_t * event_handle, - void * event_info, - bool * taken); - -/// Finalize an rmw_event_t. -/** - * \param[in] event to finalize - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_event_fini(rmw_event_t * event); - -#ifdef __cplusplus -} -#endif - -#endif // RMW__EVENT_H_ diff --git a/ThirdParty/ros/include/rmw/incompatible_qos_events_statuses.h b/ThirdParty/ros/include/rmw/incompatible_qos_events_statuses.h deleted file mode 100644 index 29c10d820..000000000 --- a/ThirdParty/ros/include/rmw/incompatible_qos_events_statuses.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ -#define RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ - -#include - -#include "rmw/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// QoS Policy Kinds -typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_t -{ - RMW_QOS_POLICY_INVALID = 1 << 0, - RMW_QOS_POLICY_DURABILITY = 1 << 1, - RMW_QOS_POLICY_DEADLINE = 1 << 2, - RMW_QOS_POLICY_LIVELINESS = 1 << 3, - RMW_QOS_POLICY_RELIABILITY = 1 << 4, - RMW_QOS_POLICY_HISTORY = 1 << 5, - RMW_QOS_POLICY_LIFESPAN = 1 << 6 -} rmw_qos_policy_kind_t; - -struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_t -{ - /** - * Total cumulative number of times the concerned subscription discovered a - * publisher for the same topic with an offered QoS that was incompatible - * with that requested by the subscription. - */ - int32_t total_count; - /** - * The change in total_count since the last time the status was read. - */ - int32_t total_count_change; - /** - * The Qos Policy Kind of one of the policies that was found to be - * incompatible the last time an incompatibility was detected. - */ - rmw_qos_policy_kind_t last_policy_kind; -}; - -/// Event state for a subscription's 'RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE' events. -typedef struct rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t; - -/// Event state for a publisher's 'RMW_EVENT_OFFERED_QOS_INCOMPATIBLE' events. -typedef struct rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t; - -#ifdef __cplusplus -} -#endif - -#endif // RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ diff --git a/ThirdParty/ros/include/rmw/init.h b/ThirdParty/ros/include/rmw/init.h deleted file mode 100644 index 85d7aad80..000000000 --- a/ThirdParty/ros/include/rmw/init.h +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2014-2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__INIT_H_ -#define RMW__INIT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rmw/init_options.h" -#include "rmw/macros.h" -#include "rmw/ret_types.h" -#include "rmw/visibility_control.h" - -/// Implementation defined context structure returned by rmw_init(). -/** - * This should be defined by the rmw implementation. - */ -typedef struct rmw_context_impl_t rmw_context_impl_t; - -/// Initialization context structure which is used to store init specific information. -typedef struct RMW_PUBLIC_TYPE rmw_context_t -{ - /// Locally (process local) unique ID that represents this init/shutdown cycle. - uint64_t instance_id; - /// Implementation identifier, used to ensure two different implementations are not being mixed. - const char * implementation_identifier; - /// Options used to initialize the context. - rmw_init_options_t options; - /// Implementation defined context information. - /** May be NULL if there is no implementation defined context information. */ - rmw_context_impl_t * impl; -} rmw_context_t; - -/// Return a zero initialized context structure. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_context_t -rmw_get_zero_initialized_context(void); - -/// Initialize the middleware with the given options, and yielding an context. -/** - * Context is filled with middleware specific data upon success of this function. - * The context is used when initializing some entities like nodes and - * guard conditions, and is also required to properly call `rmw_shutdown()`. - * - * \pre The given options must have been initialized - * i.e. `rmw_init_options_init()` called on it and - * an enclave set. - * \pre The given context must be zero initialized. - * - * \post If initialization fails, context will remain zero initialized. - * - * \remarks If options are zero-initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. - * If options are initialized but no enclave is provided, then `RMW_RET_INVALID_ARGUMENT` - * is returned. - * If context has been already initialized (`rmw_init()` was called on it), then - * `RMW_RET_INVALID_ARGUMENT` is returned. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * This should be defined by the rmw implementation. - * - * \param[in] options initialization options to be used during initialization - * \param[out] context resulting context struct - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation - * identifier does not match, or - * \return `RMW_RET_ERROR` if an unexpected error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_init(const rmw_init_options_t * options, rmw_context_t * context); - -/// Shutdown the middleware for a given context. -/** - * \pre The given context must be a valid context which has been initialized with `rmw_init()`. - * - * \remarks If context is zero initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. - * If context has been already invalidated (`rmw_shutdown()` was called on it), then - * this function is a no-op and `RMW_RET_OK` is returned. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | No - * Lock-Free | Yes - * - * This should be defined by the rmw implementation. - * - * \param[in] context resulting context struct - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if any argument are invalid, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation - * identifier does not match, or - * \return `RMW_RET_ERROR` if an unexpected error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_shutdown(rmw_context_t * context); - -/// Finalize a context. -/** - * This function will return early if a logical error, such as `RMW_RET_INVALID_ARGUMENT` - * or `RMW_RET_INCORRECT_RMW_IMPLEMENTATION`, ensues, leaving the given context unchanged. - * Otherwise, it will proceed despite errors, freeing as much resources as it can and zero - * initializing the given context. - * - * \pre The context to be finalized must have been previously initialized with - * `rmw_init()`, and then later invalidated with `rmw_shutdown()`. - * - * \remarks If context is zero initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. - * If context is initialized and valid (`rmw_shutdown()` was not called on it), then - * `RMW_RET_INVALID_ARGUMENT` is returned. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes [1] - * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` - * - * This should be defined by the rmw implementation. - * - * \return `RMW_RET_OK` if successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation - * identifier does not match, or - * \return `RMW_RET_ERROR` if an unspecified error occur. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_context_fini(rmw_context_t * context); - -#ifdef __cplusplus -} -#endif - -#endif // RMW__INIT_H_ diff --git a/ThirdParty/ros/include/rmw/init_options.h b/ThirdParty/ros/include/rmw/init_options.h deleted file mode 100644 index 1fe69ba7b..000000000 --- a/ThirdParty/ros/include/rmw/init_options.h +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2014-2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__INIT_OPTIONS_H_ -#define RMW__INIT_OPTIONS_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include "rcutils/allocator.h" -#include "rmw/domain_id.h" -#include "rmw/localhost.h" -#include "rmw/macros.h" -#include "rmw/ret_types.h" -#include "rmw/security_options.h" -#include "rmw/visibility_control.h" - -/// Implementation defined options structure used during rmw_init(). -/** - * This should be defined by the rmw implementation. - */ -typedef struct rmw_init_options_impl_t rmw_init_options_impl_t; - -/// Options structure used during rmw_init(). -typedef struct RMW_PUBLIC_TYPE rmw_init_options_t -{ - /// Locally (process local) unique ID that represents this init/shutdown cycle. - /** - * This should be set by the caller of `rmw_init()` to a number that is - * unique within this process. - * It is designed to be used with `rcl_init()` and `rcl_get_instance_id()`. - */ - uint64_t instance_id; - /// Implementation identifier, used to ensure two different implementations are not being mixed. - const char * implementation_identifier; - /// ROS domain id - size_t domain_id; - /// Security options - rmw_security_options_t security_options; - /// Enable localhost only - rmw_localhost_only_t localhost_only; - /// Enclave, name used to find security artifacts in a sros2 keystore. - char * enclave; - - // TODO(wjwwood): replace with rmw_allocator_t when that refactor happens - /// Allocator used during internal allocation of init options, if needed. - rcutils_allocator_t allocator; - /// Implementation defined init options. - /** May be NULL if there are no implementation defined options. */ - rmw_init_options_impl_t * impl; -} rmw_init_options_t; - -/// Return a zero initialized init options structure. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_init_options_t -rmw_get_zero_initialized_init_options(void); - -/// Initialize given init options with the default values and implementation specific values. -/** - * The given allocator is used, if required, during setup of the init options, - * but is also used during initialization. - * - * In either case the given allocator is stored in the returned init options. - * - * The `impl` pointer should not be changed manually. - * - * \pre The given init options must be zero initialized. - * - * \post If initialization fails, init options will remain zero initialized. - * - * \remark Giving an already initialized init options will result - * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * This should be defined by the rmw implementation. - * - * \param[inout] init_options object to be setup - * \param[in] allocator to be used during setup and during initialization - * \return `RMW_RET_OK` if setup is successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RMW_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RMW_RET_ERROR` if an unspecified error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_init_options_init(rmw_init_options_t * init_options, rcutils_allocator_t allocator); - -/// Copy the given source init options to the destination init options. -/** - * The allocator from the source is used for any allocations and stored in the - * destination. - * - * \pre The source init options must have been initialized - * i.e. had `rmw_init_options_init()` called on. - * \pre The destination init options must be zero initialized. - * - * \post If copy fails, destination init options will remain zero initialized. - * - * \remark Giving an zero initialized init options as a source will result - * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. - * \remark Giving an already initialized init options for the destination will result - * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * This should be defined by the rmw implementation. - * - * \param[in] src rcl_init_options_t object to be copied from - * \param[out] dst rcl_init_options_t object to be copied into - * \return `RMW_RET_OK` if the copy is successful, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation - * identifier for src does not match the implementation of this function, or - * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RMW_RET_BAD_ALLOC` if allocating memory failed, or - * \return `RMW_RET_ERROR` if an unspecified error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_init_options_copy(const rmw_init_options_t * src, rmw_init_options_t * dst); - -/// Finalize the given init options. -/** - * This function will return early if a logical error, such as `RMW_RET_INVALID_ARGUMENT` - * or `RMW_RET_INCORRECT_RMW_IMPLEMENTATION`, ensues, leaving the given init options - * unchanged. - * Otherwise, it will proceed despite errors, freeing as much resources as it can and zero - * initializing the given init options. - * - * \pre The given init options must have been initialized - * i.e. had `rmw_init_options_init()` called on. - * - * \remarks If init options are zero initialized, - * then `RMW_RET_INVALID_ARGUMENT` is returned. - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | Yes - * Thread-Safe | No - * Uses Atomics | Yes - * Lock-Free | Yes - * - * This should be defined by the rmw implementation. - * - * \param[inout] init_options object to finalized - * \return `RMW_RET_OK` if finalization is successful, or - * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation - * identifier does not match the implementation of this function, or - * \return `RMW_RET_ERROR` if an unspecified error occurs. - */ -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_ret_t -rmw_init_options_fini(rmw_init_options_t * init_options); - -#ifdef __cplusplus -} -#endif - -#endif // RMW__INIT_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rmw/localhost.h b/ThirdParty/ros/include/rmw/localhost.h deleted file mode 100644 index 187a6f326..000000000 --- a/ThirdParty/ros/include/rmw/localhost.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__LOCALHOST_H_ -#define RMW__LOCALHOST_H_ - -#include "rmw/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Used to specify if the context can only communicate through localhost. -typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_t -{ - /// Uses ROS_LOCALHOST_ONLY environment variable. - RMW_LOCALHOST_ONLY_DEFAULT = 0, - /// Forces using only localhost. - RMW_LOCALHOST_ONLY_ENABLED = 1, - /// Forces disabling localhost only. - RMW_LOCALHOST_ONLY_DISABLED = 2, -} rmw_localhost_only_t; - -#ifdef __cplusplus -} -#endif - -#endif // RMW__LOCALHOST_H_ diff --git a/ThirdParty/ros/include/rmw/qos_profiles.h b/ThirdParty/ros/include/rmw/qos_profiles.h deleted file mode 100644 index 0e39c6f23..000000000 --- a/ThirdParty/ros/include/rmw/qos_profiles.h +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__QOS_PROFILES_H_ -#define RMW__QOS_PROFILES_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "rmw/types.h" - -static const rmw_qos_profile_t rmw_qos_profile_sensor_data = -{ - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - 5, - RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT, - RMW_QOS_POLICY_DURABILITY_VOLATILE, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_parameters = -{ - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - 1000, - RMW_QOS_POLICY_RELIABILITY_RELIABLE, - RMW_QOS_POLICY_DURABILITY_VOLATILE, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_default = -{ - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - 10, - RMW_QOS_POLICY_RELIABILITY_RELIABLE, - RMW_QOS_POLICY_DURABILITY_VOLATILE, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_services_default = -{ - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - 10, - RMW_QOS_POLICY_RELIABILITY_RELIABLE, - RMW_QOS_POLICY_DURABILITY_VOLATILE, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_parameter_events = -{ - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - 1000, - RMW_QOS_POLICY_RELIABILITY_RELIABLE, - RMW_QOS_POLICY_DURABILITY_VOLATILE, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_system_default = -{ - RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT, - RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT, - RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT, - RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -static const rmw_qos_profile_t rmw_qos_profile_unknown = -{ - RMW_QOS_POLICY_HISTORY_UNKNOWN, - RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT, - RMW_QOS_POLICY_RELIABILITY_UNKNOWN, - RMW_QOS_POLICY_DURABILITY_UNKNOWN, - RMW_QOS_DEADLINE_DEFAULT, - RMW_QOS_LIFESPAN_DEFAULT, - RMW_QOS_POLICY_LIVELINESS_UNKNOWN, - RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, - false -}; - -#ifdef __cplusplus -} -#endif - -#endif // RMW__QOS_PROFILES_H_ diff --git a/ThirdParty/ros/include/rmw/allocators.h b/ThirdParty/ros/include/rmw/rmw/allocators.h similarity index 89% rename from ThirdParty/ros/include/rmw/allocators.h rename to ThirdParty/ros/include/rmw/rmw/allocators.h index 75489a5b8..976c86726 100644 --- a/ThirdParty/ros/include/rmw/allocators.h +++ b/ThirdParty/ros/include/rmw/rmw/allocators.h @@ -34,7 +34,7 @@ rmw_allocate(size_t size); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] pointer pointer to allocated memory */ RMW_PUBLIC void @@ -50,7 +50,7 @@ rmw_node_allocate(void); /// Free memory allocated to this node pointer using rcutils default allocator's deallocate() /** - * \param[in] pointer to allocated memory + * \param[in] node pointer to allocated memory */ RMW_PUBLIC void @@ -66,7 +66,7 @@ rmw_publisher_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] publisher pointer to allocated memory */ RMW_PUBLIC void @@ -82,7 +82,7 @@ rmw_subscription_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] subscription pointer to allocated memory */ RMW_PUBLIC void @@ -98,7 +98,7 @@ rmw_guard_condition_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] guard_condition pointer to allocated memory */ RMW_PUBLIC void @@ -114,7 +114,7 @@ rmw_client_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] client pointer to allocated memory */ RMW_PUBLIC void @@ -130,7 +130,7 @@ rmw_service_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] service pointer to allocated memory */ RMW_PUBLIC void @@ -146,7 +146,7 @@ rmw_wait_set_allocate(void); /// Free memory using rcutils default allocator's deallocate() /** - * \param[in] size pointer to allocated memory + * \param[in] wait_set pointer to allocated memory */ RMW_PUBLIC void diff --git a/ThirdParty/ros/include/rmw/convert_rcutils_ret_to_rmw_ret.h b/ThirdParty/ros/include/rmw/rmw/convert_rcutils_ret_to_rmw_ret.h similarity index 100% rename from ThirdParty/ros/include/rmw/convert_rcutils_ret_to_rmw_ret.h rename to ThirdParty/ros/include/rmw/rmw/convert_rcutils_ret_to_rmw_ret.h diff --git a/ThirdParty/ros/include/rmw/domain_id.h b/ThirdParty/ros/include/rmw/rmw/domain_id.h similarity index 100% rename from ThirdParty/ros/include/rmw/domain_id.h rename to ThirdParty/ros/include/rmw/rmw/domain_id.h diff --git a/ThirdParty/ros/include/rmw/error_handling.h b/ThirdParty/ros/include/rmw/rmw/error_handling.h similarity index 100% rename from ThirdParty/ros/include/rmw/error_handling.h rename to ThirdParty/ros/include/rmw/rmw/error_handling.h diff --git a/ThirdParty/ros/include/rmw/rmw/event.h b/ThirdParty/ros/include/rmw/rmw/event.h new file mode 100644 index 000000000..c74220a75 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/event.h @@ -0,0 +1,133 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENT_H_ +#define RMW__EVENT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/allocator.h" + +#include "rmw/macros.h" +#include "rmw/types.h" +#include "rmw/ret_types.h" +#include "rmw/visibility_control.h" + +/// Define publisher/subscription events +typedef enum rmw_event_type_e +{ + // subscription events + RMW_EVENT_LIVELINESS_CHANGED, + RMW_EVENT_REQUESTED_DEADLINE_MISSED, + RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE, + RMW_EVENT_MESSAGE_LOST, + + // publisher events + RMW_EVENT_LIVELINESS_LOST, + RMW_EVENT_OFFERED_DEADLINE_MISSED, + RMW_EVENT_OFFERED_QOS_INCOMPATIBLE, + + // sentinel value + RMW_EVENT_INVALID +} rmw_event_type_t; + +/// Encapsulate the RMW event implementation, data, and type. +typedef struct RMW_PUBLIC_TYPE rmw_event_s +{ + /// Implementation identifier, used to ensure two different implementations are not being mixed. + const char * implementation_identifier; + /// Data specific to this event type from either the publisher or subscriber. + void * data; + /// The event type that occurred. + rmw_event_type_t event_type; +} rmw_event_t; + +/// Return a zero initialized event structure. +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_event_t +rmw_get_zero_initialized_event(void); + +/// Initialize a rmw publisher event. +/** + * \param[inout] rmw_event to initialize + * \param[in] publisher to initialize with + * \param[inout] event_type for the event to initialize + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if invalid argument, or + * \return `RMW_RET_UNSUPPORTED` if event_type is not supported, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_publisher_event_init( + rmw_event_t * rmw_event, + const rmw_publisher_t * publisher, + rmw_event_type_t event_type); + +/// Initialize a rmw subscription event. +/** + * \param[inout] rmw_event to initialize + * \param[in] subscription to initialize with + * \param[inout] event_type for the event to handle + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if invalid argument, or + * \return `RMW_RET_UNSUPPORTED` if event_type is not supported, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_subscription_event_init( + rmw_event_t * rmw_event, + const rmw_subscription_t * subscription, + rmw_event_type_t event_type); + +/// Take an event from the event handle. +/** + * \param[in] event_handle event object to take from + * \param[inout] event_info event info object to write taken data into + * \param[out] taken boolean flag indicating if an event was taken or not + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_BAD_ALLOC` if memory allocation failed, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_take_event( + const rmw_event_t * event_handle, + void * event_info, + bool * taken); + +/// Finalize an rmw_event_t. +/** + * \param[in] event to finalize + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_event_fini(rmw_event_t * event); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENT_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/event_callback_type.h b/ThirdParty/ros/include/rmw/rmw/event_callback_type.h new file mode 100644 index 000000000..8833b49fc --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/event_callback_type.h @@ -0,0 +1,52 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENT_CALLBACK_TYPE_H_ +#define RMW__EVENT_CALLBACK_TYPE_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Common event callback type signature. +/** + * Event callbacks of this type can be called in various scenarios, e.g. + * data becomes available on a subscription, a QoS event has occurred, or + * something similar. + * + * The user_data argument is given by the user when registering the callback, + * and is given back to the callback each time so it can have associated, + * user-defined state. + * + * The number_of_events argument indicates the number of events since the + * callback was called. + * This is most often 1, but can be > 1 when events occur before the callback + * is registered. + * It should never be 0. + * + * \sa rmw_subscription_set_on_new_message_callback() + * \sa rmw_service_set_on_new_request_callback() + * \sa rmw_client_set_on_new_response_callback() + * \sa rmw_event_set_callback() + */ +typedef void (* rmw_event_callback_t)(const void * user_data, size_t number_of_events); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENT_CALLBACK_TYPE_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/events_statuses.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/events_statuses.h new file mode 100644 index 000000000..99bf9af21 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/events_statuses.h @@ -0,0 +1,25 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ +#define RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ + +#include "rmw/events_statuses/incompatible_qos.h" +#include "rmw/events_statuses/liveliness_changed.h" +#include "rmw/events_statuses/liveliness_lost.h" +#include "rmw/events_statuses/message_lost.h" +#include "rmw/events_statuses/offered_deadline_missed.h" +#include "rmw/events_statuses/requested_deadline_missed.h" + +#endif // RMW__EVENTS_STATUSES__EVENTS_STATUSES_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/incompatible_qos.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/incompatible_qos.h new file mode 100644 index 000000000..018cd6a45 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/incompatible_qos.h @@ -0,0 +1,57 @@ +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ +#define RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ + +#include + +#include "rmw/qos_policy_kind.h" +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct RMW_PUBLIC_TYPE rmw_qos_incompatible_event_status_s +{ + /** + * Total cumulative number of times the concerned subscription discovered a + * publisher for the same topic with an offered QoS that was incompatible + * with that requested by the subscription. + */ + int32_t total_count; + /** + * The change in total_count since the last time the status was read. + */ + int32_t total_count_change; + /** + * The Qos Policy Kind of one of the policies that was found to be + * incompatible the last time an incompatibility was detected. + */ + rmw_qos_policy_kind_t last_policy_kind; +} rmw_qos_incompatible_event_status_t; + +/// Event state for a subscription's 'RMW_EVENT_REQUESTED_QOS_INCOMPATIBLE' events. +typedef rmw_qos_incompatible_event_status_t rmw_requested_qos_incompatible_event_status_t; + +/// Event state for a publisher's 'RMW_EVENT_OFFERED_QOS_INCOMPATIBLE' events. +typedef rmw_qos_incompatible_event_status_t rmw_offered_qos_incompatible_event_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__INCOMPATIBLE_QOS_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_changed.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_changed.h new file mode 100644 index 000000000..e7abf7290 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_changed.h @@ -0,0 +1,58 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ +#define RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ + +#include + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// QoS Liveliness Changed information provided by a subscription. +typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_s +{ + /** + * The total number of currently active Publishers which publish to the topic associated with + * the Subscription. + * This count increases when a newly matched Publisher asserts its liveliness for the first time + * or when a Publisher previously considered to be not alive reasserts its liveliness. + * The count decreases when a Publisher considered alive fails to assert its liveliness and + * becomes not alive, whether because it was deleted normally or for some other reason. + */ + int32_t alive_count; + /** + * The total count of current Publishers which publish to the topic associated with the + * Subscription that are no longer asserting their liveliness. + * This count increases when a Publisher considered alive fails to assert its liveliness and + * becomes not alive for some reason other than the normal deletion of that Publisher. + * It decreases when a previously not alive Publisher either reasserts its liveliness or is + * deleted normally. + */ + int32_t not_alive_count; + /// The change in the alive_count since the status was last read. + int32_t alive_count_change; + /// The change in the not_alive_count since the status was last read. + int32_t not_alive_count_change; +} rmw_liveliness_changed_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__LIVELINESS_CHANGED_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_lost.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_lost.h new file mode 100644 index 000000000..a91879a6c --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/liveliness_lost.h @@ -0,0 +1,45 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ +#define RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ + +#include + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// QoS Liveliness Lost information provided by a publisher. +typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_s +{ + /** + * Lifetime cumulative number of times that a previously-alive Publisher became not alive due to + * a failure to actively signal its liveliness within its offered liveliness period. + * This count does not change when an already not alive Publisher simply remains not alive for + * another liveliness period. + */ + int32_t total_count; + /// The change in total_count since the last time the status was last read. + int32_t total_count_change; +} rmw_liveliness_lost_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__LIVELINESS_LOST_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/message_lost.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/message_lost.h new file mode 100644 index 000000000..b08fc8d5c --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/message_lost.h @@ -0,0 +1,39 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__MESSAGE_LOST_H_ +#define RMW__EVENTS_STATUSES__MESSAGE_LOST_H_ + +#include + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct RMW_PUBLIC_TYPE rmw_message_lost_status_s +{ + /// Total number of messages lost. + size_t total_count; + /// Number of messages lost since last callback. + size_t total_count_change; +} rmw_message_lost_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__MESSAGE_LOST_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/offered_deadline_missed.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/offered_deadline_missed.h new file mode 100644 index 000000000..84acb0426 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/offered_deadline_missed.h @@ -0,0 +1,45 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ +#define RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ + +#include + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// QoS Deadline Missed information provided by a publisher. +typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_s +{ + /** + * Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed + * to provide data. + * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented + * by one. + */ + int32_t total_count; + /// The change in total_count since the last time the status was last read. + int32_t total_count_change; +} rmw_offered_deadline_missed_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__OFFERED_DEADLINE_MISSED_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/events_statuses/requested_deadline_missed.h b/ThirdParty/ros/include/rmw/rmw/events_statuses/requested_deadline_missed.h new file mode 100644 index 000000000..b39cb5a32 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/events_statuses/requested_deadline_missed.h @@ -0,0 +1,45 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ +#define RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ + +#include + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// QoS Requested Deadline Missed information provided by a subscription. +typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_s +{ + /** + * Lifetime cumulative number of missed deadlines detected for any instance read by the + * subscription. + * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented + * by one for each instance for which data was not received. + */ + int32_t total_count; + /// The incremental number of deadlines detected since the status was read. + int32_t total_count_change; +} rmw_requested_deadline_missed_status_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__EVENTS_STATUSES__REQUESTED_DEADLINE_MISSED_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/features.h b/ThirdParty/ros/include/rmw/rmw/features.h new file mode 100644 index 000000000..367b586e1 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/features.h @@ -0,0 +1,63 @@ +// Copyright 2022 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef RMW__FEATURES_H_ +#define RMW__FEATURES_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/allocator.h" + +#include "rmw/macros.h" +#include "rmw/types.h" +#include "rmw/ret_types.h" +#include "rmw/visibility_control.h" + +/// List of optional rmw features. +/** + * Some of the features listed here might become mandatory in the feature, in which case all rmw + * implementations should return `true`. + * + * There might be some optional features that are not listed here, but the goal is to have all of + * them added. + */ +typedef enum RMW_PUBLIC_TYPE rmw_feature_e +{ + /// `rmw_message_info_t.publication_sequence_number` is filled correctly + /// by the rmw implementation. + RMW_FEATURE_MESSAGE_INFO_PUBLICATION_SEQUENCE_NUMBER = 0, + /// `rmw_message_info_t.reception_sequence_number` is filled correctly + /// by the rmw implementation. + RMW_FEATURE_MESSAGE_INFO_RECEPTION_SEQUENCE_NUMBER = 1, +} rmw_feature_t; + +/// Query if a feature is supported by the rmw implementation. +/** + * \return `true` if the rmw implementation supports the feature, `false` if not. + */ +RMW_PUBLIC +bool +rmw_feature_supported(rmw_feature_t feature); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__FEATURES_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/get_network_flow_endpoints.h b/ThirdParty/ros/include/rmw/rmw/get_network_flow_endpoints.h new file mode 100644 index 000000000..5e8569985 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/get_network_flow_endpoints.h @@ -0,0 +1,73 @@ +// Copyright 2020 Ericsson AB +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__GET_NETWORK_FLOW_ENDPOINTS_H_ +#define RMW__GET_NETWORK_FLOW_ENDPOINTS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rmw/network_flow_endpoint_array.h" +#include "rmw/types.h" +#include "rmw/visibility_control.h" + +/// Get network flow endpoints of a publisher +/** + * Query the underlying middleware for a given publisher's network flow endpoints + * + * \param[in] publisher the publisher instance to inspect + * \param[in] allocator allocator to be used when allocating space for network_flow_endpoint_array_t + * \param[out] network_flow_endpoint_array the network flow endpoints + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any argument is null, + * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RMW_RET_UNSUPPORTED` if not supported, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_publisher_get_network_flow_endpoints( + const rmw_publisher_t * publisher, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +/// Get network flow endpoints of a subscription +/** + * Query the underlying middleware for a given subscription's network flow endpoints + * + * \param[in] subscription the subscription instance to inspect + * \param[in] allocator allocator to be used when allocating space for network_flow_endpoint_array_t + * \param[out] network_flow_endpoint_array the network flow endpoints + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any argument is null, or + * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RMW_RET_UNSUPPORTED` if not supported, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_subscription_get_network_flow_endpoints( + const rmw_subscription_t * subscription, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__GET_NETWORK_FLOW_ENDPOINTS_H_ diff --git a/ThirdParty/ros/include/rmw/get_node_info_and_types.h b/ThirdParty/ros/include/rmw/rmw/get_node_info_and_types.h similarity index 98% rename from ThirdParty/ros/include/rmw/get_node_info_and_types.h rename to ThirdParty/ros/include/rmw/rmw/get_node_info_and_types.h index 98d85fce9..0b6da2982 100644 --- a/ThirdParty/ros/include/rmw/get_node_info_and_types.h +++ b/ThirdParty/ros/include/rmw/rmw/get_node_info_and_types.h @@ -138,7 +138,7 @@ rmw_get_subscriber_names_and_types_by_node( * \pre Given `topic_names_and_types` must be a zero-initialized array of names and types, * as returned by rmw_get_zero_initialized_names_and_types(). * - * \param[in] Local node to query the ROS graph. + * \param[in] node Local node to query the ROS graph. * \param[in] allocator Allocator to be used when populating the `topic_names_and_types` array. * \param[in] node_name Name of the remote node to get information for. * \param[in] node_namespace Namespace of the remote node to get information for. @@ -210,9 +210,9 @@ rmw_get_publisher_names_and_types_by_node( * Check your allocator documentation for further reference. * * \param[in] node Local node to query the ROS graph. + * \param[in] allocator Allocator to be used when populating the `service_names_and_types` array. * \param[in] node_name Name of the remote node to get information for. * \param[in] node_namespace Namespace of the remote node to get information for. - * \param[in] no_demangle Whether to demangle all topic names following ROS conventions or not. * \param[out] service_names_and_types Array of service names and types the remote node has * created a service server for, populated on success but left unchanged on failure. * If populated, it is up to the caller to finalize this array later on @@ -279,9 +279,9 @@ rmw_get_service_names_and_types_by_node( * Check your allocator documentation for further reference. * * \param[in] node Local node to query the ROS graph. + * \param[in] allocator Allocator to be used when populating the `service_names_and_types` array. * \param[in] node_name Name of the remote node to get information for. * \param[in] node_namespace Namespace of the remote node to get information for. - * \param[in] no_demangle Whether to demangle all topic names following ROS conventions or not. * \param[out] service_names_and_types Array of service names and types the remote node has * created a service client for, populated on success but left unchanged on failure. * If populated, it is up to the caller to finalize this array later on diff --git a/ThirdParty/ros/include/rmw/get_service_names_and_types.h b/ThirdParty/ros/include/rmw/rmw/get_service_names_and_types.h similarity index 100% rename from ThirdParty/ros/include/rmw/get_service_names_and_types.h rename to ThirdParty/ros/include/rmw/rmw/get_service_names_and_types.h diff --git a/ThirdParty/ros/include/rmw/get_topic_endpoint_info.h b/ThirdParty/ros/include/rmw/rmw/get_topic_endpoint_info.h similarity index 89% rename from ThirdParty/ros/include/rmw/get_topic_endpoint_info.h rename to ThirdParty/ros/include/rmw/rmw/get_topic_endpoint_info.h index b9f6ae67a..210fad895 100644 --- a/ThirdParty/ros/include/rmw/get_topic_endpoint_info.h +++ b/ThirdParty/ros/include/rmw/rmw/get_topic_endpoint_info.h @@ -31,6 +31,14 @@ extern "C" * the associated topic type, the publisher's gid, and the publisher QoS profile. * Names of non-existent topics are allowed, in which case an empty array will be returned. * + * \par QoS that are correctly read + * The QoS profiles returned might have some invalid fields. + * The rmw implementation must set the invalid fields to `RMW_QOS_POLICY_*_UNKNOWN`. + * For DDS based implementations, the only QoS policies that are guaranteed to be shared + * during discovery are the ones that participate in endpoint matching. + * From the current QoS settings available, the only ones not shared by DDS based + * implementations are `history` and `history_depth`. + * *
* Attribute | Adherence * ------------------ | ------------- @@ -72,6 +80,8 @@ extern "C" * left unchanged on failure. * If populated, it is up to the caller to finalize this array later on, * using rmw_topic_endpoint_info_array_fini(). + * QoS Profiles in the info array will use RMW_DURATION_INFINITE for infinite durations, + * avoiding exposing any implementation-specific values. * \return `RMW_RET_OK` if the query was successful, or * \return `RMW_RET_INVALID_ARGUMENT` if `node` is NULL, or * \return `RMW_RET_INVALID_ARGUMENT` if `allocator` is not valid, @@ -103,6 +113,9 @@ rmw_get_publishers_info_by_topic( * the associated topic type, the subscription's gid, and the subscription QoS profile. * Names of non-existent topics are allowed, in which case an empty array will be returned. * + * \par QoS that are correctly read + * Not all QoS may be read correctly, \sa rmw_get_publishers_info_by_topic() for more details. + * *
* Attribute | Adherence * ------------------ | ------------- @@ -138,10 +151,12 @@ rmw_get_publishers_info_by_topic( * \param[in] topic_name Name of the topic for subscription lookup, often a fully qualified * topic name but not necessarily (see rmw_create_subscription()). * \param[in] no_mangle Whether to mangle the topic name before subscription lookup or not. - * \param[out] publishers_info Array of subscription information, populated on success, + * \param[out] subscriptions_info Array of subscription information, populated on success, * left unchanged on failure. * If populated, it is up to the caller to finalize this array later on, * using rmw_topic_endpoint_info_array_fini(). + * QoS Profiles in the info array will use RMW_DURATION_INFINITE for infinite durations, + * avoiding exposing any implementation-specific values. * \return `RMW_RET_OK` if the query was successful, or * \return `RMW_RET_INVALID_ARGUMENT` if `node` is NULL, or * \return `RMW_RET_INVALID_ARGUMENT` if `allocator` is not valid, diff --git a/ThirdParty/ros/include/rmw/get_topic_names_and_types.h b/ThirdParty/ros/include/rmw/rmw/get_topic_names_and_types.h similarity index 100% rename from ThirdParty/ros/include/rmw/get_topic_names_and_types.h rename to ThirdParty/ros/include/rmw/rmw/get_topic_names_and_types.h diff --git a/ThirdParty/ros/include/rmw/impl/config.h b/ThirdParty/ros/include/rmw/rmw/impl/config.h similarity index 100% rename from ThirdParty/ros/include/rmw/impl/config.h rename to ThirdParty/ros/include/rmw/rmw/impl/config.h diff --git a/ThirdParty/ros/include/rmw/impl/cpp/demangle.hpp b/ThirdParty/ros/include/rmw/rmw/impl/cpp/demangle.hpp similarity index 100% rename from ThirdParty/ros/include/rmw/impl/cpp/demangle.hpp rename to ThirdParty/ros/include/rmw/rmw/impl/cpp/demangle.hpp diff --git a/ThirdParty/ros/include/rmw/impl/cpp/key_value.hpp b/ThirdParty/ros/include/rmw/rmw/impl/cpp/key_value.hpp similarity index 100% rename from ThirdParty/ros/include/rmw/impl/cpp/key_value.hpp rename to ThirdParty/ros/include/rmw/rmw/impl/cpp/key_value.hpp diff --git a/ThirdParty/ros/include/rmw/impl/cpp/macros.hpp b/ThirdParty/ros/include/rmw/rmw/impl/cpp/macros.hpp similarity index 100% rename from ThirdParty/ros/include/rmw/impl/cpp/macros.hpp rename to ThirdParty/ros/include/rmw/rmw/impl/cpp/macros.hpp diff --git a/ThirdParty/ros/include/rmw/rmw/incompatible_qos_events_statuses.h b/ThirdParty/ros/include/rmw/rmw/incompatible_qos_events_statuses.h new file mode 100644 index 000000000..3edb98ade --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/incompatible_qos_events_statuses.h @@ -0,0 +1,20 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ +#define RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ + +#include "rmw/events_statuses/incompatible_qos.h" + +#endif // RMW__INCOMPATIBLE_QOS_EVENTS_STATUSES_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/init.h b/ThirdParty/ros/include/rmw/rmw/init.h new file mode 100644 index 000000000..e4a6c550c --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/init.h @@ -0,0 +1,173 @@ +// Copyright 2014-2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__INIT_H_ +#define RMW__INIT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rmw/init_options.h" +#include "rmw/macros.h" +#include "rmw/ret_types.h" +#include "rmw/visibility_control.h" + +/// Implementation defined context structure returned by rmw_init(). +/** + * This should be defined by the rmw implementation. + */ +typedef struct rmw_context_impl_s rmw_context_impl_t; + +/// Initialization context structure which is used to store init specific information. +typedef struct RMW_PUBLIC_TYPE rmw_context_s +{ + /// Locally (process local) unique ID that represents this init/shutdown cycle. + uint64_t instance_id; + /// Implementation identifier, used to ensure two different implementations are not being mixed. + const char * implementation_identifier; + /// Options used to initialize the context. + rmw_init_options_t options; + /// Domain id that is being used. + size_t actual_domain_id; + /// Implementation defined context information. + /** May be NULL if there is no implementation defined context information. */ + rmw_context_impl_t * impl; +} rmw_context_t; + +/// Return a zero initialized context structure. +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_context_t +rmw_get_zero_initialized_context(void); + +/// Initialize the middleware with the given options, and yielding an context. +/** + * Context is filled with middleware specific data upon success of this function. + * The context is used when initializing some entities like nodes and + * guard conditions, and is also required to properly call `rmw_shutdown()`. + * + * \pre The given options must have been initialized + * i.e. `rmw_init_options_init()` called on it and + * an enclave set. + * \pre The given context must be zero initialized. + * + * \post If initialization fails, context will remain zero initialized. + * \post `context->actual_domain_id` will be set with the domain id the rmw implementation is using. + * This matches `options->domain_id` if it is not RMW_DEFAULT_DOMAIN_ID. + * In other case, the value is rmw implementation dependent. + * + * \remarks If options are zero-initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. + * If options are initialized but no enclave is provided, then `RMW_RET_INVALID_ARGUMENT` + * is returned. + * If context has been already initialized (`rmw_init()` was called on it), then + * `RMW_RET_INVALID_ARGUMENT` is returned. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * This should be defined by the rmw implementation. + * + * \param[in] options initialization options to be used during initialization + * \param[out] context resulting context struct + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_init(const rmw_init_options_t * options, rmw_context_t * context); + +/// Shutdown the middleware for a given context. +/** + * \pre The given context must be a valid context which has been initialized with `rmw_init()`. + * + * \remarks If context is zero initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. + * If context has been already invalidated (`rmw_shutdown()` was called on it), then + * this function is a no-op and `RMW_RET_OK` is returned. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | No + * Lock-Free | Yes + * + * This should be defined by the rmw implementation. + * + * \param[in] context resulting context struct + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any argument are invalid, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_shutdown(rmw_context_t * context); + +/// Finalize a context. +/** + * This function will return early if a logical error, such as `RMW_RET_INVALID_ARGUMENT` + * or `RMW_RET_INCORRECT_RMW_IMPLEMENTATION`, ensues, leaving the given context unchanged. + * Otherwise, it will proceed despite errors, freeing as much resources as it can and zero + * initializing the given context. + * + * \pre The context to be finalized must have been previously initialized with + * `rmw_init()`, and then later invalidated with `rmw_shutdown()`. + * + * \remarks If context is zero initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. + * If context is initialized and valid (`rmw_shutdown()` was not called on it), then + * `RMW_RET_INVALID_ARGUMENT` is returned. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes [1] + * [1] if `atomic_is_lock_free()` returns true for `atomic_uint_least64_t` + * + * This should be defined by the rmw implementation. + * + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier does not match, or + * \return `RMW_RET_ERROR` if an unspecified error occur. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_context_fini(rmw_context_t * context); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__INIT_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/init_options.h b/ThirdParty/ros/include/rmw/rmw/init_options.h new file mode 100644 index 000000000..b9ea5ebfb --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/init_options.h @@ -0,0 +1,192 @@ +// Copyright 2014-2018 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__INIT_OPTIONS_H_ +#define RMW__INIT_OPTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#include "rcutils/allocator.h" +#include "rmw/domain_id.h" +#include "rmw/localhost.h" +#include "rmw/macros.h" +#include "rmw/ret_types.h" +#include "rmw/security_options.h" +#include "rmw/visibility_control.h" + +/// Implementation defined options structure used during rmw_init(). +/** + * This should be defined by the rmw implementation. + */ +typedef struct rmw_init_options_impl_s rmw_init_options_impl_t; + +/// Options structure used during rmw_init(). +typedef struct RMW_PUBLIC_TYPE rmw_init_options_s +{ + /// Locally (process local) unique ID that represents this init/shutdown cycle. + /** + * This should be set by the caller of `rmw_init()` to a number that is + * unique within this process. + * It is designed to be used with `rcl_init()` and `rcl_get_instance_id()`. + */ + uint64_t instance_id; + /// Implementation identifier, used to ensure two different implementations are not being mixed. + const char * implementation_identifier; + /// ROS domain id + size_t domain_id; + /// Security options + rmw_security_options_t security_options; + /// Enable localhost only + rmw_localhost_only_t localhost_only; + /// Enclave, name used to find security artifacts in a sros2 keystore. + char * enclave; + + // TODO(wjwwood): replace with rmw_allocator_t when that refactor happens + /// Allocator used during internal allocation of init options, if needed. + rcutils_allocator_t allocator; + /// Implementation defined init options. + /** May be NULL if there are no implementation defined options. */ + rmw_init_options_impl_t * impl; +} rmw_init_options_t; + +/// Return a zero initialized init options structure. +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_init_options_t +rmw_get_zero_initialized_init_options(void); + +/// Initialize given init options with the default values and implementation specific values. +/** + * The given allocator is used, if required, during setup of the init options, + * but is also used during initialization. + * + * In either case the given allocator is stored in the returned init options. + * + * The `impl` pointer should not be changed manually. + * + * \pre The given init options must be zero initialized. + * + * \post If initialization fails, init options will remain zero initialized. + * + * \remark Giving an already initialized init options will result + * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * This should be defined by the rmw implementation. + * + * \param[inout] init_options object to be setup + * \param[in] allocator to be used during setup and during initialization + * \return `RMW_RET_OK` if setup is successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RMW_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RMW_RET_ERROR` if an unspecified error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_init_options_init(rmw_init_options_t * init_options, rcutils_allocator_t allocator); + +/// Copy the given source init options to the destination init options. +/** + * The allocator from the source is used for any allocations and stored in the + * destination. + * + * \pre The source init options must have been initialized + * i.e. had `rmw_init_options_init()` called on. + * \pre The destination init options must be zero initialized. + * + * \post If copy fails, destination init options will remain zero initialized. + * + * \remark Giving an zero initialized init options as a source will result + * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. + * \remark Giving an already initialized init options for the destination will result + * in a failure with return code `RMW_RET_INVALID_ARGUMENT`. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * This should be defined by the rmw implementation. + * + * \param[in] src rcl_init_options_t object to be copied from + * \param[out] dst rcl_init_options_t object to be copied into + * \return `RMW_RET_OK` if the copy is successful, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier for src does not match the implementation of this function, or + * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RMW_RET_BAD_ALLOC` if allocating memory failed, or + * \return `RMW_RET_ERROR` if an unspecified error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_init_options_copy(const rmw_init_options_t * src, rmw_init_options_t * dst); + +/// Finalize the given init options. +/** + * This function will return early if a logical error, such as `RMW_RET_INVALID_ARGUMENT` + * or `RMW_RET_INCORRECT_RMW_IMPLEMENTATION`, ensues, leaving the given init options + * unchanged. + * Otherwise, it will proceed despite errors, freeing as much resources as it can and zero + * initializing the given init options. + * + * \pre The given init options must have been initialized + * i.e. had `rmw_init_options_init()` called on. + * + * \remarks If init options are zero initialized, + * then `RMW_RET_INVALID_ARGUMENT` is returned. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Yes + * Lock-Free | Yes + * + * This should be defined by the rmw implementation. + * + * \param[inout] init_options object to finalized + * \return `RMW_RET_OK` if finalization is successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier does not match the implementation of this function, or + * \return `RMW_RET_ERROR` if an unspecified error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_init_options_fini(rmw_init_options_t * init_options); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__INIT_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/localhost.h b/ThirdParty/ros/include/rmw/rmw/localhost.h new file mode 100644 index 000000000..6d867fde4 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/localhost.h @@ -0,0 +1,40 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__LOCALHOST_H_ +#define RMW__LOCALHOST_H_ + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Used to specify if the context can only communicate through localhost. +typedef enum RMW_PUBLIC_TYPE rmw_localhost_only_e +{ + /// Uses ROS_LOCALHOST_ONLY environment variable. + RMW_LOCALHOST_ONLY_DEFAULT = 0, + /// Forces using only localhost. + RMW_LOCALHOST_ONLY_ENABLED = 1, + /// Forces disabling localhost only. + RMW_LOCALHOST_ONLY_DISABLED = 2, +} rmw_localhost_only_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__LOCALHOST_H_ diff --git a/ThirdParty/ros/include/rmw/macros.h b/ThirdParty/ros/include/rmw/rmw/macros.h similarity index 100% rename from ThirdParty/ros/include/rmw/macros.h rename to ThirdParty/ros/include/rmw/rmw/macros.h diff --git a/ThirdParty/ros/include/rmw/message_sequence.h b/ThirdParty/ros/include/rmw/rmw/message_sequence.h similarity index 97% rename from ThirdParty/ros/include/rmw/message_sequence.h rename to ThirdParty/ros/include/rmw/rmw/message_sequence.h index d8e2bad51..77dd0a30a 100644 --- a/ThirdParty/ros/include/rmw/message_sequence.h +++ b/ThirdParty/ros/include/rmw/rmw/message_sequence.h @@ -27,7 +27,7 @@ extern "C" #endif /// Structure to hold a sequence of ROS messages. -typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t +typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_s { /// Array of pointers to ROS messages. void ** data; @@ -40,7 +40,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_sequence_t } rmw_message_sequence_t; /// Structure to hold a sequence of message infos. -typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_t +typedef struct RMW_PUBLIC_TYPE rmw_message_info_sequence_s { /// Array of message info. rmw_message_info_t * data; diff --git a/ThirdParty/ros/include/rmw/names_and_types.h b/ThirdParty/ros/include/rmw/rmw/names_and_types.h similarity index 98% rename from ThirdParty/ros/include/rmw/names_and_types.h rename to ThirdParty/ros/include/rmw/rmw/names_and_types.h index a83186605..08280995b 100644 --- a/ThirdParty/ros/include/rmw/names_and_types.h +++ b/ThirdParty/ros/include/rmw/rmw/names_and_types.h @@ -29,7 +29,7 @@ extern "C" #include "rmw/visibility_control.h" /// Associative array of topic or service names and types. -typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_t +typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_s { /// Array of names rcutils_string_array_t names; diff --git a/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint.h b/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint.h new file mode 100644 index 000000000..331fedb17 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint.h @@ -0,0 +1,114 @@ +// Copyright 2020 Ericsson AB +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__NETWORK_FLOW_ENDPOINT_H_ +#define RMW__NETWORK_FLOW_ENDPOINT_H_ + +#if __cplusplus +extern "C" +{ +#endif + +#include "rmw/types.h" +#include "rmw/visibility_control.h" + +/// Transport protocol types +typedef enum rmw_transport_protocol_e +{ + RMW_TRANSPORT_PROTOCOL_UNKNOWN = 0, + RMW_TRANSPORT_PROTOCOL_UDP, + RMW_TRANSPORT_PROTOCOL_TCP, + RMW_TRANSPORT_PROTOCOL_COUNT +} rmw_transport_protocol_t; + +/// Internet protocol types +typedef enum rmw_internet_protocol_e +{ + RMW_INTERNET_PROTOCOL_UNKNOWN = 0, + RMW_INTERNET_PROTOCOL_IPV4, + RMW_INTERNET_PROTOCOL_IPV6, + RMW_INTERNET_PROTOCOL_COUNT +} rmw_internet_protocol_t; + +/// Maximum length of internet address string including terminating null +/// Inspired from linux/inet.h +#define RMW_INET_ADDRSTRLEN 48 + +/// Structure that describes network flow endpoint of a publisher or subscription +typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_s +{ + // Transport protocol + rmw_transport_protocol_t transport_protocol; + // Internet protocol + rmw_internet_protocol_t internet_protocol; + // Port + uint16_t transport_port; + // Flow label + // TODO(anamud): Consider specializing since flow_label is set only at publisher + // ... side. + uint32_t flow_label; + // DSCP (Diff. Services Code Point) + // TODO(anamud): Consider specializing since DSCP is set only at publisher + // ... side. + uint8_t dscp; + // Internet address + char internet_address[RMW_INET_ADDRSTRLEN]; +} rmw_network_flow_endpoint_t; + +/// Return a rmw_network_flow_endpoint_t struct with zero-initialized members +RMW_PUBLIC +rmw_network_flow_endpoint_t +rmw_get_zero_initialized_network_flow_endpoint(void); + +/// Convert to string variant of transport protocol +/** + * \param[in] transport_protocol transport_protocol_t to be converted + */ +RMW_PUBLIC +const char * +rmw_network_flow_endpoint_get_transport_protocol_string( + const rmw_transport_protocol_t transport_protocol); + +/// Convert to string variant of internet protocol +/** + * \param[in] internet_protocol internet_protocol_t to be converted + */ +RMW_PUBLIC +const char * +rmw_network_flow_endpoint_get_internet_protocol_string( + const rmw_internet_protocol_t internet_protocol); + +/// Set internet address in the rmw_network_flow_endpoint_t struct +/** + * \param[in] network_flow_endpoint network_flow_endpoint_t to be initialized + * \param[in] internet_address the internet address as C-style string + * \param[in] size size of internet_address excluding terminating null + * \returns `RMW_RET_OK` on successfull initilization, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `network_flow_endpoint` is NULL, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `internet_address` is NULL, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `size` is not less than RMW_INET_ADDRSTRLEN, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. + */ +RMW_PUBLIC +rmw_ret_t +rmw_network_flow_endpoint_set_internet_address( + rmw_network_flow_endpoint_t * network_flow_endpoint, + const char * internet_address, + size_t size); + +#if __cplusplus +} +#endif + +#endif // RMW__NETWORK_FLOW_ENDPOINT_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint_array.h b/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint_array.h new file mode 100644 index 000000000..584b4911e --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/network_flow_endpoint_array.h @@ -0,0 +1,94 @@ +// Copyright 2020 Ericsson AB +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__NETWORK_FLOW_ENDPOINT_ARRAY_H_ +#define RMW__NETWORK_FLOW_ENDPOINT_ARRAY_H_ + +#if __cplusplus +extern "C" +{ +#endif + +#include "rcutils/allocator.h" + +#include "rmw/network_flow_endpoint.h" +#include "rmw/types.h" +#include "rmw/visibility_control.h" + +/// Structure to hold an arrary of network_flow_endpoint_t +typedef struct RMW_PUBLIC_TYPE rmw_network_flow_endpoint_array_s +{ + /// Size of the array + size_t size; + /// Array of rmw_network_flow_endpoint_t + rmw_network_flow_endpoint_t * network_flow_endpoint; + /// Allocator + rcutils_allocator_t * allocator; +} rmw_network_flow_endpoint_array_t; + +/// Return a rmw_network_flow_endpoint_array_t instance with zero-initialized members +RMW_PUBLIC +rmw_network_flow_endpoint_array_t +rmw_get_zero_initialized_network_flow_endpoint_array(void); + +/// Check if network_flow_endpoint_array instance is zero-initialized +/** + * \param[in] network_flow_endpoint_array arrary to be checked + * \returns `RMW_RET_OK` if array is zero-initialized, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `network_flow_endpoint_array` is NULL, or + * \returns `RMW_RET_ERROR` if `network_flow_endpoint_array` is not zero-initialized. + * \remark RMW error state is set on failure + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_network_flow_endpoint_array_check_zero( + const rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +/// Allocate a rmw_network_flow_endpoint_array_t instance +/** + * \param[inout] network_flow_endpoint_array array to be allocated + * \param[in] size size of the array to be allocated + * \param[in] allocator the allcator for allocating memory + * \returns `RMW_RET_OK` on successfull initilization, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `network_flow_endpoint_array` or `allocator` is NULL, or + * \returns `RMW_RET_BAD_ALLOC` if memory allocation fails, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. + * \remark RMW error state is set on failure + */ +RMW_PUBLIC +rmw_ret_t +rmw_network_flow_endpoint_array_init( + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array, + size_t size, + rcutils_allocator_t * allocator); + +/// Deallocate a rmw_network_flow_endpoint_array_t instance +/** + * \param[inout] network_flow_endpoint_array array to be deallocated + * \returns `RMW_RET_OK` on successfully deallocation, or + * \returns `RMW_RET_INVALID_ARGUMENT` if `network_flow_endpoint_array` or its allocator is NULL, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. + * \remark RMW error state is set on failure + */ +RMW_PUBLIC +rmw_ret_t +rmw_network_flow_endpoint_array_fini( + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +#if __cplusplus +} +#endif + +#endif // RMW__NETWORK_FLOW_ENDPOINT_ARRAY_H_ diff --git a/ThirdParty/ros/include/rmw/publisher_options.h b/ThirdParty/ros/include/rmw/rmw/publisher_options.h similarity index 100% rename from ThirdParty/ros/include/rmw/publisher_options.h rename to ThirdParty/ros/include/rmw/rmw/publisher_options.h diff --git a/ThirdParty/ros/include/rmw/rmw/qos_policy_kind.h b/ThirdParty/ros/include/rmw/rmw/qos_policy_kind.h new file mode 100644 index 000000000..422e53e43 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/qos_policy_kind.h @@ -0,0 +1,45 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__QOS_POLICY_KIND_H_ +#define RMW__QOS_POLICY_KIND_H_ + +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// QoS Policy Kinds +typedef enum RMW_PUBLIC_TYPE rmw_qos_policy_kind_e +{ + RMW_QOS_POLICY_INVALID = 1 << 0, + RMW_QOS_POLICY_DURABILITY = 1 << 1, + RMW_QOS_POLICY_DEADLINE = 1 << 2, + RMW_QOS_POLICY_LIVELINESS = 1 << 3, + RMW_QOS_POLICY_RELIABILITY = 1 << 4, + RMW_QOS_POLICY_HISTORY = 1 << 5, + RMW_QOS_POLICY_LIFESPAN = 1 << 6, + RMW_QOS_POLICY_DEPTH = 1 << 7, + RMW_QOS_POLICY_LIVELINESS_LEASE_DURATION = 1 << 8, + RMW_QOS_POLICY_AVOID_ROS_NAMESPACE_CONVENTIONS = 1 << 9, +} rmw_qos_policy_kind_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__QOS_POLICY_KIND_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/qos_profiles.h b/ThirdParty/ros/include/rmw/rmw/qos_profiles.h new file mode 100644 index 000000000..89b30e97f --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/qos_profiles.h @@ -0,0 +1,187 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__QOS_PROFILES_H_ +#define RMW__QOS_PROFILES_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rmw/types.h" + +static const rmw_qos_profile_t rmw_qos_profile_sensor_data = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 5, + RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT, + RMW_QOS_POLICY_DURABILITY_VOLATILE, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_parameters = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 1000, + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_DURABILITY_VOLATILE, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_default = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 10, + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_DURABILITY_VOLATILE, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_services_default = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 10, + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_DURABILITY_VOLATILE, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_parameter_events = +{ + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + 1000, + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + RMW_QOS_POLICY_DURABILITY_VOLATILE, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_system_default = +{ + RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT, + RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT, + RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT, + RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +static const rmw_qos_profile_t rmw_qos_profile_unknown = +{ + RMW_QOS_POLICY_HISTORY_UNKNOWN, + RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT, + RMW_QOS_POLICY_RELIABILITY_UNKNOWN, + RMW_QOS_POLICY_DURABILITY_UNKNOWN, + RMW_QOS_DEADLINE_DEFAULT, + RMW_QOS_LIFESPAN_DEFAULT, + RMW_QOS_POLICY_LIVELINESS_UNKNOWN, + RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT, + false +}; + +typedef enum RMW_PUBLIC_TYPE rmw_qos_compatibility_type_e +{ + /// QoS policies are compatible + RMW_QOS_COMPATIBILITY_OK = 0, + + /// QoS policies may not be compatible + RMW_QOS_COMPATIBILITY_WARNING, + + /// QoS policies are not compatible + RMW_QOS_COMPATIBILITY_ERROR +} rmw_qos_compatibility_type_t; + + +/// Check if two QoS profiles are compatible. +/** + * Two QoS profiles are compatible if a publisher and subcription + * using the QoS policies can communicate with each other. + * + * If any of the profile policies has the value "system default" or "unknown", then it may not be + * possible to determine the compatibilty. + * In this case, the output parameter `compatibility` is set to `RMW_QOS_COMPATIBILITY_WARNING` + * and `reason` is populated. + * + * If there is a compatibility warning or error, and a buffer is provided for `reason`, then an + * explanation of all warnings and errors will be populated into the buffer, separated by + * semi-colons (`;`). + * Errors will appear before warnings in the string buffer. + * If the provided buffer is not large enough, this function will still write to the buffer, up to + * the `reason_size` number of characters. + * Therefore, it is possible that not all errors and warnings are communicated if the buffer size limit + * is reached. + * A buffer size of 2048 should be more than enough to capture all possible errors and warnings. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] publisher_profile: The QoS profile used for a publisher. + * \param[in] subscription_profile: The QoS profile used for a subscription. + * \param[out] compatibility: `RMW_QOS_COMPATIBILITY_OK` if the QoS profiles are compatible, or + * `RMW_QOS_COMPATIBILITY_WARNING` if the QoS profiles might be compatible, or + * `RMW_QOS_COMPATIBILITY_ERROR` if the QoS profiles are not compatible. + * \param[out] reason: A detailed reason for a QoS incompatibility or potential incompatibility. + * Must be pre-allocated by the caller. + * This parameter is optional and may be set to `NULL` if the reason information is not + * desired. + * \param[in] reason_size: Size of the string buffer `reason`, if one is provided. + * If `reason` is `nullptr`, then this parameter must be zero. + * \return `RMW_RET_OK` if the check was successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if `compatiblity` is `nullptr`, or + * \return `RMW_RET_INVALID_ARGUMENT` if `reason` is `NULL` and `reason_size` is not zero, or + * \return `RMW_RET_ERROR` if there is an unexpected error. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_qos_profile_check_compatible( + const rmw_qos_profile_t publisher_profile, + const rmw_qos_profile_t subscription_profile, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__QOS_PROFILES_H_ diff --git a/ThirdParty/ros/include/rmw/rmw/qos_string_conversions.h b/ThirdParty/ros/include/rmw/rmw/qos_string_conversions.h new file mode 100644 index 000000000..52b320e18 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/qos_string_conversions.h @@ -0,0 +1,177 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__QOS_STRING_CONVERSIONS_H_ +#define RMW__QOS_STRING_CONVERSIONS_H_ + +#include "rmw/types.h" +#include "rmw/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Return a string representing the policy kind. +/** + * Returns `NULL` when `kind` is `RMW_QOS_POLICY_INVALID` or an undefined kind. + * + * The stringified version of the policy kind can be obtained doing the follwing conversion: + * RMW_QOS_POLICY_ -> lower_case() + * + * For example, the stringified version of `RMW_QOS_POLICY_DURABILITY` is + * "durability" and `RMW_QOS_POLICY_DEADLINE` is "deadline". + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] kind qos policy kind to be stringified. + * \return a null terminated string representing the policy kind, or + * \return `NULL` if kind is `RMW_QOS_POLICY_INVALID` or an undefined kind. + */ +RMW_PUBLIC +const char * +rmw_qos_policy_kind_to_str(rmw_qos_policy_kind_t kind); + +/// Return a string representing the policy value. +/** + * Returns `NULL` when `value` is `RMW_QOS_POLICY_*_UNKNOWN` or an undefined enum value. + * + * The stringified version of the policy value can be obtained doing the follwing conversion: + * RMW_QOS_POLICY__ -> lower_case() + * + * For example, the stringified version of `RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC` is + * "manual_by_topic" and `RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT` is "best_effort". + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] value qos policy value to be stringified. + * \return a null terminated string representing the policy value, or + * \return `NULL` if value is `RMW_QOS_POLICY_*_UNKNOWN` or an undefined enum value. + */ +RMW_PUBLIC +const char * +rmw_qos_durability_policy_to_str(rmw_qos_durability_policy_t value); + +/// Return a string representing the policy value. +/** + * See \ref rmw_qos_durability_policy_to_str() for more details. + */ +RMW_PUBLIC +const char * +rmw_qos_history_policy_to_str(rmw_qos_history_policy_t value); + +/// Return a string representing the policy value. +/** + * See \ref rmw_qos_durability_policy_to_str() for more details. + */ +RMW_PUBLIC +const char * +rmw_qos_liveliness_policy_to_str(rmw_qos_liveliness_policy_t value); + +/// Return a string representing the policy value. +/** + * See \ref rmw_qos_durability_policy_to_str() for more details. + */ +RMW_PUBLIC +const char * +rmw_qos_reliability_policy_to_str(rmw_qos_reliability_policy_t value); + +/// Return a policy kind based on the provided string. +/** + * Returns the policy kind represented by the provided string, or + * `RMW_QOS_POLICY_INVALID` when the provided string doesn't represent any policy kind. + * + * How policy kinds are stringified is explained in \ref rmw_qos_policy_kind_to_str. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] str string identifying a qos policy kind. + * \return the policy kind represented by the string, or + * \return `RMW_QOS_POLICY_INVALID` if the string doesn't represent any policy kind. + */ +RMW_PUBLIC +rmw_qos_policy_kind_t +rmw_qos_policy_kind_from_str(const char * str); + +/// Return a enum value based on the provided string. +/** + * Returns the enum value based on the provided string, or + * `RMW_QOS_POLICY_*_UNKNOWN` when the provided string is unexpected. + * + * How policy values are stringified is explained in \ref rmw_qos_durability_policy_to_str. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | No + * Lock-Free | Yes + * + * \param[in] str string identifying a qos policy value. + * \return the policy value represented by the string, or + * \return `RMW_QOS_POLICY_*_UNKNOWN` if the string doesn't represent any value. + */ +RMW_PUBLIC +rmw_qos_durability_policy_t +rmw_qos_durability_policy_from_str(const char * str); + +/// Return a enum value based on the provided string. +/** + * See \ref rmw_qos_durability_policy_from_str() for more details. + */ +RMW_PUBLIC +rmw_qos_history_policy_t +rmw_qos_history_policy_from_str(const char * str); + +/// Return a enum value based on the provided string. +/** + * See \ref rmw_qos_durability_policy_from_str() for more details. + */ +RMW_PUBLIC +rmw_qos_liveliness_policy_t +rmw_qos_liveliness_policy_from_str(const char * str); + + +/// Return a enum value based on the provided string. +/** + * See \ref rmw_qos_durability_policy_from_str() for more details. + */ +RMW_PUBLIC +rmw_qos_reliability_policy_t +rmw_qos_reliability_policy_from_str(const char * str); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__QOS_STRING_CONVERSIONS_H_ diff --git a/ThirdParty/ros/include/rmw/ret_types.h b/ThirdParty/ros/include/rmw/rmw/ret_types.h similarity index 100% rename from ThirdParty/ros/include/rmw/ret_types.h rename to ThirdParty/ros/include/rmw/rmw/ret_types.h diff --git a/ThirdParty/ros/include/rmw/rmw.h b/ThirdParty/ros/include/rmw/rmw/rmw.h similarity index 86% rename from ThirdParty/ros/include/rmw/rmw.h rename to ThirdParty/ros/include/rmw/rmw/rmw.h index 0a959ef00..69375689a 100644 --- a/ThirdParty/ros/include/rmw/rmw.h +++ b/ThirdParty/ros/include/rmw/rmw/rmw.h @@ -40,6 +40,9 @@ * - A function to validate a node's name * - rmw_validate_node_name() * - rmw/validate_node_name.h + * - A function to validate the compatibility of two QoS profiles + * - rmw_qos_profile_check_compatible() + * - rmw/qos_profiles.h * * It also has some machinery that is necessary to wait on and act on these concepts: * @@ -88,6 +91,7 @@ extern "C" #include #include +#include "rcutils/allocator.h" #include "rcutils/macros.h" #include "rcutils/types.h" @@ -95,11 +99,14 @@ extern "C" #include "rosidl_runtime_c/service_type_support_struct.h" #include "rosidl_runtime_c/sequence_bound.h" +#include "rmw/event.h" #include "rmw/init.h" +#include "rmw/event_callback_type.h" #include "rmw/macros.h" +#include "rmw/message_sequence.h" +#include "rmw/publisher_options.h" #include "rmw/qos_profiles.h" #include "rmw/subscription_options.h" -#include "rmw/message_sequence.h" #include "rmw/types.h" #include "rmw/visibility_control.h" @@ -164,9 +171,7 @@ rmw_node_t * rmw_create_node( rmw_context_t * context, const char * name, - const char * namespace_, - size_t domain_id, - bool localhost_only); + const char * namespace_); /// Finalize a given node handle, reclaim the resources, and deallocate the node handle. /** @@ -193,6 +198,10 @@ RMW_WARN_UNUSED rmw_ret_t rmw_destroy_node(rmw_node_t * node); +/** + * \deprecated `rmw_node_assert_liveliness` implementation was removed. + * If manual liveliness assertion is needed, use MANUAL_BY_TOPIC. + */ RMW_PUBLIC RCUTILS_DEPRECATED_WITH_MSG( "rmw_node_assert_liveliness implementation was removed." @@ -296,12 +305,6 @@ rmw_ret_t rmw_fini_publisher_allocation( rmw_publisher_allocation_t * allocation); -/// Return a rmw_publisher_options_t initialized with default values. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_publisher_options_t -rmw_get_default_publisher_options(void); - /// Create a publisher and return a handle to that publisher. /** * This function can fail, and therefore return `NULL`, if: @@ -744,7 +747,7 @@ rmw_publisher_get_actual_qos( * one registered with `publisher` on creation. * * \param[in] publisher Publisher to be used to send message. - * \param[in] ros_message Serialized ROS message to be sent. + * \param[in] serialized_message Serialized ROS message to be sent. * \param[in] allocation Pre-allocated memory to be used. May be NULL. * \return `RMW_RET_OK` if successful, or * \return `RMW_RET_INVALID_ARGUMENT` if `publisher` is NULL, or @@ -766,7 +769,7 @@ rmw_publish_serialized_message( * Given a message definition and bounds, compute the serialized size. * * \param[in] type_support The type support of the message to compute. - * \param[in] bounds Artifical bounds to use on unbounded fields. + * \param[in] message_bounds Artifical bounds to use on unbounded fields. * \param[out] size The computed size of the serialized message. * \return `RMW_RET_OK` if successful, or * \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or @@ -805,6 +808,51 @@ RMW_WARN_UNUSED rmw_ret_t rmw_publisher_assert_liveliness(const rmw_publisher_t * publisher); +/// Wait until all published message data is acknowledged or until the specified timeout elapses. +/** + * This function waits until all published message data were acknowledged by peer node or timeout. + * + * This function only works effectively while QOS profile of publisher is set to RELIABLE. + * Otherwise this function will immediately return RMW_RET_OK. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined, check the implementation documentation + * + * \par Runtime behavior + * Waiting for all acknowledgments is synchronous operation. + * So the calling thread is blocked until all published message data is acknowledged or specified + * duration elapses. + * + * \par Thread-Safety + * Publishers are thread-safe objects, and so are all operations on them except for finalization. + * Therefore, it is safe to call this function using the same publisher concurrently. + * + * \pre Given `publisher` must be a valid publisher, as returned by rmw_create_publisher(). + * + * \param[in] publisher handle to the publisher that needs to wait for all acked. + * \param[in] wait_timeout represents the maximum amount of time to wait for all published message + * data were acknowledged. + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_TIMEOUT` if wait timed out, or + * \return `RMW_RET_INVALID_ARGUMENT` if `publisher` is `NULL`, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the `publisher` implementation + * identifier does not match this implementation, or + * \return `RMW_RET_ERROR` if an unspecified error occurs, or + * \return `RMW_RET_UNSUPPORTED` if the rmw implementation is unimplemented. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_publisher_wait_for_all_acked( + const rmw_publisher_t * publisher, + rmw_time_t wait_timeout); + /// Serialize a ROS message into a rmw_serialized_message_t. /** * The ROS message is serialized into a byte stream contained within the @@ -955,7 +1003,7 @@ rmw_fini_subscription_allocation( * \param[in] topic_name Name of the topic to subscribe to, often a fully qualified * topic name unless `qos_profile` is configured to avoid ROS namespace conventions * i.e. to create a native topic subscription - * \param[in] qos_profile QoS policies for this subscription + * \param[in] qos_policies QoS policies for this subscription * \param[in] subscription_options Options for configuring this subscription * \return rmw subscription handle, or `NULL` if there was an error */ @@ -1070,6 +1118,70 @@ rmw_subscription_get_actual_qos( const rmw_subscription_t * subscription, rmw_qos_profile_t * qos); +/// Set the content filter options for the subscription. +/** + * This function will set a filter expression and an array of expression parameters + * for the given subscription. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] implementation defined, check the implementation documentation + * + * \param[in] subscription The subscription to set content filter options. + * \param[in] options The content filter options. + * Use `options.filter_expression` with an empty("") string to + * reset/clean content filtered topic for the subscription. + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if an argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the `subscription` implementation + * identifier does not match this implementation, or + * \return `RMW_RET_UNSUPPORTED` if the implementation does not support content filtered topic, or + * \return `RMW_RET_ERROR` if an unspecified error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_subscription_set_content_filter( + rmw_subscription_t * subscription, + const rmw_subscription_content_filter_options_t * options); + +/// Retrieve the content filter options of the subscription. +/** + * This function will return a content filter options by the given subscription. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Yes + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] implementation defined, check the implementation documentation + * + * \param[in] subscription The subscription object to inspect. + * \param[in] allocator Allocator to be used when populating the content filter options. + * \param[out] options The content filter options. + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if an argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the `subscription` implementation + * identifier does not match this implementation, or + * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or + * \return `RMW_RET_UNSUPPORTED` if the implementation does not support content filtered topic, or + * \return `RMW_RET_ERROR` if an unspecified error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_subscription_get_content_filter( + const rmw_subscription_t * subscription, + rcutils_allocator_t * allocator, + rmw_subscription_content_filter_options_t * options); + /// Take an incoming ROS message. /** * Take a ROS message already received by the given subscription, removing it from internal queues. @@ -1250,7 +1362,7 @@ rmw_take_with_info( * This function will only take what has been already received, and it will * succeed even if fewer (or zero) messages were received. * In this case, only currently available messages will be returned. - * The `taken` flag indicates the number of ROS messages actually taken. + * The `taken` output variable indicates the number of ROS messages actually taken. * * \remarks Once taken, ROS messages in the sequence cannot be taken again. * Callers do not have to deal with duplicates. @@ -1317,7 +1429,7 @@ rmw_take_with_info( * `message_info_sequence`, a valid message metadata sequence. * Both will be left unchanged if this function fails early due to a logical error, such as * an invalid argument, or in an unknown yet valid state if it fails due to a runtime error. - * Both will also be left unchanged if this function succeeds but `taken` is false. + * Both will also be left unchanged if this function succeeds but `taken` is zero. * * \param[in] subscription Subscription to take ROS message from. * \param[in] count Number of messages to attempt to take. @@ -1812,7 +1924,7 @@ rmw_return_loaned_message_from_subscription( * \param[in] service_name Name of the service to be used, often a fully qualified * service name unless `qos_profile` is configured to avoid ROS namespace conventions * i.e. to create a native service client. - * \param[in] qos_profile QoS policies for this service client's connections. + * \param[in] qos_policies QoS policies for this service client's connections. * \return rmw service client handle, or `NULL` if there was an error. */ RMW_PUBLIC @@ -1995,8 +2107,8 @@ rmw_send_request( * It will also be left unchanged if this function succeeds but `taken` is false. * * \param[in] client Service client to take response from. - * \param[out] response_header Service response header to write to. - * \param[out] ros_request Type erased ROS service response to write to. + * \param[out] request_header Service response header to write to. + * \param[out] ros_response Type erased ROS service response to write to. * \param[out] taken Boolean flag indicating if a ROS service response was taken or not. * \return `RMW_RET_OK` if successful, or * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or @@ -2017,6 +2129,82 @@ rmw_take_response( void * ros_response, bool * taken); +/// Retrieve the actual qos settings of the client's request publisher. +/** + * Query the underlying middleware to determine the qos settings + * of the client's request publisher. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the client, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * + * \note The value of avoid_ros_namespace_conventions field is not resolved + * with this function. The rcl function `rcl_client_request_publisher_get_actual_qos()` + * resolves it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined, check the implementation documentation + * + * \param[in] client the client object to inspect + * \param[out] qos the actual qos settings + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if client + * implementation identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_client_request_publisher_get_actual_qos( + const rmw_client_t * client, + rmw_qos_profile_t * qos); + +/// Retrieve the actual qos settings of the client's response subscription. +/** + * Query the underlying middleware to determine the qos settings + * of the client's response subscription. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the client, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * + * \note The value of avoid_ros_namespace_conventions field is not resolved + * with this function. The rcl function `rcl_client_request_publisher_get_actual_qos()` + * resolves it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined, check the implementation documentation + * + * \param[in] client the client object to inspect + * \param[out] qos the actual qos settings + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if client + * implementation identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_client_response_subscription_get_actual_qos( + const rmw_client_t * client, + rmw_qos_profile_t * qos); + /// Create a service server that can receive requests from and send replies to a service client. /** * This function can fail, and therefore return `NULL`, if: @@ -2226,7 +2414,7 @@ rmw_take_request( * \pre Given `ros_response` must be a valid service response, whose type matches the * service type support registered with the `service` on creation. * - * \param[in] client Service server to send a response with. + * \param[in] service Service server to send a response with. * \param[in] request_header Service response header, same as the one taken * with the corresponding ROS service request. * \param[in] ros_response ROS service response to be sent. @@ -2247,6 +2435,82 @@ rmw_send_response( rmw_request_id_t * request_header, void * ros_response); +/// Retrieve the actual qos settings of the service's request subscription. +/** + * Query the underlying middleware to determine the qos settings + * of the service's request subscription. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the service, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * + * \note The value of avoid_ros_namespace_conventions field is not resolved + * with this function. The rcl function `rcl_service_request_subscription_get_actual_qos()` + * resolves it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined, check the implementation documentation + * + * \param[in] service the service object to inspect + * \param[out] qos the actual qos settings + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if service + * implementation identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_service_request_subscription_get_actual_qos( + const rmw_service_t * service, + rmw_qos_profile_t * qos); + +/// Retrieve the actual qos settings of the service's response publisher. +/** + * Query the underlying middleware to determine the qos settings + * of the service's response publisher. + * The actual configuration applied when using RMW_*_SYSTEM_DEFAULT + * can only be resolved after the creation of the service, and it + * depends on the underlying rmw implementation. + * If the underlying setting in use can't be represented in ROS terms, + * it will be set to RMW_*_UNKNOWN. + * + * \note The value of avoid_ros_namespace_conventions field is not resolved + * with this function. The rcl function `rcl_service_request_subscription_get_actual_qos()` + * resolves it. + * + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | Maybe [1] + * Thread-Safe | No + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] + * [1] rmw implementation defined, check the implementation documentation + * + * \param[in] service the service object to inspect + * \param[out] qos the actual qos settings + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if service + * implementation identifier does not match, or + * \return `RMW_RET_ERROR` if an unexpected error occurs. + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_service_response_publisher_get_actual_qos( + const rmw_service_t * service, + rmw_qos_profile_t * qos); + // TODO(wjwwood): refactor this API to return a return code when updated to use an allocator /// Create a guard condition and return a handle to that guard condition. /** @@ -2367,10 +2631,10 @@ rmw_destroy_wait_set(rmw_wait_set_t * wait_set); * This function adds middleware-specific conditions to the wait set and waits * until one or more become ready, or until the timeout is reached. * - * \remark Elapsed time is measured against the system clock. - * Timeout granularity is thus bound to that of the aforementioned clock and, - * depending on the underlying implementation, to that of platform-specific - * APIs to sleep and/or wait. + * \remark Elapsed time should be measured using a monotonic clock, + * though rmw implementations could use a different one. + * Timeout granularity is thus bound to that of the clock used by the underlying implementation, + * and to the platform-specific APIs used to sleep and/or wait. * * \remark * The amount of time this function actually waits may be either above or @@ -2594,7 +2858,7 @@ rmw_get_node_names_with_enclaves( * * \par Thread-safety * Nodes are thread-safe objects, and so are all operations on them except for finalization. - * Therefore, it is to query the ROS graph using the same node concurrently. + * Therefore, it is safe to query the ROS graph using the same node concurrently. * However, access to primitive data-type arguments is not synchronized. * It is not safe to read or write `topic_name` or `count` while rmw_count_publishers() * uses them. @@ -2692,7 +2956,7 @@ rmw_count_subscribers( * However, access to the gid is not synchronized. * It is not safe to read or write `gid` while rmw_get_gid_for_publisher() uses it. * - * \pre Given `publisher` must be a valid subscription, as returned by rmw_create_publisher(). + * \pre Given `publisher` must be a valid publisher, as returned by rmw_create_publisher(). * * \param[in] publisher Publisher to get a gid from. * \param[out] gid Publisher's unique identifier, populated on success @@ -2730,7 +2994,7 @@ rmw_get_gid_for_publisher(const rmw_publisher_t * publisher, rmw_gid_t * gid); * * \param[in] gid1 First unique identifier to compare. * \param[in] gid2 Second unique identifier to compare. - * \param[out] bool true if both gids are equal, false otherwise. + * \param[out] result true if both gids are equal, false otherwise. * \return `RMW_RET_OK` if successful, or * \return `RMW_RET_INVALID_ARGUMENT` if `gid1` or `gid2` is NULL, or * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation @@ -2744,31 +3008,40 @@ rmw_compare_gids_equal(const rmw_gid_t * gid1, const rmw_gid_t * gid2, bool * re /// Check if a service server is available for the given service client. /** - * This function will return true for `is_available` if there is a service - * server available for the given client. + * This function checks whether one or more service services matching the + * given service client exist in the ROS graph, as discovered so far by the + * given local node. * - * The node parameter must not be `NULL`, and must point to a valid node. - * - * The client parameter must not be `NULL`, and must point to a valid client. + *
+ * Attribute | Adherence + * ------------------ | ------------- + * Allocates Memory | No + * Thread-Safe | Yes + * Uses Atomics | Maybe [1] + * Lock-Free | Maybe [1] * - * The given client and node must match, i.e. the client must have been created - * using the given node. + * [1] implementation defined, check implementation documentation. * - * The is_available parameter must not be `NULL`, and must point to a bool - * variable. - * The result of the check will be stored in the is_available parameter. + * \par Runtime behavior + * To query the ROS graph is a synchronous operation. + * It is also non-blocking, but it is not guaranteed to be lock-free. + * Generally speaking, implementations may synchronize access to internal resources using + * locks but are not allowed to wait for events with no guaranteed time bound (barring + * the effects of starvation due to OS scheduling). * - * This function does manipulate heap memory. - * This function is not thread-safe. - * This function is lock-free. + * \pre Given `node` must be a valid node, as returned by rmw_create_node(). + * \pre Given `client` must be a valid client, as returned by rmw_create_client(). + * \pre Given `node` must be the one the `client` was registered with. * - * \param[in] node the handle to the node being used to query the ROS graph - * \param[in] client the handle to the service client being queried - * \param[out] is_available - * set to true if there is a service server available, else false - * \return `RMW_RET_OK` if node the check was made successfully, or - * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the `publisher` implementation - * identifier does not match this implementation, or + * \param[in] node Node to query the ROS graph. + * \param[in] client Service client to look for matching service servers. + * \param[out] is_available True if there is a service server available, else false. + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if `node` is `NULL`, or + * \return `RMW_RET_INVALID_ARGUMENT` if `client` is `NULL`, or + * \return `RMW_RET_INVALID_ARGUMENT` if `is_available` is `NULL`, or + * \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if the implementation + * identifier of `node` or `client` does not match this implementation, or * \return `RMW_RET_ERROR` if an unspecified error occurs. */ RMW_PUBLIC @@ -2789,6 +3062,150 @@ RMW_WARN_UNUSED rmw_ret_t rmw_set_log_severity(rmw_log_severity_t severity); +/// Set the on new message callback function for the subscription. +/** + * This API sets the callback function to be called whenever the + * subscription is notified about a new message. + * + * This callback is called for each new message received by the subscription. + * If messages arrive before the callback is registered, the number_of_events + * argument given to the callback may be > 1. + * + * The callback may be called from a thread that the rmw implementation + * created, rather than a thread owned by the user, i.e. some thread other + * than user owned threads calling rmw functions such as rmw_wait() or + * rmw_publish(). + * + * This function is thread-safe. + * This is required of the rmw implementation because the callback may be called + * from any middleware thread, and this function could be called by the user + * at any time. + * + * \param[in] subscription The subscription on which to set the callback + * \param[in] callback The callback to be called when new messages arrive, + * can be NULL to clear the registered callback + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RMW_RET_OK` if successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if `subscription` is NULL, or + * \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_subscription_set_on_new_message_callback( + rmw_subscription_t * subscription, + rmw_event_callback_t callback, + const void * user_data); + +/// Set the on new request callback function for the service. +/** + * This API sets the callback function to be called whenever the + * service is notified about a new request. + * + * This callback is called for each new request received by the service. + * If requests arrive before the callback is registered, the number_of_events + * argument given to the callback may be > 1. + * + * The callback may be called from a thread that the rmw implementation + * created, rather than a thread owned by the user, i.e. some thread other + * than user owned threads calling rmw functions such as rmw_wait() or + * rmw_send_request(). + * + * This function is thread-safe. + * This is required of the rmw implementation because the callback may be called + * from any middleware thread, and this function could be called by the user + * at any time. + * + * \param[in] service The service on which to set the callback + * \param[in] callback The callback to be called when new requests arrive, + * can be NULL to clear the registered callback + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RMW_RET_OK` if callback was set to the listener, or + * \return `RMW_RET_INVALID_ARGUMENT` if `service` is NULL, or + * \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_service_set_on_new_request_callback( + rmw_service_t * service, + rmw_event_callback_t callback, + const void * user_data); + +/// Set the on new response callback function for the client. +/** + * This API sets the callback function to be called whenever the + * client is notified about a new response. + * + * This callback is called for each new response received by the client. + * If responses arrive before the callback is registered, the number_of_events + * argument given to the callback may be > 1. + * + * The callback may be called from a thread that the rmw implementation + * created, rather than a thread owned by the user, i.e. some thread other + * than user owned threads calling rmw functions such as rmw_wait() or + * rmw_take_response(). + * + * This function is thread-safe. + * This is required of the rmw implementation because the callback may be called + * from any middleware thread, and this function could be called by the user + * at any time. + * + * \param[in] client The client on which to set the callback + * \param[in] callback The callback to be called when new responses arrive, + * can be NULL to clear the registered callback + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RMW_RET_OK` if callback was set to the listener, or + * \return `RMW_RET_INVALID_ARGUMENT` if `client` is NULL, or + * \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_client_set_on_new_response_callback( + rmw_client_t * client, + rmw_event_callback_t callback, + const void * user_data); + +/// Set the callback function for the event. +/** + * This API sets the callback function to be called whenever the + * event is notified about a new instance of the event. + * + * For example, this could be called when incompatible QoS is detected, or + * a deadline is missed, or any other QoS event. + * + * This callback is called for each new event that occurs for this rmw_event_t + * instance. + * If events occur before the callback is registered, the number_of_events + * argument given to the callback may be > 1. + * + * The callback may be called from a thread that the rmw implementation + * created, rather than a thread owned by the user, i.e. some thread other + * than user owned threads calling rmw functions such as rmw_wait() or + * rmw_publish(). + * + * This function is thread-safe. + * This is required of the rmw implementation because the callback may be called + * from any middleware thread, and this function could be called by the user + * at any time. + * + * \param[in] event The event on which to set the callback + * \param[in] callback The callback to be called when new events occur, + * can be NULL to clear the registered callback + * \param[in] user_data Given to the callback when called later, may be NULL + * \return `RMW_RET_OK` if callback was set to the listener, or + * \return `RMW_RET_INVALID_ARGUMENT` if `event` is NULL, or + * \return `RMW_RET_UNSUPPORTED` if the API is not implemented in the dds implementation + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_ret_t +rmw_event_set_callback( + rmw_event_t * event, + rmw_event_callback_t callback, + const void * user_data); + #ifdef __cplusplus } #endif diff --git a/ThirdParty/ros/include/rmw/sanity_checks.h b/ThirdParty/ros/include/rmw/rmw/sanity_checks.h similarity index 100% rename from ThirdParty/ros/include/rmw/sanity_checks.h rename to ThirdParty/ros/include/rmw/rmw/sanity_checks.h diff --git a/ThirdParty/ros/include/rmw/security_options.h b/ThirdParty/ros/include/rmw/rmw/security_options.h similarity index 91% rename from ThirdParty/ros/include/rmw/security_options.h rename to ThirdParty/ros/include/rmw/rmw/security_options.h index 6b494c346..5735b47c2 100644 --- a/ThirdParty/ros/include/rmw/security_options.h +++ b/ThirdParty/ros/include/rmw/rmw/security_options.h @@ -27,15 +27,15 @@ extern "C" #include "rmw/ret_types.h" #include "rmw/visibility_control.h" -typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_t +typedef enum RMW_PUBLIC_TYPE rmw_security_enforcement_policy_e { RMW_SECURITY_ENFORCEMENT_PERMISSIVE, RMW_SECURITY_ENFORCEMENT_ENFORCE, } rmw_security_enforcement_policy_t; -typedef struct RMW_PUBLIC_TYPE rmw_security_options_t +typedef struct RMW_PUBLIC_TYPE rmw_security_options_s { - enum rmw_security_enforcement_policy_t enforce_security; + rmw_security_enforcement_policy_t enforce_security; char * security_root_path; } rmw_security_options_t; @@ -70,7 +70,7 @@ rmw_security_options_copy( * * \param[in] security_root_path path to be set. * \param[in] allocator allocator used to allocate the new path. - * \param[in|out] security_options security options to be set. + * \param[inout] security_options security options to be set. * \returns RMW_RET_BAD_ALLOC, or * \returns RMW_RET_OK */ diff --git a/ThirdParty/ros/include/rmw/serialized_message.h b/ThirdParty/ros/include/rmw/rmw/serialized_message.h similarity index 90% rename from ThirdParty/ros/include/rmw/serialized_message.h rename to ThirdParty/ros/include/rmw/rmw/serialized_message.h index 4f2d34c30..59f7605e1 100644 --- a/ThirdParty/ros/include/rmw/serialized_message.h +++ b/ThirdParty/ros/include/rmw/rmw/serialized_message.h @@ -23,16 +23,13 @@ extern "C" #include "rcutils/types/uint8_array.h" /** - * \struct rmw_serialized_message_t - * * \brief Serialized message as a string of bytes. * * It includes (but it is not limited to) the following members: - * \i \c buffer the reference to internal storage, as a pointer - * \i \c buffer_length the size of stored contents, as an unsigned integer - * \i \c buffer_capacity the capacity of internal storage, as an unsigned integer + * \e \c buffer the reference to internal storage, as a pointer + * \e \c buffer_length the size of stored contents, as an unsigned integer + * \e \c buffer_capacity the capacity of internal storage, as an unsigned integer */ - /* For now this is a simple aliasing from a serialized message to a uint8 array. * However, in future developments this serialized message can become something * more complex and is therefore aliased. @@ -44,7 +41,7 @@ typedef rcutils_uint8_array_t rmw_serialized_message_t; /// Initialize a serialized message, zero initializing its contents. /** - * \pre Given serialized message must have been zero initialized. + * Given serialized message must have been zero initialized. * * \param[inout] serialized_message a pointer to the serialized message to initialize * \param[in] message_capacity the size of the memory to allocate @@ -59,7 +56,7 @@ typedef rcutils_uint8_array_t rmw_serialized_message_t; /// Finalize a serialized message. /** - * \pre Given serialized message must have been initialized with `rmw_serialized_message_init()`. + * Given serialized message must have been initialized with `rmw_serialized_message_init()`. * * \remarks If serialized message is zero initialized, then `RMW_RET_INVALID_ARGUMENT` is returned. * diff --git a/ThirdParty/ros/include/rmw/rmw/subscription_content_filter_options.h b/ThirdParty/ros/include/rmw/rmw/subscription_content_filter_options.h new file mode 100644 index 000000000..b0a28a015 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/subscription_content_filter_options.h @@ -0,0 +1,130 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_H_ +#define RMW__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rcutils/allocator.h" +#include "rcutils/types.h" + +#include "rmw/macros.h" +#include "rmw/ret_types.h" +#include "rmw/visibility_control.h" + +typedef struct RMW_PUBLIC_TYPE rmw_subscription_content_filter_options_s +{ + /** + * Specify the criteria to select the data samples of interest. + * + * It is similar to the WHERE part of an SQL clause. + */ + char * filter_expression; + /** + * Give values to the tokens placeholder ‘parameters’ (i.e., "%n" tokens begin from 0) in the + * filter_expression. The number of supplied parameters must fit with the requested values. + * + * It can be NULL if there is no "%n" tokens placeholder in filter_expression. + * The maximum index number must be smaller than 100. + */ + rcutils_string_array_t expression_parameters; +} rmw_subscription_content_filter_options_t; + + +/// Get zero initialized content filter options. +RMW_PUBLIC +rmw_subscription_content_filter_options_t +rmw_get_zero_initialized_content_filter_options(); + + +/// Initialize the given content filter options. +/** + * \param[in] filter_expression The filter expression. + * \param[in] expression_parameters_argc The expression parameters argc. + * \param[in] expression_parameter_argv The expression parameters argv. + * \param[in] allocator The allocator used when copying data to the content filter options. + * \param[out] options The content filter options to be set. + * \returns RMW_RET_INVALID_ARGUMENT, or + * \returns RMW_RET_BAD_ALLOC, or + * \returns RMW_RET_OK + */ +RMW_PUBLIC +rmw_ret_t +rmw_subscription_content_filter_options_init( + const char * filter_expression, + size_t expression_parameters_argc, + const char * expression_parameter_argv[], + const rcutils_allocator_t * allocator, + rmw_subscription_content_filter_options_t * options); + +/// Set the given content filter options. +/** + * \param[in] filter_expression The filter expression. + * \param[in] expression_parameters_argc The expression parameters argc. + * \param[in] expression_parameter_argv The expression parameters argv. + * \param[in] allocator The allocator used when copying data to the content filter options. + * \param[out] options The content filter options to be set. + * \returns RMW_RET_INVALID_ARGUMENT, or + * \returns RMW_RET_BAD_ALLOC, or + * \returns RMW_RET_OK + */ +RMW_PUBLIC +rmw_ret_t +rmw_subscription_content_filter_options_set( + const char * filter_expression, + size_t expression_parameters_argc, + const char * expression_parameter_argv[], + const rcutils_allocator_t * allocator, + rmw_subscription_content_filter_options_t * options); + +/// Copy the given content filter options. +/** + * \param[in] src content filter options to be copied. + * \param[in] allocator allocator used when copying data to the new content filter options. + * \param[out] dst content filter options to be set. + * \returns RMW_RET_INVALID_ARGUMENT, or + * \returns RMW_RET_BAD_ALLOC, or + * \returns RMW_RET_OK + */ +RMW_PUBLIC +rmw_ret_t +rmw_subscription_content_filter_options_copy( + const rmw_subscription_content_filter_options_t * src, + const rcutils_allocator_t * allocator, + rmw_subscription_content_filter_options_t * dst); + + +/// Finalize the content filter options. +/** + * \param[in] options content filter options to be finalized. + * \param[in] allocator allocator used to deallocate the content filter options. + * \returns RMW_RET_INVALID_ARGUMENT, or + * \returns RMW_RET_ERROR, or + * \returns RMW_RET_OK + */ +RMW_PUBLIC +rmw_ret_t +rmw_subscription_content_filter_options_fini( + rmw_subscription_content_filter_options_t * options, + const rcutils_allocator_t * allocator); + +#ifdef __cplusplus +} +#endif + +#endif // RMW__SUBSCRIPTION_CONTENT_FILTER_OPTIONS_H_ diff --git a/ThirdParty/ros/include/rmw/subscription_options.h b/ThirdParty/ros/include/rmw/rmw/subscription_options.h similarity index 100% rename from ThirdParty/ros/include/rmw/subscription_options.h rename to ThirdParty/ros/include/rmw/rmw/subscription_options.h diff --git a/ThirdParty/ros/include/rmw/rmw/time.h b/ThirdParty/ros/include/rmw/rmw/time.h new file mode 100644 index 000000000..f5ee3efbd --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/time.h @@ -0,0 +1,92 @@ +// Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__TIME_H_ +#define RMW__TIME_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +#include + +#include "rcutils/time.h" + +#include "rmw/macros.h" +#include "rmw/visibility_control.h" + +/// A struct representing a duration or relative time in RMW - does not encode an origin. +typedef struct RMW_PUBLIC_TYPE rmw_time_s +{ + /// Seconds component + uint64_t sec; + + /// Nanoseconds component + uint64_t nsec; +} rmw_time_t; + +typedef rcutils_time_point_value_t rmw_time_point_value_t; +typedef rcutils_duration_value_t rmw_duration_t; + +/// Constant representing an infinite duration. Use rmw_time_equal for comparisons. +/** + * Different RMW implementations have different representations for infinite durations. + * This value is reported for QoS policy durations that are left unspecified. + * Do not directly compare `sec == sec && nsec == nsec`, because we don't want to be sensitive + * to non-normalized values (nsec > 1 second) - use rmw_time_equal instead. + * This value is INT64_MAX nanoseconds = 0x7FFF FFFF FFFF FFFF = d 9 223 372 036 854 775 807 + * + * Note: these constants cannot be `static const rmw_time_t` because in C that can't be used + * as a compile-time initializer + */ +#define RMW_DURATION_INFINITE {9223372036LL, 854775807LL} +#define RMW_DURATION_UNSPECIFIED {0LL, 0LL} + +/// Check whether two rmw_time_t represent the same time. +RMW_PUBLIC +RMW_WARN_UNUSED +bool +rmw_time_equal(const rmw_time_t left, const rmw_time_t right); + +/// Return the total nanosecond representation of a time. +/** + * \return INT64_MAX if input is too large to store in 64 bits + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_duration_t +rmw_time_total_nsec(const rmw_time_t time); + +/// Construct rmw_time_t from a total nanoseconds representation. +/** + * rmw_time_t only specifies relative time, so the origin is not relevant for this calculation. + * \return RMW_DURATION_INFINITE if input is negative, which is not representable in rmw_time_t + */ +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_time_t +rmw_time_from_nsec(const rmw_duration_t nanoseconds); + +/// Ensure that an rmw_time_t does not have nanoseconds > 1 second. +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_time_t +rmw_time_normalize(const rmw_time_t time); + +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // RMW__TIME_H_ diff --git a/ThirdParty/ros/include/rmw/topic_endpoint_info.h b/ThirdParty/ros/include/rmw/rmw/topic_endpoint_info.h similarity index 99% rename from ThirdParty/ros/include/rmw/topic_endpoint_info.h rename to ThirdParty/ros/include/rmw/rmw/topic_endpoint_info.h index dee891783..28dd695d2 100644 --- a/ThirdParty/ros/include/rmw/topic_endpoint_info.h +++ b/ThirdParty/ros/include/rmw/rmw/topic_endpoint_info.h @@ -27,7 +27,7 @@ extern "C" /// A data structure that encapsulates the node name, node namespace, /// topic_type, gid, and qos_profile of publishers and subscriptions /// for a topic. -typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t +typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_s { /// Name of the node const char * node_name; @@ -288,7 +288,7 @@ RMW_WARN_UNUSED rmw_ret_t rmw_topic_endpoint_info_set_gid( rmw_topic_endpoint_info_t * topic_endpoint_info, - const uint8_t gid[], + const uint8_t * gid, size_t size); /// Set the endpoint QoS profile in the given topic endpoint info data structure. diff --git a/ThirdParty/ros/include/rmw/topic_endpoint_info_array.h b/ThirdParty/ros/include/rmw/rmw/topic_endpoint_info_array.h similarity index 98% rename from ThirdParty/ros/include/rmw/topic_endpoint_info_array.h rename to ThirdParty/ros/include/rmw/rmw/topic_endpoint_info_array.h index a8cf0986c..f052f81ac 100644 --- a/ThirdParty/ros/include/rmw/topic_endpoint_info_array.h +++ b/ThirdParty/ros/include/rmw/rmw/topic_endpoint_info_array.h @@ -25,7 +25,7 @@ extern "C" #include "rmw/visibility_control.h" /// Array of topic endpoint information -typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_t +typedef struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_array_s { /// Size of the array. size_t size; diff --git a/ThirdParty/ros/include/rmw/rmw/types.h b/ThirdParty/ros/include/rmw/rmw/types.h new file mode 100644 index 000000000..2dd315340 --- /dev/null +++ b/ThirdParty/ros/include/rmw/rmw/types.h @@ -0,0 +1,647 @@ +// Copyright 2014-2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW__TYPES_H_ +#define RMW__TYPES_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + +// map rcutils specific log levels to rmw speicfic type +#include + +#include "rmw/events_statuses/events_statuses.h" +#include "rmw/init.h" +#include "rmw/init_options.h" +#include "rmw/ret_types.h" +#include "rmw/security_options.h" +#include "rmw/serialized_message.h" +#include "rmw/subscription_content_filter_options.h" +#include "rmw/time.h" +#include "rmw/visibility_control.h" + +// 24 bytes is the most memory needed to represent the GID by any current +// implementation. It may need to be increased in the future. +#define RMW_GID_STORAGE_SIZE 24u + +/// Structure which encapsulates an rmw node +typedef struct RMW_PUBLIC_TYPE rmw_node_s +{ + /// Name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this node's data + void * data; + + /// A concise name of this rmw node for identification + const char * name; + + /// The namespace of this rmw node + const char * namespace_; + + /// Context information about node's init specific information + rmw_context_t * context; +} rmw_node_t; + +/// Endpoint enumeration type +typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_e +{ + /// Endpoint type has not yet been set + RMW_ENDPOINT_INVALID = 0, + + /// Creates and publishes messages to the ROS topic + RMW_ENDPOINT_PUBLISHER, + + /// Listens for and receives messages from a topic + RMW_ENDPOINT_SUBSCRIPTION +} rmw_endpoint_type_t; + +/// Unique network flow endpoints requirement enumeration +typedef enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_e +{ + /// Unique network flow endpoints not required + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED = 0, + + /// Unique network flow endpoins strictly required. + /// Error if not provided by RMW implementation. + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_STRICTLY_REQUIRED, + + /// Unique network flow endpoints optionally required. + /// No error if not provided RMW implementation. + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_OPTIONALLY_REQUIRED, + + /// Unique network flow endpoints requirement decided by system. + RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_SYSTEM_DEFAULT +} rmw_unique_network_flow_endpoints_requirement_t; + +/// Options that can be used to configure the creation of a publisher in rmw. +typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_s +{ + /// Used to pass rmw implementation specific resources during publisher creation. + /** + * This field is type erased (rather than forward declared) because it will + * usually be a non-owned reference to an language specific object, e.g. + * C++ it may be a polymorphic class that only the rmw implementation can use. + * + * The resource pointed to here needs to outlive this options structure, and + * any rmw_publisher objects that are created using it, as they copy this + * structure and may use this payload throughout their lifetime. + */ + void * rmw_specific_publisher_payload; + + /// Require middleware to generate unique network flow endpoints. + /** + * Unique network flow endpoints are required to differentiate the QoS provided by + * networks for flows between publishers and subscribers in communicating + * nodes. + * Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED. + */ + rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints; +} rmw_publisher_options_t; + +/// Structure which encapsulates an rmw publisher +typedef struct RMW_PUBLIC_TYPE rmw_publisher_s +{ + /// Name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this publisher's data + void * data; + + /// The name of the ROS topic this publisher publishes to + const char * topic_name; + + /// Publisher options. + /** + * The options structure passed to rmw_create_publisher() should be + * assigned to this field by the rmw implementation. + * The fields should not be modified after creation, but + * the contents of the options structure may or may not be const, i.e. + * shallow const-ness. + * This field is not marked const to avoid any const casting during setup. + */ + rmw_publisher_options_t options; + + /// Indicate whether this publisher supports loaning messages + bool can_loan_messages; +} rmw_publisher_t; + +/// Options that can be used to configure the creation of a subscription in rmw. +typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_s +{ + /// Used to pass rmw implementation specific resources during subscription creation. + /** + * All the same details and restrictions of this field in + * rmw_publisher_options_t apply to this struct as well. + * + * \sa rmw_publisher_options_t.rmw_specific_publisher_payload + */ + void * rmw_specific_subscription_payload; + + /// If true then the middleware should not deliver data from local publishers. + /** + * This setting is most often used when data should only be received from + * remote nodes, especially to avoid "double delivery" when both intra- and + * inter- process communication is taking place. + * + * \todo(wjwwood): nail this down when participant mapping is sorted out. + * See: https://github.com/ros2/design/pull/250 + * + * The definition of local is somewhat vague at the moment. + * Right now it means local to the node, and that definition works best, but + * may become more complicated when/if participants map to a context instead. + */ + bool ignore_local_publications; + + /// Require middleware to generate unique network flow endpoints. + /** + * Unique network flow endpoints are required to differentiate the QoS provided by + * networks for flows between publishers and subscribers in communicating + * nodes. + * Default value is RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED. + */ + rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints; + + /// Used to create a content filter options during subscription creation. + rmw_subscription_content_filter_options_t * content_filter_options; +} rmw_subscription_options_t; + +typedef struct RMW_PUBLIC_TYPE rmw_subscription_s +{ + /// Name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this subscription + void * data; + + /// Name of the ros topic this subscription listens to + const char * topic_name; + + /// Subscription options. + /** + * The options structure passed to rmw_create_subscription() should be + * assigned to this field by the rmw implementation. + * The fields should not be modified after creation, but + * the contents of the options structure may or may not be const, i.e. + * shallow const-ness. + * This field is not marked const to avoid any const casting during setup. + */ + rmw_subscription_options_t options; + + /// Indicates whether this subscription can loan messages + bool can_loan_messages; + + /// Indicates whether content filtered topic of this subscription is enabled + bool is_cft_enabled; +} rmw_subscription_t; + +/// A handle to an rmw service +typedef struct RMW_PUBLIC_TYPE rmw_service_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this service + void * data; + + /// The name of this service as exposed to the ros graph + const char * service_name; +} rmw_service_t; + +/// A handle to an rmw service client +typedef struct RMW_PUBLIC_TYPE rmw_client_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this service client + void * data; + + /// The name of this service as exposed to the ros graph + const char * service_name; +} rmw_client_t; + +/// Handle for an rmw guard condition +typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this guard condition + void * data; + + /// rmw context associated with this guard condition + rmw_context_t * context; +} rmw_guard_condition_t; + +/// Allocation of memory for an rmw publisher +typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this allocation + void * data; +} rmw_publisher_allocation_t; + +/// Allocation of memory for an rmw subscription +typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// Type erased pointer to this allocation + void * data; +} rmw_subscription_allocation_t; + +/// Array of subscriber handles. +/** + * An array of void * pointers representing type-erased middleware-specific subscriptions. + * The number of non-null entries may be smaller than the allocated size of the array. + * The number of subscriptions represented may be smaller than the allocated size of the array. + * The creator of this struct is responsible for allocating and deallocating the array. + */ +typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_s +{ + /// The number of subscribers represented by the array. + size_t subscriber_count; + /// Pointer to an array of void * pointers of subscriptions. + void ** subscribers; +} rmw_subscriptions_t; + +/// Array of service handles. +/** + * An array of void * pointers representing type-erased middleware-specific services. + * The number of non-null entries may be smaller than the allocated size of the array. + * The number of services represented may be smaller than the allocated size of the array. + * The creator of this struct is responsible for allocating and deallocating the array. + */ +typedef struct RMW_PUBLIC_TYPE rmw_services_s +{ + /// The number of services represented by the array. + size_t service_count; + /// Pointer to an array of void * pointers of services. + void ** services; +} rmw_services_t; + +/// Array of client handles. +/** + * An array of void * pointers representing type-erased middleware-specific clients. + * The number of non-null entries may be smaller than the allocated size of the array. + * The number of clients represented may be smaller than the allocated size of the array. + * The creator of this struct is responsible for allocating and deallocating the array. + */ +typedef struct RMW_PUBLIC_TYPE rmw_clients_s +{ + /// The number of clients represented by the array. + size_t client_count; + /// Pointer to an array of void * pointers of clients. + void ** clients; +} rmw_clients_t; + +typedef struct RMW_PUBLIC_TYPE rmw_events_s +{ + /// The number of events represented by the array. + size_t event_count; + /// Pointer to an array of void * pointers of events. + void ** events; +} rmw_events_t; + +/// Array of guard condition handles. +/** + * An array of void * pointers representing type-erased middleware-specific guard conditions. + * The number of non-null entries may be smaller than the allocated size of the array. + * The number of guard conditions represented may be smaller than the allocated size of the array. + * The creator of this struct is responsible for allocating and deallocating the array. + */ +typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_s +{ + /// The number of guard conditions represented by the array. + size_t guard_condition_count; + /// Pointer to an array of void * pointers of guard conditions. + void ** guard_conditions; +} rmw_guard_conditions_t; + +/// Container for guard conditions to be waited on +typedef struct RMW_PUBLIC_TYPE rmw_wait_set_s +{ + /// The name of the rmw implementation + const char * implementation_identifier; + + /// The guard condition to be waited on + rmw_guard_conditions_t * guard_conditions; + + /// Type erased pointer to this wait set's data + void * data; +} rmw_wait_set_t; + +/// An rmw service request identifier +typedef struct RMW_PUBLIC_TYPE rmw_request_id_s +{ + /// The guid of the writer associated with this request + int8_t writer_guid[16]; + + /// Sequence number of this service + int64_t sequence_number; +} rmw_request_id_t; + +/// Meta-data for a service-related take. +typedef struct RMW_PUBLIC_TYPE rmw_service_info_s +{ + rmw_time_point_value_t source_timestamp; + rmw_time_point_value_t received_timestamp; + rmw_request_id_t request_id; +} rmw_service_info_t; + +typedef enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_e +{ + /// Implementation specific default + RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT, + + /// Guarantee that samples are delivered, may retry multiple times. + RMW_QOS_POLICY_RELIABILITY_RELIABLE, + + /// Attempt to deliver samples, but some may be lost if the network is not robust + RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT, + + /// Reliability policy has not yet been set + RMW_QOS_POLICY_RELIABILITY_UNKNOWN +} rmw_qos_reliability_policy_t; + +/// QoS history enumerations describing how samples endure +typedef enum RMW_PUBLIC_TYPE rmw_qos_history_policy_e +{ + /// Implementation default for history policy + RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT, + + /// Only store up to a maximum number of samples, dropping oldest once max is exceeded + RMW_QOS_POLICY_HISTORY_KEEP_LAST, + + /// Store all samples, subject to resource limits + RMW_QOS_POLICY_HISTORY_KEEP_ALL, + + /// History policy has not yet been set + RMW_QOS_POLICY_HISTORY_UNKNOWN +} rmw_qos_history_policy_t; + +/// QoS durability enumerations describing how samples persist +typedef enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_e +{ + /// Impplementation specific default + RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT, + + /// The rmw publisher is responsible for persisting samples for “late-joining” subscribers + RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL, + + /// Samples are not persistent + RMW_QOS_POLICY_DURABILITY_VOLATILE, + + /// Durability policy has not yet been set + RMW_QOS_POLICY_DURABILITY_UNKNOWN +} rmw_qos_durability_policy_t; + +#define RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG \ + "RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE is deprecated. " \ + "Use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if manually asserted liveliness is needed." + +#ifndef _WIN32 +# define RMW_DECLARE_DEPRECATED(name, msg) name __attribute__((deprecated(msg))) +#else +# define RMW_DECLARE_DEPRECATED(name, msg) name __pragma(deprecated(name)) +#endif + +/// QoS liveliness enumerations that describe a publisher's reporting policy for its alive status. +/// For a subscriber, these are its requirements for its topic's publishers. +// Suppress syntax errors, as cppcheck does not seem to handle enumerator attributes. +// cppcheck-suppress syntaxError +typedef enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_e +{ + /// Implementation specific default + RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0, + + /// The signal that establishes a Topic is alive comes from the ROS rmw layer. + RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1, + + /// Explicitly asserting node liveliness is required in this case. + /// This option is deprecated, use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if your application + /// requires to assert liveliness manually. + RMW_DECLARE_DEPRECATED( + RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, + RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG) = 2, + + /// The signal that establishes a Topic is alive is at the Topic level. Only publishing a message + /// on the Topic or an explicit signal from the application to assert liveliness on the Topic + /// will mark the Topic as being alive. + // Using `3` for backwards compatibility. + RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3, + + /// Liveliness policy has not yet been set + RMW_QOS_POLICY_LIVELINESS_UNKNOWN = 4 +} rmw_qos_liveliness_policy_t; + +/// QoS Deadline default. +#define RMW_QOS_DEADLINE_DEFAULT RMW_DURATION_UNSPECIFIED + +/// QoS Lifespan default. +#define RMW_QOS_LIFESPAN_DEFAULT RMW_DURATION_UNSPECIFIED + +/// QoS Liveliness lease duration default. +#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT RMW_DURATION_UNSPECIFIED + +/// ROS MiddleWare quality of service profile. +typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_s +{ + enum rmw_qos_history_policy_e history; + /// Size of the message queue. + size_t depth; + /// Reliabiilty QoS policy setting + enum rmw_qos_reliability_policy_e reliability; + /// Durability QoS policy setting + enum rmw_qos_durability_policy_e durability; + /// The period at which messages are expected to be sent/received + /** + * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, + * which may or may not be infinite. + * RMW_DURATION_INFINITE explicitly states that messages never miss a deadline expectation. + */ + struct rmw_time_s deadline; + /// The age at which messages are considered expired and no longer valid + /** + * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, + * which may or may not be infinite. + * RMW_DURATION_INFINITE explicitly states that messages do not expire. + */ + struct rmw_time_s lifespan; + /// Liveliness QoS policy setting + enum rmw_qos_liveliness_policy_e liveliness; + /// The time within which the RMW node or publisher must show that it is alive + /** + * RMW_DURATION_UNSPEFICIED will use the RMW implementation's default value, + * which may or may not be infinite. + * RMW_DURATION_INFINITE explicitly states that liveliness is not enforced. + */ + struct rmw_time_s liveliness_lease_duration; + + /// If true, any ROS specific namespacing conventions will be circumvented. + /** + * In the case of DDS and topics, for example, this means the typical + * ROS specific prefix of `rt` would not be applied as described here: + * + * http://design.ros2.org/articles/topic_and_service_names.html#ros-specific-namespace-prefix + * + * This might be useful when trying to directly connect a native DDS topic + * with a ROS 2 topic. + */ + bool avoid_ros_namespace_conventions; +} rmw_qos_profile_t; + +/// ROS graph ID of the topic +typedef struct RMW_PUBLIC_TYPE rmw_gid_s +{ + /// Name of the rmw implementation + const char * implementation_identifier; + + /// Bype data Gid value + uint8_t data[RMW_GID_STORAGE_SIZE]; +} rmw_gid_t; + +#define RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED UINT64_MAX + +/// Information describing an rmw message +typedef struct RMW_PUBLIC_TYPE rmw_message_info_s +{ + /// Time when the message was published by the publisher. + /** + * The exact point at which the timestamp is taken is not specified, but + * it should be taken consistently at the same point in the + * publishing process each time. + */ + rmw_time_point_value_t source_timestamp; + /// Time when the message was received by the subscription. + /** + * The exact point at which the timestamp is taken is not specified, but + * it should be taken consistently at the same point in the + * process of receiving a message each time. + */ + rmw_time_point_value_t received_timestamp; + /// Sequence number of the received message set by the publisher. + /** + * This sequence number is set by the publisher and therefore uniquely identifies + * a message when combined with the publisher GID. + * For long running applications, the sequence number might wrap around at some point. + * + * If the rmw implementation doesn't support sequence numbers, its value will be + * RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED. + * + * Requirements: + * + * If `psn1` and `psn2` are the publication sequence numbers obtained by + * calls to `rmw_take*()`, where `psn1` was obtained in a call that happened before `psn2` and both + * sequence numbers are from the same publisher (i.e. also same publisher gid), then: + * + * - psn2 > psn1 (except in the case of a wrap around) + * - `psn2 - psn1 - 1` is the number of messages the publisher sent in the middle of both + * received messages. + * Those might have already been taken by other `rmw_take*()` calls that happened in between or lost. + * `psn2 - psn1 - 1 = 0` if and only if the messages were sent by the publisher consecutively. + */ + uint64_t publication_sequence_number; + /// Sequence number of the received message set by the subscription. + /** + * This sequence number is set by the subscription regardless of which + * publisher sent the message. + * For long running applications, the sequence number might wrap around at some point. + * + * If the rmw implementation doesn't support sequence numbers, its value will be + * RMW_MESSAGE_INFO_SEQUENCE_NUMBER_UNSUPPORTED. + * + * Requirements: + * + * If `rsn1` and `rsn2` are the reception sequence numbers obtained by + * calls to `rmw_take*()`, where `rsn1` was obtained in a call that happened before `rsn2`, then: + * + * - rsn2 > rsn1 (except in the case of a wrap around) + * - `rsn2 = rsn1 + 1` if and only if both `rmw_take*()` calls happened consecutively. + */ + uint64_t reception_sequence_number; + /// Global unique identifier of the publisher that sent the message. + /** + * The identifier uniquely identifies the publisher for the local context, but + * it will not necessarily be the same identifier given in other contexts or processes + * for the same publisher. + * Therefore the identifier will uniquely identify the publisher within your application + * but may disagree about the identifier for that publisher when compared to another + * application. + * Even with this limitation, when combined with the publisher sequence number it can + * uniquely identify a message within your local context. + * Publisher GIDs generated by the rmw implementation could collide at some point, in which + * case it is not possible to distinguish which publisher sent the message. + * The details of how GIDs are generated are rmw implementation dependent. + * + * It is possible the the rmw implementation needs to reuse a publisher GID, + * due to running out of unique identifiers or some other constraint, in which case + * the rmw implementation may document what happens in that case, but that + * behavior is not defined here. + * However, this should be avoided, if at all possible, by the rmw implementation, + * and should be unlikely to happen in practice. + * + * \todo In the future we want this to uniquely identify the publisher globally across + * contexts, processes, and machines. + */ + rmw_gid_t publisher_gid; + + /// Whether this message is from intra_process communication or not + bool from_intra_process; +} rmw_message_info_t; + +/// Get zero initialized mesage info. +RMW_PUBLIC +RMW_WARN_UNUSED +rmw_message_info_t +rmw_get_zero_initialized_message_info(void); + +/// Default size of the rmw queue when history is set to RMW_QOS_POLICY_HISTORY_KEEP_LAST, +/// 0 indicates it is currently not set +enum {RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0}; + +/// Type mapping of rcutils log severity types to rmw specific types. +typedef enum RMW_PUBLIC_TYPE +{ + /// Debug log severity, for pedantic messaging + RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG, + + /// Informational log severity, for reporting expected but not overwhelming information + RMW_LOG_SEVERITY_INFO = RCUTILS_LOG_SEVERITY_INFO, + + /// Warning log severity, for reporting recoverable issues + RMW_LOG_SEVERITY_WARN = RCUTILS_LOG_SEVERITY_WARN, + + /// Error log severity, for reporting uncoverable issues + RMW_LOG_SEVERITY_ERROR = RCUTILS_LOG_SEVERITY_ERROR, + + /// Fatal log severity, for reporting issue causing imminent shutdown + RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL +} rmw_log_severity_t; + +#ifdef __cplusplus +} +#endif + +#endif // RMW__TYPES_H_ diff --git a/ThirdParty/ros/include/rmw/validate_full_topic_name.h b/ThirdParty/ros/include/rmw/rmw/validate_full_topic_name.h similarity index 86% rename from ThirdParty/ros/include/rmw/validate_full_topic_name.h rename to ThirdParty/ros/include/rmw/rmw/validate_full_topic_name.h index 40cc88e18..d2461dd90 100644 --- a/ThirdParty/ros/include/rmw/validate_full_topic_name.h +++ b/ThirdParty/ros/include/rmw/rmw/validate_full_topic_name.h @@ -92,9 +92,16 @@ rmw_validate_full_topic_name( /// Deterimine if a given topic name is valid. /** * This is an overload with an extra parameter for the length of topic_name. - * \param[in] topic_name_length The number of characters in topic_name. * * \sa rmw_validate_full_topic_name(const char *, int *, size_t *) + * + * \param[in] topic_name topic name to be validated + * \param[in] topic_name_length The number of characters in topic_name. + * \param[out] validation_result int in which the result of the check is stored + * \param[out] invalid_index size_t index of the input string where an error occurred + * \returns `RMW_RET_OK` on successfully running the check, or + * \returns `RMW_RET_INVALID_ARGUMENT` on invalid parameters, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. */ RMW_PUBLIC RMW_WARN_UNUSED @@ -105,7 +112,12 @@ rmw_validate_full_topic_name_with_size( int * validation_result, size_t * invalid_index); -/// Return a validation result description, or NULL if unknown or RMW_TOPIC_VALID. +/// Return a validation result description, or NULL if RMW_TOPIC_VALID. +/** + * \param[in] validation_result the result of validation + * \returns `NULL` if the validation result is `RMW_TOPIC_VALID`, or + * \returns a string representing the validation result. + */ RMW_PUBLIC RMW_WARN_UNUSED const char * diff --git a/ThirdParty/ros/include/rmw/validate_namespace.h b/ThirdParty/ros/include/rmw/rmw/validate_namespace.h similarity index 87% rename from ThirdParty/ros/include/rmw/validate_namespace.h rename to ThirdParty/ros/include/rmw/rmw/validate_namespace.h index 2ca4bbbf6..b13cf80ed 100644 --- a/ThirdParty/ros/include/rmw/validate_namespace.h +++ b/ThirdParty/ros/include/rmw/rmw/validate_namespace.h @@ -100,11 +100,17 @@ rmw_validate_namespace( /// Deterimine if a given namespace is valid. /** * This is an overload with an extra parameter for the length of namespace_. - * If a non RMW_RET_OK return value is returned, the RMW error message will be set - * - * \param[in] namespace_length The number of characters in namespace_. + * If a non RMW_RET_OK return value is returned, the RMW error message will be set. * * \sa rmw_validate_namespace(const char *, int *, size_t *) + * + * \param[in] namespace_ namespace to be validated + * \param[in] namespace_length The number of characters in namespace_. + * \param[out] validation_result int in which the result of the check is stored + * \param[out] invalid_index index of the input string where an error occurred + * \returns `RMW_RET_OK` on successfully running the check, or + * \returns `RMW_RET_INVALID_ARGUMENT` on invalid parameters, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. */ RMW_PUBLIC RMW_WARN_UNUSED @@ -115,7 +121,12 @@ rmw_validate_namespace_with_size( int * validation_result, size_t * invalid_index); -/// Return a validation result description, or NULL if unknown or RMW_NAMESPACE_VALID. +/// Return a validation result description, or NULL if RMW_NAMESPACE_VALID. +/** + * \param[in] validation_result the result of validation + * \returns `NULL` if the validation result is `RMW_NAMESPACE_VALID`, or + * \returns a string representing the validation result. + */ RMW_PUBLIC RMW_WARN_UNUSED const char * diff --git a/ThirdParty/ros/include/rmw/validate_node_name.h b/ThirdParty/ros/include/rmw/rmw/validate_node_name.h similarity index 85% rename from ThirdParty/ros/include/rmw/validate_node_name.h rename to ThirdParty/ros/include/rmw/rmw/validate_node_name.h index b3a3b0385..ae49bacb8 100644 --- a/ThirdParty/ros/include/rmw/validate_node_name.h +++ b/ThirdParty/ros/include/rmw/rmw/validate_node_name.h @@ -86,9 +86,16 @@ rmw_validate_node_name( /// Deterimine if a given node name is valid. /** * This is an overload with an extra parameter for the length of node_name. - * \param[in] node_name_length The number of characters in node_name. * * \sa rmw_validate_node_name(const char *, int *, size_t *) + * + * \param[in] node_name node name to be validated + * \param[in] node_name_length The number of characters in node_name. + * \param[out] validation_result int in which the result of the check is stored + * \param[out] invalid_index size_t index of the input string where an error occurred + * \returns `RMW_RET_OK` on successfully running the check, or + * \returns `RMW_RET_INVALID_ARGUMENT` on invalid parameters, or + * \returns `RMW_RET_ERROR` when an unspecified error occurs. */ RMW_PUBLIC RMW_WARN_UNUSED @@ -99,7 +106,12 @@ rmw_validate_node_name_with_size( int * validation_result, size_t * invalid_index); -/// Return a validation result description, or NULL if unknown or RMW_NODE_NAME_VALID. +/// Return a validation result description, or NULL if RMW_NODE_NAME_VALID. +/** + * \param[in] validation_result the result of validation + * \returns `NULL` if the validation result is `RMW_NODE_NAME_VALID`, or + * \returns a string representing the validation result. + */ RMW_PUBLIC RMW_WARN_UNUSED const char * diff --git a/ThirdParty/ros/include/rmw/visibility_control.h b/ThirdParty/ros/include/rmw/rmw/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw/visibility_control.h rename to ThirdParty/ros/include/rmw/rmw/visibility_control.h diff --git a/ThirdParty/ros/include/rmw/types.h b/ThirdParty/ros/include/rmw/types.h deleted file mode 100644 index 32ed94682..000000000 --- a/ThirdParty/ros/include/rmw/types.h +++ /dev/null @@ -1,590 +0,0 @@ -// Copyright 2014-2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW__TYPES_H_ -#define RMW__TYPES_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - -// map rcutils specific log levels to rmw speicfic type -#include - -#include "rmw/init.h" -#include "rmw/init_options.h" -#include "rmw/ret_types.h" -#include "rmw/security_options.h" -#include "rmw/serialized_message.h" -#include "rmw/visibility_control.h" - -// 24 bytes is the most memory needed to represent the GID by any current -// implementation. It may need to be increased in the future. -#define RMW_GID_STORAGE_SIZE 24u - -/// Structure which encapsulates an rmw node -typedef struct RMW_PUBLIC_TYPE rmw_node_t -{ - /// Name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this node's data - void * data; - - /// A concise name of this rmw node for identification - const char * name; - - /// The namespace of this rmw node - const char * namespace_; - - /// Context information about node's init specific information - rmw_context_t * context; -} rmw_node_t; - -/// Endpoint enumeration type -typedef enum RMW_PUBLIC_TYPE rmw_endpoint_type_t -{ - /// Endpoint type has not yet been set - RMW_ENDPOINT_INVALID = 0, - - /// Creates and publishes messages to the ROS topic - RMW_ENDPOINT_PUBLISHER, - - /// Listens for and receives messages from a topic - RMW_ENDPOINT_SUBSCRIPTION -} rmw_endpoint_type_t; - -/// Options that can be used to configure the creation of a publisher in rmw. -typedef struct RMW_PUBLIC_TYPE rmw_publisher_options_t -{ - /// Used to pass rmw implementation specific resources during publisher creation. - /** - * This field is type erased (rather than forward declared) because it will - * usually be a non-owned reference to an language specific object, e.g. - * C++ it may be a polymorphic class that only the rmw implementation can use. - * - * The resource pointed to here needs to outlive this options structure, and - * any rmw_publisher objects that are created using it, as they copy this - * structure and may use this payload throughout their lifetime. - */ - void * rmw_specific_publisher_payload; -} rmw_publisher_options_t; - -/// Structure which encapsulates an rmw publisher -typedef struct RMW_PUBLIC_TYPE rmw_publisher_t -{ - /// Name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this publisher's data - void * data; - - /// The name of the ROS topic this publisher publishes to - const char * topic_name; - - /// Publisher options. - /** - * The options structure passed to rmw_create_publisher() should be - * assigned to this field by the rmw implementation. - * The fields should not be modified after creation, but - * the contents of the options structure may or may not be const, i.e. - * shallow const-ness. - * This field is not marked const to avoid any const casting during setup. - */ - rmw_publisher_options_t options; - - /// Indicate whether this publisher supports loaning messages - bool can_loan_messages; -} rmw_publisher_t; - -/// Options that can be used to configure the creation of a subscription in rmw. -typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_t -{ - /// Used to pass rmw implementation specific resources during subscription creation. - /** - * All the same details and restrictions of this field in - * rmw_publisher_options_t apply to this struct as well. - * - * \sa rmw_publisher_options_t.rmw_specific_publisher_payload - */ - void * rmw_specific_subscription_payload; - - /// If true then the middleware should not deliver data from local publishers. - /** - * This setting is most often used when data should only be received from - * remote nodes, especially to avoid "double delivery" when both intra- and - * inter- process communication is taking place. - * - * \TODO(wjwwood): nail this down when participant mapping is sorted out. - * See: https://github.com/ros2/design/pull/250 - * - * The definition of local is somewhat vague at the moment. - * Right now it means local to the node, and that definition works best, but - * may become more complicated when/if participants map to a context instead. - */ - bool ignore_local_publications; -} rmw_subscription_options_t; - -typedef struct RMW_PUBLIC_TYPE rmw_subscription_t -{ - /// Name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this subscription - void * data; - - /// Name of the ros topic this subscription listens to - const char * topic_name; - - /// Subscription options. - /** - * The options structure passed to rmw_create_subscription() should be - * assigned to this field by the rmw implementation. - * The fields should not be modified after creation, but - * the contents of the options structure may or may not be const, i.e. - * shallow const-ness. - * This field is not marked const to avoid any const casting during setup. - */ - rmw_subscription_options_t options; - - /// Indicates whether this subscription can loan messages - bool can_loan_messages; -} rmw_subscription_t; - -/// A handle to an rmw service -typedef struct RMW_PUBLIC_TYPE rmw_service_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this service - void * data; - - /// The name of this service as exposed to the ros graph - const char * service_name; -} rmw_service_t; - -/// A handle to an rmw service client -typedef struct RMW_PUBLIC_TYPE rmw_client_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this service client - void * data; - - /// The name of this service as exposed to the ros graph - const char * service_name; -} rmw_client_t; - -/// Handle for an rmw guard condition -typedef struct RMW_PUBLIC_TYPE rmw_guard_condition_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this guard condition - void * data; - - /// rmw context associated with this guard condition - rmw_context_t * context; -} rmw_guard_condition_t; - -/// Allocation of memory for an rmw publisher -typedef struct RMW_PUBLIC_TYPE rmw_publisher_allocation_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this allocation - void * data; -} rmw_publisher_allocation_t; - -/// Allocation of memory for an rmw subscription -typedef struct RMW_PUBLIC_TYPE rmw_subscription_allocation_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// Type erased pointer to this allocation - void * data; -} rmw_subscription_allocation_t; - -/// Array of subscriber handles. -/** - * An array of void * pointers representing type-erased middleware-specific subscriptions. - * The number of non-null entries may be smaller than the allocated size of the array. - * The number of subscriptions represented may be smaller than the allocated size of the array. - * The creator of this struct is responsible for allocating and deallocating the array. - */ -typedef struct RMW_PUBLIC_TYPE rmw_subscriptions_t -{ - /// The number of subscribers represented by the array. - size_t subscriber_count; - /// Pointer to an array of void * pointers of subscriptions. - void ** subscribers; -} rmw_subscriptions_t; - -/// Array of service handles. -/** - * An array of void * pointers representing type-erased middleware-specific services. - * The number of non-null entries may be smaller than the allocated size of the array. - * The number of services represented may be smaller than the allocated size of the array. - * The creator of this struct is responsible for allocating and deallocating the array. - */ -typedef struct RMW_PUBLIC_TYPE rmw_services_t -{ - /// The number of services represented by the array. - size_t service_count; - /// Pointer to an array of void * pointers of services. - void ** services; -} rmw_services_t; - -/// Array of client handles. -/** - * An array of void * pointers representing type-erased middleware-specific clients. - * The number of non-null entries may be smaller than the allocated size of the array. - * The number of clients represented may be smaller than the allocated size of the array. - * The creator of this struct is responsible for allocating and deallocating the array. - */ -typedef struct RMW_PUBLIC_TYPE rmw_clients_t -{ - /// The number of clients represented by the array. - size_t client_count; - /// Pointer to an array of void * pointers of clients. - void ** clients; -} rmw_clients_t; - -typedef struct RMW_PUBLIC_TYPE rmw_events_t -{ - /// The number of events represented by the array. - size_t event_count; - /// Pointer to an array of void * pointers of events. - void ** events; -} rmw_events_t; - -/// Array of guard condition handles. -/** - * An array of void * pointers representing type-erased middleware-specific guard conditions. - * The number of non-null entries may be smaller than the allocated size of the array. - * The number of guard conditions represented may be smaller than the allocated size of the array. - * The creator of this struct is responsible for allocating and deallocating the array. - */ -typedef struct RMW_PUBLIC_TYPE rmw_guard_conditions_t -{ - /// The number of guard conditions represented by the array. - size_t guard_condition_count; - /// Pointer to an array of void * pointers of guard conditions. - void ** guard_conditions; -} rmw_guard_conditions_t; - -/// Container for guard conditions to be waited on -typedef struct RMW_PUBLIC_TYPE rmw_wait_set_t -{ - /// The name of the rmw implementation - const char * implementation_identifier; - - /// The guard condition to be waited on - rmw_guard_conditions_t * guard_conditions; - - /// Type erased pointer to this wait set's data - void * data; -} rmw_wait_set_t; - -/// An rmw service request identifier -typedef struct RMW_PUBLIC_TYPE rmw_request_id_t -{ - /// The guid of the writer associated with this request - int8_t writer_guid[16]; - - /// Sequence number of this service - int64_t sequence_number; -} rmw_request_id_t; - -/// Struct representing a time point for rmw -typedef struct RMW_PUBLIC_TYPE rmw_time_t -{ - /// Seconds since the epoch - uint64_t sec; - - /// Nanoseconds component of this time point - uint64_t nsec; -} rmw_time_t; - -typedef rcutils_time_point_value_t rmw_time_point_value_t; - -/// Meta-data for a service-related take. -typedef struct RMW_PUBLIC_TYPE rmw_service_info_t -{ - rmw_time_point_value_t source_timestamp; - rmw_time_point_value_t received_timestamp; - rmw_request_id_t request_id; -} rmw_service_info_t; - -enum RMW_PUBLIC_TYPE rmw_qos_reliability_policy_t -{ - /// Implementation specific default - RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT, - - /// Guarantee that samples are delivered, may retry multiple times. - RMW_QOS_POLICY_RELIABILITY_RELIABLE, - - /// Attempt to deliver samples, but some may be lost if the network is not robust - RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT, - - /// Reliability policy has not yet been set - RMW_QOS_POLICY_RELIABILITY_UNKNOWN -}; - -/// QoS history enumerations describing how samples endure -enum RMW_PUBLIC_TYPE rmw_qos_history_policy_t -{ - /// Implementation default for history policy - RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT, - - /// Only store up to a maximum number of samples, dropping oldest once max is exceeded - RMW_QOS_POLICY_HISTORY_KEEP_LAST, - - /// Store all samples, subject to resource limits - RMW_QOS_POLICY_HISTORY_KEEP_ALL, - - /// History policy has not yet been set - RMW_QOS_POLICY_HISTORY_UNKNOWN -}; - -/// QoS durability enumerations describing how samples persist -enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t -{ - /// Impplementation specific default - RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT, - - /// The rmw publisher is responsible for persisting samples for “late-joining” subscribers - RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL, - - /// Samples are not persistent - RMW_QOS_POLICY_DURABILITY_VOLATILE, - - /// Durability policy has not yet been set - RMW_QOS_POLICY_DURABILITY_UNKNOWN -}; - -#define RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG \ - "RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE is deprecated. " \ - "Use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if manually asserted liveliness is needed." - -#ifndef _WIN32 -# define RMW_DECLARE_DEPRECATED(name, msg) name __attribute__((deprecated(msg))) -#else -# define RMW_DECLARE_DEPRECATED(name, msg) name __pragma(deprecated(name)) -#endif - -/// QoS liveliness enumerations that describe a publisher's reporting policy for its alive status. -/// For a subscriber, these are its requirements for its topic's publishers. -// Suppress syntax errors, as cppcheck does not seem to handle enumerator attributes. -// cppcheck-suppress syntaxError -enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t -{ - /// Implementation specific default - RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT = 0, - - /// The signal that establishes a Topic is alive comes from the ROS rmw layer. - RMW_QOS_POLICY_LIVELINESS_AUTOMATIC = 1, - - /// Explicitly asserting node liveliness is required in this case. - /// This option is deprecated, use RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC if your application - /// requires to assert liveliness manually. - RMW_DECLARE_DEPRECATED( - RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, - RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE_DEPRECATED_MSG) = 2, - - /// The signal that establishes a Topic is alive is at the Topic level. Only publishing a message - /// on the Topic or an explicit signal from the application to assert liveliness on the Topic - /// will mark the Topic as being alive. - // Using `3` for backwards compatibility. - RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC = 3, - - /// Liveliness policy has not yet been set - RMW_QOS_POLICY_LIVELINESS_UNKNOWN = 4 -}; - -/// QoS Deadline default, 0s indicates deadline policies are not tracked or enforced -#define RMW_QOS_DEADLINE_DEFAULT {0, 0} - -/// QoS Lifespan default, 0s indicate lifespan policies are not tracked or enforced -#define RMW_QOS_LIFESPAN_DEFAULT {0, 0} - -/// QoS Liveliness lease duration default, 0s indicate lease durations are not tracked or enforced -#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT {0, 0} - -/// ROS MiddleWare quality of service profile. -typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t -{ - enum rmw_qos_history_policy_t history; - /// Size of the message queue. - size_t depth; - /// Reliabiilty QoS policy setting - enum rmw_qos_reliability_policy_t reliability; - /// Durability QoS policy setting - enum rmw_qos_durability_policy_t durability; - /// The period at which messages are expected to be sent/received - struct rmw_time_t deadline; - /// The age at which messages are considered expired and no longer valid - struct rmw_time_t lifespan; - /// Liveliness QoS policy setting - enum rmw_qos_liveliness_policy_t liveliness; - /// The time within which the RMW node or publisher must show that it is alive - struct rmw_time_t liveliness_lease_duration; - - /// If true, any ROS specific namespacing conventions will be circumvented. - /** - * In the case of DDS and topics, for example, this means the typical - * ROS specific prefix of `rt` would not be applied as described here: - * - * http://design.ros2.org/articles/topic_and_service_names.html#ros-specific-namespace-prefix - * - * This might be useful when trying to directly connect a native DDS topic - * with a ROS 2 topic. - */ - bool avoid_ros_namespace_conventions; -} rmw_qos_profile_t; - -/// ROS graph ID of the topic -typedef struct RMW_PUBLIC_TYPE rmw_gid_t -{ - /// Name of the rmw implementation - const char * implementation_identifier; - - /// Bype data Gid value - uint8_t data[RMW_GID_STORAGE_SIZE]; -} rmw_gid_t; - -/// Information describing an rmw message -typedef struct RMW_PUBLIC_TYPE rmw_message_info_t -{ - rmw_time_point_value_t source_timestamp; - rmw_time_point_value_t received_timestamp; - rmw_gid_t publisher_gid; - - /// Whether this message is from intra_process communication or not - bool from_intra_process; -} rmw_message_info_t; - -/// Get zero initialized mesage info. -RMW_PUBLIC -RMW_WARN_UNUSED -rmw_message_info_t -rmw_get_zero_initialized_message_info(void); - -/// Default size of the rmw queue when history is set to RMW_QOS_POLICY_HISTORY_KEEP_LAST, -/// 0 indicates it is currently not set -enum {RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0}; - -/// Type mapping of rcutils log severity types to rmw specific types. -typedef enum RMW_PUBLIC_TYPE -{ - /// Debug log severity, for pedantic messaging - RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG, - - /// Informational log severity, for reporting expected but not overwhelming information - RMW_LOG_SEVERITY_INFO = RCUTILS_LOG_SEVERITY_INFO, - - /// Warning log severity, for reporting recoverable issues - RMW_LOG_SEVERITY_WARN = RCUTILS_LOG_SEVERITY_WARN, - - /// Error log severity, for reporting uncoverable issues - RMW_LOG_SEVERITY_ERROR = RCUTILS_LOG_SEVERITY_ERROR, - - /// Fatal log severity, for reporting issue causing imminent shutdown - RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL -} rmw_log_severity_t; - -/// QoS Liveliness Changed information provided by a subscription. -typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t -{ - /** - * The total number of currently active Publishers which publish to the topic associated with - * the Subscription. - * This count increases when a newly matched Publisher asserts its liveliness for the first time - * or when a Publisher previously considered to be not alive reasserts its liveliness. - * The count decreases when a Publisher considered alive fails to assert its liveliness and - * becomes not alive, whether because it was deleted normally or for some other reason. - */ - int32_t alive_count; - /** - * The total count of current Publishers which publish to the topic associated with the - * Subscription that are no longer asserting their liveliness. - * This count increases when a Publisher considered alive fails to assert its liveliness and - * becomes not alive for some reason other than the normal deletion of that Publisher. - * It decreases when a previously not alive Publisher either reasserts its liveliness or is - * deleted normally. - */ - int32_t not_alive_count; - /// The change in the alive_count since the status was last read. - int32_t alive_count_change; - /// The change in the not_alive_count since the status was last read. - int32_t not_alive_count_change; -} rmw_liveliness_changed_status_t; - -/// QoS Requested Deadline Missed information provided by a subscription. -typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t -{ - /** - * Lifetime cumulative number of missed deadlines detected for any instance read by the - * subscription. - * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented - * by one for each instance for which data was not received. - */ - int32_t total_count; - /// The incremental number of deadlines detected since the status was read. - int32_t total_count_change; -} rmw_requested_deadline_missed_status_t; - -/// QoS Liveliness Lost information provided by a publisher. -typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t -{ - /** - * Lifetime cumulative number of times that a previously-alive Publisher became not alive due to - * a failure to actively signal its liveliness within its offered liveliness period. - * This count does not change when an already not alive Publisher simply remains not alive for - * another liveliness period. - */ - int32_t total_count; - /// The change in total_count since the last time the status was last read. - int32_t total_count_change; -} rmw_liveliness_lost_status_t; - -/// QoS Deadline Missed information provided by a publisher. -typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t -{ - /** - * Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed - * to provide data. - * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented - * by one. - */ - int32_t total_count; - /// The change in total_count since the last time the status was last read. - int32_t total_count_change; -} rmw_offered_deadline_missed_status_t; - -#ifdef __cplusplus -} -#endif - -#endif // RMW__TYPES_H_ diff --git a/ThirdParty/ros/include/rmw_dds_common/context.hpp b/ThirdParty/ros/include/rmw_dds_common/context.hpp deleted file mode 100644 index 2a076ab65..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/context.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_DDS_COMMON__CONTEXT_HPP_ -#define RMW_DDS_COMMON__CONTEXT_HPP_ - -#include -#include -#include - -#include "rmw/types.h" - -#include "rmw_dds_common/graph_cache.hpp" -#include "rmw_dds_common/visibility_control.h" - -namespace rmw_dds_common -{ - -struct Context -{ - rmw_gid_t gid; - rmw_publisher_t * pub; - rmw_subscription_t * sub; - GraphCache graph_cache; - std::mutex node_update_mutex; - std::thread listener_thread; - std::atomic_bool thread_is_running; - rmw_guard_condition_t * listener_thread_gc; - rmw_guard_condition_t * graph_guard_condition; -}; - -} // namespace rmw_dds_common - -#endif // RMW_DDS_COMMON__CONTEXT_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/graph_cache.hpp b/ThirdParty/ros/include/rmw_dds_common/graph_cache.hpp deleted file mode 100644 index 5a1082e3d..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/graph_cache.hpp +++ /dev/null @@ -1,548 +0,0 @@ -// Copyright 2020 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_DDS_COMMON__GRAPH_CACHE_HPP_ -#define RMW_DDS_COMMON__GRAPH_CACHE_HPP_ - -#include -#include -#include -#include -#include -#include -#include - -#include "rcutils/logging_macros.h" - -#include "rmw/names_and_types.h" -#include "rmw/topic_endpoint_info.h" -#include "rmw/topic_endpoint_info_array.h" -#include "rmw/types.h" - -#include "rmw_dds_common/gid_utils.hpp" -#include "rmw_dds_common/visibility_control.h" -#include "rmw_dds_common/msg/gid.hpp" -#include "rmw_dds_common/msg/node_entities_info.hpp" -#include "rmw_dds_common/msg/participant_entities_info.hpp" - -namespace rmw_dds_common -{ - -// Forward-declaration, defined at end of file. -struct EntityInfo; -struct ParticipantInfo; - -/// Graph cache data structure. -/** - * Manages relationships between participants, nodes and topics. - */ -class GraphCache -{ - friend - RMW_DDS_COMMON_PUBLIC - std::ostream & - operator<<(std::ostream & ostream, const GraphCache & topic_cache); - -public: - /// Set a callback that will be called when the state of the object changes. - /** - * \param callback callback to be called. - */ - template - void - set_on_change_callback(CallbackT && callback) - { - std::lock_guard lock(mutex_); - on_change_callback_ = callback; - } - - /// Clear previously registered "on change" callback. - RMW_DDS_COMMON_PUBLIC - void - clear_on_change_callback(); - - /** - * \defgroup dds_discovery_api - * Methods used to update the Graph Cache based on DDS discovery. - * @{ - */ - - /// Add a data writer based on discovery. - /** - * \param gid The data writer guid. - * \param topic_name - * \param type_name - * \param participant_gid gid of the participant. - * \param qos Quality of service of the writer. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - add_writer( - const rmw_gid_t & writer_gid, - const std::string & topic_name, - const std::string & type_name, - const rmw_gid_t & participant_gid, - const rmw_qos_profile_t & qos); - - /// Add a data reader based on discovery. - /** - * \param gid The data reader guid - * \param topic_name - * \param type_name - * \param participant_gid gid of the participant. - * \param qos Quality of service of the writer. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - add_reader( - const rmw_gid_t & reader_gid, - const std::string & topic_name, - const std::string & type_name, - const rmw_gid_t & participant_gid, - const rmw_qos_profile_t & qos); - - /// Add a data reader based on discovery. - /** - * \param gid The data reader guid. - * \param topic_name - * \param type_name - * \param participant_gid gid of the participant. - * \param qos Quality of service of the writer. - * \param is_reader Adds a reader when `true`, if not a writer. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - add_entity( - const rmw_gid_t & gid, - const std::string & topic_name, - const std::string & type_name, - const rmw_gid_t & participant_gid, - const rmw_qos_profile_t & qos, - bool is_reader); - - /// Remove a data writer based on discovery. - /** - * \param gid The data writer guid. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - remove_writer(const rmw_gid_t & gid); - - /// Remove a data reader based on discovery. - /** - * \param gid The data reader guid. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - remove_reader(const rmw_gid_t & gid); - - /// Remove a data reader or writer based based on discovery. - /** - * \param gid The endpoint guid. - * \param is_reader `true` for removing a data reader. - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - remove_entity(const rmw_gid_t & gid, bool is_reader); - - /** - * @} - * \defgroup common_api - * Methods used to update the Graph Cache. - * @{ - */ - - /// Add a discovered participant to the cache. - /** - * \param gid The participant guid. - * \param enclave Name of the enclave. - */ - RMW_DDS_COMMON_PUBLIC - void - add_participant( - const rmw_gid_t & participant_gid, - const std::string & enclave); - - /// Remove a participant based on discovery. - /** - * \param participant_gid - * \return `true` when a change took place. - */ - RMW_DDS_COMMON_PUBLIC - bool - remove_participant(const rmw_gid_t & participant_gid); - - /** - * @} - * \defgroup ros_discovery_api - * Methods used to update the Graph Cache based on ROS 2 specific messages received from - * remote participants. - * @{ - */ - - /// Update participant info based on a received `ParticipantEntitiesInfo` message. - /** - * \param msg Will be filled with the received `ParticipantEntitiesInfo` message. - */ - RMW_DDS_COMMON_PUBLIC - void - update_participant_entities(const rmw_dds_common::msg::ParticipantEntitiesInfo & msg); - - /** - * @} - * \defgroup local_api - * Methods used to update the Graph Cache, based on local construction and destruction of objects. - * @{ - */ - - /// Add a node to the graph, and get the message to be sent. - /** - * \param gid participant GUID. - * \param node_name name of the node to be added. - * \param node_namespace node namespace. - * \return message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - add_node( - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /// Remove a node to the graph, and get the message to be sent. - /** - * \param gid participant GUID. - * \param node_name name of the node to be added. - * \param node_namespace node namespace. - * \return message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - remove_node( - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /// Remove a node to the graph, and get the message to be sent. - /** - * \param writer_gid GUID of the data writer. - * \param participant_gid GUID of the `Participant`. - * \param node_name Name of the node to be added. - * \param node_namespace Node namespace. - * \return Message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - associate_writer( - const rmw_gid_t & writer_gid, - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /// Dissociate a writer from a node, and get an update message to be sent. - /** - * \param writer_gid GUID of the data writer. - * \param participant_gid GUID of the `Participant`. - * \param node_name Name of the node to be added. - * \param node_namespace Node namespace. - * \return Message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - dissociate_writer( - const rmw_gid_t & writer_gid, - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /// Associate a reader with a node, and get an update message to be sent. - /** - * \param reader_gid GUID of the data reader. - * \param participant_gid GUID of the `Participant`. - * \param node_name Name of the node to be added. - * \param node_namespace Node namespace. - * \return Message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - associate_reader( - const rmw_gid_t & reader_gid, - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /// Dissociate a reader from a node, and get an update message to be sent. - /** - * \param reader_gid GUID of the data reader. - * \param participant_gid GUID of the `Participant`. - * \param node_name Name of the node to be added. - * \param node_namespace Node namespace. - * \return Message to be sent. - */ - RMW_DDS_COMMON_PUBLIC - rmw_dds_common::msg::ParticipantEntitiesInfo - dissociate_reader( - const rmw_gid_t & reader_gid, - const rmw_gid_t & participant_gid, - const std::string & node_name, - const std::string & node_namespace); - - /** - * @} - * \defgroup introspection_api - * Methods used to introspect the GraphCache. - * @{ - */ - - /// Get the number of publishers of a topic. - /** - * \param[in] topic_name Name of the topic. - * \param[out] count The result will be populated there. - * - * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or - * \return RMW_RET_ERROR if an unexpected error take place, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_writer_count( - const std::string & topic_name, - size_t * count) const; - - /// Get the number of subscriptions of a topic. - /** - * \param[in] topic_name Name of the topic. - * \param[out] count The result will be populated there. - * - * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or - * \return RMW_RET_ERROR if an unexpected error take place, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_reader_count( - const std::string & topic_name, - size_t * count) const; - - using DemangleFunctionT = std::function; - - /// Get an array with information about the writers in a topic. - /** - * \param[in] topic_name Name of the topic. - * \param[in] demangle_type Function that takes a type names and return it demangled. - * \param[in] allocator Used to allocate memory. - * \param[out] endpoints_info Array with the writers information. - * - * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or - * \return RMW_RET_ERROR if an unexpected error take place, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_writers_info_by_topic( - const std::string & topic_name, - DemangleFunctionT demangle_type, - rcutils_allocator_t * allocator, - rmw_topic_endpoint_info_array_t * endpoints_info) const; - - /// Get an array with information about the readers in a topic. - /** - * \param[in] topic_name Name of the topic. - * \param[in] demangle_type Function that takes a type names and return it demangled. - * \param[in] allocator Used to allocate memory. - * \param[out] endpoints_info Array with the readers information. - * - * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or - * \return RMW_RET_ERROR if an unexpected error take place, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_readers_info_by_topic( - const std::string & topic_name, - DemangleFunctionT demangle_type, - rcutils_allocator_t * allocator, - rmw_topic_endpoint_info_array_t * endpoints_info) const; - - /// Get all the topic names and types. - /** - * \param[in] demangle_topic Function that indicates how a dds topic name is demangled - * into a ros topic name. - * \param[in] demangle_type Function that indicates how a dds type name is demangled - * into a ros type name. - * \param[in] allocator. - * \param[inout] topic_names_and_types A zero initialized names and types object, that - * will be populated with the result. - * - * \return RMW_RET_NODE_NAME_NON_EXISTENT if the node doesn't exist, or - * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or - * \return RMW_RET_BAD_ALLOC if an allocation failed, or - * \return RMW_RET_ERROR if an unexpected error happened, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_names_and_types( - DemangleFunctionT demangle_topic, - DemangleFunctionT demangle_type, - rcutils_allocator_t * allocator, - rmw_names_and_types_t * topic_names_and_types) const; - - /// Get the topic names and types that a node is publishing. - /** - * \param[in] node_name Name of the node. - * \param[in] node_namespace Namespace of the node. - * \param[in] demangle_topic Function that indicates how a dds topic name is demangled - * into a ros topic name. - * \param[in] demangle_type Function that indicates how a dds type name is demangled - * into a ros type name. - * \param[in] allocator - * \param[inout] topic_names_and_types A zero initialized names and types object, that - * will be populated with the result. - * - * \return RMW_RET_NODE_NAME_NON_EXISTENT if the node doesn't exist, or - * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or - * \return RMW_RET_BAD_ALLOC if an allocation failed, or - * \return RMW_RET_ERROR if an unexpected error happened, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_writer_names_and_types_by_node( - const std::string & node_name, - const std::string & namespace_, - DemangleFunctionT demangle_topic, - DemangleFunctionT demangle_type, - rcutils_allocator_t * allocator, - rmw_names_and_types_t * topic_names_and_types) const; - - /// Get the topic names and types that a node is subscribing. - /** - * \param[in] node_name Name of the node. - * \param[in] node_namespace Namespace of the node. - * \param[in] demangle_topic Function that indicates how a dds topic name is demangled - * into a ros topic name. - * \param[in] demangle_type Function that indicates how a dds type name is demangled - * into a ros type name. - * \param[in] allocator. - * \param[inout] topic_names_and_types A zero initialized names and types object, that - * will be populated with the result. - * - * \return RMW_RET_NODE_NAME_NON_EXISTENT if the node doesn't exist, or - * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or - * \return RMW_RET_BAD_ALLOC if an allocation failed, or - * \return RMW_RET_ERROR if an unexpected error happened, or - * \return RMW_RET_OK. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_reader_names_and_types_by_node( - const std::string & node_name, - const std::string & namespace_, - DemangleFunctionT demangle_topic, - DemangleFunctionT demangle_type, - rcutils_allocator_t * allocator, - rmw_names_and_types_t * topic_names_and_types) const; - - /// Get the number of nodes that have been discovered. - /** - * \return RMW_RET_OK, or - * \return RMW_RET_ERROR. - */ - RMW_DDS_COMMON_PUBLIC - size_t - get_number_of_nodes() const; - - /// Copy the names and namespaces of the discovered nodes. - /** - * \param[inout] node_names A zero initialized string array, where the node names will be copied. - * Must not be `nullptr`. - * \param[inout] node_namespaces A zero initialized string array, where the node namespaces - * will be copied. Each item in this array corresponds to an item in the same position of - * node_names array. Must not be `nullptr`. - * \param[inout] enclaves A zero initialized string array, where the enclave - * name of the node will be copied. Each item in this array corresponds to an item in the same - * position of node_names array. In case is `nullptr`, it won't be used. - * \param[in] allocator. - * \return RMW_RET_OK, or - * \return RMW_RET_INVALID_ARGUMENT, or - * \return RMW_RET_BAD_ALLOC, or - * \return RMW_RET_ERROR. - */ - RMW_DDS_COMMON_PUBLIC - rmw_ret_t - get_node_names( - rcutils_string_array_t * node_names, - rcutils_string_array_t * node_namespaces, - rcutils_string_array_t * enclaves, - rcutils_allocator_t * allocator) const; - - /** - * @} - */ - - using NodeEntitiesInfoSeq = - decltype(std::declval().node_entities_info_seq); - using EntityGidToInfo = std::map; - using ParticipantToNodesMap = std::map; - using GidSeq = - decltype(std::declval().writer_gid_seq); - -private: - EntityGidToInfo data_writers_; - EntityGidToInfo data_readers_; - ParticipantToNodesMap participants_; - std::function on_change_callback_ = nullptr; - - mutable std::mutex mutex_; -}; - -RMW_DDS_COMMON_PUBLIC -std::ostream & -operator<<(std::ostream & ostream, const GraphCache & topic_cache); - -struct ParticipantInfo -{ - GraphCache::NodeEntitiesInfoSeq node_entities_info_seq; - std::string enclave; -}; - -struct EntityInfo -{ - std::string topic_name; - std::string topic_type; - rmw_gid_t participant_gid; - rmw_qos_profile_t qos; - - EntityInfo( - const std::string & topic_name, - const std::string & topic_type, - const rmw_gid_t & participant_gid, - const rmw_qos_profile_t & qos) - : topic_name(topic_name), - topic_type(topic_type), - participant_gid(participant_gid), - qos(qos) - {} -}; - -} // namespace rmw_dds_common - -#endif // RMW_DDS_COMMON__GRAPH_CACHE_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__traits.hpp deleted file mode 100644 index 9f0b74bc9..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rmw_dds_common:msg/Gid.idl -// generated code does not contain a copyright notice - -#ifndef RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ -#define RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ - -#include "rmw_dds_common/msg/detail/gid__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rmw_dds_common::msg::Gid"; -} - -template<> -inline const char * name() -{ - return "rmw_dds_common/msg/Gid"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.c b/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.c deleted file mode 100644 index 5add4469c..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rmw_dds_common:msg/Gid.idl -// generated code does not contain a copyright notice - -#include -#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" -#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/gid__functions.h" -#include "rmw_dds_common/msg/detail/gid__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Gid__rosidl_typesupport_introspection_c__Gid_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; - rmw_dds_common__msg__Gid__init(message_memory); -} - -void Gid__rosidl_typesupport_introspection_c__Gid_fini_function(void * message_memory) -{ - rmw_dds_common__msg__Gid__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Gid__rosidl_typesupport_introspection_c__Gid_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 24, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__Gid, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Gid__rosidl_typesupport_introspection_c__Gid_message_members = { - "rmw_dds_common__msg", // message namespace - "Gid", // message name - 1, // number of fields - sizeof(rmw_dds_common__msg__Gid), - Gid__rosidl_typesupport_introspection_c__Gid_message_member_array, // message members - Gid__rosidl_typesupport_introspection_c__Gid_init_function, // function to initialize message memory (memory has to be allocated) - Gid__rosidl_typesupport_introspection_c__Gid_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 Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle = { - 0, - &Gid__rosidl_typesupport_introspection_c__Gid_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)() { - if (!Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle.typesupport_identifier) { - Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__traits.hpp deleted file mode 100644 index 891d7d66e..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rmw_dds_common:msg/NodeEntitiesInfo.idl -// generated code does not contain a copyright notice - -#ifndef RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ -#define RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ - -#include "rmw_dds_common/msg/detail/node_entities_info__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rmw_dds_common::msg::NodeEntitiesInfo"; -} - -template<> -inline const char * name() -{ - return "rmw_dds_common/msg/NodeEntitiesInfo"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.c b/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.c deleted file mode 100644 index 7fdd533ff..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.c +++ /dev/null @@ -1,207 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rmw_dds_common:msg/NodeEntitiesInfo.idl -// generated code does not contain a copyright notice - -#include -#include "rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h" -#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/node_entities_info__functions.h" -#include "rmw_dds_common/msg/detail/node_entities_info__struct.h" - - -// Include directives for member types -// Member `node_namespace` -// Member `node_name` -#include "rosidl_runtime_c/string_functions.h" -// Member `reader_gid_seq` -// Member `writer_gid_seq` -#include "rmw_dds_common/msg/gid.h" -// Member `reader_gid_seq` -// Member `writer_gid_seq` -#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_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; - rmw_dds_common__msg__NodeEntitiesInfo__init(message_memory); -} - -void NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_fini_function(void * message_memory) -{ - rmw_dds_common__msg__NodeEntitiesInfo__fini(message_memory); -} - -size_t NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__Gid__reader_gid_seq( - const void * untyped_member) -{ - const rmw_dds_common__msg__Gid__Sequence * member = - (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return member->size; -} - -const void * NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__Gid__reader_gid_seq( - const void * untyped_member, size_t index) -{ - const rmw_dds_common__msg__Gid__Sequence * member = - (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__Gid__reader_gid_seq( - void * untyped_member, size_t index) -{ - rmw_dds_common__msg__Gid__Sequence * member = - (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__Gid__reader_gid_seq( - void * untyped_member, size_t size) -{ - rmw_dds_common__msg__Gid__Sequence * member = - (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - rmw_dds_common__msg__Gid__Sequence__fini(member); - return rmw_dds_common__msg__Gid__Sequence__init(member, size); -} - -size_t NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__Gid__writer_gid_seq( - const void * untyped_member) -{ - const rmw_dds_common__msg__Gid__Sequence * member = - (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return member->size; -} - -const void * NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__Gid__writer_gid_seq( - const void * untyped_member, size_t index) -{ - const rmw_dds_common__msg__Gid__Sequence * member = - (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__Gid__writer_gid_seq( - void * untyped_member, size_t index) -{ - rmw_dds_common__msg__Gid__Sequence * member = - (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__Gid__writer_gid_seq( - void * untyped_member, size_t size) -{ - rmw_dds_common__msg__Gid__Sequence * member = - (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); - rmw_dds_common__msg__Gid__Sequence__fini(member); - return rmw_dds_common__msg__Gid__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[4] = { - { - "node_namespace", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 256, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__NodeEntitiesInfo, node_namespace), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "node_name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 256, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__NodeEntitiesInfo, node_name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "reader_gid_seq", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__NodeEntitiesInfo, reader_gid_seq), // bytes offset in struct - NULL, // default value - NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__Gid__reader_gid_seq, // size() function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__Gid__reader_gid_seq, // get_const(index) function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__Gid__reader_gid_seq, // get(index) function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__Gid__reader_gid_seq // resize(index) function pointer - }, - { - "writer_gid_seq", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__NodeEntitiesInfo, writer_gid_seq), // bytes offset in struct - NULL, // default value - NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__Gid__writer_gid_seq, // size() function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__Gid__writer_gid_seq, // get_const(index) function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__Gid__writer_gid_seq, // get(index) function pointer - NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__Gid__writer_gid_seq // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_members = { - "rmw_dds_common__msg", // message namespace - "NodeEntitiesInfo", // message name - 4, // number of fields - sizeof(rmw_dds_common__msg__NodeEntitiesInfo), - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array, // message members - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_init_function, // function to initialize message memory (memory has to be allocated) - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_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 NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle = { - 0, - &NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, NodeEntitiesInfo)() { - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); - if (!NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle.typesupport_identifier) { - NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp deleted file mode 100644 index 0a9987df5..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rmw_dds_common:msg/ParticipantEntitiesInfo.idl -// generated code does not contain a copyright notice - -#ifndef RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ -#define RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ - -#include "rmw_dds_common/msg/detail/participant_entities_info__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'gid' -#include "rmw_dds_common/msg/detail/gid__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rmw_dds_common::msg::ParticipantEntitiesInfo"; -} - -template<> -inline const char * name() -{ - return "rmw_dds_common/msg/ParticipantEntitiesInfo"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.c b/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.c deleted file mode 100644 index fa6e726ad..000000000 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rmw_dds_common:msg/ParticipantEntitiesInfo.idl -// generated code does not contain a copyright notice - -#include -#include "rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h" -#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/participant_entities_info__functions.h" -#include "rmw_dds_common/msg/detail/participant_entities_info__struct.h" - - -// Include directives for member types -// Member `gid` -#include "rmw_dds_common/msg/gid.h" -// Member `gid` -#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" -// Member `node_entities_info_seq` -#include "rmw_dds_common/msg/node_entities_info.h" -// Member `node_entities_info_seq` -#include "rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_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; - rmw_dds_common__msg__ParticipantEntitiesInfo__init(message_memory); -} - -void ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_fini_function(void * message_memory) -{ - rmw_dds_common__msg__ParticipantEntitiesInfo__fini(message_memory); -} - -size_t ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__node_entities_info_seq( - const void * untyped_member) -{ - const rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = - (const rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); - return member->size; -} - -const void * ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__node_entities_info_seq( - const void * untyped_member, size_t index) -{ - const rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = - (const rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__node_entities_info_seq( - void * untyped_member, size_t index) -{ - rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = - (rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__node_entities_info_seq( - void * untyped_member, size_t size) -{ - rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = - (rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); - rmw_dds_common__msg__NodeEntitiesInfo__Sequence__fini(member); - return rmw_dds_common__msg__NodeEntitiesInfo__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[2] = { - { - "gid", // 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(rmw_dds_common__msg__ParticipantEntitiesInfo, gid), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "node_entities_info_seq", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(rmw_dds_common__msg__ParticipantEntitiesInfo, node_entities_info_seq), // bytes offset in struct - NULL, // default value - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__node_entities_info_seq, // size() function pointer - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__node_entities_info_seq, // get_const(index) function pointer - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__node_entities_info_seq, // get(index) function pointer - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__node_entities_info_seq // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_members = { - "rmw_dds_common__msg", // message namespace - "ParticipantEntitiesInfo", // message name - 2, // number of fields - sizeof(rmw_dds_common__msg__ParticipantEntitiesInfo), - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array, // message members - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_init_function, // function to initialize message memory (memory has to be allocated) - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_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 ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle = { - 0, - &ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, ParticipantEntitiesInfo)() { - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, NodeEntitiesInfo)(); - if (!ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle.typesupport_identifier) { - ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/context.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/context.hpp new file mode 100644 index 000000000..8639e481d --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/context.hpp @@ -0,0 +1,56 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_DDS_COMMON__CONTEXT_HPP_ +#define RMW_DDS_COMMON__CONTEXT_HPP_ + +#include +#include +#include + +#include "rmw/types.h" + +#include "rmw_dds_common/graph_cache.hpp" +#include "rmw_dds_common/visibility_control.h" + +namespace rmw_dds_common +{ + +/// Base data structure that a Context will need in any DDS-based RMW implementation +/// mapping one Participant to Multiple Nodes. +struct Context +{ + /// Global ID of the Participant that the Context uses. + rmw_gid_t gid; + /// Publisher used to publish ParticipantEntitiesInfo discovery data. + rmw_publisher_t * pub; + /// Subscriber used to listen to ParticipantEntitiesInfo discovery data. + rmw_subscription_t * sub; + /// Cached graph from discovery data. + GraphCache graph_cache; + /// Mutex that should be locked when updating graph cache and publishing a graph message. + std::mutex node_update_mutex; + /// Thread to listen to discovery data. + std::thread listener_thread; + /// Indicates if the listener thread is running. + std::atomic_bool thread_is_running; + /// Awakes listener thread when finishing the context. + rmw_guard_condition_t * listener_thread_gc; + /// Guard condition that should be triggered when the graph changes. + rmw_guard_condition_t * graph_guard_condition; +}; + +} // namespace rmw_dds_common + +#endif // RMW_DDS_COMMON__CONTEXT_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/gid_utils.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/gid_utils.hpp similarity index 91% rename from ThirdParty/ros/include/rmw_dds_common/gid_utils.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/gid_utils.hpp index 9b29bb031..54e24bee2 100644 --- a/ThirdParty/ros/include/rmw_dds_common/gid_utils.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/gid_utils.hpp @@ -26,6 +26,7 @@ namespace rmw_dds_common /// Comparator for rmw_gid_t, in order to use them as a key of a map struct RMW_DDS_COMMON_PUBLIC_TYPE Compare_rmw_gid_t { + /// Compare lhs with rhs. bool operator()(const rmw_gid_t & lhs, const rmw_gid_t & rhs) const; }; @@ -39,7 +40,7 @@ RMW_DDS_COMMON_PUBLIC bool operator==(const rmw_gid_t & lhs, const rmw_gid_t & rhs); -/// Converts from rmw_gid_t to rmw_dds_common::msg::Gid +/// \internal Converts from rmw_gid_t to rmw_dds_common::msg::Gid /** * For internal usage, both pointers are assumed to be valid. */ @@ -49,7 +50,7 @@ convert_gid_to_msg( const rmw_gid_t * gid, rmw_dds_common::msg::Gid * msg_gid); -/// Converts from rmw_dds_common::msg::Gid to rmw_gid_t +/// \internal Converts from rmw_dds_common::msg::Gid to rmw_gid_t /** * For internal usage, both pointers are supposed to be valid. */ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/graph_cache.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/graph_cache.hpp new file mode 100644 index 000000000..30802e653 --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/graph_cache.hpp @@ -0,0 +1,566 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_DDS_COMMON__GRAPH_CACHE_HPP_ +#define RMW_DDS_COMMON__GRAPH_CACHE_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include "rcutils/logging_macros.h" + +#include "rmw/names_and_types.h" +#include "rmw/topic_endpoint_info.h" +#include "rmw/topic_endpoint_info_array.h" +#include "rmw/types.h" + +#include "rmw_dds_common/gid_utils.hpp" +#include "rmw_dds_common/visibility_control.h" +#include "rmw_dds_common/msg/gid.hpp" +#include "rmw_dds_common/msg/node_entities_info.hpp" +#include "rmw_dds_common/msg/participant_entities_info.hpp" + +namespace rmw_dds_common +{ + +// Forward-declaration, defined at end of file. +struct EntityInfo; +struct ParticipantInfo; + +/// Graph cache data structure. +/** + * Manages relationships between participants, nodes, and topics. + */ +class GraphCache +{ + friend + RMW_DDS_COMMON_PUBLIC + std::ostream & + operator<<(std::ostream & ostream, const GraphCache & topic_cache); + +public: + /// Set a callback that will be called when the state of the object changes. + /** + * \param callback callback to be called. + */ + template + void + set_on_change_callback(CallbackT && callback) + { + std::lock_guard lock(mutex_); + on_change_callback_ = callback; + } + + /// Clear previously registered "on change" callback. + RMW_DDS_COMMON_PUBLIC + void + clear_on_change_callback(); + + /** + * \defgroup dds_discovery_api dds_discovery_api + * Methods used to update the Graph Cache based on DDS discovery. + * @{ + */ + + /// Add a data writer. + /** + * \param writer_gid GUID of the data writer. + * \param topic_name Name of the DDS topic for this data writer. + * \param type_name Type name of the DDS topic for this data writer. + * \param participant_gid GUID of the participant. + * \param qos QoS profile of the data writer. + * \return `true` if the cache was updated, `false` if the data writer + * was already present. + */ + RMW_DDS_COMMON_PUBLIC + bool + add_writer( + const rmw_gid_t & writer_gid, + const std::string & topic_name, + const std::string & type_name, + const rmw_gid_t & participant_gid, + const rmw_qos_profile_t & qos); + + /// Add a data reader based on discovery. + /** + * \param reader_gid GUID of the The data reader. + * \param topic_name Name of the DDS topic for this data reader. + * \param type_name Type name of the DDS topic for this data reader. + * \param participant_gid GUID of the participant. + * \param qos QoS profile of the data reader. + * \return `true` if the cache was updated, `false` if the data reader + * was already present. + */ + RMW_DDS_COMMON_PUBLIC + bool + add_reader( + const rmw_gid_t & reader_gid, + const std::string & topic_name, + const std::string & type_name, + const rmw_gid_t & participant_gid, + const rmw_qos_profile_t & qos); + + /// Add a data reader or writer. + /** + * \param gid GUID of the entity. + * \param topic_name Name of the DDS topic for this data reader. + * \param type_name Type name of the DDS topic for this entity + * \param participant_gid GUID of the participant. + * \param qos QoS profile of the entity. + * \param is_reader Whether the entity is a data reader or a writer. + * \return `true` if the cache was updated, `false` if the entity + * was already present. + */ + RMW_DDS_COMMON_PUBLIC + bool + add_entity( + const rmw_gid_t & gid, + const std::string & topic_name, + const std::string & type_name, + const rmw_gid_t & participant_gid, + const rmw_qos_profile_t & qos, + bool is_reader); + + /// Remove a data writer. + /** + * \param gid GUID of the data writer. + * \return `true` if the cache was updated, + * `false` if the data writer was not present. + */ + RMW_DDS_COMMON_PUBLIC + bool + remove_writer(const rmw_gid_t & gid); + + /// Remove a data reader. + /** + * \param gid GUID of the The data reader. + * \return `true` if the cache was updated, + * `false` if the data reader was not present. + */ + RMW_DDS_COMMON_PUBLIC + bool + remove_reader(const rmw_gid_t & gid); + + /// Remove a data reader or writer. + /** + * \param gid GUID of the entity. + * \param is_reader Whether the entity is a data reader or a writer. + * \return `true` when a the cache was upated, `false` if the entity + * was not present. + */ + RMW_DDS_COMMON_PUBLIC + bool + remove_entity(const rmw_gid_t & gid, bool is_reader); + + /** + * @} + * \defgroup common_api common_api + * Methods used to update the Graph Cache. + * @{ + */ + + /// Add a participant. + /** + * \param participant_gid GUID of the participant. + * \param enclave Name of the enclave. + */ + RMW_DDS_COMMON_PUBLIC + void + add_participant( + const rmw_gid_t & participant_gid, + const std::string & enclave); + + /// Remove a participant. + /** + * \param participant_gid GUID of the participant. + * \return `true` when a change took place. + */ + RMW_DDS_COMMON_PUBLIC + bool + remove_participant(const rmw_gid_t & participant_gid); + + /** + * @} + * \defgroup ros_discovery_api ros_discovery_api + * Methods used to update the Graph Cache based on ROS 2 specific messages received from + * remote participants. + * @{ + */ + + /// Update cached participant info from a `ParticipantEntitiesInfo` message. + /** + * \param msg participant info to update cache from. + */ + RMW_DDS_COMMON_PUBLIC + void + update_participant_entities(const rmw_dds_common::msg::ParticipantEntitiesInfo & msg); + + /** + * @} + * \defgroup local_api local_api + * Methods used to update the Graph Cache, based on local construction and destruction of entities. + * All of these methods return a `ParticipantEntitiesInfo` message describing the local participant + * state. This message can be used to update remote caches kept by remote participants. + * \see rmw_dds_common::GraphCache::update_participant_entities. + * @{ + */ + + /// Add a node to the graph. + /** + * \param participant_gid GUID of the participant. + * \param node_name Name of the node to be added. + * \param node_namespace Namespace of the node to be added. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + add_node( + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /// Remove a node from the graph. + /** + * \param participant_gid GUID of the participant. + * \param node_name Name of the node to be removed. + * \param node_namespace Namespace of the node to be removed. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + remove_node( + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /// Associate a data writer with a node. + /** + * \param writer_gid GUID of the data writer. + * \param participant_gid GUID of the participant. + * \param node_name Name of the target node. + * \param node_namespace Namespace of the target node. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + associate_writer( + const rmw_gid_t & writer_gid, + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /// Dissociate a data writer from a node. + /** + * \param writer_gid GUID of the data writer. + * \param participant_gid GUID of the participant. + * \param node_name Name of the target node. + * \param node_namespace Namespace of the target node. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + dissociate_writer( + const rmw_gid_t & writer_gid, + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /// Associate a data reader with a node. + /** + * \param reader_gid GUID of the data reader. + * \param participant_gid GUID of the participant. + * \param node_name Name of the target node. + * \param node_namespace Namespace of target node. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + associate_reader( + const rmw_gid_t & reader_gid, + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /// Dissociate a data reader from a node. + /** + * \param reader_gid GUID of the data reader. + * \param participant_gid GUID of the participant. + * \param node_name Name of the target node. + * \param node_namespace Namespace of target node. + * \return Message to update other caches. + */ + RMW_DDS_COMMON_PUBLIC + rmw_dds_common::msg::ParticipantEntitiesInfo + dissociate_reader( + const rmw_gid_t & reader_gid, + const rmw_gid_t & participant_gid, + const std::string & node_name, + const std::string & node_namespace); + + /** + * @} + * \defgroup introspection_api introspection_api + * Methods used to introspect the GraphCache. + * @{ + */ + + /// Get the number of data writers for a DDS topic. + /** + * \param[in] topic_name Name of the DDS topic. + * \param[out] count Number of data writers. + * + * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or + * \return RMW_RET_ERROR if an unexpected error take place, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_writer_count( + const std::string & topic_name, + size_t * count) const; + + /// Get the number of data readers for a DDS topic. + /** + * \param[in] topic_name Name of the DDS topic. + * \param[out] count Number of data readers. + * + * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or + * \return RMW_RET_ERROR if an unexpected error take place, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_reader_count( + const std::string & topic_name, + size_t * count) const; + + /// Callable used to demangle a name. + using DemangleFunctionT = std::function; + + /// Get an array with information about the data writers for a DDS topic. + /** + * \param[in] topic_name Name of the DDS topic. + * \param[in] demangle_type Function to demangle DDS topic type names. + * \param[in] allocator To allocate memory when populating `endpoints_info`. + * \param[out] endpoints_info A zero initialized topic endpoint information + * array to be populated with data writers' info. + * + * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or + * \return RMW_RET_ERROR if an unexpected error take place, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_writers_info_by_topic( + const std::string & topic_name, + DemangleFunctionT demangle_type, + rcutils_allocator_t * allocator, + rmw_topic_endpoint_info_array_t * endpoints_info) const; + + /// Get an array with information about the data readers for a DDS topic. + /** + * \param[in] topic_name Name of the DDS topic. + * \param[in] demangle_type Function to demangle DDS topic type names. + * \param[in] allocator To allocate memory when populating `endpoints_info`. + * \param[out] endpoints_info A zero initialized topic endpoint information + * array to be populated with data readers' info. + * + * \return RMW_RET_INVALID_ARGUMENT if count is `nullptr`, or + * \return RMW_RET_ERROR if an unexpected error take place, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_readers_info_by_topic( + const std::string & topic_name, + DemangleFunctionT demangle_type, + rcutils_allocator_t * allocator, + rmw_topic_endpoint_info_array_t * endpoints_info) const; + + /// Get all topic names and types. + /** + * \param[in] demangle_topic Function to demangle DDS topic names. + * \param[in] demangle_type Function to demangle DDS topic type names. + * \param[in] allocator To allocate memory when populating `topic_names_and_types`. + * \param[inout] topic_names_and_types A zero initialized names and types collection + * to be populated with the result. + * + * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or + * \return RMW_RET_BAD_ALLOC if an allocation failed, or + * \return RMW_RET_ERROR if an unexpected error happened, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_names_and_types( + DemangleFunctionT demangle_topic, + DemangleFunctionT demangle_type, + rcutils_allocator_t * allocator, + rmw_names_and_types_t * topic_names_and_types) const; + + /// Get topic names and types for all data writers associated to a node. + /** + * \param[in] node_name Name of the node. + * \param[in] namespace_ Namespace of the node. + * \param[in] demangle_topic Function to demangle DDS topic names. + * \param[in] demangle_type Function to demangle DDS topic type names. + * \param[in] allocator To allocate memory when populating `topic_names_and_types`. + * \param[inout] topic_names_and_types A zero initialized names and types collection + * to be populated with the result. + * + * \return RMW_RET_NODE_NAME_NON_EXISTENT if the node doesn't exist, or + * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or + * \return RMW_RET_BAD_ALLOC if an allocation failed, or + * \return RMW_RET_ERROR if an unexpected error happened, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_writer_names_and_types_by_node( + const std::string & node_name, + const std::string & namespace_, + DemangleFunctionT demangle_topic, + DemangleFunctionT demangle_type, + rcutils_allocator_t * allocator, + rmw_names_and_types_t * topic_names_and_types) const; + + /// Get the topic names and types for all data readers associated to a node. + /** + * \param[in] node_name Name of the node. + * \param[in] namespace_ Namespace of the node. + * \param[in] demangle_topic Function to demangle DDS topic names. + * \param[in] demangle_type Function to demangle DDS topic type names. + * \param[in] allocator To allocate memory when populating `topic_names_and_types`. + * \param[inout] topic_names_and_types A zero initialized names and types collection + * to be populated with the result. + * + * \return RMW_RET_NODE_NAME_NON_EXISTENT if the node doesn't exist, or + * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or + * \return RMW_RET_BAD_ALLOC if an allocation failed, or + * \return RMW_RET_ERROR if an unexpected error happened, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_reader_names_and_types_by_node( + const std::string & node_name, + const std::string & namespace_, + DemangleFunctionT demangle_topic, + DemangleFunctionT demangle_type, + rcutils_allocator_t * allocator, + rmw_names_and_types_t * topic_names_and_types) const; + + /// Get the number of nodes that have been discovered. + RMW_DDS_COMMON_PUBLIC + size_t + get_number_of_nodes() const; + + /// Get the names, namespaces, and enclaves of all nodes. + /** + * \param[inout] node_names A zero initialized string array to be populated with node names. + * \param[inout] node_namespaces A zero initialized string array to be populated with node + * namespaces. Each item in this array corresponds to the item at the same position in + * `node_names`. + * \param[inout] enclaves A zero initialized string array to be populated with node + * enclaves. Each item in this array corresponds to the item at the same position in + * `node_names`. If `nullptr`, it will be ignored. + * \param[in] allocator To allocate memory when populating `node_names`, `node_namespaces`, + * and `enclaves`. + * \return RMW_RET_INVALID_ARGUMENT if an argument is invalid, or + * \return RMW_RET_BAD_ALLOC if an allocation failed, or + * \return RMW_RET_ERROR if an unexpected error occurred, or + * \return RMW_RET_OK. + */ + RMW_DDS_COMMON_PUBLIC + rmw_ret_t + get_node_names( + rcutils_string_array_t * node_names, + rcutils_string_array_t * node_namespaces, + rcutils_string_array_t * enclaves, + rcutils_allocator_t * allocator) const; + + /** + * @} + */ + + /// \internal + /// Sequence of NodeEntitiesInfo messages. + using NodeEntitiesInfoSeq = + decltype(std::declval().node_entities_info_seq); + /// \internal + /// Map from endpoint gids to endpoints discovery info. + using EntityGidToInfo = std::map; + /// \internal + /// Map from participant gids to participant discovery info. + using ParticipantToNodesMap = std::map; + /// \internal + /// Sequence of endpoints gids. + using GidSeq = + decltype(std::declval().writer_gid_seq); + +private: + EntityGidToInfo data_writers_; + EntityGidToInfo data_readers_; + ParticipantToNodesMap participants_; + std::function on_change_callback_ = nullptr; + + mutable std::mutex mutex_; +}; + +RMW_DDS_COMMON_PUBLIC +std::ostream & +operator<<(std::ostream & ostream, const GraphCache & topic_cache); + +/// Structure to represent the discovery data of a Participant. +struct ParticipantInfo +{ + /// Discovery information of each Node created from a Participant. + GraphCache::NodeEntitiesInfoSeq node_entities_info_seq; + /// Name of the enclave. + std::string enclave; +}; + +/// Structure to represent the discovery data of an endpoint (data reader or writer). +struct EntityInfo +{ + /// Topic name. + std::string topic_name; + /// Topic type. + std::string topic_type; + /// Participant gid. + rmw_gid_t participant_gid; + /// Quality of service of the topic. + rmw_qos_profile_t qos; + + /// Simple constructor. + EntityInfo( + const std::string & topic_name, + const std::string & topic_type, + const rmw_gid_t & participant_gid, + const rmw_qos_profile_t & qos) + : topic_name(topic_name), + topic_type(topic_type), + participant_gid(participant_gid), + qos(qos) + {} +}; + +} // namespace rmw_dds_common + +#endif // RMW_DDS_COMMON__GRAPH_CACHE_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__builder.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__builder.hpp similarity index 94% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__builder.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__builder.hpp index ce83f9632..7fae8c700 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__builder.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__builder.hpp @@ -5,11 +5,12 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__GID__BUILDER_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__GID__BUILDER_HPP_ -#include "rmw_dds_common/msg/detail/gid__struct.hpp" -#include #include #include +#include "rmw_dds_common/msg/detail/gid__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rmw_dds_common { diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__functions.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__functions.c similarity index 90% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__functions.c rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__functions.c index f6ca975c2..02ffe6390 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__functions.c +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__functions.c @@ -205,22 +205,27 @@ rmw_dds_common__msg__Gid__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rmw_dds_common__msg__Gid); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rmw_dds_common__msg__Gid * data = - (rmw_dds_common__msg__Gid *)realloc(output->data, allocation_size); + (rmw_dds_common__msg__Gid *)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 (!rmw_dds_common__msg__Gid__init(&data[i])) { - /* free currently allocated and return false */ + if (!rmw_dds_common__msg__Gid__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; ) { - rmw_dds_common__msg__Gid__fini(&data[i]); + rmw_dds_common__msg__Gid__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__functions.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__functions.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__functions.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__functions.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h index 698f15b9c..fad75b0c5 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rmw_dds_common__msg__Gid( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common size_t max_serialized_size_rmw_dds_common__msg__Gid( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp index 2aff7b755..22ad9a90b 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rmw_dds_common max_serialized_size_Gid( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.h similarity index 93% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.h index e1752b8ad..4717ad4c4 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Gid in the package rmw_dds_common. +/// Struct defined in msg/Gid in the package rmw_dds_common. typedef struct rmw_dds_common__msg__Gid { uint8_t data[24]; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.hpp similarity index 97% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.hpp index bedc254f9..66d52d23a 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__struct.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__struct.hpp @@ -5,14 +5,15 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__GID__STRUCT_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__GID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__rmw_dds_common__msg__Gid __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__traits.hpp new file mode 100644 index 000000000..c89d00c24 --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rmw_dds_common:msg/Gid.idl +// generated code does not contain a copyright notice + +#ifndef RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ +#define RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rmw_dds_common/msg/detail/gid__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace rmw_dds_common +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Gid & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Gid & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Gid & 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 rmw_dds_common + +namespace rosidl_generator_traits +{ + +[[deprecated("use rmw_dds_common::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rmw_dds_common::msg::Gid & msg, + std::ostream & out, size_t indentation = 0) +{ + rmw_dds_common::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rmw_dds_common::msg::to_yaml() instead")]] +inline std::string to_yaml(const rmw_dds_common::msg::Gid & msg) +{ + return rmw_dds_common::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rmw_dds_common::msg::Gid"; +} + +template<> +inline const char * name() +{ + return "rmw_dds_common/msg/Gid"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RMW_DDS_COMMON__MSG__DETAIL__GID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.c new file mode 100644 index 000000000..772b4186c --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.c @@ -0,0 +1,128 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rmw_dds_common:msg/Gid.idl +// generated code does not contain a copyright notice + +#include +#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" +#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/gid__functions.h" +#include "rmw_dds_common/msg/detail/gid__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_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; + rmw_dds_common__msg__Gid__init(message_memory); +} + +void rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_fini_function(void * message_memory) +{ + rmw_dds_common__msg__Gid__fini(message_memory); +} + +size_t rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__size_function__Gid__data( + const void * untyped_member) +{ + (void)untyped_member; + return 24; +} + +const void * rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_const_function__Gid__data( + const void * untyped_member, size_t index) +{ + const uint8_t * member = + (const uint8_t *)(untyped_member); + return &member[index]; +} + +void * rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_function__Gid__data( + void * untyped_member, size_t index) +{ + uint8_t * member = + (uint8_t *)(untyped_member); + return &member[index]; +} + +void rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__fetch_function__Gid__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_const_function__Gid__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__assign_function__Gid__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_function__Gid__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 24, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__Gid, data), // bytes offset in struct + NULL, // default value + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__size_function__Gid__data, // size() function pointer + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_const_function__Gid__data, // get_const(index) function pointer + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__get_function__Gid__data, // get(index) function pointer + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__fetch_function__Gid__data, // fetch(index, &value) function pointer + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__assign_function__Gid__data, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_members = { + "rmw_dds_common__msg", // message namespace + "Gid", // message name + 1, // number of fields + sizeof(rmw_dds_common__msg__Gid), + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_member_array, // message members + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_init_function, // function to initialize message memory (memory has to be allocated) + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_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 rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle = { + 0, + &rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)() { + if (!rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle.typesupport_identifier) { + rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rmw_dds_common__msg__Gid__rosidl_typesupport_introspection_c__Gid_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.cpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.cpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.cpp index 646c1d556..509860336 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.cpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Gid__data(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Gid__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Gid__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Gid__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Gid__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember Gid_message_member_array[1] = { { "data", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Gid_message_m size_function__Gid__data, // size() function pointer get_const_function__Gid__data, // get_const(index) function pointer get_function__Gid__data, // get(index) function pointer + fetch_function__Gid__data, // fetch(index, &value) function pointer + assign_function__Gid__data, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/gid__type_support.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/gid__type_support.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__builder.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__builder.hpp similarity index 97% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__builder.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__builder.hpp index a244a6e6b..b8f1e72ac 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__builder.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__builder.hpp @@ -5,11 +5,12 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__BUILDER_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__BUILDER_HPP_ -#include "rmw_dds_common/msg/detail/node_entities_info__struct.hpp" -#include #include #include +#include "rmw_dds_common/msg/detail/node_entities_info__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rmw_dds_common { diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__functions.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__functions.c similarity index 92% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__functions.c rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__functions.c index c98803380..b4348cddd 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__functions.c +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__functions.c @@ -277,22 +277,27 @@ rmw_dds_common__msg__NodeEntitiesInfo__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rmw_dds_common__msg__NodeEntitiesInfo); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rmw_dds_common__msg__NodeEntitiesInfo * data = - (rmw_dds_common__msg__NodeEntitiesInfo *)realloc(output->data, allocation_size); + (rmw_dds_common__msg__NodeEntitiesInfo *)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 (!rmw_dds_common__msg__NodeEntitiesInfo__init(&data[i])) { - /* free currently allocated and return false */ + if (!rmw_dds_common__msg__NodeEntitiesInfo__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; ) { - rmw_dds_common__msg__NodeEntitiesInfo__fini(&data[i]); + rmw_dds_common__msg__NodeEntitiesInfo__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__functions.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__functions.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__functions.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__functions.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h index 787783044..9ab597e17 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rmw_dds_common__msg__NodeEntitiesInfo( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common size_t max_serialized_size_rmw_dds_common__msg__NodeEntitiesInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp index 400a8530f..a853dacca 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rmw_dds_common max_serialized_size_NodeEntitiesInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.h similarity index 95% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.h index e88a18bd1..9371f887a 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.h @@ -37,7 +37,7 @@ enum rmw_dds_common__msg__NodeEntitiesInfo__node_name__MAX_STRING_SIZE = 256 }; -// Struct defined in msg/NodeEntitiesInfo in the package rmw_dds_common. +/// Struct defined in msg/NodeEntitiesInfo in the package rmw_dds_common. typedef struct rmw_dds_common__msg__NodeEntitiesInfo { rosidl_runtime_c__String node_namespace; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.hpp similarity index 83% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.hpp index dcc03d412..4b6c7c1d0 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__struct.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__struct.hpp @@ -5,14 +5,15 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__STRUCT_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'reader_gid_seq' @@ -61,39 +62,39 @@ struct NodeEntitiesInfo_ // field types and members using _node_namespace_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _node_namespace_type node_namespace; using _node_name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _node_name_type node_name; using _reader_gid_seq_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _reader_gid_seq_type reader_gid_seq; using _writer_gid_seq_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _writer_gid_seq_type writer_gid_seq; // setters for named parameter idiom Type & set__node_namespace( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->node_namespace = _arg; return *this; } Type & set__node_name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->node_name = _arg; return *this; } Type & set__reader_gid_seq( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->reader_gid_seq = _arg; return *this; } Type & set__writer_gid_seq( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->writer_gid_seq = _arg; return *this; diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__traits.hpp new file mode 100644 index 000000000..006b5ee7d --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__traits.hpp @@ -0,0 +1,205 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rmw_dds_common:msg/NodeEntitiesInfo.idl +// generated code does not contain a copyright notice + +#ifndef RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ +#define RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rmw_dds_common/msg/detail/node_entities_info__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'reader_gid_seq' +// Member 'writer_gid_seq' +#include "rmw_dds_common/msg/detail/gid__traits.hpp" + +namespace rmw_dds_common +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const NodeEntitiesInfo & msg, + std::ostream & out) +{ + out << "{"; + // member: node_namespace + { + out << "node_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.node_namespace, out); + out << ", "; + } + + // member: node_name + { + out << "node_name: "; + rosidl_generator_traits::value_to_yaml(msg.node_name, out); + out << ", "; + } + + // member: reader_gid_seq + { + if (msg.reader_gid_seq.size() == 0) { + out << "reader_gid_seq: []"; + } else { + out << "reader_gid_seq: ["; + size_t pending_items = msg.reader_gid_seq.size(); + for (auto item : msg.reader_gid_seq) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: writer_gid_seq + { + if (msg.writer_gid_seq.size() == 0) { + out << "writer_gid_seq: []"; + } else { + out << "writer_gid_seq: ["; + size_t pending_items = msg.writer_gid_seq.size(); + for (auto item : msg.writer_gid_seq) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const NodeEntitiesInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: node_namespace + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "node_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.node_namespace, out); + out << "\n"; + } + + // member: node_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "node_name: "; + rosidl_generator_traits::value_to_yaml(msg.node_name, out); + out << "\n"; + } + + // member: reader_gid_seq + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.reader_gid_seq.size() == 0) { + out << "reader_gid_seq: []\n"; + } else { + out << "reader_gid_seq:\n"; + for (auto item : msg.reader_gid_seq) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: writer_gid_seq + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.writer_gid_seq.size() == 0) { + out << "writer_gid_seq: []\n"; + } else { + out << "writer_gid_seq:\n"; + for (auto item : msg.writer_gid_seq) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const NodeEntitiesInfo & 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 rmw_dds_common + +namespace rosidl_generator_traits +{ + +[[deprecated("use rmw_dds_common::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rmw_dds_common::msg::NodeEntitiesInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + rmw_dds_common::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rmw_dds_common::msg::to_yaml() instead")]] +inline std::string to_yaml(const rmw_dds_common::msg::NodeEntitiesInfo & msg) +{ + return rmw_dds_common::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rmw_dds_common::msg::NodeEntitiesInfo"; +} + +template<> +inline const char * name() +{ + return "rmw_dds_common/msg/NodeEntitiesInfo"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RMW_DDS_COMMON__MSG__DETAIL__NODE_ENTITIES_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.c new file mode 100644 index 000000000..84d4d2e69 --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.c @@ -0,0 +1,259 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rmw_dds_common:msg/NodeEntitiesInfo.idl +// generated code does not contain a copyright notice + +#include +#include "rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h" +#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/node_entities_info__functions.h" +#include "rmw_dds_common/msg/detail/node_entities_info__struct.h" + + +// Include directives for member types +// Member `node_namespace` +// Member `node_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `reader_gid_seq` +// Member `writer_gid_seq` +#include "rmw_dds_common/msg/gid.h" +// Member `reader_gid_seq` +// Member `writer_gid_seq` +#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_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; + rmw_dds_common__msg__NodeEntitiesInfo__init(message_memory); +} + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_fini_function(void * message_memory) +{ + rmw_dds_common__msg__NodeEntitiesInfo__fini(message_memory); +} + +size_t rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__reader_gid_seq( + const void * untyped_member) +{ + const rmw_dds_common__msg__Gid__Sequence * member = + (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return member->size; +} + +const void * rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__reader_gid_seq( + const void * untyped_member, size_t index) +{ + const rmw_dds_common__msg__Gid__Sequence * member = + (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__reader_gid_seq( + void * untyped_member, size_t index) +{ + rmw_dds_common__msg__Gid__Sequence * member = + (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__NodeEntitiesInfo__reader_gid_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rmw_dds_common__msg__Gid * item = + ((const rmw_dds_common__msg__Gid *) + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__reader_gid_seq(untyped_member, index)); + rmw_dds_common__msg__Gid * value = + (rmw_dds_common__msg__Gid *)(untyped_value); + *value = *item; +} + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__NodeEntitiesInfo__reader_gid_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + rmw_dds_common__msg__Gid * item = + ((rmw_dds_common__msg__Gid *) + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__reader_gid_seq(untyped_member, index)); + const rmw_dds_common__msg__Gid * value = + (const rmw_dds_common__msg__Gid *)(untyped_value); + *item = *value; +} + +bool rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__reader_gid_seq( + void * untyped_member, size_t size) +{ + rmw_dds_common__msg__Gid__Sequence * member = + (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + rmw_dds_common__msg__Gid__Sequence__fini(member); + return rmw_dds_common__msg__Gid__Sequence__init(member, size); +} + +size_t rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__writer_gid_seq( + const void * untyped_member) +{ + const rmw_dds_common__msg__Gid__Sequence * member = + (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return member->size; +} + +const void * rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__writer_gid_seq( + const void * untyped_member, size_t index) +{ + const rmw_dds_common__msg__Gid__Sequence * member = + (const rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__writer_gid_seq( + void * untyped_member, size_t index) +{ + rmw_dds_common__msg__Gid__Sequence * member = + (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__NodeEntitiesInfo__writer_gid_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rmw_dds_common__msg__Gid * item = + ((const rmw_dds_common__msg__Gid *) + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__writer_gid_seq(untyped_member, index)); + rmw_dds_common__msg__Gid * value = + (rmw_dds_common__msg__Gid *)(untyped_value); + *value = *item; +} + +void rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__NodeEntitiesInfo__writer_gid_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + rmw_dds_common__msg__Gid * item = + ((rmw_dds_common__msg__Gid *) + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__writer_gid_seq(untyped_member, index)); + const rmw_dds_common__msg__Gid * value = + (const rmw_dds_common__msg__Gid *)(untyped_value); + *item = *value; +} + +bool rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__writer_gid_seq( + void * untyped_member, size_t size) +{ + rmw_dds_common__msg__Gid__Sequence * member = + (rmw_dds_common__msg__Gid__Sequence *)(untyped_member); + rmw_dds_common__msg__Gid__Sequence__fini(member); + return rmw_dds_common__msg__Gid__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[4] = { + { + "node_namespace", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 256, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__NodeEntitiesInfo, node_namespace), // 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 + }, + { + "node_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 256, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__NodeEntitiesInfo, node_name), // 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 + }, + { + "reader_gid_seq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__NodeEntitiesInfo, reader_gid_seq), // bytes offset in struct + NULL, // default value + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__reader_gid_seq, // size() function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__reader_gid_seq, // get_const(index) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__reader_gid_seq, // get(index) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__NodeEntitiesInfo__reader_gid_seq, // fetch(index, &value) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__NodeEntitiesInfo__reader_gid_seq, // assign(index, value) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__reader_gid_seq // resize(index) function pointer + }, + { + "writer_gid_seq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__NodeEntitiesInfo, writer_gid_seq), // bytes offset in struct + NULL, // default value + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__size_function__NodeEntitiesInfo__writer_gid_seq, // size() function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__NodeEntitiesInfo__writer_gid_seq, // get_const(index) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__get_function__NodeEntitiesInfo__writer_gid_seq, // get(index) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__NodeEntitiesInfo__writer_gid_seq, // fetch(index, &value) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__NodeEntitiesInfo__writer_gid_seq, // assign(index, value) function pointer + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__NodeEntitiesInfo__writer_gid_seq // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_members = { + "rmw_dds_common__msg", // message namespace + "NodeEntitiesInfo", // message name + 4, // number of fields + sizeof(rmw_dds_common__msg__NodeEntitiesInfo), + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array, // message members + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_init_function, // function to initialize message memory (memory has to be allocated) + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_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 rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle = { + 0, + &rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, NodeEntitiesInfo)() { + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); + if (!rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle.typesupport_identifier) { + rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rmw_dds_common__msg__NodeEntitiesInfo__rosidl_typesupport_introspection_c__NodeEntitiesInfo_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp similarity index 78% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp index 05f3e0de6..e091966e3 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__NodeEntitiesInfo__reader_gid_seq(void * untyped_member, siz return &member[index]; } +void fetch_function__NodeEntitiesInfo__reader_gid_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__NodeEntitiesInfo__reader_gid_seq(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__NodeEntitiesInfo__reader_gid_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__NodeEntitiesInfo__reader_gid_seq(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__NodeEntitiesInfo__reader_gid_seq(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__NodeEntitiesInfo__writer_gid_seq(void * untyped_member, siz return &member[index]; } +void fetch_function__NodeEntitiesInfo__writer_gid_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__NodeEntitiesInfo__writer_gid_seq(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__NodeEntitiesInfo__writer_gid_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__NodeEntitiesInfo__writer_gid_seq(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__NodeEntitiesInfo__writer_gid_seq(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NodeEntitiesI 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NodeEntitiesI 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NodeEntitiesI size_function__NodeEntitiesInfo__reader_gid_seq, // size() function pointer get_const_function__NodeEntitiesInfo__reader_gid_seq, // get_const(index) function pointer get_function__NodeEntitiesInfo__reader_gid_seq, // get(index) function pointer + fetch_function__NodeEntitiesInfo__reader_gid_seq, // fetch(index, &value) function pointer + assign_function__NodeEntitiesInfo__reader_gid_seq, // assign(index, value) function pointer resize_function__NodeEntitiesInfo__reader_gid_seq // resize(index) function pointer }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NodeEntitiesI size_function__NodeEntitiesInfo__writer_gid_seq, // size() function pointer get_const_function__NodeEntitiesInfo__writer_gid_seq, // get_const(index) function pointer get_function__NodeEntitiesInfo__writer_gid_seq, // get(index) function pointer + fetch_function__NodeEntitiesInfo__writer_gid_seq, // fetch(index, &value) function pointer + assign_function__NodeEntitiesInfo__writer_gid_seq, // assign(index, value) function pointer resize_function__NodeEntitiesInfo__writer_gid_seq // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/node_entities_info__type_support.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/node_entities_info__type_support.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp similarity index 96% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp index d32177087..acb075cf0 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__builder.hpp @@ -5,11 +5,12 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__BUILDER_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__BUILDER_HPP_ -#include "rmw_dds_common/msg/detail/participant_entities_info__struct.hpp" -#include #include #include +#include "rmw_dds_common/msg/detail/participant_entities_info__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rmw_dds_common { diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__functions.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__functions.c similarity index 92% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__functions.c rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__functions.c index f4228cf19..ab5e41bf4 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__functions.c +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__functions.c @@ -237,22 +237,27 @@ rmw_dds_common__msg__ParticipantEntitiesInfo__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rmw_dds_common__msg__ParticipantEntitiesInfo); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rmw_dds_common__msg__ParticipantEntitiesInfo * data = - (rmw_dds_common__msg__ParticipantEntitiesInfo *)realloc(output->data, allocation_size); + (rmw_dds_common__msg__ParticipantEntitiesInfo *)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 (!rmw_dds_common__msg__ParticipantEntitiesInfo__init(&data[i])) { - /* free currently allocated and return false */ + if (!rmw_dds_common__msg__ParticipantEntitiesInfo__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; ) { - rmw_dds_common__msg__ParticipantEntitiesInfo__fini(&data[i]); + rmw_dds_common__msg__ParticipantEntitiesInfo__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__functions.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__functions.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__functions.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__functions.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h index 21bf736a4..383fb6dad 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rmw_dds_common__msg__ParticipantEntitiesInfo( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common size_t max_serialized_size_rmw_dds_common__msg__ParticipantEntitiesInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rmw_dds_common diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp index 9918b4b89..115d5d7fa 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rmw_dds_common max_serialized_size_ParticipantEntitiesInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.h similarity index 94% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.h index bb129d370..c1a3ad225 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.h +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.h @@ -23,7 +23,7 @@ extern "C" // Member 'node_entities_info_seq' #include "rmw_dds_common/msg/detail/node_entities_info__struct.h" -// Struct defined in msg/ParticipantEntitiesInfo in the package rmw_dds_common. +/// Struct defined in msg/ParticipantEntitiesInfo in the package rmw_dds_common. typedef struct rmw_dds_common__msg__ParticipantEntitiesInfo { rmw_dds_common__msg__Gid gid; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp similarity index 91% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp index 09aa0d036..99093c530 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__struct.hpp @@ -5,14 +5,15 @@ #ifndef RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__STRUCT_HPP_ #define RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'gid' @@ -55,7 +56,7 @@ struct ParticipantEntitiesInfo_ rmw_dds_common::msg::Gid_; _gid_type gid; using _node_entities_info_seq_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _node_entities_info_seq_type node_entities_info_seq; // setters for named parameter idiom @@ -66,7 +67,7 @@ struct ParticipantEntitiesInfo_ return *this; } Type & set__node_entities_info_seq( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->node_entities_info_seq = _arg; return *this; diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp new file mode 100644 index 000000000..12ce85cd5 --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__traits.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rmw_dds_common:msg/ParticipantEntitiesInfo.idl +// generated code does not contain a copyright notice + +#ifndef RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ +#define RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rmw_dds_common/msg/detail/participant_entities_info__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'gid' +#include "rmw_dds_common/msg/detail/gid__traits.hpp" +// Member 'node_entities_info_seq' +#include "rmw_dds_common/msg/detail/node_entities_info__traits.hpp" + +namespace rmw_dds_common +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ParticipantEntitiesInfo & msg, + std::ostream & out) +{ + out << "{"; + // member: gid + { + out << "gid: "; + to_flow_style_yaml(msg.gid, out); + out << ", "; + } + + // member: node_entities_info_seq + { + if (msg.node_entities_info_seq.size() == 0) { + out << "node_entities_info_seq: []"; + } else { + out << "node_entities_info_seq: ["; + size_t pending_items = msg.node_entities_info_seq.size(); + for (auto item : msg.node_entities_info_seq) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ParticipantEntitiesInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: gid + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "gid:\n"; + to_block_style_yaml(msg.gid, out, indentation + 2); + } + + // member: node_entities_info_seq + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.node_entities_info_seq.size() == 0) { + out << "node_entities_info_seq: []\n"; + } else { + out << "node_entities_info_seq:\n"; + for (auto item : msg.node_entities_info_seq) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ParticipantEntitiesInfo & 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 rmw_dds_common + +namespace rosidl_generator_traits +{ + +[[deprecated("use rmw_dds_common::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rmw_dds_common::msg::ParticipantEntitiesInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + rmw_dds_common::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rmw_dds_common::msg::to_yaml() instead")]] +inline std::string to_yaml(const rmw_dds_common::msg::ParticipantEntitiesInfo & msg) +{ + return rmw_dds_common::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rmw_dds_common::msg::ParticipantEntitiesInfo"; +} + +template<> +inline const char * name() +{ + return "rmw_dds_common/msg/ParticipantEntitiesInfo"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // RMW_DDS_COMMON__MSG__DETAIL__PARTICIPANT_ENTITIES_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.c b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.c new file mode 100644 index 000000000..a994246c9 --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rmw_dds_common:msg/ParticipantEntitiesInfo.idl +// generated code does not contain a copyright notice + +#include +#include "rmw_dds_common/msg/detail/participant_entities_info__rosidl_typesupport_introspection_c.h" +#include "rmw_dds_common/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 "rmw_dds_common/msg/detail/participant_entities_info__functions.h" +#include "rmw_dds_common/msg/detail/participant_entities_info__struct.h" + + +// Include directives for member types +// Member `gid` +#include "rmw_dds_common/msg/gid.h" +// Member `gid` +#include "rmw_dds_common/msg/detail/gid__rosidl_typesupport_introspection_c.h" +// Member `node_entities_info_seq` +#include "rmw_dds_common/msg/node_entities_info.h" +// Member `node_entities_info_seq` +#include "rmw_dds_common/msg/detail/node_entities_info__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_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; + rmw_dds_common__msg__ParticipantEntitiesInfo__init(message_memory); +} + +void rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_fini_function(void * message_memory) +{ + rmw_dds_common__msg__ParticipantEntitiesInfo__fini(message_memory); +} + +size_t rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__size_function__ParticipantEntitiesInfo__node_entities_info_seq( + const void * untyped_member) +{ + const rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = + (const rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); + return member->size; +} + +const void * rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__ParticipantEntitiesInfo__node_entities_info_seq( + const void * untyped_member, size_t index) +{ + const rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = + (const rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_function__ParticipantEntitiesInfo__node_entities_info_seq( + void * untyped_member, size_t index) +{ + rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = + (rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); + return &member->data[index]; +} + +void rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__ParticipantEntitiesInfo__node_entities_info_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rmw_dds_common__msg__NodeEntitiesInfo * item = + ((const rmw_dds_common__msg__NodeEntitiesInfo *) + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__ParticipantEntitiesInfo__node_entities_info_seq(untyped_member, index)); + rmw_dds_common__msg__NodeEntitiesInfo * value = + (rmw_dds_common__msg__NodeEntitiesInfo *)(untyped_value); + *value = *item; +} + +void rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__ParticipantEntitiesInfo__node_entities_info_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + rmw_dds_common__msg__NodeEntitiesInfo * item = + ((rmw_dds_common__msg__NodeEntitiesInfo *) + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_function__ParticipantEntitiesInfo__node_entities_info_seq(untyped_member, index)); + const rmw_dds_common__msg__NodeEntitiesInfo * value = + (const rmw_dds_common__msg__NodeEntitiesInfo *)(untyped_value); + *item = *value; +} + +bool rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__ParticipantEntitiesInfo__node_entities_info_seq( + void * untyped_member, size_t size) +{ + rmw_dds_common__msg__NodeEntitiesInfo__Sequence * member = + (rmw_dds_common__msg__NodeEntitiesInfo__Sequence *)(untyped_member); + rmw_dds_common__msg__NodeEntitiesInfo__Sequence__fini(member); + return rmw_dds_common__msg__NodeEntitiesInfo__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[2] = { + { + "gid", // 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(rmw_dds_common__msg__ParticipantEntitiesInfo, gid), // 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 + }, + { + "node_entities_info_seq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(rmw_dds_common__msg__ParticipantEntitiesInfo, node_entities_info_seq), // bytes offset in struct + NULL, // default value + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__size_function__ParticipantEntitiesInfo__node_entities_info_seq, // size() function pointer + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_const_function__ParticipantEntitiesInfo__node_entities_info_seq, // get_const(index) function pointer + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__get_function__ParticipantEntitiesInfo__node_entities_info_seq, // get(index) function pointer + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__fetch_function__ParticipantEntitiesInfo__node_entities_info_seq, // fetch(index, &value) function pointer + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__assign_function__ParticipantEntitiesInfo__node_entities_info_seq, // assign(index, value) function pointer + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__resize_function__ParticipantEntitiesInfo__node_entities_info_seq // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_members = { + "rmw_dds_common__msg", // message namespace + "ParticipantEntitiesInfo", // message name + 2, // number of fields + sizeof(rmw_dds_common__msg__ParticipantEntitiesInfo), + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array, // message members + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_init_function, // function to initialize message memory (memory has to be allocated) + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_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 rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle = { + 0, + &rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rmw_dds_common +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, ParticipantEntitiesInfo)() { + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, Gid)(); + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rmw_dds_common, msg, NodeEntitiesInfo)(); + if (!rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle.typesupport_identifier) { + rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rmw_dds_common__msg__ParticipantEntitiesInfo__rosidl_typesupport_introspection_c__ParticipantEntitiesInfo_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp index f555478b7..90ac6b9a3 100644 --- a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ParticipantEntitiesInfo__node_entities_info_seq(void * unty return &member[index]; } +void fetch_function__ParticipantEntitiesInfo__node_entities_info_seq( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ParticipantEntitiesInfo__node_entities_info_seq(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ParticipantEntitiesInfo__node_entities_info_seq( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ParticipantEntitiesInfo__node_entities_info_seq(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ParticipantEntitiesInfo__node_entities_info_seq(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParticipantEn 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ParticipantEn size_function__ParticipantEntitiesInfo__node_entities_info_seq, // size() function pointer get_const_function__ParticipantEntitiesInfo__node_entities_info_seq, // get_const(index) function pointer get_function__ParticipantEntitiesInfo__node_entities_info_seq, // get(index) function pointer + fetch_function__ParticipantEntitiesInfo__node_entities_info_seq, // fetch(index, &value) function pointer + assign_function__ParticipantEntitiesInfo__node_entities_info_seq, // assign(index, value) function pointer resize_function__ParticipantEntitiesInfo__node_entities_info_seq // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/detail/participant_entities_info__type_support.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/detail/participant_entities_info__type_support.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/gid.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/gid.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/gid.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/gid.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/gid.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/gid.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/gid.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/gid.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/node_entities_info.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/node_entities_info.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/node_entities_info.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/node_entities_info.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/node_entities_info.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/node_entities_info.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/node_entities_info.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/node_entities_info.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/participant_entities_info.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/participant_entities_info.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/participant_entities_info.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/participant_entities_info.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/participant_entities_info.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/participant_entities_info.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/participant_entities_info.hpp rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/participant_entities_info.hpp diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/qos.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/qos.hpp new file mode 100644 index 000000000..1dbde885c --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/qos.hpp @@ -0,0 +1,61 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_DDS_COMMON__QOS_HPP_ +#define RMW_DDS_COMMON__QOS_HPP_ + +#include "rmw/qos_profiles.h" +#include "rmw/types.h" + +#include "rmw_dds_common/visibility_control.h" + +namespace rmw_dds_common +{ + +/// Check if two QoS profiles are compatible +/** + * Two QoS profiles are compatible if a publisher and subcription + * using the QoS policies can communicate with each other. + * + * This implements the rmw API \ref rmw_qos_profile_check_compatible(). + * See \ref rmw_qos_profile_check_compatible() for more information. + * + * \param[in] publisher_qos: The QoS profile used for a publisher. + * \param[in] subscription_qos: The QoS profile used for a subscription. + * \param[out] compatibility: `RMW_QOS_COMPATIBILITY_OK` if the QoS profiles are compatible, or + * `RMW_QOS_COMPATIBILITY_WARNING` if the QoS profiles might be compatible, or + * `RMW_QOS_COMPATIBILITY_ERROR` if the QoS profiles are not compatible. + * \param[out] reason: A detailed reason for a QoS incompatibility or potential incompatibility. + * Must be pre-allocated by the caller. + * This parameter is optional and may be set to `nullptr` if the reason information is not + * desired. + * \param[in] reason_size: Size of the string buffer `reason`, if one is provided. + * If `reason` is `nullptr`, then this parameter must be zero. + * \return `RMW_RET_OK` if the check was successful, or + * \return `RMW_RET_INVALID_ARGUMENT` if `compatiblity` is `nullptr`, or + * \return `RMW_RET_INVALID_ARGUMENT` if `reason` is `nullptr` and `reason_size` is not zero, or + * \return `RMW_RET_ERROR` if there is an unexpected error. + */ +RMW_DDS_COMMON_PUBLIC +rmw_ret_t +qos_profile_check_compatible( + const rmw_qos_profile_t publisher_qos, + const rmw_qos_profile_t subscription_qos, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size); + +} // namespace rmw_dds_common + +#endif // RMW_DDS_COMMON__QOS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/security.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/security.hpp new file mode 100644 index 000000000..3b9f0f5aa --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/security.hpp @@ -0,0 +1,57 @@ +// Copyright 2021 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_DDS_COMMON__SECURITY_HPP_ +#define RMW_DDS_COMMON__SECURITY_HPP_ + +#include +#include + +#include "rmw_dds_common/visibility_control.h" + +namespace rmw_dds_common +{ + +/// Get the set of security files in a security enclave. +/** + * This function will look through the passed in 'secure root' + * for a set of required filenames that must be in the enclave. + * If any of the required filenames are missing, the 'result' + * will be empty and the function will return false. + * If all of the required filenames are present, then this function + * will fill in the 'result' map with a key-value pair of + * friendy name -> filename. If the prefix is not empty, then + * the prefix will be applied to the filename. + * + * The friendly names that this function will currently fill in are: + * IDENTITY_CA + * CERTIFICATE + * PRIVATE_KEY + * PERMISSIONS_CA + * GOVERNANCE + * PERMISSIONS + * + * \param[in] prefix An optional prefix to apply to the filenames when storing them. + * \param[in] secure_root The path to the security enclave to look at. + * \param[out] result The map where the friendly name -> filename pairs are stored. + * \return `true` if all required files exist in the security enclave, `false` otherwise. + */ +RMW_DDS_COMMON_PUBLIC +bool get_security_files( + const std::string & prefix, const std::string & secure_root, + std::unordered_map & result); + +} // namespace rmw_dds_common + +#endif // RMW_DDS_COMMON__SECURITY_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/time_utils.hpp b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/time_utils.hpp new file mode 100644 index 000000000..ef6329c0f --- /dev/null +++ b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/time_utils.hpp @@ -0,0 +1,48 @@ +// Copyright 2020 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_DDS_COMMON__TIME_UTILS_HPP_ +#define RMW_DDS_COMMON__TIME_UTILS_HPP_ + +#include "rmw/types.h" + +#include "rmw_dds_common/visibility_control.h" + +namespace rmw_dds_common +{ + +/// Check if an rmw_time_t's 64-bit seconds/nanoseconds values exceed +/// 32-bit limits and adjust accordingly +/* + * The DDS standard specifies the Time_t and Duration_t types with + * "long sec" and "unsigned long nanosec", and the IDL to C++11 mapping + * states that the C++ types for long and unsigned long are mapped + * to int32_t and uint32_t, respectively. So, the 64-bit seconds and + * nanoseconds values will be truncated to 32-bits when converted + * from rmw_time_t to either a DDS Duration_t or Time_t. This function + * limits the seconds value to the signed 32-bit maximum and attempts + * to move the excess seconds to the nanoseconds field. If the resulting + * nanoseconds value is too large for unsigned 32-bits it saturates + * and issues a warning. + * + * \param[in] time to convert + * \return converted time value + */ +RMW_DDS_COMMON_PUBLIC +rmw_time_t +clamp_rmw_time_to_dds_time(const rmw_time_t & time); + +} // namespace rmw_dds_common + +#endif // RMW_DDS_COMMON__TIME_UTILS_HPP_ diff --git a/ThirdParty/ros/include/rmw_dds_common/visibility_control.h b/ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_dds_common/visibility_control.h rename to ThirdParty/ros/include/rmw_dds_common/rmw_dds_common/visibility_control.h diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/TypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/TypeSupport.hpp deleted file mode 100644 index 5c9964a5a..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/TypeSupport.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ -#define RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ - -#include -#include - -#include - -#include -#include -#include -#include - -#include "rosidl_typesupport_fastrtps_cpp/message_type_support.h" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" - -namespace rmw_fastrtps_cpp -{ - -class TypeSupport : public rmw_fastrtps_shared_cpp::TypeSupport -{ -public: - size_t getEstimatedSerializedSize(const void * ros_message, const void * impl) const override; - - bool serializeROSmessage( - const void * ros_message, eprosima::fastcdr::Cdr & ser, const void * impl) const override; - - bool deserializeROSmessage( - eprosima::fastcdr::Cdr & deser, void * ros_message, const void * impl) const override; - -protected: - TypeSupport(); - - void set_members(const message_type_support_callbacks_t * members); - -private: - const message_type_support_callbacks_t * members_; - bool has_data_; -}; - -} // namespace rmw_fastrtps_cpp - -#endif // RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_client.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/get_client.hpp deleted file mode 100644 index 6d6c1377a..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_client.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ -#define RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ - -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/subscriber/Subscriber.h" -#include "rmw/rmw.h" -#include "rmw_fastrtps_cpp/visibility_control.h" - -namespace rmw_fastrtps_cpp -{ - -/// Return a native FastRTPS publisher handle for the request. -/** - * The function returns `NULL` when either the client handle is `NULL` or - * when the client handle is from a different rmw implementation. - * - * \return native FastRTPS publisher handle if successful, otherwise `NULL` - */ -RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Publisher * -get_request_publisher(rmw_client_t * client); - -/// Return a native FastRTPS subscriber handle for the response. -/** - * The function returns `NULL` when either the client handle is `NULL` or - * when the client handle is from a different rmw implementation. - * - * \return native FastRTPS subscriber handle if successful, otherwise `NULL` - */ -RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Subscriber * -get_response_subscriber(rmw_client_t * client); - -} // namespace rmw_fastrtps_cpp - -#endif // RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_participant.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/get_participant.hpp deleted file mode 100644 index 6b287ce98..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_participant.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ -#define RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ - -#include "fastrtps/participant/Participant.h" -#include "rmw/rmw.h" -#include "rmw_fastrtps_cpp/visibility_control.h" - -namespace rmw_fastrtps_cpp -{ - -/// Return a native FastRTPS participant handle. -/** - * The function returns `NULL` when either the node handle is `NULL` or when the - * node handle is from a different rmw implementation. - * - * \return native FastRTPS participant handle if successful, otherwise `NULL` - */ -RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Participant * -get_participant(rmw_node_t * node); - -} // namespace rmw_fastrtps_cpp - -#endif // RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_service.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/get_service.hpp deleted file mode 100644 index 645da26e4..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_service.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2017 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ -#define RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ - -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/subscriber/Subscriber.h" -#include "rmw/rmw.h" -#include "rmw_fastrtps_cpp/visibility_control.h" - -namespace rmw_fastrtps_cpp -{ - -/// Return a native FastRTPS subscriber handle for the request. -/** - * The function returns `NULL` when either the service handle is `NULL` or - * when the service handle is from a different rmw implementation. - * - * \return native FastRTPS subscriber handle if successful, otherwise `NULL` - */ -RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Subscriber * -get_request_subscriber(rmw_service_t * service); - -/// Return a native FastRTPS publisher handle for the response. -/** - * The function returns `NULL` when either the service handle is `NULL` or - * when the service handle is from a different rmw implementation. - * - * \return native FastRTPS publisher handle if successful, otherwise `NULL` - */ -RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Publisher * -get_response_publisher(rmw_service_t * service); - -} // namespace rmw_fastrtps_cpp - -#endif // RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/MessageTypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/MessageTypeSupport.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/MessageTypeSupport.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/MessageTypeSupport.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/ServiceTypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/ServiceTypeSupport.hpp similarity index 96% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/ServiceTypeSupport.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/ServiceTypeSupport.hpp index 49ec62900..7284bd4f5 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/ServiceTypeSupport.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/ServiceTypeSupport.hpp @@ -15,10 +15,11 @@ #ifndef RMW_FASTRTPS_CPP__SERVICETYPESUPPORT_HPP_ #define RMW_FASTRTPS_CPP__SERVICETYPESUPPORT_HPP_ -#include -#include #include +#include "fastcdr/FastBuffer.h" +#include "fastcdr/Cdr.h" + #include "rosidl_typesupport_fastrtps_cpp/message_type_support.h" #include "rosidl_typesupport_fastrtps_cpp/service_type_support.h" diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/TypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/TypeSupport.hpp new file mode 100644 index 000000000..1a9a52bf7 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/TypeSupport.hpp @@ -0,0 +1,57 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ +#define RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ + +#include +#include + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "fastcdr/Cdr.h" +#include "fastcdr/FastBuffer.h" + +#include "rosidl_typesupport_fastrtps_cpp/message_type_support.h" + +#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" + +namespace rmw_fastrtps_cpp +{ + +class TypeSupport : public rmw_fastrtps_shared_cpp::TypeSupport +{ +public: + size_t getEstimatedSerializedSize(const void * ros_message, const void * impl) const override; + + bool serializeROSmessage( + const void * ros_message, eprosima::fastcdr::Cdr & ser, const void * impl) const override; + + bool deserializeROSmessage( + eprosima::fastcdr::Cdr & deser, void * ros_message, const void * impl) const override; + +protected: + TypeSupport(); + + void set_members(const message_type_support_callbacks_t * members); + +private: + const message_type_support_callbacks_t * members_; + bool has_data_; +}; + +} // namespace rmw_fastrtps_cpp + +#endif // RMW_FASTRTPS_CPP__TYPESUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_client.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_client.hpp new file mode 100644 index 000000000..51af2dd9b --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_client.hpp @@ -0,0 +1,51 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ +#define RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ + +#include "fastdds/dds/publisher/DataWriter.hpp" +#include "fastdds/dds/subscriber/DataReader.hpp" + +#include "rmw/rmw.h" +#include "rmw_fastrtps_cpp/visibility_control.h" + +namespace rmw_fastrtps_cpp +{ + +/// Return a native Fast DDS DataWriter handle for the request. +/** + * The function returns `NULL` when either the client handle is `NULL` or + * when the client handle is from a different rmw implementation. + * + * \return native Fast DDS DataWriter handle if successful, otherwise `NULL` + */ +RMW_FASTRTPS_CPP_PUBLIC +eprosima::fastdds::dds::DataWriter * +get_request_datawriter(rmw_client_t * client); + +/// Return a native Fast DDS DataReader handle for the response. +/** + * The function returns `NULL` when either the client handle is `NULL` or + * when the client handle is from a different rmw implementation. + * + * \return native Fast DDS DataReader handle if successful, otherwise `NULL` + */ +RMW_FASTRTPS_CPP_PUBLIC +eprosima::fastdds::dds::DataReader * +get_response_datareader(rmw_client_t * client); + +} // namespace rmw_fastrtps_cpp + +#endif // RMW_FASTRTPS_CPP__GET_CLIENT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_participant.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_participant.hpp new file mode 100644 index 000000000..cbd76bfbc --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_participant.hpp @@ -0,0 +1,39 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ +#define RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ + +#include "fastdds/dds/domain/DomainParticipant.hpp" + +#include "rmw/rmw.h" +#include "rmw_fastrtps_cpp/visibility_control.h" + +namespace rmw_fastrtps_cpp +{ + +/// Return a native Fast DDS DomainParticipant handle. +/** + * This function returns `NULL` when either the node handle is `NULL` or when the + * node handle is from a different rmw implementation. + * + * \return native Fast DDS DomainParticipant handle if successful, otherwise `NULL` + */ +RMW_FASTRTPS_CPP_PUBLIC +eprosima::fastdds::dds::DomainParticipant * +get_domain_participant(rmw_node_t * node); + +} // namespace rmw_fastrtps_cpp + +#endif // RMW_FASTRTPS_CPP__GET_PARTICIPANT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_publisher.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_publisher.hpp similarity index 80% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/get_publisher.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_publisher.hpp index 0f8c94c98..3f09df5ed 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_publisher.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_publisher.hpp @@ -15,23 +15,24 @@ #ifndef RMW_FASTRTPS_CPP__GET_PUBLISHER_HPP_ #define RMW_FASTRTPS_CPP__GET_PUBLISHER_HPP_ -#include "fastrtps/publisher/Publisher.h" +#include "fastdds/dds/publisher/DataWriter.hpp" + #include "rmw/rmw.h" #include "rmw_fastrtps_cpp/visibility_control.h" namespace rmw_fastrtps_cpp { -/// Return a native FastRTPS publisher handle. +/// Return a native Fast DDS DataWriter handle. /** * The function returns `NULL` when either the publisher handle is `NULL` or * when the publisher handle is from a different rmw implementation. * - * \return native FastRTPS publisher handle if successful, otherwise `NULL` + * \return native Fast DDS DataWriter handle if successful, otherwise `NULL` */ RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Publisher * -get_publisher(rmw_publisher_t * publisher); +eprosima::fastdds::dds::DataWriter * +get_datawriter(rmw_publisher_t * publisher); } // namespace rmw_fastrtps_cpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_service.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_service.hpp new file mode 100644 index 000000000..edcc2c19b --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_service.hpp @@ -0,0 +1,51 @@ +// Copyright 2017 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ +#define RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ + +#include "fastdds/dds/publisher/DataWriter.hpp" +#include "fastdds/dds/subscriber/DataReader.hpp" + +#include "rmw/rmw.h" +#include "rmw_fastrtps_cpp/visibility_control.h" + +namespace rmw_fastrtps_cpp +{ + +/// Return a native Fast DDS DataReader handle for the request. +/** + * The function returns `NULL` when either the service handle is `NULL` or + * when the service handle is from a different rmw implementation. + * + * \return native Fast DDS DataReader handle if successful, otherwise `NULL` + */ +RMW_FASTRTPS_CPP_PUBLIC +eprosima::fastdds::dds::DataReader * +get_request_datareader(rmw_service_t * service); + +/// Return a native Fast DDS DataWriter handle for the response. +/** + * The function returns `NULL` when either the service handle is `NULL` or + * when the service handle is from a different rmw implementation. + * + * \return native Fast DDS DataWriter handle if successful, otherwise `NULL` + */ +RMW_FASTRTPS_CPP_PUBLIC +eprosima::fastdds::dds::DataWriter * +get_response_datawriter(rmw_service_t * service); + +} // namespace rmw_fastrtps_cpp + +#endif // RMW_FASTRTPS_CPP__GET_SERVICE_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_subscriber.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_subscriber.hpp similarity index 81% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/get_subscriber.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_subscriber.hpp index 403a176f4..82449bf99 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/get_subscriber.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/get_subscriber.hpp @@ -15,23 +15,24 @@ #ifndef RMW_FASTRTPS_CPP__GET_SUBSCRIBER_HPP_ #define RMW_FASTRTPS_CPP__GET_SUBSCRIBER_HPP_ -#include "fastrtps/subscriber/Subscriber.h" +#include "fastdds/dds/subscriber/DataReader.hpp" + #include "rmw/rmw.h" #include "rmw_fastrtps_cpp/visibility_control.h" namespace rmw_fastrtps_cpp { -/// Return a native FastRTPS subscriber handle. +/// Return a native Fast DDS DataReader handle. /** * The function returns `NULL` when either the subscription handle is `NULL` or * when the subscription handle is from a different rmw implementation. * - * \return native FastRTPS subscriber handle if successful, otherwise `NULL` + * \return native Fast DDS DataReader handle if successful, otherwise `NULL` */ RMW_FASTRTPS_CPP_PUBLIC -eprosima::fastrtps::Subscriber * -get_subscriber(rmw_subscription_t * subscription); +eprosima::fastdds::dds::DataReader * +get_datareader(rmw_subscription_t * subscription); } // namespace rmw_fastrtps_cpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/identifier.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/identifier.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/identifier.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/identifier.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/init_rmw_context_impl.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/init_rmw_context_impl.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/init_rmw_context_impl.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/init_rmw_context_impl.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/publisher.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/publisher.hpp similarity index 99% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/publisher.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/publisher.hpp index e59b3ccd1..037930f55 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/publisher.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/publisher.hpp @@ -30,7 +30,6 @@ create_publisher( const rmw_publisher_options_t * publisher_options, bool keyed, bool create_publisher_listener); - } // namespace rmw_fastrtps_cpp #endif // RMW_FASTRTPS_CPP__PUBLISHER_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/serialization_format.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/serialization_format.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/serialization_format.hpp rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/serialization_format.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/subscription.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/subscription.hpp new file mode 100644 index 000000000..32370bc62 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/subscription.hpp @@ -0,0 +1,36 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ +#define RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ + +#include "rmw/rmw.h" +#include "rmw/subscription_options.h" + +#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" + +namespace rmw_fastrtps_cpp +{ + +rmw_subscription_t * +create_subscription( + const CustomParticipantInfo * participant_info, + const rosidl_message_type_support_t * type_supports, + const char * topic_name, + const rmw_qos_profile_t * qos_policies, + const rmw_subscription_options_t * subscription_options, + bool keyed); +} // namespace rmw_fastrtps_cpp + +#endif // RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/visibility_control.h b/ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_cpp/visibility_control.h rename to ThirdParty/ros/include/rmw_fastrtps_cpp/rmw_fastrtps_cpp/visibility_control.h diff --git a/ThirdParty/ros/include/rmw_fastrtps_cpp/subscription.hpp b/ThirdParty/ros/include/rmw_fastrtps_cpp/subscription.hpp deleted file mode 100644 index a35d03f15..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_cpp/subscription.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ -#define RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ - -#include "rmw/rmw.h" -#include "rmw/subscription_options.h" - -#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" - -namespace rmw_fastrtps_cpp -{ - -rmw_subscription_t * -create_subscription( - const CustomParticipantInfo * participant_info, - const rosidl_message_type_support_t * type_supports, - const char * topic_name, - const rmw_qos_profile_t * qos_policies, - const rmw_subscription_options_t * subscription_options, - bool keyed, - bool create_subscription_listener); - -} // namespace rmw_fastrtps_cpp - -#endif // RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/TypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/TypeSupport.hpp deleted file mode 100644 index 4515ba465..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/TypeSupport.hpp +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ - -#include -#include - -#include -#include -#include -#include - -#include "rcutils/logging_macros.h" - -#include "./visibility_control.h" - -namespace rmw_fastrtps_shared_cpp -{ - -// Publishers write method will receive a pointer to this struct -struct SerializedData -{ - bool is_cdr_buffer; // Whether next field is a pointer to a Cdr or to a plain ros message - void * data; - const void * impl; // RMW implementation specific data -}; - -class TypeSupport : public eprosima::fastrtps::TopicDataType -{ -public: - virtual size_t getEstimatedSerializedSize(const void * ros_message, const void * impl) const = 0; - - virtual bool serializeROSmessage( - const void * ros_message, eprosima::fastcdr::Cdr & ser, const void * impl) const = 0; - - virtual bool deserializeROSmessage( - eprosima::fastcdr::Cdr & deser, void * ros_message, const void * impl) const = 0; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool getKey( - void * data, - eprosima::fastrtps::rtps::InstanceHandle_t * ihandle, - bool force_md5 = false) override - { - (void)data; (void)ihandle; (void)force_md5; - return false; - } - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool serialize(void * data, eprosima::fastrtps::rtps::SerializedPayload_t * payload) override; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool deserialize(eprosima::fastrtps::rtps::SerializedPayload_t * payload, void * data) override; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - std::function getSerializedSizeProvider(void * data) override; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void * createData() override; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void deleteData(void * data) override; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - virtual ~TypeSupport() {} - -protected: - RMW_FASTRTPS_SHARED_CPP_PUBLIC - TypeSupport(); - - bool max_size_bound_; -}; - -inline void -_unregister_type( - eprosima::fastrtps::Participant * participant, - TypeSupport * typed_typesupport) -{ - if (eprosima::fastrtps::Domain::unregisterType(participant, typed_typesupport->getName())) { - delete typed_typesupport; - } -} - -} // namespace rmw_fastrtps_shared_cpp - -#endif // RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_client_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_client_info.hpp deleted file mode 100644 index 0ba4f9342..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_client_info.hpp +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ - -#include -#include -#include -#include -#include -#include -#include - -#include "fastcdr/FastBuffer.h" - -#include "fastrtps/subscriber/SampleInfo.h" -#include "fastrtps/subscriber/Subscriber.h" -#include "fastrtps/subscriber/SubscriberListener.h" -#include "fastrtps/participant/Participant.h" -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/publisher/PublisherListener.h" - -#include "rcpputils/thread_safety_annotations.hpp" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" - -class ClientListener; -class ClientPubListener; - -typedef struct CustomClientInfo -{ - rmw_fastrtps_shared_cpp::TypeSupport * request_type_support_{nullptr}; - const void * request_type_support_impl_{nullptr}; - rmw_fastrtps_shared_cpp::TypeSupport * response_type_support_{nullptr}; - const void * response_type_support_impl_{nullptr}; - eprosima::fastrtps::Subscriber * response_subscriber_{nullptr}; - eprosima::fastrtps::Publisher * request_publisher_{nullptr}; - ClientListener * listener_{nullptr}; - eprosima::fastrtps::rtps::GUID_t writer_guid_; - eprosima::fastrtps::rtps::GUID_t reader_guid_; - eprosima::fastrtps::Participant * participant_{nullptr}; - const char * typesupport_identifier_{nullptr}; - ClientPubListener * pub_listener_{nullptr}; - std::atomic_size_t response_subscriber_matched_count_; - std::atomic_size_t request_publisher_matched_count_; -} CustomClientInfo; - -typedef struct CustomClientResponse -{ - eprosima::fastrtps::rtps::SampleIdentity sample_identity_; - std::unique_ptr buffer_; - eprosima::fastrtps::SampleInfo_t sample_info_ {}; -} CustomClientResponse; - -class ClientListener : public eprosima::fastrtps::SubscriberListener -{ -public: - explicit ClientListener(CustomClientInfo * info) - : info_(info), list_has_data_(false), - conditionMutex_(nullptr), conditionVariable_(nullptr) {} - - - void - onNewDataMessage(eprosima::fastrtps::Subscriber * sub) - { - assert(sub); - - CustomClientResponse response; - // Todo(sloretz) eliminate heap allocation pending eprosima/Fast-CDR#19 - response.buffer_.reset(new eprosima::fastcdr::FastBuffer()); - - rmw_fastrtps_shared_cpp::SerializedData data; - data.is_cdr_buffer = true; - data.data = response.buffer_.get(); - data.impl = nullptr; // not used when is_cdr_buffer is true - if (sub->takeNextData(&data, &response.sample_info_)) { - if (eprosima::fastrtps::rtps::ALIVE == response.sample_info_.sampleKind) { - response.sample_identity_ = response.sample_info_.related_sample_identity; - - if (response.sample_identity_.writer_guid() == info_->reader_guid_ || - response.sample_identity_.writer_guid() == info_->writer_guid_) - { - std::lock_guard lock(internalMutex_); - - if (conditionMutex_ != nullptr) { - std::unique_lock clock(*conditionMutex_); - list.emplace_back(std::move(response)); - // the change to list_has_data_ needs to be mutually exclusive with - // rmw_wait() which checks hasData() and decides if wait() needs to - // be called - list_has_data_.store(true); - clock.unlock(); - conditionVariable_->notify_one(); - } else { - list.emplace_back(std::move(response)); - list_has_data_.store(true); - } - } - } - } - } - - bool - getResponse(CustomClientResponse & response) - { - std::lock_guard lock(internalMutex_); - - if (conditionMutex_ != nullptr) { - std::unique_lock clock(*conditionMutex_); - return popResponse(response); - } - return popResponse(response); - } - - void - attachCondition(std::mutex * conditionMutex, std::condition_variable * conditionVariable) - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = conditionMutex; - conditionVariable_ = conditionVariable; - } - - void - detachCondition() - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = nullptr; - conditionVariable_ = nullptr; - } - - bool - hasData() - { - return list_has_data_.load(); - } - - void onSubscriptionMatched( - eprosima::fastrtps::Subscriber * sub, - eprosima::fastrtps::rtps::MatchingInfo & matchingInfo) - { - (void)sub; - if (info_ == nullptr) { - return; - } - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == matchingInfo.status) { - publishers_.insert(matchingInfo.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == matchingInfo.status) { - publishers_.erase(matchingInfo.remoteEndpointGuid); - } else { - return; - } - info_->response_subscriber_matched_count_.store(publishers_.size()); - } - -private: - bool popResponse(CustomClientResponse & response) RCPPUTILS_TSA_REQUIRES(internalMutex_) - { - if (!list.empty()) { - response = std::move(list.front()); - list.pop_front(); - list_has_data_.store(!list.empty()); - return true; - } - return false; - }; - - CustomClientInfo * info_; - std::mutex internalMutex_; - std::list list RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::atomic_bool list_has_data_; - std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::set publishers_; -}; - -class ClientPubListener : public eprosima::fastrtps::PublisherListener -{ -public: - explicit ClientPubListener(CustomClientInfo * info) - : info_(info) - { - } - - void onPublicationMatched( - eprosima::fastrtps::Publisher * pub, - eprosima::fastrtps::rtps::MatchingInfo & matchingInfo) - { - (void) pub; - if (info_ == nullptr) { - return; - } - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == matchingInfo.status) { - subscriptions_.insert(matchingInfo.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == matchingInfo.status) { - subscriptions_.erase(matchingInfo.remoteEndpointGuid); - } else { - return; - } - info_->request_publisher_matched_count_.store(subscriptions_.size()); - } - -private: - CustomClientInfo * info_; - std::set subscriptions_; -}; - -#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_event_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_event_info.hpp deleted file mode 100644 index d3139afe2..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_event_info.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ - -#include -#include -#include -#include -#include -#include - -#include "fastcdr/FastBuffer.h" - -#include "fastrtps/subscriber/SampleInfo.h" -#include "fastrtps/subscriber/Subscriber.h" -#include "fastrtps/subscriber/SubscriberListener.h" -#include "fastrtps/participant/Participant.h" -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/publisher/PublisherListener.h" - -#include "rmw/event.h" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" - - -class EventListenerInterface -{ -protected: - class ConditionalScopedLock; - -public: - /// Connect a condition variable so a waiter can be notified of new data. - virtual void attachCondition( - std::mutex * conditionMutex, - std::condition_variable * conditionVariable) = 0; - - /// Unset the information from attachCondition. - virtual void detachCondition() = 0; - - /// Check if there is new data available for a specific event type. - /** - * \param event_type The event type to check on. - * \return `true` if new data is available. - */ - virtual bool hasEvent(rmw_event_type_t event_type) const = 0; - - /// Take ready data for an event type. - /** - * \param event_type The event type to get data for. - * \param event_info A preallocated event information (from rmw/types.h) to fill with data - * \return `true` if data was successfully taken. - * \return `false` if data was not available, in this case nothing was written to event_info. - */ - virtual bool takeNextEvent(rmw_event_type_t event_type, void * event_info) = 0; -}; - -class EventListenerInterface::ConditionalScopedLock -{ -public: - ConditionalScopedLock( - std::mutex * mutex, - std::condition_variable * condition_variable = nullptr) - : mutex_(mutex), cv_(condition_variable) - { - if (nullptr != mutex_) { - mutex_->lock(); - } - } - - ~ConditionalScopedLock() - { - if (nullptr != mutex_) { - mutex_->unlock(); - if (nullptr != cv_) { - cv_->notify_all(); - } - } - } - -private: - std::mutex * mutex_; - std::condition_variable * cv_; -}; - -struct CustomEventInfo -{ - virtual EventListenerInterface * getListener() const = 0; -}; - -#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp deleted file mode 100644 index 5d626a2ee..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ - -#include -#include -#include -#include - -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/publisher/PublisherListener.h" - -#include "rcpputils/thread_safety_annotations.hpp" -#include "rmw/rmw.h" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" -#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp" - - -class PubListener; - -typedef struct CustomPublisherInfo : public CustomEventInfo -{ - virtual ~CustomPublisherInfo() = default; - - eprosima::fastrtps::Publisher * publisher_{nullptr}; - PubListener * listener_{nullptr}; - rmw_fastrtps_shared_cpp::TypeSupport * type_support_{nullptr}; - const void * type_support_impl_{nullptr}; - rmw_gid_t publisher_gid{}; - const char * typesupport_identifier_{nullptr}; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - EventListenerInterface * - getListener() const final; -} CustomPublisherInfo; - -class PubListener : public EventListenerInterface, public eprosima::fastrtps::PublisherListener -{ -public: - explicit PubListener(CustomPublisherInfo * info) - : deadline_changes_(false), - liveliness_changes_(false), - conditionMutex_(nullptr), - conditionVariable_(nullptr) - { - (void) info; - } - - // PublisherListener implementation - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void - onPublicationMatched( - eprosima::fastrtps::Publisher * pub, eprosima::fastrtps::rtps::MatchingInfo & info) final - { - (void) pub; - std::lock_guard lock(internalMutex_); - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == info.status) { - subscriptions_.insert(info.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == info.status) { - subscriptions_.erase(info.remoteEndpointGuid); - } - } - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void - on_offered_deadline_missed( - eprosima::fastrtps::Publisher * publisher, - const eprosima::fastrtps::OfferedDeadlineMissedStatus & status) final; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void - on_liveliness_lost( - eprosima::fastrtps::Publisher * publisher, - const eprosima::fastrtps::LivelinessLostStatus & status) final; - - - // EventListenerInterface implementation - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool - hasEvent(rmw_event_type_t event_type) const final; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool - takeNextEvent(rmw_event_type_t event_type, void * event_info) final; - - // PubListener API - size_t subscriptionCount() - { - std::lock_guard lock(internalMutex_); - return subscriptions_.size(); - } - - void - attachCondition(std::mutex * conditionMutex, std::condition_variable * conditionVariable) - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = conditionMutex; - conditionVariable_ = conditionVariable; - } - - void - detachCondition() - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = nullptr; - conditionVariable_ = nullptr; - } - -private: - mutable std::mutex internalMutex_; - - std::set subscriptions_ - RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::atomic_bool deadline_changes_; - eprosima::fastrtps::OfferedDeadlineMissedStatus offered_deadline_missed_status_ - RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::atomic_bool liveliness_changes_; - eprosima::fastrtps::LivelinessLostStatus liveliness_lost_status_ - RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); -}; - -#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_service_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_service_info.hpp deleted file mode 100644 index 6287aa125..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_service_info.hpp +++ /dev/null @@ -1,342 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ - -#include -#include -#include -#include -#include -#include - -#include "fastcdr/FastBuffer.h" - -#include "fastrtps/participant/Participant.h" -#include "fastrtps/publisher/Publisher.h" -#include "fastrtps/publisher/PublisherListener.h" -#include "fastrtps/subscriber/Subscriber.h" -#include "fastrtps/subscriber/SubscriberListener.h" -#include "fastrtps/subscriber/SampleInfo.h" - -#include "rcpputils/thread_safety_annotations.hpp" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" -#include "rmw_fastrtps_shared_cpp/guid_utils.hpp" - -class ServiceListener; -class ServicePubListener; -class PatchedServicePubListener; - -enum class client_present_t -{ - FAILURE, // an error occurred when checking - MAYBE, // reader not matched, writer still present - YES, // reader matched - GONE // neither reader nor writer -}; - -typedef struct CustomServiceInfo -{ - rmw_fastrtps_shared_cpp::TypeSupport * request_type_support_{nullptr}; - const void * request_type_support_impl_{nullptr}; - rmw_fastrtps_shared_cpp::TypeSupport * response_type_support_{nullptr}; - const void * response_type_support_impl_{nullptr}; - eprosima::fastrtps::Subscriber * request_subscriber_{nullptr}; - eprosima::fastrtps::Publisher * response_publisher_{nullptr}; - ServiceListener * listener_{nullptr}; - ServicePubListener * pub_listener_{nullptr}; - eprosima::fastrtps::Participant * participant_{nullptr}; - const char * typesupport_identifier_{nullptr}; -} CustomServiceInfo; - -typedef struct CustomServiceRequest -{ - eprosima::fastrtps::rtps::SampleIdentity sample_identity_; - eprosima::fastcdr::FastBuffer * buffer_; - eprosima::fastrtps::SampleInfo_t sample_info_ {}; - - CustomServiceRequest() - : buffer_(nullptr) {} -} CustomServiceRequest; - -class ServicePubListener : public eprosima::fastrtps::PublisherListener -{ -public: - ServicePubListener() = default; - - template - bool wait_for_subscription( - const eprosima::fastrtps::rtps::GUID_t & guid, - const std::chrono::duration & rel_time) - { - auto guid_is_present = [this, guid]() RCPPUTILS_TSA_REQUIRES(mutex_)->bool - { - return subscriptions_.find(guid) != subscriptions_.end(); - }; - - std::unique_lock lock(mutex_); - return cv_.wait_for(lock, rel_time, guid_is_present); - } - - void onPublicationMatched( - eprosima::fastrtps::Publisher * pub, - eprosima::fastrtps::rtps::MatchingInfo & matchingInfo) - { - (void) pub; - std::lock_guard lock(mutex_); - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == matchingInfo.status) { - subscriptions_.insert(matchingInfo.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == matchingInfo.status) { - subscriptions_.erase(matchingInfo.remoteEndpointGuid); - } else { - return; - } - cv_.notify_all(); - } - -protected: - std::mutex & getMutex() - { - return mutex_; - } - - std::unordered_set< - eprosima::fastrtps::rtps::GUID_t, - rmw_fastrtps_shared_cpp::hash_fastrtps_guid> & - getSubscriptions() - { - return subscriptions_; - } - - std::condition_variable & getConditionVariable() - { - return cv_; - } - -private: - using subscriptions_set_t = - std::unordered_set; - - std::mutex mutex_; - subscriptions_set_t subscriptions_ RCPPUTILS_TSA_GUARDED_BY(mutex_); - std::condition_variable cv_; -}; - -// Wrapper around ServicePubListener to fix issue when matching clients in an ABI compatible way -// See original patch: https://github.com/ros2/rmw_fastrtps/pull/467 -class PatchedServicePubListener : public ServicePubListener -{ -public: - using clients_endpoints_map_t = - std::unordered_map; - - void onPublicationMatched( - eprosima::fastrtps::Publisher * pub, - eprosima::fastrtps::rtps::MatchingInfo & matchingInfo) - { - (void) pub; - std::lock_guard lock(getMutex()); - std::unordered_set< - eprosima::fastrtps::rtps::GUID_t, - rmw_fastrtps_shared_cpp::hash_fastrtps_guid> & subscriptions_ = getSubscriptions(); - std::condition_variable & cv_ = getConditionVariable(); - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == matchingInfo.status) { - subscriptions_.insert(matchingInfo.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == matchingInfo.status) { - subscriptions_.erase(matchingInfo.remoteEndpointGuid); - auto endpoint = clients_endpoints_.find(matchingInfo.remoteEndpointGuid); - if (endpoint != clients_endpoints_.end()) { - clients_endpoints_.erase(endpoint->second); - clients_endpoints_.erase(matchingInfo.remoteEndpointGuid); - } - } else { - return; - } - cv_.notify_all(); - } - - client_present_t - check_for_subscription( - const eprosima::fastrtps::rtps::GUID_t & guid) - { - { - std::lock_guard lock(getMutex()); - // Check if the guid is still in the map - if (clients_endpoints_.find(guid) == clients_endpoints_.end()) { - // Client is gone - return client_present_t::GONE; - } - } - // Wait for subscription - if (!wait_for_subscription(guid, std::chrono::milliseconds(100))) { - return client_present_t::MAYBE; - } - return client_present_t::YES; - } - - void endpoint_erase_if_exists(const eprosima::fastrtps::rtps::GUID_t & endpointGuid) - { - std::lock_guard lock(getMutex()); - auto endpoint = clients_endpoints_.find(endpointGuid); - if (endpoint != clients_endpoints_.end()) { - clients_endpoints_.erase(endpoint->second); - clients_endpoints_.erase(endpointGuid); - } - } - - void endpoint_add_reader_and_writer( - const eprosima::fastrtps::rtps::GUID_t & readerGuid, - const eprosima::fastrtps::rtps::GUID_t & writerGuid) - { - std::lock_guard lock(getMutex()); - clients_endpoints_.emplace(readerGuid, writerGuid); - clients_endpoints_.emplace(writerGuid, readerGuid); - } - -private: - clients_endpoints_map_t clients_endpoints_; -}; - -class ServiceListener : public eprosima::fastrtps::SubscriberListener -{ -public: - explicit ServiceListener(CustomServiceInfo * info) - : info_(info), list_has_data_(false), - conditionMutex_(nullptr), conditionVariable_(nullptr) - { - (void)info_; - } - - void - onSubscriptionMatched( - eprosima::fastrtps::Subscriber * sub, - eprosima::fastrtps::rtps::MatchingInfo & matchingInfo) - { - (void) sub; - PatchedServicePubListener * pub_listener = static_cast( - info_->pub_listener_); - if (eprosima::fastrtps::rtps::REMOVED_MATCHING == matchingInfo.status) { - pub_listener->endpoint_erase_if_exists(matchingInfo.remoteEndpointGuid); - } - } - - void - onNewDataMessage(eprosima::fastrtps::Subscriber * sub) - { - assert(sub); - - CustomServiceRequest request; - request.buffer_ = new eprosima::fastcdr::FastBuffer(); - - rmw_fastrtps_shared_cpp::SerializedData data; - data.is_cdr_buffer = true; - data.data = request.buffer_; - data.impl = nullptr; // not used when is_cdr_buffer is true - if (sub->takeNextData(&data, &request.sample_info_)) { - if (eprosima::fastrtps::rtps::ALIVE == request.sample_info_.sampleKind) { - request.sample_identity_ = request.sample_info_.sample_identity; - // Use response subscriber guid (on related_sample_identity) when present. - const eprosima::fastrtps::rtps::GUID_t & reader_guid = - request.sample_info_.related_sample_identity.writer_guid(); - if (reader_guid != eprosima::fastrtps::rtps::GUID_t::unknown() ) { - request.sample_identity_.writer_guid() = reader_guid; - } - - // Save both guids in the clients_endpoints map - PatchedServicePubListener * pub_listener = - static_cast(info_->pub_listener_); - const eprosima::fastrtps::rtps::GUID_t & writer_guid = - request.sample_info_.sample_identity.writer_guid(); - pub_listener->endpoint_add_reader_and_writer(reader_guid, writer_guid); - - std::lock_guard lock(internalMutex_); - - if (conditionMutex_ != nullptr) { - std::unique_lock clock(*conditionMutex_); - list.push_back(request); - // the change to list_has_data_ needs to be mutually exclusive with - // rmw_wait() which checks hasData() and decides if wait() needs to - // be called - list_has_data_.store(true); - clock.unlock(); - conditionVariable_->notify_one(); - } else { - list.push_back(request); - list_has_data_.store(true); - } - } - } - } - - CustomServiceRequest - getRequest() - { - std::lock_guard lock(internalMutex_); - CustomServiceRequest request; - - if (conditionMutex_ != nullptr) { - std::unique_lock clock(*conditionMutex_); - if (!list.empty()) { - request = list.front(); - list.pop_front(); - list_has_data_.store(!list.empty()); - } - } else { - if (!list.empty()) { - request = list.front(); - list.pop_front(); - list_has_data_.store(!list.empty()); - } - } - - return request; - } - - void - attachCondition(std::mutex * conditionMutex, std::condition_variable * conditionVariable) - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = conditionMutex; - conditionVariable_ = conditionVariable; - } - - void - detachCondition() - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = nullptr; - conditionVariable_ = nullptr; - } - - bool - hasData() - { - return list_has_data_.load(); - } - -private: - CustomServiceInfo * info_; - std::mutex internalMutex_; - std::list list RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::atomic_bool list_has_data_; - std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); -}; - -#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp deleted file mode 100644 index f602dfdfa..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ - -#include -#include -#include -#include -#include - -#include "fastrtps/subscriber/Subscriber.h" -#include "fastrtps/subscriber/SubscriberListener.h" - -#include "rcpputils/thread_safety_annotations.hpp" - -#include "rmw/impl/cpp/macros.hpp" - -#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" -#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp" - - -class SubListener; - -struct CustomSubscriberInfo : public CustomEventInfo -{ - virtual ~CustomSubscriberInfo() = default; - - eprosima::fastrtps::Subscriber * subscriber_{nullptr}; - SubListener * listener_{nullptr}; - rmw_fastrtps_shared_cpp::TypeSupport * type_support_{nullptr}; - const void * type_support_impl_{nullptr}; - rmw_gid_t subscription_gid_{}; - const char * typesupport_identifier_{nullptr}; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - EventListenerInterface * - getListener() const final; -}; - -class SubListener : public EventListenerInterface, public eprosima::fastrtps::SubscriberListener -{ -public: - explicit SubListener(CustomSubscriberInfo * info) - : data_(0), - deadline_changes_(false), - liveliness_changes_(false), - conditionMutex_(nullptr), - conditionVariable_(nullptr) - { - // Field is not used right now - (void)info; - } - - // SubscriberListener implementation - void - onSubscriptionMatched( - eprosima::fastrtps::Subscriber * sub, eprosima::fastrtps::rtps::MatchingInfo & info) final - { - { - std::lock_guard lock(internalMutex_); - if (eprosima::fastrtps::rtps::MATCHED_MATCHING == info.status) { - publishers_.insert(info.remoteEndpointGuid); - } else if (eprosima::fastrtps::rtps::REMOVED_MATCHING == info.status) { - publishers_.erase(info.remoteEndpointGuid); - } - } - data_taken(sub); - } - - void - onNewDataMessage(eprosima::fastrtps::Subscriber * sub) final - { - data_taken(sub); - } - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void - on_requested_deadline_missed( - eprosima::fastrtps::Subscriber *, - const eprosima::fastrtps::RequestedDeadlineMissedStatus &) final; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - void - on_liveliness_changed( - eprosima::fastrtps::Subscriber *, - const eprosima::fastrtps::LivelinessChangedStatus &) final; - - // EventListenerInterface implementation - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool - hasEvent(rmw_event_type_t event_type) const final; - - RMW_FASTRTPS_SHARED_CPP_PUBLIC - bool - takeNextEvent(rmw_event_type_t event_type, void * event_info) final; - - // SubListener API - void - attachCondition(std::mutex * conditionMutex, std::condition_variable * conditionVariable) - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = conditionMutex; - conditionVariable_ = conditionVariable; - } - - void - detachCondition() - { - std::lock_guard lock(internalMutex_); - conditionMutex_ = nullptr; - conditionVariable_ = nullptr; - } - - bool - hasData() const - { - return data_.load(std::memory_order_relaxed) > 0; - } - - void - data_taken(eprosima::fastrtps::Subscriber * sub) - { - // Make sure to call into Fast-RTPS before taking the lock to avoid an - // ABBA deadlock between internalMutex_ and mutexes inside of Fast-RTPS. -#if FASTRTPS_VERSION_MAJOR == 1 && FASTRTPS_VERSION_MINOR < 9 - uint64_t unread_count = sub->getUnreadCount(); -#else - uint64_t unread_count = sub->get_unread_count(); -#endif - - std::lock_guard lock(internalMutex_); - ConditionalScopedLock clock(conditionMutex_, conditionVariable_); - data_.store(unread_count, std::memory_order_relaxed); - } - - size_t publisherCount() - { - std::lock_guard lock(internalMutex_); - return publishers_.size(); - } - -private: - mutable std::mutex internalMutex_; - - std::atomic_size_t data_; - - std::atomic_bool deadline_changes_; - eprosima::fastrtps::RequestedDeadlineMissedStatus requested_deadline_missed_status_ - RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::atomic_bool liveliness_changes_; - eprosima::fastrtps::LivelinessChangedStatus liveliness_changed_status_ - RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::mutex * conditionMutex_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - std::condition_variable * conditionVariable_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); - - std::set publishers_ RCPPUTILS_TSA_GUARDED_BY(internalMutex_); -}; - -#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/qos.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/qos.hpp deleted file mode 100644 index e6545cbbe..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/qos.hpp +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ - -#include "fastrtps/attributes/PublisherAttributes.h" -#include "fastrtps/attributes/SubscriberAttributes.h" -#include "fastrtps/qos/QosPolicies.h" -#include "fastrtps/qos/ReaderQos.h" -#include "fastrtps/qos/WriterQos.h" - -#include "rmw/rmw.h" - -#include "rmw_fastrtps_shared_cpp/visibility_control.h" - -namespace eprosima -{ -namespace fastrtps -{ -class SubscriberAttributes; -class PublisherAttributes; -} // namespace fastrtps -} // namespace eprosima - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -bool -is_valid_qos(const rmw_qos_profile_t & qos_policies); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -bool -get_datareader_qos( - const rmw_qos_profile_t & qos_policies, - eprosima::fastrtps::SubscriberAttributes & sattr); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -bool -get_datawriter_qos( - const rmw_qos_profile_t & qos_policies, - eprosima::fastrtps::PublisherAttributes & pattr); - -/* - * Converts the low-level QOS Policy; of type WriterQos or ReaderQos into rmw_qos_profile_t. - * Since WriterQos or ReaderQos does not have information about history and depth, these values are not set - * by this function. - * - * \param[in] dds_qos of type WriterQos or ReaderQos - * \param[out] qos the equivalent of the data in WriterQos or ReaderQos in rmw_qos_profile_t - */ -template -void -dds_qos_to_rmw_qos( - const DDSQoSPolicyT & dds_qos, - rmw_qos_profile_t * qos) -{ - switch (dds_qos.m_reliability.kind) { - case eprosima::fastrtps::BEST_EFFORT_RELIABILITY_QOS: - qos->reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT; - break; - case eprosima::fastrtps::RELIABLE_RELIABILITY_QOS: - qos->reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE; - break; - default: - qos->reliability = RMW_QOS_POLICY_RELIABILITY_UNKNOWN; - break; - } - - switch (dds_qos.m_durability.kind) { - case eprosima::fastrtps::TRANSIENT_LOCAL_DURABILITY_QOS: - qos->durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL; - break; - case eprosima::fastrtps::VOLATILE_DURABILITY_QOS: - qos->durability = RMW_QOS_POLICY_DURABILITY_VOLATILE; - break; - default: - qos->durability = RMW_QOS_POLICY_DURABILITY_UNKNOWN; - break; - } - - qos->deadline.sec = dds_qos.m_deadline.period.seconds; - qos->deadline.nsec = dds_qos.m_deadline.period.nanosec; - - qos->lifespan.sec = dds_qos.m_lifespan.duration.seconds; - qos->lifespan.nsec = dds_qos.m_lifespan.duration.nanosec; - - switch (dds_qos.m_liveliness.kind) { - case eprosima::fastrtps::AUTOMATIC_LIVELINESS_QOS: - qos->liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC; - break; - case eprosima::fastrtps::MANUAL_BY_TOPIC_LIVELINESS_QOS: - qos->liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC; - break; - default: - qos->liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN; - break; - } - qos->liveliness_lease_duration.sec = dds_qos.m_liveliness.lease_duration.seconds; - qos->liveliness_lease_duration.nsec = dds_qos.m_liveliness.lease_duration.nanosec; -} - -template -void -dds_attributes_to_rmw_qos( - const AttributeT & dds_qos, - rmw_qos_profile_t * qos); - -extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC -void -dds_attributes_to_rmw_qos( - const eprosima::fastrtps::PublisherAttributes & dds_qos, - rmw_qos_profile_t * qos); - -extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC -void -dds_attributes_to_rmw_qos( - const eprosima::fastrtps::SubscriberAttributes & dds_qos, - rmw_qos_profile_t * qos); - -#endif // RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_common.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_common.hpp deleted file mode 100644 index e925c5a18..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_common.hpp +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ - -#include "./visibility_control.h" - -#include "rmw/error_handling.h" -#include "rmw/event.h" -#include "rmw/rmw.h" -#include "rmw/topic_endpoint_info_array.h" -#include "rmw/types.h" -#include "rmw/names_and_types.h" - -namespace rmw_fastrtps_shared_cpp -{ - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_client( - const char * identifier, - rmw_node_t * node, - rmw_client_t * client); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_compare_gids_equal( - const char * identifier, - const rmw_gid_t * gid1, - const rmw_gid_t * gid2, - bool * result); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_count_publishers( - const char * identifier, - const rmw_node_t * node, - const char * topic_name, - size_t * count); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_count_subscribers( - const char * identifier, - const rmw_node_t * node, - const char * topic_name, - size_t * count); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_gid_for_publisher( - const char * identifier, - const rmw_publisher_t * publisher, - rmw_gid_t * gid); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_guard_condition_t * -__rmw_create_guard_condition(const char * identifier); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_guard_condition(rmw_guard_condition_t * guard_condition); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_trigger_guard_condition( - const char * identifier, - const rmw_guard_condition_t * guard_condition_handle); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_set_log_severity(rmw_log_severity_t severity); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_node_t * -__rmw_create_node( - rmw_context_t * context, - const char * identifier, - const char * name, - const char * namespace_); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_node( - const char * identifier, - rmw_node_t * node); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -const rmw_guard_condition_t * -__rmw_node_get_graph_guard_condition(const rmw_node_t * node); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_node_names( - const char * identifier, - const rmw_node_t * node, - rcutils_string_array_t * node_names, - rcutils_string_array_t * node_namespaces); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_init_event( - const char * identifier, - rmw_event_t * rmw_event, - const char * topic_endpoint_impl_identifier, - void * data, - rmw_event_type_t event_type); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_node_names_with_enclaves( - const char * identifier, - const rmw_node_t * node, - rcutils_string_array_t * node_names, - rcutils_string_array_t * node_namespaces, - rcutils_string_array_t * enclaves); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_publish( - const char * identifier, - const rmw_publisher_t * publisher, - const void * ros_message, - rmw_publisher_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_publish_serialized_message( - const char * identifier, - const rmw_publisher_t * publisher, - const rmw_serialized_message_t * serialized_message, - rmw_publisher_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_publisher_assert_liveliness( - const char * identifier, - const rmw_publisher_t * publisher); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_publisher( - const char * identifier, - const rmw_node_t * node, - rmw_publisher_t * publisher); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_publisher_count_matched_subscriptions( - const rmw_publisher_t * publisher, - size_t * subscription_count); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_publisher_get_actual_qos( - const rmw_publisher_t * publisher, - rmw_qos_profile_t * qos); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_send_request( - const char * identifier, - const rmw_client_t * client, - const void * ros_request, - int64_t * sequence_id); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_request( - const char * identifier, - const rmw_service_t * service, - rmw_service_info_t * request_header, - void * ros_request, - bool * taken); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_response( - const char * identifier, - const rmw_client_t * client, - rmw_service_info_t * request_header, - void * ros_response, - bool * taken); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_send_response( - const char * identifier, - const rmw_service_t * service, - rmw_request_id_t * request_header, - void * ros_response); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_service( - const char * identifier, - rmw_node_t * node, - rmw_service_t * service); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_service_names_and_types( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - rmw_names_and_types_t * service_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_publisher_names_and_types_by_node( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - bool no_demangle, - rmw_names_and_types_t * topic_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_service_names_and_types_by_node( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - rmw_names_and_types_t * service_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_client_names_and_types_by_node( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - rmw_names_and_types_t * service_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_subscriber_names_and_types_by_node( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * node_name, - const char * node_namespace, - bool no_demangle, - rmw_names_and_types_t * topic_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_service_server_is_available( - const char * identifier, - const rmw_node_t * node, - const rmw_client_t * client, - bool * is_available); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_subscription( - const char * identifier, - const rmw_node_t * node, - rmw_subscription_t * subscription); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_subscription_count_matched_publishers( - const rmw_subscription_t * subscription, - size_t * publisher_count); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_subscription_get_actual_qos( - const rmw_subscription_t * subscription, - rmw_qos_profile_t * qos); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take( - const char * identifier, - const rmw_subscription_t * subscription, - void * ros_message, - bool * taken, - rmw_subscription_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_sequence( - const char * identifier, - const rmw_subscription_t * subscription, - size_t count, - rmw_message_sequence_t * message_sequencxe, - rmw_message_info_sequence_t * message_info_sequence, - size_t * taken, - rmw_subscription_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_event( - const char * identifier, - const rmw_event_t * event_handle, - void * event_info, - bool * taken); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_with_info( - const char * identifier, - const rmw_subscription_t * subscription, - void * ros_message, - bool * taken, - rmw_message_info_t * message_info, - rmw_subscription_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_serialized_message( - const char * identifier, - const rmw_subscription_t * subscription, - rmw_serialized_message_t * serialized_message, - bool * taken, - rmw_subscription_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_take_serialized_message_with_info( - const char * identifier, - const rmw_subscription_t * subscription, - rmw_serialized_message_t * serialized_message, - bool * taken, - rmw_message_info_t * message_info, - rmw_subscription_allocation_t * allocation); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_topic_names_and_types( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - bool no_demangle, - rmw_names_and_types_t * topic_names_and_types); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_wait( - const char * identifier, - rmw_subscriptions_t * subscriptions, - rmw_guard_conditions_t * guard_conditions, - rmw_services_t * services, - rmw_clients_t * clients, - rmw_events_t * events, - rmw_wait_set_t * wait_set, - const rmw_time_t * wait_timeout); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_wait_set_t * -__rmw_create_wait_set(const char * identifier, rmw_context_t * context, size_t max_conditions); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_destroy_wait_set(const char * identifier, rmw_wait_set_t * wait_set); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_publishers_info_by_topic( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * topic_name, - bool no_mangle, - rmw_topic_endpoint_info_array_t * publishers_info); - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_get_subscriptions_info_by_topic( - const char * identifier, - const rmw_node_t * node, - rcutils_allocator_t * allocator, - const char * topic_name, - bool no_mangle, - rmw_topic_endpoint_info_array_t * subscriptions_info); - -} // namespace rmw_fastrtps_shared_cpp - -#endif // RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/TypeSupport.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/TypeSupport.hpp new file mode 100644 index 000000000..0a23d195e --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/TypeSupport.hpp @@ -0,0 +1,118 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ + +#include +#include + +#include "fastdds/dds/topic/TopicDataType.hpp" + +#include "fastdds/rtps/common/InstanceHandle.h" +#include "fastdds/rtps/common/SerializedPayload.h" + +#include "fastcdr/FastBuffer.h" +#include "fastcdr/Cdr.h" + +#include "rcutils/logging_macros.h" + +#include "rosidl_runtime_c/message_type_support_struct.h" + +#include "./visibility_control.h" + +namespace rmw_fastrtps_shared_cpp +{ + +// Publishers write method will receive a pointer to this struct +struct SerializedData +{ + bool is_cdr_buffer; // Whether next field is a pointer to a Cdr or to a plain ros message + void * data; + const void * impl; // RMW implementation specific data +}; + +class TypeSupport : public eprosima::fastdds::dds::TopicDataType +{ +public: + virtual size_t getEstimatedSerializedSize(const void * ros_message, const void * impl) const = 0; + + virtual bool serializeROSmessage( + const void * ros_message, eprosima::fastcdr::Cdr & ser, const void * impl) const = 0; + + virtual bool deserializeROSmessage( + eprosima::fastcdr::Cdr & deser, void * ros_message, const void * impl) const = 0; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + bool getKey( + void * data, + eprosima::fastrtps::rtps::InstanceHandle_t * ihandle, + bool force_md5 = false) override + { + (void)data; (void)ihandle; (void)force_md5; + return false; + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + bool serialize(void * data, eprosima::fastrtps::rtps::SerializedPayload_t * payload) override; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + bool deserialize(eprosima::fastrtps::rtps::SerializedPayload_t * payload, void * data) override; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + std::function getSerializedSizeProvider(void * data) override; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void * createData() override; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void deleteData(void * data) override; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + inline bool is_bounded() const +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED + override +#endif + { + return max_size_bound_; + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + inline bool is_plain() const +#ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN + override +#endif + { + return is_plain_; + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + virtual ~TypeSupport() {} + +protected: + RMW_FASTRTPS_SHARED_CPP_PUBLIC + TypeSupport(); + + bool max_size_bound_; + bool is_plain_; +}; + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool register_type_object( + const rosidl_message_type_support_t * type_supports, + const std::string & type_name); + +} // namespace rmw_fastrtps_shared_cpp + +#endif // RMW_FASTRTPS_SHARED_CPP__TYPESUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp similarity index 96% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp index 0435bc4ab..aaecad510 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/create_rmw_gid.hpp @@ -15,7 +15,7 @@ #ifndef RMW_FASTRTPS_SHARED_CPP__CREATE_RMW_GID_HPP_ #define RMW_FASTRTPS_SHARED_CPP__CREATE_RMW_GID_HPP_ -#include "fastrtps/rtps/common/Guid.h" +#include "fastdds/rtps/common/Guid.h" #include "rmw/types.h" diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_client_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_client_info.hpp new file mode 100644 index 000000000..35de2cb24 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_client_info.hpp @@ -0,0 +1,198 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ + +#include +#include +#include +#include +#include + +#include "fastcdr/FastBuffer.h" + +#include "fastdds/dds/core/status/PublicationMatchedStatus.hpp" +#include "fastdds/dds/core/status/SubscriptionMatchedStatus.hpp" +#include "fastdds/dds/publisher/DataWriter.hpp" +#include "fastdds/dds/publisher/DataWriterListener.hpp" +#include "fastdds/dds/subscriber/DataReader.hpp" +#include "fastdds/dds/subscriber/DataReaderListener.hpp" +#include "fastdds/dds/subscriber/SampleInfo.hpp" +#include "fastdds/dds/subscriber/qos/DataReaderQos.hpp" +#include "fastdds/dds/topic/TypeSupport.hpp" + +#include "fastdds/rtps/common/Guid.h" +#include "fastdds/rtps/common/InstanceHandle.h" +#include "fastdds/rtps/common/SampleIdentity.h" + +#include "rcpputils/thread_safety_annotations.hpp" + +#include "rmw/event_callback_type.h" + +#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" + +class ClientListener; +class ClientPubListener; + +typedef struct CustomClientInfo +{ + eprosima::fastdds::dds::TypeSupport request_type_support_{nullptr}; + const void * request_type_support_impl_{nullptr}; + eprosima::fastdds::dds::TypeSupport response_type_support_{nullptr}; + const void * response_type_support_impl_{nullptr}; + eprosima::fastdds::dds::DataReader * response_reader_{nullptr}; + eprosima::fastdds::dds::DataWriter * request_writer_{nullptr}; + + std::string request_topic_; + std::string response_topic_; + + ClientListener * listener_{nullptr}; + eprosima::fastrtps::rtps::GUID_t writer_guid_; + eprosima::fastrtps::rtps::GUID_t reader_guid_; + + const char * typesupport_identifier_{nullptr}; + ClientPubListener * pub_listener_{nullptr}; + std::atomic_size_t response_subscriber_matched_count_; + std::atomic_size_t request_publisher_matched_count_; +} CustomClientInfo; + +typedef struct CustomClientResponse +{ + eprosima::fastrtps::rtps::SampleIdentity sample_identity_; + std::unique_ptr buffer_; +} CustomClientResponse; + +class ClientListener : public eprosima::fastdds::dds::DataReaderListener +{ +public: + explicit ClientListener( + CustomClientInfo * info) + : info_(info) + { + } + + void + on_data_available( + eprosima::fastdds::dds::DataReader *) + { + std::unique_lock lock_mutex(on_new_response_m_); + + if (on_new_response_cb_) { + auto unread_responses = get_unread_responses(); + + if (0 < unread_responses) { + on_new_response_cb_(user_data_, unread_responses); + } + } + } + + void on_subscription_matched( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastdds::dds::SubscriptionMatchedStatus & info) final + { + if (info_ == nullptr) { + return; + } + if (info.current_count_change == 1) { + publishers_.insert(eprosima::fastrtps::rtps::iHandle2GUID(info.last_publication_handle)); + } else if (info.current_count_change == -1) { + publishers_.erase(eprosima::fastrtps::rtps::iHandle2GUID(info.last_publication_handle)); + } else { + return; + } + info_->response_subscriber_matched_count_.store(publishers_.size()); + } + + size_t get_unread_responses() + { + return info_->response_reader_->get_unread_count(true); + } + + // Provide handlers to perform an action when a + // new event from this listener has ocurred + void + set_on_new_response_callback( + const void * user_data, + rmw_event_callback_t callback) + { + std::unique_lock lock_mutex(on_new_response_m_); + + if (callback) { + auto unread_responses = get_unread_responses(); + + if (0 < unread_responses) { + callback(user_data, unread_responses); + } + + user_data_ = user_data; + on_new_response_cb_ = callback; + + eprosima::fastdds::dds::StatusMask status_mask = info_->response_reader_->get_status_mask(); + status_mask |= eprosima::fastdds::dds::StatusMask::data_available(); + info_->response_reader_->set_listener(this, status_mask); + } else { + eprosima::fastdds::dds::StatusMask status_mask = info_->response_reader_->get_status_mask(); + status_mask &= ~eprosima::fastdds::dds::StatusMask::data_available(); + info_->response_reader_->set_listener(this, status_mask); + + user_data_ = nullptr; + on_new_response_cb_ = nullptr; + } + } + +private: + CustomClientInfo * info_; + + std::set publishers_; + + rmw_event_callback_t on_new_response_cb_{nullptr}; + + const void * user_data_{nullptr}; + + std::mutex on_new_response_m_; +}; + +class ClientPubListener : public eprosima::fastdds::dds::DataWriterListener +{ +public: + explicit ClientPubListener( + CustomClientInfo * info) + : info_(info) + { + } + + void on_publication_matched( + eprosima::fastdds::dds::DataWriter * /* writer */, + const eprosima::fastdds::dds::PublicationMatchedStatus & info) final + { + if (info_ == nullptr) { + return; + } + if (info.current_count_change == 1) { + subscriptions_.insert(eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle)); + } else if (info.current_count_change == -1) { + subscriptions_.erase(eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle)); + } else { + return; + } + info_->request_publisher_matched_count_.store(subscriptions_.size()); + } + +private: + CustomClientInfo * info_; + std::set subscriptions_; +}; + +#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_CLIENT_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_event_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_event_info.hpp new file mode 100644 index 000000000..74da14caa --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_event_info.hpp @@ -0,0 +1,74 @@ +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ + +#include +#include + +#include "fastcdr/FastBuffer.h" +#include "fastdds/dds/core/condition/StatusCondition.hpp" +#include "fastdds/dds/core/condition/GuardCondition.hpp" + +#include "rmw/event.h" +#include "rmw/event_callback_type.h" + +#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" + + +class EventListenerInterface +{ +public: + virtual eprosima::fastdds::dds::StatusCondition & get_statuscondition() const = 0; + + /// Take ready data for an event type. + /** + * \param event_type The event type to get data for. + * \param event_info A preallocated event information (from rmw/types.h) to fill with data + * \return `true` if data was successfully taken. + * \return `false` if data was not available, in this case nothing was written to event_info. + */ + virtual bool take_event( + rmw_event_type_t event_type, + void * event_info) = 0; + + // Provide handlers to perform an action when a + // new event from this listener has ocurred + virtual void set_on_new_event_callback( + rmw_event_type_t event_type, + const void * user_data, + rmw_event_callback_t callback) = 0; + + eprosima::fastdds::dds::GuardCondition & get_event_guard(rmw_event_type_t event_type) + { + return event_guard[event_type]; + } + +protected: + eprosima::fastdds::dds::GuardCondition event_guard[RMW_EVENT_INVALID]; + + rmw_event_callback_t on_new_event_cb_[RMW_EVENT_INVALID] = {nullptr}; + + const void * user_data_[RMW_EVENT_INVALID] = {nullptr}; + + std::mutex on_new_event_m_; +}; + +struct CustomEventInfo +{ + virtual EventListenerInterface * get_listener() const = 0; +}; + +#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_EVENT_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_participant_info.hpp similarity index 75% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_participant_info.hpp index c20969d79..1ae23eb20 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/custom_participant_info.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_participant_info.hpp @@ -20,10 +20,14 @@ #include #include -#include "fastrtps/rtps/common/InstanceHandle.h" -#include "fastrtps/attributes/ParticipantAttributes.h" -#include "fastrtps/participant/Participant.h" -#include "fastrtps/participant/ParticipantListener.h" +#include "fastdds/dds/domain/DomainParticipant.hpp" +#include "fastdds/dds/domain/DomainParticipantListener.hpp" +#include "fastdds/dds/publisher/Publisher.hpp" +#include "fastdds/dds/subscriber/Subscriber.hpp" + +#include "fastdds/rtps/participant/ParticipantDiscoveryInfo.h" +#include "fastdds/rtps/reader/ReaderDiscoveryInfo.h" +#include "fastdds/rtps/writer/WriterDiscoveryInfo.h" #include "rcpputils/thread_safety_annotations.hpp" #include "rcutils/logging_macros.h" @@ -42,20 +46,34 @@ using rmw_dds_common::operator<<; class ParticipantListener; +enum class publishing_mode_t +{ + ASYNCHRONOUS, // Asynchronous publishing mode + SYNCHRONOUS, // Synchronous publishing mode + AUTO // Use publishing mode set in XML file or Fast DDS default +}; + typedef struct CustomParticipantInfo { - eprosima::fastrtps::Participant * participant; - ::ParticipantListener * listener; + eprosima::fastdds::dds::DomainParticipant * participant_{nullptr}; + ParticipantListener * listener_{nullptr}; + + eprosima::fastdds::dds::Publisher * publisher_{nullptr}; + eprosima::fastdds::dds::Subscriber * subscriber_{nullptr}; + + // Protects creation and destruction of topics, readers and writers + mutable std::mutex entity_creation_mutex_; - // Flag to establish if the QoS of the participant, - // its publishers and its subscribers are going + // Flag to establish if the QoS of the DomainParticipant, + // its DataWriters, and its DataReaders are going // to be configured only from an XML file or if // their settings are going to be overwritten by code // with the default configuration. bool leave_middleware_default_qos; + publishing_mode_t publishing_mode; } CustomParticipantInfo; -class ParticipantListener : public eprosima::fastrtps::ParticipantListener +class ParticipantListener : public eprosima::fastdds::dds::DomainParticipantListener { public: explicit ParticipantListener( @@ -65,8 +83,8 @@ class ParticipantListener : public eprosima::fastrtps::ParticipantListener identifier_(identifier) {} - void onParticipantDiscovery( - eprosima::fastrtps::Participant *, + void on_participant_discovery( + eprosima::fastdds::dds::DomainParticipant *, eprosima::fastrtps::rtps::ParticipantDiscoveryInfo && info) override { switch (info.status) { @@ -99,8 +117,8 @@ class ParticipantListener : public eprosima::fastrtps::ParticipantListener } } - void onSubscriberDiscovery( - eprosima::fastrtps::Participant *, + void on_subscriber_discovery( + eprosima::fastdds::dds::DomainParticipant *, eprosima::fastrtps::rtps::ReaderDiscoveryInfo && info) override { if (eprosima::fastrtps::rtps::ReaderDiscoveryInfo::CHANGED_QOS_READER != info.status) { @@ -110,8 +128,8 @@ class ParticipantListener : public eprosima::fastrtps::ParticipantListener } } - void onPublisherDiscovery( - eprosima::fastrtps::Participant *, + void on_publisher_discovery( + eprosima::fastdds::dds::DomainParticipant *, eprosima::fastrtps::rtps::WriterDiscoveryInfo && info) override { if (eprosima::fastrtps::rtps::WriterDiscoveryInfo::CHANGED_QOS_WRITER != info.status) { @@ -129,7 +147,7 @@ class ParticipantListener : public eprosima::fastrtps::ParticipantListener { if (is_alive) { rmw_qos_profile_t qos_profile = rmw_qos_profile_unknown; - dds_qos_to_rmw_qos(proxyData.m_qos, &qos_profile); + rtps_qos_to_rmw_qos(proxyData.m_qos, &qos_profile); context->graph_cache.add_entity( rmw_fastrtps_shared_cpp::create_rmw_gid( diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp new file mode 100644 index 000000000..2c6687974 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_publisher_info.hpp @@ -0,0 +1,151 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ + +#include +#include + +#include "fastdds/dds/core/status/BaseStatus.hpp" +#include "fastdds/dds/core/status/DeadlineMissedStatus.hpp" +#include "fastdds/dds/core/status/PublicationMatchedStatus.hpp" +#include "fastdds/dds/publisher/DataWriter.hpp" +#include "fastdds/dds/publisher/DataWriterListener.hpp" +#include "fastdds/dds/topic/Topic.hpp" +#include "fastdds/dds/topic/TypeSupport.hpp" + +#include "fastdds/rtps/common/Guid.h" +#include "fastdds/rtps/common/InstanceHandle.h" + +#include "rcpputils/thread_safety_annotations.hpp" +#include "rmw/rmw.h" + +#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp" + + +class PubListener; + +typedef struct CustomPublisherInfo : public CustomEventInfo +{ + virtual ~CustomPublisherInfo() = default; + + eprosima::fastdds::dds::DataWriter * data_writer_{nullptr}; + PubListener * listener_{nullptr}; + eprosima::fastdds::dds::TypeSupport type_support_; + const void * type_support_impl_{nullptr}; + rmw_gid_t publisher_gid{}; + const char * typesupport_identifier_{nullptr}; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + EventListenerInterface * + get_listener() const final; +} CustomPublisherInfo; + +class PubListener : public EventListenerInterface, public eprosima::fastdds::dds::DataWriterListener +{ +public: + explicit PubListener( + CustomPublisherInfo * info) + : publisher_info_(info) + , deadline_changes_(false) + , liveliness_changes_(false) + , incompatible_qos_changes_(false) + { + } + + // DataWriterListener implementation + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_publication_matched( + eprosima::fastdds::dds::DataWriter * /* writer */, + const eprosima::fastdds::dds::PublicationMatchedStatus & info) final + { + std::lock_guard lock(discovery_m_); + if (info.current_count_change == 1) { + subscriptions_.insert(eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle)); + } else if (info.current_count_change == -1) { + subscriptions_.erase(eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle)); + } + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_offered_deadline_missed( + eprosima::fastdds::dds::DataWriter * writer, + const eprosima::fastdds::dds::OfferedDeadlineMissedStatus & status) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_liveliness_lost( + eprosima::fastdds::dds::DataWriter * writer, + const eprosima::fastdds::dds::LivelinessLostStatus & status) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_offered_incompatible_qos( + eprosima::fastdds::dds::DataWriter *, + const eprosima::fastdds::dds::OfferedIncompatibleQosStatus &) final; + + // PubListener API + size_t subscriptionCount() + { + std::lock_guard lock(discovery_m_); + return subscriptions_.size(); + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + eprosima::fastdds::dds::StatusCondition & get_statuscondition() const final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + bool take_event( + rmw_event_type_t event_type, + void * event_info) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void set_on_new_event_callback( + rmw_event_type_t event_type, + const void * user_data, + rmw_event_callback_t callback) final; + +private: + void trigger_event(rmw_event_type_t event_type); + + CustomPublisherInfo * publisher_info_ = nullptr; + + mutable std::mutex discovery_m_; + + std::set subscriptions_ + RCPPUTILS_TSA_GUARDED_BY(discovery_m_); + + bool deadline_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::OfferedDeadlineMissedStatus offered_deadline_missed_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + bool liveliness_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::LivelinessLostStatus liveliness_lost_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + bool incompatible_qos_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::OfferedIncompatibleQosStatus incompatible_qos_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); +}; + +#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_PUBLISHER_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_service_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_service_info.hpp new file mode 100644 index 000000000..4e284d0d8 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_service_info.hpp @@ -0,0 +1,264 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ + +#include +#include +#include +#include + +#include "fastcdr/FastBuffer.h" + +#include "fastdds/dds/core/status/PublicationMatchedStatus.hpp" +#include "fastdds/dds/core/status/SubscriptionMatchedStatus.hpp" +#include "fastdds/dds/publisher/DataWriter.hpp" +#include "fastdds/dds/publisher/DataWriterListener.hpp" +#include "fastdds/dds/subscriber/DataReader.hpp" +#include "fastdds/dds/subscriber/DataReaderListener.hpp" +#include "fastdds/dds/subscriber/SampleInfo.hpp" +#include "fastdds/dds/subscriber/qos/DataReaderQos.hpp" +#include "fastdds/dds/topic/TypeSupport.hpp" + +#include "fastdds/rtps/common/Guid.h" +#include "fastdds/rtps/common/InstanceHandle.h" +#include "fastdds/rtps/common/SampleIdentity.h" + +#include "rcpputils/thread_safety_annotations.hpp" + +#include "rmw/event_callback_type.h" + +#include "rmw_fastrtps_shared_cpp/guid_utils.hpp" +#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" + +class ServiceListener; +class ServicePubListener; + +enum class client_present_t +{ + FAILURE, // an error occurred when checking + MAYBE, // reader not matched, writer still present + YES, // reader matched + GONE // neither reader nor writer +}; + +typedef struct CustomServiceInfo +{ + eprosima::fastdds::dds::TypeSupport request_type_support_{nullptr}; + const void * request_type_support_impl_{nullptr}; + eprosima::fastdds::dds::TypeSupport response_type_support_{nullptr}; + const void * response_type_support_impl_{nullptr}; + eprosima::fastdds::dds::DataReader * request_reader_{nullptr}; + eprosima::fastdds::dds::DataWriter * response_writer_{nullptr}; + + ServiceListener * listener_{nullptr}; + ServicePubListener * pub_listener_{nullptr}; + + const char * typesupport_identifier_{nullptr}; +} CustomServiceInfo; + +typedef struct CustomServiceRequest +{ + eprosima::fastrtps::rtps::SampleIdentity sample_identity_; + eprosima::fastcdr::FastBuffer * buffer_; + + CustomServiceRequest() + : buffer_(nullptr) + { + } +} CustomServiceRequest; + +class ServicePubListener : public eprosima::fastdds::dds::DataWriterListener +{ + using subscriptions_set_t = + std::unordered_set; + using clients_endpoints_map_t = + std::unordered_map; + +public: + explicit ServicePubListener( + CustomServiceInfo * info) + { + (void) info; + } + + void + on_publication_matched( + eprosima::fastdds::dds::DataWriter * /* writer */, + const eprosima::fastdds::dds::PublicationMatchedStatus & info) final + { + std::lock_guard lock(mutex_); + if (info.current_count_change == 1) { + subscriptions_.insert(eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle)); + } else if (info.current_count_change == -1) { + eprosima::fastrtps::rtps::GUID_t erase_endpoint_guid = + eprosima::fastrtps::rtps::iHandle2GUID(info.last_subscription_handle); + subscriptions_.erase(erase_endpoint_guid); + auto endpoint = clients_endpoints_.find(erase_endpoint_guid); + if (endpoint != clients_endpoints_.end()) { + clients_endpoints_.erase(endpoint->second); + clients_endpoints_.erase(erase_endpoint_guid); + } + } else { + return; + } + cv_.notify_all(); + } + + template + bool + wait_for_subscription( + const eprosima::fastrtps::rtps::GUID_t & guid, + const std::chrono::duration & rel_time) + { + auto guid_is_present = [this, guid]() RCPPUTILS_TSA_REQUIRES(mutex_)->bool + { + return subscriptions_.find(guid) != subscriptions_.end(); + }; + + std::unique_lock lock(mutex_); + return cv_.wait_for(lock, rel_time, guid_is_present); + } + + client_present_t + check_for_subscription( + const eprosima::fastrtps::rtps::GUID_t & guid) + { + { + std::lock_guard lock(mutex_); + // Check if the guid is still in the map + if (clients_endpoints_.find(guid) == clients_endpoints_.end()) { + // Client is gone + return client_present_t::GONE; + } + } + // Wait for subscription + if (!wait_for_subscription(guid, std::chrono::milliseconds(100))) { + return client_present_t::MAYBE; + } + return client_present_t::YES; + } + + void endpoint_erase_if_exists( + const eprosima::fastrtps::rtps::GUID_t & endpointGuid) + { + std::lock_guard lock(mutex_); + auto endpoint = clients_endpoints_.find(endpointGuid); + if (endpoint != clients_endpoints_.end()) { + clients_endpoints_.erase(endpoint->second); + clients_endpoints_.erase(endpointGuid); + } + } + + void endpoint_add_reader_and_writer( + const eprosima::fastrtps::rtps::GUID_t & readerGuid, + const eprosima::fastrtps::rtps::GUID_t & writerGuid) + { + std::lock_guard lock(mutex_); + clients_endpoints_.emplace(readerGuid, writerGuid); + clients_endpoints_.emplace(writerGuid, readerGuid); + } + +private: + std::mutex mutex_; + subscriptions_set_t subscriptions_ RCPPUTILS_TSA_GUARDED_BY(mutex_); + clients_endpoints_map_t clients_endpoints_ RCPPUTILS_TSA_GUARDED_BY(mutex_); + std::condition_variable cv_; +}; + +class ServiceListener : public eprosima::fastdds::dds::DataReaderListener +{ +public: + explicit ServiceListener( + CustomServiceInfo * info) + : info_(info) + { + } + + void + on_subscription_matched( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastdds::dds::SubscriptionMatchedStatus & info) final + { + if (info.current_count_change == -1) { + info_->pub_listener_->endpoint_erase_if_exists( + eprosima::fastrtps::rtps::iHandle2GUID(info.last_publication_handle)); + } + } + + size_t get_unread_resquests() + { + return info_->request_reader_->get_unread_count(true); + } + + void + on_data_available( + eprosima::fastdds::dds::DataReader *) final + { + std::unique_lock lock_mutex(on_new_request_m_); + + auto unread_requests = get_unread_resquests(); + + if (0u < unread_requests) { + on_new_request_cb_(user_data_, unread_requests); + } + } + + // Provide handlers to perform an action when a + // new event from this listener has ocurred + void + set_on_new_request_callback( + const void * user_data, + rmw_event_callback_t callback) + { + std::unique_lock lock_mutex(on_new_request_m_); + + if (callback) { + auto unread_requests = get_unread_resquests(); + + if (0 < unread_requests) { + callback(user_data, unread_requests); + } + + user_data_ = user_data; + on_new_request_cb_ = callback; + + eprosima::fastdds::dds::StatusMask status_mask = info_->request_reader_->get_status_mask(); + status_mask |= eprosima::fastdds::dds::StatusMask::data_available(); + info_->request_reader_->set_listener(this, status_mask); + } else { + eprosima::fastdds::dds::StatusMask status_mask = info_->request_reader_->get_status_mask(); + status_mask &= ~eprosima::fastdds::dds::StatusMask::data_available(); + info_->request_reader_->set_listener(this, status_mask); + + user_data_ = nullptr; + on_new_request_cb_ = nullptr; + } + } + +private: + CustomServiceInfo * info_; + + rmw_event_callback_t on_new_request_cb_{nullptr}; + + const void * user_data_{nullptr}; + + std::mutex on_new_request_m_; +}; + +#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_SERVICE_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp new file mode 100644 index 000000000..fc77ce92b --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp @@ -0,0 +1,222 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include "fastdds/dds/core/status/DeadlineMissedStatus.hpp" +#include "fastdds/dds/core/status/LivelinessChangedStatus.hpp" +#include "fastdds/dds/core/status/SubscriptionMatchedStatus.hpp" +#include "fastdds/dds/subscriber/DataReader.hpp" +#include "fastdds/dds/subscriber/DataReaderListener.hpp" +#include "fastdds/dds/subscriber/qos/DataReaderQos.hpp" +#include "fastdds/dds/topic/ContentFilteredTopic.hpp" +#include "fastdds/dds/topic/TypeSupport.hpp" + +#include "fastdds/rtps/common/Guid.h" +#include "fastdds/rtps/common/InstanceHandle.h" + +#include "rcpputils/thread_safety_annotations.hpp" + +#include "rmw/impl/cpp/macros.hpp" +#include "rmw/event_callback_type.h" + +#include "rmw_dds_common/context.hpp" + +#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp" + + +class SubListener; + +namespace rmw_fastrtps_shared_cpp +{ +struct LoanManager; +} // namespace rmw_fastrtps_shared_cpp + +struct CustomSubscriberInfo : public CustomEventInfo +{ + virtual ~CustomSubscriberInfo() = default; + + eprosima::fastdds::dds::DataReader * data_reader_ {nullptr}; + SubListener * listener_{nullptr}; + eprosima::fastdds::dds::TypeSupport type_support_; + const void * type_support_impl_{nullptr}; + rmw_gid_t subscription_gid_{}; + const char * typesupport_identifier_{nullptr}; + std::shared_ptr loan_manager_; + + // for re-create or delete content filtered topic + const rmw_node_t * node_ {nullptr}; + rmw_dds_common::Context * common_context_ {nullptr}; + eprosima::fastdds::dds::DomainParticipant * dds_participant_ {nullptr}; + eprosima::fastdds::dds::Subscriber * subscriber_ {nullptr}; + std::string topic_name_mangled_; + eprosima::fastdds::dds::TopicDescription * topic_ {nullptr}; + eprosima::fastdds::dds::ContentFilteredTopic * filtered_topic_ {nullptr}; + eprosima::fastdds::dds::DataReaderQos datareader_qos_; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + EventListenerInterface * + get_listener() const final; +}; + + +class SubListener : public EventListenerInterface, public eprosima::fastdds::dds::DataReaderListener +{ +public: + explicit SubListener( + CustomSubscriberInfo * info) + : subscriber_info_(info) + , deadline_changes_(false) + , liveliness_changes_(false) + , sample_lost_changes_(false) + , incompatible_qos_changes_(false) + { + } + + // DataReaderListener implementation + void + on_subscription_matched( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastdds::dds::SubscriptionMatchedStatus & info) final + { + { + std::lock_guard lock(discovery_m_); + if (info.current_count_change == 1) { + publishers_.insert(eprosima::fastrtps::rtps::iHandle2GUID(info.last_publication_handle)); + } else if (info.current_count_change == -1) { + publishers_.erase(eprosima::fastrtps::rtps::iHandle2GUID(info.last_publication_handle)); + } + } + } + + void + on_data_available( + eprosima::fastdds::dds::DataReader *) final + { + std::unique_lock lock_mutex(on_new_message_m_); + + if (on_new_message_cb_) { + auto unread_messages = get_unread_messages(); + + if (0 < unread_messages) { + on_new_message_cb_(new_message_user_data_, unread_messages); + } + } + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_requested_deadline_missed( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastrtps::RequestedDeadlineMissedStatus &) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_liveliness_changed( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastrtps::LivelinessChangedStatus &) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_sample_lost( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastdds::dds::SampleLostStatus &) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void + on_requested_incompatible_qos( + eprosima::fastdds::dds::DataReader *, + const eprosima::fastdds::dds::RequestedIncompatibleQosStatus &) final; + + size_t publisherCount() + { + std::lock_guard lock(discovery_m_); + return publishers_.size(); + } + + // Provide handlers to perform an action when a + // new event from this listener has ocurred + void + set_on_new_message_callback( + const void * user_data, + rmw_event_callback_t callback); + + size_t get_unread_messages() + { + return subscriber_info_->data_reader_->get_unread_count(true); + } + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + eprosima::fastdds::dds::StatusCondition & get_statuscondition() const final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + bool take_event( + rmw_event_type_t event_type, + void * event_info) final; + + RMW_FASTRTPS_SHARED_CPP_PUBLIC + void set_on_new_event_callback( + rmw_event_type_t event_type, + const void * user_data, + rmw_event_callback_t callback) final; + +private: + CustomSubscriberInfo * subscriber_info_ = nullptr; + + bool deadline_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::RequestedDeadlineMissedStatus requested_deadline_missed_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + bool liveliness_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::LivelinessChangedStatus liveliness_changed_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + bool sample_lost_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::SampleLostStatus sample_lost_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + bool incompatible_qos_changes_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + eprosima::fastdds::dds::RequestedIncompatibleQosStatus incompatible_qos_status_ + RCPPUTILS_TSA_GUARDED_BY(on_new_event_m_); + + std::set publishers_ RCPPUTILS_TSA_GUARDED_BY( + discovery_m_); + + rmw_event_callback_t on_new_message_cb_{nullptr}; + + const void * new_message_user_data_{nullptr}; + + std::mutex on_new_message_m_; + + std::mutex discovery_m_; +}; + +#endif // RMW_FASTRTPS_SHARED_CPP__CUSTOM_SUBSCRIBER_INFO_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/guid_utils.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/guid_utils.hpp similarity index 98% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/guid_utils.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/guid_utils.hpp index 21cd07fee..e645f952b 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/guid_utils.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/guid_utils.hpp @@ -20,7 +20,7 @@ #include #include -#include "fastrtps/rtps/common/Guid.h" +#include "fastdds/rtps/common/Guid.h" namespace rmw_fastrtps_shared_cpp { @@ -63,7 +63,7 @@ struct hash_fastrtps_guid union u_convert { uint8_t plain_value[sizeof(guid)]; uint32_t plain_ints[sizeof(guid) / sizeof(uint32_t)]; - } u; + } u {}; static_assert( sizeof(guid) == 16 && diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/init_rmw_context_impl.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/init_rmw_context_impl.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/init_rmw_context_impl.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/init_rmw_context_impl.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/listener_thread.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/listener_thread.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/listener_thread.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/listener_thread.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/locked_object.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/locked_object.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/locked_object.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/locked_object.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/names.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/names.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/names.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/names.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/namespace_prefix.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/namespace_prefix.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/namespace_prefix.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/namespace_prefix.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/participant.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/participant.hpp similarity index 77% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/participant.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/participant.hpp index f10303cf8..a123a304e 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/participant.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/participant.hpp @@ -25,6 +25,12 @@ namespace rmw_fastrtps_shared_cpp { +// This method will create a DDS DomainParticipant along with +// a DDS Publisher and a DDS Subscriber +// For the creation of DDS DataWriter see method create_publisher +// For the creation of DDS DataReader see method create_subscription +// Note that ROS 2 Publishers and Subscriptions correspond with DDS DataWriters +// and DataReaders respectively and not with DDS Publishers and Subscribers. RMW_FASTRTPS_SHARED_CPP_PUBLIC CustomParticipantInfo * create_participant( diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/publisher.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/publisher.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/publisher.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/publisher.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/qos.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/qos.hpp new file mode 100644 index 000000000..ad5799452 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/qos.hpp @@ -0,0 +1,207 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ + +#include +#include +#include +#include + +#include "fastrtps/qos/QosPolicies.h" + +#include "rmw/rmw.h" + +#include "rmw_fastrtps_shared_cpp/visibility_control.h" + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +is_valid_qos(const rmw_qos_profile_t & qos_policies); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +get_datareader_qos( + const rmw_qos_profile_t & qos_policies, + eprosima::fastdds::dds::DataReaderQos & reader_qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +get_datawriter_qos( + const rmw_qos_profile_t & qos_policies, + eprosima::fastdds::dds::DataWriterQos & writer_qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +get_topic_qos( + const rmw_qos_profile_t & qos_policies, + eprosima::fastdds::dds::TopicQos & topic_qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_time_t +dds_duration_to_rmw(const eprosima::fastrtps::Duration_t & duration); + +/* + * Converts the DDS QOS Policy; of type DataWriterQos or DataReaderQos into rmw_qos_profile_t. + * + * \param[in] dds_qos of type DataWriterQos or DataReaderQos + * \param[out] qos the equivalent of the data in dds_qos as a rmw_qos_profile_t + */ +template +void +dds_qos_to_rmw_qos( + const DDSQoSPolicyT & dds_qos, + rmw_qos_profile_t * qos) +{ + switch (dds_qos.reliability().kind) { + case eprosima::fastdds::dds::BEST_EFFORT_RELIABILITY_QOS: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT; + break; + case eprosima::fastdds::dds::RELIABLE_RELIABILITY_QOS: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE; + break; + default: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_UNKNOWN; + break; + } + + switch (dds_qos.durability().kind) { + case eprosima::fastdds::dds::TRANSIENT_LOCAL_DURABILITY_QOS: + qos->durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL; + break; + case eprosima::fastdds::dds::VOLATILE_DURABILITY_QOS: + qos->durability = RMW_QOS_POLICY_DURABILITY_VOLATILE; + break; + default: + qos->durability = RMW_QOS_POLICY_DURABILITY_UNKNOWN; + break; + } + + qos->deadline = dds_duration_to_rmw(dds_qos.deadline().period); + qos->lifespan = dds_duration_to_rmw(dds_qos.lifespan().duration); + + switch (dds_qos.liveliness().kind) { + case eprosima::fastdds::dds::AUTOMATIC_LIVELINESS_QOS: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC; + break; + case eprosima::fastdds::dds::MANUAL_BY_TOPIC_LIVELINESS_QOS: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC; + break; + default: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN; + break; + } + + qos->liveliness_lease_duration = dds_duration_to_rmw(dds_qos.liveliness().lease_duration); + + switch (dds_qos.history().kind) { + case eprosima::fastdds::dds::KEEP_LAST_HISTORY_QOS: + qos->history = RMW_QOS_POLICY_HISTORY_KEEP_LAST; + break; + case eprosima::fastdds::dds::KEEP_ALL_HISTORY_QOS: + qos->history = RMW_QOS_POLICY_HISTORY_KEEP_ALL; + break; + default: + qos->history = RMW_QOS_POLICY_HISTORY_UNKNOWN; + break; + } + qos->depth = static_cast(dds_qos.history().depth); +} + +/* + * Converts the RTPS QOS Policy; of type WriterQos or ReaderQos into rmw_qos_profile_t. + * Since WriterQos or ReaderQos do not have information about history and depth, + * these values are not set by this function. + * + * \param[in] rtps_qos of type WriterQos or ReaderQos + * \param[out] qos the equivalent of the data in rtps_qos as a rmw_qos_profile_t + */ +template +void +rtps_qos_to_rmw_qos( + const RTPSQoSPolicyT & rtps_qos, + rmw_qos_profile_t * qos) +{ + switch (rtps_qos.m_reliability.kind) { + case eprosima::fastrtps::BEST_EFFORT_RELIABILITY_QOS: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT; + break; + case eprosima::fastrtps::RELIABLE_RELIABILITY_QOS: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE; + break; + default: + qos->reliability = RMW_QOS_POLICY_RELIABILITY_UNKNOWN; + break; + } + + switch (rtps_qos.m_durability.kind) { + case eprosima::fastrtps::TRANSIENT_LOCAL_DURABILITY_QOS: + qos->durability = RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL; + break; + case eprosima::fastrtps::VOLATILE_DURABILITY_QOS: + qos->durability = RMW_QOS_POLICY_DURABILITY_VOLATILE; + break; + default: + qos->durability = RMW_QOS_POLICY_DURABILITY_UNKNOWN; + break; + } + + qos->deadline = dds_duration_to_rmw(rtps_qos.m_deadline.period); + qos->lifespan = dds_duration_to_rmw(rtps_qos.m_lifespan.duration); + + switch (rtps_qos.m_liveliness.kind) { + case eprosima::fastrtps::AUTOMATIC_LIVELINESS_QOS: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC; + break; + case eprosima::fastrtps::MANUAL_BY_TOPIC_LIVELINESS_QOS: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC; + break; + default: + qos->liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN; + break; + } + qos->liveliness_lease_duration = dds_duration_to_rmw(rtps_qos.m_liveliness.lease_duration); +} + +extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC +void dds_qos_to_rmw_qos( + const eprosima::fastdds::dds::DataWriterQos & dds_qos, + rmw_qos_profile_t * qos); + +extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC +void dds_qos_to_rmw_qos( + const eprosima::fastdds::dds::DataReaderQos & dds_qos, + rmw_qos_profile_t * qos); + + +template +void +dds_attributes_to_rmw_qos( + const AttributeT & dds_qos, + rmw_qos_profile_t * qos); + +extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC +void +dds_attributes_to_rmw_qos( + const eprosima::fastrtps::PublisherAttributes & dds_qos, + rmw_qos_profile_t * qos); + +extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC +void +dds_attributes_to_rmw_qos( + const eprosima::fastrtps::SubscriberAttributes & dds_qos, + rmw_qos_profile_t * qos); + +#endif // RMW_FASTRTPS_SHARED_CPP__QOS_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_common.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_common.hpp new file mode 100644 index 000000000..ede5410b4 --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_common.hpp @@ -0,0 +1,538 @@ +// Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ + +#include "./visibility_control.h" + +#include "rmw/error_handling.h" +#include "rmw/event.h" +#include "rmw/features.h" +#include "rmw/rmw.h" +#include "rmw/topic_endpoint_info_array.h" +#include "rmw/types.h" +#include "rmw/names_and_types.h" +#include "rmw/network_flow_endpoint_array.h" + +namespace rmw_fastrtps_shared_cpp +{ + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_client( + const char * identifier, + rmw_node_t * node, + rmw_client_t * client); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_compare_gids_equal( + const char * identifier, + const rmw_gid_t * gid1, + const rmw_gid_t * gid2, + bool * result); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_count_publishers( + const char * identifier, + const rmw_node_t * node, + const char * topic_name, + size_t * count); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_count_subscribers( + const char * identifier, + const rmw_node_t * node, + const char * topic_name, + size_t * count); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_gid_for_publisher( + const char * identifier, + const rmw_publisher_t * publisher, + rmw_gid_t * gid); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_guard_condition_t * +__rmw_create_guard_condition(const char * identifier); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_guard_condition(rmw_guard_condition_t * guard_condition); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_trigger_guard_condition( + const char * identifier, + const rmw_guard_condition_t * guard_condition_handle); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_set_log_severity(rmw_log_severity_t severity); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_node_t * +__rmw_create_node( + rmw_context_t * context, + const char * identifier, + const char * name, + const char * namespace_); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_node( + const char * identifier, + rmw_node_t * node); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +const rmw_guard_condition_t * +__rmw_node_get_graph_guard_condition(const rmw_node_t * node); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_node_names( + const char * identifier, + const rmw_node_t * node, + rcutils_string_array_t * node_names, + rcutils_string_array_t * node_namespaces); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_init_event( + const char * identifier, + rmw_event_t * rmw_event, + const char * topic_endpoint_impl_identifier, + void * data, + rmw_event_type_t event_type); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_node_names_with_enclaves( + const char * identifier, + const rmw_node_t * node, + rcutils_string_array_t * node_names, + rcutils_string_array_t * node_namespaces, + rcutils_string_array_t * enclaves); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publish( + const char * identifier, + const rmw_publisher_t * publisher, + const void * ros_message, + rmw_publisher_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publish_serialized_message( + const char * identifier, + const rmw_publisher_t * publisher, + const rmw_serialized_message_t * serialized_message, + rmw_publisher_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_borrow_loaned_message( + const char * identifier, + const rmw_publisher_t * publisher, + const rosidl_message_type_support_t * type_support, + void ** ros_message); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_return_loaned_message_from_publisher( + const char * identifier, + const rmw_publisher_t * publisher, + void * loaned_message); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publish_loaned_message( + const char * identifier, + const rmw_publisher_t * publisher, + const void * ros_message, + rmw_publisher_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publisher_assert_liveliness( + const char * identifier, + const rmw_publisher_t * publisher); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publisher_wait_for_all_acked( + const char * identifier, + const rmw_publisher_t * publisher, + rmw_time_t wait_timeout); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_publisher( + const char * identifier, + const rmw_node_t * node, + rmw_publisher_t * publisher); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publisher_count_matched_subscriptions( + const rmw_publisher_t * publisher, + size_t * subscription_count); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publisher_get_actual_qos( + const rmw_publisher_t * publisher, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_send_request( + const char * identifier, + const rmw_client_t * client, + const void * ros_request, + int64_t * sequence_id); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_request( + const char * identifier, + const rmw_service_t * service, + rmw_service_info_t * request_header, + void * ros_request, + bool * taken); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_response( + const char * identifier, + const rmw_client_t * client, + rmw_service_info_t * request_header, + void * ros_response, + bool * taken); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_send_response( + const char * identifier, + const rmw_service_t * service, + rmw_request_id_t * request_header, + void * ros_response); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_service( + const char * identifier, + rmw_node_t * node, + rmw_service_t * service); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_service_names_and_types( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + rmw_names_and_types_t * service_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_publisher_names_and_types_by_node( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + bool no_demangle, + rmw_names_and_types_t * topic_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_service_names_and_types_by_node( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + rmw_names_and_types_t * service_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_client_names_and_types_by_node( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + rmw_names_and_types_t * service_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_subscriber_names_and_types_by_node( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * node_name, + const char * node_namespace, + bool no_demangle, + rmw_names_and_types_t * topic_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_service_server_is_available( + const char * identifier, + const rmw_node_t * node, + const rmw_client_t * client, + bool * is_available); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_subscription( + const char * identifier, + const rmw_node_t * node, + rmw_subscription_t * subscription, + bool reset_cft = false); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_count_matched_publishers( + const rmw_subscription_t * subscription, + size_t * publisher_count); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_get_actual_qos( + const rmw_subscription_t * subscription, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_set_content_filter( + rmw_subscription_t * subscription, + const rmw_subscription_content_filter_options_t * options); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_get_content_filter( + const rmw_subscription_t * subscription, + rcutils_allocator_t * allocator, + rmw_subscription_content_filter_options_t * options); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_service_response_publisher_get_actual_qos( + const rmw_service_t * service, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_service_request_subscription_get_actual_qos( + const rmw_service_t * service, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_client_request_publisher_get_actual_qos( + const rmw_client_t * client, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_client_response_subscription_get_actual_qos( + const rmw_client_t * client, + rmw_qos_profile_t * qos); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take( + const char * identifier, + const rmw_subscription_t * subscription, + void * ros_message, + bool * taken, + rmw_subscription_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_sequence( + const char * identifier, + const rmw_subscription_t * subscription, + size_t count, + rmw_message_sequence_t * message_sequencxe, + rmw_message_info_sequence_t * message_info_sequence, + size_t * taken, + rmw_subscription_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_loaned_message_internal( + const char * identifier, + const rmw_subscription_t * subscription, + void ** loaned_message, + bool * taken, + rmw_message_info_t * message_info); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_return_loaned_message_from_subscription( + const char * identifier, + const rmw_subscription_t * subscription, + void * loaned_message); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_event( + const char * identifier, + const rmw_event_t * event_handle, + void * event_info, + bool * taken); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_with_info( + const char * identifier, + const rmw_subscription_t * subscription, + void * ros_message, + bool * taken, + rmw_message_info_t * message_info, + rmw_subscription_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_serialized_message( + const char * identifier, + const rmw_subscription_t * subscription, + rmw_serialized_message_t * serialized_message, + bool * taken, + rmw_subscription_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_take_serialized_message_with_info( + const char * identifier, + const rmw_subscription_t * subscription, + rmw_serialized_message_t * serialized_message, + bool * taken, + rmw_message_info_t * message_info, + rmw_subscription_allocation_t * allocation); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_topic_names_and_types( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + bool no_demangle, + rmw_names_and_types_t * topic_names_and_types); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_wait( + const char * identifier, + rmw_subscriptions_t * subscriptions, + rmw_guard_conditions_t * guard_conditions, + rmw_services_t * services, + rmw_clients_t * clients, + rmw_events_t * events, + rmw_wait_set_t * wait_set, + const rmw_time_t * wait_timeout); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_wait_set_t * +__rmw_create_wait_set(const char * identifier, rmw_context_t * context, size_t max_conditions); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_destroy_wait_set(const char * identifier, rmw_wait_set_t * wait_set); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_publishers_info_by_topic( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * topic_name, + bool no_mangle, + rmw_topic_endpoint_info_array_t * publishers_info); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_get_subscriptions_info_by_topic( + const char * identifier, + const rmw_node_t * node, + rcutils_allocator_t * allocator, + const char * topic_name, + bool no_mangle, + rmw_topic_endpoint_info_array_t * subscriptions_info); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_qos_profile_check_compatible( + const rmw_qos_profile_t publisher_profile, + const rmw_qos_profile_t subscription_profile, + rmw_qos_compatibility_type_t * compatibility, + char * reason, + size_t reason_size); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_publisher_get_network_flow_endpoints( + const rmw_publisher_t * publisher, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_get_network_flow_endpoints( + const rmw_subscription_t * subscription, + rcutils_allocator_t * allocator, + rmw_network_flow_endpoint_array_t * network_flow_endpoint_array); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_subscription_set_on_new_message_callback( + rmw_subscription_t * rmw_subscription, + rmw_event_callback_t callback, + const void * user_data); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_service_set_on_new_request_callback( + rmw_service_t * rmw_service, + rmw_event_callback_t callback, + const void * user_data); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_client_set_on_new_response_callback( + rmw_client_t * rmw_client, + rmw_event_callback_t callback, + const void * user_data); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +__rmw_event_set_callback( + rmw_event_t * rmw_event, + rmw_event_callback_t callback, + const void * user_data); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +__rmw_feature_supported(rmw_feature_t feature); + +} // namespace rmw_fastrtps_shared_cpp + +#endif // RMW_FASTRTPS_SHARED_CPP__RMW_COMMON_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp similarity index 92% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp index c9e206ec2..3d8fad7e2 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_context_impl.hpp @@ -17,7 +17,8 @@ #include -struct rmw_context_impl_t +// Definition of struct rmw_context_impl_s as declared in rmw/init.h +struct rmw_context_impl_s { /// Pointer to `rmw_dds_common::Context`. void * common; diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_init.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_init.hpp similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_init.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_init.hpp diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp similarity index 96% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp index 84f88c223..611fa926e 100644 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/rmw_security_logging.hpp @@ -15,7 +15,7 @@ #ifndef RMW_FASTRTPS_SHARED_CPP__RMW_SECURITY_LOGGING_HPP_ #define RMW_FASTRTPS_SHARED_CPP__RMW_SECURITY_LOGGING_HPP_ -#include "fastrtps/rtps/attributes/PropertyPolicy.h" +#include "fastdds/rtps/attributes/PropertyPolicy.h" #include "rmw_fastrtps_shared_cpp/visibility_control.h" diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/subscription.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/subscription.hpp new file mode 100644 index 000000000..ddd2f07de --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/subscription.hpp @@ -0,0 +1,40 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ + +#include "rmw/rmw.h" +#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" +#include "rmw_fastrtps_shared_cpp/visibility_control.h" + +namespace rmw_fastrtps_shared_cpp +{ + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +void +__init_subscription_for_loans( + rmw_subscription_t * subscription); + +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +destroy_subscription( + const char * identifier, + CustomParticipantInfo * participant_info, + rmw_subscription_t * subscription, + bool reset_cft = false); + +} // namespace rmw_fastrtps_shared_cpp + +#endif // RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/utils.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/utils.hpp new file mode 100644 index 000000000..88b8e183a --- /dev/null +++ b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/utils.hpp @@ -0,0 +1,189 @@ +// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima). +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RMW_FASTRTPS_SHARED_CPP__UTILS_HPP_ +#define RMW_FASTRTPS_SHARED_CPP__UTILS_HPP_ + +#include +#include + +#include "fastdds/dds/topic/TopicDescription.hpp" +#include "fastdds/dds/topic/TypeSupport.hpp" + +#include "fastrtps/types/TypesBase.h" + +#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" +#include "rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp" +#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp" + +#include "rmw/rmw.h" + + +namespace rmw_fastrtps_shared_cpp +{ + +/** +* Auxiliary struct to cleanup a topic created during entity creation. +* It is similar to a unique_ptr and its custom deleter at the same time. +* +* The creation process of an entity should be as follows: +* - find_and_check_topic_and_type is called +* - If the type is not found, it is created and registered +* - cast_or_create_topic is called on a stack-allocated TopicHolder +* - An early return will delete the topic if necessary +* - create_datawriter or create_datareader is called +* - Rest of the initialization process is performed +* - Before correctly returning the created entity, field should_be_deleted is set to false +* to avoid deletion of the topic +*/ +struct TopicHolder +{ + ~TopicHolder() + { + if (should_be_deleted) { + participant->delete_topic(topic); + } + } + + eprosima::fastdds::dds::DomainParticipant * participant = nullptr; + eprosima::fastdds::dds::TopicDescription * desc = nullptr; + eprosima::fastdds::dds::Topic * topic = nullptr; + bool should_be_deleted = false; +}; + +/** +* Convert a Fast DDS return code into the corresponding rmw_ret_t +* \param[in] code The Fast DDS return code to be translated +* \return the corresponding rmw_ret_t value +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +rmw_ret_t +cast_error_dds_to_rmw(eprosima::fastrtps::types::ReturnCode_t code); + +/** +* Auxiliary method to reuse or create a topic during the creation of an entity. +* +* \param[in] participant DomainParticipant where the topic will be created. +* \param[in] desc TopicDescription returned by find_and_check_topic_and_type. +* \param[in] topic_name Name of the topic. +* \param[in] type_name Name of the type. +* \param[in] topic_qos QoS with which to create the topic. +* \param[in] is_writer_topic Whether the resulting topic will be used on a DataWriter. +* \param[out] topic_holder Will hold the pointer to the topic along with the necessary +* information for its deletion. +* When is_writer_topic is true, topic_holder->topic can be +* directly used on a create_datawriter call. +* When is_writer_topic is false, topic_holder->desc can be +* directly used on a create_datareader call. +* +* \return true when the topic was reused (topic_holder->should_be_deleted will be false) +* \return true when the topic was created (topic_holder->should_be_deleted will be true) +* \return false when the topic could not be created +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +cast_or_create_topic( + eprosima::fastdds::dds::DomainParticipant * participant, + eprosima::fastdds::dds::TopicDescription * desc, + const std::string & topic_name, + const std::string & type_name, + const eprosima::fastdds::dds::TopicQos & topic_qos, + bool is_writer_topic, + TopicHolder * topic_holder); + +/** +* Tries to find already registered topic and type. +* +* \param[in] participant_info CustomParticipantInfo associated to the context. +* \param[in] topic_name Name of the topic for the entity being created. +* \param[in] type_name Name of the type for the entity being created. +* \param[out] returned_topic TopicDescription for topic_name +* \param[out] returned_type TypeSupport for type_name +* +* \return false if `topic_name` was previously created with a different type name. +* \return true when there is no such conflict. Returned topic and type may be null +* if they were not previously registered on the participant. +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +find_and_check_topic_and_type( + const CustomParticipantInfo * participant_info, + const std::string & topic_name, + const std::string & type_name, + eprosima::fastdds::dds::TopicDescription ** returned_topic, + eprosima::fastdds::dds::TypeSupport * returned_type); + +/** +* Performs removal of associated topic and type. +* +* \param[in] participant_info CustomParticipantInfo associated to the context. +* \param[in] topic Topic of the entity being deleted. +* \param[in] type TypeSupport of the entity being deleted. +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +void +remove_topic_and_type( + const CustomParticipantInfo * participant_info, + const eprosima::fastdds::dds::TopicDescription * topic, + const eprosima::fastdds::dds::TypeSupport & type); + +/** +* Create content filtered topic. +* +* \param[in] participant DomainParticipant where the topic will be created. +* \param[in] topic_desc TopicDescription returned by find_and_check_topic_and_type. +* \param[in] topic_name_mangled Mangled Name of the topic. +* \param[in] options Options of the content filtered topic. +* \param[out] content_filtered_topic Will hold the pointer to the content filtered topic along + with the necessary information for its deletion. +* +* \return true when the content filtered topic was created +* \return false when the content filtered topic could not be created +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +create_content_filtered_topic( + eprosima::fastdds::dds::DomainParticipant * participant, + eprosima::fastdds::dds::TopicDescription * topic_desc, + const std::string & topic_name_mangled, + const rmw_subscription_content_filter_options_t * options, + eprosima::fastdds::dds::ContentFilteredTopic ** content_filtered_topic); + + +/** +* Create data reader. +* +* \param[in] datareader_qos QoS of data reader. +* \param[in] subscription_options Options of the subscription. +* \param[in] subscriber A subsciber to create the data reader. +* \param[in] des_topic TopicDescription returned by find_and_check_topic_and_type. +* \param[in] listener The listener of the data reader. +* \param[out] data_reader Will hold the pointer to the data reader. +* +* \return true when the data reader was created +* \return false when the data reader could not be created +*/ +RMW_FASTRTPS_SHARED_CPP_PUBLIC +bool +create_datareader( + const eprosima::fastdds::dds::DataReaderQos & datareader_qos, + const rmw_subscription_options_t * subscription_options, + eprosima::fastdds::dds::Subscriber * subscriber, + eprosima::fastdds::dds::TopicDescription * des_topic, + SubListener * listener, + eprosima::fastdds::dds::DataReader ** data_reader); + +} // namespace rmw_fastrtps_shared_cpp + +#endif // RMW_FASTRTPS_SHARED_CPP__UTILS_HPP_ diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/visibility_control.h b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rmw_fastrtps_shared_cpp/visibility_control.h rename to ThirdParty/ros/include/rmw_fastrtps_shared_cpp/rmw_fastrtps_shared_cpp/visibility_control.h diff --git a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/subscription.hpp b/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/subscription.hpp deleted file mode 100644 index 523b916b3..000000000 --- a/ThirdParty/ros/include/rmw_fastrtps_shared_cpp/subscription.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ -#define RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ - -#include "rmw/rmw.h" -#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp" -#include "rmw_fastrtps_shared_cpp/visibility_control.h" - -namespace rmw_fastrtps_shared_cpp -{ - -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -destroy_subscription( - const char * identifier, - CustomParticipantInfo * participant_info, - rmw_subscription_t * subscription); - -} // namespace rmw_fastrtps_shared_cpp - -#endif // RMW_FASTRTPS_SHARED_CPP__SUBSCRIPTION_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__traits.hpp b/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__traits.hpp deleted file mode 100644 index d108cbbff..000000000 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from rosgraph_msgs:msg/Clock.idl -// generated code does not contain a copyright notice - -#ifndef ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ -#define ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ - -#include "rosgraph_msgs/msg/detail/clock__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'clock' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "rosgraph_msgs::msg::Clock"; -} - -template<> -inline const char * name() -{ - return "rosgraph_msgs/msg/Clock"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.c b/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.c deleted file mode 100644 index d19a64e47..000000000 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.c +++ /dev/null @@ -1,89 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from rosgraph_msgs:msg/Clock.idl -// generated code does not contain a copyright notice - -#include -#include "rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h" -#include "rosgraph_msgs/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 "rosgraph_msgs/msg/detail/clock__functions.h" -#include "rosgraph_msgs/msg/detail/clock__struct.h" - - -// Include directives for member types -// Member `clock` -#include "builtin_interfaces/msg/time.h" -// Member `clock` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Clock__rosidl_typesupport_introspection_c__Clock_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; - rosgraph_msgs__msg__Clock__init(message_memory); -} - -void Clock__rosidl_typesupport_introspection_c__Clock_fini_function(void * message_memory) -{ - rosgraph_msgs__msg__Clock__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Clock__rosidl_typesupport_introspection_c__Clock_message_member_array[1] = { - { - "clock", // 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(rosgraph_msgs__msg__Clock, clock), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Clock__rosidl_typesupport_introspection_c__Clock_message_members = { - "rosgraph_msgs__msg", // message namespace - "Clock", // message name - 1, // number of fields - sizeof(rosgraph_msgs__msg__Clock), - Clock__rosidl_typesupport_introspection_c__Clock_message_member_array, // message members - Clock__rosidl_typesupport_introspection_c__Clock_init_function, // function to initialize message memory (memory has to be allocated) - Clock__rosidl_typesupport_introspection_c__Clock_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 Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle = { - 0, - &Clock__rosidl_typesupport_introspection_c__Clock_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rosgraph_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rosgraph_msgs, msg, Clock)() { - Clock__rosidl_typesupport_introspection_c__Clock_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle.typesupport_identifier) { - Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/clock.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/clock.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/clock.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/clock.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/clock.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/clock.hpp similarity index 86% rename from ThirdParty/ros/include/rosgraph_msgs/msg/clock.hpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/clock.hpp index 11cc6a769..8571dbdee 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/clock.hpp +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/clock.hpp @@ -7,5 +7,6 @@ #include "rosgraph_msgs/msg/detail/clock__struct.hpp" #include "rosgraph_msgs/msg/detail/clock__builder.hpp" #include "rosgraph_msgs/msg/detail/clock__traits.hpp" +#include "rosgraph_msgs/msg/detail/clock__type_support.hpp" #endif // ROSGRAPH_MSGS__MSG__CLOCK_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__builder.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__builder.hpp similarity index 94% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__builder.hpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__builder.hpp index 4ef700e70..3760b4006 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__builder.hpp +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__builder.hpp @@ -5,11 +5,12 @@ #ifndef ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__BUILDER_HPP_ #define ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__BUILDER_HPP_ -#include "rosgraph_msgs/msg/detail/clock__struct.hpp" -#include #include #include +#include "rosgraph_msgs/msg/detail/clock__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace rosgraph_msgs { diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__functions.c b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__functions.c similarity index 90% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__functions.c rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__functions.c index 57a5da0aa..0121cab4d 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__functions.c +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__functions.c @@ -216,22 +216,27 @@ rosgraph_msgs__msg__Clock__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(rosgraph_msgs__msg__Clock); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); rosgraph_msgs__msg__Clock * data = - (rosgraph_msgs__msg__Clock *)realloc(output->data, allocation_size); + (rosgraph_msgs__msg__Clock *)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 (!rosgraph_msgs__msg__Clock__init(&data[i])) { - /* free currently allocated and return false */ + if (!rosgraph_msgs__msg__Clock__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; ) { - rosgraph_msgs__msg__Clock__fini(&data[i]); + rosgraph_msgs__msg__Clock__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__functions.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__functions.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__functions.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__functions.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h index 0b9a4ada9..0c3cbf749 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_rosgraph_msgs__msg__Clock( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rosgraph_msgs size_t max_serialized_size_rosgraph_msgs__msg__Clock( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_rosgraph_msgs diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp index ad12beef7..f8a1e1c7d 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_rosgraph_msgs max_serialized_size_Clock( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.h similarity index 83% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.h index 214428719..3e9f1efd9 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.h +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.h @@ -21,7 +21,12 @@ extern "C" // Member 'clock' #include "builtin_interfaces/msg/detail/time__struct.h" -// Struct defined in msg/Clock in the package rosgraph_msgs. +/// Struct defined in msg/Clock in the package rosgraph_msgs. +/** + * This message communicates the current time. + * + * For more information, see https://design.ros2.org/articles/clock_and_time.html. + */ typedef struct rosgraph_msgs__msg__Clock { builtin_interfaces__msg__Time clock; diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.hpp similarity index 97% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.hpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.hpp index c2ae1009f..dd47ecca8 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__struct.hpp +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__struct.hpp @@ -5,14 +5,15 @@ #ifndef ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__STRUCT_HPP_ #define ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'clock' diff --git a/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__traits.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__traits.hpp new file mode 100644 index 000000000..92dc4c3d5 --- /dev/null +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__traits.hpp @@ -0,0 +1,112 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from rosgraph_msgs:msg/Clock.idl +// generated code does not contain a copyright notice + +#ifndef ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ +#define ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "rosgraph_msgs/msg/detail/clock__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'clock' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace rosgraph_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Clock & msg, + std::ostream & out) +{ + out << "{"; + // member: clock + { + out << "clock: "; + to_flow_style_yaml(msg.clock, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Clock & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: clock + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "clock:\n"; + to_block_style_yaml(msg.clock, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Clock & 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 rosgraph_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use rosgraph_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const rosgraph_msgs::msg::Clock & msg, + std::ostream & out, size_t indentation = 0) +{ + rosgraph_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use rosgraph_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const rosgraph_msgs::msg::Clock & msg) +{ + return rosgraph_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "rosgraph_msgs::msg::Clock"; +} + +template<> +inline const char * name() +{ + return "rosgraph_msgs/msg/Clock"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.c b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.c new file mode 100644 index 000000000..b0bfa19ba --- /dev/null +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.c @@ -0,0 +1,91 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from rosgraph_msgs:msg/Clock.idl +// generated code does not contain a copyright notice + +#include +#include "rosgraph_msgs/msg/detail/clock__rosidl_typesupport_introspection_c.h" +#include "rosgraph_msgs/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 "rosgraph_msgs/msg/detail/clock__functions.h" +#include "rosgraph_msgs/msg/detail/clock__struct.h" + + +// Include directives for member types +// Member `clock` +#include "builtin_interfaces/msg/time.h" +// Member `clock` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_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; + rosgraph_msgs__msg__Clock__init(message_memory); +} + +void rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_fini_function(void * message_memory) +{ + rosgraph_msgs__msg__Clock__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_member_array[1] = { + { + "clock", // 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(rosgraph_msgs__msg__Clock, clock), // 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 rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_members = { + "rosgraph_msgs__msg", // message namespace + "Clock", // message name + 1, // number of fields + sizeof(rosgraph_msgs__msg__Clock), + rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_member_array, // message members + rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_init_function, // function to initialize message memory (memory has to be allocated) + rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_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 rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle = { + 0, + &rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_rosgraph_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, rosgraph_msgs, msg, Clock)() { + rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle.typesupport_identifier) { + rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &rosgraph_msgs__msg__Clock__rosidl_typesupport_introspection_c__Clock_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.cpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.cpp rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.cpp index 7c29ece34..8bc1cdfdd 100644 --- a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.cpp +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Clock_message 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 } }; diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/detail/clock__type_support.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.hpp new file mode 100644 index 000000000..48f3f0f2f --- /dev/null +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/detail/clock__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from rosgraph_msgs:msg/Clock.idl +// generated code does not contain a copyright notice + +#ifndef ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TYPE_SUPPORT_HPP_ +#define ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "rosgraph_msgs/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_rosgraph_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + rosgraph_msgs, + msg, + Clock +)(); +#ifdef __cplusplus +} +#endif + +#endif // ROSGRAPH_MSGS__MSG__DETAIL__CLOCK__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..720833e05 --- /dev/null +++ b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 ROSGRAPH_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define ROSGRAPH_MSGS__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_rosgraph_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_rosgraph_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_rosgraph_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_rosgraph_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_rosgraph_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_rosgraph_msgs ROSIDL_GENERATOR_CPP_EXPORT_rosgraph_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_rosgraph_msgs ROSIDL_GENERATOR_CPP_IMPORT_rosgraph_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_rosgraph_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_rosgraph_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_rosgraph_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_rosgraph_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // ROSGRAPH_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosgraph_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/rosgraph_msgs/rosgraph_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/action_type_support_struct.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/action_type_support_struct.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/action_type_support_struct.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/action_type_support_struct.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/message_initialization.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/message_initialization.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/message_type_support_struct.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/message_type_support_struct.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/primitives_sequence.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/primitives_sequence.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/primitives_sequence.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/primitives_sequence.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/primitives_sequence_functions.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/primitives_sequence_functions.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/primitives_sequence_functions.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/primitives_sequence_functions.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/sequence_bound.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/sequence_bound.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/service_type_support_struct.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/service_type_support_struct.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/string.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/string.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/string_bound.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string_bound.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/string_bound.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string_bound.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/string_functions.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string_functions.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/string_functions.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/string_functions.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/u16string.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/u16string.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/u16string.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/u16string.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/u16string_functions.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/u16string_functions.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/u16string_functions.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/u16string_functions.h diff --git a/ThirdParty/ros/include/rosidl_runtime_c/visibility_control.h b/ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_runtime_c/visibility_control.h rename to ThirdParty/ros/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/identifier.h b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/identifier.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_c/identifier.h rename to ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/identifier.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/message_type_support_dispatch.h b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/message_type_support_dispatch.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_c/message_type_support_dispatch.h rename to ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/message_type_support_dispatch.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/service_type_support_dispatch.h b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/service_type_support_dispatch.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_c/service_type_support_dispatch.h rename to ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/service_type_support_dispatch.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/type_support_map.h b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/type_support_map.h new file mode 100644 index 000000000..345a22228 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/type_support_map.h @@ -0,0 +1,52 @@ +// Copyright 2016 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ +#define ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Contains all available C typesupport handles to choose from. +typedef struct type_support_map_t +{ + // TODO(dirk-thomas) const should not be defined for the fields + // but should be set for the struct when it is being used + // same for rosidl_message_type_support_t et al + + /// Length of the `typesupport_identifier`, `symbol_name` and `data` arrays. + const size_t size; + + /// The ROS 2 package this is generated from. + const char * package_name; + + /// Array of identifiers for the type_supports. + const char * const * typesupport_identifier; + + /// Array of symbol names to get the typesupports. + const char * const * symbol_name; + + /// Array of pointers to type support handle functions that were successfully found. + void ** data; +} type_support_map_t; + +#ifdef __cplusplus +} +#endif + +#endif // ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_c/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_c/rosidl_typesupport_c/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_c/type_support_map.h b/ThirdParty/ros/include/rosidl_typesupport_c/type_support_map.h deleted file mode 100644 index 78719f6cd..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_c/type_support_map.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ -#define ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Contains all available C typesupport handles to choose from. -typedef struct type_support_map_t -{ - // TODO(dirk-thomas) const should not be defined for the fields - // but should be set for the struct when it is being used - // same for rosidl_message_type_support_t et al - - /// Length of the `typesupport_identidentifier`, `symbol_name` and `data` arrays. - const size_t size; - - /// The ROS 2 package this is generated from. - const char * package_name; - - /// Array of identifiers for the type_supports. - const char * const * typesupport_identifier; - - /// Array of symbol names to get the typesupports. - const char * const * symbol_name; - - /// Array of pointers to type support handle functions that were successfully found. - void ** data; -} type_support_map_t; - -#ifdef __cplusplus -} -#endif - -#endif // ROSIDL_TYPESUPPORT_C__TYPE_SUPPORT_MAP_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/action_type_support.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/action_type_support.hpp deleted file mode 100644 index e0befe2bc..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/action_type_support.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_CPP__ACTION_TYPE_SUPPORT_HPP_ -#define ROSIDL_TYPESUPPORT_CPP__ACTION_TYPE_SUPPORT_HPP_ - -#include -#include - -namespace rosidl_typesupport_cpp -{ - -template -const rosidl_action_type_support_t * get_action_type_support_handle(); - -} // namespace rosidl_typesupport_cpp - -#endif // ROSIDL_TYPESUPPORT_CPP__ACTION_TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support.hpp deleted file mode 100644 index 6fad1d7d5..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_CPP__MESSAGE_TYPE_SUPPORT_HPP_ -#define ROSIDL_TYPESUPPORT_CPP__MESSAGE_TYPE_SUPPORT_HPP_ - -#include -#include - -namespace rosidl_typesupport_cpp -{ - -template -const rosidl_message_type_support_t * get_message_type_support_handle(); - -} // namespace rosidl_typesupport_cpp - -#endif // ROSIDL_TYPESUPPORT_CPP__MESSAGE_TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/identifier.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/identifier.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_cpp/identifier.hpp rename to ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/identifier.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support_dispatch.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/message_type_support_dispatch.hpp similarity index 98% rename from ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support_dispatch.hpp rename to ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/message_type_support_dispatch.hpp index 14020501c..00c9cc98e 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/message_type_support_dispatch.hpp +++ b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/message_type_support_dispatch.hpp @@ -35,7 +35,7 @@ namespace rosidl_typesupport_cpp ROSIDL_TYPESUPPORT_CPP_PUBLIC const rosidl_message_type_support_t * get_message_typesupport_handle_function( - const rosidl_message_type_support_t * handle, const char * identifier); + const rosidl_message_type_support_t * handle, const char * identifier) noexcept; } // namespace rosidl_typesupport_cpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support_dispatch.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/service_type_support_dispatch.hpp similarity index 98% rename from ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support_dispatch.hpp rename to ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/service_type_support_dispatch.hpp index 73d94910f..ff4f11327 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support_dispatch.hpp +++ b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/service_type_support_dispatch.hpp @@ -35,7 +35,7 @@ namespace rosidl_typesupport_cpp ROSIDL_TYPESUPPORT_CPP_PUBLIC const rosidl_service_type_support_t * get_service_typesupport_handle_function( - const rosidl_service_type_support_t * handle, const char * identifier); + const rosidl_service_type_support_t * handle, const char * identifier) noexcept; } // namespace rosidl_typesupport_cpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/type_support_map.h b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/type_support_map.h new file mode 100644 index 000000000..9e708c07d --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/type_support_map.h @@ -0,0 +1,26 @@ +// Copyright 2016 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ +#define ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ + +// Keep this file not to break API. It was no more than +// a copy of rosidl_typesupport_c/type_support_map.h + +#warning rosidl_typesupport_cpp/type_support_map.h header is deprecated \ + in favor of rosidl_typesupport_c/type_support_map.h. + +#include "rosidl_typesupport_c/type_support_map.h" + +#endif // ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_cpp/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_cpp/rosidl_typesupport_cpp/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support.hpp b/ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support.hpp deleted file mode 100644 index d0fc4e58e..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/service_type_support.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_CPP__SERVICE_TYPE_SUPPORT_HPP_ -#define ROSIDL_TYPESUPPORT_CPP__SERVICE_TYPE_SUPPORT_HPP_ - -#include -#include - -namespace rosidl_typesupport_cpp -{ - -template -const rosidl_service_type_support_t * get_service_type_support_handle(); - -} // namespace rosidl_typesupport_cpp - -#endif // ROSIDL_TYPESUPPORT_CPP__SERVICE_TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_cpp/type_support_map.h b/ThirdParty/ros/include/rosidl_typesupport_cpp/type_support_map.h deleted file mode 100644 index 74e37e0a2..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_cpp/type_support_map.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ -#define ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ - -// Keep this file not to break API. It was no more than -// a copy of rosidl_typesupport_c/type_support_map.h - -#include "rosidl_typesupport_c/type_support_map.h" - -#endif // ROSIDL_TYPESUPPORT_CPP__TYPE_SUPPORT_MAP_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/identifier.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/identifier.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/identifier.h rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/identifier.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/wstring_conversion.hpp b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/wstring_conversion.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/wstring_conversion.hpp rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c/wstring_conversion.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/message_type_support.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/message_type_support.h deleted file mode 100644 index d3fd74b23..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/message_type_support.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2014-2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ -#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ - -#include "rosidl_runtime_c/message_type_support_struct.h" - -#include - -/// Encapsulates the callbacks for getting properties of this rosidl type. -/** - * These callbacks are implemented in the generated sources. - */ -typedef struct message_type_support_callbacks_t -{ - /// The C++ namespace of this message. - const char * message_namespace_; - - /// The typename of this message. - const char * message_name_; - - /// Callback function for message serialization - /** - * \param[in] untyped_ros_message Type erased pointer to message instance. - * \param [in,out] Serialized FastCDR data object. - * \return true if serialization succeeded, false otherwise. - */ - bool (* cdr_serialize)( - const void * untyped_ros_message, - eprosima::fastcdr::Cdr & cdr); - - /// Callback function for message deserialization - /** - * \param [in] Serialized FastCDR data object. - * \param[out] untyped_ros_message Type erased pointer to message instance. - * \return true if deserialization succeeded, false otherwise. - */ - bool (* cdr_deserialize)( - eprosima::fastcdr::Cdr & cdr, - void * untyped_ros_message); - - /// Callback function to get size of data - /** - * \return The size of the serialized message in bytes. - */ - uint32_t (* get_serialized_size)(const void *); - - /// Callback function to determine the maximum size needed for serialization, which is used for - /// type support initialization. - /** - * \param[out] Whether the maximum serialized size was fully bounded, (i.e. not unbounded strings - * or sequences). - * \return The maximum serialized size, in bytes. - */ - size_t (* max_serialized_size)(bool & full_bounded); -} message_type_support_callbacks_t; - -#endif // ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/identifier.hpp b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/identifier.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/identifier.hpp rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/identifier.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/message_type_support.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/message_type_support.h new file mode 100644 index 000000000..f6def5616 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/message_type_support.h @@ -0,0 +1,81 @@ +// Copyright 2014-2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ +#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ + +#include "rosidl_runtime_c/message_type_support_struct.h" + +#include + +/// Feature define to allow API version detection +#define ROSIDL_TYPESUPPORT_FASTRTPS_HAS_PLAIN_TYPES + +#define ROSIDL_TYPESUPPORT_FASTRTPS_UNBOUNDED_TYPE 0x00 +#define ROSIDL_TYPESUPPORT_FASTRTPS_BOUNDED_TYPE 0x01 +#define ROSIDL_TYPESUPPORT_FASTRTPS_PLAIN_TYPE 0x03 + +/// Encapsulates the callbacks for getting properties of this rosidl type. +/** + * These callbacks are implemented in the generated sources. + */ +typedef struct message_type_support_callbacks_t +{ + /// The C++ namespace of this message. + const char * message_namespace_; + + /// The typename of this message. + const char * message_name_; + + /// Callback function for message serialization + /** + * \param[in] untyped_ros_message Type erased pointer to message instance. + * \param [in,out] Serialized FastCDR data object. + * \return true if serialization succeeded, false otherwise. + */ + bool (* cdr_serialize)( + const void * untyped_ros_message, + eprosima::fastcdr::Cdr & cdr); + + /// Callback function for message deserialization + /** + * \param [in] Serialized FastCDR data object. + * \param[out] untyped_ros_message Type erased pointer to message instance. + * \return true if deserialization succeeded, false otherwise. + */ + bool (* cdr_deserialize)( + eprosima::fastcdr::Cdr & cdr, + void * untyped_ros_message); + + /// Callback function to get size of data + /** + * \return The size of the serialized message in bytes. + */ + uint32_t (* get_serialized_size)(const void *); + + /// Callback function to determine the maximum size needed for serialization, which is used for + /// type support initialization. + /** + * \param[out] bounds_info Bounds information for the type. + * May return one of the following values: + * - \c ROSIDL_TYPESUPPORT_FASTRTPS_PLAIN_TYPE for POD types + * - \c ROSIDL_TYPESUPPORT_FASTRTPS_BOUNDED_TYPE for fully bounded types, + * (i.e. not unbounded strings or sequences). + * - \c ROSIDL_TYPESUPPORT_FASTRTPS_UNBOUNDED_TYPE for unbounded types + * \return The maximum serialized size, in bytes. + */ + size_t (* max_serialized_size)(char & bounds_info); +} message_type_support_callbacks_t; + +#endif // ROSIDL_TYPESUPPORT_FASTRTPS_CPP__MESSAGE_TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/message_type_support_decl.hpp b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/message_type_support_decl.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/message_type_support_decl.hpp rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/message_type_support_decl.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/service_type_support.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/service_type_support.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/service_type_support.h rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/service_type_support.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/service_type_support_decl.hpp b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/service_type_support_decl.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/service_type_support_decl.hpp rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/service_type_support_decl.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/wstring_conversion.hpp b/ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/wstring_conversion.hpp similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/wstring_conversion.hpp rename to ThirdParty/ros/include/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp/wstring_conversion.hpp diff --git a/ThirdParty/ros/include/rosidl_typesupport_interface/macros.h b/ThirdParty/ros/include/rosidl_typesupport_interface/macros.h deleted file mode 100644 index 705bf2425..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_interface/macros.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2016 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ -#define ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ - -/// Declare the typesupport symbol name. Note: this should not be called directly. -#define ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ - typesupport_name, function_name, package_name, interface_type, interface_name) \ - typesupport_name ## __ ## function_name ## __ ## \ - package_name ## __ ## interface_type ## __ ## interface_name - -/// Declare a typesupport symbol name for a rosidl message definition. -#define ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \ - typesupport_name, package_name, interface_type, message_name) \ - ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ - typesupport_name, get_message_type_support_handle, \ - package_name, interface_type, message_name) - -/// Declare a typesupport symbol name for a rosidl service definition. -#define ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( \ - typesupport_name, package_name, interface_type, service_name) \ - ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ - typesupport_name, get_service_type_support_handle, \ - package_name, interface_type, service_name) - -/// Declare a typesupport symbol name for a rosidl action definition. -#define ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME( \ - typesupport_name, package_name, interface_type, action_name) \ - ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ - typesupport_name, get_action_type_support_handle, \ - package_name, interface_type, action_name) - -#endif // ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h b/ThirdParty/ros/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h new file mode 100644 index 000000000..aa619b252 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h @@ -0,0 +1,50 @@ +// Copyright 2016 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ +#define ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ + +/// Declare the typesupport library name. +#define ROSIDL_TYPESUPPORT_INTERFACE__LIBRARY_NAME( \ + typesupport_name, package_name) \ + package_name ## __ ## typesupport_name + +/// Declare the typesupport symbol name. Note: this should not be called directly. +#define ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ + typesupport_name, function_name, package_name, interface_type, interface_name) \ + typesupport_name ## __ ## function_name ## __ ## \ + package_name ## __ ## interface_type ## __ ## interface_name + +/// Declare a typesupport symbol name for a rosidl message definition. +#define ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( \ + typesupport_name, package_name, interface_type, message_name) \ + ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ + typesupport_name, get_message_type_support_handle, \ + package_name, interface_type, message_name) + +/// Declare a typesupport symbol name for a rosidl service definition. +#define ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( \ + typesupport_name, package_name, interface_type, service_name) \ + ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ + typesupport_name, get_service_type_support_handle, \ + package_name, interface_type, service_name) + +/// Declare a typesupport symbol name for a rosidl action definition. +#define ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME( \ + typesupport_name, package_name, interface_type, action_name) \ + ROSIDL_TYPESUPPORT_INTERFACE__SYMBOL_NAME( \ + typesupport_name, get_action_type_support_handle, \ + package_name, interface_type, action_name) + +#endif // ROSIDL_TYPESUPPORT_INTERFACE__MACROS_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/field_types.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/field_types.h deleted file mode 100644 index 30547b82b..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/field_types.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2014-2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ - -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -enum -{ - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT = 1, - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE = 2, - rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE = 3, - rosidl_typesupport_introspection_c__ROS_TYPE_CHAR = 4, - rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR = 5, - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN = 6, - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET = 7, - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8 = 8, - rosidl_typesupport_introspection_c__ROS_TYPE_INT8 = 9, - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16 = 10, - rosidl_typesupport_introspection_c__ROS_TYPE_INT16 = 11, - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32 = 12, - rosidl_typesupport_introspection_c__ROS_TYPE_INT32 = 13, - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64 = 14, - rosidl_typesupport_introspection_c__ROS_TYPE_INT64 = 15, - rosidl_typesupport_introspection_c__ROS_TYPE_STRING = 16, - rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING = 17, - - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE = 18, - - // for backward compatibility only - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32 = 1, - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64 = 2, - rosidl_typesupport_introspection_c__ROS_TYPE_BOOL = 6, - rosidl_typesupport_introspection_c__ROS_TYPE_BYTE = 7 -}; - -#ifdef __cplusplus -} -#endif - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/message_introspection.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/message_introspection.h deleted file mode 100644 index 79eadafc7..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/message_introspection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2014-2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ - -#include -#include -#include - -#include "rosidl_runtime_c/message_initialization.h" -#include "rosidl_runtime_c/message_type_support_struct.h" - -#include "rosidl_typesupport_introspection_c/visibility_control.h" - -typedef struct rosidl_typesupport_introspection_c__MessageMember -{ - const char * name_; - uint8_t type_id_; - size_t string_upper_bound_; - const rosidl_message_type_support_t * members_; - bool is_array_; - size_t array_size_; - bool is_upper_bound_; - uint32_t offset_; - const void * default_value_; - size_t (* size_function)(const void *); - const void * (*get_const_function)(const void *, size_t index); - void * (*get_function)(void *, size_t index); - bool (* resize_function)(void *, size_t size); -} rosidl_typesupport_introspection_c__MessageMember; - -typedef struct rosidl_typesupport_introspection_c__MessageMembers -{ - const char * message_namespace_; - const char * message_name_; - uint32_t member_count_; - size_t size_of_; - const rosidl_typesupport_introspection_c__MessageMember * members_; - void (* init_function)(void *, enum rosidl_runtime_c__message_initialization); - void (* fini_function)(void *); -} rosidl_typesupport_introspection_c__MessageMembers; - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/field_types.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/field_types.h new file mode 100644 index 000000000..cd336cd3b --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/field_types.h @@ -0,0 +1,82 @@ +// Copyright 2014-2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Possible types for message fields on a ROS message +/// The equivalent OMG IDL and C types of the different fields can be found +/// at http://design.ros2.org/articles/idl_interface_definition.html#type-mapping +enum rosidl_typesupport_introspection_c_field_types +{ + /// Equivalent to float in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT = 1, + /// Equivalent to double in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE = 2, + /// Equivalent to long double in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE = 3, + /// Equivalent to unsigned char in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_CHAR = 4, + /// Equivalent to char16_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR = 5, + /// Equivalent to _Bool in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN = 6, + /// Equivalent to unsigned char in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET = 7, + /// Equivalent to uint8_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8 = 8, + /// Equivalent to int8_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_INT8 = 9, + /// Equivalent to uint16_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16 = 10, + /// Equivalent to int16_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_INT16 = 11, + /// Equivalent to uint32_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32 = 12, + /// Equivalent to int32_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_INT32 = 13, + /// Equivalent to uint64_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64 = 14, + /// Equivalent to int64_t in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_INT64 = 15, + /// Equivalent to char * in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_STRING = 16, + /// Equivalent to char16_t * in C types. + rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING = 17, + + /// An embedded message type. + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE = 18, + + /// For backward compatibility only. + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32 = 1, + /// For backward compatibility only. + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64 = 2, + /// For backward compatibility only. + rosidl_typesupport_introspection_c__ROS_TYPE_BOOL = 6, + /// For backward compatibility only. + rosidl_typesupport_introspection_c__ROS_TYPE_BYTE = 7 +}; + +#ifdef __cplusplus +} +#endif + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__FIELD_TYPES_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/identifier.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/identifier.h similarity index 93% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_c/identifier.h rename to ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/identifier.h index 889831c0f..32f545536 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/identifier.h +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/identifier.h @@ -22,6 +22,7 @@ extern "C" { #endif +/// String identifying the typesupport introspection implementation in use. ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC extern const char * rosidl_typesupport_introspection_c__identifier; diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/message_introspection.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/message_introspection.h new file mode 100644 index 000000000..d5d220e08 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/message_introspection.h @@ -0,0 +1,100 @@ +// Copyright 2014-2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ + +#include +#include +#include + +#include "rosidl_runtime_c/message_initialization.h" +#include "rosidl_runtime_c/message_type_support_struct.h" + +#include "rosidl_typesupport_introspection_c/visibility_control.h" + +/// Structure used to describe a single field of an interface type. +typedef struct rosidl_typesupport_introspection_c__MessageMember_s +{ + /// The name of the field. + const char * name_; + /// The type of the field as a value of the field types enum + /// rosidl_typesupport_introspection_c_field_types. + /// e.g. rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT + uint8_t type_id_; + /// If the field is a string, the upper bound on the length of the string. + size_t string_upper_bound_; + /// If the type_id_ value is rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, + /// this points to an array describing the fields of the sub-interface. + const rosidl_message_type_support_t * members_; + /// True if this field is an array type, false if it is any other type. An + /// array has the same value for / type_id_. + bool is_array_; + /// If is_array_ is true, this contains the number of members in the array. + size_t array_size_; + /// If is_array_ is true, this specifies if the array has a maximum size. If it is true, the + /// value in array_size_ is the maximum size. + bool is_upper_bound_; + /// The bytes into the interface's in-memory representation that this field can be found at. + uint32_t offset_; + /// If the interface has a default value, this points to it. + const void * default_value_; + /// If is_array_ is true, a pointer to a function that gives the size of one member of the array. + size_t (* size_function)(const void *); + /// If is_array_ is true, a pointer to a function that gives a const pointer to the member of the + /// array indicated by index. + const void * (*get_const_function)(const void *, size_t index); + /// If is_array_ is true, a pointer to a function that gives a pointer to the member of the + /// array indicated by index. + void * (*get_function)(void *, size_t index); + /// Pointer to a function that fetches (i.e. copies) an item from + /// an array or sequence member. It takes a pointer to the member, + /// an index (which is assumed to be valid), and a pointer to a + /// pre-allocated value (which is assumed to be of the correct type). + /// + /// Available for array and sequence members. + void (* fetch_function)(const void *, size_t index, void *); + /// Pointer to a function that assigns (i.e. copies) a value to an + /// item in an array or sequence member. It takes a pointer to the + /// member, an index (which is assumed to be valid), and a pointer + /// to an initialized value (which is assumed to be of the correct + /// type). + /// + /// Available for array and sequence members. + void (* assign_function)(void *, size_t index, const void *); + /// If is_array_ is true, a pointer to a function that resizes the array. + bool (* resize_function)(void *, size_t size); +} rosidl_typesupport_introspection_c__MessageMember; + +/// Structure used to describe all fields of a single interface type. +typedef struct rosidl_typesupport_introspection_c__MessageMembers_s +{ + /// The namespace in which the interface resides, e.g. "example_messages__msg" for + /// example_messages/msg + const char * message_namespace_; + /// The name of the interface, e.g. "Int16" + const char * message_name_; + /// The number of fields in the interface + uint32_t member_count_; + /// The size of the interface structure in memory + size_t size_of_; + /// A pointer to the array that describes each field of the interface + const rosidl_typesupport_introspection_c__MessageMember * members_; + /// The function used to initialise the interface's in-memory representation + void (* init_function)(void *, enum rosidl_runtime_c__message_initialization); + /// The function used to clean up the interface's in-memory representation + void (* fini_function)(void *); +} rosidl_typesupport_introspection_c__MessageMembers; + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__MESSAGE_INTROSPECTION_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/service_introspection.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/service_introspection.h new file mode 100644 index 000000000..059ab00fc --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/service_introspection.h @@ -0,0 +1,41 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ + +#include +#include + +#include "rosidl_runtime_c/service_type_support_struct.h" +#include "rosidl_runtime_c/visibility_control.h" + +#include "rosidl_typesupport_introspection_c/message_introspection.h" + +/// This struct provides introspection information for one service definition. +/// A service is comprised of two interfaces: the request and the response. +typedef struct rosidl_typesupport_introspection_c__ServiceMembers_s +{ + /// The namespace in which the service resides, e.g. "example_messages__srv" for + /// example_messages/srv + const char * service_namespace_; + /// The name of the service, e.g. "AddTwoInts" + const char * service_name_; + /// A pointer to the introspection information structure for the request interface. + const rosidl_typesupport_introspection_c__MessageMembers * request_members_; + /// A pointer to the introspection information structure for the response interface. + const rosidl_typesupport_introspection_c__MessageMembers * response_members_; +} rosidl_typesupport_introspection_c__ServiceMembers; + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_c/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/service_introspection.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_c/service_introspection.h deleted file mode 100644 index c5d82a51b..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_c/service_introspection.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ - -#include -#include - -#include "rosidl_runtime_c/service_type_support_struct.h" -#include "rosidl_runtime_c/visibility_control.h" - -#include "rosidl_typesupport_introspection_c/message_introspection.h" - -typedef struct rosidl_typesupport_introspection_c__ServiceMembers -{ - const char * service_namespace_; - const char * service_name_; - const rosidl_typesupport_introspection_c__MessageMembers * request_members_; - const rosidl_typesupport_introspection_c__MessageMembers * response_members_; -} rosidl_typesupport_introspection_c__ServiceMembers; - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_C__SERVICE_INTROSPECTION_H_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/field_types.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/field_types.hpp deleted file mode 100644 index 978cf87f5..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/field_types.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2014 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ - -#include -#include - -namespace rosidl_typesupport_introspection_cpp -{ - -const uint8_t ROS_TYPE_FLOAT = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT; -const uint8_t ROS_TYPE_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE; -const uint8_t ROS_TYPE_LONG_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE; -const uint8_t ROS_TYPE_CHAR = rosidl_typesupport_introspection_c__ROS_TYPE_CHAR; -const uint8_t ROS_TYPE_WCHAR = rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR; -const uint8_t ROS_TYPE_BOOLEAN = rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN; -const uint8_t ROS_TYPE_OCTET = rosidl_typesupport_introspection_c__ROS_TYPE_OCTET; -const uint8_t ROS_TYPE_UINT8 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT8; -const uint8_t ROS_TYPE_INT8 = rosidl_typesupport_introspection_c__ROS_TYPE_INT8; -const uint8_t ROS_TYPE_UINT16 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT16; -const uint8_t ROS_TYPE_INT16 = rosidl_typesupport_introspection_c__ROS_TYPE_INT16; -const uint8_t ROS_TYPE_UINT32 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT32; -const uint8_t ROS_TYPE_INT32 = rosidl_typesupport_introspection_c__ROS_TYPE_INT32; -const uint8_t ROS_TYPE_UINT64 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT64; -const uint8_t ROS_TYPE_INT64 = rosidl_typesupport_introspection_c__ROS_TYPE_INT64; -const uint8_t ROS_TYPE_STRING = rosidl_typesupport_introspection_c__ROS_TYPE_STRING; -const uint8_t ROS_TYPE_WSTRING = rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING; - -const uint8_t ROS_TYPE_MESSAGE = rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE; - -// for backward compatibility only -const uint8_t ROS_TYPE_BOOL = rosidl_typesupport_introspection_c__ROS_TYPE_BOOL; -const uint8_t ROS_TYPE_BYTE = rosidl_typesupport_introspection_c__ROS_TYPE_BYTE; -const uint8_t ROS_TYPE_FLOAT32 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32; -const uint8_t ROS_TYPE_FLOAT64 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64; - -} // namespace rosidl_typesupport_introspection_cpp - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp deleted file mode 100644 index ff5747b14..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2014 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ - -#include -#include - -#include "rosidl_runtime_c/message_type_support_struct.h" - -#include "rosidl_runtime_cpp/message_initialization.hpp" - -#include "rosidl_typesupport_introspection_cpp/visibility_control.h" - -namespace rosidl_typesupport_introspection_cpp -{ - -typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMember -{ - const char * name_; - uint8_t type_id_; - size_t string_upper_bound_; - const rosidl_message_type_support_t * members_; - bool is_array_; - size_t array_size_; - bool is_upper_bound_; - uint32_t offset_; - const void * default_value_; - size_t (* size_function)(const void *); - const void * (*get_const_function)(const void *, size_t index); - void * (*get_function)(void *, size_t index); - void (* resize_function)(void *, size_t size); -} MessageMember; - -typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMembers -{ - const char * message_namespace_; - const char * message_name_; - uint32_t member_count_; - size_t size_of_; - const MessageMember * members_; - void (* init_function)(void *, rosidl_runtime_cpp::MessageInitialization); - void (* fini_function)(void *); -} MessageMembers; - -} // namespace rosidl_typesupport_introspection_cpp - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/field_types.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/field_types.hpp new file mode 100644 index 000000000..dc21f61f2 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/field_types.hpp @@ -0,0 +1,76 @@ +// Copyright 2014 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ + +#include +#include + +namespace rosidl_typesupport_introspection_cpp +{ +/// Possible types for message fields on a ROS message +/// The equivalent OMG IDL and C++ types of the different fields can be found +/// at http://design.ros2.org/articles/idl_interface_definition.html#type-mapping + +/// Equivalent to float in C++ types. +const uint8_t ROS_TYPE_FLOAT = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT; +/// Equivalent to double in C++ types. +const uint8_t ROS_TYPE_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE; +/// Equivalent to long double in C++ types. +const uint8_t ROS_TYPE_LONG_DOUBLE = rosidl_typesupport_introspection_c__ROS_TYPE_LONG_DOUBLE; +/// Equivalent to unsigned char in C++ types. +const uint8_t ROS_TYPE_CHAR = rosidl_typesupport_introspection_c__ROS_TYPE_CHAR; +/// Equivalent to char16_t in C++ types. +const uint8_t ROS_TYPE_WCHAR = rosidl_typesupport_introspection_c__ROS_TYPE_WCHAR; +/// Equivalent to bool in C++ types. +const uint8_t ROS_TYPE_BOOLEAN = rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN; +/// Equivalent to std::byte in C++ types. +const uint8_t ROS_TYPE_OCTET = rosidl_typesupport_introspection_c__ROS_TYPE_OCTET; +/// Equivalent to uint8_t in C++ types. +const uint8_t ROS_TYPE_UINT8 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT8; +/// Equivalent to int8_t in C++ types. +const uint8_t ROS_TYPE_INT8 = rosidl_typesupport_introspection_c__ROS_TYPE_INT8; +/// Equivalent to uint16_t in C++ types. +const uint8_t ROS_TYPE_UINT16 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT16; +/// Equivalent to int16_t in C++ types. +const uint8_t ROS_TYPE_INT16 = rosidl_typesupport_introspection_c__ROS_TYPE_INT16; +/// Equivalent to uint32_t in C++ types. +const uint8_t ROS_TYPE_UINT32 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT32; +/// Equivalent to int32_t in C++ types. +const uint8_t ROS_TYPE_INT32 = rosidl_typesupport_introspection_c__ROS_TYPE_INT32; +/// Equivalent to uint64_t in C++ types. +const uint8_t ROS_TYPE_UINT64 = rosidl_typesupport_introspection_c__ROS_TYPE_UINT64; +/// Equivalent to int64_t in C++ types. +const uint8_t ROS_TYPE_INT64 = rosidl_typesupport_introspection_c__ROS_TYPE_INT64; +/// Equivalent to std::string in C++ types. +const uint8_t ROS_TYPE_STRING = rosidl_typesupport_introspection_c__ROS_TYPE_STRING; +/// Equivalent to std::u16string in C++ types. +const uint8_t ROS_TYPE_WSTRING = rosidl_typesupport_introspection_c__ROS_TYPE_WSTRING; + +/// An embedded message type. +const uint8_t ROS_TYPE_MESSAGE = rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE; + +/// For backward compatibility only. +const uint8_t ROS_TYPE_BOOL = rosidl_typesupport_introspection_c__ROS_TYPE_BOOL; +/// For backward compatibility only. +const uint8_t ROS_TYPE_BYTE = rosidl_typesupport_introspection_c__ROS_TYPE_BYTE; +/// For backward compatibility only. +const uint8_t ROS_TYPE_FLOAT32 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT32; +/// For backward compatibility only. +const uint8_t ROS_TYPE_FLOAT64 = rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT64; + +} // namespace rosidl_typesupport_introspection_cpp + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__FIELD_TYPES_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/identifier.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/identifier.hpp similarity index 93% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/identifier.hpp rename to ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/identifier.hpp index f72410c69..26d875511 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/identifier.hpp +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/identifier.hpp @@ -20,6 +20,7 @@ namespace rosidl_typesupport_introspection_cpp { +/// String identifying the typesupport introspection implementation in use. ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_IMPORT extern const char * typesupport_identifier; diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_introspection.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_introspection.hpp new file mode 100644 index 000000000..2340f2c8c --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_introspection.hpp @@ -0,0 +1,109 @@ +// Copyright 2014 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ + +#include +#include + +#include "rosidl_runtime_c/message_type_support_struct.h" + +#include "rosidl_runtime_cpp/message_initialization.hpp" + +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace rosidl_typesupport_introspection_cpp +{ + +/// Structure used to describe a single field of an interface type. +typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMember_s +{ + /// The name of the field. + const char * name_; + /// The type of the field as a value of the field types enum, + /// e.g.rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT + uint8_t type_id_; + /// If the field is a string, the upper bound on the length of the string. + size_t string_upper_bound_; + /// If the type_id_ value is rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE + /// this points to an array describing the fields of the sub-interface. + const rosidl_message_type_support_t * members_; + /// True if this field is an array, false if it is a unary type. An array has the same value for + /// type_id_. + bool is_array_; + /// If is_array_ is true, this contains the number of members in the array. + size_t array_size_; + /// If is_array_ is true, this specifies if the array has a maximum size. If it is true, the + /// value in array_size_ is the maximum size. + bool is_upper_bound_; + /// The bytes into the interface's in-memory representation that this field can be found at. + uint32_t offset_; + /// If the interface has a default value, this points to it. + const void * default_value_; + /// If is_array_ is true, a pointer to a function that gives the size of array members. + /// First argument should be a pointer to the actual memory representation of the member. + size_t (* size_function)(const void *); + /// If is_array_ is true, a pointer to a function that gives a const pointer to the member of the + /// array indicated by index. + /// First argument should be a pointer to the actual memory representation of the member. + const void * (*get_const_function)(const void *, size_t index); + /// If is_array_ is true, a pointer to a function that gives a pointer to the member of the + /// array indicated by index. + /// First argument should be a pointer to the actual memory representation of the member. + void * (*get_function)(void *, size_t index); + /// Pointer to a function that fetches (i.e. copies) an item from + /// an array or sequence member. It takes a pointer to the member, + /// an index (which is assumed to be valid), and a pointer to a + /// pre-allocated value (which is assumed to be of the correct type). + /// + /// Available for array and sequence members. + void (* fetch_function)(const void *, size_t index, void *); + /// Pointer to a function that assigns (i.e. copies) a value to an + /// item in an array or sequence member. It takes a pointer to the + /// member, an index (which is assumed to be valid), and a pointer + /// to an initialized value (which is assumed to be of the correct + /// type). + /// + /// Available for array and sequence members. + void (* assign_function)(void *, size_t index, const void *); + /// If is_array_ is true, a pointer to a function that resizes the array. + /// First argument should be a pointer to the actual memory representation of the member. + void (* resize_function)(void *, size_t size); +} MessageMember; + +/// Structure used to describe all fields of a single interface type. +typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMembers_s +{ + /// The namespace in which the interface resides, e.g. for + /// example_messages/msg the namespaces generated would be + /// example_message::msg". + const char * message_namespace_; + /// The name of the interface, e.g. "Int16" + const char * message_name_; + /// The number of fields in the interface + uint32_t member_count_; + /// The size of the interface structure in memory + size_t size_of_; + /// A pointer to the array that describes each field of the interface + const MessageMember * members_; + /// The function used to initialise the interface's in-memory representation + void (* init_function)(void *, rosidl_runtime_cpp::MessageInitialization); + /// The function used to clean up the interface's in-memory representation + void (* fini_function)(void *); +} MessageMembers; + +} // namespace rosidl_typesupport_introspection_cpp + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_INTROSPECTION_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp similarity index 84% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp rename to ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp index 6b7579f52..97eece341 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp @@ -23,7 +23,10 @@ namespace rosidl_typesupport_introspection_cpp { -// This is implemented in the shared library provided by this package. +/// Returns a pointer to the type support structure provided by the +/// downstream libraries for introspecting interfaces generated by +/// the rosidl_generate_interfaces() macro. +/// This is implemented in the shared library provided by this package. template ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC const rosidl_message_type_support_t * get_message_type_support_handle(); diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_introspection.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_introspection.hpp new file mode 100644 index 000000000..df6f910d8 --- /dev/null +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_introspection.hpp @@ -0,0 +1,46 @@ +// Copyright 2015 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ +#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ + +#include +#include + +#include "rosidl_runtime_c/service_type_support_struct.h" +#include "rosidl_runtime_c/visibility_control.h" + +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" + +namespace rosidl_typesupport_introspection_cpp +{ + +/// This struct provides introspection information for one service definition. +/// A service is comprised of two interfaces: the request and the response. +typedef struct ServiceMembers_s +{ + /// The namespace in which the service resides, e.g. "example_messages::srv" + /// for example_messages/srv + const char * service_namespace_; + /// The name of the service, e.g. "AddTwoInts" + const char * service_name_; + /// A pointer to the introspection information structure for the request interface. + const MessageMembers * request_members_; + /// A pointer to the introspection information structure for the response interface. + const MessageMembers * response_members_; +} ServiceMembers; + +} // namespace rosidl_typesupport_introspection_cpp + +#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp similarity index 88% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp rename to ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp index 47fa80c33..eaa3db906 100644 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp +++ b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp @@ -23,7 +23,9 @@ namespace rosidl_typesupport_introspection_cpp { -// This is implemented in the shared library provided by this package. +/// Returns a pointer to the type support structure provided by this library for introspecting +/// services. +/// This is implemented in the shared library provided by this package. template ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC const rosidl_service_type_support_t * get_service_type_support_handle(); diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/visibility_control.h b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/visibility_control.h similarity index 100% rename from ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/visibility_control.h rename to ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp/visibility_control.h diff --git a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp b/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp deleted file mode 100644 index 58f943754..000000000 --- a/ThirdParty/ros/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 Open Source Robotics Foundation, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ -#define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ - -#include -#include - -#include "rosidl_runtime_c/service_type_support_struct.h" -#include "rosidl_runtime_c/visibility_control.h" - -#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" - -namespace rosidl_typesupport_introspection_cpp -{ - -typedef struct ServiceMembers -{ - const char * service_namespace_; - const char * service_name_; - const MessageMembers * request_members_; - const MessageMembers * response_members_; -} ServiceMembers; - -} // namespace rosidl_typesupport_introspection_cpp - -#endif // ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_INTROSPECTION_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/distortion_models.hpp b/ThirdParty/ros/include/sensor_msgs/distortion_models.hpp deleted file mode 100644 index 06a43073f..000000000 --- a/ThirdParty/ros/include/sensor_msgs/distortion_models.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2010, Willow Garage, Inc. -// Copyright (c) 2017, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the Willow Garage nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// This file is originally from: -// https://github.com/ros/common_msgs/blob/7dea912/sensor_msgs/include/sensor_msgs/distortion_models.h - -#ifndef SENSOR_MSGS__DISTORTION_MODELS_HPP_ -#define SENSOR_MSGS__DISTORTION_MODELS_HPP_ - -namespace sensor_msgs -{ -namespace distortion_models -{ -const char PLUMB_BOB[] = "plumb_bob"; -const char RATIONAL_POLYNOMIAL[] = "rational_polynomial"; -const char EQUIDISTANT[] = "equidistant"; -} -} - -#endif // SENSOR_MSGS__DISTORTION_MODELS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/fill_image.hpp b/ThirdParty/ros/include/sensor_msgs/fill_image.hpp deleted file mode 100644 index 9adb123ae..000000000 --- a/ThirdParty/ros/include/sensor_msgs/fill_image.hpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2008, Willow Garage, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the Willow Garage nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// This file is originally ported from ROS1: -// https://github.com/ros/common_msgs/blob/89069bc/sensor_msgs/include/sensor_msgs/fill_image.h - -#ifndef SENSOR_MSGS__FILL_IMAGE_HPP_ -#define SENSOR_MSGS__FILL_IMAGE_HPP_ - -#include -#include - -#include "sensor_msgs/msg/image.hpp" -#include "sensor_msgs/image_encodings.hpp" - -namespace sensor_msgs -{ -/// Fill an image message. -/** - * \param[out] image Image to be filled. - * \param[in] encoding_arg Encoding type, such as sensor_msgs::image_encodings::RGB8. - * \param[in] rows_arg Number of rows. - * \param[in] cols_arg Number of columns. - * \param[in] step_arg Step size. - * \param[in] data_arg Data to fill image with. - * \return True if successful. - */ -static inline bool fillImage( - msg::Image & image, - const std::string & encoding_arg, - uint32_t rows_arg, - uint32_t cols_arg, - uint32_t step_arg, - const void * data_arg) -{ - image.encoding = encoding_arg; - image.height = rows_arg; - image.width = cols_arg; - image.step = step_arg; - size_t st0 = (step_arg * rows_arg); - image.data.resize(st0); - std::memcpy(&image.data[0], data_arg, st0); - - image.is_bigendian = 0; - return true; -} - -/// Clear the data of an image message. -/** - * \details All fields but `data` are kept the same. - * \param[out]image Image to be cleared. - */ -static inline void clearImage(msg::Image & image) -{ - image.data.resize(0); -} -} // namespace sensor_msgs - -#endif // SENSOR_MSGS__FILL_IMAGE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/impl/point_cloud2_iterator.hpp b/ThirdParty/ros/include/sensor_msgs/impl/point_cloud2_iterator.hpp deleted file mode 100644 index 82a496578..000000000 --- a/ThirdParty/ros/include/sensor_msgs/impl/point_cloud2_iterator.hpp +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright (c) 2013, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the Open Source Robotics Foundation, Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// This file is originally from: -// https://github.com/ros/common_msgs/blob/50ee957/sensor_msgs/include/sensor_msgs/impl/point_cloud2_iterator.h - -#ifndef SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ -#define SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ - -#include -#include -#include -#include -#include - -/** - * \brief Private implementation used by PointCloud2Iterator - * \author Vincent Rabaud - */ - -namespace -{ -/** Return the size of a datatype (which is an enum of sensor_msgs::msg::PointField::) in bytes - * @param datatype one of the enums of sensor_msgs::msg::PointField:: - */ -inline int sizeOfPointField(int datatype) -{ - if ((datatype == sensor_msgs::msg::PointField::INT8) || - (datatype == sensor_msgs::msg::PointField::UINT8)) - { - return 1; - } else if ((datatype == sensor_msgs::msg::PointField::INT16) || // NOLINT - (datatype == sensor_msgs::msg::PointField::UINT16)) - { - return 2; - } else if ((datatype == sensor_msgs::msg::PointField::INT32) || // NOLINT - (datatype == sensor_msgs::msg::PointField::UINT32) || - (datatype == sensor_msgs::msg::PointField::FLOAT32)) - { - return 4; - } else if (datatype == sensor_msgs::msg::PointField::FLOAT64) { - return 8; - } else { - std::stringstream err; - err << "PointField of type " << datatype << " does not exist"; - throw std::runtime_error(err.str()); - } - return -1; -} - -/** Private function that adds a PointField to the "fields" member of a PointCloud2 - * @param cloud_msg the PointCloud2 to add a field to - * @param name the name of the field - * @param count the number of elements in the PointField - * @param datatype the datatype of the elements - * @param offset the offset of that element - * @return the offset of the next PointField that will be added to the PointCloud2 - */ -inline int addPointField( - sensor_msgs::msg::PointCloud2 & cloud_msg, - const std::string & name, int count, int datatype, - int offset) -{ - sensor_msgs::msg::PointField point_field; - point_field.name = name; - point_field.count = count; - point_field.datatype = datatype; - point_field.offset = offset; - cloud_msg.fields.push_back(point_field); - - // Update the offset - return offset + point_field.count * sizeOfPointField(datatype); -} -} // namespace - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace sensor_msgs -{ - -inline PointCloud2Modifier::PointCloud2Modifier( - sensor_msgs::msg::PointCloud2 & cloud_msg) -: cloud_msg_(cloud_msg) -{ -} - -inline size_t PointCloud2Modifier::size() const -{ - return cloud_msg_.data.size() / cloud_msg_.point_step; -} - -inline void PointCloud2Modifier::reserve(size_t size) -{ - cloud_msg_.data.reserve(size * cloud_msg_.point_step); -} - -inline void PointCloud2Modifier::resize(size_t size) -{ - cloud_msg_.data.resize(size * cloud_msg_.point_step); - - // Update height/width - if (cloud_msg_.height == 1) { - cloud_msg_.width = static_cast(size); - cloud_msg_.row_step = static_cast(size * cloud_msg_.point_step); - } else { - if (cloud_msg_.width == 1) { - cloud_msg_.height = static_cast(size); - } else { - cloud_msg_.height = 1; - cloud_msg_.width = static_cast(size); - cloud_msg_.row_step = static_cast(size * cloud_msg_.point_step); - } - } -} - -inline void PointCloud2Modifier::clear() -{ - cloud_msg_.data.clear(); - - // Update height/width - if (cloud_msg_.height == 1) { - cloud_msg_.row_step = cloud_msg_.width = 0; - } else { - if (cloud_msg_.width == 1) { - cloud_msg_.height = 0; - } else { - cloud_msg_.row_step = cloud_msg_.width = cloud_msg_.height = 0; - } - } -} - - -/** - * @brief Function setting some fields in a PointCloud and adjusting the - * internals of the PointCloud2 - * @param n_fields the number of fields to add. The fields are given as - * triplets: name of the field as char*, number of elements in the - * field, the datatype of the elements in the field - * - * E.g, you create your PointCloud2 message with XYZ/RGB as follows: - *
- *   setPointCloud2FieldsByString(cloud_msg, 4, "x", 1, sensor_msgs::msg::PointField::FLOAT32,
- *                                              "y", 1, sensor_msgs::msg::PointField::FLOAT32,
- *                                              "z", 1, sensor_msgs::msg::PointField::FLOAT32,
- *                                              "rgb", 1, sensor_msgs::msg::PointField::FLOAT32);
- * 
- * WARNING: THIS DOES NOT TAKE INTO ACCOUNT ANY PADDING AS DONE UNTIL HYDRO - * For simple usual cases, the overloaded setPointCloud2FieldsByString is what you want. - */ -inline void PointCloud2Modifier::setPointCloud2Fields(int n_fields, ...) -{ - cloud_msg_.fields.clear(); - cloud_msg_.fields.reserve(n_fields); - va_list vl; - va_start(vl, n_fields); - int offset = 0; - for (int i = 0; i < n_fields; ++i) { - // Create the corresponding PointField - std::string name(va_arg(vl, char *)); - int count(va_arg(vl, int)); - int datatype(va_arg(vl, int)); - offset = addPointField(cloud_msg_, name, count, datatype, offset); - } - va_end(vl); - - // Resize the point cloud accordingly - cloud_msg_.point_step = offset; - cloud_msg_.row_step = cloud_msg_.width * cloud_msg_.point_step; - cloud_msg_.data.resize(cloud_msg_.height * cloud_msg_.row_step); -} - -/** - * @brief Function setting some fields in a PointCloud and adjusting the - * internals of the PointCloud2 - * @param n_fields the number of fields to add. The fields are given as - * strings: "xyz" (3 floats), "rgb" (3 uchar stacked in a float), - * "rgba" (4 uchar stacked in a float) - * @return void - * - * WARNING: THIS FUNCTION DOES ADD ANY NECESSARY PADDING TRANSPARENTLY - */ -inline void PointCloud2Modifier::setPointCloud2FieldsByString(int n_fields, ...) -{ - cloud_msg_.fields.clear(); - cloud_msg_.fields.reserve(n_fields); - va_list vl; - va_start(vl, n_fields); - int offset = 0; - for (int i = 0; i < n_fields; ++i) { - // Create the corresponding PointFields - std::string - field_name = std::string(va_arg(vl, char *)); - if (field_name == "xyz") { - sensor_msgs::msg::PointField point_field; - // Do x, y and z - offset = addPointField( - cloud_msg_, "x", 1, sensor_msgs::msg::PointField::FLOAT32, offset); - offset = addPointField( - cloud_msg_, "y", 1, sensor_msgs::msg::PointField::FLOAT32, offset); - offset = addPointField( - cloud_msg_, "z", 1, sensor_msgs::msg::PointField::FLOAT32, offset); - offset += sizeOfPointField(sensor_msgs::msg::PointField::FLOAT32); - } else { - if ((field_name == "rgb") || (field_name == "rgba")) { - offset = addPointField( - cloud_msg_, field_name, 1, sensor_msgs::msg::PointField::FLOAT32, - offset); - offset += 3 * sizeOfPointField(sensor_msgs::msg::PointField::FLOAT32); - } else { - va_end(vl); - throw std::runtime_error("Field " + field_name + " does not exist"); - } - } - } - va_end(vl); - - // Resize the point cloud accordingly - cloud_msg_.point_step = offset; - cloud_msg_.row_step = cloud_msg_.width * cloud_msg_.point_step; - cloud_msg_.data.resize(cloud_msg_.height * cloud_msg_.row_step); -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace impl -{ - -/** - */ -template class V> -PointCloud2IteratorBase::PointCloud2IteratorBase() -: data_char_(0), data_(0), data_end_(0) -{ -} - -/** - * @param cloud_msg The PointCloud2 to iterate upon - * @param field_name The field to iterate upon - */ -template class V> -PointCloud2IteratorBase::PointCloud2IteratorBase( - C & cloud_msg, const std::string & field_name) -{ - int offset = set_field(cloud_msg, field_name); - - data_char_ = &(cloud_msg.data.front()) + offset; - data_ = reinterpret_cast(data_char_); - data_end_ = reinterpret_cast(&(cloud_msg.data.back()) + 1 + offset); -} - -/** Assignment operator - * @param iter the iterator to copy data from - * @return a reference to *this - */ -template class V> -V & PointCloud2IteratorBase::operator=(const V & iter) -{ - if (this != &iter) { - point_step_ = iter.point_step_; - data_char_ = iter.data_char_; - data_ = iter.data_; - data_end_ = iter.data_end_; - is_bigendian_ = iter.is_bigendian_; - } - - return *this; -} - -/** Access the i th element starting at the current pointer (useful when a field has several elements of the same - * type) - * @param i - * @return a reference to the i^th value from the current position - */ -template class V> -TT & PointCloud2IteratorBase::operator[](size_t i) const -{ - return *(data_ + i); -} - -/** Dereference the iterator. Equivalent to accessing it through [0] - * @return the value to which the iterator is pointing - */ -template class V> -TT & PointCloud2IteratorBase::operator*() const -{ - return *data_; -} - -/** Increase the iterator to the next element - * @return a reference to the updated iterator - */ -template class V> -V & PointCloud2IteratorBase::operator++() -{ - data_char_ += point_step_; - data_ = reinterpret_cast(data_char_); - return *static_cast *>(this); -} - -/** Basic pointer addition - * @param i the amount to increase the iterator by - * @return an iterator with an increased position - */ -template class V> -V PointCloud2IteratorBase::operator+(int i) -{ - V res = *static_cast *>(this); - - res.data_char_ += i * point_step_; - res.data_ = reinterpret_cast(res.data_char_); - - return res; -} - -/** Increase the iterator by a certain amount - * @return a reference to the updated iterator - */ -template class V> -V & PointCloud2IteratorBase::operator+=(int i) -{ - data_char_ += i * point_step_; - data_ = reinterpret_cast(data_char_); - return *static_cast *>(this); -} - -/** Compare to another iterator - * @return whether the current iterator points to a different address than the other one - */ -template class V> -bool PointCloud2IteratorBase::operator!=(const V & iter) const -{ - return iter.data_ != data_; -} - -/** Return the end iterator - * @return the end iterator (useful when performing normal iterator processing with ++) - */ -template class V> -V PointCloud2IteratorBase::end() const -{ - V res = *static_cast *>(this); - res.data_ = data_end_; - return res; -} - -/** Common code to set the field of the PointCloud2 - * @param cloud_msg the PointCloud2 to modify - * @param field_name the name of the field to iterate upon - * @return the offset at which the field is found - */ -template class V> -int PointCloud2IteratorBase::set_field( - const sensor_msgs::msg::PointCloud2 & cloud_msg, const std::string & field_name) -{ - is_bigendian_ = cloud_msg.is_bigendian; - point_step_ = cloud_msg.point_step; - // make sure the channel is valid - std::vector::const_iterator field_iter = cloud_msg.fields.begin(), - field_end = - cloud_msg.fields.end(); - while ((field_iter != field_end) && (field_iter->name != field_name)) { - ++field_iter; - } - - if (field_iter == field_end) { - // Handle the special case of r,g,b,a (we assume they are understood as the - // channels of an rgb or rgba field) - if ((field_name == "r") || (field_name == "g") || (field_name == "b") || (field_name == "a")) { - // Check that rgb or rgba is present - field_iter = cloud_msg.fields.begin(); - while ((field_iter != field_end) && (field_iter->name != "rgb") && - (field_iter->name != "rgba")) - { - ++field_iter; - } - if (field_iter == field_end) { - throw std::runtime_error("Field " + field_name + " does not exist"); - } - if (field_name == "r") { - if (is_bigendian_) { - return field_iter->offset + 1; - } else { - return field_iter->offset + 2; - } - } - if (field_name == "g") { - if (is_bigendian_) { - return field_iter->offset + 2; - } else { - return field_iter->offset + 1; - } - } - if (field_name == "b") { - if (is_bigendian_) { - return field_iter->offset + 3; - } else { - return field_iter->offset + 0; - } - } - if (field_name == "a") { - if (is_bigendian_) { - return field_iter->offset + 0; - } else { - return field_iter->offset + 3; - } - } - } else { - throw std::runtime_error("Field " + field_name + " does not exist"); - } - } - - return field_iter->offset; -} - -} // namespace impl -} // namespace sensor_msgs - -#endif // SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.h deleted file mode 100644 index cad6896d3..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.h +++ /dev/null @@ -1,191 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/BatteryState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'POWER_SUPPLY_STATUS_UNKNOWN'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_UNKNOWN = 0 -}; - -/// Constant 'POWER_SUPPLY_STATUS_CHARGING'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_CHARGING = 1 -}; - -/// Constant 'POWER_SUPPLY_STATUS_DISCHARGING'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_DISCHARGING = 2 -}; - -/// Constant 'POWER_SUPPLY_STATUS_NOT_CHARGING'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_NOT_CHARGING = 3 -}; - -/// Constant 'POWER_SUPPLY_STATUS_FULL'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_FULL = 4 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_UNKNOWN'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNKNOWN = 0 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_GOOD'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_GOOD = 1 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_OVERHEAT'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERHEAT = 2 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_DEAD'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_DEAD = 3 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_OVERVOLTAGE'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_UNSPEC_FAILURE'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_COLD'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_COLD = 6 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7 -}; - -/// Constant 'POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_UNKNOWN'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_NIMH'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NIMH = 1 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_LION'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LION = 2 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIPO'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIPO = 3 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIFE'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIFE = 4 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_NICD'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NICD = 5 -}; - -/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIMN'. -enum -{ - sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIMN = 6 -}; - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'cell_voltage' -// Member 'cell_temperature' -#include "rosidl_runtime_c/primitives_sequence.h" -// Member 'location' -// Member 'serial_number' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/BatteryState in the package sensor_msgs. -typedef struct sensor_msgs__msg__BatteryState -{ - std_msgs__msg__Header header; - float voltage; - float temperature; - float current; - float charge; - float capacity; - float design_capacity; - float percentage; - uint8_t power_supply_status; - uint8_t power_supply_health; - uint8_t power_supply_technology; - bool present; - rosidl_runtime_c__float__Sequence cell_voltage; - rosidl_runtime_c__float__Sequence cell_temperature; - rosidl_runtime_c__String location; - rosidl_runtime_c__String serial_number; -} sensor_msgs__msg__BatteryState; - -// Struct for a sequence of sensor_msgs__msg__BatteryState. -typedef struct sensor_msgs__msg__BatteryState__Sequence -{ - sensor_msgs__msg__BatteryState * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__BatteryState__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.hpp deleted file mode 100644 index 3c5a0fe19..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__struct.hpp +++ /dev/null @@ -1,425 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from sensor_msgs:msg/BatteryState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__sensor_msgs__msg__BatteryState __attribute__((deprecated)) -#else -# define DEPRECATED__sensor_msgs__msg__BatteryState __declspec(deprecated) -#endif - -namespace sensor_msgs -{ - -namespace msg -{ - -// message struct -template -struct BatteryState_ -{ - using Type = BatteryState_; - - explicit BatteryState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_init) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->voltage = 0.0f; - this->temperature = 0.0f; - this->current = 0.0f; - this->charge = 0.0f; - this->capacity = 0.0f; - this->design_capacity = 0.0f; - this->percentage = 0.0f; - this->power_supply_status = 0; - this->power_supply_health = 0; - this->power_supply_technology = 0; - this->present = false; - this->location = ""; - this->serial_number = ""; - } - } - - explicit BatteryState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_alloc, _init), - location(_alloc), - serial_number(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->voltage = 0.0f; - this->temperature = 0.0f; - this->current = 0.0f; - this->charge = 0.0f; - this->capacity = 0.0f; - this->design_capacity = 0.0f; - this->percentage = 0.0f; - this->power_supply_status = 0; - this->power_supply_health = 0; - this->power_supply_technology = 0; - this->present = false; - this->location = ""; - this->serial_number = ""; - } - } - - // field types and members - using _header_type = - std_msgs::msg::Header_; - _header_type header; - using _voltage_type = - float; - _voltage_type voltage; - using _temperature_type = - float; - _temperature_type temperature; - using _current_type = - float; - _current_type current; - using _charge_type = - float; - _charge_type charge; - using _capacity_type = - float; - _capacity_type capacity; - using _design_capacity_type = - float; - _design_capacity_type design_capacity; - using _percentage_type = - float; - _percentage_type percentage; - using _power_supply_status_type = - uint8_t; - _power_supply_status_type power_supply_status; - using _power_supply_health_type = - uint8_t; - _power_supply_health_type power_supply_health; - using _power_supply_technology_type = - uint8_t; - _power_supply_technology_type power_supply_technology; - using _present_type = - bool; - _present_type present; - using _cell_voltage_type = - std::vector::other>; - _cell_voltage_type cell_voltage; - using _cell_temperature_type = - std::vector::other>; - _cell_temperature_type cell_temperature; - using _location_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _location_type location; - using _serial_number_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _serial_number_type serial_number; - - // setters for named parameter idiom - Type & set__header( - const std_msgs::msg::Header_ & _arg) - { - this->header = _arg; - return *this; - } - Type & set__voltage( - const float & _arg) - { - this->voltage = _arg; - return *this; - } - Type & set__temperature( - const float & _arg) - { - this->temperature = _arg; - return *this; - } - Type & set__current( - const float & _arg) - { - this->current = _arg; - return *this; - } - Type & set__charge( - const float & _arg) - { - this->charge = _arg; - return *this; - } - Type & set__capacity( - const float & _arg) - { - this->capacity = _arg; - return *this; - } - Type & set__design_capacity( - const float & _arg) - { - this->design_capacity = _arg; - return *this; - } - Type & set__percentage( - const float & _arg) - { - this->percentage = _arg; - return *this; - } - Type & set__power_supply_status( - const uint8_t & _arg) - { - this->power_supply_status = _arg; - return *this; - } - Type & set__power_supply_health( - const uint8_t & _arg) - { - this->power_supply_health = _arg; - return *this; - } - Type & set__power_supply_technology( - const uint8_t & _arg) - { - this->power_supply_technology = _arg; - return *this; - } - Type & set__present( - const bool & _arg) - { - this->present = _arg; - return *this; - } - Type & set__cell_voltage( - const std::vector::other> & _arg) - { - this->cell_voltage = _arg; - return *this; - } - Type & set__cell_temperature( - const std::vector::other> & _arg) - { - this->cell_temperature = _arg; - return *this; - } - Type & set__location( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->location = _arg; - return *this; - } - Type & set__serial_number( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->serial_number = _arg; - return *this; - } - - // constant declarations - static constexpr uint8_t POWER_SUPPLY_STATUS_UNKNOWN = - 0u; - static constexpr uint8_t POWER_SUPPLY_STATUS_CHARGING = - 1u; - static constexpr uint8_t POWER_SUPPLY_STATUS_DISCHARGING = - 2u; - static constexpr uint8_t POWER_SUPPLY_STATUS_NOT_CHARGING = - 3u; - static constexpr uint8_t POWER_SUPPLY_STATUS_FULL = - 4u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_UNKNOWN = - 0u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_GOOD = - 1u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERHEAT = - 2u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_DEAD = - 3u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERVOLTAGE = - 4u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = - 5u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_COLD = - 6u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = - 7u; - static constexpr uint8_t POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = - 8u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_UNKNOWN = - 0u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NIMH = - 1u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LION = - 2u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIPO = - 3u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIFE = - 4u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NICD = - 5u; - static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIMN = - 6u; - - // pointer types - using RawPtr = - sensor_msgs::msg::BatteryState_ *; - using ConstRawPtr = - const sensor_msgs::msg::BatteryState_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__sensor_msgs__msg__BatteryState - std::shared_ptr> - Ptr; - typedef DEPRECATED__sensor_msgs__msg__BatteryState - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const BatteryState_ & other) const - { - if (this->header != other.header) { - return false; - } - if (this->voltage != other.voltage) { - return false; - } - if (this->temperature != other.temperature) { - return false; - } - if (this->current != other.current) { - return false; - } - if (this->charge != other.charge) { - return false; - } - if (this->capacity != other.capacity) { - return false; - } - if (this->design_capacity != other.design_capacity) { - return false; - } - if (this->percentage != other.percentage) { - return false; - } - if (this->power_supply_status != other.power_supply_status) { - return false; - } - if (this->power_supply_health != other.power_supply_health) { - return false; - } - if (this->power_supply_technology != other.power_supply_technology) { - return false; - } - if (this->present != other.present) { - return false; - } - if (this->cell_voltage != other.cell_voltage) { - return false; - } - if (this->cell_temperature != other.cell_temperature) { - return false; - } - if (this->location != other.location) { - return false; - } - if (this->serial_number != other.serial_number) { - return false; - } - return true; - } - bool operator!=(const BatteryState_ & other) const - { - return !this->operator==(other); - } -}; // struct BatteryState_ - -// alias to use template instance with default allocator -using BatteryState = - sensor_msgs::msg::BatteryState_>; - -// constant definitions -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_UNKNOWN; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_CHARGING; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_DISCHARGING; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_NOT_CHARGING; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_FULL; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_UNKNOWN; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_GOOD; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_OVERHEAT; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_DEAD; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_OVERVOLTAGE; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_UNSPEC_FAILURE; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_COLD; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_UNKNOWN; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_NIMH; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LION; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIPO; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIFE; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_NICD; -template -constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIMN; - -} // namespace msg - -} // namespace sensor_msgs - -#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__traits.hpp deleted file mode 100644 index f3e78e4a0..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/BatteryState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/battery_state__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::BatteryState"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/BatteryState"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.c deleted file mode 100644 index 9e7af6cbd..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.c +++ /dev/null @@ -1,320 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/BatteryState.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/battery_state__functions.h" -#include "sensor_msgs/msg/detail/battery_state__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `cell_voltage` -// Member `cell_temperature` -#include "rosidl_runtime_c/primitives_sequence_functions.h" -// Member `location` -// Member `serial_number` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void BatteryState__rosidl_typesupport_introspection_c__BatteryState_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; - sensor_msgs__msg__BatteryState__init(message_memory); -} - -void BatteryState__rosidl_typesupport_introspection_c__BatteryState_fini_function(void * message_memory) -{ - sensor_msgs__msg__BatteryState__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array[16] = { - { - "header", // 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(sensor_msgs__msg__BatteryState, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "voltage", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, voltage), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "temperature", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, temperature), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "current", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, current), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "charge", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, charge), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "capacity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, capacity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "design_capacity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, design_capacity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "percentage", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, percentage), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "power_supply_status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, power_supply_status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "power_supply_health", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, power_supply_health), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "power_supply_technology", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, power_supply_technology), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "present", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, present), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cell_voltage", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, cell_voltage), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "cell_temperature", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, cell_temperature), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "location", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, location), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "serial_number", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__BatteryState, serial_number), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_members = { - "sensor_msgs__msg", // message namespace - "BatteryState", // message name - 16, // number of fields - sizeof(sensor_msgs__msg__BatteryState), - BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array, // message members - BatteryState__rosidl_typesupport_introspection_c__BatteryState_init_function, // function to initialize message memory (memory has to be allocated) - BatteryState__rosidl_typesupport_introspection_c__BatteryState_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 BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle = { - 0, - &BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, BatteryState)() { - BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle.typesupport_identifier) { - BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.h deleted file mode 100644 index c86fc7ae0..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.h +++ /dev/null @@ -1,60 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/CameraInfo.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'distortion_model' -#include "rosidl_runtime_c/string.h" -// Member 'd' -#include "rosidl_runtime_c/primitives_sequence.h" -// Member 'roi' -#include "sensor_msgs/msg/detail/region_of_interest__struct.h" - -// Struct defined in msg/CameraInfo in the package sensor_msgs. -typedef struct sensor_msgs__msg__CameraInfo -{ - std_msgs__msg__Header header; - uint32_t height; - uint32_t width; - rosidl_runtime_c__String distortion_model; - rosidl_runtime_c__double__Sequence d; - double k[9]; - double r[9]; - double p[12]; - uint32_t binning_x; - uint32_t binning_y; - sensor_msgs__msg__RegionOfInterest roi; -} sensor_msgs__msg__CameraInfo; - -// Struct for a sequence of sensor_msgs__msg__CameraInfo. -typedef struct sensor_msgs__msg__CameraInfo__Sequence -{ - sensor_msgs__msg__CameraInfo * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__CameraInfo__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__traits.hpp deleted file mode 100644 index 99ab76001..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/CameraInfo.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/camera_info__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'roi' -#include "sensor_msgs/msg/detail/region_of_interest__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::CameraInfo"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/CameraInfo"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.c deleted file mode 100644 index 03255b803..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.c +++ /dev/null @@ -1,249 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/CameraInfo.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/camera_info__functions.h" -#include "sensor_msgs/msg/detail/camera_info__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `distortion_model` -#include "rosidl_runtime_c/string_functions.h" -// Member `d` -#include "rosidl_runtime_c/primitives_sequence_functions.h" -// Member `roi` -#include "sensor_msgs/msg/region_of_interest.h" -// Member `roi` -#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_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; - sensor_msgs__msg__CameraInfo__init(message_memory); -} - -void CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_fini_function(void * message_memory) -{ - sensor_msgs__msg__CameraInfo__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[11] = { - { - "header", // 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(sensor_msgs__msg__CameraInfo, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "distortion_model", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, distortion_model), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "d", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, d), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "k", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, k), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "r", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, r), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "p", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 12, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, p), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "binning_x", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, binning_x), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "binning_y", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CameraInfo, binning_y), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "roi", // 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(sensor_msgs__msg__CameraInfo, roi), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_members = { - "sensor_msgs__msg", // message namespace - "CameraInfo", // message name - 11, // number of fields - sizeof(sensor_msgs__msg__CameraInfo), - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array, // message members - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_init_function, // function to initialize message memory (memory has to be allocated) - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_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 CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle = { - 0, - &CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CameraInfo)() { - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[10].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)(); - if (!CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle.typesupport_identifier) { - CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.h deleted file mode 100644 index 505adc3de..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/ChannelFloat32.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'name' -#include "rosidl_runtime_c/string.h" -// Member 'values' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/ChannelFloat32 in the package sensor_msgs. -typedef struct sensor_msgs__msg__ChannelFloat32 -{ - rosidl_runtime_c__String name; - rosidl_runtime_c__float__Sequence values; -} sensor_msgs__msg__ChannelFloat32; - -// Struct for a sequence of sensor_msgs__msg__ChannelFloat32. -typedef struct sensor_msgs__msg__ChannelFloat32__Sequence -{ - sensor_msgs__msg__ChannelFloat32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__ChannelFloat32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__traits.hpp deleted file mode 100644 index 91ac86528..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/ChannelFloat32.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/channel_float32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::ChannelFloat32"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/ChannelFloat32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.c deleted file mode 100644 index 038d7f357..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.c +++ /dev/null @@ -1,102 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/ChannelFloat32.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/channel_float32__functions.h" -#include "sensor_msgs/msg/detail/channel_float32__struct.h" - - -// Include directives for member types -// Member `name` -#include "rosidl_runtime_c/string_functions.h" -// Member `values` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_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; - sensor_msgs__msg__ChannelFloat32__init(message_memory); -} - -void ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_fini_function(void * message_memory) -{ - sensor_msgs__msg__ChannelFloat32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_member_array[2] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__ChannelFloat32, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "values", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__ChannelFloat32, values), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_members = { - "sensor_msgs__msg", // message namespace - "ChannelFloat32", // message name - 2, // number of fields - sizeof(sensor_msgs__msg__ChannelFloat32), - ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_member_array, // message members - ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_init_function, // function to initialize message memory (memory has to be allocated) - ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_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 ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle = { - 0, - &ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, ChannelFloat32)() { - if (!ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle.typesupport_identifier) { - ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.h deleted file mode 100644 index 861029cbb..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/CompressedImage.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'format' -#include "rosidl_runtime_c/string.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/CompressedImage in the package sensor_msgs. -typedef struct sensor_msgs__msg__CompressedImage -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String format; - rosidl_runtime_c__uint8__Sequence data; -} sensor_msgs__msg__CompressedImage; - -// Struct for a sequence of sensor_msgs__msg__CompressedImage. -typedef struct sensor_msgs__msg__CompressedImage__Sequence -{ - sensor_msgs__msg__CompressedImage * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__CompressedImage__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__traits.hpp deleted file mode 100644 index 58629f9cb..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/CompressedImage.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/compressed_image__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::CompressedImage"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/CompressedImage"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.c deleted file mode 100644 index 7d3ed9113..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.c +++ /dev/null @@ -1,123 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/CompressedImage.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/compressed_image__functions.h" -#include "sensor_msgs/msg/detail/compressed_image__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `format` -#include "rosidl_runtime_c/string_functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_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; - sensor_msgs__msg__CompressedImage__init(message_memory); -} - -void CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_fini_function(void * message_memory) -{ - sensor_msgs__msg__CompressedImage__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__CompressedImage, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "format", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CompressedImage, format), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__CompressedImage, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_members = { - "sensor_msgs__msg", // message namespace - "CompressedImage", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__CompressedImage), - CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array, // message members - CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_init_function, // function to initialize message memory (memory has to be allocated) - CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_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 CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle = { - 0, - &CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CompressedImage)() { - CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle.typesupport_identifier) { - CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.h deleted file mode 100644 index 3fbba70e1..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.h +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/FluidPressure.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" - -// Struct defined in msg/FluidPressure in the package sensor_msgs. -typedef struct sensor_msgs__msg__FluidPressure -{ - std_msgs__msg__Header header; - double fluid_pressure; - double variance; -} sensor_msgs__msg__FluidPressure; - -// Struct for a sequence of sensor_msgs__msg__FluidPressure. -typedef struct sensor_msgs__msg__FluidPressure__Sequence -{ - sensor_msgs__msg__FluidPressure * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__FluidPressure__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__traits.hpp deleted file mode 100644 index ab6025c85..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/FluidPressure.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/fluid_pressure__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::FluidPressure"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/FluidPressure"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.c deleted file mode 100644 index 05f4cee69..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.c +++ /dev/null @@ -1,119 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/FluidPressure.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/fluid_pressure__functions.h" -#include "sensor_msgs/msg/detail/fluid_pressure__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_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; - sensor_msgs__msg__FluidPressure__init(message_memory); -} - -void FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_fini_function(void * message_memory) -{ - sensor_msgs__msg__FluidPressure__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__FluidPressure, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "fluid_pressure", // 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(sensor_msgs__msg__FluidPressure, fluid_pressure), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "variance", // 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(sensor_msgs__msg__FluidPressure, variance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_members = { - "sensor_msgs__msg", // message namespace - "FluidPressure", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__FluidPressure), - FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array, // message members - FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_init_function, // function to initialize message memory (memory has to be allocated) - FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_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 FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle = { - 0, - &FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, FluidPressure)() { - FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle.typesupport_identifier) { - FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.h deleted file mode 100644 index 6baf6b58f..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.h +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/Illuminance.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" - -// Struct defined in msg/Illuminance in the package sensor_msgs. -typedef struct sensor_msgs__msg__Illuminance -{ - std_msgs__msg__Header header; - double illuminance; - double variance; -} sensor_msgs__msg__Illuminance; - -// Struct for a sequence of sensor_msgs__msg__Illuminance. -typedef struct sensor_msgs__msg__Illuminance__Sequence -{ - sensor_msgs__msg__Illuminance * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__Illuminance__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__traits.hpp deleted file mode 100644 index 69e5a69aa..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Illuminance.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/illuminance__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Illuminance"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Illuminance"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.c deleted file mode 100644 index 459fe1574..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.c +++ /dev/null @@ -1,119 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Illuminance.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/illuminance__functions.h" -#include "sensor_msgs/msg/detail/illuminance__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Illuminance__rosidl_typesupport_introspection_c__Illuminance_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; - sensor_msgs__msg__Illuminance__init(message_memory); -} - -void Illuminance__rosidl_typesupport_introspection_c__Illuminance_fini_function(void * message_memory) -{ - sensor_msgs__msg__Illuminance__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__Illuminance, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "illuminance", // 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(sensor_msgs__msg__Illuminance, illuminance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "variance", // 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(sensor_msgs__msg__Illuminance, variance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_members = { - "sensor_msgs__msg", // message namespace - "Illuminance", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__Illuminance), - Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array, // message members - Illuminance__rosidl_typesupport_introspection_c__Illuminance_init_function, // function to initialize message memory (memory has to be allocated) - Illuminance__rosidl_typesupport_introspection_c__Illuminance_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 Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle = { - 0, - &Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Illuminance)() { - Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle.typesupport_identifier) { - Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.h deleted file mode 100644 index 002d0db88..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.h +++ /dev/null @@ -1,54 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/Image.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'encoding' -#include "rosidl_runtime_c/string.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Image in the package sensor_msgs. -typedef struct sensor_msgs__msg__Image -{ - std_msgs__msg__Header header; - uint32_t height; - uint32_t width; - rosidl_runtime_c__String encoding; - uint8_t is_bigendian; - uint32_t step; - rosidl_runtime_c__uint8__Sequence data; -} sensor_msgs__msg__Image; - -// Struct for a sequence of sensor_msgs__msg__Image. -typedef struct sensor_msgs__msg__Image__Sequence -{ - sensor_msgs__msg__Image * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__Image__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/image__traits.hpp deleted file mode 100644 index e95f60d7e..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Image.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/image__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Image"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Image"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.c deleted file mode 100644 index 3df955adf..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.c +++ /dev/null @@ -1,183 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Image.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/image__functions.h" -#include "sensor_msgs/msg/detail/image__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `encoding` -#include "rosidl_runtime_c/string_functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Image__rosidl_typesupport_introspection_c__Image_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; - sensor_msgs__msg__Image__init(message_memory); -} - -void Image__rosidl_typesupport_introspection_c__Image_fini_function(void * message_memory) -{ - sensor_msgs__msg__Image__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Image__rosidl_typesupport_introspection_c__Image_message_member_array[7] = { - { - "header", // 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(sensor_msgs__msg__Image, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "encoding", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, encoding), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "is_bigendian", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, is_bigendian), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "step", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, step), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Image, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Image__rosidl_typesupport_introspection_c__Image_message_members = { - "sensor_msgs__msg", // message namespace - "Image", // message name - 7, // number of fields - sizeof(sensor_msgs__msg__Image), - Image__rosidl_typesupport_introspection_c__Image_message_member_array, // message members - Image__rosidl_typesupport_introspection_c__Image_init_function, // function to initialize message memory (memory has to be allocated) - Image__rosidl_typesupport_introspection_c__Image_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 Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle = { - 0, - &Image__rosidl_typesupport_introspection_c__Image_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Image)() { - Image__rosidl_typesupport_introspection_c__Image_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle.typesupport_identifier) { - Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.h deleted file mode 100644 index 76a419c0c..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.h +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/Imu.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'orientation' -#include "geometry_msgs/msg/detail/quaternion__struct.h" -// Member 'angular_velocity' -// Member 'linear_acceleration' -#include "geometry_msgs/msg/detail/vector3__struct.h" - -// Struct defined in msg/Imu in the package sensor_msgs. -typedef struct sensor_msgs__msg__Imu -{ - std_msgs__msg__Header header; - geometry_msgs__msg__Quaternion orientation; - double orientation_covariance[9]; - geometry_msgs__msg__Vector3 angular_velocity; - double angular_velocity_covariance[9]; - geometry_msgs__msg__Vector3 linear_acceleration; - double linear_acceleration_covariance[9]; -} sensor_msgs__msg__Imu; - -// Struct for a sequence of sensor_msgs__msg__Imu. -typedef struct sensor_msgs__msg__Imu__Sequence -{ - sensor_msgs__msg__Imu * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__Imu__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__traits.hpp deleted file mode 100644 index 72915a1e2..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__traits.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Imu.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/imu__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'orientation' -#include "geometry_msgs/msg/detail/quaternion__traits.hpp" -// Member 'angular_velocity' -// Member 'linear_acceleration' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Imu"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Imu"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.c deleted file mode 100644 index 3f1cb3ec3..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.c +++ /dev/null @@ -1,195 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Imu.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/imu__functions.h" -#include "sensor_msgs/msg/detail/imu__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `orientation` -#include "geometry_msgs/msg/quaternion.h" -// Member `orientation` -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" -// Member `angular_velocity` -// Member `linear_acceleration` -#include "geometry_msgs/msg/vector3.h" -// Member `angular_velocity` -// Member `linear_acceleration` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Imu__rosidl_typesupport_introspection_c__Imu_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; - sensor_msgs__msg__Imu__init(message_memory); -} - -void Imu__rosidl_typesupport_introspection_c__Imu_fini_function(void * message_memory) -{ - sensor_msgs__msg__Imu__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[7] = { - { - "header", // 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(sensor_msgs__msg__Imu, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "orientation", // 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(sensor_msgs__msg__Imu, orientation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "orientation_covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Imu, orientation_covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angular_velocity", // 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(sensor_msgs__msg__Imu, angular_velocity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angular_velocity_covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Imu, angular_velocity_covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "linear_acceleration", // 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(sensor_msgs__msg__Imu, linear_acceleration), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "linear_acceleration_covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Imu, linear_acceleration_covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Imu__rosidl_typesupport_introspection_c__Imu_message_members = { - "sensor_msgs__msg", // message namespace - "Imu", // message name - 7, // number of fields - sizeof(sensor_msgs__msg__Imu), - Imu__rosidl_typesupport_introspection_c__Imu_message_member_array, // message members - Imu__rosidl_typesupport_introspection_c__Imu_init_function, // function to initialize message memory (memory has to be allocated) - Imu__rosidl_typesupport_introspection_c__Imu_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 Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle = { - 0, - &Imu__rosidl_typesupport_introspection_c__Imu_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Imu)() { - Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); - Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle.typesupport_identifier) { - Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.h deleted file mode 100644 index 7f9c77f03..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.h +++ /dev/null @@ -1,54 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/JointState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'name' -#include "rosidl_runtime_c/string.h" -// Member 'position' -// Member 'velocity' -// Member 'effort' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/JointState in the package sensor_msgs. -typedef struct sensor_msgs__msg__JointState -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String__Sequence name; - rosidl_runtime_c__double__Sequence position; - rosidl_runtime_c__double__Sequence velocity; - rosidl_runtime_c__double__Sequence effort; -} sensor_msgs__msg__JointState; - -// Struct for a sequence of sensor_msgs__msg__JointState. -typedef struct sensor_msgs__msg__JointState__Sequence -{ - sensor_msgs__msg__JointState * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__JointState__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__traits.hpp deleted file mode 100644 index de73f0306..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/JointState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/joint_state__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::JointState"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/JointState"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.c deleted file mode 100644 index 84a8d98e2..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.c +++ /dev/null @@ -1,155 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/JointState.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/joint_state__functions.h" -#include "sensor_msgs/msg/detail/joint_state__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `name` -#include "rosidl_runtime_c/string_functions.h" -// Member `position` -// Member `velocity` -// Member `effort` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void JointState__rosidl_typesupport_introspection_c__JointState_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; - sensor_msgs__msg__JointState__init(message_memory); -} - -void JointState__rosidl_typesupport_introspection_c__JointState_fini_function(void * message_memory) -{ - sensor_msgs__msg__JointState__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember JointState__rosidl_typesupport_introspection_c__JointState_message_member_array[5] = { - { - "header", // 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(sensor_msgs__msg__JointState, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JointState, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "position", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JointState, position), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "velocity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JointState, velocity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "effort", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JointState, effort), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers JointState__rosidl_typesupport_introspection_c__JointState_message_members = { - "sensor_msgs__msg", // message namespace - "JointState", // message name - 5, // number of fields - sizeof(sensor_msgs__msg__JointState), - JointState__rosidl_typesupport_introspection_c__JointState_message_member_array, // message members - JointState__rosidl_typesupport_introspection_c__JointState_init_function, // function to initialize message memory (memory has to be allocated) - JointState__rosidl_typesupport_introspection_c__JointState_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 JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle = { - 0, - &JointState__rosidl_typesupport_introspection_c__JointState_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JointState)() { - JointState__rosidl_typesupport_introspection_c__JointState_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle.typesupport_identifier) { - JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.cpp deleted file mode 100644 index 9aa0a29c7..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from sensor_msgs:msg/JointState.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 "sensor_msgs/msg/detail/joint_state__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 sensor_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void JointState_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) sensor_msgs::msg::JointState(_init); -} - -void JointState_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~JointState(); -} - -size_t size_function__JointState__name(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointState__name(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointState__name(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointState__name(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointState__position(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointState__position(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointState__position(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointState__position(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointState__velocity(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointState__velocity(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointState__velocity(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointState__velocity(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointState__effort(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointState__effort(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointState__effort(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointState__effort(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember JointState_message_member_array[5] = { - { - "header", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::JointState, header), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "name", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::JointState, name), // bytes offset in struct - nullptr, // default value - size_function__JointState__name, // size() function pointer - get_const_function__JointState__name, // get_const(index) function pointer - get_function__JointState__name, // get(index) function pointer - resize_function__JointState__name // resize(index) function pointer - }, - { - "position", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::JointState, position), // bytes offset in struct - nullptr, // default value - size_function__JointState__position, // size() function pointer - get_const_function__JointState__position, // get_const(index) function pointer - get_function__JointState__position, // get(index) function pointer - resize_function__JointState__position // resize(index) function pointer - }, - { - "velocity", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::JointState, velocity), // bytes offset in struct - nullptr, // default value - size_function__JointState__velocity, // size() function pointer - get_const_function__JointState__velocity, // get_const(index) function pointer - get_function__JointState__velocity, // get(index) function pointer - resize_function__JointState__velocity // resize(index) function pointer - }, - { - "effort", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::JointState, effort), // bytes offset in struct - nullptr, // default value - size_function__JointState__effort, // size() function pointer - get_const_function__JointState__effort, // get_const(index) function pointer - get_function__JointState__effort, // get(index) function pointer - resize_function__JointState__effort // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers JointState_message_members = { - "sensor_msgs::msg", // message namespace - "JointState", // message name - 5, // number of fields - sizeof(sensor_msgs::msg::JointState), - JointState_message_member_array, // message members - JointState_init_function, // function to initialize message memory (memory has to be allocated) - JointState_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t JointState_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &JointState_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace sensor_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::JointState_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, sensor_msgs, msg, JointState)() { - return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::JointState_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__traits.hpp deleted file mode 100644 index 9a8e19919..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Joy.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/joy__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Joy"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Joy"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.c deleted file mode 100644 index f54905d48..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Joy.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy__functions.h" -#include "sensor_msgs/msg/detail/joy__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `axes` -// Member `buttons` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Joy__rosidl_typesupport_introspection_c__Joy_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; - sensor_msgs__msg__Joy__init(message_memory); -} - -void Joy__rosidl_typesupport_introspection_c__Joy_fini_function(void * message_memory) -{ - sensor_msgs__msg__Joy__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Joy__rosidl_typesupport_introspection_c__Joy_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__Joy, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "axes", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Joy, axes), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "buttons", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Joy, buttons), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Joy__rosidl_typesupport_introspection_c__Joy_message_members = { - "sensor_msgs__msg", // message namespace - "Joy", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__Joy), - Joy__rosidl_typesupport_introspection_c__Joy_message_member_array, // message members - Joy__rosidl_typesupport_introspection_c__Joy_init_function, // function to initialize message memory (memory has to be allocated) - Joy__rosidl_typesupport_introspection_c__Joy_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 Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle = { - 0, - &Joy__rosidl_typesupport_introspection_c__Joy_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Joy)() { - Joy__rosidl_typesupport_introspection_c__Joy_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle.typesupport_identifier) { - Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__traits.hpp deleted file mode 100644 index 4cfdfc03f..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/JoyFeedback.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/joy_feedback__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::JoyFeedback"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/JoyFeedback"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.c deleted file mode 100644 index 79d2cbb96..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.c +++ /dev/null @@ -1,111 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/JoyFeedback.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy_feedback__functions.h" -#include "sensor_msgs/msg/detail/joy_feedback__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_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; - sensor_msgs__msg__JoyFeedback__init(message_memory); -} - -void JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_fini_function(void * message_memory) -{ - sensor_msgs__msg__JoyFeedback__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_member_array[3] = { - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JoyFeedback, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JoyFeedback, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "intensity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JoyFeedback, intensity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_members = { - "sensor_msgs__msg", // message namespace - "JoyFeedback", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__JoyFeedback), - JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_member_array, // message members - JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_init_function, // function to initialize message memory (memory has to be allocated) - JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_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 JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle = { - 0, - &JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedback)() { - if (!JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle.typesupport_identifier) { - JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp deleted file mode 100644 index 3e91719b1..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/JoyFeedbackArray.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/joy_feedback_array__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::JoyFeedbackArray"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/JoyFeedbackArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.c deleted file mode 100644 index 7d1cd96bd..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/JoyFeedbackArray.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy_feedback_array__functions.h" -#include "sensor_msgs/msg/detail/joy_feedback_array__struct.h" - - -// Include directives for member types -// Member `array` -#include "sensor_msgs/msg/joy_feedback.h" -// Member `array` -#include "sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_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; - sensor_msgs__msg__JoyFeedbackArray__init(message_memory); -} - -void JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_fini_function(void * message_memory) -{ - sensor_msgs__msg__JoyFeedbackArray__fini(message_memory); -} - -size_t JoyFeedbackArray__rosidl_typesupport_introspection_c__size_function__JoyFeedback__array( - const void * untyped_member) -{ - const sensor_msgs__msg__JoyFeedback__Sequence * member = - (const sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); - return member->size; -} - -const void * JoyFeedbackArray__rosidl_typesupport_introspection_c__get_const_function__JoyFeedback__array( - const void * untyped_member, size_t index) -{ - const sensor_msgs__msg__JoyFeedback__Sequence * member = - (const sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * JoyFeedbackArray__rosidl_typesupport_introspection_c__get_function__JoyFeedback__array( - void * untyped_member, size_t index) -{ - sensor_msgs__msg__JoyFeedback__Sequence * member = - (sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool JoyFeedbackArray__rosidl_typesupport_introspection_c__resize_function__JoyFeedback__array( - void * untyped_member, size_t size) -{ - sensor_msgs__msg__JoyFeedback__Sequence * member = - (sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); - sensor_msgs__msg__JoyFeedback__Sequence__fini(member); - return sensor_msgs__msg__JoyFeedback__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array[1] = { - { - "array", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__JoyFeedbackArray, array), // bytes offset in struct - NULL, // default value - JoyFeedbackArray__rosidl_typesupport_introspection_c__size_function__JoyFeedback__array, // size() function pointer - JoyFeedbackArray__rosidl_typesupport_introspection_c__get_const_function__JoyFeedback__array, // get_const(index) function pointer - JoyFeedbackArray__rosidl_typesupport_introspection_c__get_function__JoyFeedback__array, // get(index) function pointer - JoyFeedbackArray__rosidl_typesupport_introspection_c__resize_function__JoyFeedback__array // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_members = { - "sensor_msgs__msg", // message namespace - "JoyFeedbackArray", // message name - 1, // number of fields - sizeof(sensor_msgs__msg__JoyFeedbackArray), - JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array, // message members - JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_init_function, // function to initialize message memory (memory has to be allocated) - JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_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 JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle = { - 0, - &JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedbackArray)() { - JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedback)(); - if (!JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle.typesupport_identifier) { - JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__traits.hpp deleted file mode 100644 index 6ee436246..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/LaserEcho.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/laser_echo__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::LaserEcho"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/LaserEcho"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.c deleted file mode 100644 index f699c0e8e..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.c +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/LaserEcho.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/laser_echo__functions.h" -#include "sensor_msgs/msg/detail/laser_echo__struct.h" - - -// Include directives for member types -// Member `echoes` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_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; - sensor_msgs__msg__LaserEcho__init(message_memory); -} - -void LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_fini_function(void * message_memory) -{ - sensor_msgs__msg__LaserEcho__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_member_array[1] = { - { - "echoes", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserEcho, echoes), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_members = { - "sensor_msgs__msg", // message namespace - "LaserEcho", // message name - 1, // number of fields - sizeof(sensor_msgs__msg__LaserEcho), - LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_member_array, // message members - LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_init_function, // function to initialize message memory (memory has to be allocated) - LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_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 LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle = { - 0, - &LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)() { - if (!LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle.typesupport_identifier) { - LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.h deleted file mode 100644 index 1ac1f0fe8..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.h +++ /dev/null @@ -1,56 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/LaserScan.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'ranges' -// Member 'intensities' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/LaserScan in the package sensor_msgs. -typedef struct sensor_msgs__msg__LaserScan -{ - std_msgs__msg__Header header; - float angle_min; - float angle_max; - float angle_increment; - float time_increment; - float scan_time; - float range_min; - float range_max; - rosidl_runtime_c__float__Sequence ranges; - rosidl_runtime_c__float__Sequence intensities; -} sensor_msgs__msg__LaserScan; - -// Struct for a sequence of sensor_msgs__msg__LaserScan. -typedef struct sensor_msgs__msg__LaserScan__Sequence -{ - sensor_msgs__msg__LaserScan * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__LaserScan__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__traits.hpp deleted file mode 100644 index 39bfe863a..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/LaserScan.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/laser_scan__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::LaserScan"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/LaserScan"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.c deleted file mode 100644 index 54a6e7828..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.c +++ /dev/null @@ -1,227 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/LaserScan.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/laser_scan__functions.h" -#include "sensor_msgs/msg/detail/laser_scan__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `ranges` -// Member `intensities` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LaserScan__rosidl_typesupport_introspection_c__LaserScan_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; - sensor_msgs__msg__LaserScan__init(message_memory); -} - -void LaserScan__rosidl_typesupport_introspection_c__LaserScan_fini_function(void * message_memory) -{ - sensor_msgs__msg__LaserScan__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array[10] = { - { - "header", // 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(sensor_msgs__msg__LaserScan, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_min", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, angle_min), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_max", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, angle_max), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_increment", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, angle_increment), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "time_increment", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, time_increment), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "scan_time", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, scan_time), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "range_min", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, range_min), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "range_max", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, range_max), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ranges", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, ranges), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "intensities", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__LaserScan, intensities), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_members = { - "sensor_msgs__msg", // message namespace - "LaserScan", // message name - 10, // number of fields - sizeof(sensor_msgs__msg__LaserScan), - LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array, // message members - LaserScan__rosidl_typesupport_introspection_c__LaserScan_init_function, // function to initialize message memory (memory has to be allocated) - LaserScan__rosidl_typesupport_introspection_c__LaserScan_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 LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle = { - 0, - &LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserScan)() { - LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle.typesupport_identifier) { - LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.h deleted file mode 100644 index c58b06fe3..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.h +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/MagneticField.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'magnetic_field' -#include "geometry_msgs/msg/detail/vector3__struct.h" - -// Struct defined in msg/MagneticField in the package sensor_msgs. -typedef struct sensor_msgs__msg__MagneticField -{ - std_msgs__msg__Header header; - geometry_msgs__msg__Vector3 magnetic_field; - double magnetic_field_covariance[9]; -} sensor_msgs__msg__MagneticField; - -// Struct for a sequence of sensor_msgs__msg__MagneticField. -typedef struct sensor_msgs__msg__MagneticField__Sequence -{ - sensor_msgs__msg__MagneticField * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__MagneticField__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__traits.hpp deleted file mode 100644 index dba7c520a..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/MagneticField.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/magnetic_field__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'magnetic_field' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::MagneticField"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/MagneticField"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.c deleted file mode 100644 index 1be7cff98..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.c +++ /dev/null @@ -1,125 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/MagneticField.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/magnetic_field__functions.h" -#include "sensor_msgs/msg/detail/magnetic_field__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `magnetic_field` -#include "geometry_msgs/msg/vector3.h" -// Member `magnetic_field` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MagneticField__rosidl_typesupport_introspection_c__MagneticField_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; - sensor_msgs__msg__MagneticField__init(message_memory); -} - -void MagneticField__rosidl_typesupport_introspection_c__MagneticField_fini_function(void * message_memory) -{ - sensor_msgs__msg__MagneticField__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__MagneticField, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "magnetic_field", // 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(sensor_msgs__msg__MagneticField, magnetic_field), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "magnetic_field_covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MagneticField, magnetic_field_covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_members = { - "sensor_msgs__msg", // message namespace - "MagneticField", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__MagneticField), - MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array, // message members - MagneticField__rosidl_typesupport_introspection_c__MagneticField_init_function, // function to initialize message memory (memory has to be allocated) - MagneticField__rosidl_typesupport_introspection_c__MagneticField_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 MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle = { - 0, - &MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MagneticField)() { - MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - if (!MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle.typesupport_identifier) { - MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h deleted file mode 100644 index ebc1cc0e3..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h +++ /dev/null @@ -1,56 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/MultiDOFJointState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'joint_names' -#include "rosidl_runtime_c/string.h" -// Member 'transforms' -#include "geometry_msgs/msg/detail/transform__struct.h" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist__struct.h" -// Member 'wrench' -#include "geometry_msgs/msg/detail/wrench__struct.h" - -// Struct defined in msg/MultiDOFJointState in the package sensor_msgs. -typedef struct sensor_msgs__msg__MultiDOFJointState -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String__Sequence joint_names; - geometry_msgs__msg__Transform__Sequence transforms; - geometry_msgs__msg__Twist__Sequence twist; - geometry_msgs__msg__Wrench__Sequence wrench; -} sensor_msgs__msg__MultiDOFJointState; - -// Struct for a sequence of sensor_msgs__msg__MultiDOFJointState. -typedef struct sensor_msgs__msg__MultiDOFJointState__Sequence -{ - sensor_msgs__msg__MultiDOFJointState * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__MultiDOFJointState__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp deleted file mode 100644 index 30e9740a6..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/MultiDOFJointState.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::MultiDOFJointState"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/MultiDOFJointState"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c deleted file mode 100644 index 5d07501af..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c +++ /dev/null @@ -1,268 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/MultiDOFJointState.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/multi_dof_joint_state__functions.h" -#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `joint_names` -#include "rosidl_runtime_c/string_functions.h" -// Member `transforms` -#include "geometry_msgs/msg/transform.h" -// Member `transforms` -#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" -// Member `twist` -#include "geometry_msgs/msg/twist.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" -// Member `wrench` -#include "geometry_msgs/msg/wrench.h" -// Member `wrench` -#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_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; - sensor_msgs__msg__MultiDOFJointState__init(message_memory); -} - -void MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_fini_function(void * message_memory) -{ - sensor_msgs__msg__MultiDOFJointState__fini(message_memory); -} - -size_t MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Transform__transforms( - const void * untyped_member) -{ - const geometry_msgs__msg__Transform__Sequence * member = - (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Transform__transforms( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Transform__Sequence * member = - (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Transform__transforms( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Transform__Sequence * member = - (geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Transform__transforms( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Transform__Sequence * member = - (geometry_msgs__msg__Transform__Sequence *)(untyped_member); - geometry_msgs__msg__Transform__Sequence__fini(member); - return geometry_msgs__msg__Transform__Sequence__init(member, size); -} - -size_t MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Twist__twist( - const void * untyped_member) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Twist__twist( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Twist__twist( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Twist__twist( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - geometry_msgs__msg__Twist__Sequence__fini(member); - return geometry_msgs__msg__Twist__Sequence__init(member, size); -} - -size_t MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Wrench__wrench( - const void * untyped_member) -{ - const geometry_msgs__msg__Wrench__Sequence * member = - (const geometry_msgs__msg__Wrench__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Wrench__wrench( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Wrench__Sequence * member = - (const geometry_msgs__msg__Wrench__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Wrench__wrench( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Wrench__Sequence * member = - (geometry_msgs__msg__Wrench__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Wrench__wrench( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Wrench__Sequence * member = - (geometry_msgs__msg__Wrench__Sequence *)(untyped_member); - geometry_msgs__msg__Wrench__Sequence__fini(member); - return geometry_msgs__msg__Wrench__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[5] = { - { - "header", // 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(sensor_msgs__msg__MultiDOFJointState, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "joint_names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiDOFJointState, joint_names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "transforms", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiDOFJointState, transforms), // bytes offset in struct - NULL, // default value - MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Transform__transforms, // size() function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Transform__transforms, // get_const(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Transform__transforms, // get(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Transform__transforms // resize(index) function pointer - }, - { - "twist", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiDOFJointState, twist), // bytes offset in struct - NULL, // default value - MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Twist__twist, // size() function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Twist__twist, // get_const(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Twist__twist, // get(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Twist__twist // resize(index) function pointer - }, - { - "wrench", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiDOFJointState, wrench), // bytes offset in struct - NULL, // default value - MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__Wrench__wrench, // size() function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__Wrench__wrench, // get_const(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__Wrench__wrench, // get(index) function pointer - MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__Wrench__wrench // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_members = { - "sensor_msgs__msg", // message namespace - "MultiDOFJointState", // message name - 5, // number of fields - sizeof(sensor_msgs__msg__MultiDOFJointState), - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array, // message members - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_init_function, // function to initialize message memory (memory has to be allocated) - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_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 MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle = { - 0, - &MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MultiDOFJointState)() { - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)(); - if (!MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle.typesupport_identifier) { - MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp deleted file mode 100644 index bfe3c9571..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from sensor_msgs:msg/MultiDOFJointState.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 "sensor_msgs/msg/detail/multi_dof_joint_state__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 sensor_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void MultiDOFJointState_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) sensor_msgs::msg::MultiDOFJointState(_init); -} - -void MultiDOFJointState_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~MultiDOFJointState(); -} - -size_t size_function__MultiDOFJointState__joint_names(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiDOFJointState__joint_names(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiDOFJointState__joint_names(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiDOFJointState__joint_names(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__MultiDOFJointState__transforms(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiDOFJointState__transforms(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiDOFJointState__transforms(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiDOFJointState__transforms(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__MultiDOFJointState__twist(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiDOFJointState__twist(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiDOFJointState__twist(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiDOFJointState__twist(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__MultiDOFJointState__wrench(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiDOFJointState__wrench(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiDOFJointState__wrench(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiDOFJointState__wrench(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJointState_message_member_array[5] = { - { - "header", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::MultiDOFJointState, header), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "joint_names", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::MultiDOFJointState, joint_names), // bytes offset in struct - nullptr, // default value - size_function__MultiDOFJointState__joint_names, // size() function pointer - get_const_function__MultiDOFJointState__joint_names, // get_const(index) function pointer - get_function__MultiDOFJointState__joint_names, // get(index) function pointer - resize_function__MultiDOFJointState__joint_names // resize(index) function pointer - }, - { - "transforms", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::MultiDOFJointState, transforms), // bytes offset in struct - nullptr, // default value - size_function__MultiDOFJointState__transforms, // size() function pointer - get_const_function__MultiDOFJointState__transforms, // get_const(index) function pointer - get_function__MultiDOFJointState__transforms, // get(index) function pointer - resize_function__MultiDOFJointState__transforms // resize(index) function pointer - }, - { - "twist", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::MultiDOFJointState, twist), // bytes offset in struct - nullptr, // default value - size_function__MultiDOFJointState__twist, // size() function pointer - get_const_function__MultiDOFJointState__twist, // get_const(index) function pointer - get_function__MultiDOFJointState__twist, // get(index) function pointer - resize_function__MultiDOFJointState__twist // resize(index) function pointer - }, - { - "wrench", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs::msg::MultiDOFJointState, wrench), // bytes offset in struct - nullptr, // default value - size_function__MultiDOFJointState__wrench, // size() function pointer - get_const_function__MultiDOFJointState__wrench, // get_const(index) function pointer - get_function__MultiDOFJointState__wrench, // get(index) function pointer - resize_function__MultiDOFJointState__wrench // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiDOFJointState_message_members = { - "sensor_msgs::msg", // message namespace - "MultiDOFJointState", // message name - 5, // number of fields - sizeof(sensor_msgs::msg::MultiDOFJointState), - MultiDOFJointState_message_member_array, // message members - MultiDOFJointState_init_function, // function to initialize message memory (memory has to be allocated) - MultiDOFJointState_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t MultiDOFJointState_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &MultiDOFJointState_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace sensor_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::MultiDOFJointState_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, sensor_msgs, msg, MultiDOFJointState)() { - return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::MultiDOFJointState_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h deleted file mode 100644 index 97d9ead29..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h +++ /dev/null @@ -1,56 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/MultiEchoLaserScan.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'ranges' -// Member 'intensities' -#include "sensor_msgs/msg/detail/laser_echo__struct.h" - -// Struct defined in msg/MultiEchoLaserScan in the package sensor_msgs. -typedef struct sensor_msgs__msg__MultiEchoLaserScan -{ - std_msgs__msg__Header header; - float angle_min; - float angle_max; - float angle_increment; - float time_increment; - float scan_time; - float range_min; - float range_max; - sensor_msgs__msg__LaserEcho__Sequence ranges; - sensor_msgs__msg__LaserEcho__Sequence intensities; -} sensor_msgs__msg__MultiEchoLaserScan; - -// Struct for a sequence of sensor_msgs__msg__MultiEchoLaserScan. -typedef struct sensor_msgs__msg__MultiEchoLaserScan__Sequence -{ - sensor_msgs__msg__MultiEchoLaserScan * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__MultiEchoLaserScan__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp deleted file mode 100644 index f0ab45683..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/MultiEchoLaserScan.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::MultiEchoLaserScan"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/MultiEchoLaserScan"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c deleted file mode 100644 index d3cbd8789..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c +++ /dev/null @@ -1,300 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/MultiEchoLaserScan.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h" -#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `ranges` -// Member `intensities` -#include "sensor_msgs/msg/laser_echo.h" -// Member `ranges` -// Member `intensities` -#include "sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_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; - sensor_msgs__msg__MultiEchoLaserScan__init(message_memory); -} - -void MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_fini_function(void * message_memory) -{ - sensor_msgs__msg__MultiEchoLaserScan__fini(message_memory); -} - -size_t MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__LaserEcho__ranges( - const void * untyped_member) -{ - const sensor_msgs__msg__LaserEcho__Sequence * member = - (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__ranges( - const void * untyped_member, size_t index) -{ - const sensor_msgs__msg__LaserEcho__Sequence * member = - (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__LaserEcho__ranges( - void * untyped_member, size_t index) -{ - sensor_msgs__msg__LaserEcho__Sequence * member = - (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__LaserEcho__ranges( - void * untyped_member, size_t size) -{ - sensor_msgs__msg__LaserEcho__Sequence * member = - (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - sensor_msgs__msg__LaserEcho__Sequence__fini(member); - return sensor_msgs__msg__LaserEcho__Sequence__init(member, size); -} - -size_t MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__LaserEcho__intensities( - const void * untyped_member) -{ - const sensor_msgs__msg__LaserEcho__Sequence * member = - (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__intensities( - const void * untyped_member, size_t index) -{ - const sensor_msgs__msg__LaserEcho__Sequence * member = - (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__LaserEcho__intensities( - void * untyped_member, size_t index) -{ - sensor_msgs__msg__LaserEcho__Sequence * member = - (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__LaserEcho__intensities( - void * untyped_member, size_t size) -{ - sensor_msgs__msg__LaserEcho__Sequence * member = - (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); - sensor_msgs__msg__LaserEcho__Sequence__fini(member); - return sensor_msgs__msg__LaserEcho__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[10] = { - { - "header", // 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(sensor_msgs__msg__MultiEchoLaserScan, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_min", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_min), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_max", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_max), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "angle_increment", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_increment), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "time_increment", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, time_increment), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "scan_time", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, scan_time), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "range_min", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, range_min), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "range_max", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, range_max), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ranges", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, ranges), // bytes offset in struct - NULL, // default value - MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__LaserEcho__ranges, // size() function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__ranges, // get_const(index) function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__LaserEcho__ranges, // get(index) function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__LaserEcho__ranges // resize(index) function pointer - }, - { - "intensities", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__MultiEchoLaserScan, intensities), // bytes offset in struct - NULL, // default value - MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__LaserEcho__intensities, // size() function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__intensities, // get_const(index) function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__LaserEcho__intensities, // get(index) function pointer - MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__LaserEcho__intensities // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_members = { - "sensor_msgs__msg", // message namespace - "MultiEchoLaserScan", // message name - 10, // number of fields - sizeof(sensor_msgs__msg__MultiEchoLaserScan), - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array, // message members - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_init_function, // function to initialize message memory (memory has to be allocated) - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_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 MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle = { - 0, - &MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MultiEchoLaserScan)() { - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[8].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)(); - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[9].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)(); - if (!MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle.typesupport_identifier) { - MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.h deleted file mode 100644 index 618c19afc..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.h +++ /dev/null @@ -1,76 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/NavSatFix.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'COVARIANCE_TYPE_UNKNOWN'. -enum -{ - sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_UNKNOWN = 0 -}; - -/// Constant 'COVARIANCE_TYPE_APPROXIMATED'. -enum -{ - sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_APPROXIMATED = 1 -}; - -/// Constant 'COVARIANCE_TYPE_DIAGONAL_KNOWN'. -enum -{ - sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 -}; - -/// Constant 'COVARIANCE_TYPE_KNOWN'. -enum -{ - sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_KNOWN = 3 -}; - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'status' -#include "sensor_msgs/msg/detail/nav_sat_status__struct.h" - -// Struct defined in msg/NavSatFix in the package sensor_msgs. -typedef struct sensor_msgs__msg__NavSatFix -{ - std_msgs__msg__Header header; - sensor_msgs__msg__NavSatStatus status; - double latitude; - double longitude; - double altitude; - double position_covariance[9]; - uint8_t position_covariance_type; -} sensor_msgs__msg__NavSatFix; - -// Struct for a sequence of sensor_msgs__msg__NavSatFix. -typedef struct sensor_msgs__msg__NavSatFix__Sequence -{ - sensor_msgs__msg__NavSatFix * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__NavSatFix__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp deleted file mode 100644 index b4f16624b..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/NavSatFix.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/nav_sat_fix__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'status' -#include "sensor_msgs/msg/detail/nav_sat_status__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::NavSatFix"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/NavSatFix"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.c deleted file mode 100644 index 8ab70c412..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.c +++ /dev/null @@ -1,185 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/NavSatFix.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/nav_sat_fix__functions.h" -#include "sensor_msgs/msg/detail/nav_sat_fix__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `status` -#include "sensor_msgs/msg/nav_sat_status.h" -// Member `status` -#include "sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_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; - sensor_msgs__msg__NavSatFix__init(message_memory); -} - -void NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_fini_function(void * message_memory) -{ - sensor_msgs__msg__NavSatFix__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[7] = { - { - "header", // 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(sensor_msgs__msg__NavSatFix, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status", // 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(sensor_msgs__msg__NavSatFix, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "latitude", // 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(sensor_msgs__msg__NavSatFix, latitude), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "longitude", // 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(sensor_msgs__msg__NavSatFix, longitude), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "altitude", // 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(sensor_msgs__msg__NavSatFix, altitude), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "position_covariance", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 9, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__NavSatFix, position_covariance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "position_covariance_type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__NavSatFix, position_covariance_type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_members = { - "sensor_msgs__msg", // message namespace - "NavSatFix", // message name - 7, // number of fields - sizeof(sensor_msgs__msg__NavSatFix), - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array, // message members - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_init_function, // function to initialize message memory (memory has to be allocated) - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_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 NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle = { - 0, - &NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatFix)() { - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatStatus)(); - if (!NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle.typesupport_identifier) { - NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.h deleted file mode 100644 index 6f9868a55..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.h +++ /dev/null @@ -1,89 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/NavSatStatus.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'STATUS_NO_FIX'. -enum -{ - sensor_msgs__msg__NavSatStatus__STATUS_NO_FIX = -1 -}; - -/// Constant 'STATUS_FIX'. -enum -{ - sensor_msgs__msg__NavSatStatus__STATUS_FIX = 0 -}; - -/// Constant 'STATUS_SBAS_FIX'. -enum -{ - sensor_msgs__msg__NavSatStatus__STATUS_SBAS_FIX = 1 -}; - -/// Constant 'STATUS_GBAS_FIX'. -enum -{ - sensor_msgs__msg__NavSatStatus__STATUS_GBAS_FIX = 2 -}; - -/// Constant 'SERVICE_GPS'. -enum -{ - sensor_msgs__msg__NavSatStatus__SERVICE_GPS = 1 -}; - -/// Constant 'SERVICE_GLONASS'. -enum -{ - sensor_msgs__msg__NavSatStatus__SERVICE_GLONASS = 2 -}; - -/// Constant 'SERVICE_COMPASS'. -enum -{ - sensor_msgs__msg__NavSatStatus__SERVICE_COMPASS = 4 -}; - -/// Constant 'SERVICE_GALILEO'. -enum -{ - sensor_msgs__msg__NavSatStatus__SERVICE_GALILEO = 8 -}; - -// Struct defined in msg/NavSatStatus in the package sensor_msgs. -typedef struct sensor_msgs__msg__NavSatStatus -{ - int8_t status; - uint16_t service; -} sensor_msgs__msg__NavSatStatus; - -// Struct for a sequence of sensor_msgs__msg__NavSatStatus. -typedef struct sensor_msgs__msg__NavSatStatus__Sequence -{ - sensor_msgs__msg__NavSatStatus * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__NavSatStatus__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__traits.hpp deleted file mode 100644 index 6f0c0a640..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/NavSatStatus.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/nav_sat_status__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::NavSatStatus"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/NavSatStatus"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.c deleted file mode 100644 index a1e2adc0b..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.c +++ /dev/null @@ -1,96 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/NavSatStatus.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/nav_sat_status__functions.h" -#include "sensor_msgs/msg/detail/nav_sat_status__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_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; - sensor_msgs__msg__NavSatStatus__init(message_memory); -} - -void NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_fini_function(void * message_memory) -{ - sensor_msgs__msg__NavSatStatus__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_member_array[2] = { - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__NavSatStatus, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "service", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__NavSatStatus, service), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_members = { - "sensor_msgs__msg", // message namespace - "NavSatStatus", // message name - 2, // number of fields - sizeof(sensor_msgs__msg__NavSatStatus), - NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_member_array, // message members - NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_init_function, // function to initialize message memory (memory has to be allocated) - NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_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 NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle = { - 0, - &NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatStatus)() { - if (!NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle.typesupport_identifier) { - NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.h deleted file mode 100644 index 6a7ed88d1..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.h +++ /dev/null @@ -1,56 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/PointCloud2.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'fields' -#include "sensor_msgs/msg/detail/point_field__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/PointCloud2 in the package sensor_msgs. -typedef struct sensor_msgs__msg__PointCloud2 -{ - std_msgs__msg__Header header; - uint32_t height; - uint32_t width; - sensor_msgs__msg__PointField__Sequence fields; - bool is_bigendian; - uint32_t point_step; - uint32_t row_step; - rosidl_runtime_c__uint8__Sequence data; - bool is_dense; -} sensor_msgs__msg__PointCloud2; - -// Struct for a sequence of sensor_msgs__msg__PointCloud2. -typedef struct sensor_msgs__msg__PointCloud2__Sequence -{ - sensor_msgs__msg__PointCloud2 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__PointCloud2__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__traits.hpp deleted file mode 100644 index e2fd87984..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/PointCloud2.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/point_cloud2__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::PointCloud2"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/PointCloud2"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.c deleted file mode 100644 index 916f649cb..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.c +++ /dev/null @@ -1,250 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/PointCloud2.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_cloud2__functions.h" -#include "sensor_msgs/msg/detail/point_cloud2__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `fields` -#include "sensor_msgs/msg/point_field.h" -// Member `fields` -#include "sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_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; - sensor_msgs__msg__PointCloud2__init(message_memory); -} - -void PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_fini_function(void * message_memory) -{ - sensor_msgs__msg__PointCloud2__fini(message_memory); -} - -size_t PointCloud2__rosidl_typesupport_introspection_c__size_function__PointField__fields( - const void * untyped_member) -{ - const sensor_msgs__msg__PointField__Sequence * member = - (const sensor_msgs__msg__PointField__Sequence *)(untyped_member); - return member->size; -} - -const void * PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointField__fields( - const void * untyped_member, size_t index) -{ - const sensor_msgs__msg__PointField__Sequence * member = - (const sensor_msgs__msg__PointField__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * PointCloud2__rosidl_typesupport_introspection_c__get_function__PointField__fields( - void * untyped_member, size_t index) -{ - sensor_msgs__msg__PointField__Sequence * member = - (sensor_msgs__msg__PointField__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointField__fields( - void * untyped_member, size_t size) -{ - sensor_msgs__msg__PointField__Sequence * member = - (sensor_msgs__msg__PointField__Sequence *)(untyped_member); - sensor_msgs__msg__PointField__Sequence__fini(member); - return sensor_msgs__msg__PointField__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[9] = { - { - "header", // 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(sensor_msgs__msg__PointCloud2, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "fields", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, fields), // bytes offset in struct - NULL, // default value - PointCloud2__rosidl_typesupport_introspection_c__size_function__PointField__fields, // size() function pointer - PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointField__fields, // get_const(index) function pointer - PointCloud2__rosidl_typesupport_introspection_c__get_function__PointField__fields, // get(index) function pointer - PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointField__fields // resize(index) function pointer - }, - { - "is_bigendian", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, is_bigendian), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "point_step", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, point_step), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "row_step", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, row_step), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "is_dense", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud2, is_dense), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_members = { - "sensor_msgs__msg", // message namespace - "PointCloud2", // message name - 9, // number of fields - sizeof(sensor_msgs__msg__PointCloud2), - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array, // message members - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_init_function, // function to initialize message memory (memory has to be allocated) - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_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 PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle = { - 0, - &PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud2)() { - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointField)(); - if (!PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle.typesupport_identifier) { - PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.h deleted file mode 100644 index 208fae2eb..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/PointCloud.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'points' -#include "geometry_msgs/msg/detail/point32__struct.h" -// Member 'channels' -#include "sensor_msgs/msg/detail/channel_float32__struct.h" - -// Struct defined in msg/PointCloud in the package sensor_msgs. -typedef struct sensor_msgs__msg__PointCloud -{ - std_msgs__msg__Header header; - geometry_msgs__msg__Point32__Sequence points; - sensor_msgs__msg__ChannelFloat32__Sequence channels; -} sensor_msgs__msg__PointCloud; - -// Struct for a sequence of sensor_msgs__msg__PointCloud. -typedef struct sensor_msgs__msg__PointCloud__Sequence -{ - sensor_msgs__msg__PointCloud * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__PointCloud__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__traits.hpp deleted file mode 100644 index 48ca700dd..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/PointCloud.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/point_cloud__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::PointCloud"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/PointCloud"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.c deleted file mode 100644 index ede0bbedc..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.c +++ /dev/null @@ -1,197 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/PointCloud.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_cloud__functions.h" -#include "sensor_msgs/msg/detail/point_cloud__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `points` -#include "geometry_msgs/msg/point32.h" -// Member `points` -#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" -// Member `channels` -#include "sensor_msgs/msg/channel_float32.h" -// Member `channels` -#include "sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PointCloud__rosidl_typesupport_introspection_c__PointCloud_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; - sensor_msgs__msg__PointCloud__init(message_memory); -} - -void PointCloud__rosidl_typesupport_introspection_c__PointCloud_fini_function(void * message_memory) -{ - sensor_msgs__msg__PointCloud__fini(message_memory); -} - -size_t PointCloud__rosidl_typesupport_introspection_c__size_function__Point32__points( - const void * untyped_member) -{ - const geometry_msgs__msg__Point32__Sequence * member = - (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return member->size; -} - -const void * PointCloud__rosidl_typesupport_introspection_c__get_const_function__Point32__points( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point32__Sequence * member = - (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * PointCloud__rosidl_typesupport_introspection_c__get_function__Point32__points( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point32__Sequence * member = - (geometry_msgs__msg__Point32__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool PointCloud__rosidl_typesupport_introspection_c__resize_function__Point32__points( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point32__Sequence * member = - (geometry_msgs__msg__Point32__Sequence *)(untyped_member); - geometry_msgs__msg__Point32__Sequence__fini(member); - return geometry_msgs__msg__Point32__Sequence__init(member, size); -} - -size_t PointCloud__rosidl_typesupport_introspection_c__size_function__ChannelFloat32__channels( - const void * untyped_member) -{ - const sensor_msgs__msg__ChannelFloat32__Sequence * member = - (const sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); - return member->size; -} - -const void * PointCloud__rosidl_typesupport_introspection_c__get_const_function__ChannelFloat32__channels( - const void * untyped_member, size_t index) -{ - const sensor_msgs__msg__ChannelFloat32__Sequence * member = - (const sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * PointCloud__rosidl_typesupport_introspection_c__get_function__ChannelFloat32__channels( - void * untyped_member, size_t index) -{ - sensor_msgs__msg__ChannelFloat32__Sequence * member = - (sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool PointCloud__rosidl_typesupport_introspection_c__resize_function__ChannelFloat32__channels( - void * untyped_member, size_t size) -{ - sensor_msgs__msg__ChannelFloat32__Sequence * member = - (sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); - sensor_msgs__msg__ChannelFloat32__Sequence__fini(member); - return sensor_msgs__msg__ChannelFloat32__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__PointCloud, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud, points), // bytes offset in struct - NULL, // default value - PointCloud__rosidl_typesupport_introspection_c__size_function__Point32__points, // size() function pointer - PointCloud__rosidl_typesupport_introspection_c__get_const_function__Point32__points, // get_const(index) function pointer - PointCloud__rosidl_typesupport_introspection_c__get_function__Point32__points, // get(index) function pointer - PointCloud__rosidl_typesupport_introspection_c__resize_function__Point32__points // resize(index) function pointer - }, - { - "channels", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointCloud, channels), // bytes offset in struct - NULL, // default value - PointCloud__rosidl_typesupport_introspection_c__size_function__ChannelFloat32__channels, // size() function pointer - PointCloud__rosidl_typesupport_introspection_c__get_const_function__ChannelFloat32__channels, // get_const(index) function pointer - PointCloud__rosidl_typesupport_introspection_c__get_function__ChannelFloat32__channels, // get(index) function pointer - PointCloud__rosidl_typesupport_introspection_c__resize_function__ChannelFloat32__channels // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_members = { - "sensor_msgs__msg", // message namespace - "PointCloud", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__PointCloud), - PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array, // message members - PointCloud__rosidl_typesupport_introspection_c__PointCloud_init_function, // function to initialize message memory (memory has to be allocated) - PointCloud__rosidl_typesupport_introspection_c__PointCloud_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 PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle = { - 0, - &PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud)() { - PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)(); - PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, ChannelFloat32)(); - if (!PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle.typesupport_identifier) { - PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__traits.hpp deleted file mode 100644 index 5f633c354..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/PointField.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/point_field__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::PointField"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/PointField"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.c deleted file mode 100644 index b6680418c..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.c +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/PointField.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_field__functions.h" -#include "sensor_msgs/msg/detail/point_field__struct.h" - - -// Include directives for member types -// Member `name` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void PointField__rosidl_typesupport_introspection_c__PointField_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; - sensor_msgs__msg__PointField__init(message_memory); -} - -void PointField__rosidl_typesupport_introspection_c__PointField_fini_function(void * message_memory) -{ - sensor_msgs__msg__PointField__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember PointField__rosidl_typesupport_introspection_c__PointField_message_member_array[4] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointField, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "offset", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointField, offset), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "datatype", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointField, datatype), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "count", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__PointField, count), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers PointField__rosidl_typesupport_introspection_c__PointField_message_members = { - "sensor_msgs__msg", // message namespace - "PointField", // message name - 4, // number of fields - sizeof(sensor_msgs__msg__PointField), - PointField__rosidl_typesupport_introspection_c__PointField_message_member_array, // message members - PointField__rosidl_typesupport_introspection_c__PointField_init_function, // function to initialize message memory (memory has to be allocated) - PointField__rosidl_typesupport_introspection_c__PointField_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 PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle = { - 0, - &PointField__rosidl_typesupport_introspection_c__PointField_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointField)() { - if (!PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle.typesupport_identifier) { - PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.h deleted file mode 100644 index 6fae1bd3e..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.h +++ /dev/null @@ -1,61 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/Range.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'ULTRASOUND'. -enum -{ - sensor_msgs__msg__Range__ULTRASOUND = 0 -}; - -/// Constant 'INFRARED'. -enum -{ - sensor_msgs__msg__Range__INFRARED = 1 -}; - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" - -// Struct defined in msg/Range in the package sensor_msgs. -typedef struct sensor_msgs__msg__Range -{ - std_msgs__msg__Header header; - uint8_t radiation_type; - float field_of_view; - float min_range; - float max_range; - float range; -} sensor_msgs__msg__Range; - -// Struct for a sequence of sensor_msgs__msg__Range. -typedef struct sensor_msgs__msg__Range__Sequence -{ - sensor_msgs__msg__Range * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__Range__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/range__traits.hpp deleted file mode 100644 index 4702d9978..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Range.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/range__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Range"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Range"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.c deleted file mode 100644 index e769fa67b..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.c +++ /dev/null @@ -1,164 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Range.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/range__functions.h" -#include "sensor_msgs/msg/detail/range__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Range__rosidl_typesupport_introspection_c__Range_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; - sensor_msgs__msg__Range__init(message_memory); -} - -void Range__rosidl_typesupport_introspection_c__Range_fini_function(void * message_memory) -{ - sensor_msgs__msg__Range__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Range__rosidl_typesupport_introspection_c__Range_message_member_array[6] = { - { - "header", // 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(sensor_msgs__msg__Range, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "radiation_type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Range, radiation_type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "field_of_view", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Range, field_of_view), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "min_range", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Range, min_range), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "max_range", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Range, max_range), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "range", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__Range, range), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Range__rosidl_typesupport_introspection_c__Range_message_members = { - "sensor_msgs__msg", // message namespace - "Range", // message name - 6, // number of fields - sizeof(sensor_msgs__msg__Range), - Range__rosidl_typesupport_introspection_c__Range_message_member_array, // message members - Range__rosidl_typesupport_introspection_c__Range_init_function, // function to initialize message memory (memory has to be allocated) - Range__rosidl_typesupport_introspection_c__Range_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 Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle = { - 0, - &Range__rosidl_typesupport_introspection_c__Range_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Range)() { - Range__rosidl_typesupport_introspection_c__Range_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle.typesupport_identifier) { - Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.h deleted file mode 100644 index b73fb13c1..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.h +++ /dev/null @@ -1,44 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/RegionOfInterest.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/RegionOfInterest in the package sensor_msgs. -typedef struct sensor_msgs__msg__RegionOfInterest -{ - uint32_t x_offset; - uint32_t y_offset; - uint32_t height; - uint32_t width; - bool do_rectify; -} sensor_msgs__msg__RegionOfInterest; - -// Struct for a sequence of sensor_msgs__msg__RegionOfInterest. -typedef struct sensor_msgs__msg__RegionOfInterest__Sequence -{ - sensor_msgs__msg__RegionOfInterest * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__RegionOfInterest__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__traits.hpp deleted file mode 100644 index fe0cd60fd..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/RegionOfInterest.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/region_of_interest__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::RegionOfInterest"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/RegionOfInterest"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.c deleted file mode 100644 index fa5af59d9..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.c +++ /dev/null @@ -1,141 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/RegionOfInterest.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/region_of_interest__functions.h" -#include "sensor_msgs/msg/detail/region_of_interest__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_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; - sensor_msgs__msg__RegionOfInterest__init(message_memory); -} - -void RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_fini_function(void * message_memory) -{ - sensor_msgs__msg__RegionOfInterest__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_member_array[5] = { - { - "x_offset", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__RegionOfInterest, x_offset), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "y_offset", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__RegionOfInterest, y_offset), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "height", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__RegionOfInterest, height), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "width", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__RegionOfInterest, width), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "do_rectify", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__RegionOfInterest, do_rectify), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_members = { - "sensor_msgs__msg", // message namespace - "RegionOfInterest", // message name - 5, // number of fields - sizeof(sensor_msgs__msg__RegionOfInterest), - RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_member_array, // message members - RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_init_function, // function to initialize message memory (memory has to be allocated) - RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_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 RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle = { - 0, - &RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)() { - if (!RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle.typesupport_identifier) { - RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.h b/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.h deleted file mode 100644 index f0c14c8e7..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.h +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from sensor_msgs:msg/RelativeHumidity.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ -#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" - -// Struct defined in msg/RelativeHumidity in the package sensor_msgs. -typedef struct sensor_msgs__msg__RelativeHumidity -{ - std_msgs__msg__Header header; - double relative_humidity; - double variance; -} sensor_msgs__msg__RelativeHumidity; - -// Struct for a sequence of sensor_msgs__msg__RelativeHumidity. -typedef struct sensor_msgs__msg__RelativeHumidity__Sequence -{ - sensor_msgs__msg__RelativeHumidity * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} sensor_msgs__msg__RelativeHumidity__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__traits.hpp deleted file mode 100644 index b66f3f203..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/RelativeHumidity.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/relative_humidity__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::RelativeHumidity"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/RelativeHumidity"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.c deleted file mode 100644 index eab4ab601..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.c +++ /dev/null @@ -1,119 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/RelativeHumidity.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/relative_humidity__functions.h" -#include "sensor_msgs/msg/detail/relative_humidity__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_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; - sensor_msgs__msg__RelativeHumidity__init(message_memory); -} - -void RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_fini_function(void * message_memory) -{ - sensor_msgs__msg__RelativeHumidity__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__RelativeHumidity, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "relative_humidity", // 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(sensor_msgs__msg__RelativeHumidity, relative_humidity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "variance", // 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(sensor_msgs__msg__RelativeHumidity, variance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_members = { - "sensor_msgs__msg", // message namespace - "RelativeHumidity", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__RelativeHumidity), - RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array, // message members - RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_init_function, // function to initialize message memory (memory has to be allocated) - RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_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 RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle = { - 0, - &RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RelativeHumidity)() { - RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle.typesupport_identifier) { - RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__traits.hpp deleted file mode 100644 index 3a107bae7..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/Temperature.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/temperature__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::Temperature"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/Temperature"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.c deleted file mode 100644 index 34f4f2cc9..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.c +++ /dev/null @@ -1,119 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/Temperature.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/temperature__functions.h" -#include "sensor_msgs/msg/detail/temperature__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Temperature__rosidl_typesupport_introspection_c__Temperature_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; - sensor_msgs__msg__Temperature__init(message_memory); -} - -void Temperature__rosidl_typesupport_introspection_c__Temperature_fini_function(void * message_memory) -{ - sensor_msgs__msg__Temperature__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__Temperature, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "temperature", // 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(sensor_msgs__msg__Temperature, temperature), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "variance", // 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(sensor_msgs__msg__Temperature, variance), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Temperature__rosidl_typesupport_introspection_c__Temperature_message_members = { - "sensor_msgs__msg", // message namespace - "Temperature", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__Temperature), - Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array, // message members - Temperature__rosidl_typesupport_introspection_c__Temperature_init_function, // function to initialize message memory (memory has to be allocated) - Temperature__rosidl_typesupport_introspection_c__Temperature_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 Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle = { - 0, - &Temperature__rosidl_typesupport_introspection_c__Temperature_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Temperature)() { - Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - if (!Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle.typesupport_identifier) { - Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__traits.hpp b/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__traits.hpp deleted file mode 100644 index 88978a897..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:msg/TimeReference.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ -#define SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ - -#include "sensor_msgs/msg/detail/time_reference__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'time_ref' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::msg::TimeReference"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/msg/TimeReference"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.c b/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.c deleted file mode 100644 index 39ce1329a..000000000 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.c +++ /dev/null @@ -1,127 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:msg/TimeReference.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/msg/detail/time_reference__functions.h" -#include "sensor_msgs/msg/detail/time_reference__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `time_ref` -#include "builtin_interfaces/msg/time.h" -// Member `time_ref` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `source` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TimeReference__rosidl_typesupport_introspection_c__TimeReference_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; - sensor_msgs__msg__TimeReference__init(message_memory); -} - -void TimeReference__rosidl_typesupport_introspection_c__TimeReference_fini_function(void * message_memory) -{ - sensor_msgs__msg__TimeReference__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[3] = { - { - "header", // 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(sensor_msgs__msg__TimeReference, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "time_ref", // 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(sensor_msgs__msg__TimeReference, time_ref), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "source", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__msg__TimeReference, source), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_members = { - "sensor_msgs__msg", // message namespace - "TimeReference", // message name - 3, // number of fields - sizeof(sensor_msgs__msg__TimeReference), - TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array, // message members - TimeReference__rosidl_typesupport_introspection_c__TimeReference_init_function, // function to initialize message memory (memory has to be allocated) - TimeReference__rosidl_typesupport_introspection_c__TimeReference_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 TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle = { - 0, - &TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, TimeReference)() { - TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle.typesupport_identifier) { - TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/sensor_msgs/point_cloud2_iterator.hpp b/ThirdParty/ros/include/sensor_msgs/point_cloud2_iterator.hpp deleted file mode 100644 index 0b79192c7..000000000 --- a/ThirdParty/ros/include/sensor_msgs/point_cloud2_iterator.hpp +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) 2013, Open Source Robotics Foundation, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the Open Source Robotics Foundation, Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// This file is originally from: -// https://github.com/ros/common_msgs/blob/275b09a/sensor_msgs/include/sensor_msgs/point_cloud2_iterator.h - -#ifndef SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ -#define SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ - -#include -#include -#include -#include - -/** - * \brief Tools for manipulating sensor_msgs - * - * This file provides two sets of utilities to modify and parse PointCloud2 - * The first set allows you to conveniently set the fields by hand: - * \verbatim - * #include - * // Create a PointCloud2 - * sensor_msgs::msg::PointCloud2 cloud_msg; - * // Fill some internals of the PoinCloud2 like the header/width/height ... - * cloud_msgs.height = 1; cloud_msgs.width = 4; - * // Set the point fields to xyzrgb and resize the vector with the following command - * // 4 is for the number of added fields. Each come in triplet: the name of the PointField, - * // the number of occurrences of the type in the PointField, the type of the PointField - * sensor_msgs::msg::PointCloud2Modifier modifier(cloud_msg); - * modifier.setPointCloud2Fields(4, "x", 1, sensor_msgs::msg::PointField::FLOAT32, - * "y", 1, sensor_msgs::msg::PointField::FLOAT32, - * "z", 1, sensor_msgs::msg::PointField::FLOAT32, - * "rgb", 1, sensor_msgs::msg::PointField::FLOAT32); - * // For convenience and the xyz, rgb, rgba fields, you can also use the following overloaded function. - * // You have to be aware that the following function does add extra padding for backward compatibility though - * // so it is definitely the solution of choice for PointXYZ and PointXYZRGB - * // 2 is for the number of fields to add - * modifier.setPointCloud2FieldsByString(2, "xyz", "rgb"); - * // You can then reserve / resize as usual - * modifier.resize(100); - * \endverbatim - * - * The second set allow you to traverse your PointCloud using an iterator: - * \verbatim - * // Define some raw data we'll put in the PointCloud2 - * float point_data[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0}; - * uint8_t color_data[] = {40, 80, 120, 160, 200, 240, 20, 40, 60, 80, 100, 120}; - * // Define the iterators. When doing so, you define the Field you would like to iterate upon and - * // the type of you would like returned: it is not necessary the type of the PointField as sometimes - * // you pack data in another type (e.g. 3 uchar + 1 uchar for RGB are packed in a float) - * sensor_msgs::msg::PointCloud2Iterator iter_x(cloud_msg, "x"); - * sensor_msgs::msg::PointCloud2Iterator iter_y(cloud_msg, "y"); - * sensor_msgs::msg::PointCloud2Iterator iter_z(cloud_msg, "z"); - * // Even though the r,g,b,a fields do not exist (it's usually rgb, rgba), you can create iterators for - * // those: they will handle data packing for you (in little endian RGB is packed as *,R,G,B in a float - * // and RGBA as A,R,G,B) - * sensor_msgs::msg::PointCloud2Iterator iter_r(cloud_msg, "r"); - * sensor_msgs::msg::PointCloud2Iterator iter_g(cloud_msg, "g"); - * sensor_msgs::msg::PointCloud2Iterator iter_b(cloud_msg, "b"); - * // Fill the PointCloud2 - * for(size_t i=0; i class V> -class PointCloud2IteratorBase -{ -public: - /** - */ - PointCloud2IteratorBase(); - - /** - * @param cloud_msg The PointCloud2 to iterate upon - * @param field_name The field to iterate upon - */ - PointCloud2IteratorBase(C & cloud_msg, const std::string & field_name); - - /** Assignment operator - * @param iter the iterator to copy data from - * @return a reference to *this - */ - V & operator=(const V & iter); - - /** Access the i th element starting at the current pointer (useful when a field has several elements of the same - * type) - * @param i - * @return a reference to the i^th value from the current position - */ - TT & operator[](size_t i) const; - - /** Dereference the iterator. Equivalent to accessing it through [0] - * @return the value to which the iterator is pointing - */ - TT & operator*() const; - - /** Increase the iterator to the next element - * @return a reference to the updated iterator - */ - V & operator++(); - - /** Basic pointer addition - * @param i the amount to increase the iterator by - * @return an iterator with an increased position - */ - V operator+(int i); - - /** Increase the iterator by a certain amount - * @return a reference to the updated iterator - */ - V & operator+=(int i); - - /** Compare to another iterator - * @return whether the current iterator points to a different address than the other one - */ - bool operator!=(const V & iter) const; - - /** Return the end iterator - * @return the end iterator (useful when performing normal iterator processing with ++) - */ - V end() const; - -private: - /** Common code to set the field of the PointCloud2 - * @param cloud_msg the PointCloud2 to modify - * @param field_name the name of the field to iterate upon - * @return the offset at which the field is found - */ - int set_field(const sensor_msgs::msg::PointCloud2 & cloud_msg, const std::string & field_name); - - /** The "point_step" of the original cloud */ - int point_step_; - /** The raw data in uchar* where the iterator is */ - U * data_char_; - /** The cast data where the iterator is */ - TT * data_; - /** The end() pointer of the iterator */ - TT * data_end_; - /** Whether the fields are stored as bigendian */ - bool is_bigendian_; -}; -} // namespace impl - -/** - * \brief Class that can iterate over a PointCloud2 - * - * T type of the element being iterated upon - * E.g, you create your PointClou2 message as follows: - * \verbatim - * setPointCloud2FieldsByString(cloud_msg, 2, "xyz", "rgb"); - * \endverbatim - * - * For iterating over XYZ, you do : - * \verbatim - * sensor_msgs::msg::PointCloud2Iterator iter_x(cloud_msg, "x"); - * \endverbatim - * and then access X through iter_x[0] or *iter_x - * You could create an iterator for Y and Z too but as they are consecutive, - * you can just use iter_x[1] and iter_x[2] - * - * For iterating over RGB, you do: - * \verbatim - * sensor_msgs::msg::PointCloud2Iterator iter_rgb(cloud_msg, "rgb"); - * \endverbatim - * and then access R,G,B through iter_rgb[0], iter_rgb[1], iter_rgb[2] - */ -template -class PointCloud2Iterator - : public impl::PointCloud2IteratorBase< - T, T, unsigned char, sensor_msgs::msg::PointCloud2, PointCloud2Iterator> -{ -public: - PointCloud2Iterator( - sensor_msgs::msg::PointCloud2 & cloud_msg, - const std::string & field_name) - : impl::PointCloud2IteratorBase< - T, T, unsigned char, - sensor_msgs::msg::PointCloud2, - sensor_msgs::PointCloud2Iterator - >::PointCloud2IteratorBase(cloud_msg, field_name) {} -}; - -/** - * \brief Same as a PointCloud2Iterator but for const data - */ -template -class PointCloud2ConstIterator - : public impl::PointCloud2IteratorBase< - T, const T, const unsigned char, const sensor_msgs::msg::PointCloud2, - PointCloud2ConstIterator> -{ -public: - PointCloud2ConstIterator( - const sensor_msgs::msg::PointCloud2 & cloud_msg, - const std::string & field_name) - : impl::PointCloud2IteratorBase< - T, const T, const unsigned char, - const sensor_msgs::msg::PointCloud2, - sensor_msgs::PointCloud2ConstIterator - >::PointCloud2IteratorBase(cloud_msg, field_name) {} -}; -} // namespace sensor_msgs - -#include // NOLINT - -#endif // SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/point_field_conversion.hpp b/ThirdParty/ros/include/sensor_msgs/point_field_conversion.hpp deleted file mode 100644 index 8e5cea9db..000000000 --- a/ThirdParty/ros/include/sensor_msgs/point_field_conversion.hpp +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2015, University of Osnabrück -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -// Created on: 16.07.2015 -// Authors: Sebastian Pütz -// this file is originally ported from ROS1: -// https://raw.githubusercontent.com/ros/common_msgs/ef18af000759bf15c7ea036356dbdce631c75577/sensor_msgs/include/sensor_msgs/point_field_conversion.h -// -#ifndef SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ -#define SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ - -#include -#include - -/** - * \brief This file provides a type to enum mapping for the different - * PointField types and methods to read and write in - * a PointCloud2 buffer for the different PointField types. - * \author Sebastian Pütz - */ -namespace sensor_msgs -{ -/*! - * \Enum to type mapping. - */ -template -struct pointFieldTypeAsType {}; -template<> -struct pointFieldTypeAsType { typedef int8_t type; }; -template<> -struct pointFieldTypeAsType { typedef uint8_t type; }; -template<> -struct pointFieldTypeAsType { typedef int16_t type; }; -template<> -struct pointFieldTypeAsType { typedef uint16_t type; }; -template<> -struct pointFieldTypeAsType { typedef int32_t type; }; -template<> -struct pointFieldTypeAsType { typedef uint32_t type; }; -template<> -struct pointFieldTypeAsType { typedef float type; }; -template<> -struct pointFieldTypeAsType { typedef double type; }; - -/*! - * \Type to enum mapping. - */ -template -struct typeAsPointFieldType {}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::INT8; }; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::UINT8;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::INT16;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::UINT16;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::INT32;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::UINT32;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::FLOAT32;}; -template<> -struct typeAsPointFieldType { static const uint8_t value = - sensor_msgs::msg::PointField::FLOAT64;}; - -/*! - * \Converts a value at the given pointer position, interpreted as the datatype - * specified by the given template argument point_field_type, to the given - * template type T and returns it. - * \param data_ptr pointer into the point cloud 2 buffer - * \tparam point_field_type sensor_msgs::PointField datatype value - * \tparam T return type - */ -template -inline T readPointCloud2BufferValue(const unsigned char * data_ptr) -{ - typedef typename pointFieldTypeAsType::type type; - return static_cast(*(reinterpret_cast(data_ptr))); -} - -/*! - * \Converts a value at the given pointer position interpreted as the datatype - * specified by the given datatype parameter to the given template type and returns it. - * \param data_ptr pointer into the point cloud 2 buffer - * \param datatype sensor_msgs::PointField datatype value - * \tparam T return type - */ -template -inline T readPointCloud2BufferValue(const unsigned char * data_ptr, const unsigned char datatype) -{ - switch (datatype) { - case sensor_msgs::msg::PointField::INT8: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::UINT8: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::INT16: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::UINT16: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::INT32: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::UINT32: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::FLOAT32: - return readPointCloud2BufferValue(data_ptr); - case sensor_msgs::msg::PointField::FLOAT64: - return readPointCloud2BufferValue(data_ptr); - } - // This should never be reached, but return statement added to avoid compiler warning. (#84) - return T(); -} -} // namespace sensor_msgs -#endif // SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/distortion_models.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/distortion_models.hpp new file mode 100644 index 000000000..9de8de7ca --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/distortion_models.hpp @@ -0,0 +1,46 @@ +// Copyright (c) 2010, Willow Garage, Inc. +// Copyright (c) 2017, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally from: +// https://github.com/ros/common_msgs/blob/7dea912/sensor_msgs/include/sensor_msgs/distortion_models.h + +#ifndef SENSOR_MSGS__DISTORTION_MODELS_HPP_ +#define SENSOR_MSGS__DISTORTION_MODELS_HPP_ + +namespace sensor_msgs +{ +namespace distortion_models +{ +const char PLUMB_BOB[] = "plumb_bob"; +const char RATIONAL_POLYNOMIAL[] = "rational_polynomial"; +const char EQUIDISTANT[] = "equidistant"; +} +} + +#endif // SENSOR_MSGS__DISTORTION_MODELS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/fill_image.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/fill_image.hpp new file mode 100644 index 000000000..f593d10c4 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/fill_image.hpp @@ -0,0 +1,84 @@ +// Copyright (c) 2008, Willow Garage, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally ported from ROS1: +// https://github.com/ros/common_msgs/blob/89069bc/sensor_msgs/include/sensor_msgs/fill_image.h + +#ifndef SENSOR_MSGS__FILL_IMAGE_HPP_ +#define SENSOR_MSGS__FILL_IMAGE_HPP_ + +#include +#include + +#include "sensor_msgs/msg/image.hpp" +#include "sensor_msgs/image_encodings.hpp" + +namespace sensor_msgs +{ +/// Fill an image message. +/** + * \param[out] image Image to be filled. + * \param[in] encoding_arg Encoding type, such as sensor_msgs::image_encodings::RGB8. + * \param[in] rows_arg Number of rows. + * \param[in] cols_arg Number of columns. + * \param[in] step_arg Step size. + * \param[in] data_arg Data to fill image with. + * \return True if successful. + */ +static inline bool fillImage( + msg::Image & image, + const std::string & encoding_arg, + uint32_t rows_arg, + uint32_t cols_arg, + uint32_t step_arg, + const void * data_arg) +{ + image.encoding = encoding_arg; + image.height = rows_arg; + image.width = cols_arg; + image.step = step_arg; + size_t st0 = (step_arg * rows_arg); + image.data.resize(st0); + std::memcpy(&image.data[0], data_arg, st0); + + image.is_bigendian = 0; + return true; +} + +/// Clear the data of an image message. +/** + * \details All fields but `data` are kept the same. + * \param[out] image Image to be cleared. + */ +static inline void clearImage(msg::Image & image) +{ + image.data.resize(0); +} +} // namespace sensor_msgs + +#endif // SENSOR_MSGS__FILL_IMAGE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/image_encodings.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/image_encodings.hpp similarity index 78% rename from ThirdParty/ros/include/sensor_msgs/image_encodings.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/image_encodings.hpp index 122e5a70c..ba15351dc 100644 --- a/ThirdParty/ros/include/sensor_msgs/image_encodings.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/image_encodings.hpp @@ -1,33 +1,29 @@ // Copyright (c) 2009, Willow Garage, Inc. -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) // // Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. // -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the Willow Garage nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // This file is originally from: @@ -101,6 +97,12 @@ const char BAYER_GRBG16[] = "bayer_grbg16"; const char YUV422[] = "yuv422"; // YUYV version: http://www.fourcc.org/pixel-format/yuv-yuy2/ const char YUV422_YUY2[] = "yuv422_yuy2"; +// YUV 4:2:0 encodings with an 8-bit depth +// NV21: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-yuv-planar.html +const char NV21[] = "nv21"; +// YUV 4:4:4 encodings with 8-bit depth +// NV24: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-yuv-planar.html +const char NV24[] = "nv24"; // Prefixes for abstract image encodings const char ABSTRACT_ENCODING_PREFIXES[][5] = { @@ -191,7 +193,9 @@ static inline int numChannels(const std::string & encoding) } if (encoding == YUV422 || - encoding == YUV422_YUY2) + encoding == YUV422_YUY2 || + encoding == NV21 || + encoding == NV24) { return 2; } @@ -253,7 +257,9 @@ static inline int bitDepth(const std::string & encoding) } if (encoding == YUV422 || - encoding == YUV422_YUY2) + encoding == YUV422_YUY2 || + encoding == NV21 || + encoding == NV24) { return 8; } diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/impl/point_cloud2_iterator.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/impl/point_cloud2_iterator.hpp new file mode 100644 index 000000000..d766d0d70 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/impl/point_cloud2_iterator.hpp @@ -0,0 +1,416 @@ +// Copyright (c) 2013, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally from: +// https://github.com/ros/common_msgs/blob/50ee957/sensor_msgs/include/sensor_msgs/impl/point_cloud2_iterator.h + +#ifndef SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ +#define SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ + +#include +#include +#include +#include +#include + +/** + * \brief Private implementation used by PointCloud2Iterator + * \author Vincent Rabaud + */ + +namespace +{ +/** Return the size of a datatype (which is an enum of sensor_msgs::msg::PointField::) in bytes + * @param datatype one of the enums of sensor_msgs::msg::PointField:: + */ +inline int sizeOfPointField(int datatype) +{ + if ((datatype == sensor_msgs::msg::PointField::INT8) || + (datatype == sensor_msgs::msg::PointField::UINT8)) + { + return 1; + } else if ((datatype == sensor_msgs::msg::PointField::INT16) || // NOLINT + (datatype == sensor_msgs::msg::PointField::UINT16)) + { + return 2; + } else if ((datatype == sensor_msgs::msg::PointField::INT32) || // NOLINT + (datatype == sensor_msgs::msg::PointField::UINT32) || + (datatype == sensor_msgs::msg::PointField::FLOAT32)) + { + return 4; + } else if (datatype == sensor_msgs::msg::PointField::FLOAT64) { + return 8; + } else { + std::stringstream err; + err << "PointField of type " << datatype << " does not exist"; + throw std::runtime_error(err.str()); + } + return -1; +} + +/** Private function that adds a PointField to the "fields" member of a PointCloud2 + * @param cloud_msg the PointCloud2 to add a field to + * @param name the name of the field + * @param count the number of elements in the PointField + * @param datatype the datatype of the elements + * @param offset the offset of that element + * @return the offset of the next PointField that will be added to the PointCloud2 + */ +inline int addPointField( + sensor_msgs::msg::PointCloud2 & cloud_msg, + const std::string & name, int count, int datatype, + int offset) +{ + sensor_msgs::msg::PointField point_field; + point_field.name = name; + point_field.count = count; + point_field.datatype = datatype; + point_field.offset = offset; + cloud_msg.fields.push_back(point_field); + + // Update the offset + return offset + point_field.count * sizeOfPointField(datatype); +} +} // namespace + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace sensor_msgs +{ + +inline PointCloud2Modifier::PointCloud2Modifier( + sensor_msgs::msg::PointCloud2 & cloud_msg) +: cloud_msg_(cloud_msg) +{ +} + +inline size_t PointCloud2Modifier::size() const +{ + return cloud_msg_.data.size() / cloud_msg_.point_step; +} + +inline void PointCloud2Modifier::reserve(size_t size) +{ + cloud_msg_.data.reserve(size * cloud_msg_.point_step); +} + +inline void PointCloud2Modifier::resize(size_t size) +{ + cloud_msg_.data.resize(size * cloud_msg_.point_step); + + // Update height/width + if (cloud_msg_.height == 1) { + cloud_msg_.width = static_cast(size); + cloud_msg_.row_step = static_cast(size * cloud_msg_.point_step); + } else { + if (cloud_msg_.width == 1) { + cloud_msg_.height = static_cast(size); + } else { + cloud_msg_.height = 1; + cloud_msg_.width = static_cast(size); + cloud_msg_.row_step = static_cast(size * cloud_msg_.point_step); + } + } +} + +inline void PointCloud2Modifier::clear() +{ + cloud_msg_.data.clear(); + + // Update height/width + if (cloud_msg_.height == 1) { + cloud_msg_.row_step = cloud_msg_.width = 0; + } else { + if (cloud_msg_.width == 1) { + cloud_msg_.height = 0; + } else { + cloud_msg_.row_step = cloud_msg_.width = cloud_msg_.height = 0; + } + } +} + + +inline void PointCloud2Modifier::setPointCloud2Fields(int n_fields, ...) +{ + cloud_msg_.fields.clear(); + cloud_msg_.fields.reserve(n_fields); + va_list vl; + va_start(vl, n_fields); + int offset = 0; + for (int i = 0; i < n_fields; ++i) { + // Create the corresponding PointField + std::string name(va_arg(vl, char *)); + int count(va_arg(vl, int)); + int datatype(va_arg(vl, int)); + offset = addPointField(cloud_msg_, name, count, datatype, offset); + } + va_end(vl); + + // Resize the point cloud accordingly + cloud_msg_.point_step = offset; + cloud_msg_.row_step = cloud_msg_.width * cloud_msg_.point_step; + cloud_msg_.data.resize(cloud_msg_.height * cloud_msg_.row_step); +} + +inline void PointCloud2Modifier::setPointCloud2FieldsByString(int n_fields, ...) +{ + cloud_msg_.fields.clear(); + cloud_msg_.fields.reserve(n_fields); + va_list vl; + va_start(vl, n_fields); + int offset = 0; + for (int i = 0; i < n_fields; ++i) { + // Create the corresponding PointFields + std::string + field_name = std::string(va_arg(vl, char *)); + if (field_name == "xyz") { + sensor_msgs::msg::PointField point_field; + // Do x, y and z + offset = addPointField( + cloud_msg_, "x", 1, sensor_msgs::msg::PointField::FLOAT32, offset); + offset = addPointField( + cloud_msg_, "y", 1, sensor_msgs::msg::PointField::FLOAT32, offset); + offset = addPointField( + cloud_msg_, "z", 1, sensor_msgs::msg::PointField::FLOAT32, offset); + offset += sizeOfPointField(sensor_msgs::msg::PointField::FLOAT32); + } else { + if ((field_name == "rgb") || (field_name == "rgba")) { + offset = addPointField( + cloud_msg_, field_name, 1, sensor_msgs::msg::PointField::FLOAT32, + offset); + offset += 3 * sizeOfPointField(sensor_msgs::msg::PointField::FLOAT32); + } else { + va_end(vl); + throw std::runtime_error("Field " + field_name + " does not exist"); + } + } + } + va_end(vl); + + // Resize the point cloud accordingly + cloud_msg_.point_step = offset; + cloud_msg_.row_step = cloud_msg_.width * cloud_msg_.point_step; + cloud_msg_.data.resize(cloud_msg_.height * cloud_msg_.row_step); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace impl +{ + +/** + */ +template class V> +PointCloud2IteratorBase::PointCloud2IteratorBase() +: data_char_(0), data_(0), data_end_(0) +{ +} + +/** + * @param cloud_msg The PointCloud2 to iterate upon + * @param field_name The field to iterate upon + */ +template class V> +PointCloud2IteratorBase::PointCloud2IteratorBase( + C & cloud_msg, const std::string & field_name) +{ + int offset = set_field(cloud_msg, field_name); + + data_char_ = &(cloud_msg.data.front()) + offset; + data_ = reinterpret_cast(data_char_); + data_end_ = reinterpret_cast(&(cloud_msg.data.back()) + 1 + offset); +} + +/** Assignment operator + * @param iter the iterator to copy data from + * @return a reference to *this + */ +template class V> +V & PointCloud2IteratorBase::operator=(const V & iter) +{ + if (this != &iter) { + point_step_ = iter.point_step_; + data_char_ = iter.data_char_; + data_ = iter.data_; + data_end_ = iter.data_end_; + is_bigendian_ = iter.is_bigendian_; + } + + return *this; +} + +/** Access the i th element starting at the current pointer (useful when a field has several elements of the same + * type) + * @param i + * @return a reference to the i^th value from the current position + */ +template class V> +TT & PointCloud2IteratorBase::operator[](size_t i) const +{ + return *(data_ + i); +} + +/** Dereference the iterator. Equivalent to accessing it through [0] + * @return the value to which the iterator is pointing + */ +template class V> +TT & PointCloud2IteratorBase::operator*() const +{ + return *data_; +} + +/** Increase the iterator to the next element + * @return a reference to the updated iterator + */ +template class V> +V & PointCloud2IteratorBase::operator++() +{ + data_char_ += point_step_; + data_ = reinterpret_cast(data_char_); + return *static_cast *>(this); +} + +/** Basic pointer addition + * @param i the amount to increase the iterator by + * @return an iterator with an increased position + */ +template class V> +V PointCloud2IteratorBase::operator+(int i) +{ + V res = *static_cast *>(this); + + res.data_char_ += i * point_step_; + res.data_ = reinterpret_cast(res.data_char_); + + return res; +} + +/** Increase the iterator by a certain amount + * @return a reference to the updated iterator + */ +template class V> +V & PointCloud2IteratorBase::operator+=(int i) +{ + data_char_ += i * point_step_; + data_ = reinterpret_cast(data_char_); + return *static_cast *>(this); +} + +/** Compare to another iterator + * @return whether the current iterator points to a different address than the other one + */ +template class V> +bool PointCloud2IteratorBase::operator!=(const V & iter) const +{ + return iter.data_ != data_; +} + +/** Return the end iterator + * @return the end iterator (useful when performing normal iterator processing with ++) + */ +template class V> +V PointCloud2IteratorBase::end() const +{ + V res = *static_cast *>(this); + res.data_ = data_end_; + return res; +} + +/** Common code to set the field of the PointCloud2 + * @param cloud_msg the PointCloud2 to modify + * @param field_name the name of the field to iterate upon + * @return the offset at which the field is found + */ +template class V> +int PointCloud2IteratorBase::set_field( + const sensor_msgs::msg::PointCloud2 & cloud_msg, const std::string & field_name) +{ + is_bigendian_ = cloud_msg.is_bigendian; + point_step_ = cloud_msg.point_step; + // make sure the channel is valid + std::vector::const_iterator field_iter = cloud_msg.fields.begin(), + field_end = + cloud_msg.fields.end(); + while ((field_iter != field_end) && (field_iter->name != field_name)) { + ++field_iter; + } + + if (field_iter == field_end) { + // Handle the special case of r,g,b,a (we assume they are understood as the + // channels of an rgb or rgba field) + if ((field_name == "r") || (field_name == "g") || (field_name == "b") || (field_name == "a")) { + // Check that rgb or rgba is present + field_iter = cloud_msg.fields.begin(); + while ((field_iter != field_end) && (field_iter->name != "rgb") && + (field_iter->name != "rgba")) + { + ++field_iter; + } + if (field_iter == field_end) { + throw std::runtime_error("Field " + field_name + " does not exist"); + } + if (field_name == "r") { + if (is_bigendian_) { + return field_iter->offset + 1; + } else { + return field_iter->offset + 2; + } + } + if (field_name == "g") { + if (is_bigendian_) { + return field_iter->offset + 2; + } else { + return field_iter->offset + 1; + } + } + if (field_name == "b") { + if (is_bigendian_) { + return field_iter->offset + 3; + } else { + return field_iter->offset + 0; + } + } + if (field_name == "a") { + if (is_bigendian_) { + return field_iter->offset + 0; + } else { + return field_iter->offset + 3; + } + } + } else { + throw std::runtime_error("Field " + field_name + " does not exist"); + } + } + + return field_iter->offset; +} + +} // namespace impl +} // namespace sensor_msgs + +#endif // SENSOR_MSGS__IMPL__POINT_CLOUD2_ITERATOR_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/battery_state.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/battery_state.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/battery_state.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/battery_state.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/battery_state.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/battery_state.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/battery_state.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/battery_state.hpp index f72155469..3a04cb364 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/battery_state.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/battery_state.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/battery_state__struct.hpp" #include "sensor_msgs/msg/detail/battery_state__builder.hpp" #include "sensor_msgs/msg/detail/battery_state__traits.hpp" +#include "sensor_msgs/msg/detail/battery_state__type_support.hpp" #endif // SENSOR_MSGS__MSG__BATTERY_STATE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/camera_info.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/camera_info.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/camera_info.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/camera_info.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/camera_info.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/camera_info.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/camera_info.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/camera_info.hpp index 64903ff30..1048a9c68 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/camera_info.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/camera_info.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/camera_info__struct.hpp" #include "sensor_msgs/msg/detail/camera_info__builder.hpp" #include "sensor_msgs/msg/detail/camera_info__traits.hpp" +#include "sensor_msgs/msg/detail/camera_info__type_support.hpp" #endif // SENSOR_MSGS__MSG__CAMERA_INFO_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/channel_float32.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/channel_float32.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/channel_float32.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/channel_float32.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/channel_float32.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/channel_float32.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/channel_float32.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/channel_float32.hpp index c07ac619f..7dbb7a074 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/channel_float32.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/channel_float32.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/channel_float32__struct.hpp" #include "sensor_msgs/msg/detail/channel_float32__builder.hpp" #include "sensor_msgs/msg/detail/channel_float32__traits.hpp" +#include "sensor_msgs/msg/detail/channel_float32__type_support.hpp" #endif // SENSOR_MSGS__MSG__CHANNEL_FLOAT32_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/compressed_image.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/compressed_image.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/compressed_image.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/compressed_image.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/compressed_image.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/compressed_image.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/compressed_image.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/compressed_image.hpp index 485920da6..c184ad66f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/compressed_image.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/compressed_image.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/compressed_image__struct.hpp" #include "sensor_msgs/msg/detail/compressed_image__builder.hpp" #include "sensor_msgs/msg/detail/compressed_image__traits.hpp" +#include "sensor_msgs/msg/detail/compressed_image__type_support.hpp" #endif // SENSOR_MSGS__MSG__COMPRESSED_IMAGE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__builder.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__builder.hpp index ac5230659..1bcde3fa8 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/battery_state__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/battery_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__functions.c similarity index 94% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__functions.c index 6ca3e6b2f..ac3782920 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__functions.c @@ -386,22 +386,27 @@ sensor_msgs__msg__BatteryState__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__BatteryState); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__BatteryState * data = - (sensor_msgs__msg__BatteryState *)realloc(output->data, allocation_size); + (sensor_msgs__msg__BatteryState *)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 (!sensor_msgs__msg__BatteryState__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__BatteryState__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; ) { - sensor_msgs__msg__BatteryState__fini(&data[i]); + sensor_msgs__msg__BatteryState__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h index 073d0ac03..2596490ad 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__BatteryState( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__BatteryState( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp index 5b51eaac7..b700213ac 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_BatteryState( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.h new file mode 100644 index 000000000..2a6d571fe --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.h @@ -0,0 +1,221 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/BatteryState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'POWER_SUPPLY_STATUS_UNKNOWN'. +/** + * Constants are chosen to match the enums in the linux kernel + * defined in include/linux/power_supply.h as of version 3.7 + * The one difference is for style reasons the constants are + * all uppercase not mixed case. + * Power supply status constants + */ +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_UNKNOWN = 0 +}; + +/// Constant 'POWER_SUPPLY_STATUS_CHARGING'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_CHARGING = 1 +}; + +/// Constant 'POWER_SUPPLY_STATUS_DISCHARGING'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_DISCHARGING = 2 +}; + +/// Constant 'POWER_SUPPLY_STATUS_NOT_CHARGING'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_NOT_CHARGING = 3 +}; + +/// Constant 'POWER_SUPPLY_STATUS_FULL'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_FULL = 4 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_UNKNOWN'. +/** + * Power supply health constants + */ +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNKNOWN = 0 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_GOOD'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_GOOD = 1 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_OVERHEAT'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERHEAT = 2 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_DEAD'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_DEAD = 3 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_OVERVOLTAGE'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_UNSPEC_FAILURE'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_COLD'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_COLD = 6 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7 +}; + +/// Constant 'POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_UNKNOWN'. +/** + * Power supply technology (chemistry) constants + */ +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_NIMH'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NIMH = 1 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_LION'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LION = 2 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIPO'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIPO = 3 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIFE'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIFE = 4 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_NICD'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NICD = 5 +}; + +/// Constant 'POWER_SUPPLY_TECHNOLOGY_LIMN'. +enum +{ + sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIMN = 6 +}; + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'cell_voltage' +// Member 'cell_temperature' +#include "rosidl_runtime_c/primitives_sequence.h" +// Member 'location' +// Member 'serial_number' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/BatteryState in the package sensor_msgs. +typedef struct sensor_msgs__msg__BatteryState +{ + std_msgs__msg__Header header; + /// Voltage in Volts (Mandatory) + float voltage; + /// Temperature in Degrees Celsius (If unmeasured NaN) + float temperature; + /// Negative when discharging (A) (If unmeasured NaN) + float current; + /// Current charge in Ah (If unmeasured NaN) + float charge; + /// Capacity in Ah (last full capacity) (If unmeasured NaN) + float capacity; + /// Capacity in Ah (design capacity) (If unmeasured NaN) + float design_capacity; + /// Charge percentage on 0 to 1 range (If unmeasured NaN) + float percentage; + /// The charging status as reported. Values defined above + uint8_t power_supply_status; + /// The battery health metric. Values defined above + uint8_t power_supply_health; + /// The battery chemistry. Values defined above + uint8_t power_supply_technology; + /// True if the battery is present + bool present; + /// An array of individual cell voltages for each cell in the pack + /// If individual voltages unknown but number of cells known set each to NaN + rosidl_runtime_c__float__Sequence cell_voltage; + /// An array of individual cell temperatures for each cell in the pack + /// If individual temperatures unknown but number of cells known set each to NaN + rosidl_runtime_c__float__Sequence cell_temperature; + /// The location into which the battery is inserted. (slot number or plug) + rosidl_runtime_c__String location; + /// The best approximation of the battery serial number + rosidl_runtime_c__String serial_number; +} sensor_msgs__msg__BatteryState; + +// Struct for a sequence of sensor_msgs__msg__BatteryState. +typedef struct sensor_msgs__msg__BatteryState__Sequence +{ + sensor_msgs__msg__BatteryState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__BatteryState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.hpp new file mode 100644 index 000000000..65cb7c255 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__struct.hpp @@ -0,0 +1,489 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from sensor_msgs:msg/BatteryState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__sensor_msgs__msg__BatteryState __attribute__((deprecated)) +#else +# define DEPRECATED__sensor_msgs__msg__BatteryState __declspec(deprecated) +#endif + +namespace sensor_msgs +{ + +namespace msg +{ + +// message struct +template +struct BatteryState_ +{ + using Type = BatteryState_; + + explicit BatteryState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->voltage = 0.0f; + this->temperature = 0.0f; + this->current = 0.0f; + this->charge = 0.0f; + this->capacity = 0.0f; + this->design_capacity = 0.0f; + this->percentage = 0.0f; + this->power_supply_status = 0; + this->power_supply_health = 0; + this->power_supply_technology = 0; + this->present = false; + this->location = ""; + this->serial_number = ""; + } + } + + explicit BatteryState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init), + location(_alloc), + serial_number(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->voltage = 0.0f; + this->temperature = 0.0f; + this->current = 0.0f; + this->charge = 0.0f; + this->capacity = 0.0f; + this->design_capacity = 0.0f; + this->percentage = 0.0f; + this->power_supply_status = 0; + this->power_supply_health = 0; + this->power_supply_technology = 0; + this->present = false; + this->location = ""; + this->serial_number = ""; + } + } + + // field types and members + using _header_type = + std_msgs::msg::Header_; + _header_type header; + using _voltage_type = + float; + _voltage_type voltage; + using _temperature_type = + float; + _temperature_type temperature; + using _current_type = + float; + _current_type current; + using _charge_type = + float; + _charge_type charge; + using _capacity_type = + float; + _capacity_type capacity; + using _design_capacity_type = + float; + _design_capacity_type design_capacity; + using _percentage_type = + float; + _percentage_type percentage; + using _power_supply_status_type = + uint8_t; + _power_supply_status_type power_supply_status; + using _power_supply_health_type = + uint8_t; + _power_supply_health_type power_supply_health; + using _power_supply_technology_type = + uint8_t; + _power_supply_technology_type power_supply_technology; + using _present_type = + bool; + _present_type present; + using _cell_voltage_type = + std::vector::template rebind_alloc>; + _cell_voltage_type cell_voltage; + using _cell_temperature_type = + std::vector::template rebind_alloc>; + _cell_temperature_type cell_temperature; + using _location_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _location_type location; + using _serial_number_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _serial_number_type serial_number; + + // setters for named parameter idiom + Type & set__header( + const std_msgs::msg::Header_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__voltage( + const float & _arg) + { + this->voltage = _arg; + return *this; + } + Type & set__temperature( + const float & _arg) + { + this->temperature = _arg; + return *this; + } + Type & set__current( + const float & _arg) + { + this->current = _arg; + return *this; + } + Type & set__charge( + const float & _arg) + { + this->charge = _arg; + return *this; + } + Type & set__capacity( + const float & _arg) + { + this->capacity = _arg; + return *this; + } + Type & set__design_capacity( + const float & _arg) + { + this->design_capacity = _arg; + return *this; + } + Type & set__percentage( + const float & _arg) + { + this->percentage = _arg; + return *this; + } + Type & set__power_supply_status( + const uint8_t & _arg) + { + this->power_supply_status = _arg; + return *this; + } + Type & set__power_supply_health( + const uint8_t & _arg) + { + this->power_supply_health = _arg; + return *this; + } + Type & set__power_supply_technology( + const uint8_t & _arg) + { + this->power_supply_technology = _arg; + return *this; + } + Type & set__present( + const bool & _arg) + { + this->present = _arg; + return *this; + } + Type & set__cell_voltage( + const std::vector::template rebind_alloc> & _arg) + { + this->cell_voltage = _arg; + return *this; + } + Type & set__cell_temperature( + const std::vector::template rebind_alloc> & _arg) + { + this->cell_temperature = _arg; + return *this; + } + Type & set__location( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->location = _arg; + return *this; + } + Type & set__serial_number( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->serial_number = _arg; + return *this; + } + + // constant declarations + static constexpr uint8_t POWER_SUPPLY_STATUS_UNKNOWN = + 0u; + static constexpr uint8_t POWER_SUPPLY_STATUS_CHARGING = + 1u; + static constexpr uint8_t POWER_SUPPLY_STATUS_DISCHARGING = + 2u; + static constexpr uint8_t POWER_SUPPLY_STATUS_NOT_CHARGING = + 3u; + static constexpr uint8_t POWER_SUPPLY_STATUS_FULL = + 4u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_UNKNOWN = + 0u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_GOOD = + 1u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERHEAT = + 2u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_DEAD = + 3u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_OVERVOLTAGE = + 4u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = + 5u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_COLD = + 6u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = + 7u; + static constexpr uint8_t POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = + 8u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_UNKNOWN = + 0u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NIMH = + 1u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LION = + 2u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIPO = + 3u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIFE = + 4u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_NICD = + 5u; + static constexpr uint8_t POWER_SUPPLY_TECHNOLOGY_LIMN = + 6u; + + // pointer types + using RawPtr = + sensor_msgs::msg::BatteryState_ *; + using ConstRawPtr = + const sensor_msgs::msg::BatteryState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__sensor_msgs__msg__BatteryState + std::shared_ptr> + Ptr; + typedef DEPRECATED__sensor_msgs__msg__BatteryState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const BatteryState_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->voltage != other.voltage) { + return false; + } + if (this->temperature != other.temperature) { + return false; + } + if (this->current != other.current) { + return false; + } + if (this->charge != other.charge) { + return false; + } + if (this->capacity != other.capacity) { + return false; + } + if (this->design_capacity != other.design_capacity) { + return false; + } + if (this->percentage != other.percentage) { + return false; + } + if (this->power_supply_status != other.power_supply_status) { + return false; + } + if (this->power_supply_health != other.power_supply_health) { + return false; + } + if (this->power_supply_technology != other.power_supply_technology) { + return false; + } + if (this->present != other.present) { + return false; + } + if (this->cell_voltage != other.cell_voltage) { + return false; + } + if (this->cell_temperature != other.cell_temperature) { + return false; + } + if (this->location != other.location) { + return false; + } + if (this->serial_number != other.serial_number) { + return false; + } + return true; + } + bool operator!=(const BatteryState_ & other) const + { + return !this->operator==(other); + } +}; // struct BatteryState_ + +// alias to use template instance with default allocator +using BatteryState = + sensor_msgs::msg::BatteryState_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_UNKNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_CHARGING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_DISCHARGING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_NOT_CHARGING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_STATUS_FULL; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_UNKNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_GOOD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_OVERHEAT; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_DEAD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_OVERVOLTAGE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_UNSPEC_FAILURE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_COLD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_UNKNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_NIMH; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LION; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIPO; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIFE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_NICD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t BatteryState_::POWER_SUPPLY_TECHNOLOGY_LIMN; +#endif // __cplusplus < 201703L + +} // namespace msg + +} // namespace sensor_msgs + +#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__traits.hpp new file mode 100644 index 000000000..8a6892638 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__traits.hpp @@ -0,0 +1,409 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/BatteryState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/battery_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const BatteryState & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: voltage + { + out << "voltage: "; + rosidl_generator_traits::value_to_yaml(msg.voltage, out); + out << ", "; + } + + // member: temperature + { + out << "temperature: "; + rosidl_generator_traits::value_to_yaml(msg.temperature, out); + out << ", "; + } + + // member: current + { + out << "current: "; + rosidl_generator_traits::value_to_yaml(msg.current, out); + out << ", "; + } + + // member: charge + { + out << "charge: "; + rosidl_generator_traits::value_to_yaml(msg.charge, out); + out << ", "; + } + + // member: capacity + { + out << "capacity: "; + rosidl_generator_traits::value_to_yaml(msg.capacity, out); + out << ", "; + } + + // member: design_capacity + { + out << "design_capacity: "; + rosidl_generator_traits::value_to_yaml(msg.design_capacity, out); + out << ", "; + } + + // member: percentage + { + out << "percentage: "; + rosidl_generator_traits::value_to_yaml(msg.percentage, out); + out << ", "; + } + + // member: power_supply_status + { + out << "power_supply_status: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_status, out); + out << ", "; + } + + // member: power_supply_health + { + out << "power_supply_health: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_health, out); + out << ", "; + } + + // member: power_supply_technology + { + out << "power_supply_technology: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_technology, out); + out << ", "; + } + + // member: present + { + out << "present: "; + rosidl_generator_traits::value_to_yaml(msg.present, out); + out << ", "; + } + + // member: cell_voltage + { + if (msg.cell_voltage.size() == 0) { + out << "cell_voltage: []"; + } else { + out << "cell_voltage: ["; + size_t pending_items = msg.cell_voltage.size(); + for (auto item : msg.cell_voltage) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: cell_temperature + { + if (msg.cell_temperature.size() == 0) { + out << "cell_temperature: []"; + } else { + out << "cell_temperature: ["; + size_t pending_items = msg.cell_temperature.size(); + for (auto item : msg.cell_temperature) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: location + { + out << "location: "; + rosidl_generator_traits::value_to_yaml(msg.location, out); + out << ", "; + } + + // member: serial_number + { + out << "serial_number: "; + rosidl_generator_traits::value_to_yaml(msg.serial_number, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const BatteryState & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: voltage + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "voltage: "; + rosidl_generator_traits::value_to_yaml(msg.voltage, out); + out << "\n"; + } + + // member: temperature + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "temperature: "; + rosidl_generator_traits::value_to_yaml(msg.temperature, out); + out << "\n"; + } + + // member: current + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "current: "; + rosidl_generator_traits::value_to_yaml(msg.current, out); + out << "\n"; + } + + // member: charge + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "charge: "; + rosidl_generator_traits::value_to_yaml(msg.charge, out); + out << "\n"; + } + + // member: capacity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "capacity: "; + rosidl_generator_traits::value_to_yaml(msg.capacity, out); + out << "\n"; + } + + // member: design_capacity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "design_capacity: "; + rosidl_generator_traits::value_to_yaml(msg.design_capacity, out); + out << "\n"; + } + + // member: percentage + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "percentage: "; + rosidl_generator_traits::value_to_yaml(msg.percentage, out); + out << "\n"; + } + + // member: power_supply_status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "power_supply_status: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_status, out); + out << "\n"; + } + + // member: power_supply_health + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "power_supply_health: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_health, out); + out << "\n"; + } + + // member: power_supply_technology + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "power_supply_technology: "; + rosidl_generator_traits::value_to_yaml(msg.power_supply_technology, out); + out << "\n"; + } + + // member: present + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "present: "; + rosidl_generator_traits::value_to_yaml(msg.present, out); + out << "\n"; + } + + // member: cell_voltage + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.cell_voltage.size() == 0) { + out << "cell_voltage: []\n"; + } else { + out << "cell_voltage:\n"; + for (auto item : msg.cell_voltage) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: cell_temperature + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.cell_temperature.size() == 0) { + out << "cell_temperature: []\n"; + } else { + out << "cell_temperature:\n"; + for (auto item : msg.cell_temperature) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: location + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "location: "; + rosidl_generator_traits::value_to_yaml(msg.location, out); + out << "\n"; + } + + // member: serial_number + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "serial_number: "; + rosidl_generator_traits::value_to_yaml(msg.serial_number, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const BatteryState & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::BatteryState & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::BatteryState & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::BatteryState"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/BatteryState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.c new file mode 100644 index 000000000..adab4dbba --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.c @@ -0,0 +1,462 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/BatteryState.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/battery_state__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/battery_state__functions.h" +#include "sensor_msgs/msg/detail/battery_state__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `cell_voltage` +// Member `cell_temperature` +#include "rosidl_runtime_c/primitives_sequence_functions.h" +// Member `location` +// Member `serial_number` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_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; + sensor_msgs__msg__BatteryState__init(message_memory); +} + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_fini_function(void * message_memory) +{ + sensor_msgs__msg__BatteryState__fini(message_memory); +} + +size_t sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__size_function__BatteryState__cell_voltage( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_voltage( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_voltage( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__fetch_function__BatteryState__cell_voltage( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_voltage(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__assign_function__BatteryState__cell_voltage( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_voltage(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__resize_function__BatteryState__cell_voltage( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__size_function__BatteryState__cell_temperature( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_temperature( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_temperature( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__fetch_function__BatteryState__cell_temperature( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_temperature(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__assign_function__BatteryState__cell_temperature( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_temperature(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__resize_function__BatteryState__cell_temperature( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array[16] = { + { + "header", // 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(sensor_msgs__msg__BatteryState, header), // 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 + }, + { + "voltage", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, voltage), // 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 + }, + { + "temperature", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, temperature), // 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 + }, + { + "current", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, current), // 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 + }, + { + "charge", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, charge), // 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 + }, + { + "capacity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, capacity), // 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 + }, + { + "design_capacity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, design_capacity), // 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 + }, + { + "percentage", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, percentage), // 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 + }, + { + "power_supply_status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, power_supply_status), // 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 + }, + { + "power_supply_health", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, power_supply_health), // 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 + }, + { + "power_supply_technology", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, power_supply_technology), // 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 + }, + { + "present", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, present), // 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 + }, + { + "cell_voltage", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, cell_voltage), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__size_function__BatteryState__cell_voltage, // size() function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_voltage, // get_const(index) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_voltage, // get(index) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__fetch_function__BatteryState__cell_voltage, // fetch(index, &value) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__assign_function__BatteryState__cell_voltage, // assign(index, value) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__resize_function__BatteryState__cell_voltage // resize(index) function pointer + }, + { + "cell_temperature", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, cell_temperature), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__size_function__BatteryState__cell_temperature, // size() function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_const_function__BatteryState__cell_temperature, // get_const(index) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__get_function__BatteryState__cell_temperature, // get(index) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__fetch_function__BatteryState__cell_temperature, // fetch(index, &value) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__assign_function__BatteryState__cell_temperature, // assign(index, value) function pointer + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__resize_function__BatteryState__cell_temperature // resize(index) function pointer + }, + { + "location", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, location), // 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 + }, + { + "serial_number", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__BatteryState, serial_number), // 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 sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_members = { + "sensor_msgs__msg", // message namespace + "BatteryState", // message name + 16, // number of fields + sizeof(sensor_msgs__msg__BatteryState), + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array, // message members + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_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 sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle = { + 0, + &sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, BatteryState)() { + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__BatteryState__rosidl_typesupport_introspection_c__BatteryState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.cpp similarity index 81% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.cpp index fb00efab0..dca316bd1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__BatteryState__cell_voltage(void * untyped_member, size_t in return &member[index]; } +void fetch_function__BatteryState__cell_voltage( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__BatteryState__cell_voltage(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__BatteryState__cell_voltage( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__BatteryState__cell_voltage(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__BatteryState__cell_voltage(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__BatteryState__cell_temperature(void * untyped_member, size_ return &member[index]; } +void fetch_function__BatteryState__cell_temperature( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__BatteryState__cell_temperature(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__BatteryState__cell_temperature( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__BatteryState__cell_temperature(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__BatteryState__cell_temperature(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -210,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -225,6 +277,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -240,6 +294,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -255,6 +311,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -270,6 +328,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -285,6 +345,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ size_function__BatteryState__cell_voltage, // size() function pointer get_const_function__BatteryState__cell_voltage, // get_const(index) function pointer get_function__BatteryState__cell_voltage, // get(index) function pointer + fetch_function__BatteryState__cell_voltage, // fetch(index, &value) function pointer + assign_function__BatteryState__cell_voltage, // assign(index, value) function pointer resize_function__BatteryState__cell_voltage // resize(index) function pointer }, { @@ -300,6 +362,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ size_function__BatteryState__cell_temperature, // size() function pointer get_const_function__BatteryState__cell_temperature, // get_const(index) function pointer get_function__BatteryState__cell_temperature, // get(index) function pointer + fetch_function__BatteryState__cell_temperature, // fetch(index, &value) function pointer + assign_function__BatteryState__cell_temperature, // assign(index, value) function pointer resize_function__BatteryState__cell_temperature // resize(index) function pointer }, { @@ -315,6 +379,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 }, { @@ -330,6 +396,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember BatteryState_ 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/battery_state__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.hpp new file mode 100644 index 000000000..b1a41a0ce --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/battery_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/BatteryState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + BatteryState +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__BATTERY_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__builder.hpp index 7c30ab876..608f9a87b 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/camera_info__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/camera_info__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__functions.c index 9de7656e5..07ce019ac 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__functions.c @@ -347,22 +347,27 @@ sensor_msgs__msg__CameraInfo__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__CameraInfo); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__CameraInfo * data = - (sensor_msgs__msg__CameraInfo *)realloc(output->data, allocation_size); + (sensor_msgs__msg__CameraInfo *)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 (!sensor_msgs__msg__CameraInfo__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__CameraInfo__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; ) { - sensor_msgs__msg__CameraInfo__fini(&data[i]); + sensor_msgs__msg__CameraInfo__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h index e0e90564d..eb6132433 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__CameraInfo( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__CameraInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp index febd3f56e..fb4c83196 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_CameraInfo( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.h new file mode 100644 index 000000000..7dd080eb2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.h @@ -0,0 +1,169 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/CameraInfo.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'distortion_model' +#include "rosidl_runtime_c/string.h" +// Member 'd' +#include "rosidl_runtime_c/primitives_sequence.h" +// Member 'roi' +#include "sensor_msgs/msg/detail/region_of_interest__struct.h" + +/// Struct defined in msg/CameraInfo in the package sensor_msgs. +/** + * This message defines meta information for a camera. It should be in a + * camera namespace on topic "camera_info" and accompanied by up to five + * image topics named: + * + * image_raw - raw data from the camera driver, possibly Bayer encoded + * image - monochrome, distorted + * image_color - color, distorted + * image_rect - monochrome, rectified + * image_rect_color - color, rectified + * + * The image_pipeline contains packages (image_proc, stereo_image_proc) + * for producing the four processed image topics from image_raw and + * camera_info. The meaning of the camera parameters are described in + * detail at http://www.ros.org/wiki/image_pipeline/CameraInfo. + * + * The image_geometry package provides a user-friendly interface to + * common operations using this meta information. If you want to, e.g., + * project a 3d point into image coordinates, we strongly recommend + * using image_geometry. + * + * If the camera is uncalibrated, the matrices D, K, R, P should be left + * zeroed out. In particular, clients may assume that K == 0.0 + * indicates an uncalibrated camera. + */ +typedef struct sensor_msgs__msg__CameraInfo +{ + /// Image acquisition info # + /// + /// Time of image acquisition, camera coordinate frame ID + /// Header timestamp should be acquisition time of image + /// Header frame_id should be optical frame of camera + /// origin of frame should be optical center of camera + /// +x should point to the right in the image + /// +y should point down in the image + /// +z should point into the plane of the image + std_msgs__msg__Header header; + /// Calibration Parameters # + /// + /// These are fixed during camera calibration. Their values will be the # + /// same in all messages until the camera is recalibrated. Note that # + /// self-calibrating systems may "recalibrate" frequently. # + /// # + /// The internal parameters can be used to warp a raw (distorted) image # + /// to: # + /// 1. An undistorted image (requires D and K) # + /// 2. A rectified image (requires D, K, R) # + /// The projection matrix P projects 3D points into the rectified image.# + /// + /// The image dimensions with which the camera was calibrated. + /// Normally this will be the full camera resolution in pixels. + uint32_t height; + uint32_t width; + /// The distortion model used. Supported models are listed in + /// sensor_msgs/distortion_models.hpp. For most cameras, "plumb_bob" - a + /// simple model of radial and tangential distortion - is sufficent. + rosidl_runtime_c__String distortion_model; + /// The distortion parameters, size depending on the distortion model. + /// For "plumb_bob", the 5 parameters are: (k1, k2, t1, t2, k3). + rosidl_runtime_c__double__Sequence d; + /// Intrinsic camera matrix for the raw (distorted) images. + /// [fx 0 cx] + /// K = [ 0 fy cy] + /// [ 0 0 1] + /// Projects 3D points in the camera coordinate frame to 2D pixel + /// coordinates using the focal lengths (fx, fy) and principal point + /// (cx, cy). + /// 3x3 row-major matrix + double k[9]; + /// Rectification matrix (stereo cameras only) + /// A rotation matrix aligning the camera coordinate system to the ideal + /// stereo image plane so that epipolar lines in both stereo images are + /// parallel. + /// 3x3 row-major matrix + double r[9]; + /// Projection/camera matrix + /// [fx' 0 cx' Tx] + /// P = [ 0 fy' cy' Ty] + /// [ 0 0 1 0] + /// By convention, this matrix specifies the intrinsic (camera) matrix + /// of the processed (rectified) image. That is, the left 3x3 portion + /// is the normal camera intrinsic matrix for the rectified image. + /// It projects 3D points in the camera coordinate frame to 2D pixel + /// coordinates using the focal lengths (fx', fy') and principal point + /// (cx', cy') - these may differ from the values in K. + /// For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will + /// also have R = the identity and P[1:3,1:3] = K. + /// For a stereo pair, the fourth column [Tx Ty 0]' is related to the + /// position of the optical center of the second camera in the first + /// camera's frame. We assume Tz = 0 so both cameras are in the same + /// stereo image plane. The first camera always has Tx = Ty = 0. For + /// the right (second) camera of a horizontal stereo pair, Ty = 0 and + /// Tx = -fx' * B, where B is the baseline between the cameras. + /// Given a 3D point [X Y Z]', the projection (x, y) of the point onto + /// the rectified image is given by: + /// [u v w]' = P * [X Y Z 1]' + /// x = u / w + /// y = v / w + /// This holds for both images of a stereo pair. + /// 3x4 row-major matrix + double p[12]; + /// Operational Parameters # + /// + /// These define the image region actually captured by the camera # + /// driver. Although they affect the geometry of the output image, they # + /// may be changed freely without recalibrating the camera. # + /// + /// Binning refers here to any camera setting which combines rectangular + /// neighborhoods of pixels into larger "super-pixels." It reduces the + /// resolution of the output image to + /// (width / binning_x) x (height / binning_y). + /// The default values binning_x = binning_y = 0 is considered the same + /// as binning_x = binning_y = 1 (no subsampling). + uint32_t binning_x; + uint32_t binning_y; + /// Region of interest (subwindow of full camera resolution), given in + /// full resolution (unbinned) image coordinates. A particular ROI + /// always denotes the same window of pixels on the camera sensor, + /// regardless of binning settings. + /// The default setting of roi (all values 0) is considered the same as + /// full resolution (roi.width = width, roi.height = height). + sensor_msgs__msg__RegionOfInterest roi; +} sensor_msgs__msg__CameraInfo; + +// Struct for a sequence of sensor_msgs__msg__CameraInfo. +typedef struct sensor_msgs__msg__CameraInfo__Sequence +{ + sensor_msgs__msg__CameraInfo * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__CameraInfo__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.hpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.hpp index f581d9a7f..32b65db2f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -89,10 +90,10 @@ struct CameraInfo_ uint32_t; _width_type width; using _distortion_model_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _distortion_model_type distortion_model; using _d_type = - std::vector::other>; + std::vector::template rebind_alloc>; _d_type d; using _k_type = std::array; @@ -133,13 +134,13 @@ struct CameraInfo_ return *this; } Type & set__distortion_model( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->distortion_model = _arg; return *this; } Type & set__d( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->d = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__traits.hpp new file mode 100644 index 000000000..7a372fb19 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__traits.hpp @@ -0,0 +1,367 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/CameraInfo.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/camera_info__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'roi' +#include "sensor_msgs/msg/detail/region_of_interest__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const CameraInfo & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: height + { + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << ", "; + } + + // member: width + { + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << ", "; + } + + // member: distortion_model + { + out << "distortion_model: "; + rosidl_generator_traits::value_to_yaml(msg.distortion_model, out); + out << ", "; + } + + // member: d + { + if (msg.d.size() == 0) { + out << "d: []"; + } else { + out << "d: ["; + size_t pending_items = msg.d.size(); + for (auto item : msg.d) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: k + { + if (msg.k.size() == 0) { + out << "k: []"; + } else { + out << "k: ["; + size_t pending_items = msg.k.size(); + for (auto item : msg.k) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: r + { + if (msg.r.size() == 0) { + out << "r: []"; + } else { + out << "r: ["; + size_t pending_items = msg.r.size(); + for (auto item : msg.r) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: p + { + if (msg.p.size() == 0) { + out << "p: []"; + } else { + out << "p: ["; + size_t pending_items = msg.p.size(); + for (auto item : msg.p) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: binning_x + { + out << "binning_x: "; + rosidl_generator_traits::value_to_yaml(msg.binning_x, out); + out << ", "; + } + + // member: binning_y + { + out << "binning_y: "; + rosidl_generator_traits::value_to_yaml(msg.binning_y, out); + out << ", "; + } + + // member: roi + { + out << "roi: "; + to_flow_style_yaml(msg.roi, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const CameraInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << "\n"; + } + + // member: width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << "\n"; + } + + // member: distortion_model + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "distortion_model: "; + rosidl_generator_traits::value_to_yaml(msg.distortion_model, out); + out << "\n"; + } + + // member: d + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.d.size() == 0) { + out << "d: []\n"; + } else { + out << "d:\n"; + for (auto item : msg.d) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: k + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.k.size() == 0) { + out << "k: []\n"; + } else { + out << "k:\n"; + for (auto item : msg.k) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: r + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.r.size() == 0) { + out << "r: []\n"; + } else { + out << "r:\n"; + for (auto item : msg.r) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: p + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.p.size() == 0) { + out << "p: []\n"; + } else { + out << "p:\n"; + for (auto item : msg.p) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: binning_x + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "binning_x: "; + rosidl_generator_traits::value_to_yaml(msg.binning_x, out); + out << "\n"; + } + + // member: binning_y + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "binning_y: "; + rosidl_generator_traits::value_to_yaml(msg.binning_y, out); + out << "\n"; + } + + // member: roi + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "roi:\n"; + to_block_style_yaml(msg.roi, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const CameraInfo & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::CameraInfo & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::CameraInfo & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::CameraInfo"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/CameraInfo"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.c new file mode 100644 index 000000000..0d0c2b053 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.c @@ -0,0 +1,461 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/CameraInfo.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/camera_info__functions.h" +#include "sensor_msgs/msg/detail/camera_info__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `distortion_model` +#include "rosidl_runtime_c/string_functions.h" +// Member `d` +#include "rosidl_runtime_c/primitives_sequence_functions.h" +// Member `roi` +#include "sensor_msgs/msg/region_of_interest.h" +// Member `roi` +#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_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; + sensor_msgs__msg__CameraInfo__init(message_memory); +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_fini_function(void * message_memory) +{ + sensor_msgs__msg__CameraInfo__fini(message_memory); +} + +size_t sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__d( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__d( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__d( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__d( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__d(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__d( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__d(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__resize_function__CameraInfo__d( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__k( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__k( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__k( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__k( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__k(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__k( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__k(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +size_t sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__r( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__r( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__r( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__r( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__r(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__r( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__r(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +size_t sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__p( + const void * untyped_member) +{ + (void)untyped_member; + return 12; +} + +const void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__p( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__p( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__p( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__p(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__p( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__p(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[11] = { + { + "header", // 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(sensor_msgs__msg__CameraInfo, header), // 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 + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, height), // 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 + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, width), // 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 + }, + { + "distortion_model", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, distortion_model), // 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 + }, + { + "d", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, d), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__d, // size() function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__d, // get_const(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__d, // get(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__d, // fetch(index, &value) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__d, // assign(index, value) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__resize_function__CameraInfo__d // resize(index) function pointer + }, + { + "k", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, k), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__k, // size() function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__k, // get_const(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__k, // get(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__k, // fetch(index, &value) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__k, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "r", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, r), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__r, // size() function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__r, // get_const(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__r, // get(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__r, // fetch(index, &value) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__r, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "p", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, p), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__size_function__CameraInfo__p, // size() function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_const_function__CameraInfo__p, // get_const(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__get_function__CameraInfo__p, // get(index) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__fetch_function__CameraInfo__p, // fetch(index, &value) function pointer + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__assign_function__CameraInfo__p, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "binning_x", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, binning_x), // 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 + }, + { + "binning_y", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CameraInfo, binning_y), // 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 + }, + { + "roi", // 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(sensor_msgs__msg__CameraInfo, roi), // 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 sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_members = { + "sensor_msgs__msg", // message namespace + "CameraInfo", // message name + 11, // number of fields + sizeof(sensor_msgs__msg__CameraInfo), + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array, // message members + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_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 sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle = { + 0, + &sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CameraInfo)() { + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_member_array[10].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)(); + if (!sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__CameraInfo__rosidl_typesupport_introspection_c__CameraInfo_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.cpp similarity index 75% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.cpp index 8eb1ad16a..a799767cb 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__CameraInfo__d(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__CameraInfo__d( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CameraInfo__d(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CameraInfo__d( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CameraInfo__d(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__CameraInfo__d(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__CameraInfo__k(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__CameraInfo__k( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CameraInfo__k(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CameraInfo__k( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CameraInfo__k(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + size_t size_function__CameraInfo__r(const void * untyped_member) { (void)untyped_member; @@ -104,6 +140,24 @@ void * get_function__CameraInfo__r(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__CameraInfo__r( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CameraInfo__r(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CameraInfo__r( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CameraInfo__r(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + size_t size_function__CameraInfo__p(const void * untyped_member) { (void)untyped_member; @@ -124,6 +178,24 @@ void * get_function__CameraInfo__p(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__CameraInfo__p( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CameraInfo__p(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CameraInfo__p( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CameraInfo__p(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_message_member_array[11] = { { "header", // name @@ -138,6 +210,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -153,6 +227,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -168,6 +244,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -183,6 +261,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -198,6 +278,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me size_function__CameraInfo__d, // size() function pointer get_const_function__CameraInfo__d, // get_const(index) function pointer get_function__CameraInfo__d, // get(index) function pointer + fetch_function__CameraInfo__d, // fetch(index, &value) function pointer + assign_function__CameraInfo__d, // assign(index, value) function pointer resize_function__CameraInfo__d // resize(index) function pointer }, { @@ -213,6 +295,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me size_function__CameraInfo__k, // size() function pointer get_const_function__CameraInfo__k, // get_const(index) function pointer get_function__CameraInfo__k, // get(index) function pointer + fetch_function__CameraInfo__k, // fetch(index, &value) function pointer + assign_function__CameraInfo__k, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -228,6 +312,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me size_function__CameraInfo__r, // size() function pointer get_const_function__CameraInfo__r, // get_const(index) function pointer get_function__CameraInfo__r, // get(index) function pointer + fetch_function__CameraInfo__r, // fetch(index, &value) function pointer + assign_function__CameraInfo__r, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -243,6 +329,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me size_function__CameraInfo__p, // size() function pointer get_const_function__CameraInfo__p, // get_const(index) function pointer get_function__CameraInfo__p, // get(index) function pointer + fetch_function__CameraInfo__p, // fetch(index, &value) function pointer + assign_function__CameraInfo__p, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -258,6 +346,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -273,6 +363,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 }, { @@ -288,6 +380,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CameraInfo_me 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/camera_info__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.hpp new file mode 100644 index 000000000..beb299f3f --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/camera_info__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/CameraInfo.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + CameraInfo +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__CAMERA_INFO__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__builder.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__builder.hpp index 209964828..b888705af 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/channel_float32__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/channel_float32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__functions.c index 0853b2731..1accdbea6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__functions.c @@ -237,22 +237,27 @@ sensor_msgs__msg__ChannelFloat32__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__ChannelFloat32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__ChannelFloat32 * data = - (sensor_msgs__msg__ChannelFloat32 *)realloc(output->data, allocation_size); + (sensor_msgs__msg__ChannelFloat32 *)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 (!sensor_msgs__msg__ChannelFloat32__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__ChannelFloat32__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; ) { - sensor_msgs__msg__ChannelFloat32__fini(&data[i]); + sensor_msgs__msg__ChannelFloat32__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h index 0ccfc8c95..35531759e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__ChannelFloat32( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__ChannelFloat32( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp index d4f0f2fc2..c74c40625 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_ChannelFloat32( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.h new file mode 100644 index 000000000..21a8b00ee --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.h @@ -0,0 +1,69 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/ChannelFloat32.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'name' +#include "rosidl_runtime_c/string.h" +// Member 'values' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/ChannelFloat32 in the package sensor_msgs. +/** + * This message is used by the PointCloud message to hold optional data + * associated with each point in the cloud. The length of the values + * array should be the same as the length of the points array in the + * PointCloud, and each value should be associated with the corresponding + * point. + * + * Channel names in existing practice include: + * "u", "v" - row and column (respectively) in the left stereo image. + * This is opposite to usual conventions but remains for + * historical reasons. The newer PointCloud2 message has no + * such problem. + * "rgb" - For point clouds produced by color stereo cameras. uint8 + * (R,G,B) values packed into the least significant 24 bits, + * in order. + * "intensity" - laser or pixel intensity. + * "distance" + */ +typedef struct sensor_msgs__msg__ChannelFloat32 +{ + /// The channel name should give semantics of the channel (e.g. + /// "intensity" instead of "value"). + rosidl_runtime_c__String name; + /// The values array should be 1-1 with the elements of the associated + /// PointCloud. + rosidl_runtime_c__float__Sequence values; +} sensor_msgs__msg__ChannelFloat32; + +// Struct for a sequence of sensor_msgs__msg__ChannelFloat32. +typedef struct sensor_msgs__msg__ChannelFloat32__Sequence +{ + sensor_msgs__msg__ChannelFloat32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__ChannelFloat32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.hpp similarity index 88% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.hpp index bedbdd429..6c1333b97 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__ChannelFloat32 __attribute__((deprecated)) @@ -53,21 +54,21 @@ struct ChannelFloat32_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _values_type = - std::vector::other>; + std::vector::template rebind_alloc>; _values_type values; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; } Type & set__values( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->values = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__traits.hpp new file mode 100644 index 000000000..cd2b8880c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__traits.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/ChannelFloat32.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/channel_float32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ChannelFloat32 & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: values + { + if (msg.values.size() == 0) { + out << "values: []"; + } else { + out << "values: ["; + size_t pending_items = msg.values.size(); + for (auto item : msg.values) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ChannelFloat32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: values + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.values.size() == 0) { + out << "values: []\n"; + } else { + out << "values:\n"; + for (auto item : msg.values) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ChannelFloat32 & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::ChannelFloat32 & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::ChannelFloat32 & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::ChannelFloat32"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/ChannelFloat32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.c new file mode 100644 index 000000000..7c169e6e8 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.c @@ -0,0 +1,161 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/ChannelFloat32.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/channel_float32__functions.h" +#include "sensor_msgs/msg/detail/channel_float32__struct.h" + + +// Include directives for member types +// Member `name` +#include "rosidl_runtime_c/string_functions.h" +// Member `values` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_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; + sensor_msgs__msg__ChannelFloat32__init(message_memory); +} + +void sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_fini_function(void * message_memory) +{ + sensor_msgs__msg__ChannelFloat32__fini(message_memory); +} + +size_t sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__size_function__ChannelFloat32__values( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_const_function__ChannelFloat32__values( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_function__ChannelFloat32__values( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__fetch_function__ChannelFloat32__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_const_function__ChannelFloat32__values(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__assign_function__ChannelFloat32__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_function__ChannelFloat32__values(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__resize_function__ChannelFloat32__values( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_member_array[2] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__ChannelFloat32, name), // 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 + }, + { + "values", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__ChannelFloat32, values), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__size_function__ChannelFloat32__values, // size() function pointer + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_const_function__ChannelFloat32__values, // get_const(index) function pointer + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__get_function__ChannelFloat32__values, // get(index) function pointer + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__fetch_function__ChannelFloat32__values, // fetch(index, &value) function pointer + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__assign_function__ChannelFloat32__values, // assign(index, value) function pointer + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__resize_function__ChannelFloat32__values // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_members = { + "sensor_msgs__msg", // message namespace + "ChannelFloat32", // message name + 2, // number of fields + sizeof(sensor_msgs__msg__ChannelFloat32), + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_member_array, // message members + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_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 sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle = { + 0, + &sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, ChannelFloat32)() { + if (!sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__ChannelFloat32__rosidl_typesupport_introspection_c__ChannelFloat32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.cpp index 45028a502..0f9f1e609 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ChannelFloat32__values(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__ChannelFloat32__values( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ChannelFloat32__values(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ChannelFloat32__values( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ChannelFloat32__values(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ChannelFloat32__values(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ChannelFloat3 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ChannelFloat3 size_function__ChannelFloat32__values, // size() function pointer get_const_function__ChannelFloat32__values, // get_const(index) function pointer get_function__ChannelFloat32__values, // get(index) function pointer + fetch_function__ChannelFloat32__values, // fetch(index, &value) function pointer + assign_function__ChannelFloat32__values, // assign(index, value) function pointer resize_function__ChannelFloat32__values // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/channel_float32__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.hpp new file mode 100644 index 000000000..bc0bdc5d7 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/channel_float32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/ChannelFloat32.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + ChannelFloat32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__CHANNEL_FLOAT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__builder.hpp index 29b5a08af..07ff6b8cc 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/compressed_image__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/compressed_image__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__functions.c index 49545538a..40c6c012d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__functions.c @@ -258,22 +258,27 @@ sensor_msgs__msg__CompressedImage__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__CompressedImage); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__CompressedImage * data = - (sensor_msgs__msg__CompressedImage *)realloc(output->data, allocation_size); + (sensor_msgs__msg__CompressedImage *)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 (!sensor_msgs__msg__CompressedImage__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__CompressedImage__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; ) { - sensor_msgs__msg__CompressedImage__fini(&data[i]); + sensor_msgs__msg__CompressedImage__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h index 5f4816488..a774d605c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__CompressedImage( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__CompressedImage( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp index d2f859a0d..81bcf3ea8 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_CompressedImage( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.h new file mode 100644 index 000000000..877bf6b41 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.h @@ -0,0 +1,63 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/CompressedImage.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'format' +#include "rosidl_runtime_c/string.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/CompressedImage in the package sensor_msgs. +/** + * This message contains a compressed image. + */ +typedef struct sensor_msgs__msg__CompressedImage +{ + /// Header timestamp should be acquisition time of image + /// Header frame_id should be optical frame of camera + /// origin of frame should be optical center of cameara + /// +x should point to the right in the image + /// +y should point down in the image + /// +z should point into to plane of the image + std_msgs__msg__Header header; + /// Specifies the format of the data + /// Acceptable values: + /// jpeg, png, tiff + rosidl_runtime_c__String format; + /// Compressed image buffer + rosidl_runtime_c__uint8__Sequence data; +} sensor_msgs__msg__CompressedImage; + +// Struct for a sequence of sensor_msgs__msg__CompressedImage. +typedef struct sensor_msgs__msg__CompressedImage__Sequence +{ + sensor_msgs__msg__CompressedImage * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__CompressedImage__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.hpp similarity index 89% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.hpp index 7239cfdc6..ac7b1d5cc 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -62,10 +63,10 @@ struct CompressedImage_ std_msgs::msg::Header_; _header_type header; using _format_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _format_type format; using _data_type = - std::vector::other>; + std::vector::template rebind_alloc>; _data_type data; // setters for named parameter idiom @@ -76,13 +77,13 @@ struct CompressedImage_ return *this; } Type & set__format( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->format = _arg; return *this; } Type & set__data( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->data = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__traits.hpp new file mode 100644 index 000000000..a4250349d --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__traits.hpp @@ -0,0 +1,167 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/CompressedImage.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/compressed_image__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const CompressedImage & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: format + { + out << "format: "; + rosidl_generator_traits::value_to_yaml(msg.format, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const CompressedImage & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: format + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "format: "; + rosidl_generator_traits::value_to_yaml(msg.format, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const CompressedImage & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::CompressedImage & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::CompressedImage & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::CompressedImage"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/CompressedImage"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.c new file mode 100644 index 000000000..d0fb14ab2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.c @@ -0,0 +1,184 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/CompressedImage.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/compressed_image__functions.h" +#include "sensor_msgs/msg/detail/compressed_image__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `format` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_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; + sensor_msgs__msg__CompressedImage__init(message_memory); +} + +void sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_fini_function(void * message_memory) +{ + sensor_msgs__msg__CompressedImage__fini(message_memory); +} + +size_t sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__size_function__CompressedImage__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_const_function__CompressedImage__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_function__CompressedImage__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__fetch_function__CompressedImage__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_const_function__CompressedImage__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__assign_function__CompressedImage__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_function__CompressedImage__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__resize_function__CompressedImage__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__CompressedImage, header), // 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 + }, + { + "format", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CompressedImage, format), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__CompressedImage, data), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__size_function__CompressedImage__data, // size() function pointer + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_const_function__CompressedImage__data, // get_const(index) function pointer + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__get_function__CompressedImage__data, // get(index) function pointer + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__fetch_function__CompressedImage__data, // fetch(index, &value) function pointer + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__assign_function__CompressedImage__data, // assign(index, value) function pointer + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__resize_function__CompressedImage__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_members = { + "sensor_msgs__msg", // message namespace + "CompressedImage", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__CompressedImage), + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array, // message members + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_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 sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle = { + 0, + &sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CompressedImage)() { + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__CompressedImage__rosidl_typesupport_introspection_c__CompressedImage_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.cpp index 7e23d4460..537d455ea 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__CompressedImage__data(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__CompressedImage__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__CompressedImage__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__CompressedImage__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__CompressedImage__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__CompressedImage__data(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CompressedIma 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CompressedIma 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember CompressedIma size_function__CompressedImage__data, // size() function pointer get_const_function__CompressedImage__data, // get_const(index) function pointer get_function__CompressedImage__data, // get(index) function pointer + fetch_function__CompressedImage__data, // fetch(index, &value) function pointer + assign_function__CompressedImage__data, // assign(index, value) function pointer resize_function__CompressedImage__data // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/compressed_image__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.hpp new file mode 100644 index 000000000..15eddf603 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/compressed_image__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/CompressedImage.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + CompressedImage +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__COMPRESSED_IMAGE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__builder.hpp index ce2383865..17f28171c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/fluid_pressure__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/fluid_pressure__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__functions.c index e9e7dc456..9cbe4e667 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__functions.c @@ -232,22 +232,27 @@ sensor_msgs__msg__FluidPressure__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__FluidPressure); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__FluidPressure * data = - (sensor_msgs__msg__FluidPressure *)realloc(output->data, allocation_size); + (sensor_msgs__msg__FluidPressure *)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 (!sensor_msgs__msg__FluidPressure__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__FluidPressure__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; ) { - sensor_msgs__msg__FluidPressure__fini(&data[i]); + sensor_msgs__msg__FluidPressure__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h index cb9cf88ab..9d4008566 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__FluidPressure( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__FluidPressure( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp index 8ae8567c1..e47d80f52 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_FluidPressure( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.h new file mode 100644 index 000000000..a6efa9172 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/FluidPressure.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" + +/// Struct defined in msg/FluidPressure in the package sensor_msgs. +/** + * Single pressure reading. This message is appropriate for measuring the + * pressure inside of a fluid (air, water, etc). This also includes + * atmospheric or barometric pressure. + * + * This message is not appropriate for force/pressure contact sensors. + */ +typedef struct sensor_msgs__msg__FluidPressure +{ + /// timestamp of the measurement + /// frame_id is the location of the pressure sensor + std_msgs__msg__Header header; + /// Absolute pressure reading in Pascals. + double fluid_pressure; + /// 0 is interpreted as variance unknown + double variance; +} sensor_msgs__msg__FluidPressure; + +// Struct for a sequence of sensor_msgs__msg__FluidPressure. +typedef struct sensor_msgs__msg__FluidPressure__Sequence +{ + sensor_msgs__msg__FluidPressure * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__FluidPressure__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.hpp index ce620788d..d52ab850a 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__traits.hpp new file mode 100644 index 000000000..18e3bd168 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__traits.hpp @@ -0,0 +1,146 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/FluidPressure.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/fluid_pressure__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const FluidPressure & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: fluid_pressure + { + out << "fluid_pressure: "; + rosidl_generator_traits::value_to_yaml(msg.fluid_pressure, out); + out << ", "; + } + + // member: variance + { + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const FluidPressure & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: fluid_pressure + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "fluid_pressure: "; + rosidl_generator_traits::value_to_yaml(msg.fluid_pressure, out); + out << "\n"; + } + + // member: variance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const FluidPressure & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::FluidPressure & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::FluidPressure & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::FluidPressure"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/FluidPressure"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.c new file mode 100644 index 000000000..a6a3d191b --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.c @@ -0,0 +1,125 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/FluidPressure.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/fluid_pressure__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/fluid_pressure__functions.h" +#include "sensor_msgs/msg/detail/fluid_pressure__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_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; + sensor_msgs__msg__FluidPressure__init(message_memory); +} + +void sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_fini_function(void * message_memory) +{ + sensor_msgs__msg__FluidPressure__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__FluidPressure, header), // 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 + }, + { + "fluid_pressure", // 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(sensor_msgs__msg__FluidPressure, fluid_pressure), // 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 + }, + { + "variance", // 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(sensor_msgs__msg__FluidPressure, variance), // 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 sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_members = { + "sensor_msgs__msg", // message namespace + "FluidPressure", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__FluidPressure), + sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array, // message members + sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_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 sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle = { + 0, + &sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, FluidPressure)() { + sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__FluidPressure__rosidl_typesupport_introspection_c__FluidPressure_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp index be4cc9e87..9758135dc 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FluidPressure 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FluidPressure 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FluidPressure 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/fluid_pressure__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.hpp new file mode 100644 index 000000000..79e2bd8cf --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/fluid_pressure__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/FluidPressure.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + FluidPressure +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__FLUID_PRESSURE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__builder.hpp index d46b6cd8e..444bc542d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/illuminance__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/illuminance__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__functions.c index 5e8a798d9..f379ffa53 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__functions.c @@ -232,22 +232,27 @@ sensor_msgs__msg__Illuminance__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Illuminance); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Illuminance * data = - (sensor_msgs__msg__Illuminance *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Illuminance *)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 (!sensor_msgs__msg__Illuminance__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Illuminance__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; ) { - sensor_msgs__msg__Illuminance__fini(&data[i]); + sensor_msgs__msg__Illuminance__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h index 50ac73ba5..03ffe5e0f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Illuminance( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Illuminance( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp index 5848d44c6..8a441d40f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Illuminance( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.h new file mode 100644 index 000000000..0aef44638 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.h @@ -0,0 +1,65 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/Illuminance.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" + +/// Struct defined in msg/Illuminance in the package sensor_msgs. +/** + * Single photometric illuminance measurement. Light should be assumed to be + * measured along the sensor's x-axis (the area of detection is the y-z plane). + * The illuminance should have a 0 or positive value and be received with + * the sensor's +X axis pointing toward the light source. + * + * Photometric illuminance is the measure of the human eye's sensitivity of the + * intensity of light encountering or passing through a surface. + * + * All other Photometric and Radiometric measurements should not use this message. + * This message cannot represent: + * - Luminous intensity (candela/light source output) + * - Luminance (nits/light output per area) + * - Irradiance (watt/area), etc. + */ +typedef struct sensor_msgs__msg__Illuminance +{ + /// timestamp is the time the illuminance was measured + /// frame_id is the location and direction of the reading + std_msgs__msg__Header header; + /// Measurement of the Photometric Illuminance in Lux. + double illuminance; + /// 0 is interpreted as variance unknown + double variance; +} sensor_msgs__msg__Illuminance; + +// Struct for a sequence of sensor_msgs__msg__Illuminance. +typedef struct sensor_msgs__msg__Illuminance__Sequence +{ + sensor_msgs__msg__Illuminance * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__Illuminance__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.hpp index 26c0ab7e2..58b922b49 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__traits.hpp new file mode 100644 index 000000000..33801caaf --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__traits.hpp @@ -0,0 +1,146 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Illuminance.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/illuminance__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Illuminance & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: illuminance + { + out << "illuminance: "; + rosidl_generator_traits::value_to_yaml(msg.illuminance, out); + out << ", "; + } + + // member: variance + { + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Illuminance & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: illuminance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "illuminance: "; + rosidl_generator_traits::value_to_yaml(msg.illuminance, out); + out << "\n"; + } + + // member: variance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Illuminance & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Illuminance & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Illuminance & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Illuminance"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Illuminance"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.c new file mode 100644 index 000000000..464ea4588 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.c @@ -0,0 +1,125 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Illuminance.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/illuminance__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/illuminance__functions.h" +#include "sensor_msgs/msg/detail/illuminance__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_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; + sensor_msgs__msg__Illuminance__init(message_memory); +} + +void sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_fini_function(void * message_memory) +{ + sensor_msgs__msg__Illuminance__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__Illuminance, header), // 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 + }, + { + "illuminance", // 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(sensor_msgs__msg__Illuminance, illuminance), // 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 + }, + { + "variance", // 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(sensor_msgs__msg__Illuminance, variance), // 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 sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_members = { + "sensor_msgs__msg", // message namespace + "Illuminance", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__Illuminance), + sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array, // message members + sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_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 sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle = { + 0, + &sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Illuminance)() { + sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Illuminance__rosidl_typesupport_introspection_c__Illuminance_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.cpp index cca146678..a3e89cbec 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Illuminance_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Illuminance_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Illuminance_m 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/illuminance__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.hpp new file mode 100644 index 000000000..65c8087e2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/illuminance__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Illuminance.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Illuminance +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__ILLUMINANCE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__builder.hpp index 4202b179e..ed1176585 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__IMAGE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/image__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/image__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__functions.c index 401eed311..dad92c125 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__functions.c @@ -290,22 +290,27 @@ sensor_msgs__msg__Image__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Image); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Image * data = - (sensor_msgs__msg__Image *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Image *)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 (!sensor_msgs__msg__Image__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Image__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; ) { - sensor_msgs__msg__Image__fini(&data[i]); + sensor_msgs__msg__Image__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h index ad776f730..5e1c61b7f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Image( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Image( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp index 31ca907ee..ddfbc0a6b 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Image( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.h new file mode 100644 index 000000000..affea2fbc --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.h @@ -0,0 +1,77 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/Image.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'encoding' +#include "rosidl_runtime_c/string.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Image in the package sensor_msgs. +/** + * This message contains an uncompressed image + * (0, 0) is at top-left corner of image + */ +typedef struct sensor_msgs__msg__Image +{ + /// Header timestamp should be acquisition time of image + /// Header frame_id should be optical frame of camera + /// origin of frame should be optical center of cameara + /// +x should point to the right in the image + /// +y should point down in the image + /// +z should point into to plane of the image + /// If the frame_id here and the frame_id of the CameraInfo + /// message associated with the image conflict + /// the behavior is undefined + std_msgs__msg__Header header; + /// image height, that is, number of rows + uint32_t height; + /// image width, that is, number of columns + uint32_t width; + /// The legal values for encoding are in file src/image_encodings.cpp + /// If you want to standardize a new string format, join + /// ros-users@lists.ros.org and send an email proposing a new encoding. + /// Encoding of pixels -- channel meaning, ordering, size + /// taken from the list of strings in include/sensor_msgs/image_encodings.hpp + rosidl_runtime_c__String encoding; + /// is this data bigendian? + uint8_t is_bigendian; + /// Full row length in bytes + uint32_t step; + /// actual matrix data, size is (step * rows) + rosidl_runtime_c__uint8__Sequence data; +} sensor_msgs__msg__Image; + +// Struct for a sequence of sensor_msgs__msg__Image. +typedef struct sensor_msgs__msg__Image__Sequence +{ + sensor_msgs__msg__Image * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__Image__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.hpp similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.hpp index af476a211..d5c26037c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__IMAGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -76,7 +77,7 @@ struct Image_ uint32_t; _width_type width; using _encoding_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _encoding_type encoding; using _is_bigendian_type = uint8_t; @@ -85,7 +86,7 @@ struct Image_ uint32_t; _step_type step; using _data_type = - std::vector::other>; + std::vector::template rebind_alloc>; _data_type data; // setters for named parameter idiom @@ -108,7 +109,7 @@ struct Image_ return *this; } Type & set__encoding( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->encoding = _arg; return *this; @@ -126,7 +127,7 @@ struct Image_ return *this; } Type & set__data( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->data = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__traits.hpp new file mode 100644 index 000000000..82c8544fc --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__traits.hpp @@ -0,0 +1,235 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Image.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/image__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Image & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: height + { + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << ", "; + } + + // member: width + { + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << ", "; + } + + // member: encoding + { + out << "encoding: "; + rosidl_generator_traits::value_to_yaml(msg.encoding, out); + out << ", "; + } + + // member: is_bigendian + { + out << "is_bigendian: "; + rosidl_generator_traits::value_to_yaml(msg.is_bigendian, out); + out << ", "; + } + + // member: step + { + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Image & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << "\n"; + } + + // member: width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << "\n"; + } + + // member: encoding + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "encoding: "; + rosidl_generator_traits::value_to_yaml(msg.encoding, out); + out << "\n"; + } + + // member: is_bigendian + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "is_bigendian: "; + rosidl_generator_traits::value_to_yaml(msg.is_bigendian, out); + out << "\n"; + } + + // member: step + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "step: "; + rosidl_generator_traits::value_to_yaml(msg.step, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Image & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Image & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Image & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Image"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Image"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.c new file mode 100644 index 000000000..9b3fd28d9 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.c @@ -0,0 +1,252 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Image.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/image__functions.h" +#include "sensor_msgs/msg/detail/image__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `encoding` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_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; + sensor_msgs__msg__Image__init(message_memory); +} + +void sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_fini_function(void * message_memory) +{ + sensor_msgs__msg__Image__fini(message_memory); +} + +size_t sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__size_function__Image__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_const_function__Image__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_function__Image__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__fetch_function__Image__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_const_function__Image__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__assign_function__Image__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_function__Image__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__resize_function__Image__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_member_array[7] = { + { + "header", // 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(sensor_msgs__msg__Image, header), // 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 + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, height), // 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 + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, width), // 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 + }, + { + "encoding", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, encoding), // 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 + }, + { + "is_bigendian", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, is_bigendian), // 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 + }, + { + "step", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, step), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Image, data), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__size_function__Image__data, // size() function pointer + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_const_function__Image__data, // get_const(index) function pointer + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__get_function__Image__data, // get(index) function pointer + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__fetch_function__Image__data, // fetch(index, &value) function pointer + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__assign_function__Image__data, // assign(index, value) function pointer + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__resize_function__Image__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_members = { + "sensor_msgs__msg", // message namespace + "Image", // message name + 7, // number of fields + sizeof(sensor_msgs__msg__Image), + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_member_array, // message members + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_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 sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle = { + 0, + &sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Image)() { + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Image__rosidl_typesupport_introspection_c__Image_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.cpp index c5273f0b3..a3e60ff27 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Image__data(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Image__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Image__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Image__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Image__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Image__data(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -123,6 +147,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -138,6 +164,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -153,6 +181,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message 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 }, { @@ -168,6 +198,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Image_message size_function__Image__data, // size() function pointer get_const_function__Image__data, // get_const(index) function pointer get_function__Image__data, // get(index) function pointer + fetch_function__Image__data, // fetch(index, &value) function pointer + assign_function__Image__data, // assign(index, value) function pointer resize_function__Image__data // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/image__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.hpp new file mode 100644 index 000000000..5475ce784 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/image__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Image.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMAGE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__IMAGE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Image +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__IMAGE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__builder.hpp index 604f5254c..831e860f9 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__IMU__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__IMU__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/imu__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/imu__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__functions.c index 4cb05b6eb..f5e74d8c5 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__functions.c @@ -314,22 +314,27 @@ sensor_msgs__msg__Imu__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Imu); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Imu * data = - (sensor_msgs__msg__Imu *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Imu *)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 (!sensor_msgs__msg__Imu__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Imu__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; ) { - sensor_msgs__msg__Imu__fini(&data[i]); + sensor_msgs__msg__Imu__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h index 6f5ae3001..2c118b1be 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Imu( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Imu( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp index 861d196ab..35cec9e07 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Imu( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.h new file mode 100644 index 000000000..956544e96 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.h @@ -0,0 +1,73 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/Imu.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'orientation' +#include "geometry_msgs/msg/detail/quaternion__struct.h" +// Member 'angular_velocity' +// Member 'linear_acceleration' +#include "geometry_msgs/msg/detail/vector3__struct.h" + +/// Struct defined in msg/Imu in the package sensor_msgs. +/** + * This is a message to hold data from an IMU (Inertial Measurement Unit) + * + * Accelerations should be in m/s^2 (not in g's), and rotational velocity should be in rad/sec + * + * If the covariance of the measurement is known, it should be filled in (if all you know is the + * variance of each measurement, e.g. from the datasheet, just put those along the diagonal) + * A covariance matrix of all zeros will be interpreted as "covariance unknown", and to use the + * data a covariance will have to be assumed or gotten from some other source + * + * If you have no estimate for one of the data elements (e.g. your IMU doesn't produce an + * orientation estimate), please set element 0 of the associated covariance matrix to -1 + * If you are interpreting this message, please check for a value of -1 in the first element of each + * covariance matrix, and disregard the associated estimate. + */ +typedef struct sensor_msgs__msg__Imu +{ + std_msgs__msg__Header header; + geometry_msgs__msg__Quaternion orientation; + /// Row major about x, y, z axes + double orientation_covariance[9]; + geometry_msgs__msg__Vector3 angular_velocity; + /// Row major about x, y, z axes + double angular_velocity_covariance[9]; + geometry_msgs__msg__Vector3 linear_acceleration; + /// Row major x, y z + double linear_acceleration_covariance[9]; +} sensor_msgs__msg__Imu; + +// Struct for a sequence of sensor_msgs__msg__Imu. +typedef struct sensor_msgs__msg__Imu__Sequence +{ + sensor_msgs__msg__Imu * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__Imu__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.hpp index f5df2000e..f57a7ae1e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__IMU__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__traits.hpp new file mode 100644 index 000000000..2d2460a9b --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__traits.hpp @@ -0,0 +1,279 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Imu.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/imu__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'orientation' +#include "geometry_msgs/msg/detail/quaternion__traits.hpp" +// Member 'angular_velocity' +// Member 'linear_acceleration' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Imu & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: orientation + { + out << "orientation: "; + to_flow_style_yaml(msg.orientation, out); + out << ", "; + } + + // member: orientation_covariance + { + if (msg.orientation_covariance.size() == 0) { + out << "orientation_covariance: []"; + } else { + out << "orientation_covariance: ["; + size_t pending_items = msg.orientation_covariance.size(); + for (auto item : msg.orientation_covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: angular_velocity + { + out << "angular_velocity: "; + to_flow_style_yaml(msg.angular_velocity, out); + out << ", "; + } + + // member: angular_velocity_covariance + { + if (msg.angular_velocity_covariance.size() == 0) { + out << "angular_velocity_covariance: []"; + } else { + out << "angular_velocity_covariance: ["; + size_t pending_items = msg.angular_velocity_covariance.size(); + for (auto item : msg.angular_velocity_covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: linear_acceleration + { + out << "linear_acceleration: "; + to_flow_style_yaml(msg.linear_acceleration, out); + out << ", "; + } + + // member: linear_acceleration_covariance + { + if (msg.linear_acceleration_covariance.size() == 0) { + out << "linear_acceleration_covariance: []"; + } else { + out << "linear_acceleration_covariance: ["; + size_t pending_items = msg.linear_acceleration_covariance.size(); + for (auto item : msg.linear_acceleration_covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Imu & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: orientation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "orientation:\n"; + to_block_style_yaml(msg.orientation, out, indentation + 2); + } + + // member: orientation_covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.orientation_covariance.size() == 0) { + out << "orientation_covariance: []\n"; + } else { + out << "orientation_covariance:\n"; + for (auto item : msg.orientation_covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: angular_velocity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angular_velocity:\n"; + to_block_style_yaml(msg.angular_velocity, out, indentation + 2); + } + + // member: angular_velocity_covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.angular_velocity_covariance.size() == 0) { + out << "angular_velocity_covariance: []\n"; + } else { + out << "angular_velocity_covariance:\n"; + for (auto item : msg.angular_velocity_covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: linear_acceleration + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "linear_acceleration:\n"; + to_block_style_yaml(msg.linear_acceleration, out, indentation + 2); + } + + // member: linear_acceleration_covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.linear_acceleration_covariance.size() == 0) { + out << "linear_acceleration_covariance: []\n"; + } else { + out << "linear_acceleration_covariance:\n"; + for (auto item : msg.linear_acceleration_covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Imu & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Imu & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Imu & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Imu"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Imu"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__IMU__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.c new file mode 100644 index 000000000..6cff3745b --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.c @@ -0,0 +1,344 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Imu.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/imu__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/imu__functions.h" +#include "sensor_msgs/msg/detail/imu__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `orientation` +#include "geometry_msgs/msg/quaternion.h" +// Member `orientation` +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" +// Member `angular_velocity` +// Member `linear_acceleration` +#include "geometry_msgs/msg/vector3.h" +// Member `angular_velocity` +// Member `linear_acceleration` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_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; + sensor_msgs__msg__Imu__init(message_memory); +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_fini_function(void * message_memory) +{ + sensor_msgs__msg__Imu__fini(message_memory); +} + +size_t sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__orientation_covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__orientation_covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__orientation_covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__orientation_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__orientation_covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__orientation_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__orientation_covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +size_t sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__angular_velocity_covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__angular_velocity_covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__angular_velocity_covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__angular_velocity_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__angular_velocity_covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__angular_velocity_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__angular_velocity_covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +size_t sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__linear_acceleration_covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__linear_acceleration_covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__linear_acceleration_covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__linear_acceleration_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__linear_acceleration_covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__linear_acceleration_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__linear_acceleration_covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[7] = { + { + "header", // 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(sensor_msgs__msg__Imu, header), // 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 + }, + { + "orientation", // 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(sensor_msgs__msg__Imu, orientation), // 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 + }, + { + "orientation_covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Imu, orientation_covariance), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__orientation_covariance, // size() function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__orientation_covariance, // get_const(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__orientation_covariance, // get(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__orientation_covariance, // fetch(index, &value) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__orientation_covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "angular_velocity", // 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(sensor_msgs__msg__Imu, angular_velocity), // 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 + }, + { + "angular_velocity_covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Imu, angular_velocity_covariance), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__angular_velocity_covariance, // size() function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__angular_velocity_covariance, // get_const(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__angular_velocity_covariance, // get(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__angular_velocity_covariance, // fetch(index, &value) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__angular_velocity_covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "linear_acceleration", // 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(sensor_msgs__msg__Imu, linear_acceleration), // 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 + }, + { + "linear_acceleration_covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Imu, linear_acceleration_covariance), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__size_function__Imu__linear_acceleration_covariance, // size() function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_const_function__Imu__linear_acceleration_covariance, // get_const(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__get_function__Imu__linear_acceleration_covariance, // get(index) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__fetch_function__Imu__linear_acceleration_covariance, // fetch(index, &value) function pointer + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__assign_function__Imu__linear_acceleration_covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_members = { + "sensor_msgs__msg", // message namespace + "Imu", // message name + 7, // number of fields + sizeof(sensor_msgs__msg__Imu), + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array, // message members + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_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 sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle = { + 0, + &sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Imu)() { + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Imu__rosidl_typesupport_introspection_c__Imu_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.cpp similarity index 75% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.cpp index 56ce9ac72..9a215c56e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Imu__orientation_covariance(void * untyped_member, size_t i return &member[index]; } +void fetch_function__Imu__orientation_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Imu__orientation_covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Imu__orientation_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Imu__orientation_covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + size_t size_function__Imu__angular_velocity_covariance(const void * untyped_member) { (void)untyped_member; @@ -77,6 +95,24 @@ void * get_function__Imu__angular_velocity_covariance(void * untyped_member, siz return &member[index]; } +void fetch_function__Imu__angular_velocity_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Imu__angular_velocity_covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Imu__angular_velocity_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Imu__angular_velocity_covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + size_t size_function__Imu__linear_acceleration_covariance(const void * untyped_member) { (void)untyped_member; @@ -97,6 +133,24 @@ void * get_function__Imu__linear_acceleration_covariance(void * untyped_member, return &member[index]; } +void fetch_function__Imu__linear_acceleration_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Imu__linear_acceleration_covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Imu__linear_acceleration_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Imu__linear_acceleration_covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_member_array[7] = { { "header", // name @@ -111,6 +165,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m 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 }, { @@ -126,6 +182,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m 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 }, { @@ -141,6 +199,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m size_function__Imu__orientation_covariance, // size() function pointer get_const_function__Imu__orientation_covariance, // get_const(index) function pointer get_function__Imu__orientation_covariance, // get(index) function pointer + fetch_function__Imu__orientation_covariance, // fetch(index, &value) function pointer + assign_function__Imu__orientation_covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -156,6 +216,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m 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 }, { @@ -171,6 +233,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m size_function__Imu__angular_velocity_covariance, // size() function pointer get_const_function__Imu__angular_velocity_covariance, // get_const(index) function pointer get_function__Imu__angular_velocity_covariance, // get(index) function pointer + fetch_function__Imu__angular_velocity_covariance, // fetch(index, &value) function pointer + assign_function__Imu__angular_velocity_covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -186,6 +250,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m 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 }, { @@ -201,6 +267,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Imu_message_m size_function__Imu__linear_acceleration_covariance, // size() function pointer get_const_function__Imu__linear_acceleration_covariance, // get_const(index) function pointer get_function__Imu__linear_acceleration_covariance, // get(index) function pointer + fetch_function__Imu__linear_acceleration_covariance, // fetch(index, &value) function pointer + assign_function__Imu__linear_acceleration_covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/imu__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.hpp new file mode 100644 index 000000000..b3667dadf --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/imu__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Imu.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__IMU__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__IMU__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Imu +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__IMU__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__builder.hpp index 82536c15e..034625d24 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/joint_state__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/joint_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__functions.c index 0aec54051..936422bfa 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__functions.c @@ -298,22 +298,27 @@ sensor_msgs__msg__JointState__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__JointState); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__JointState * data = - (sensor_msgs__msg__JointState *)realloc(output->data, allocation_size); + (sensor_msgs__msg__JointState *)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 (!sensor_msgs__msg__JointState__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__JointState__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; ) { - sensor_msgs__msg__JointState__fini(&data[i]); + sensor_msgs__msg__JointState__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h index 50ea14bcd..3a916770f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__JointState( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__JointState( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp index d511ff72e..94d2e0d44 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_JointState( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.h new file mode 100644 index 000000000..a146043e9 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.h @@ -0,0 +1,74 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/JointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'name' +#include "rosidl_runtime_c/string.h" +// Member 'position' +// Member 'velocity' +// Member 'effort' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/JointState in the package sensor_msgs. +/** + * This is a message that holds data to describe the state of a set of torque controlled joints. + * + * The state of each joint (revolute or prismatic) is defined by: + * * the position of the joint (rad or m), + * * the velocity of the joint (rad/s or m/s) and + * * the effort that is applied in the joint (Nm or N). + * + * Each joint is uniquely identified by its name + * The header specifies the time at which the joint states were recorded. All the joint states + * in one message have to be recorded at the same time. + * + * This message consists of a multiple arrays, one for each part of the joint state. + * The goal is to make each of the fields optional. When e.g. your joints have no + * effort associated with them, you can leave the effort array empty. + * + * All arrays in this message should have the same size, or be empty. + * This is the only way to uniquely associate the joint name with the correct + * states. + */ +typedef struct sensor_msgs__msg__JointState +{ + std_msgs__msg__Header header; + rosidl_runtime_c__String__Sequence name; + rosidl_runtime_c__double__Sequence position; + rosidl_runtime_c__double__Sequence velocity; + rosidl_runtime_c__double__Sequence effort; +} sensor_msgs__msg__JointState; + +// Struct for a sequence of sensor_msgs__msg__JointState. +typedef struct sensor_msgs__msg__JointState__Sequence +{ + sensor_msgs__msg__JointState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__JointState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.hpp similarity index 76% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.hpp index 009889e08..b6605a054 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -53,16 +54,16 @@ struct JointState_ std_msgs::msg::Header_; _header_type header; using _name_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _name_type name; using _position_type = - std::vector::other>; + std::vector::template rebind_alloc>; _position_type position; using _velocity_type = - std::vector::other>; + std::vector::template rebind_alloc>; _velocity_type velocity; using _effort_type = - std::vector::other>; + std::vector::template rebind_alloc>; _effort_type effort; // setters for named parameter idiom @@ -73,25 +74,25 @@ struct JointState_ return *this; } Type & set__name( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->name = _arg; return *this; } Type & set__position( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->position = _arg; return *this; } Type & set__velocity( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->velocity = _arg; return *this; } Type & set__effort( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->effort = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__traits.hpp new file mode 100644 index 000000000..8f3d98bd4 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__traits.hpp @@ -0,0 +1,264 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/JointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/joint_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const JointState & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: name + { + if (msg.name.size() == 0) { + out << "name: []"; + } else { + out << "name: ["; + size_t pending_items = msg.name.size(); + for (auto item : msg.name) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: position + { + if (msg.position.size() == 0) { + out << "position: []"; + } else { + out << "position: ["; + size_t pending_items = msg.position.size(); + for (auto item : msg.position) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: velocity + { + if (msg.velocity.size() == 0) { + out << "velocity: []"; + } else { + out << "velocity: ["; + size_t pending_items = msg.velocity.size(); + for (auto item : msg.velocity) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: effort + { + if (msg.effort.size() == 0) { + out << "effort: []"; + } else { + out << "effort: ["; + size_t pending_items = msg.effort.size(); + for (auto item : msg.effort) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const JointState & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.name.size() == 0) { + out << "name: []\n"; + } else { + out << "name:\n"; + for (auto item : msg.name) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: position + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.position.size() == 0) { + out << "position: []\n"; + } else { + out << "position:\n"; + for (auto item : msg.position) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: velocity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.velocity.size() == 0) { + out << "velocity: []\n"; + } else { + out << "velocity:\n"; + for (auto item : msg.velocity) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: effort + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.effort.size() == 0) { + out << "effort: []\n"; + } else { + out << "effort:\n"; + for (auto item : msg.effort) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const JointState & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::JointState & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::JointState & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::JointState"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/JointState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.c new file mode 100644 index 000000000..5023d50c5 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.c @@ -0,0 +1,385 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/JointState.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/joint_state__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/joint_state__functions.h" +#include "sensor_msgs/msg/detail/joint_state__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `name` +#include "rosidl_runtime_c/string_functions.h" +// Member `position` +// Member `velocity` +// Member `effort` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_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; + sensor_msgs__msg__JointState__init(message_memory); +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_fini_function(void * message_memory) +{ + sensor_msgs__msg__JointState__fini(message_memory); +} + +size_t sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__name( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__name( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__name( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__name( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__name(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__name( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__name(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__name( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__position( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__position( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__position( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__position( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__position(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__position( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__position(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__position( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__velocity( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__velocity( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__velocity( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__velocity( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__velocity(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__velocity( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__velocity(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__velocity( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__effort( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__effort( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__effort( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__effort( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__effort(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__effort( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__effort(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__effort( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_member_array[5] = { + { + "header", // 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(sensor_msgs__msg__JointState, header), // 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 + }, + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JointState, name), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__name, // size() function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__name, // get_const(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__name, // get(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__name, // fetch(index, &value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__name, // assign(index, value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__name // resize(index) function pointer + }, + { + "position", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JointState, position), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__position, // size() function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__position, // get_const(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__position, // get(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__position, // fetch(index, &value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__position, // assign(index, value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__position // resize(index) function pointer + }, + { + "velocity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JointState, velocity), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__velocity, // size() function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__velocity, // get_const(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__velocity, // get(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__velocity, // fetch(index, &value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__velocity, // assign(index, value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__velocity // resize(index) function pointer + }, + { + "effort", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JointState, effort), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__size_function__JointState__effort, // size() function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_const_function__JointState__effort, // get_const(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__get_function__JointState__effort, // get(index) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__fetch_function__JointState__effort, // fetch(index, &value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__assign_function__JointState__effort, // assign(index, value) function pointer + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__resize_function__JointState__effort // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_members = { + "sensor_msgs__msg", // message namespace + "JointState", // message name + 5, // number of fields + sizeof(sensor_msgs__msg__JointState), + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_member_array, // message members + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_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 sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle = { + 0, + &sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JointState)() { + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__JointState__rosidl_typesupport_introspection_c__JointState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.cpp new file mode 100644 index 000000000..4a8a0f931 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.cpp @@ -0,0 +1,357 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from sensor_msgs:msg/JointState.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 "sensor_msgs/msg/detail/joint_state__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 sensor_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void JointState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) sensor_msgs::msg::JointState(_init); +} + +void JointState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~JointState(); +} + +size_t size_function__JointState__name(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointState__name(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointState__name(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointState__name( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointState__name(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointState__name( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointState__name(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointState__name(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointState__position(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointState__position(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointState__position(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointState__position( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointState__position(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointState__position( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointState__position(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointState__position(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointState__velocity(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointState__velocity(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointState__velocity(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointState__velocity( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointState__velocity(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointState__velocity( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointState__velocity(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointState__velocity(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointState__effort(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointState__effort(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointState__effort(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointState__effort( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointState__effort(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointState__effort( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointState__effort(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointState__effort(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember JointState_message_member_array[5] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::JointState, header), // 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 + }, + { + "name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::JointState, name), // bytes offset in struct + nullptr, // default value + size_function__JointState__name, // size() function pointer + get_const_function__JointState__name, // get_const(index) function pointer + get_function__JointState__name, // get(index) function pointer + fetch_function__JointState__name, // fetch(index, &value) function pointer + assign_function__JointState__name, // assign(index, value) function pointer + resize_function__JointState__name // resize(index) function pointer + }, + { + "position", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::JointState, position), // bytes offset in struct + nullptr, // default value + size_function__JointState__position, // size() function pointer + get_const_function__JointState__position, // get_const(index) function pointer + get_function__JointState__position, // get(index) function pointer + fetch_function__JointState__position, // fetch(index, &value) function pointer + assign_function__JointState__position, // assign(index, value) function pointer + resize_function__JointState__position // resize(index) function pointer + }, + { + "velocity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::JointState, velocity), // bytes offset in struct + nullptr, // default value + size_function__JointState__velocity, // size() function pointer + get_const_function__JointState__velocity, // get_const(index) function pointer + get_function__JointState__velocity, // get(index) function pointer + fetch_function__JointState__velocity, // fetch(index, &value) function pointer + assign_function__JointState__velocity, // assign(index, value) function pointer + resize_function__JointState__velocity // resize(index) function pointer + }, + { + "effort", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::JointState, effort), // bytes offset in struct + nullptr, // default value + size_function__JointState__effort, // size() function pointer + get_const_function__JointState__effort, // get_const(index) function pointer + get_function__JointState__effort, // get(index) function pointer + fetch_function__JointState__effort, // fetch(index, &value) function pointer + assign_function__JointState__effort, // assign(index, value) function pointer + resize_function__JointState__effort // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers JointState_message_members = { + "sensor_msgs::msg", // message namespace + "JointState", // message name + 5, // number of fields + sizeof(sensor_msgs::msg::JointState), + JointState_message_member_array, // message members + JointState_init_function, // function to initialize message memory (memory has to be allocated) + JointState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t JointState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &JointState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace sensor_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::JointState_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, sensor_msgs, msg, JointState)() { + return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::JointState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joint_state__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.hpp new file mode 100644 index 000000000..5b51bc22e --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joint_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/JointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + JointState +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__JOINT_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__builder.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__builder.hpp index fa77de1c1..fb35fd97f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/joy__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/joy__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__functions.c index e86e35bcf..7a0c3c4bb 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__functions.c @@ -257,22 +257,27 @@ sensor_msgs__msg__Joy__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Joy); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Joy * data = - (sensor_msgs__msg__Joy *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Joy *)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 (!sensor_msgs__msg__Joy__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Joy__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; ) { - sensor_msgs__msg__Joy__fini(&data[i]); + sensor_msgs__msg__Joy__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h index 4c7344abb..96ea1771f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Joy( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Joy( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp index 12c1d0b1f..71aa2db66 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Joy( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.h similarity index 79% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.h index 82909899b..106c399e2 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.h @@ -24,11 +24,17 @@ extern "C" // Member 'buttons' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in msg/Joy in the package sensor_msgs. +/// Struct defined in msg/Joy in the package sensor_msgs. +/** + * Reports the state of a joystick's axes and buttons. + */ typedef struct sensor_msgs__msg__Joy { + /// The timestamp is the time at which data is received from the joystick. std_msgs__msg__Header header; + /// The axes measurements from a joystick. rosidl_runtime_c__float__Sequence axes; + /// The buttons measurements from a joystick. rosidl_runtime_c__int32__Sequence buttons; } sensor_msgs__msg__Joy; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.hpp similarity index 87% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.hpp index 4b4b392f9..4c9a731a0 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -53,10 +54,10 @@ struct Joy_ std_msgs::msg::Header_; _header_type header; using _axes_type = - std::vector::other>; + std::vector::template rebind_alloc>; _axes_type axes; using _buttons_type = - std::vector::other>; + std::vector::template rebind_alloc>; _buttons_type buttons; // setters for named parameter idiom @@ -67,13 +68,13 @@ struct Joy_ return *this; } Type & set__axes( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->axes = _arg; return *this; } Type & set__buttons( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->buttons = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__traits.hpp new file mode 100644 index 000000000..1d36b2bad --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__traits.hpp @@ -0,0 +1,188 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Joy.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/joy__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Joy & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: axes + { + if (msg.axes.size() == 0) { + out << "axes: []"; + } else { + out << "axes: ["; + size_t pending_items = msg.axes.size(); + for (auto item : msg.axes) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: buttons + { + if (msg.buttons.size() == 0) { + out << "buttons: []"; + } else { + out << "buttons: ["; + size_t pending_items = msg.buttons.size(); + for (auto item : msg.buttons) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Joy & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: axes + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.axes.size() == 0) { + out << "axes: []\n"; + } else { + out << "axes:\n"; + for (auto item : msg.axes) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: buttons + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.buttons.size() == 0) { + out << "buttons: []\n"; + } else { + out << "buttons:\n"; + for (auto item : msg.buttons) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Joy & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Joy & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Joy & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Joy"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Joy"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.c new file mode 100644 index 000000000..13f2d4e36 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.c @@ -0,0 +1,238 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Joy.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/joy__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy__functions.h" +#include "sensor_msgs/msg/detail/joy__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `axes` +// Member `buttons` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_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; + sensor_msgs__msg__Joy__init(message_memory); +} + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_fini_function(void * message_memory) +{ + sensor_msgs__msg__Joy__fini(message_memory); +} + +size_t sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__size_function__Joy__axes( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__axes( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__axes( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__fetch_function__Joy__axes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__axes(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__assign_function__Joy__axes( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__axes(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__resize_function__Joy__axes( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__size_function__Joy__buttons( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__buttons( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__buttons( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__fetch_function__Joy__buttons( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__buttons(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__assign_function__Joy__buttons( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__buttons(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__resize_function__Joy__buttons( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__Joy, header), // 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 + }, + { + "axes", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Joy, axes), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__size_function__Joy__axes, // size() function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__axes, // get_const(index) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__axes, // get(index) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__fetch_function__Joy__axes, // fetch(index, &value) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__assign_function__Joy__axes, // assign(index, value) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__resize_function__Joy__axes // resize(index) function pointer + }, + { + "buttons", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Joy, buttons), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__size_function__Joy__buttons, // size() function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_const_function__Joy__buttons, // get_const(index) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__get_function__Joy__buttons, // get(index) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__fetch_function__Joy__buttons, // fetch(index, &value) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__assign_function__Joy__buttons, // assign(index, value) function pointer + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__resize_function__Joy__buttons // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_members = { + "sensor_msgs__msg", // message namespace + "Joy", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__Joy), + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_member_array, // message members + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_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 sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle = { + 0, + &sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Joy)() { + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Joy__rosidl_typesupport_introspection_c__Joy_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.cpp similarity index 79% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.cpp index 62f5d9d3c..c196b88d5 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Joy__axes(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Joy__axes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Joy__axes(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Joy__axes( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Joy__axes(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Joy__axes(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__Joy__buttons(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Joy__buttons( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Joy__buttons(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Joy__buttons( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Joy__buttons(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Joy__buttons(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Joy_message_m 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Joy_message_m size_function__Joy__axes, // size() function pointer get_const_function__Joy__axes, // get_const(index) function pointer get_function__Joy__axes, // get(index) function pointer + fetch_function__Joy__axes, // fetch(index, &value) function pointer + assign_function__Joy__axes, // assign(index, value) function pointer resize_function__Joy__axes // resize(index) function pointer }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Joy_message_m size_function__Joy__buttons, // size() function pointer get_const_function__Joy__buttons, // get_const(index) function pointer get_function__Joy__buttons, // get(index) function pointer + fetch_function__Joy__buttons, // fetch(index, &value) function pointer + assign_function__Joy__buttons, // assign(index, value) function pointer resize_function__Joy__buttons // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.hpp new file mode 100644 index 000000000..e8d2a4bbb --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Joy.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Joy +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__builder.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__builder.hpp index f6cd5fdf4..0eb7820af 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/joy_feedback__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/joy_feedback__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__functions.c similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__functions.c index 34ec2dc86..eac9ceaad 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__functions.c @@ -217,22 +217,27 @@ sensor_msgs__msg__JoyFeedback__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__JoyFeedback); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__JoyFeedback * data = - (sensor_msgs__msg__JoyFeedback *)realloc(output->data, allocation_size); + (sensor_msgs__msg__JoyFeedback *)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 (!sensor_msgs__msg__JoyFeedback__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__JoyFeedback__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; ) { - sensor_msgs__msg__JoyFeedback__fini(&data[i]); + sensor_msgs__msg__JoyFeedback__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h index c564dce62..8dca1e97d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__JoyFeedback( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__JoyFeedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp index c1c33b7cc..4f1c6a979 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_JoyFeedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.h similarity index 75% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.h index 917bf6f5c..2afe7e38f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.h @@ -35,11 +35,18 @@ enum sensor_msgs__msg__JoyFeedback__TYPE_BUZZER = 2 }; -// Struct defined in msg/JoyFeedback in the package sensor_msgs. +/// Struct defined in msg/JoyFeedback in the package sensor_msgs. +/** + * Declare of the type of feedback + */ typedef struct sensor_msgs__msg__JoyFeedback { uint8_t type; + /// This will hold an id number for each type of each feedback. + /// Example, the first led would be id=0, the second would be id=1 uint8_t id; + /// Intensity of the feedback, from 0.0 to 1.0, inclusive. If device is + /// actually binary, driver should treat 0<=x<0.5 as off, 0.5<=x<=1 as on. float intensity; } sensor_msgs__msg__JoyFeedback; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.hpp similarity index 88% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.hpp index 208ccf4ae..b4e2963a7 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__JoyFeedback __attribute__((deprecated)) @@ -156,12 +157,21 @@ using JoyFeedback = sensor_msgs::msg::JoyFeedback_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t JoyFeedback_::TYPE_LED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t JoyFeedback_::TYPE_RUMBLE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t JoyFeedback_::TYPE_BUZZER; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__traits.hpp new file mode 100644 index 000000000..a8d8f4c5c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/JoyFeedback.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/joy_feedback__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const JoyFeedback & msg, + std::ostream & out) +{ + out << "{"; + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: intensity + { + out << "intensity: "; + rosidl_generator_traits::value_to_yaml(msg.intensity, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const JoyFeedback & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: intensity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "intensity: "; + rosidl_generator_traits::value_to_yaml(msg.intensity, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const JoyFeedback & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::JoyFeedback & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::JoyFeedback & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::JoyFeedback"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/JoyFeedback"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.c new file mode 100644 index 000000000..d3c05605e --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.c @@ -0,0 +1,117 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/JoyFeedback.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy_feedback__functions.h" +#include "sensor_msgs/msg/detail/joy_feedback__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_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; + sensor_msgs__msg__JoyFeedback__init(message_memory); +} + +void sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_fini_function(void * message_memory) +{ + sensor_msgs__msg__JoyFeedback__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_member_array[3] = { + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JoyFeedback, type), // 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 + }, + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JoyFeedback, id), // 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 + }, + { + "intensity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JoyFeedback, intensity), // 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 sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_members = { + "sensor_msgs__msg", // message namespace + "JoyFeedback", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__JoyFeedback), + sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_member_array, // message members + sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_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 sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle = { + 0, + &sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedback)() { + if (!sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__JoyFeedback__rosidl_typesupport_introspection_c__JoyFeedback_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.cpp index 367ce737e..d3efa5ae6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JoyFeedback_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JoyFeedback_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JoyFeedback_m 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.hpp new file mode 100644 index 000000000..224033fae --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/JoyFeedback.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + JoyFeedback +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp similarity index 95% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp index c7946c43d..4e0ff0e64 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/joy_feedback_array__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/joy_feedback_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__functions.c index fad35089a..9a5ecece5 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__functions.c @@ -216,22 +216,27 @@ sensor_msgs__msg__JoyFeedbackArray__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__JoyFeedbackArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__JoyFeedbackArray * data = - (sensor_msgs__msg__JoyFeedbackArray *)realloc(output->data, allocation_size); + (sensor_msgs__msg__JoyFeedbackArray *)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 (!sensor_msgs__msg__JoyFeedbackArray__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__JoyFeedbackArray__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; ) { - sensor_msgs__msg__JoyFeedbackArray__fini(&data[i]); + sensor_msgs__msg__JoyFeedbackArray__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h index 20d1707d5..52131c3ed 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__JoyFeedbackArray( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__JoyFeedbackArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp index 68021c073..9ec168498 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_JoyFeedbackArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.h similarity index 88% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.h index 9085967de..6a24e40a2 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.h @@ -21,7 +21,10 @@ extern "C" // Member 'array' #include "sensor_msgs/msg/detail/joy_feedback__struct.h" -// Struct defined in msg/JoyFeedbackArray in the package sensor_msgs. +/// Struct defined in msg/JoyFeedbackArray in the package sensor_msgs. +/** + * This message publishes values for multiple feedback at once. + */ typedef struct sensor_msgs__msg__JoyFeedbackArray { sensor_msgs__msg__JoyFeedback__Sequence array; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp index f8e5a5bb2..cb2230e24 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'array' @@ -49,12 +50,12 @@ struct JoyFeedbackArray_ // field types and members using _array_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _array_type array; // setters for named parameter idiom Type & set__array( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->array = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp new file mode 100644 index 000000000..d5c4b4b02 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__traits.hpp @@ -0,0 +1,133 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/JoyFeedbackArray.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/joy_feedback_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'array' +#include "sensor_msgs/msg/detail/joy_feedback__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const JoyFeedbackArray & msg, + std::ostream & out) +{ + out << "{"; + // member: array + { + if (msg.array.size() == 0) { + out << "array: []"; + } else { + out << "array: ["; + size_t pending_items = msg.array.size(); + for (auto item : msg.array) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const JoyFeedbackArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: array + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.array.size() == 0) { + out << "array: []\n"; + } else { + out << "array:\n"; + for (auto item : msg.array) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const JoyFeedbackArray & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::JoyFeedbackArray & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::JoyFeedbackArray & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::JoyFeedbackArray"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/JoyFeedbackArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.c new file mode 100644 index 000000000..5fc0b30b6 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.c @@ -0,0 +1,146 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/JoyFeedbackArray.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/joy_feedback_array__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/joy_feedback_array__functions.h" +#include "sensor_msgs/msg/detail/joy_feedback_array__struct.h" + + +// Include directives for member types +// Member `array` +#include "sensor_msgs/msg/joy_feedback.h" +// Member `array` +#include "sensor_msgs/msg/detail/joy_feedback__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_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; + sensor_msgs__msg__JoyFeedbackArray__init(message_memory); +} + +void sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_fini_function(void * message_memory) +{ + sensor_msgs__msg__JoyFeedbackArray__fini(message_memory); +} + +size_t sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__size_function__JoyFeedbackArray__array( + const void * untyped_member) +{ + const sensor_msgs__msg__JoyFeedback__Sequence * member = + (const sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_const_function__JoyFeedbackArray__array( + const void * untyped_member, size_t index) +{ + const sensor_msgs__msg__JoyFeedback__Sequence * member = + (const sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_function__JoyFeedbackArray__array( + void * untyped_member, size_t index) +{ + sensor_msgs__msg__JoyFeedback__Sequence * member = + (sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__fetch_function__JoyFeedbackArray__array( + const void * untyped_member, size_t index, void * untyped_value) +{ + const sensor_msgs__msg__JoyFeedback * item = + ((const sensor_msgs__msg__JoyFeedback *) + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_const_function__JoyFeedbackArray__array(untyped_member, index)); + sensor_msgs__msg__JoyFeedback * value = + (sensor_msgs__msg__JoyFeedback *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__assign_function__JoyFeedbackArray__array( + void * untyped_member, size_t index, const void * untyped_value) +{ + sensor_msgs__msg__JoyFeedback * item = + ((sensor_msgs__msg__JoyFeedback *) + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_function__JoyFeedbackArray__array(untyped_member, index)); + const sensor_msgs__msg__JoyFeedback * value = + (const sensor_msgs__msg__JoyFeedback *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__resize_function__JoyFeedbackArray__array( + void * untyped_member, size_t size) +{ + sensor_msgs__msg__JoyFeedback__Sequence * member = + (sensor_msgs__msg__JoyFeedback__Sequence *)(untyped_member); + sensor_msgs__msg__JoyFeedback__Sequence__fini(member); + return sensor_msgs__msg__JoyFeedback__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array[1] = { + { + "array", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__JoyFeedbackArray, array), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__size_function__JoyFeedbackArray__array, // size() function pointer + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_const_function__JoyFeedbackArray__array, // get_const(index) function pointer + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__get_function__JoyFeedbackArray__array, // get(index) function pointer + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__fetch_function__JoyFeedbackArray__array, // fetch(index, &value) function pointer + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__assign_function__JoyFeedbackArray__array, // assign(index, value) function pointer + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__resize_function__JoyFeedbackArray__array // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_members = { + "sensor_msgs__msg", // message namespace + "JoyFeedbackArray", // message name + 1, // number of fields + sizeof(sensor_msgs__msg__JoyFeedbackArray), + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array, // message members + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_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 sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle = { + 0, + &sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedbackArray)() { + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, JoyFeedback)(); + if (!sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__JoyFeedbackArray__rosidl_typesupport_introspection_c__JoyFeedbackArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp index 5b90da94d..0b85d1eef 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__JoyFeedbackArray__array(void * untyped_member, size_t index return &member[index]; } +void fetch_function__JoyFeedbackArray__array( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JoyFeedbackArray__array(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JoyFeedbackArray__array( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JoyFeedbackArray__array(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__JoyFeedbackArray__array(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JoyFeedbackAr size_function__JoyFeedbackArray__array, // size() function pointer get_const_function__JoyFeedbackArray__array, // get_const(index) function pointer get_function__JoyFeedbackArray__array, // get(index) function pointer + fetch_function__JoyFeedbackArray__array, // fetch(index, &value) function pointer + assign_function__JoyFeedbackArray__array, // assign(index, value) function pointer resize_function__JoyFeedbackArray__array // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/joy_feedback_array__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.hpp new file mode 100644 index 000000000..c9d546b48 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/joy_feedback_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/JoyFeedbackArray.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + JoyFeedbackArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__JOY_FEEDBACK_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__builder.hpp similarity index 95% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__builder.hpp index a638a9842..4a465ab2f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/laser_echo__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/laser_echo__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__functions.c similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__functions.c index 551f46b74..c2405c42d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__functions.c @@ -216,22 +216,27 @@ sensor_msgs__msg__LaserEcho__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__LaserEcho); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__LaserEcho * data = - (sensor_msgs__msg__LaserEcho *)realloc(output->data, allocation_size); + (sensor_msgs__msg__LaserEcho *)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 (!sensor_msgs__msg__LaserEcho__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__LaserEcho__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; ) { - sensor_msgs__msg__LaserEcho__fini(&data[i]); + sensor_msgs__msg__LaserEcho__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h index fed98e060..4ab41f584 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__LaserEcho( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__LaserEcho( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp index ef5dd8275..f71461b30 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_LaserEcho( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.h similarity index 78% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.h index 83aae6cea..cbfeeaa53 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.h @@ -21,9 +21,15 @@ extern "C" // Member 'echoes' #include "rosidl_runtime_c/primitives_sequence.h" -// Struct defined in msg/LaserEcho in the package sensor_msgs. +/// Struct defined in msg/LaserEcho in the package sensor_msgs. +/** + * This message is a submessage of MultiEchoLaserScan and is not intended + * to be used separately. + */ typedef struct sensor_msgs__msg__LaserEcho { + /// Multiple values of ranges or intensities. + /// Each array represents data from the same angle increment. rosidl_runtime_c__float__Sequence echoes; } sensor_msgs__msg__LaserEcho; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.hpp similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.hpp index bcbab1a55..91780cb4d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__LaserEcho __attribute__((deprecated)) @@ -45,12 +46,12 @@ struct LaserEcho_ // field types and members using _echoes_type = - std::vector::other>; + std::vector::template rebind_alloc>; _echoes_type echoes; // setters for named parameter idiom Type & set__echoes( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->echoes = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__traits.hpp new file mode 100644 index 000000000..c35c4620e --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/LaserEcho.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/laser_echo__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const LaserEcho & msg, + std::ostream & out) +{ + out << "{"; + // member: echoes + { + if (msg.echoes.size() == 0) { + out << "echoes: []"; + } else { + out << "echoes: ["; + size_t pending_items = msg.echoes.size(); + for (auto item : msg.echoes) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LaserEcho & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: echoes + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.echoes.size() == 0) { + out << "echoes: []\n"; + } else { + out << "echoes:\n"; + for (auto item : msg.echoes) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LaserEcho & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::LaserEcho & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::LaserEcho & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::LaserEcho"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/LaserEcho"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.c new file mode 100644 index 000000000..d2346138c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.c @@ -0,0 +1,142 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/LaserEcho.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/laser_echo__functions.h" +#include "sensor_msgs/msg/detail/laser_echo__struct.h" + + +// Include directives for member types +// Member `echoes` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_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; + sensor_msgs__msg__LaserEcho__init(message_memory); +} + +void sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_fini_function(void * message_memory) +{ + sensor_msgs__msg__LaserEcho__fini(message_memory); +} + +size_t sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__size_function__LaserEcho__echoes( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__echoes( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_function__LaserEcho__echoes( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__fetch_function__LaserEcho__echoes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__echoes(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__assign_function__LaserEcho__echoes( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_function__LaserEcho__echoes(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__resize_function__LaserEcho__echoes( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_member_array[1] = { + { + "echoes", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserEcho, echoes), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__size_function__LaserEcho__echoes, // size() function pointer + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_const_function__LaserEcho__echoes, // get_const(index) function pointer + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__get_function__LaserEcho__echoes, // get(index) function pointer + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__fetch_function__LaserEcho__echoes, // fetch(index, &value) function pointer + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__assign_function__LaserEcho__echoes, // assign(index, value) function pointer + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__resize_function__LaserEcho__echoes // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_members = { + "sensor_msgs__msg", // message namespace + "LaserEcho", // message name + 1, // number of fields + sizeof(sensor_msgs__msg__LaserEcho), + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_member_array, // message members + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_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 sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle = { + 0, + &sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)() { + if (!sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__LaserEcho__rosidl_typesupport_introspection_c__LaserEcho_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.cpp index 23b623f24..b6aa79705 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__LaserEcho__echoes(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__LaserEcho__echoes( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__LaserEcho__echoes(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__LaserEcho__echoes( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__LaserEcho__echoes(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__LaserEcho__echoes(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserEcho_mes size_function__LaserEcho__echoes, // size() function pointer get_const_function__LaserEcho__echoes, // get_const(index) function pointer get_function__LaserEcho__echoes, // get(index) function pointer + fetch_function__LaserEcho__echoes, // fetch(index, &value) function pointer + assign_function__LaserEcho__echoes, // assign(index, value) function pointer resize_function__LaserEcho__echoes // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_echo__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.hpp new file mode 100644 index 000000000..c92377786 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_echo__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/LaserEcho.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + LaserEcho +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__LASER_ECHO__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__builder.hpp index 10ecb9fac..2d1cddc33 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/laser_scan__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/laser_scan__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__functions.c index 2cc63ac25..a4fd0b900 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__functions.c @@ -313,22 +313,27 @@ sensor_msgs__msg__LaserScan__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__LaserScan); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__LaserScan * data = - (sensor_msgs__msg__LaserScan *)realloc(output->data, allocation_size); + (sensor_msgs__msg__LaserScan *)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 (!sensor_msgs__msg__LaserScan__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__LaserScan__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; ) { - sensor_msgs__msg__LaserScan__fini(&data[i]); + sensor_msgs__msg__LaserScan__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h index 5067c0328..6d0272604 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__LaserScan( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__LaserScan( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp index f5d1388d7..93dd50b36 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_LaserScan( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.h new file mode 100644 index 000000000..c4c4052fe --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.h @@ -0,0 +1,83 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/LaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'ranges' +// Member 'intensities' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/LaserScan in the package sensor_msgs. +/** + * Single scan from a planar laser range-finder + * + * If you have another ranging device with different behavior (e.g. a sonar + * array), please find or create a different message, since applications + * will make fairly laser-specific assumptions about this data + */ +typedef struct sensor_msgs__msg__LaserScan +{ + /// timestamp in the header is the acquisition time of + /// the first ray in the scan. + /// + /// in frame frame_id, angles are measured around + /// the positive Z axis (counterclockwise, if Z is up) + /// with zero angle being forward along the x axis + std_msgs__msg__Header header; + /// start angle of the scan + float angle_min; + /// end angle of the scan + float angle_max; + /// angular distance between measurements + float angle_increment; + /// time between measurements - if your scanner + /// is moving, this will be used in interpolating position + /// of 3d points + float time_increment; + /// time between scans + float scan_time; + /// minimum range value + float range_min; + /// maximum range value + float range_max; + /// range data + /// (Note: values < range_min or > range_max should be discarded) + rosidl_runtime_c__float__Sequence ranges; + /// intensity data. If your + /// device does not provide intensities, please leave + /// the array empty. + rosidl_runtime_c__float__Sequence intensities; +} sensor_msgs__msg__LaserScan; + +// Struct for a sequence of sensor_msgs__msg__LaserScan. +typedef struct sensor_msgs__msg__LaserScan__Sequence +{ + sensor_msgs__msg__LaserScan * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__LaserScan__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.hpp similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.hpp index ba9dbbf51..2d363e319 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -94,10 +95,10 @@ struct LaserScan_ float; _range_max_type range_max; using _ranges_type = - std::vector::other>; + std::vector::template rebind_alloc>; _ranges_type ranges; using _intensities_type = - std::vector::other>; + std::vector::template rebind_alloc>; _intensities_type intensities; // setters for named parameter idiom @@ -150,13 +151,13 @@ struct LaserScan_ return *this; } Type & set__ranges( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->ranges = _arg; return *this; } Type & set__intensities( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->intensities = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__traits.hpp new file mode 100644 index 000000000..e7c0ee5d4 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__traits.hpp @@ -0,0 +1,307 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/LaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/laser_scan__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const LaserScan & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: angle_min + { + out << "angle_min: "; + rosidl_generator_traits::value_to_yaml(msg.angle_min, out); + out << ", "; + } + + // member: angle_max + { + out << "angle_max: "; + rosidl_generator_traits::value_to_yaml(msg.angle_max, out); + out << ", "; + } + + // member: angle_increment + { + out << "angle_increment: "; + rosidl_generator_traits::value_to_yaml(msg.angle_increment, out); + out << ", "; + } + + // member: time_increment + { + out << "time_increment: "; + rosidl_generator_traits::value_to_yaml(msg.time_increment, out); + out << ", "; + } + + // member: scan_time + { + out << "scan_time: "; + rosidl_generator_traits::value_to_yaml(msg.scan_time, out); + out << ", "; + } + + // member: range_min + { + out << "range_min: "; + rosidl_generator_traits::value_to_yaml(msg.range_min, out); + out << ", "; + } + + // member: range_max + { + out << "range_max: "; + rosidl_generator_traits::value_to_yaml(msg.range_max, out); + out << ", "; + } + + // member: ranges + { + if (msg.ranges.size() == 0) { + out << "ranges: []"; + } else { + out << "ranges: ["; + size_t pending_items = msg.ranges.size(); + for (auto item : msg.ranges) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: intensities + { + if (msg.intensities.size() == 0) { + out << "intensities: []"; + } else { + out << "intensities: ["; + size_t pending_items = msg.intensities.size(); + for (auto item : msg.intensities) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LaserScan & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: angle_min + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_min: "; + rosidl_generator_traits::value_to_yaml(msg.angle_min, out); + out << "\n"; + } + + // member: angle_max + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_max: "; + rosidl_generator_traits::value_to_yaml(msg.angle_max, out); + out << "\n"; + } + + // member: angle_increment + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_increment: "; + rosidl_generator_traits::value_to_yaml(msg.angle_increment, out); + out << "\n"; + } + + // member: time_increment + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time_increment: "; + rosidl_generator_traits::value_to_yaml(msg.time_increment, out); + out << "\n"; + } + + // member: scan_time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "scan_time: "; + rosidl_generator_traits::value_to_yaml(msg.scan_time, out); + out << "\n"; + } + + // member: range_min + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "range_min: "; + rosidl_generator_traits::value_to_yaml(msg.range_min, out); + out << "\n"; + } + + // member: range_max + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "range_max: "; + rosidl_generator_traits::value_to_yaml(msg.range_max, out); + out << "\n"; + } + + // member: ranges + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.ranges.size() == 0) { + out << "ranges: []\n"; + } else { + out << "ranges:\n"; + for (auto item : msg.ranges) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: intensities + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.intensities.size() == 0) { + out << "intensities: []\n"; + } else { + out << "intensities:\n"; + for (auto item : msg.intensities) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LaserScan & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::LaserScan & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::LaserScan & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::LaserScan"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/LaserScan"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.c new file mode 100644 index 000000000..406f3d0c1 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.c @@ -0,0 +1,357 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/LaserScan.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/laser_scan__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/laser_scan__functions.h" +#include "sensor_msgs/msg/detail/laser_scan__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `ranges` +// Member `intensities` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_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; + sensor_msgs__msg__LaserScan__init(message_memory); +} + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_fini_function(void * message_memory) +{ + sensor_msgs__msg__LaserScan__fini(message_memory); +} + +size_t sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__size_function__LaserScan__ranges( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__ranges( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__ranges( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__fetch_function__LaserScan__ranges( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__ranges(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__assign_function__LaserScan__ranges( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__ranges(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__resize_function__LaserScan__ranges( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__size_function__LaserScan__intensities( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__intensities( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__intensities( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__fetch_function__LaserScan__intensities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__intensities(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__assign_function__LaserScan__intensities( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__intensities(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__resize_function__LaserScan__intensities( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array[10] = { + { + "header", // 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(sensor_msgs__msg__LaserScan, header), // 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 + }, + { + "angle_min", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, angle_min), // 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 + }, + { + "angle_max", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, angle_max), // 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 + }, + { + "angle_increment", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, angle_increment), // 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 + }, + { + "time_increment", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, time_increment), // 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 + }, + { + "scan_time", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, scan_time), // 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 + }, + { + "range_min", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, range_min), // 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 + }, + { + "range_max", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, range_max), // 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 + }, + { + "ranges", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, ranges), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__size_function__LaserScan__ranges, // size() function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__ranges, // get_const(index) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__ranges, // get(index) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__fetch_function__LaserScan__ranges, // fetch(index, &value) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__assign_function__LaserScan__ranges, // assign(index, value) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__resize_function__LaserScan__ranges // resize(index) function pointer + }, + { + "intensities", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__LaserScan, intensities), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__size_function__LaserScan__intensities, // size() function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_const_function__LaserScan__intensities, // get_const(index) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__get_function__LaserScan__intensities, // get(index) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__fetch_function__LaserScan__intensities, // fetch(index, &value) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__assign_function__LaserScan__intensities, // assign(index, value) function pointer + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__resize_function__LaserScan__intensities // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_members = { + "sensor_msgs__msg", // message namespace + "LaserScan", // message name + 10, // number of fields + sizeof(sensor_msgs__msg__LaserScan), + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array, // message members + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_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 sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle = { + 0, + &sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserScan)() { + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__LaserScan__rosidl_typesupport_introspection_c__LaserScan_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.cpp similarity index 80% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.cpp index 75e18966a..6c37a1a7c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__LaserScan__ranges(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__LaserScan__ranges( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__LaserScan__ranges(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__LaserScan__ranges( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__LaserScan__ranges(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__LaserScan__ranges(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__LaserScan__intensities(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__LaserScan__intensities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__LaserScan__intensities(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__LaserScan__intensities( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__LaserScan__intensities(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__LaserScan__intensities(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -210,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes 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 }, { @@ -225,6 +277,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes size_function__LaserScan__ranges, // size() function pointer get_const_function__LaserScan__ranges, // get_const(index) function pointer get_function__LaserScan__ranges, // get(index) function pointer + fetch_function__LaserScan__ranges, // fetch(index, &value) function pointer + assign_function__LaserScan__ranges, // assign(index, value) function pointer resize_function__LaserScan__ranges // resize(index) function pointer }, { @@ -240,6 +294,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LaserScan_mes size_function__LaserScan__intensities, // size() function pointer get_const_function__LaserScan__intensities, // get_const(index) function pointer get_function__LaserScan__intensities, // get(index) function pointer + fetch_function__LaserScan__intensities, // fetch(index, &value) function pointer + assign_function__LaserScan__intensities, // assign(index, value) function pointer resize_function__LaserScan__intensities // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/laser_scan__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.hpp new file mode 100644 index 000000000..778a085ec --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/laser_scan__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/LaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + LaserScan +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__LASER_SCAN__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__builder.hpp index 8c020853e..ea4720e2f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/magnetic_field__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/magnetic_field__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__functions.c index 262cfce29..3b5d24ae1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__functions.c @@ -249,22 +249,27 @@ sensor_msgs__msg__MagneticField__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__MagneticField); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__MagneticField * data = - (sensor_msgs__msg__MagneticField *)realloc(output->data, allocation_size); + (sensor_msgs__msg__MagneticField *)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 (!sensor_msgs__msg__MagneticField__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__MagneticField__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; ) { - sensor_msgs__msg__MagneticField__fini(&data[i]); + sensor_msgs__msg__MagneticField__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h index bd6e3eeb7..f57b892f3 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__MagneticField( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__MagneticField( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp index 15369c8c4..cfc424c93 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_MagneticField( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.h new file mode 100644 index 000000000..829bd854d --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.h @@ -0,0 +1,68 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/MagneticField.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'magnetic_field' +#include "geometry_msgs/msg/detail/vector3__struct.h" + +/// Struct defined in msg/MagneticField in the package sensor_msgs. +/** + * Measurement of the Magnetic Field vector at a specific location. + * + * If the covariance of the measurement is known, it should be filled in. + * If all you know is the variance of each measurement, e.g. from the datasheet, + * just put those along the diagonal. + * A covariance matrix of all zeros will be interpreted as "covariance unknown", + * and to use the data a covariance will have to be assumed or gotten from some + * other source. + */ +typedef struct sensor_msgs__msg__MagneticField +{ + /// timestamp is the time the + /// field was measured + /// frame_id is the location and orientation + /// of the field measurement + std_msgs__msg__Header header; + /// x, y, and z components of the + /// field vector in Tesla + /// If your sensor does not output 3 axes, + /// put NaNs in the components not reported. + geometry_msgs__msg__Vector3 magnetic_field; + /// Row major about x, y, z axes + /// 0 is interpreted as variance unknown + double magnetic_field_covariance[9]; +} sensor_msgs__msg__MagneticField; + +// Struct for a sequence of sensor_msgs__msg__MagneticField. +typedef struct sensor_msgs__msg__MagneticField__Sequence +{ + sensor_msgs__msg__MagneticField * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__MagneticField__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.hpp index 053ec5ba9..057b81bdb 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__traits.hpp new file mode 100644 index 000000000..1f72aacae --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__traits.hpp @@ -0,0 +1,168 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/MagneticField.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/magnetic_field__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'magnetic_field' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MagneticField & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: magnetic_field + { + out << "magnetic_field: "; + to_flow_style_yaml(msg.magnetic_field, out); + out << ", "; + } + + // member: magnetic_field_covariance + { + if (msg.magnetic_field_covariance.size() == 0) { + out << "magnetic_field_covariance: []"; + } else { + out << "magnetic_field_covariance: ["; + size_t pending_items = msg.magnetic_field_covariance.size(); + for (auto item : msg.magnetic_field_covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MagneticField & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: magnetic_field + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "magnetic_field:\n"; + to_block_style_yaml(msg.magnetic_field, out, indentation + 2); + } + + // member: magnetic_field_covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.magnetic_field_covariance.size() == 0) { + out << "magnetic_field_covariance: []\n"; + } else { + out << "magnetic_field_covariance:\n"; + for (auto item : msg.magnetic_field_covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MagneticField & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::MagneticField & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::MagneticField & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::MagneticField"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/MagneticField"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.c new file mode 100644 index 000000000..b22fe103a --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.c @@ -0,0 +1,176 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/MagneticField.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/magnetic_field__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/magnetic_field__functions.h" +#include "sensor_msgs/msg/detail/magnetic_field__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `magnetic_field` +#include "geometry_msgs/msg/vector3.h" +// Member `magnetic_field` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_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; + sensor_msgs__msg__MagneticField__init(message_memory); +} + +void sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_fini_function(void * message_memory) +{ + sensor_msgs__msg__MagneticField__fini(message_memory); +} + +size_t sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__size_function__MagneticField__magnetic_field_covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_const_function__MagneticField__magnetic_field_covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_function__MagneticField__magnetic_field_covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__fetch_function__MagneticField__magnetic_field_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_const_function__MagneticField__magnetic_field_covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__assign_function__MagneticField__magnetic_field_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_function__MagneticField__magnetic_field_covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__MagneticField, header), // 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 + }, + { + "magnetic_field", // 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(sensor_msgs__msg__MagneticField, magnetic_field), // 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 + }, + { + "magnetic_field_covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MagneticField, magnetic_field_covariance), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__size_function__MagneticField__magnetic_field_covariance, // size() function pointer + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_const_function__MagneticField__magnetic_field_covariance, // get_const(index) function pointer + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__get_function__MagneticField__magnetic_field_covariance, // get(index) function pointer + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__fetch_function__MagneticField__magnetic_field_covariance, // fetch(index, &value) function pointer + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__assign_function__MagneticField__magnetic_field_covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_members = { + "sensor_msgs__msg", // message namespace + "MagneticField", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__MagneticField), + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array, // message members + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_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 sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle = { + 0, + &sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MagneticField)() { + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + if (!sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__MagneticField__rosidl_typesupport_introspection_c__MagneticField_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.cpp index 46e1a07fe..c16b998da 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MagneticField__magnetic_field_covariance(void * untyped_mem return &member[index]; } +void fetch_function__MagneticField__magnetic_field_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MagneticField__magnetic_field_covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MagneticField__magnetic_field_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MagneticField__magnetic_field_covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember MagneticField_message_member_array[3] = { { "header", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MagneticField 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 }, { @@ -86,6 +106,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MagneticField 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 }, { @@ -101,6 +123,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MagneticField size_function__MagneticField__magnetic_field_covariance, // size() function pointer get_const_function__MagneticField__magnetic_field_covariance, // get_const(index) function pointer get_function__MagneticField__magnetic_field_covariance, // get(index) function pointer + fetch_function__MagneticField__magnetic_field_covariance, // fetch(index, &value) function pointer + assign_function__MagneticField__magnetic_field_covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/magnetic_field__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.hpp new file mode 100644 index 000000000..22559c6dd --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/magnetic_field__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/MagneticField.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + MagneticField +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MAGNETIC_FIELD__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp index 05dadee58..340ea804b 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c index 33ee164ff..0acbb98e6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__functions.c @@ -300,22 +300,27 @@ sensor_msgs__msg__MultiDOFJointState__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__MultiDOFJointState); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__MultiDOFJointState * data = - (sensor_msgs__msg__MultiDOFJointState *)realloc(output->data, allocation_size); + (sensor_msgs__msg__MultiDOFJointState *)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 (!sensor_msgs__msg__MultiDOFJointState__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__MultiDOFJointState__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; ) { - sensor_msgs__msg__MultiDOFJointState__fini(&data[i]); + sensor_msgs__msg__MultiDOFJointState__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h index 7e750d316..3fb3ec1a5 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__MultiDOFJointState( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__MultiDOFJointState( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp index e3bf6537c..ea067f563 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_MultiDOFJointState( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h new file mode 100644 index 000000000..3f0218791 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.h @@ -0,0 +1,77 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/MultiDOFJointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'joint_names' +#include "rosidl_runtime_c/string.h" +// Member 'transforms' +#include "geometry_msgs/msg/detail/transform__struct.h" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__struct.h" +// Member 'wrench' +#include "geometry_msgs/msg/detail/wrench__struct.h" + +/// Struct defined in msg/MultiDOFJointState in the package sensor_msgs. +/** + * Representation of state for joints with multiple degrees of freedom, + * following the structure of JointState which can only represent a single degree of freedom. + * + * It is assumed that a joint in a system corresponds to a transform that gets applied + * along the kinematic chain. For example, a planar joint (as in URDF) is 3DOF (x, y, yaw) + * and those 3DOF can be expressed as a transformation matrix, and that transformation + * matrix can be converted back to (x, y, yaw) + * + * Each joint is uniquely identified by its name + * The header specifies the time at which the joint states were recorded. All the joint states + * in one message have to be recorded at the same time. + * + * This message consists of a multiple arrays, one for each part of the joint state. + * The goal is to make each of the fields optional. When e.g. your joints have no + * wrench associated with them, you can leave the wrench array empty. + * + * All arrays in this message should have the same size, or be empty. + * This is the only way to uniquely associate the joint name with the correct + * states. + */ +typedef struct sensor_msgs__msg__MultiDOFJointState +{ + std_msgs__msg__Header header; + rosidl_runtime_c__String__Sequence joint_names; + geometry_msgs__msg__Transform__Sequence transforms; + geometry_msgs__msg__Twist__Sequence twist; + geometry_msgs__msg__Wrench__Sequence wrench; +} sensor_msgs__msg__MultiDOFJointState; + +// Struct for a sequence of sensor_msgs__msg__MultiDOFJointState. +typedef struct sensor_msgs__msg__MultiDOFJointState__Sequence +{ + sensor_msgs__msg__MultiDOFJointState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__MultiDOFJointState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp similarity index 78% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp index a40b70139..5c13a2067 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -59,16 +60,16 @@ struct MultiDOFJointState_ std_msgs::msg::Header_; _header_type header; using _joint_names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _joint_names_type joint_names; using _transforms_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _transforms_type transforms; using _twist_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _twist_type twist; using _wrench_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _wrench_type wrench; // setters for named parameter idiom @@ -79,25 +80,25 @@ struct MultiDOFJointState_ return *this; } Type & set__joint_names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->joint_names = _arg; return *this; } Type & set__transforms( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->transforms = _arg; return *this; } Type & set__twist( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->twist = _arg; return *this; } Type & set__wrench( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->wrench = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp new file mode 100644 index 000000000..c7a3ca3c5 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp @@ -0,0 +1,267 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/MultiDOFJointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'transforms' +#include "geometry_msgs/msg/detail/transform__traits.hpp" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__traits.hpp" +// Member 'wrench' +#include "geometry_msgs/msg/detail/wrench__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiDOFJointState & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: joint_names + { + if (msg.joint_names.size() == 0) { + out << "joint_names: []"; + } else { + out << "joint_names: ["; + size_t pending_items = msg.joint_names.size(); + for (auto item : msg.joint_names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: transforms + { + if (msg.transforms.size() == 0) { + out << "transforms: []"; + } else { + out << "transforms: ["; + size_t pending_items = msg.transforms.size(); + for (auto item : msg.transforms) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: twist + { + if (msg.twist.size() == 0) { + out << "twist: []"; + } else { + out << "twist: ["; + size_t pending_items = msg.twist.size(); + for (auto item : msg.twist) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: wrench + { + if (msg.wrench.size() == 0) { + out << "wrench: []"; + } else { + out << "wrench: ["; + size_t pending_items = msg.wrench.size(); + for (auto item : msg.wrench) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiDOFJointState & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: joint_names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.joint_names.size() == 0) { + out << "joint_names: []\n"; + } else { + out << "joint_names:\n"; + for (auto item : msg.joint_names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: transforms + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.transforms.size() == 0) { + out << "transforms: []\n"; + } else { + out << "transforms:\n"; + for (auto item : msg.transforms) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.twist.size() == 0) { + out << "twist: []\n"; + } else { + out << "twist:\n"; + for (auto item : msg.twist) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: wrench + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.wrench.size() == 0) { + out << "wrench: []\n"; + } else { + out << "wrench:\n"; + for (auto item : msg.wrench) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiDOFJointState & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::MultiDOFJointState & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::MultiDOFJointState & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::MultiDOFJointState"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/MultiDOFJointState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c new file mode 100644 index 000000000..222dca712 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.c @@ -0,0 +1,399 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/MultiDOFJointState.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/multi_dof_joint_state__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/multi_dof_joint_state__functions.h" +#include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `joint_names` +#include "rosidl_runtime_c/string_functions.h" +// Member `transforms` +#include "geometry_msgs/msg/transform.h" +// Member `transforms` +#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" +// Member `twist` +#include "geometry_msgs/msg/twist.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" +// Member `wrench` +#include "geometry_msgs/msg/wrench.h" +// Member `wrench` +#include "geometry_msgs/msg/detail/wrench__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_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; + sensor_msgs__msg__MultiDOFJointState__init(message_memory); +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_fini_function(void * message_memory) +{ + sensor_msgs__msg__MultiDOFJointState__fini(message_memory); +} + +size_t sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__joint_names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__joint_names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__joint_names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__joint_names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__joint_names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__joint_names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__transforms( + const void * untyped_member) +{ + const geometry_msgs__msg__Transform__Sequence * member = + (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__transforms( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Transform__Sequence * member = + (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__transforms( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Transform__Sequence * member = + (geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Transform * item = + ((const geometry_msgs__msg__Transform *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__transforms(untyped_member, index)); + geometry_msgs__msg__Transform * value = + (geometry_msgs__msg__Transform *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Transform * item = + ((geometry_msgs__msg__Transform *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__transforms(untyped_member, index)); + const geometry_msgs__msg__Transform * value = + (const geometry_msgs__msg__Transform *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__transforms( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Transform__Sequence * member = + (geometry_msgs__msg__Transform__Sequence *)(untyped_member); + geometry_msgs__msg__Transform__Sequence__fini(member); + return geometry_msgs__msg__Transform__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__twist( + const void * untyped_member) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__twist( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__twist( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__twist( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Twist * item = + ((const geometry_msgs__msg__Twist *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__twist(untyped_member, index)); + geometry_msgs__msg__Twist * value = + (geometry_msgs__msg__Twist *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__twist( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Twist * item = + ((geometry_msgs__msg__Twist *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__twist(untyped_member, index)); + const geometry_msgs__msg__Twist * value = + (const geometry_msgs__msg__Twist *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__twist( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + geometry_msgs__msg__Twist__Sequence__fini(member); + return geometry_msgs__msg__Twist__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__wrench( + const void * untyped_member) +{ + const geometry_msgs__msg__Wrench__Sequence * member = + (const geometry_msgs__msg__Wrench__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__wrench( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Wrench__Sequence * member = + (const geometry_msgs__msg__Wrench__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__wrench( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Wrench__Sequence * member = + (geometry_msgs__msg__Wrench__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__wrench( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Wrench * item = + ((const geometry_msgs__msg__Wrench *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__wrench(untyped_member, index)); + geometry_msgs__msg__Wrench * value = + (geometry_msgs__msg__Wrench *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__wrench( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Wrench * item = + ((geometry_msgs__msg__Wrench *) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__wrench(untyped_member, index)); + const geometry_msgs__msg__Wrench * value = + (const geometry_msgs__msg__Wrench *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__wrench( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Wrench__Sequence * member = + (geometry_msgs__msg__Wrench__Sequence *)(untyped_member); + geometry_msgs__msg__Wrench__Sequence__fini(member); + return geometry_msgs__msg__Wrench__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[5] = { + { + "header", // 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(sensor_msgs__msg__MultiDOFJointState, header), // 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 + }, + { + "joint_names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiDOFJointState, joint_names), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__joint_names, // size() function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__joint_names, // get_const(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__joint_names, // get(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__joint_names, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__joint_names, // assign(index, value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__joint_names // resize(index) function pointer + }, + { + "transforms", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiDOFJointState, transforms), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__transforms, // size() function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__transforms, // get_const(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__transforms, // get(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__transforms, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__transforms, // assign(index, value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__transforms // resize(index) function pointer + }, + { + "twist", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiDOFJointState, twist), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__twist, // size() function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__twist, // get_const(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__twist, // get(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__twist, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__twist, // assign(index, value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__twist // resize(index) function pointer + }, + { + "wrench", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiDOFJointState, wrench), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__size_function__MultiDOFJointState__wrench, // size() function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointState__wrench, // get_const(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__get_function__MultiDOFJointState__wrench, // get(index) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointState__wrench, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointState__wrench, // assign(index, value) function pointer + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointState__wrench // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_members = { + "sensor_msgs__msg", // message namespace + "MultiDOFJointState", // message name + 5, // number of fields + sizeof(sensor_msgs__msg__MultiDOFJointState), + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array, // message members + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_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 sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle = { + 0, + &sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MultiDOFJointState)() { + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Wrench)(); + if (!sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__MultiDOFJointState__rosidl_typesupport_introspection_c__MultiDOFJointState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp new file mode 100644 index 000000000..c0f0e5e7a --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.cpp @@ -0,0 +1,357 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from sensor_msgs:msg/MultiDOFJointState.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 "sensor_msgs/msg/detail/multi_dof_joint_state__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 sensor_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MultiDOFJointState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) sensor_msgs::msg::MultiDOFJointState(_init); +} + +void MultiDOFJointState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MultiDOFJointState(); +} + +size_t size_function__MultiDOFJointState__joint_names(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiDOFJointState__joint_names(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiDOFJointState__joint_names(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiDOFJointState__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointState__joint_names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointState__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointState__joint_names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiDOFJointState__joint_names(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__MultiDOFJointState__transforms(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiDOFJointState__transforms(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiDOFJointState__transforms(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiDOFJointState__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointState__transforms(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointState__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointState__transforms(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiDOFJointState__transforms(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__MultiDOFJointState__twist(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiDOFJointState__twist(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiDOFJointState__twist(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiDOFJointState__twist( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointState__twist(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointState__twist( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointState__twist(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiDOFJointState__twist(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__MultiDOFJointState__wrench(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiDOFJointState__wrench(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiDOFJointState__wrench(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiDOFJointState__wrench( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointState__wrench(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointState__wrench( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointState__wrench(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiDOFJointState__wrench(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJointState_message_member_array[5] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::MultiDOFJointState, header), // 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 + }, + { + "joint_names", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::MultiDOFJointState, joint_names), // bytes offset in struct + nullptr, // default value + size_function__MultiDOFJointState__joint_names, // size() function pointer + get_const_function__MultiDOFJointState__joint_names, // get_const(index) function pointer + get_function__MultiDOFJointState__joint_names, // get(index) function pointer + fetch_function__MultiDOFJointState__joint_names, // fetch(index, &value) function pointer + assign_function__MultiDOFJointState__joint_names, // assign(index, value) function pointer + resize_function__MultiDOFJointState__joint_names // resize(index) function pointer + }, + { + "transforms", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::MultiDOFJointState, transforms), // bytes offset in struct + nullptr, // default value + size_function__MultiDOFJointState__transforms, // size() function pointer + get_const_function__MultiDOFJointState__transforms, // get_const(index) function pointer + get_function__MultiDOFJointState__transforms, // get(index) function pointer + fetch_function__MultiDOFJointState__transforms, // fetch(index, &value) function pointer + assign_function__MultiDOFJointState__transforms, // assign(index, value) function pointer + resize_function__MultiDOFJointState__transforms // resize(index) function pointer + }, + { + "twist", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::MultiDOFJointState, twist), // bytes offset in struct + nullptr, // default value + size_function__MultiDOFJointState__twist, // size() function pointer + get_const_function__MultiDOFJointState__twist, // get_const(index) function pointer + get_function__MultiDOFJointState__twist, // get(index) function pointer + fetch_function__MultiDOFJointState__twist, // fetch(index, &value) function pointer + assign_function__MultiDOFJointState__twist, // assign(index, value) function pointer + resize_function__MultiDOFJointState__twist // resize(index) function pointer + }, + { + "wrench", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs::msg::MultiDOFJointState, wrench), // bytes offset in struct + nullptr, // default value + size_function__MultiDOFJointState__wrench, // size() function pointer + get_const_function__MultiDOFJointState__wrench, // get_const(index) function pointer + get_function__MultiDOFJointState__wrench, // get(index) function pointer + fetch_function__MultiDOFJointState__wrench, // fetch(index, &value) function pointer + assign_function__MultiDOFJointState__wrench, // assign(index, value) function pointer + resize_function__MultiDOFJointState__wrench // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiDOFJointState_message_members = { + "sensor_msgs::msg", // message namespace + "MultiDOFJointState", // message name + 5, // number of fields + sizeof(sensor_msgs::msg::MultiDOFJointState), + MultiDOFJointState_message_member_array, // message members + MultiDOFJointState_init_function, // function to initialize message memory (memory has to be allocated) + MultiDOFJointState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MultiDOFJointState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MultiDOFJointState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace sensor_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::MultiDOFJointState_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, sensor_msgs, msg, MultiDOFJointState)() { + return &::sensor_msgs::msg::rosidl_typesupport_introspection_cpp::MultiDOFJointState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.hpp new file mode 100644 index 000000000..74c8aba4c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_dof_joint_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/MultiDOFJointState.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + MultiDOFJointState +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp index 6496982a1..ff0cca58f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c index 579e9754e..d61da4953 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.c @@ -313,22 +313,27 @@ sensor_msgs__msg__MultiEchoLaserScan__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__MultiEchoLaserScan); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__MultiEchoLaserScan * data = - (sensor_msgs__msg__MultiEchoLaserScan *)realloc(output->data, allocation_size); + (sensor_msgs__msg__MultiEchoLaserScan *)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 (!sensor_msgs__msg__MultiEchoLaserScan__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__MultiEchoLaserScan__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; ) { - sensor_msgs__msg__MultiEchoLaserScan__fini(&data[i]); + sensor_msgs__msg__MultiEchoLaserScan__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h index 3736dae31..0bba90b5a 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__MultiEchoLaserScan( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__MultiEchoLaserScan( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp index 83c348771..3f96f526a 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_MultiEchoLaserScan( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h new file mode 100644 index 000000000..e231cc580 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h @@ -0,0 +1,85 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/MultiEchoLaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'ranges' +// Member 'intensities' +#include "sensor_msgs/msg/detail/laser_echo__struct.h" + +/// Struct defined in msg/MultiEchoLaserScan in the package sensor_msgs. +/** + * Single scan from a multi-echo planar laser range-finder + * + * If you have another ranging device with different behavior (e.g. a sonar + * array), please find or create a different message, since applications + * will make fairly laser-specific assumptions about this data + */ +typedef struct sensor_msgs__msg__MultiEchoLaserScan +{ + /// timestamp in the header is the acquisition time of + /// the first ray in the scan. + /// + /// in frame frame_id, angles are measured around + /// the positive Z axis (counterclockwise, if Z is up) + /// with zero angle being forward along the x axis + std_msgs__msg__Header header; + /// start angle of the scan + float angle_min; + /// end angle of the scan + float angle_max; + /// angular distance between measurements + float angle_increment; + /// time between measurements - if your scanner + /// is moving, this will be used in interpolating position + /// of 3d points + float time_increment; + /// time between scans + float scan_time; + /// minimum range value + float range_min; + /// maximum range value + float range_max; + /// range data + /// (Note: NaNs, values < range_min or > range_max should be discarded) + /// +Inf measurements are out of range + /// -Inf measurements are too close to determine exact distance. + sensor_msgs__msg__LaserEcho__Sequence ranges; + /// intensity data. If your + /// device does not provide intensities, please leave + /// the array empty. + sensor_msgs__msg__LaserEcho__Sequence intensities; +} sensor_msgs__msg__MultiEchoLaserScan; + +// Struct for a sequence of sensor_msgs__msg__MultiEchoLaserScan. +typedef struct sensor_msgs__msg__MultiEchoLaserScan__Sequence +{ + sensor_msgs__msg__MultiEchoLaserScan * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__MultiEchoLaserScan__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp index 1f0ca0384..fd884ac7c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -97,10 +98,10 @@ struct MultiEchoLaserScan_ float; _range_max_type range_max; using _ranges_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _ranges_type ranges; using _intensities_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _intensities_type intensities; // setters for named parameter idiom @@ -153,13 +154,13 @@ struct MultiEchoLaserScan_ return *this; } Type & set__ranges( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->ranges = _arg; return *this; } Type & set__intensities( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->intensities = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp new file mode 100644 index 000000000..356aa7f6a --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp @@ -0,0 +1,308 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/MultiEchoLaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'ranges' +// Member 'intensities' +#include "sensor_msgs/msg/detail/laser_echo__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiEchoLaserScan & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: angle_min + { + out << "angle_min: "; + rosidl_generator_traits::value_to_yaml(msg.angle_min, out); + out << ", "; + } + + // member: angle_max + { + out << "angle_max: "; + rosidl_generator_traits::value_to_yaml(msg.angle_max, out); + out << ", "; + } + + // member: angle_increment + { + out << "angle_increment: "; + rosidl_generator_traits::value_to_yaml(msg.angle_increment, out); + out << ", "; + } + + // member: time_increment + { + out << "time_increment: "; + rosidl_generator_traits::value_to_yaml(msg.time_increment, out); + out << ", "; + } + + // member: scan_time + { + out << "scan_time: "; + rosidl_generator_traits::value_to_yaml(msg.scan_time, out); + out << ", "; + } + + // member: range_min + { + out << "range_min: "; + rosidl_generator_traits::value_to_yaml(msg.range_min, out); + out << ", "; + } + + // member: range_max + { + out << "range_max: "; + rosidl_generator_traits::value_to_yaml(msg.range_max, out); + out << ", "; + } + + // member: ranges + { + if (msg.ranges.size() == 0) { + out << "ranges: []"; + } else { + out << "ranges: ["; + size_t pending_items = msg.ranges.size(); + for (auto item : msg.ranges) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: intensities + { + if (msg.intensities.size() == 0) { + out << "intensities: []"; + } else { + out << "intensities: ["; + size_t pending_items = msg.intensities.size(); + for (auto item : msg.intensities) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiEchoLaserScan & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: angle_min + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_min: "; + rosidl_generator_traits::value_to_yaml(msg.angle_min, out); + out << "\n"; + } + + // member: angle_max + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_max: "; + rosidl_generator_traits::value_to_yaml(msg.angle_max, out); + out << "\n"; + } + + // member: angle_increment + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "angle_increment: "; + rosidl_generator_traits::value_to_yaml(msg.angle_increment, out); + out << "\n"; + } + + // member: time_increment + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time_increment: "; + rosidl_generator_traits::value_to_yaml(msg.time_increment, out); + out << "\n"; + } + + // member: scan_time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "scan_time: "; + rosidl_generator_traits::value_to_yaml(msg.scan_time, out); + out << "\n"; + } + + // member: range_min + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "range_min: "; + rosidl_generator_traits::value_to_yaml(msg.range_min, out); + out << "\n"; + } + + // member: range_max + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "range_max: "; + rosidl_generator_traits::value_to_yaml(msg.range_max, out); + out << "\n"; + } + + // member: ranges + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.ranges.size() == 0) { + out << "ranges: []\n"; + } else { + out << "ranges:\n"; + for (auto item : msg.ranges) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: intensities + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.intensities.size() == 0) { + out << "intensities: []\n"; + } else { + out << "intensities:\n"; + for (auto item : msg.intensities) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiEchoLaserScan & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::MultiEchoLaserScan & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::MultiEchoLaserScan & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::MultiEchoLaserScan"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/MultiEchoLaserScan"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c new file mode 100644 index 000000000..63440cd9c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.c @@ -0,0 +1,364 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/MultiEchoLaserScan.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/multi_echo_laser_scan__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/multi_echo_laser_scan__functions.h" +#include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `ranges` +// Member `intensities` +#include "sensor_msgs/msg/laser_echo.h" +// Member `ranges` +// Member `intensities` +#include "sensor_msgs/msg/detail/laser_echo__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_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; + sensor_msgs__msg__MultiEchoLaserScan__init(message_memory); +} + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_fini_function(void * message_memory) +{ + sensor_msgs__msg__MultiEchoLaserScan__fini(message_memory); +} + +size_t sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__MultiEchoLaserScan__ranges( + const void * untyped_member) +{ + const sensor_msgs__msg__LaserEcho__Sequence * member = + (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__ranges( + const void * untyped_member, size_t index) +{ + const sensor_msgs__msg__LaserEcho__Sequence * member = + (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__ranges( + void * untyped_member, size_t index) +{ + sensor_msgs__msg__LaserEcho__Sequence * member = + (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__fetch_function__MultiEchoLaserScan__ranges( + const void * untyped_member, size_t index, void * untyped_value) +{ + const sensor_msgs__msg__LaserEcho * item = + ((const sensor_msgs__msg__LaserEcho *) + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__ranges(untyped_member, index)); + sensor_msgs__msg__LaserEcho * value = + (sensor_msgs__msg__LaserEcho *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__assign_function__MultiEchoLaserScan__ranges( + void * untyped_member, size_t index, const void * untyped_value) +{ + sensor_msgs__msg__LaserEcho * item = + ((sensor_msgs__msg__LaserEcho *) + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__ranges(untyped_member, index)); + const sensor_msgs__msg__LaserEcho * value = + (const sensor_msgs__msg__LaserEcho *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__MultiEchoLaserScan__ranges( + void * untyped_member, size_t size) +{ + sensor_msgs__msg__LaserEcho__Sequence * member = + (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + sensor_msgs__msg__LaserEcho__Sequence__fini(member); + return sensor_msgs__msg__LaserEcho__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__MultiEchoLaserScan__intensities( + const void * untyped_member) +{ + const sensor_msgs__msg__LaserEcho__Sequence * member = + (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__intensities( + const void * untyped_member, size_t index) +{ + const sensor_msgs__msg__LaserEcho__Sequence * member = + (const sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__intensities( + void * untyped_member, size_t index) +{ + sensor_msgs__msg__LaserEcho__Sequence * member = + (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__fetch_function__MultiEchoLaserScan__intensities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const sensor_msgs__msg__LaserEcho * item = + ((const sensor_msgs__msg__LaserEcho *) + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__intensities(untyped_member, index)); + sensor_msgs__msg__LaserEcho * value = + (sensor_msgs__msg__LaserEcho *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__assign_function__MultiEchoLaserScan__intensities( + void * untyped_member, size_t index, const void * untyped_value) +{ + sensor_msgs__msg__LaserEcho * item = + ((sensor_msgs__msg__LaserEcho *) + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__intensities(untyped_member, index)); + const sensor_msgs__msg__LaserEcho * value = + (const sensor_msgs__msg__LaserEcho *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__MultiEchoLaserScan__intensities( + void * untyped_member, size_t size) +{ + sensor_msgs__msg__LaserEcho__Sequence * member = + (sensor_msgs__msg__LaserEcho__Sequence *)(untyped_member); + sensor_msgs__msg__LaserEcho__Sequence__fini(member); + return sensor_msgs__msg__LaserEcho__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[10] = { + { + "header", // 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(sensor_msgs__msg__MultiEchoLaserScan, header), // 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 + }, + { + "angle_min", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_min), // 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 + }, + { + "angle_max", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_max), // 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 + }, + { + "angle_increment", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, angle_increment), // 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 + }, + { + "time_increment", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, time_increment), // 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 + }, + { + "scan_time", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, scan_time), // 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 + }, + { + "range_min", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, range_min), // 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 + }, + { + "range_max", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, range_max), // 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 + }, + { + "ranges", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, ranges), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__MultiEchoLaserScan__ranges, // size() function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__ranges, // get_const(index) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__ranges, // get(index) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__fetch_function__MultiEchoLaserScan__ranges, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__assign_function__MultiEchoLaserScan__ranges, // assign(index, value) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__MultiEchoLaserScan__ranges // resize(index) function pointer + }, + { + "intensities", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__MultiEchoLaserScan, intensities), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__size_function__MultiEchoLaserScan__intensities, // size() function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_const_function__MultiEchoLaserScan__intensities, // get_const(index) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__get_function__MultiEchoLaserScan__intensities, // get(index) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__fetch_function__MultiEchoLaserScan__intensities, // fetch(index, &value) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__assign_function__MultiEchoLaserScan__intensities, // assign(index, value) function pointer + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__resize_function__MultiEchoLaserScan__intensities // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_members = { + "sensor_msgs__msg", // message namespace + "MultiEchoLaserScan", // message name + 10, // number of fields + sizeof(sensor_msgs__msg__MultiEchoLaserScan), + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array, // message members + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_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 sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle = { + 0, + &sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, MultiEchoLaserScan)() { + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[8].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)(); + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_member_array[9].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, LaserEcho)(); + if (!sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__MultiEchoLaserScan__rosidl_typesupport_introspection_c__MultiEchoLaserScan_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp similarity index 80% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp index 7976f6c3a..4f992ede9 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MultiEchoLaserScan__ranges(void * untyped_member, size_t in return &member[index]; } +void fetch_function__MultiEchoLaserScan__ranges( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiEchoLaserScan__ranges(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiEchoLaserScan__ranges( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiEchoLaserScan__ranges(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiEchoLaserScan__ranges(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__MultiEchoLaserScan__intensities(void * untyped_member, size return &member[index]; } +void fetch_function__MultiEchoLaserScan__intensities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiEchoLaserScan__intensities(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiEchoLaserScan__intensities( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiEchoLaserScan__intensities(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiEchoLaserScan__intensities(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -210,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase 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 }, { @@ -225,6 +277,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase size_function__MultiEchoLaserScan__ranges, // size() function pointer get_const_function__MultiEchoLaserScan__ranges, // get_const(index) function pointer get_function__MultiEchoLaserScan__ranges, // get(index) function pointer + fetch_function__MultiEchoLaserScan__ranges, // fetch(index, &value) function pointer + assign_function__MultiEchoLaserScan__ranges, // assign(index, value) function pointer resize_function__MultiEchoLaserScan__ranges // resize(index) function pointer }, { @@ -240,6 +294,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiEchoLase size_function__MultiEchoLaserScan__intensities, // size() function pointer get_const_function__MultiEchoLaserScan__intensities, // get_const(index) function pointer get_function__MultiEchoLaserScan__intensities, // get(index) function pointer + fetch_function__MultiEchoLaserScan__intensities, // fetch(index, &value) function pointer + assign_function__MultiEchoLaserScan__intensities, // assign(index, value) function pointer resize_function__MultiEchoLaserScan__intensities // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.hpp new file mode 100644 index 000000000..946b65973 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/MultiEchoLaserScan.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + MultiEchoLaserScan +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__MULTI_ECHO_LASER_SCAN__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp index 396fe768e..7b56b89be 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/nav_sat_fix__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/nav_sat_fix__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__functions.c index ec3057bbe..6fdc97b8e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__functions.c @@ -281,22 +281,27 @@ sensor_msgs__msg__NavSatFix__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__NavSatFix); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__NavSatFix * data = - (sensor_msgs__msg__NavSatFix *)realloc(output->data, allocation_size); + (sensor_msgs__msg__NavSatFix *)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 (!sensor_msgs__msg__NavSatFix__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__NavSatFix__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; ) { - sensor_msgs__msg__NavSatFix__fini(&data[i]); + sensor_msgs__msg__NavSatFix__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h index 9c501aa92..674d67132 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__NavSatFix( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__NavSatFix( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp index 15aa9c713..7aa5f2549 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_NavSatFix( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.h new file mode 100644 index 000000000..285147108 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.h @@ -0,0 +1,105 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/NavSatFix.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'COVARIANCE_TYPE_UNKNOWN'. +/** + * If the covariance of the fix is known, fill it in completely. If the + * GPS receiver provides the variance of each measurement, put them + * along the diagonal. If only Dilution of Precision is available, + * estimate an approximate covariance from that. + */ +enum +{ + sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_UNKNOWN = 0 +}; + +/// Constant 'COVARIANCE_TYPE_APPROXIMATED'. +enum +{ + sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_APPROXIMATED = 1 +}; + +/// Constant 'COVARIANCE_TYPE_DIAGONAL_KNOWN'. +enum +{ + sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_DIAGONAL_KNOWN = 2 +}; + +/// Constant 'COVARIANCE_TYPE_KNOWN'. +enum +{ + sensor_msgs__msg__NavSatFix__COVARIANCE_TYPE_KNOWN = 3 +}; + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'status' +#include "sensor_msgs/msg/detail/nav_sat_status__struct.h" + +/// Struct defined in msg/NavSatFix in the package sensor_msgs. +/** + * Navigation Satellite fix for any Global Navigation Satellite System + * + * Specified using the WGS 84 reference ellipsoid + */ +typedef struct sensor_msgs__msg__NavSatFix +{ + /// header.stamp specifies the ROS time for this measurement (the + /// corresponding satellite time may be reported using the + /// sensor_msgs/TimeReference message). + /// + /// header.frame_id is the frame of reference reported by the satellite + /// receiver, usually the location of the antenna. This is a + /// Euclidean frame relative to the vehicle, not a reference + /// ellipsoid. + std_msgs__msg__Header header; + /// Satellite fix status information. + sensor_msgs__msg__NavSatStatus status; + /// Latitude. Positive is north of equator; negative is south. + double latitude; + /// Longitude. Positive is east of prime meridian; negative is west. + double longitude; + /// Altitude. Positive is above the WGS 84 ellipsoid + /// (quiet NaN if no altitude is available). + double altitude; + /// Position covariance defined relative to a tangential plane + /// through the reported position. The components are East, North, and + /// Up (ENU), in row-major order. + /// + /// Beware: this coordinate system exhibits singularities at the poles. + double position_covariance[9]; + uint8_t position_covariance_type; +} sensor_msgs__msg__NavSatFix; + +// Struct for a sequence of sensor_msgs__msg__NavSatFix. +typedef struct sensor_msgs__msg__NavSatFix__Sequence +{ + sensor_msgs__msg__NavSatFix * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__NavSatFix__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp index 352d3a08b..0bb6f814e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -220,14 +221,26 @@ using NavSatFix = sensor_msgs::msg::NavSatFix_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t NavSatFix_::COVARIANCE_TYPE_UNKNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t NavSatFix_::COVARIANCE_TYPE_APPROXIMATED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t NavSatFix_::COVARIANCE_TYPE_DIAGONAL_KNOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t NavSatFix_::COVARIANCE_TYPE_KNOWN; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp new file mode 100644 index 000000000..a06162a50 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__traits.hpp @@ -0,0 +1,236 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/NavSatFix.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/nav_sat_fix__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'status' +#include "sensor_msgs/msg/detail/nav_sat_status__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const NavSatFix & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: status + { + out << "status: "; + to_flow_style_yaml(msg.status, out); + out << ", "; + } + + // member: latitude + { + out << "latitude: "; + rosidl_generator_traits::value_to_yaml(msg.latitude, out); + out << ", "; + } + + // member: longitude + { + out << "longitude: "; + rosidl_generator_traits::value_to_yaml(msg.longitude, out); + out << ", "; + } + + // member: altitude + { + out << "altitude: "; + rosidl_generator_traits::value_to_yaml(msg.altitude, out); + out << ", "; + } + + // member: position_covariance + { + if (msg.position_covariance.size() == 0) { + out << "position_covariance: []"; + } else { + out << "position_covariance: ["; + size_t pending_items = msg.position_covariance.size(); + for (auto item : msg.position_covariance) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: position_covariance_type + { + out << "position_covariance_type: "; + rosidl_generator_traits::value_to_yaml(msg.position_covariance_type, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const NavSatFix & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status:\n"; + to_block_style_yaml(msg.status, out, indentation + 2); + } + + // member: latitude + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "latitude: "; + rosidl_generator_traits::value_to_yaml(msg.latitude, out); + out << "\n"; + } + + // member: longitude + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "longitude: "; + rosidl_generator_traits::value_to_yaml(msg.longitude, out); + out << "\n"; + } + + // member: altitude + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "altitude: "; + rosidl_generator_traits::value_to_yaml(msg.altitude, out); + out << "\n"; + } + + // member: position_covariance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.position_covariance.size() == 0) { + out << "position_covariance: []\n"; + } else { + out << "position_covariance:\n"; + for (auto item : msg.position_covariance) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: position_covariance_type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "position_covariance_type: "; + rosidl_generator_traits::value_to_yaml(msg.position_covariance_type, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const NavSatFix & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::NavSatFix & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::NavSatFix & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::NavSatFix"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/NavSatFix"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.c new file mode 100644 index 000000000..f0b4e9b15 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.c @@ -0,0 +1,244 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/NavSatFix.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/nav_sat_fix__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/nav_sat_fix__functions.h" +#include "sensor_msgs/msg/detail/nav_sat_fix__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `status` +#include "sensor_msgs/msg/nav_sat_status.h" +// Member `status` +#include "sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_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; + sensor_msgs__msg__NavSatFix__init(message_memory); +} + +void sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_fini_function(void * message_memory) +{ + sensor_msgs__msg__NavSatFix__fini(message_memory); +} + +size_t sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__size_function__NavSatFix__position_covariance( + const void * untyped_member) +{ + (void)untyped_member; + return 9; +} + +const void * sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_const_function__NavSatFix__position_covariance( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_function__NavSatFix__position_covariance( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__fetch_function__NavSatFix__position_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_const_function__NavSatFix__position_covariance(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__assign_function__NavSatFix__position_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_function__NavSatFix__position_covariance(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[7] = { + { + "header", // 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(sensor_msgs__msg__NavSatFix, header), // 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 + }, + { + "status", // 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(sensor_msgs__msg__NavSatFix, status), // 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 + }, + { + "latitude", // 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(sensor_msgs__msg__NavSatFix, latitude), // 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 + }, + { + "longitude", // 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(sensor_msgs__msg__NavSatFix, longitude), // 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 + }, + { + "altitude", // 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(sensor_msgs__msg__NavSatFix, altitude), // 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 + }, + { + "position_covariance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 9, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__NavSatFix, position_covariance), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__size_function__NavSatFix__position_covariance, // size() function pointer + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_const_function__NavSatFix__position_covariance, // get_const(index) function pointer + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__get_function__NavSatFix__position_covariance, // get(index) function pointer + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__fetch_function__NavSatFix__position_covariance, // fetch(index, &value) function pointer + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__assign_function__NavSatFix__position_covariance, // assign(index, value) function pointer + NULL // resize(index) function pointer + }, + { + "position_covariance_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__NavSatFix, position_covariance_type), // 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 sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_members = { + "sensor_msgs__msg", // message namespace + "NavSatFix", // message name + 7, // number of fields + sizeof(sensor_msgs__msg__NavSatFix), + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array, // message members + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_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 sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle = { + 0, + &sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatFix)() { + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatStatus)(); + if (!sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__NavSatFix__rosidl_typesupport_introspection_c__NavSatFix_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp index 84d8b9b04..8f65d0c9e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__NavSatFix__position_covariance(void * untyped_member, size_ return &member[index]; } +void fetch_function__NavSatFix__position_covariance( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__NavSatFix__position_covariance(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__NavSatFix__position_covariance( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__NavSatFix__position_covariance(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_message_member_array[7] = { { "header", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 }, { @@ -86,6 +106,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 }, { @@ -101,6 +123,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 }, { @@ -116,6 +140,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 }, { @@ -131,6 +157,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 }, { @@ -146,6 +174,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes size_function__NavSatFix__position_covariance, // size() function pointer get_const_function__NavSatFix__position_covariance, // get_const(index) function pointer get_function__NavSatFix__position_covariance, // get(index) function pointer + fetch_function__NavSatFix__position_covariance, // fetch(index, &value) function pointer + assign_function__NavSatFix__position_covariance, // assign(index, value) function pointer nullptr // resize(index) function pointer }, { @@ -161,6 +191,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatFix_mes 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_fix__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.hpp new file mode 100644 index 000000000..fd37dae27 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_fix__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/NavSatFix.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + NavSatFix +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_FIX__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__builder.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__builder.hpp index 6664be015..64e06d4a7 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/nav_sat_status__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/nav_sat_status__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__functions.c similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__functions.c index 7ea83cf72..b898fd6fc 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__functions.c @@ -209,22 +209,27 @@ sensor_msgs__msg__NavSatStatus__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__NavSatStatus); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__NavSatStatus * data = - (sensor_msgs__msg__NavSatStatus *)realloc(output->data, allocation_size); + (sensor_msgs__msg__NavSatStatus *)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 (!sensor_msgs__msg__NavSatStatus__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__NavSatStatus__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; ) { - sensor_msgs__msg__NavSatStatus__fini(&data[i]); + sensor_msgs__msg__NavSatStatus__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h index 0750d5d9e..f1d21d45c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__NavSatStatus( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__NavSatStatus( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp index e39b8c529..6b4428766 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_NavSatStatus( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.h new file mode 100644 index 000000000..cb7338c80 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.h @@ -0,0 +1,115 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/NavSatStatus.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'STATUS_NO_FIX'. +/** + * unable to fix position + */ +enum +{ + sensor_msgs__msg__NavSatStatus__STATUS_NO_FIX = -1 +}; + +/// Constant 'STATUS_FIX'. +/** + * unaugmented fix + */ +enum +{ + sensor_msgs__msg__NavSatStatus__STATUS_FIX = 0 +}; + +/// Constant 'STATUS_SBAS_FIX'. +/** + * with satellite-based augmentation + */ +enum +{ + sensor_msgs__msg__NavSatStatus__STATUS_SBAS_FIX = 1 +}; + +/// Constant 'STATUS_GBAS_FIX'. +/** + * with ground-based augmentation + */ +enum +{ + sensor_msgs__msg__NavSatStatus__STATUS_GBAS_FIX = 2 +}; + +/// Constant 'SERVICE_GPS'. +/** + * Bits defining which Global Navigation Satellite System signals were + * used by the receiver. + */ +enum +{ + sensor_msgs__msg__NavSatStatus__SERVICE_GPS = 1 +}; + +/// Constant 'SERVICE_GLONASS'. +enum +{ + sensor_msgs__msg__NavSatStatus__SERVICE_GLONASS = 2 +}; + +/// Constant 'SERVICE_COMPASS'. +/** + * includes BeiDou. + */ +enum +{ + sensor_msgs__msg__NavSatStatus__SERVICE_COMPASS = 4 +}; + +/// Constant 'SERVICE_GALILEO'. +enum +{ + sensor_msgs__msg__NavSatStatus__SERVICE_GALILEO = 8 +}; + +/// Struct defined in msg/NavSatStatus in the package sensor_msgs. +/** + * Navigation Satellite fix status for any Global Navigation Satellite System. + * + * Whether to output an augmented fix is determined by both the fix + * type and the last time differential corrections were received. A + * fix is valid when status >= STATUS_FIX. + */ +typedef struct sensor_msgs__msg__NavSatStatus +{ + int8_t status; + uint16_t service; +} sensor_msgs__msg__NavSatStatus; + +// Struct for a sequence of sensor_msgs__msg__NavSatStatus. +typedef struct sensor_msgs__msg__NavSatStatus__Sequence +{ + sensor_msgs__msg__NavSatStatus * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__NavSatStatus__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.hpp similarity index 79% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.hpp index d474aeded..20e051a14 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__NavSatStatus __attribute__((deprecated)) @@ -152,22 +153,46 @@ using NavSatStatus = sensor_msgs::msg::NavSatStatus_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t NavSatStatus_::STATUS_NO_FIX; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t NavSatStatus_::STATUS_FIX; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t NavSatStatus_::STATUS_SBAS_FIX; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int8_t NavSatStatus_::STATUS_GBAS_FIX; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint16_t NavSatStatus_::SERVICE_GPS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint16_t NavSatStatus_::SERVICE_GLONASS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint16_t NavSatStatus_::SERVICE_COMPASS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint16_t NavSatStatus_::SERVICE_GALILEO; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__traits.hpp new file mode 100644 index 000000000..5c9559039 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/NavSatStatus.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/nav_sat_status__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const NavSatStatus & msg, + std::ostream & out) +{ + out << "{"; + // member: status + { + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << ", "; + } + + // member: service + { + out << "service: "; + rosidl_generator_traits::value_to_yaml(msg.service, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const NavSatStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << "\n"; + } + + // member: service + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "service: "; + rosidl_generator_traits::value_to_yaml(msg.service, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const NavSatStatus & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::NavSatStatus & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::NavSatStatus & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::NavSatStatus"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/NavSatStatus"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.c new file mode 100644 index 000000000..c50b08b16 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.c @@ -0,0 +1,100 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/NavSatStatus.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/nav_sat_status__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/nav_sat_status__functions.h" +#include "sensor_msgs/msg/detail/nav_sat_status__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_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; + sensor_msgs__msg__NavSatStatus__init(message_memory); +} + +void sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_fini_function(void * message_memory) +{ + sensor_msgs__msg__NavSatStatus__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_member_array[2] = { + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__NavSatStatus, status), // 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 + }, + { + "service", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__NavSatStatus, service), // 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 sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_members = { + "sensor_msgs__msg", // message namespace + "NavSatStatus", // message name + 2, // number of fields + sizeof(sensor_msgs__msg__NavSatStatus), + sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_member_array, // message members + sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_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 sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle = { + 0, + &sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, NavSatStatus)() { + if (!sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__NavSatStatus__rosidl_typesupport_introspection_c__NavSatStatus_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp index f1eea55b5..c8db08342 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatStatus_ 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember NavSatStatus_ 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/nav_sat_status__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.hpp new file mode 100644 index 000000000..0489813c2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/nav_sat_status__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/NavSatStatus.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + NavSatStatus +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__NAV_SAT_STATUS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__builder.hpp similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__builder.hpp index f823dcb55..2b0ee212b 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/point_cloud2__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/point_cloud2__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__functions.c index fee5d5648..c07312d51 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__functions.c @@ -306,22 +306,27 @@ sensor_msgs__msg__PointCloud2__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__PointCloud2); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__PointCloud2 * data = - (sensor_msgs__msg__PointCloud2 *)realloc(output->data, allocation_size); + (sensor_msgs__msg__PointCloud2 *)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 (!sensor_msgs__msg__PointCloud2__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__PointCloud2__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; ) { - sensor_msgs__msg__PointCloud2__fini(&data[i]); + sensor_msgs__msg__PointCloud2__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h index c8a09aa03..d0fb16480 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__PointCloud2( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__PointCloud2( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp index f847e9824..846d9eed8 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_PointCloud2( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.h new file mode 100644 index 000000000..5289d56b5 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.h @@ -0,0 +1,75 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/PointCloud2.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'fields' +#include "sensor_msgs/msg/detail/point_field__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/PointCloud2 in the package sensor_msgs. +/** + * This message holds a collection of N-dimensional points, which may + * contain additional information such as normals, intensity, etc. The + * point data is stored as a binary blob, its layout described by the + * contents of the "fields" array. + * + * The point cloud data may be organized 2d (image-like) or 1d (unordered). + * Point clouds organized as 2d images may be produced by camera depth sensors + * such as stereo or time-of-flight. + */ +typedef struct sensor_msgs__msg__PointCloud2 +{ + /// Time of sensor data acquisition, and the coordinate frame ID (for 3d points). + std_msgs__msg__Header header; + /// 2D structure of the point cloud. If the cloud is unordered, height is + /// 1 and width is the length of the point cloud. + uint32_t height; + uint32_t width; + /// Describes the channels and their layout in the binary data blob. + sensor_msgs__msg__PointField__Sequence fields; + /// Is this data bigendian? + bool is_bigendian; + /// Length of a point in bytes + uint32_t point_step; + /// Length of a row in bytes + uint32_t row_step; + /// Actual point data, size is (row_step*height) + rosidl_runtime_c__uint8__Sequence data; + /// True if there are no invalid points + bool is_dense; +} sensor_msgs__msg__PointCloud2; + +// Struct for a sequence of sensor_msgs__msg__PointCloud2. +typedef struct sensor_msgs__msg__PointCloud2__Sequence +{ + sensor_msgs__msg__PointCloud2 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__PointCloud2__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.hpp similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.hpp index c177ef8a8..4a3846fc1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -79,7 +80,7 @@ struct PointCloud2_ uint32_t; _width_type width; using _fields_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _fields_type fields; using _is_bigendian_type = bool; @@ -91,7 +92,7 @@ struct PointCloud2_ uint32_t; _row_step_type row_step; using _data_type = - std::vector::other>; + std::vector::template rebind_alloc>; _data_type data; using _is_dense_type = bool; @@ -117,7 +118,7 @@ struct PointCloud2_ return *this; } Type & set__fields( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->fields = _arg; return *this; @@ -141,7 +142,7 @@ struct PointCloud2_ return *this; } Type & set__data( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->data = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__traits.hpp new file mode 100644 index 000000000..9728101c2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__traits.hpp @@ -0,0 +1,291 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/PointCloud2.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/point_cloud2__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'fields' +#include "sensor_msgs/msg/detail/point_field__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PointCloud2 & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: height + { + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << ", "; + } + + // member: width + { + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << ", "; + } + + // member: fields + { + if (msg.fields.size() == 0) { + out << "fields: []"; + } else { + out << "fields: ["; + size_t pending_items = msg.fields.size(); + for (auto item : msg.fields) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: is_bigendian + { + out << "is_bigendian: "; + rosidl_generator_traits::value_to_yaml(msg.is_bigendian, out); + out << ", "; + } + + // member: point_step + { + out << "point_step: "; + rosidl_generator_traits::value_to_yaml(msg.point_step, out); + out << ", "; + } + + // member: row_step + { + out << "row_step: "; + rosidl_generator_traits::value_to_yaml(msg.row_step, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: is_dense + { + out << "is_dense: "; + rosidl_generator_traits::value_to_yaml(msg.is_dense, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PointCloud2 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << "\n"; + } + + // member: width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << "\n"; + } + + // member: fields + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.fields.size() == 0) { + out << "fields: []\n"; + } else { + out << "fields:\n"; + for (auto item : msg.fields) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: is_bigendian + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "is_bigendian: "; + rosidl_generator_traits::value_to_yaml(msg.is_bigendian, out); + out << "\n"; + } + + // member: point_step + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "point_step: "; + rosidl_generator_traits::value_to_yaml(msg.point_step, out); + out << "\n"; + } + + // member: row_step + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "row_step: "; + rosidl_generator_traits::value_to_yaml(msg.row_step, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: is_dense + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "is_dense: "; + rosidl_generator_traits::value_to_yaml(msg.is_dense, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PointCloud2 & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::PointCloud2 & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::PointCloud2 & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::PointCloud2"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/PointCloud2"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.c new file mode 100644 index 000000000..68cba957f --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.c @@ -0,0 +1,345 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/PointCloud2.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/point_cloud2__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_cloud2__functions.h" +#include "sensor_msgs/msg/detail/point_cloud2__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `fields` +#include "sensor_msgs/msg/point_field.h" +// Member `fields` +#include "sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_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; + sensor_msgs__msg__PointCloud2__init(message_memory); +} + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_fini_function(void * message_memory) +{ + sensor_msgs__msg__PointCloud2__fini(message_memory); +} + +size_t sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__size_function__PointCloud2__fields( + const void * untyped_member) +{ + const sensor_msgs__msg__PointField__Sequence * member = + (const sensor_msgs__msg__PointField__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__fields( + const void * untyped_member, size_t index) +{ + const sensor_msgs__msg__PointField__Sequence * member = + (const sensor_msgs__msg__PointField__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__fields( + void * untyped_member, size_t index) +{ + sensor_msgs__msg__PointField__Sequence * member = + (sensor_msgs__msg__PointField__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__fetch_function__PointCloud2__fields( + const void * untyped_member, size_t index, void * untyped_value) +{ + const sensor_msgs__msg__PointField * item = + ((const sensor_msgs__msg__PointField *) + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__fields(untyped_member, index)); + sensor_msgs__msg__PointField * value = + (sensor_msgs__msg__PointField *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__assign_function__PointCloud2__fields( + void * untyped_member, size_t index, const void * untyped_value) +{ + sensor_msgs__msg__PointField * item = + ((sensor_msgs__msg__PointField *) + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__fields(untyped_member, index)); + const sensor_msgs__msg__PointField * value = + (const sensor_msgs__msg__PointField *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointCloud2__fields( + void * untyped_member, size_t size) +{ + sensor_msgs__msg__PointField__Sequence * member = + (sensor_msgs__msg__PointField__Sequence *)(untyped_member); + sensor_msgs__msg__PointField__Sequence__fini(member); + return sensor_msgs__msg__PointField__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__size_function__PointCloud2__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__fetch_function__PointCloud2__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__assign_function__PointCloud2__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointCloud2__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[9] = { + { + "header", // 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(sensor_msgs__msg__PointCloud2, header), // 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 + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, height), // 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 + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, width), // 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 + }, + { + "fields", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, fields), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__size_function__PointCloud2__fields, // size() function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__fields, // get_const(index) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__fields, // get(index) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__fetch_function__PointCloud2__fields, // fetch(index, &value) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__assign_function__PointCloud2__fields, // assign(index, value) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointCloud2__fields // resize(index) function pointer + }, + { + "is_bigendian", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, is_bigendian), // 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 + }, + { + "point_step", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, point_step), // 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 + }, + { + "row_step", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, row_step), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, data), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__size_function__PointCloud2__data, // size() function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_const_function__PointCloud2__data, // get_const(index) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__get_function__PointCloud2__data, // get(index) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__fetch_function__PointCloud2__data, // fetch(index, &value) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__assign_function__PointCloud2__data, // assign(index, value) function pointer + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__resize_function__PointCloud2__data // resize(index) function pointer + }, + { + "is_dense", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud2, is_dense), // 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 sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_members = { + "sensor_msgs__msg", // message namespace + "PointCloud2", // message name + 9, // number of fields + sizeof(sensor_msgs__msg__PointCloud2), + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array, // message members + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_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 sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle = { + 0, + &sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud2)() { + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointField)(); + if (!sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__PointCloud2__rosidl_typesupport_introspection_c__PointCloud2_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.cpp similarity index 80% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.cpp index fe8cca210..565743a10 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PointCloud2__fields(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PointCloud2__fields( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PointCloud2__fields(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PointCloud2__fields( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PointCloud2__fields(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PointCloud2__fields(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__PointCloud2__data(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PointCloud2__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PointCloud2__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PointCloud2__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PointCloud2__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PointCloud2__data(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m size_function__PointCloud2__fields, // size() function pointer get_const_function__PointCloud2__fields, // get_const(index) function pointer get_function__PointCloud2__fields, // get(index) function pointer + fetch_function__PointCloud2__fields, // fetch(index, &value) function pointer + assign_function__PointCloud2__fields, // assign(index, value) function pointer resize_function__PointCloud2__fields // resize(index) function pointer }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 }, { @@ -210,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m size_function__PointCloud2__data, // size() function pointer get_const_function__PointCloud2__data, // get_const(index) function pointer get_function__PointCloud2__data, // get(index) function pointer + fetch_function__PointCloud2__data, // fetch(index, &value) function pointer + assign_function__PointCloud2__data, // assign(index, value) function pointer resize_function__PointCloud2__data // resize(index) function pointer }, { @@ -225,6 +277,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud2_m 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud2__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.hpp new file mode 100644 index 000000000..269d487fb --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud2__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/PointCloud2.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + PointCloud2 +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD2__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__builder.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__builder.hpp index 8bc354d9f..276607f53 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/point_cloud__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/point_cloud__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__functions.c index ea70abd92..e3979dc56 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__functions.c @@ -258,22 +258,27 @@ sensor_msgs__msg__PointCloud__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__PointCloud); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__PointCloud * data = - (sensor_msgs__msg__PointCloud *)realloc(output->data, allocation_size); + (sensor_msgs__msg__PointCloud *)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 (!sensor_msgs__msg__PointCloud__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__PointCloud__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; ) { - sensor_msgs__msg__PointCloud__fini(&data[i]); + sensor_msgs__msg__PointCloud__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h index 05ecd8ebc..3b044604a 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__PointCloud( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__PointCloud( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp index 83038b442..03191a2dc 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_PointCloud( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.h new file mode 100644 index 000000000..c4d5b0103 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/PointCloud.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'points' +#include "geometry_msgs/msg/detail/point32__struct.h" +// Member 'channels' +#include "sensor_msgs/msg/detail/channel_float32__struct.h" + +/// Struct defined in msg/PointCloud in the package sensor_msgs. +/** + * THIS MESSAGE IS DEPRECATED AS OF FOXY + * Please use sensor_msgs/PointCloud2 + */ +typedef struct sensor_msgs__msg__PointCloud +{ + /// This message holds a collection of 3d points, plus optional additional + /// information about each point. + /// Time of sensor data acquisition, coordinate frame ID. + std_msgs__msg__Header header; + /// Array of 3d points. Each Point32 should be interpreted as a 3d point + /// in the frame given in the header. + geometry_msgs__msg__Point32__Sequence points; + /// Each channel should have the same number of elements as points array, + /// and the data in each channel should correspond 1:1 with each point. + /// Channel names in common practice are listed in ChannelFloat32.msg. + sensor_msgs__msg__ChannelFloat32__Sequence channels; +} sensor_msgs__msg__PointCloud; + +// Struct for a sequence of sensor_msgs__msg__PointCloud. +typedef struct sensor_msgs__msg__PointCloud__Sequence +{ + sensor_msgs__msg__PointCloud * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__PointCloud__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.hpp similarity index 87% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.hpp index 35c675c4f..c349c74ab 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -57,10 +58,10 @@ struct PointCloud_ std_msgs::msg::Header_; _header_type header; using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _points_type points; using _channels_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _channels_type channels; // setters for named parameter idiom @@ -71,13 +72,13 @@ struct PointCloud_ return *this; } Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->points = _arg; return *this; } Type & set__channels( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->channels = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__traits.hpp new file mode 100644 index 000000000..35d04ac07 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__traits.hpp @@ -0,0 +1,190 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/PointCloud.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/point_cloud__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'points' +#include "geometry_msgs/msg/detail/point32__traits.hpp" +// Member 'channels' +#include "sensor_msgs/msg/detail/channel_float32__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PointCloud & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: channels + { + if (msg.channels.size() == 0) { + out << "channels: []"; + } else { + out << "channels: ["; + size_t pending_items = msg.channels.size(); + for (auto item : msg.channels) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PointCloud & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: channels + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.channels.size() == 0) { + out << "channels: []\n"; + } else { + out << "channels:\n"; + for (auto item : msg.channels) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PointCloud & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::PointCloud & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::PointCloud & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::PointCloud"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/PointCloud"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.c new file mode 100644 index 000000000..6dfa86091 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.c @@ -0,0 +1,247 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/PointCloud.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/point_cloud__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_cloud__functions.h" +#include "sensor_msgs/msg/detail/point_cloud__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `points` +#include "geometry_msgs/msg/point32.h" +// Member `points` +#include "geometry_msgs/msg/detail/point32__rosidl_typesupport_introspection_c.h" +// Member `channels` +#include "sensor_msgs/msg/channel_float32.h" +// Member `channels` +#include "sensor_msgs/msg/detail/channel_float32__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_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; + sensor_msgs__msg__PointCloud__init(message_memory); +} + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_fini_function(void * message_memory) +{ + sensor_msgs__msg__PointCloud__fini(message_memory); +} + +size_t sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__size_function__PointCloud__points( + const void * untyped_member) +{ + const geometry_msgs__msg__Point32__Sequence * member = + (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__points( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point32__Sequence * member = + (const geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__points( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point32__Sequence * member = + (geometry_msgs__msg__Point32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__fetch_function__PointCloud__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point32 * item = + ((const geometry_msgs__msg__Point32 *) + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__points(untyped_member, index)); + geometry_msgs__msg__Point32 * value = + (geometry_msgs__msg__Point32 *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__assign_function__PointCloud__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point32 * item = + ((geometry_msgs__msg__Point32 *) + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__points(untyped_member, index)); + const geometry_msgs__msg__Point32 * value = + (const geometry_msgs__msg__Point32 *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__resize_function__PointCloud__points( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point32__Sequence * member = + (geometry_msgs__msg__Point32__Sequence *)(untyped_member); + geometry_msgs__msg__Point32__Sequence__fini(member); + return geometry_msgs__msg__Point32__Sequence__init(member, size); +} + +size_t sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__size_function__PointCloud__channels( + const void * untyped_member) +{ + const sensor_msgs__msg__ChannelFloat32__Sequence * member = + (const sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); + return member->size; +} + +const void * sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__channels( + const void * untyped_member, size_t index) +{ + const sensor_msgs__msg__ChannelFloat32__Sequence * member = + (const sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__channels( + void * untyped_member, size_t index) +{ + sensor_msgs__msg__ChannelFloat32__Sequence * member = + (sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__fetch_function__PointCloud__channels( + const void * untyped_member, size_t index, void * untyped_value) +{ + const sensor_msgs__msg__ChannelFloat32 * item = + ((const sensor_msgs__msg__ChannelFloat32 *) + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__channels(untyped_member, index)); + sensor_msgs__msg__ChannelFloat32 * value = + (sensor_msgs__msg__ChannelFloat32 *)(untyped_value); + *value = *item; +} + +void sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__assign_function__PointCloud__channels( + void * untyped_member, size_t index, const void * untyped_value) +{ + sensor_msgs__msg__ChannelFloat32 * item = + ((sensor_msgs__msg__ChannelFloat32 *) + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__channels(untyped_member, index)); + const sensor_msgs__msg__ChannelFloat32 * value = + (const sensor_msgs__msg__ChannelFloat32 *)(untyped_value); + *item = *value; +} + +bool sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__resize_function__PointCloud__channels( + void * untyped_member, size_t size) +{ + sensor_msgs__msg__ChannelFloat32__Sequence * member = + (sensor_msgs__msg__ChannelFloat32__Sequence *)(untyped_member); + sensor_msgs__msg__ChannelFloat32__Sequence__fini(member); + return sensor_msgs__msg__ChannelFloat32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__PointCloud, header), // 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 + }, + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud, points), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__size_function__PointCloud__points, // size() function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__points, // get_const(index) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__points, // get(index) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__fetch_function__PointCloud__points, // fetch(index, &value) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__assign_function__PointCloud__points, // assign(index, value) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__resize_function__PointCloud__points // resize(index) function pointer + }, + { + "channels", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointCloud, channels), // bytes offset in struct + NULL, // default value + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__size_function__PointCloud__channels, // size() function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_const_function__PointCloud__channels, // get_const(index) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__get_function__PointCloud__channels, // get(index) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__fetch_function__PointCloud__channels, // fetch(index, &value) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__assign_function__PointCloud__channels, // assign(index, value) function pointer + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__resize_function__PointCloud__channels // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_members = { + "sensor_msgs__msg", // message namespace + "PointCloud", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__PointCloud), + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array, // message members + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_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 sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle = { + 0, + &sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointCloud)() { + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point32)(); + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, ChannelFloat32)(); + if (!sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__PointCloud__rosidl_typesupport_introspection_c__PointCloud_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.cpp similarity index 78% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.cpp index e1924e54d..afc3d9bc7 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__PointCloud__points(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PointCloud__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PointCloud__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PointCloud__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PointCloud__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PointCloud__points(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__PointCloud__channels(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__PointCloud__channels( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__PointCloud__channels(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__PointCloud__channels( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__PointCloud__channels(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__PointCloud__channels(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud_me 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud_me size_function__PointCloud__points, // size() function pointer get_const_function__PointCloud__points, // get_const(index) function pointer get_function__PointCloud__points, // get(index) function pointer + fetch_function__PointCloud__points, // fetch(index, &value) function pointer + assign_function__PointCloud__points, // assign(index, value) function pointer resize_function__PointCloud__points // resize(index) function pointer }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointCloud_me size_function__PointCloud__channels, // size() function pointer get_const_function__PointCloud__channels, // get_const(index) function pointer get_function__PointCloud__channels, // get(index) function pointer + fetch_function__PointCloud__channels, // fetch(index, &value) function pointer + assign_function__PointCloud__channels, // assign(index, value) function pointer resize_function__PointCloud__channels // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_cloud__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.hpp new file mode 100644 index 000000000..4105068af --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_cloud__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/PointCloud.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + PointCloud +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_CLOUD__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__builder.hpp index d8660b3c3..6bb6950c0 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/point_field__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/point_field__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__functions.c index 8ceff67a3..f57bd2b4b 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__functions.c @@ -240,22 +240,27 @@ sensor_msgs__msg__PointField__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__PointField); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__PointField * data = - (sensor_msgs__msg__PointField *)realloc(output->data, allocation_size); + (sensor_msgs__msg__PointField *)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 (!sensor_msgs__msg__PointField__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__PointField__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; ) { - sensor_msgs__msg__PointField__fini(&data[i]); + sensor_msgs__msg__PointField__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h index 36606da85..c17ddc084 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__PointField( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__PointField( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp index 064e0331a..2d30351e4 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_PointField( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.h similarity index 82% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.h index bb88283f2..67cd95b36 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.h @@ -69,12 +69,21 @@ enum // Member 'name' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/PointField in the package sensor_msgs. +/// Struct defined in msg/PointField in the package sensor_msgs. +/** + * This message holds the description of one point entry in the + * PointCloud2 message format. + */ typedef struct sensor_msgs__msg__PointField { + /// Common PointField names are x, y, z, intensity, rgb, rgba + /// Name of field rosidl_runtime_c__String name; + /// Offset from start of point struct uint32_t offset; + /// Datatype enumeration, see above uint8_t datatype; + /// How many elements in the field uint32_t count; } sensor_msgs__msg__PointField; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.hpp similarity index 77% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.hpp index ede8054e3..647962e5c 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__PointField __attribute__((deprecated)) @@ -59,7 +60,7 @@ struct PointField_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _offset_type = uint32_t; @@ -73,7 +74,7 @@ struct PointField_ // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; @@ -180,22 +181,46 @@ using PointField = sensor_msgs::msg::PointField_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::INT8; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::UINT8; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::INT16; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::UINT16; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::INT32; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::UINT32; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::FLOAT32; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t PointField_::FLOAT64; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__traits.hpp new file mode 100644 index 000000000..070cc2dad --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__traits.hpp @@ -0,0 +1,160 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/PointField.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/point_field__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const PointField & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: offset + { + out << "offset: "; + rosidl_generator_traits::value_to_yaml(msg.offset, out); + out << ", "; + } + + // member: datatype + { + out << "datatype: "; + rosidl_generator_traits::value_to_yaml(msg.datatype, out); + out << ", "; + } + + // member: count + { + out << "count: "; + rosidl_generator_traits::value_to_yaml(msg.count, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const PointField & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: offset + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "offset: "; + rosidl_generator_traits::value_to_yaml(msg.offset, out); + out << "\n"; + } + + // member: datatype + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "datatype: "; + rosidl_generator_traits::value_to_yaml(msg.datatype, out); + out << "\n"; + } + + // member: count + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "count: "; + rosidl_generator_traits::value_to_yaml(msg.count, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const PointField & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::PointField & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::PointField & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::PointField"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/PointField"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.c new file mode 100644 index 000000000..c3477b52e --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.c @@ -0,0 +1,138 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/PointField.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/point_field__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/point_field__functions.h" +#include "sensor_msgs/msg/detail/point_field__struct.h" + + +// Include directives for member types +// Member `name` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_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; + sensor_msgs__msg__PointField__init(message_memory); +} + +void sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_fini_function(void * message_memory) +{ + sensor_msgs__msg__PointField__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_member_array[4] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointField, name), // 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 + }, + { + "offset", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointField, offset), // 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 + }, + { + "datatype", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointField, datatype), // 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 + }, + { + "count", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__PointField, count), // 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 sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_members = { + "sensor_msgs__msg", // message namespace + "PointField", // message name + 4, // number of fields + sizeof(sensor_msgs__msg__PointField), + sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_member_array, // message members + sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_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 sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle = { + 0, + &sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, PointField)() { + if (!sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__PointField__rosidl_typesupport_introspection_c__PointField_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.cpp index f04fbf42e..29838f937 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointField_me 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointField_me 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointField_me 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember PointField_me 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/point_field__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.hpp new file mode 100644 index 000000000..492870e88 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/point_field__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/PointField.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + PointField +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__POINT_FIELD__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__builder.hpp index 08615e0f9..58c65a693 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__RANGE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/range__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/range__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__functions.c index e18056291..db7aa89a6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__functions.c @@ -256,22 +256,27 @@ sensor_msgs__msg__Range__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Range); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Range * data = - (sensor_msgs__msg__Range *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Range *)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 (!sensor_msgs__msg__Range__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Range__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; ) { - sensor_msgs__msg__Range__fini(&data[i]); + sensor_msgs__msg__Range__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h index 2840413bf..97f052517 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Range( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Range( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp index 1c216ef44..ff6131f25 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Range( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.h new file mode 100644 index 000000000..16f640732 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.h @@ -0,0 +1,96 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/Range.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'ULTRASOUND'. +/** + * Radiation type enums + * If you want a value added to this list, send an email to the ros-users list + */ +enum +{ + sensor_msgs__msg__Range__ULTRASOUND = 0 +}; + +/// Constant 'INFRARED'. +enum +{ + sensor_msgs__msg__Range__INFRARED = 1 +}; + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" + +/// Struct defined in msg/Range in the package sensor_msgs. +/** + * Single range reading from an active ranger that emits energy and reports + * one range reading that is valid along an arc at the distance measured. + * This message is not appropriate for laser scanners. See the LaserScan + * message if you are working with a laser scanner. + * + * This message also can represent a fixed-distance (binary) ranger. This + * sensor will have min_range===max_range===distance of detection. + * These sensors follow REP 117 and will output -Inf if the object is detected + * and +Inf if the object is outside of the detection range. + */ +typedef struct sensor_msgs__msg__Range +{ + /// timestamp in the header is the time the ranger + /// returned the distance reading + std_msgs__msg__Header header; + /// the type of radiation used by the sensor + /// (sound, IR, etc) + uint8_t radiation_type; + /// the size of the arc that the distance reading is + /// valid for + /// the object causing the range reading may have + /// been anywhere within -field_of_view/2 and + /// field_of_view/2 at the measured range. + /// 0 angle corresponds to the x-axis of the sensor. + float field_of_view; + /// minimum range value + float min_range; + /// maximum range value + /// Fixed distance rangers require min_range==max_range + float max_range; + /// range data + /// (Note: values < range_min or > range_max should be discarded) + /// Fixed distance rangers only output -Inf or +Inf. + /// -Inf represents a detection within fixed distance. + /// (Detection too close to the sensor to quantify) + /// +Inf represents no detection within the fixed distance. + /// (Object out of range) + float range; +} sensor_msgs__msg__Range; + +// Struct for a sequence of sensor_msgs__msg__Range. +typedef struct sensor_msgs__msg__Range__Sequence +{ + sensor_msgs__msg__Range * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__Range__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.hpp similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.hpp index e04c5b8db..296dedee7 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__RANGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -199,10 +200,16 @@ using Range = sensor_msgs::msg::Range_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t Range_::ULTRASOUND; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t Range_::INFRARED; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__traits.hpp new file mode 100644 index 000000000..a084761d2 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__traits.hpp @@ -0,0 +1,197 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Range.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/range__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Range & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: radiation_type + { + out << "radiation_type: "; + rosidl_generator_traits::value_to_yaml(msg.radiation_type, out); + out << ", "; + } + + // member: field_of_view + { + out << "field_of_view: "; + rosidl_generator_traits::value_to_yaml(msg.field_of_view, out); + out << ", "; + } + + // member: min_range + { + out << "min_range: "; + rosidl_generator_traits::value_to_yaml(msg.min_range, out); + out << ", "; + } + + // member: max_range + { + out << "max_range: "; + rosidl_generator_traits::value_to_yaml(msg.max_range, out); + out << ", "; + } + + // member: range + { + out << "range: "; + rosidl_generator_traits::value_to_yaml(msg.range, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Range & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: radiation_type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "radiation_type: "; + rosidl_generator_traits::value_to_yaml(msg.radiation_type, out); + out << "\n"; + } + + // member: field_of_view + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "field_of_view: "; + rosidl_generator_traits::value_to_yaml(msg.field_of_view, out); + out << "\n"; + } + + // member: min_range + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "min_range: "; + rosidl_generator_traits::value_to_yaml(msg.min_range, out); + out << "\n"; + } + + // member: max_range + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "max_range: "; + rosidl_generator_traits::value_to_yaml(msg.max_range, out); + out << "\n"; + } + + // member: range + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "range: "; + rosidl_generator_traits::value_to_yaml(msg.range, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Range & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Range & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Range & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Range"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Range"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__RANGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.c new file mode 100644 index 000000000..422774b54 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.c @@ -0,0 +1,176 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Range.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/range__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/range__functions.h" +#include "sensor_msgs/msg/detail/range__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_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; + sensor_msgs__msg__Range__init(message_memory); +} + +void sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_fini_function(void * message_memory) +{ + sensor_msgs__msg__Range__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_member_array[6] = { + { + "header", // 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(sensor_msgs__msg__Range, header), // 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 + }, + { + "radiation_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Range, radiation_type), // 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 + }, + { + "field_of_view", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Range, field_of_view), // 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 + }, + { + "min_range", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Range, min_range), // 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 + }, + { + "max_range", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Range, max_range), // 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 + }, + { + "range", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__Range, range), // 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 sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_members = { + "sensor_msgs__msg", // message namespace + "Range", // message name + 6, // number of fields + sizeof(sensor_msgs__msg__Range), + sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_member_array, // message members + sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_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 sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle = { + 0, + &sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Range)() { + sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Range__rosidl_typesupport_introspection_c__Range_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.cpp similarity index 90% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.cpp index 98303d712..90e09703d 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Range_message 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/range__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.hpp new file mode 100644 index 000000000..2abbb11f7 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/range__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Range.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RANGE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__RANGE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Range +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__RANGE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__builder.hpp index 6a824ccb2..a461326da 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/region_of_interest__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/region_of_interest__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__functions.c index c0d6ce06e..309398c37 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__functions.c @@ -233,22 +233,27 @@ sensor_msgs__msg__RegionOfInterest__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__RegionOfInterest); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__RegionOfInterest * data = - (sensor_msgs__msg__RegionOfInterest *)realloc(output->data, allocation_size); + (sensor_msgs__msg__RegionOfInterest *)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 (!sensor_msgs__msg__RegionOfInterest__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__RegionOfInterest__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; ) { - sensor_msgs__msg__RegionOfInterest__fini(&data[i]); + sensor_msgs__msg__RegionOfInterest__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h index 5c0fef42a..cc4ada516 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__RegionOfInterest( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__RegionOfInterest( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp index 91e6b7578..ae4ddcd88 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_RegionOfInterest( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.h new file mode 100644 index 000000000..b25b25309 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/RegionOfInterest.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/RegionOfInterest in the package sensor_msgs. +/** + * This message is used to specify a region of interest within an image. + * + * When used to specify the ROI setting of the camera when the image was + * taken, the height and width fields should either match the height and + * width fields for the associated image; or height = width = 0 + * indicates that the full resolution image was captured. + */ +typedef struct sensor_msgs__msg__RegionOfInterest +{ + /// Leftmost pixel of the ROI + /// (0 if the ROI includes the left edge of the image) + uint32_t x_offset; + /// Topmost pixel of the ROI + /// (0 if the ROI includes the top edge of the image) + uint32_t y_offset; + /// Height of ROI + uint32_t height; + /// Width of ROI + uint32_t width; + /// True if a distinct rectified ROI should be calculated from the "raw" + /// ROI in this message. Typically this should be False if the full image + /// is captured (ROI not used), and True if a subwindow is captured (ROI + /// used). + bool do_rectify; +} sensor_msgs__msg__RegionOfInterest; + +// Struct for a sequence of sensor_msgs__msg__RegionOfInterest. +typedef struct sensor_msgs__msg__RegionOfInterest__Sequence +{ + sensor_msgs__msg__RegionOfInterest * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__RegionOfInterest__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.hpp index b69deca48..5b81de8b1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__sensor_msgs__msg__RegionOfInterest __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__traits.hpp new file mode 100644 index 000000000..6c4858188 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__traits.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/RegionOfInterest.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/region_of_interest__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const RegionOfInterest & msg, + std::ostream & out) +{ + out << "{"; + // member: x_offset + { + out << "x_offset: "; + rosidl_generator_traits::value_to_yaml(msg.x_offset, out); + out << ", "; + } + + // member: y_offset + { + out << "y_offset: "; + rosidl_generator_traits::value_to_yaml(msg.y_offset, out); + out << ", "; + } + + // member: height + { + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << ", "; + } + + // member: width + { + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << ", "; + } + + // member: do_rectify + { + out << "do_rectify: "; + rosidl_generator_traits::value_to_yaml(msg.do_rectify, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const RegionOfInterest & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: x_offset + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "x_offset: "; + rosidl_generator_traits::value_to_yaml(msg.x_offset, out); + out << "\n"; + } + + // member: y_offset + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "y_offset: "; + rosidl_generator_traits::value_to_yaml(msg.y_offset, out); + out << "\n"; + } + + // member: height + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "height: "; + rosidl_generator_traits::value_to_yaml(msg.height, out); + out << "\n"; + } + + // member: width + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "width: "; + rosidl_generator_traits::value_to_yaml(msg.width, out); + out << "\n"; + } + + // member: do_rectify + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "do_rectify: "; + rosidl_generator_traits::value_to_yaml(msg.do_rectify, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const RegionOfInterest & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::RegionOfInterest & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::RegionOfInterest & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::RegionOfInterest"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/RegionOfInterest"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.c new file mode 100644 index 000000000..379ec0fa8 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.c @@ -0,0 +1,151 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/RegionOfInterest.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/region_of_interest__functions.h" +#include "sensor_msgs/msg/detail/region_of_interest__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_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; + sensor_msgs__msg__RegionOfInterest__init(message_memory); +} + +void sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_fini_function(void * message_memory) +{ + sensor_msgs__msg__RegionOfInterest__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_member_array[5] = { + { + "x_offset", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__RegionOfInterest, x_offset), // 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 + }, + { + "y_offset", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__RegionOfInterest, y_offset), // 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 + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__RegionOfInterest, height), // 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 + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__RegionOfInterest, width), // 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 + }, + { + "do_rectify", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__RegionOfInterest, do_rectify), // 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 sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_members = { + "sensor_msgs__msg", // message namespace + "RegionOfInterest", // message name + 5, // number of fields + sizeof(sensor_msgs__msg__RegionOfInterest), + sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_member_array, // message members + sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_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 sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle = { + 0, + &sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)() { + if (!sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__RegionOfInterest__rosidl_typesupport_introspection_c__RegionOfInterest_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.cpp index 0f50b9fdc..f438ac3f9 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RegionOfInter 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RegionOfInter 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RegionOfInter 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RegionOfInter 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RegionOfInter 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/region_of_interest__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.hpp new file mode 100644 index 000000000..3a2a55c07 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/region_of_interest__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/RegionOfInterest.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + RegionOfInterest +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__REGION_OF_INTEREST__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__builder.hpp index 517dd6440..fcc021e28 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/relative_humidity__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/relative_humidity__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__functions.c index 04d26da26..1cf3ca834 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__functions.c @@ -232,22 +232,27 @@ sensor_msgs__msg__RelativeHumidity__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__RelativeHumidity); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__RelativeHumidity * data = - (sensor_msgs__msg__RelativeHumidity *)realloc(output->data, allocation_size); + (sensor_msgs__msg__RelativeHumidity *)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 (!sensor_msgs__msg__RelativeHumidity__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__RelativeHumidity__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; ) { - sensor_msgs__msg__RelativeHumidity__fini(&data[i]); + sensor_msgs__msg__RelativeHumidity__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h index 04fc3ac37..2485b3f47 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__RelativeHumidity( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__RelativeHumidity( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp index 3155095d3..8b650873f 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_RelativeHumidity( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.h new file mode 100644 index 000000000..d40e64979 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.h @@ -0,0 +1,58 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from sensor_msgs:msg/RelativeHumidity.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ +#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" + +/// Struct defined in msg/RelativeHumidity in the package sensor_msgs. +/** + * Single reading from a relative humidity sensor. + * Defines the ratio of partial pressure of water vapor to the saturated vapor + * pressure at a temperature. + */ +typedef struct sensor_msgs__msg__RelativeHumidity +{ + /// timestamp of the measurement + /// frame_id is the location of the humidity sensor + std_msgs__msg__Header header; + /// Expression of the relative humidity + /// from 0.0 to 1.0. + /// 0.0 is no partial pressure of water vapor + /// 1.0 represents partial pressure of saturation + double relative_humidity; + /// 0 is interpreted as variance unknown + double variance; +} sensor_msgs__msg__RelativeHumidity; + +// Struct for a sequence of sensor_msgs__msg__RelativeHumidity. +typedef struct sensor_msgs__msg__RelativeHumidity__Sequence +{ + sensor_msgs__msg__RelativeHumidity * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} sensor_msgs__msg__RelativeHumidity__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_H_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.hpp index 274bffdc5..b31343243 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__traits.hpp new file mode 100644 index 000000000..602ed8cb3 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__traits.hpp @@ -0,0 +1,146 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/RelativeHumidity.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/relative_humidity__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const RelativeHumidity & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: relative_humidity + { + out << "relative_humidity: "; + rosidl_generator_traits::value_to_yaml(msg.relative_humidity, out); + out << ", "; + } + + // member: variance + { + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const RelativeHumidity & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: relative_humidity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "relative_humidity: "; + rosidl_generator_traits::value_to_yaml(msg.relative_humidity, out); + out << "\n"; + } + + // member: variance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const RelativeHumidity & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::RelativeHumidity & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::RelativeHumidity & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::RelativeHumidity"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/RelativeHumidity"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.c new file mode 100644 index 000000000..73761d670 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.c @@ -0,0 +1,125 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/RelativeHumidity.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/relative_humidity__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/relative_humidity__functions.h" +#include "sensor_msgs/msg/detail/relative_humidity__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_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; + sensor_msgs__msg__RelativeHumidity__init(message_memory); +} + +void sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_fini_function(void * message_memory) +{ + sensor_msgs__msg__RelativeHumidity__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__RelativeHumidity, header), // 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 + }, + { + "relative_humidity", // 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(sensor_msgs__msg__RelativeHumidity, relative_humidity), // 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 + }, + { + "variance", // 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(sensor_msgs__msg__RelativeHumidity, variance), // 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 sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_members = { + "sensor_msgs__msg", // message namespace + "RelativeHumidity", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__RelativeHumidity), + sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array, // message members + sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_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 sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle = { + 0, + &sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RelativeHumidity)() { + sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__RelativeHumidity__rosidl_typesupport_introspection_c__RelativeHumidity_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.cpp index 6c74ef492..91b950a82 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RelativeHumid 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RelativeHumid 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember RelativeHumid 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/relative_humidity__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.hpp new file mode 100644 index 000000000..70844673f --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/relative_humidity__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/RelativeHumidity.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + RelativeHumidity +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__builder.hpp index 420eff08d..2fee804f0 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/temperature__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/temperature__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__functions.c index 20c6cb51d..dd66813b8 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__functions.c @@ -232,22 +232,27 @@ sensor_msgs__msg__Temperature__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__Temperature); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__Temperature * data = - (sensor_msgs__msg__Temperature *)realloc(output->data, allocation_size); + (sensor_msgs__msg__Temperature *)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 (!sensor_msgs__msg__Temperature__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__Temperature__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; ) { - sensor_msgs__msg__Temperature__fini(&data[i]); + sensor_msgs__msg__Temperature__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h index d9bb23e1d..c97d18704 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__Temperature( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__Temperature( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp index 5293171f3..cbd7eccab 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_Temperature( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.h similarity index 77% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.h index 442d0106a..e319178d3 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.h @@ -21,11 +21,18 @@ extern "C" // Member 'header' #include "std_msgs/msg/detail/header__struct.h" -// Struct defined in msg/Temperature in the package sensor_msgs. +/// Struct defined in msg/Temperature in the package sensor_msgs. +/** + * Single temperature reading. + */ typedef struct sensor_msgs__msg__Temperature { + /// timestamp is the time the temperature was measured + /// frame_id is the location of the temperature reading std_msgs__msg__Header header; + /// Measurement of the Temperature in Degrees Celsius. double temperature; + /// 0 is interpreted as variance unknown. double variance; } sensor_msgs__msg__Temperature; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.hpp index 29ffbd49d..b2ed4ad49 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__traits.hpp new file mode 100644 index 000000000..29751558f --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__traits.hpp @@ -0,0 +1,146 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/Temperature.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/temperature__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Temperature & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: temperature + { + out << "temperature: "; + rosidl_generator_traits::value_to_yaml(msg.temperature, out); + out << ", "; + } + + // member: variance + { + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Temperature & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: temperature + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "temperature: "; + rosidl_generator_traits::value_to_yaml(msg.temperature, out); + out << "\n"; + } + + // member: variance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "variance: "; + rosidl_generator_traits::value_to_yaml(msg.variance, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Temperature & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::Temperature & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::Temperature & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::Temperature"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/Temperature"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.c new file mode 100644 index 000000000..ec049995c --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.c @@ -0,0 +1,125 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/Temperature.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/temperature__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/temperature__functions.h" +#include "sensor_msgs/msg/detail/temperature__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_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; + sensor_msgs__msg__Temperature__init(message_memory); +} + +void sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_fini_function(void * message_memory) +{ + sensor_msgs__msg__Temperature__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__Temperature, header), // 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 + }, + { + "temperature", // 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(sensor_msgs__msg__Temperature, temperature), // 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 + }, + { + "variance", // 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(sensor_msgs__msg__Temperature, variance), // 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 sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_members = { + "sensor_msgs__msg", // message namespace + "Temperature", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__Temperature), + sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array, // message members + sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_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 sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle = { + 0, + &sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Temperature)() { + sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + if (!sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__Temperature__rosidl_typesupport_introspection_c__Temperature_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.cpp index cd98053b9..80ea324ef 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Temperature_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Temperature_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Temperature_m 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/temperature__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.hpp new file mode 100644 index 000000000..c232100df --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/temperature__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/Temperature.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + Temperature +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__TEMPERATURE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__builder.hpp index c0de97e20..42be9d100 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__BUILDER_HPP_ #define SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__BUILDER_HPP_ -#include "sensor_msgs/msg/detail/time_reference__struct.hpp" -#include #include #include +#include "sensor_msgs/msg/detail/time_reference__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__functions.c similarity index 92% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__functions.c index c865857fd..23f3bebda 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__functions.c @@ -258,22 +258,27 @@ sensor_msgs__msg__TimeReference__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__msg__TimeReference); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__msg__TimeReference * data = - (sensor_msgs__msg__TimeReference *)realloc(output->data, allocation_size); + (sensor_msgs__msg__TimeReference *)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 (!sensor_msgs__msg__TimeReference__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__msg__TimeReference__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; ) { - sensor_msgs__msg__TimeReference__fini(&data[i]); + sensor_msgs__msg__TimeReference__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h index 67ee97689..d9d03f98e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__msg__TimeReference( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__msg__TimeReference( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp index 2f00ea5aa..be8357e11 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_TimeReference( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.h similarity index 78% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.h index e6053f157..4bf7f1b33 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.h @@ -25,11 +25,18 @@ extern "C" // Member 'source' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/TimeReference in the package sensor_msgs. +/// Struct defined in msg/TimeReference in the package sensor_msgs. +/** + * Measurement from an external time source not actively synchronized with the system clock. + */ typedef struct sensor_msgs__msg__TimeReference { + /// stamp is system time for which measurement was valid + /// frame_id is not used std_msgs__msg__Header header; + /// corresponding time from this external source builtin_interfaces__msg__Time time_ref; + /// (optional) name of time source rosidl_runtime_c__String source; } sensor_msgs__msg__TimeReference; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.hpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.hpp index 82f2a98f8..3cd8151af 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__STRUCT_HPP_ #define SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -69,7 +70,7 @@ struct TimeReference_ builtin_interfaces::msg::Time_; _time_ref_type time_ref; using _source_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _source_type source; // setters for named parameter idiom @@ -86,7 +87,7 @@ struct TimeReference_ return *this; } Type & set__source( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->source = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__traits.hpp new file mode 100644 index 000000000..9187b177b --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__traits.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:msg/TimeReference.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/msg/detail/time_reference__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'time_ref' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace sensor_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TimeReference & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: time_ref + { + out << "time_ref: "; + to_flow_style_yaml(msg.time_ref, out); + out << ", "; + } + + // member: source + { + out << "source: "; + rosidl_generator_traits::value_to_yaml(msg.source, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TimeReference & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: time_ref + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time_ref:\n"; + to_block_style_yaml(msg.time_ref, out, indentation + 2); + } + + // member: source + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "source: "; + rosidl_generator_traits::value_to_yaml(msg.source, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TimeReference & 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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::msg::TimeReference & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::msg::TimeReference & msg) +{ + return sensor_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::msg::TimeReference"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/msg/TimeReference"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.c new file mode 100644 index 000000000..2682cff3f --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.c @@ -0,0 +1,133 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:msg/TimeReference.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/msg/detail/time_reference__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/msg/detail/time_reference__functions.h" +#include "sensor_msgs/msg/detail/time_reference__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `time_ref` +#include "builtin_interfaces/msg/time.h" +// Member `time_ref` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `source` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_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; + sensor_msgs__msg__TimeReference__init(message_memory); +} + +void sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_fini_function(void * message_memory) +{ + sensor_msgs__msg__TimeReference__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[3] = { + { + "header", // 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(sensor_msgs__msg__TimeReference, header), // 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 + }, + { + "time_ref", // 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(sensor_msgs__msg__TimeReference, time_ref), // 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 + }, + { + "source", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__msg__TimeReference, source), // 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 sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_members = { + "sensor_msgs__msg", // message namespace + "TimeReference", // message name + 3, // number of fields + sizeof(sensor_msgs__msg__TimeReference), + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array, // message members + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_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 sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle = { + 0, + &sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, TimeReference)() { + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle.typesupport_identifier) { + sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__msg__TimeReference__rosidl_typesupport_introspection_c__TimeReference_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.cpp index 76a43f43f..bf991b286 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TimeReference 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TimeReference 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TimeReference 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/detail/time_reference__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.hpp new file mode 100644 index 000000000..18116aca7 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/detail/time_reference__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:msg/TimeReference.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + msg, + TimeReference +)(); +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__DETAIL__TIME_REFERENCE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/fluid_pressure.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/fluid_pressure.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/fluid_pressure.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/fluid_pressure.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/fluid_pressure.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/fluid_pressure.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/fluid_pressure.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/fluid_pressure.hpp index 24dc6d799..25637a16e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/fluid_pressure.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/fluid_pressure.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/fluid_pressure__struct.hpp" #include "sensor_msgs/msg/detail/fluid_pressure__builder.hpp" #include "sensor_msgs/msg/detail/fluid_pressure__traits.hpp" +#include "sensor_msgs/msg/detail/fluid_pressure__type_support.hpp" #endif // SENSOR_MSGS__MSG__FLUID_PRESSURE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/illuminance.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/illuminance.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/illuminance.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/illuminance.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/illuminance.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/illuminance.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/illuminance.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/illuminance.hpp index 10bf618bc..1eea71a8e 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/illuminance.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/illuminance.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/illuminance__struct.hpp" #include "sensor_msgs/msg/detail/illuminance__builder.hpp" #include "sensor_msgs/msg/detail/illuminance__traits.hpp" +#include "sensor_msgs/msg/detail/illuminance__type_support.hpp" #endif // SENSOR_MSGS__MSG__ILLUMINANCE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/image.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/image.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/image.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/image.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/image.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/image.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/image.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/image.hpp index 4d26aa3f2..380fa7586 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/image.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/image.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/image__struct.hpp" #include "sensor_msgs/msg/detail/image__builder.hpp" #include "sensor_msgs/msg/detail/image__traits.hpp" +#include "sensor_msgs/msg/detail/image__type_support.hpp" #endif // SENSOR_MSGS__MSG__IMAGE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/imu.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/imu.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/imu.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/imu.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/imu.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/imu.hpp similarity index 87% rename from ThirdParty/ros/include/sensor_msgs/msg/imu.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/imu.hpp index c91c15156..391ee17b1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/imu.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/imu.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/imu__struct.hpp" #include "sensor_msgs/msg/detail/imu__builder.hpp" #include "sensor_msgs/msg/detail/imu__traits.hpp" +#include "sensor_msgs/msg/detail/imu__type_support.hpp" #endif // SENSOR_MSGS__MSG__IMU_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joint_state.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joint_state.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/joint_state.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joint_state.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joint_state.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joint_state.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/joint_state.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joint_state.hpp index 617b52105..1f410f2e6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/joint_state.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joint_state.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/joint_state__struct.hpp" #include "sensor_msgs/msg/detail/joint_state__builder.hpp" #include "sensor_msgs/msg/detail/joint_state__traits.hpp" +#include "sensor_msgs/msg/detail/joint_state__type_support.hpp" #endif // SENSOR_MSGS__MSG__JOINT_STATE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/joy.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy.hpp similarity index 87% rename from ThirdParty/ros/include/sensor_msgs/msg/joy.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy.hpp index 592443fc4..113079f91 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/joy.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/joy__struct.hpp" #include "sensor_msgs/msg/detail/joy__builder.hpp" #include "sensor_msgs/msg/detail/joy__traits.hpp" +#include "sensor_msgs/msg/detail/joy__type_support.hpp" #endif // SENSOR_MSGS__MSG__JOY_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/joy_feedback.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/joy_feedback.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback.hpp index 12074735a..171a32207 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/joy_feedback__struct.hpp" #include "sensor_msgs/msg/detail/joy_feedback__builder.hpp" #include "sensor_msgs/msg/detail/joy_feedback__traits.hpp" +#include "sensor_msgs/msg/detail/joy_feedback__type_support.hpp" #endif // SENSOR_MSGS__MSG__JOY_FEEDBACK_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback_array.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback_array.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/joy_feedback_array.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback_array.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback_array.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback_array.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/joy_feedback_array.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback_array.hpp index 5a5410e14..535525fe6 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/joy_feedback_array.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/joy_feedback_array.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/joy_feedback_array__struct.hpp" #include "sensor_msgs/msg/detail/joy_feedback_array__builder.hpp" #include "sensor_msgs/msg/detail/joy_feedback_array__traits.hpp" +#include "sensor_msgs/msg/detail/joy_feedback_array__type_support.hpp" #endif // SENSOR_MSGS__MSG__JOY_FEEDBACK_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/laser_echo.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_echo.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/laser_echo.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_echo.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/laser_echo.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_echo.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/laser_echo.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_echo.hpp index 9cc5e6bab..d7b140481 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/laser_echo.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_echo.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/laser_echo__struct.hpp" #include "sensor_msgs/msg/detail/laser_echo__builder.hpp" #include "sensor_msgs/msg/detail/laser_echo__traits.hpp" +#include "sensor_msgs/msg/detail/laser_echo__type_support.hpp" #endif // SENSOR_MSGS__MSG__LASER_ECHO_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/laser_scan.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_scan.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/laser_scan.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_scan.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/laser_scan.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_scan.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/laser_scan.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_scan.hpp index b28e51d6b..f07c29291 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/laser_scan.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/laser_scan.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/laser_scan__struct.hpp" #include "sensor_msgs/msg/detail/laser_scan__builder.hpp" #include "sensor_msgs/msg/detail/laser_scan__traits.hpp" +#include "sensor_msgs/msg/detail/laser_scan__type_support.hpp" #endif // SENSOR_MSGS__MSG__LASER_SCAN_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/magnetic_field.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/magnetic_field.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/magnetic_field.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/magnetic_field.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/magnetic_field.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/magnetic_field.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/magnetic_field.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/magnetic_field.hpp index ad61d381b..c4b36e6d1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/magnetic_field.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/magnetic_field.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/magnetic_field__struct.hpp" #include "sensor_msgs/msg/detail/magnetic_field__builder.hpp" #include "sensor_msgs/msg/detail/magnetic_field__traits.hpp" +#include "sensor_msgs/msg/detail/magnetic_field__type_support.hpp" #endif // SENSOR_MSGS__MSG__MAGNETIC_FIELD_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/multi_dof_joint_state.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_dof_joint_state.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/multi_dof_joint_state.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_dof_joint_state.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/multi_dof_joint_state.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_dof_joint_state.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/multi_dof_joint_state.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_dof_joint_state.hpp index 894e87e5c..7a010a403 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/multi_dof_joint_state.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_dof_joint_state.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/multi_dof_joint_state__struct.hpp" #include "sensor_msgs/msg/detail/multi_dof_joint_state__builder.hpp" #include "sensor_msgs/msg/detail/multi_dof_joint_state__traits.hpp" +#include "sensor_msgs/msg/detail/multi_dof_joint_state__type_support.hpp" #endif // SENSOR_MSGS__MSG__MULTI_DOF_JOINT_STATE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/multi_echo_laser_scan.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_echo_laser_scan.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/multi_echo_laser_scan.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_echo_laser_scan.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/multi_echo_laser_scan.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_echo_laser_scan.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/multi_echo_laser_scan.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_echo_laser_scan.hpp index 976b139e6..c0e34eca3 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/multi_echo_laser_scan.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/multi_echo_laser_scan.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/multi_echo_laser_scan__struct.hpp" #include "sensor_msgs/msg/detail/multi_echo_laser_scan__builder.hpp" #include "sensor_msgs/msg/detail/multi_echo_laser_scan__traits.hpp" +#include "sensor_msgs/msg/detail/multi_echo_laser_scan__type_support.hpp" #endif // SENSOR_MSGS__MSG__MULTI_ECHO_LASER_SCAN_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_fix.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_fix.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/nav_sat_fix.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_fix.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_fix.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_fix.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/nav_sat_fix.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_fix.hpp index 651ad5d84..6e53797ae 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_fix.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_fix.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/nav_sat_fix__struct.hpp" #include "sensor_msgs/msg/detail/nav_sat_fix__builder.hpp" #include "sensor_msgs/msg/detail/nav_sat_fix__traits.hpp" +#include "sensor_msgs/msg/detail/nav_sat_fix__type_support.hpp" #endif // SENSOR_MSGS__MSG__NAV_SAT_FIX_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_status.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_status.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/nav_sat_status.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_status.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_status.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_status.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/nav_sat_status.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_status.hpp index cb4656de7..ff6557126 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/nav_sat_status.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/nav_sat_status.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/nav_sat_status__struct.hpp" #include "sensor_msgs/msg/detail/nav_sat_status__builder.hpp" #include "sensor_msgs/msg/detail/nav_sat_status__traits.hpp" +#include "sensor_msgs/msg/detail/nav_sat_status__type_support.hpp" #endif // SENSOR_MSGS__MSG__NAV_SAT_STATUS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/point_cloud.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/point_cloud.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud.hpp index 01d7fae94..3e716fb70 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/point_cloud__struct.hpp" #include "sensor_msgs/msg/detail/point_cloud__builder.hpp" #include "sensor_msgs/msg/detail/point_cloud__traits.hpp" +#include "sensor_msgs/msg/detail/point_cloud__type_support.hpp" #endif // SENSOR_MSGS__MSG__POINT_CLOUD_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud2.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud2.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/point_cloud2.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud2.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud2.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud2.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/point_cloud2.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud2.hpp index 8a8315d87..cf5982dc7 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/point_cloud2.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_cloud2.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/point_cloud2__struct.hpp" #include "sensor_msgs/msg/detail/point_cloud2__builder.hpp" #include "sensor_msgs/msg/detail/point_cloud2__traits.hpp" +#include "sensor_msgs/msg/detail/point_cloud2__type_support.hpp" #endif // SENSOR_MSGS__MSG__POINT_CLOUD2_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_field.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_field.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/point_field.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_field.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/point_field.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_field.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/point_field.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_field.hpp index cb0f47f8d..9118b4525 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/point_field.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/point_field.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/point_field__struct.hpp" #include "sensor_msgs/msg/detail/point_field__builder.hpp" #include "sensor_msgs/msg/detail/point_field__traits.hpp" +#include "sensor_msgs/msg/detail/point_field__type_support.hpp" #endif // SENSOR_MSGS__MSG__POINT_FIELD_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/range.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/range.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/range.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/range.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/range.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/range.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/range.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/range.hpp index ba947155d..549064204 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/range.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/range.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/range__struct.hpp" #include "sensor_msgs/msg/detail/range__builder.hpp" #include "sensor_msgs/msg/detail/range__traits.hpp" +#include "sensor_msgs/msg/detail/range__type_support.hpp" #endif // SENSOR_MSGS__MSG__RANGE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/region_of_interest.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/region_of_interest.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/region_of_interest.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/region_of_interest.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/region_of_interest.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/region_of_interest.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/region_of_interest.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/region_of_interest.hpp index 57e36517f..d43d6ccdd 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/region_of_interest.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/region_of_interest.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/region_of_interest__struct.hpp" #include "sensor_msgs/msg/detail/region_of_interest__builder.hpp" #include "sensor_msgs/msg/detail/region_of_interest__traits.hpp" +#include "sensor_msgs/msg/detail/region_of_interest__type_support.hpp" #endif // SENSOR_MSGS__MSG__REGION_OF_INTEREST_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/relative_humidity.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/relative_humidity.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/relative_humidity.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/relative_humidity.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/relative_humidity.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/relative_humidity.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/relative_humidity.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/relative_humidity.hpp index 45f7ff6df..fc3a1f2f4 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/relative_humidity.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/relative_humidity.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/relative_humidity__struct.hpp" #include "sensor_msgs/msg/detail/relative_humidity__builder.hpp" #include "sensor_msgs/msg/detail/relative_humidity__traits.hpp" +#include "sensor_msgs/msg/detail/relative_humidity__type_support.hpp" #endif // SENSOR_MSGS__MSG__RELATIVE_HUMIDITY_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..ce530bc03 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 SENSOR_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define SENSOR_MSGS__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_sensor_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_sensor_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_sensor_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_sensor_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_sensor_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_sensor_msgs ROSIDL_GENERATOR_CPP_EXPORT_sensor_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_sensor_msgs ROSIDL_GENERATOR_CPP_IMPORT_sensor_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_sensor_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_sensor_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_sensor_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_sensor_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // SENSOR_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/temperature.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/temperature.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/temperature.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/temperature.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/temperature.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/temperature.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/temperature.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/temperature.hpp index 210a76cb2..ed82e24a4 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/temperature.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/temperature.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/temperature__struct.hpp" #include "sensor_msgs/msg/detail/temperature__builder.hpp" #include "sensor_msgs/msg/detail/temperature__traits.hpp" +#include "sensor_msgs/msg/detail/temperature__type_support.hpp" #endif // SENSOR_MSGS__MSG__TEMPERATURE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/msg/time_reference.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/time_reference.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/msg/time_reference.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/time_reference.h diff --git a/ThirdParty/ros/include/sensor_msgs/msg/time_reference.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/time_reference.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/msg/time_reference.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/time_reference.hpp index ca2de1002..12846baf1 100644 --- a/ThirdParty/ros/include/sensor_msgs/msg/time_reference.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/msg/time_reference.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/msg/detail/time_reference__struct.hpp" #include "sensor_msgs/msg/detail/time_reference__builder.hpp" #include "sensor_msgs/msg/detail/time_reference__traits.hpp" +#include "sensor_msgs/msg/detail/time_reference__type_support.hpp" #endif // SENSOR_MSGS__MSG__TIME_REFERENCE_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud2_iterator.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud2_iterator.hpp new file mode 100644 index 000000000..c691dfe79 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud2_iterator.hpp @@ -0,0 +1,331 @@ +// Copyright (c) 2013, Open Source Robotics Foundation, Inc. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// This file is originally from: +// https://github.com/ros/common_msgs/blob/275b09a/sensor_msgs/include/sensor_msgs/point_cloud2_iterator.h + +#ifndef SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ +#define SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ + +#include +#include +#include +#include + +/** + * @brief Tools for manipulating sensor_msgs + * + * This file provides two sets of utilities to modify and parse PointCloud2 + * The first set allows you to conveniently set the fields by hand: + * + * @verbatim + * #include + * // Create a PointCloud2 + * sensor_msgs::msg::PointCloud2 cloud_msg; + * // Fill some internals of the PoinCloud2 like the header/width/height ... + * cloud_msgs.height = 1; cloud_msgs.width = 4; + * // Set the point fields to xyzrgb and resize the vector with the following command + * // 4 is for the number of added fields. Each come in triplet: the name of the PointField, + * // the number of occurrences of the type in the PointField, the type of the PointField + * sensor_msgs::msg::PointCloud2Modifier modifier(cloud_msg); + * modifier.setPointCloud2Fields(4, "x", 1, sensor_msgs::msg::PointField::FLOAT32, + * "y", 1, sensor_msgs::msg::PointField::FLOAT32, + * "z", 1, sensor_msgs::msg::PointField::FLOAT32, + * "rgb", 1, sensor_msgs::msg::PointField::FLOAT32); + * // For convenience and the xyz, rgb, rgba fields, you can also use the following overloaded function. + * // You have to be aware that the following function does add extra padding for backward compatibility though + * // so it is definitely the solution of choice for PointXYZ and PointXYZRGB + * // 2 is for the number of fields to add + * modifier.setPointCloud2FieldsByString(2, "xyz", "rgb"); + * // You can then reserve / resize as usual + * modifier.resize(100); + * @endverbatim + * + * The second set allows you to traverse your PointCloud using an iterator: + * + * @verbatim + * // Define some raw data we'll put in the PointCloud2 + * float point_data[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0}; + * uint8_t color_data[] = {40, 80, 120, 160, 200, 240, 20, 40, 60, 80, 100, 120}; + * // Define the iterators. When doing so, you define the Field you would like to iterate upon and + * // the type of you would like returned: it is not necessary the type of the PointField as sometimes + * // you pack data in another type (e.g. 3 uchar + 1 uchar for RGB are packed in a float) + * sensor_msgs::PointCloud2Iterator iter_x(cloud_msg, "x"); + * sensor_msgs::PointCloud2Iterator iter_y(cloud_msg, "y"); + * sensor_msgs::PointCloud2Iterator iter_z(cloud_msg, "z"); + * // Even though the r,g,b,a fields do not exist (it's usually rgb, rgba), you can create iterators for + * // those: they will handle data packing for you (in little endian RGB is packed as \*,R,G,B in a float + * // and RGBA as A,R,G,B) + * sensor_msgs::PointCloud2Iterator iter_r(cloud_msg, "r"); + * sensor_msgs::PointCloud2Iterator iter_g(cloud_msg, "g"); + * sensor_msgs::PointCloud2Iterator iter_b(cloud_msg, "b"); + * // Fill the PointCloud2 + * for(size_t i=0; i class V> +class PointCloud2IteratorBase +{ +public: + /** + */ + PointCloud2IteratorBase(); + + /** + * @param cloud_msg The PointCloud2 to iterate upon + * @param field_name The field to iterate upon + */ + PointCloud2IteratorBase(C & cloud_msg, const std::string & field_name); + + /** Assignment operator + * @param iter the iterator to copy data from + * @return a reference to *this + */ + V & operator=(const V & iter); + + /** Access the i th element starting at the current pointer (useful when a field has several elements of the same + * type) + * @param i + * @return a reference to the i^th value from the current position + */ + TT & operator[](size_t i) const; + + /** Dereference the iterator. Equivalent to accessing it through [0] + * @return the value to which the iterator is pointing + */ + TT & operator*() const; + + /** Increase the iterator to the next element + * @return a reference to the updated iterator + */ + V & operator++(); + + /** Basic pointer addition + * @param i the amount to increase the iterator by + * @return an iterator with an increased position + */ + V operator+(int i); + + /** Increase the iterator by a certain amount + * @return a reference to the updated iterator + */ + V & operator+=(int i); + + /** Compare to another iterator + * @return whether the current iterator points to a different address than the other one + */ + bool operator!=(const V & iter) const; + + /** Return the end iterator + * @return the end iterator (useful when performing normal iterator processing with ++) + */ + V end() const; + +private: + /** Common code to set the field of the PointCloud2 + * @param cloud_msg the PointCloud2 to modify + * @param field_name the name of the field to iterate upon + * @return the offset at which the field is found + */ + int set_field(const sensor_msgs::msg::PointCloud2 & cloud_msg, const std::string & field_name); + + /** The "point_step" of the original cloud */ + int point_step_; + /** The raw data in uchar* where the iterator is */ + U * data_char_; + /** The cast data where the iterator is */ + TT * data_; + /** The end() pointer of the iterator */ + TT * data_end_; + /** Whether the fields are stored as bigendian */ + bool is_bigendian_; +}; +} // namespace impl + +/** + * @brief Class that can iterate over a PointCloud2 + * + * T type of the element being iterated upon + * E.g, you create your PointClou2 message as follows: + * @verbatim + * setPointCloud2FieldsByString(cloud_msg, 2, "xyz", "rgb"); + * @endverbatim + * + * For iterating over XYZ, you do : + * @verbatim + * sensor_msgs::msg::PointCloud2Iterator iter_x(cloud_msg, "x"); + * @endverbatim + * and then access X through iter_x[0] or *iter_x + * You could create an iterator for Y and Z too but as they are consecutive, + * you can just use iter_x[1] and iter_x[2] + * + * For iterating over RGB, you do: + * @verbatim + * sensor_msgs::msg::PointCloud2Iterator iter_rgb(cloud_msg, "rgb"); + * @endverbatim + * and then access R,G,B through iter_rgb[0], iter_rgb[1], iter_rgb[2] + */ +template +class PointCloud2Iterator + : public impl::PointCloud2IteratorBase< + T, T, unsigned char, sensor_msgs::msg::PointCloud2, PointCloud2Iterator> +{ +public: + /** + * @brief Construct a new PointCloud2Const iterator based on a cloud message. + * + * @param cloud_msg the cloud message to use + * @param field_name the field to iterate over + */ + PointCloud2Iterator( + sensor_msgs::msg::PointCloud2 & cloud_msg, + const std::string & field_name) + : impl::PointCloud2IteratorBase< + T, T, unsigned char, + sensor_msgs::msg::PointCloud2, + sensor_msgs::PointCloud2Iterator + >::PointCloud2IteratorBase(cloud_msg, field_name) {} +}; + +/** + * @brief Same as a PointCloud2Iterator but for const data + */ +template +class PointCloud2ConstIterator + : public impl::PointCloud2IteratorBase< + T, const T, const unsigned char, const sensor_msgs::msg::PointCloud2, + PointCloud2ConstIterator> +{ +public: + /** + * @brief Construct a new PointCloud2Const iterator based on a cloud message. + * + * @param cloud_msg the cloud message to use + * @param field_name the field to iterate over + */ + PointCloud2ConstIterator( + const sensor_msgs::msg::PointCloud2 & cloud_msg, + const std::string & field_name) + : impl::PointCloud2IteratorBase< + T, const T, const unsigned char, + const sensor_msgs::msg::PointCloud2, + sensor_msgs::PointCloud2ConstIterator + >::PointCloud2IteratorBase(cloud_msg, field_name) {} +}; +} // namespace sensor_msgs + +#include // NOLINT + +#endif // SENSOR_MSGS__POINT_CLOUD2_ITERATOR_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/point_cloud_conversion.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud_conversion.hpp similarity index 83% rename from ThirdParty/ros/include/sensor_msgs/point_cloud_conversion.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud_conversion.hpp index 628e040bb..ec55646b6 100644 --- a/ThirdParty/ros/include/sensor_msgs/point_cloud_conversion.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_cloud_conversion.hpp @@ -1,33 +1,29 @@ // Copyright (c) 2010, Willow Garage -// All rights reserved. -// -// Software License Agreement (BSD License 2.0) // // Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. // -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. // -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // this file is originally ported from ROS1: @@ -60,7 +56,7 @@ namespace sensor_msgs { ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** \brief Get the index of a specified field (i.e., dimension/channel) - * \param points the the point cloud message + * \param cloud the the point cloud message * \param field_name the string defining the field name */ static inline int getPointCloud2FieldIndex( diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_field_conversion.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_field_conversion.hpp new file mode 100644 index 000000000..d61f5fe72 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/point_field_conversion.hpp @@ -0,0 +1,219 @@ +// Copyright (c) 2015, University of Osnabrück +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +// Created on: 16.07.2015 +// Authors: Sebastian Pütz +// this file is originally ported from ROS1: +// https://raw.githubusercontent.com/ros/common_msgs/ef18af000759bf15c7ea036356dbdce631c75577/sensor_msgs/include/sensor_msgs/point_field_conversion.h +// +#ifndef SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ +#define SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ + +#include +#include + +/** + * \brief This file provides a type to enum mapping for the different + * PointField types and methods to read and write in + * a PointCloud2 buffer for the different PointField types. + * \author Sebastian Pütz + */ +namespace sensor_msgs +{ +/** + * \brief Enum to type mapping. + */ +template +struct pointFieldTypeAsType {}; +/** \brief Concrete templatization of Enum to type for INT8 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for INT8 -> int8_t */ + typedef int8_t type; +}; +/** \brief Concrete templatization of Enum to type for UINT8 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for UINT8 -> uint8_t */ + typedef uint8_t type; +}; +/** \brief Concrete templatization of Enum to type for INT16 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for INT16 -> int16_t */ + typedef int16_t type; +}; +/** \brief Concrete templatization of Enum to type for UINT16 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for UINT16 -> uint16_t */ + typedef uint16_t type; +}; +/** \brief Concrete templatization of Enum to type for INT32 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for INT32 -> int32_t */ + typedef int32_t type; +}; +/** \brief Concrete templatization of Enum to type for UINT32 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for UINT32 -> uint32_t */ + typedef uint32_t type; +}; +/** \brief Concrete templatization of Enum to type for FLOAT32 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for FLOAT32 -> float */ + typedef float type; +}; +/** \brief Concrete templatization of Enum to type for FLOAT64 */ +template<> +struct pointFieldTypeAsType +{ + /** Enum to type for FLOAT64 -> double */ + typedef double type; +}; + +/** + * \brief Type to enum mapping. + */ +template +struct typeAsPointFieldType {}; +/** \brief Concrete templatization of type to enum for int8_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for int8_t -> INT8 */ + static const uint8_t value = sensor_msgs::msg::PointField::INT8; +}; +/** \brief Concrete templatization of type to enum for uint8_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for uint8_t -> UINT8 */ + static const uint8_t value = sensor_msgs::msg::PointField::UINT8; +}; +/** \brief Concrete templatization of type to enum for int16_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for int16_t -> INT16 */ + static const uint8_t value = sensor_msgs::msg::PointField::INT16; +}; +/** \brief Concrete templatization of type to enum for uint16_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for uint16_t -> UINT16 */ + static const uint8_t value = sensor_msgs::msg::PointField::UINT16; +}; +/** \brief Concrete templatization of type to enum for int32_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for int32_t -> INT32 */ + static const uint8_t value = sensor_msgs::msg::PointField::INT32; +}; +/** \brief Concrete templatization of type to enum for uint32_t */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for uint32_t -> UINT32 */ + static const uint8_t value = sensor_msgs::msg::PointField::UINT32; +}; +/** \brief Concrete templatization of type to enum for float */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for float -> FLOAT32 */ + static const uint8_t value = sensor_msgs::msg::PointField::FLOAT32; +}; +/** \brief Concrete templatization of type to enum for double */ +template<> +struct typeAsPointFieldType +{ + /** Type to enum for double -> FLOAT64 */ + static const uint8_t value = sensor_msgs::msg::PointField::FLOAT64; +}; + +/** + * \brief Converts a value at the given pointer position, interpreted as the datatype + * specified by the given template argument point_field_type, to the given + * template type T and returns it. + * \param data_ptr pointer into the point cloud 2 buffer + * \tparam point_field_type sensor_msgs::PointField datatype value + * \tparam T return type + */ +template +inline T readPointCloud2BufferValue(const unsigned char * data_ptr) +{ + typedef typename pointFieldTypeAsType::type type; + return static_cast(*(reinterpret_cast(data_ptr))); +} + +/** + * \brief Converts a value at the given pointer position interpreted as the datatype + * specified by the given datatype parameter to the given template type and returns it. + * \param data_ptr pointer into the point cloud 2 buffer + * \param datatype sensor_msgs::PointField datatype value + * \tparam T return type + */ +template +inline T readPointCloud2BufferValue(const unsigned char * data_ptr, const unsigned char datatype) +{ + switch (datatype) { + case sensor_msgs::msg::PointField::INT8: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::UINT8: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::INT16: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::UINT16: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::INT32: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::UINT32: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::FLOAT32: + return readPointCloud2BufferValue(data_ptr); + case sensor_msgs::msg::PointField::FLOAT64: + return readPointCloud2BufferValue(data_ptr); + } + // This should never be reached, but return statement added to avoid compiler warning. (#84) + return T(); +} +} // namespace sensor_msgs +#endif // SENSOR_MSGS__POINT_FIELD_CONVERSION_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__builder.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__builder.hpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__builder.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__builder.hpp index 7d29398eb..7e4d9dd92 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__builder.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__builder.hpp @@ -5,11 +5,12 @@ #ifndef SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__BUILDER_HPP_ #define SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__BUILDER_HPP_ -#include "sensor_msgs/srv/detail/set_camera_info__struct.hpp" -#include #include #include +#include "sensor_msgs/srv/detail/set_camera_info__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace sensor_msgs { diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__functions.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__functions.c similarity index 91% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__functions.c rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__functions.c index 83722cbbf..3bb916c54 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__functions.c +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__functions.c @@ -215,22 +215,27 @@ sensor_msgs__srv__SetCameraInfo_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__srv__SetCameraInfo_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__srv__SetCameraInfo_Request * data = - (sensor_msgs__srv__SetCameraInfo_Request *)realloc(output->data, allocation_size); + (sensor_msgs__srv__SetCameraInfo_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 (!sensor_msgs__srv__SetCameraInfo_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__srv__SetCameraInfo_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; ) { - sensor_msgs__srv__SetCameraInfo_Request__fini(&data[i]); + sensor_msgs__srv__SetCameraInfo_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -458,22 +463,27 @@ sensor_msgs__srv__SetCameraInfo_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(sensor_msgs__srv__SetCameraInfo_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); sensor_msgs__srv__SetCameraInfo_Response * data = - (sensor_msgs__srv__SetCameraInfo_Response *)realloc(output->data, allocation_size); + (sensor_msgs__srv__SetCameraInfo_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 (!sensor_msgs__srv__SetCameraInfo_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!sensor_msgs__srv__SetCameraInfo_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; ) { - sensor_msgs__srv__SetCameraInfo_Response__fini(&data[i]); + sensor_msgs__srv__SetCameraInfo_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__functions.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__functions.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__functions.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__functions.h diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h index db971a2af..086bed41c 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_sensor_msgs__srv__SetCameraInfo_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__srv__SetCameraInfo_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_sensor_msgs__srv__SetCameraInfo_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs size_t max_serialized_size_sensor_msgs__srv__SetCameraInfo_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_sensor_msgs diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp index f9df1a662..fca30bb89 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_SetCameraInfo_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_sensor_msgs max_serialized_size_SetCameraInfo_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.h similarity index 88% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.h index fef9b86ef..0f48dad00 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.h +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.h @@ -21,9 +21,10 @@ extern "C" // Member 'camera_info' #include "sensor_msgs/msg/detail/camera_info__struct.h" -// Struct defined in srv/SetCameraInfo in the package sensor_msgs. +/// Struct defined in srv/SetCameraInfo in the package sensor_msgs. typedef struct sensor_msgs__srv__SetCameraInfo_Request { + /// The camera_info to store sensor_msgs__msg__CameraInfo camera_info; } sensor_msgs__srv__SetCameraInfo_Request; @@ -44,10 +45,12 @@ typedef struct sensor_msgs__srv__SetCameraInfo_Request__Sequence // Member 'status_message' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/SetCameraInfo in the package sensor_msgs. +/// Struct defined in srv/SetCameraInfo in the package sensor_msgs. typedef struct sensor_msgs__srv__SetCameraInfo_Response { + /// True if the call succeeded bool success; + /// Used to give details about success rosidl_runtime_c__String status_message; } sensor_msgs__srv__SetCameraInfo_Response; diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.hpp similarity index 96% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.hpp index b3bbf9ae1..fe6fcf07f 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__struct.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__struct.hpp @@ -5,14 +5,15 @@ #ifndef SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__STRUCT_HPP_ #define SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'camera_info' @@ -169,7 +170,7 @@ struct SetCameraInfo_Response_ bool; _success_type success; using _status_message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _status_message_type status_message; // setters for named parameter idiom @@ -180,7 +181,7 @@ struct SetCameraInfo_Response_ return *this; } Type & set__status_message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->status_message = _arg; return *this; diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__traits.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__traits.hpp new file mode 100644 index 000000000..507e29efa --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__traits.hpp @@ -0,0 +1,276 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from sensor_msgs:srv/SetCameraInfo.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ +#define SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "sensor_msgs/srv/detail/set_camera_info__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'camera_info' +#include "sensor_msgs/msg/detail/camera_info__traits.hpp" + +namespace sensor_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetCameraInfo_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: camera_info + { + out << "camera_info: "; + to_flow_style_yaml(msg.camera_info, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetCameraInfo_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: camera_info + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "camera_info:\n"; + to_block_style_yaml(msg.camera_info, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetCameraInfo_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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::srv::SetCameraInfo_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::srv::SetCameraInfo_Request & msg) +{ + return sensor_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::srv::SetCameraInfo_Request"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/srv/SetCameraInfo_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace sensor_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetCameraInfo_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: status_message + { + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetCameraInfo_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: status_message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetCameraInfo_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 sensor_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use sensor_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const sensor_msgs::srv::SetCameraInfo_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + sensor_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use sensor_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const sensor_msgs::srv::SetCameraInfo_Response & msg) +{ + return sensor_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "sensor_msgs::srv::SetCameraInfo_Response"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/srv/SetCameraInfo_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "sensor_msgs::srv::SetCameraInfo"; +} + +template<> +inline const char * name() +{ + return "sensor_msgs/srv/SetCameraInfo"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.c b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.c new file mode 100644 index 000000000..af2ffc138 --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.c @@ -0,0 +1,257 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from sensor_msgs:srv/SetCameraInfo.idl +// generated code does not contain a copyright notice + +#include +#include "sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h" +#include "sensor_msgs/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 "sensor_msgs/srv/detail/set_camera_info__functions.h" +#include "sensor_msgs/srv/detail/set_camera_info__struct.h" + + +// Include directives for member types +// Member `camera_info` +#include "sensor_msgs/msg/camera_info.h" +// Member `camera_info` +#include "sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_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; + sensor_msgs__srv__SetCameraInfo_Request__init(message_memory); +} + +void sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_fini_function(void * message_memory) +{ + sensor_msgs__srv__SetCameraInfo_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array[1] = { + { + "camera_info", // 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(sensor_msgs__srv__SetCameraInfo_Request, camera_info), // 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 sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_members = { + "sensor_msgs__srv", // message namespace + "SetCameraInfo_Request", // message name + 1, // number of fields + sizeof(sensor_msgs__srv__SetCameraInfo_Request), + sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array, // message members + sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_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 sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle = { + 0, + &sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Request)() { + sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CameraInfo)(); + if (!sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle.typesupport_identifier) { + sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__srv__SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h" +// already included above +// #include "sensor_msgs/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 "sensor_msgs/srv/detail/set_camera_info__functions.h" +// already included above +// #include "sensor_msgs/srv/detail/set_camera_info__struct.h" + + +// Include directives for member types +// Member `status_message` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_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; + sensor_msgs__srv__SetCameraInfo_Response__init(message_memory); +} + +void sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_fini_function(void * message_memory) +{ + sensor_msgs__srv__SetCameraInfo_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__srv__SetCameraInfo_Response, success), // 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 + }, + { + "status_message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(sensor_msgs__srv__SetCameraInfo_Response, status_message), // 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 sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_members = { + "sensor_msgs__srv", // message namespace + "SetCameraInfo_Response", // message name + 2, // number of fields + sizeof(sensor_msgs__srv__SetCameraInfo_Response), + sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_member_array, // message members + sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_init_function, // function to initialize message memory (memory has to be allocated) + sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_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 sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle = { + 0, + &sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Response)() { + if (!sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle.typesupport_identifier) { + sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &sensor_msgs__srv__SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "sensor_msgs/srv/detail/set_camera_info__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 sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_members = { + "sensor_msgs__srv", // service namespace + "SetCameraInfo", // service name + // these two fields are initialized below on the first access + NULL, // request message + // sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle, + NULL // response message + // sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle = { + 0, + &sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo)() { + if (!sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle.typesupport_identifier) { + sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_Response)()->data; + } + + return &sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.cpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.cpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.cpp index 196fc49ed..0a5fc8261 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.cpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetCameraInfo 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetCameraInfo 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetCameraInfo 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 } }; diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.h diff --git a/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.hpp new file mode 100644 index 000000000..041c9d98e --- /dev/null +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/detail/set_camera_info__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from sensor_msgs:srv/SetCameraInfo.idl +// generated code does not contain a copyright notice + +#ifndef SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TYPE_SUPPORT_HPP_ +#define SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "sensor_msgs/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_sensor_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + srv, + SetCameraInfo +)(); +#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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + srv, + SetCameraInfo_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_sensor_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + sensor_msgs, + srv, + SetCameraInfo_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/srv/set_camera_info.h b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/set_camera_info.h similarity index 100% rename from ThirdParty/ros/include/sensor_msgs/srv/set_camera_info.h rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/set_camera_info.h diff --git a/ThirdParty/ros/include/sensor_msgs/srv/set_camera_info.hpp b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/set_camera_info.hpp similarity index 86% rename from ThirdParty/ros/include/sensor_msgs/srv/set_camera_info.hpp rename to ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/set_camera_info.hpp index 434907bbb..0d33ad6f6 100644 --- a/ThirdParty/ros/include/sensor_msgs/srv/set_camera_info.hpp +++ b/ThirdParty/ros/include/sensor_msgs/sensor_msgs/srv/set_camera_info.hpp @@ -7,5 +7,6 @@ #include "sensor_msgs/srv/detail/set_camera_info__struct.hpp" #include "sensor_msgs/srv/detail/set_camera_info__builder.hpp" #include "sensor_msgs/srv/detail/set_camera_info__traits.hpp" +#include "sensor_msgs/srv/detail/set_camera_info__type_support.hpp" #endif // SENSOR_MSGS__SRV__SET_CAMERA_INFO_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__traits.hpp b/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__traits.hpp deleted file mode 100644 index 2cdd95ff0..000000000 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from sensor_msgs:srv/SetCameraInfo.idl -// generated code does not contain a copyright notice - -#ifndef SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ -#define SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ - -#include "sensor_msgs/srv/detail/set_camera_info__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'camera_info' -#include "sensor_msgs/msg/detail/camera_info__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::srv::SetCameraInfo_Request"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/srv/SetCameraInfo_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::srv::SetCameraInfo_Response"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/srv/SetCameraInfo_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "sensor_msgs::srv::SetCameraInfo"; -} - -template<> -inline const char * name() -{ - return "sensor_msgs/srv/SetCameraInfo"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // SENSOR_MSGS__SRV__DETAIL__SET_CAMERA_INFO__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.c b/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.c deleted file mode 100644 index 3b67ed536..000000000 --- a/ThirdParty/ros/include/sensor_msgs/srv/detail/set_camera_info__type_support.c +++ /dev/null @@ -1,251 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from sensor_msgs:srv/SetCameraInfo.idl -// generated code does not contain a copyright notice - -#include -#include "sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h" -#include "sensor_msgs/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 "sensor_msgs/srv/detail/set_camera_info__functions.h" -#include "sensor_msgs/srv/detail/set_camera_info__struct.h" - - -// Include directives for member types -// Member `camera_info` -#include "sensor_msgs/msg/camera_info.h" -// Member `camera_info` -#include "sensor_msgs/msg/detail/camera_info__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_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; - sensor_msgs__srv__SetCameraInfo_Request__init(message_memory); -} - -void SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_fini_function(void * message_memory) -{ - sensor_msgs__srv__SetCameraInfo_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array[1] = { - { - "camera_info", // 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(sensor_msgs__srv__SetCameraInfo_Request, camera_info), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_members = { - "sensor_msgs__srv", // message namespace - "SetCameraInfo_Request", // message name - 1, // number of fields - sizeof(sensor_msgs__srv__SetCameraInfo_Request), - SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array, // message members - SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_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 SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle = { - 0, - &SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Request)() { - SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CameraInfo)(); - if (!SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle.typesupport_identifier) { - SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetCameraInfo_Request__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "sensor_msgs/srv/detail/set_camera_info__rosidl_typesupport_introspection_c.h" -// already included above -// #include "sensor_msgs/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 "sensor_msgs/srv/detail/set_camera_info__functions.h" -// already included above -// #include "sensor_msgs/srv/detail/set_camera_info__struct.h" - - -// Include directives for member types -// Member `status_message` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_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; - sensor_msgs__srv__SetCameraInfo_Response__init(message_memory); -} - -void SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_fini_function(void * message_memory) -{ - sensor_msgs__srv__SetCameraInfo_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__srv__SetCameraInfo_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(sensor_msgs__srv__SetCameraInfo_Response, status_message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_members = { - "sensor_msgs__srv", // message namespace - "SetCameraInfo_Response", // message name - 2, // number of fields - sizeof(sensor_msgs__srv__SetCameraInfo_Response), - SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_member_array, // message members - SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_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 SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle = { - 0, - &SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Response)() { - if (!SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle.typesupport_identifier) { - SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetCameraInfo_Response__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "sensor_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "sensor_msgs/srv/detail/set_camera_info__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 sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_members = { - "sensor_msgs__srv", // service namespace - "SetCameraInfo", // service name - // these two fields are initialized below on the first access - NULL, // request message - // sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_Request_message_type_support_handle, - NULL // response message - // sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle = { - 0, - &sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_sensor_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, srv, SetCameraInfo)() { - if (!sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle.typesupport_identifier) { - sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_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, sensor_msgs, srv, SetCameraInfo_Response)()->data; - } - - return &sensor_msgs__srv__detail__set_camera_info__rosidl_typesupport_introspection_c__SetCameraInfo_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__traits.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__traits.hpp deleted file mode 100644 index 37191d1c9..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from shape_msgs:msg/Mesh.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ - -#include "shape_msgs/msg/detail/mesh__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "shape_msgs::msg::Mesh"; -} - -template<> -inline const char * name() -{ - return "shape_msgs/msg/Mesh"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.c b/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.c deleted file mode 100644 index 6ae8a331e..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.c +++ /dev/null @@ -1,176 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from shape_msgs:msg/Mesh.idl -// generated code does not contain a copyright notice - -#include -#include "shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h" -#include "shape_msgs/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 "shape_msgs/msg/detail/mesh__functions.h" -#include "shape_msgs/msg/detail/mesh__struct.h" - - -// Include directives for member types -// Member `triangles` -#include "shape_msgs/msg/mesh_triangle.h" -// Member `triangles` -#include "shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h" -// Member `vertices` -#include "geometry_msgs/msg/point.h" -// Member `vertices` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Mesh__rosidl_typesupport_introspection_c__Mesh_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; - shape_msgs__msg__Mesh__init(message_memory); -} - -void Mesh__rosidl_typesupport_introspection_c__Mesh_fini_function(void * message_memory) -{ - shape_msgs__msg__Mesh__fini(message_memory); -} - -size_t Mesh__rosidl_typesupport_introspection_c__size_function__MeshTriangle__triangles( - const void * untyped_member) -{ - const shape_msgs__msg__MeshTriangle__Sequence * member = - (const shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); - return member->size; -} - -const void * Mesh__rosidl_typesupport_introspection_c__get_const_function__MeshTriangle__triangles( - const void * untyped_member, size_t index) -{ - const shape_msgs__msg__MeshTriangle__Sequence * member = - (const shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Mesh__rosidl_typesupport_introspection_c__get_function__MeshTriangle__triangles( - void * untyped_member, size_t index) -{ - shape_msgs__msg__MeshTriangle__Sequence * member = - (shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Mesh__rosidl_typesupport_introspection_c__resize_function__MeshTriangle__triangles( - void * untyped_member, size_t size) -{ - shape_msgs__msg__MeshTriangle__Sequence * member = - (shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); - shape_msgs__msg__MeshTriangle__Sequence__fini(member); - return shape_msgs__msg__MeshTriangle__Sequence__init(member, size); -} - -size_t Mesh__rosidl_typesupport_introspection_c__size_function__Point__vertices( - const void * untyped_member) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return member->size; -} - -const void * Mesh__rosidl_typesupport_introspection_c__get_const_function__Point__vertices( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Mesh__rosidl_typesupport_introspection_c__get_function__Point__vertices( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Mesh__rosidl_typesupport_introspection_c__resize_function__Point__vertices( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - geometry_msgs__msg__Point__Sequence__fini(member); - return geometry_msgs__msg__Point__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[2] = { - { - "triangles", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(shape_msgs__msg__Mesh, triangles), // bytes offset in struct - NULL, // default value - Mesh__rosidl_typesupport_introspection_c__size_function__MeshTriangle__triangles, // size() function pointer - Mesh__rosidl_typesupport_introspection_c__get_const_function__MeshTriangle__triangles, // get_const(index) function pointer - Mesh__rosidl_typesupport_introspection_c__get_function__MeshTriangle__triangles, // get(index) function pointer - Mesh__rosidl_typesupport_introspection_c__resize_function__MeshTriangle__triangles // resize(index) function pointer - }, - { - "vertices", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(shape_msgs__msg__Mesh, vertices), // bytes offset in struct - NULL, // default value - Mesh__rosidl_typesupport_introspection_c__size_function__Point__vertices, // size() function pointer - Mesh__rosidl_typesupport_introspection_c__get_const_function__Point__vertices, // get_const(index) function pointer - Mesh__rosidl_typesupport_introspection_c__get_function__Point__vertices, // get(index) function pointer - Mesh__rosidl_typesupport_introspection_c__resize_function__Point__vertices // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Mesh__rosidl_typesupport_introspection_c__Mesh_message_members = { - "shape_msgs__msg", // message namespace - "Mesh", // message name - 2, // number of fields - sizeof(shape_msgs__msg__Mesh), - Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array, // message members - Mesh__rosidl_typesupport_introspection_c__Mesh_init_function, // function to initialize message memory (memory has to be allocated) - Mesh__rosidl_typesupport_introspection_c__Mesh_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 Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle = { - 0, - &Mesh__rosidl_typesupport_introspection_c__Mesh_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, Mesh)() { - Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, MeshTriangle)(); - Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - if (!Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle.typesupport_identifier) { - Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__traits.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__traits.hpp deleted file mode 100644 index bb76267bf..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from shape_msgs:msg/MeshTriangle.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ - -#include "shape_msgs/msg/detail/mesh_triangle__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "shape_msgs::msg::MeshTriangle"; -} - -template<> -inline const char * name() -{ - return "shape_msgs/msg/MeshTriangle"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.c b/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.c deleted file mode 100644 index 3b3289162..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from shape_msgs:msg/MeshTriangle.idl -// generated code does not contain a copyright notice - -#include -#include "shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h" -#include "shape_msgs/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 "shape_msgs/msg/detail/mesh_triangle__functions.h" -#include "shape_msgs/msg/detail/mesh_triangle__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_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; - shape_msgs__msg__MeshTriangle__init(message_memory); -} - -void MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_fini_function(void * message_memory) -{ - shape_msgs__msg__MeshTriangle__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_member_array[1] = { - { - "vertex_indices", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 3, // array size - false, // is upper bound - offsetof(shape_msgs__msg__MeshTriangle, vertex_indices), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_members = { - "shape_msgs__msg", // message namespace - "MeshTriangle", // message name - 1, // number of fields - sizeof(shape_msgs__msg__MeshTriangle), - MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_member_array, // message members - MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_init_function, // function to initialize message memory (memory has to be allocated) - MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_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 MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle = { - 0, - &MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, MeshTriangle)() { - if (!MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle.typesupport_identifier) { - MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__traits.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/plane__traits.hpp deleted file mode 100644 index 1aff46e5a..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from shape_msgs:msg/Plane.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ - -#include "shape_msgs/msg/detail/plane__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "shape_msgs::msg::Plane"; -} - -template<> -inline const char * name() -{ - return "shape_msgs/msg/Plane"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.c b/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.c deleted file mode 100644 index 6bfba157c..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from shape_msgs:msg/Plane.idl -// generated code does not contain a copyright notice - -#include -#include "shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h" -#include "shape_msgs/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 "shape_msgs/msg/detail/plane__functions.h" -#include "shape_msgs/msg/detail/plane__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Plane__rosidl_typesupport_introspection_c__Plane_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; - shape_msgs__msg__Plane__init(message_memory); -} - -void Plane__rosidl_typesupport_introspection_c__Plane_fini_function(void * message_memory) -{ - shape_msgs__msg__Plane__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Plane__rosidl_typesupport_introspection_c__Plane_message_member_array[1] = { - { - "coef", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 4, // array size - false, // is upper bound - offsetof(shape_msgs__msg__Plane, coef), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Plane__rosidl_typesupport_introspection_c__Plane_message_members = { - "shape_msgs__msg", // message namespace - "Plane", // message name - 1, // number of fields - sizeof(shape_msgs__msg__Plane), - Plane__rosidl_typesupport_introspection_c__Plane_message_member_array, // message members - Plane__rosidl_typesupport_introspection_c__Plane_init_function, // function to initialize message memory (memory has to be allocated) - Plane__rosidl_typesupport_introspection_c__Plane_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 Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle = { - 0, - &Plane__rosidl_typesupport_introspection_c__Plane_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, Plane)() { - if (!Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle.typesupport_identifier) { - Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__builder.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__builder.hpp deleted file mode 100644 index e66999220..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from shape_msgs:msg/SolidPrimitive.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ - -#include "shape_msgs/msg/detail/solid_primitive__struct.hpp" -#include -#include -#include - - -namespace shape_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_SolidPrimitive_dimensions -{ -public: - explicit Init_SolidPrimitive_dimensions(::shape_msgs::msg::SolidPrimitive & msg) - : msg_(msg) - {} - ::shape_msgs::msg::SolidPrimitive dimensions(::shape_msgs::msg::SolidPrimitive::_dimensions_type arg) - { - msg_.dimensions = std::move(arg); - return std::move(msg_); - } - -private: - ::shape_msgs::msg::SolidPrimitive msg_; -}; - -class Init_SolidPrimitive_type -{ -public: - Init_SolidPrimitive_type() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_SolidPrimitive_dimensions type(::shape_msgs::msg::SolidPrimitive::_type_type arg) - { - msg_.type = std::move(arg); - return Init_SolidPrimitive_dimensions(msg_); - } - -private: - ::shape_msgs::msg::SolidPrimitive msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::shape_msgs::msg::SolidPrimitive>() -{ - return shape_msgs::msg::builder::Init_SolidPrimitive_type(); -} - -} // namespace shape_msgs - -#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.h b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.h deleted file mode 100644 index 2538f5371..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.h +++ /dev/null @@ -1,124 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from shape_msgs:msg/SolidPrimitive.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ -#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'BOX'. -enum -{ - shape_msgs__msg__SolidPrimitive__BOX = 1 -}; - -/// Constant 'SPHERE'. -enum -{ - shape_msgs__msg__SolidPrimitive__SPHERE = 2 -}; - -/// Constant 'CYLINDER'. -enum -{ - shape_msgs__msg__SolidPrimitive__CYLINDER = 3 -}; - -/// Constant 'CONE'. -enum -{ - shape_msgs__msg__SolidPrimitive__CONE = 4 -}; - -/// Constant 'BOX_X'. -enum -{ - shape_msgs__msg__SolidPrimitive__BOX_X = 0 -}; - -/// Constant 'BOX_Y'. -enum -{ - shape_msgs__msg__SolidPrimitive__BOX_Y = 1 -}; - -/// Constant 'BOX_Z'. -enum -{ - shape_msgs__msg__SolidPrimitive__BOX_Z = 2 -}; - -/// Constant 'SPHERE_RADIUS'. -enum -{ - shape_msgs__msg__SolidPrimitive__SPHERE_RADIUS = 0 -}; - -/// Constant 'CYLINDER_HEIGHT'. -enum -{ - shape_msgs__msg__SolidPrimitive__CYLINDER_HEIGHT = 0 -}; - -/// Constant 'CYLINDER_RADIUS'. -enum -{ - shape_msgs__msg__SolidPrimitive__CYLINDER_RADIUS = 1 -}; - -/// Constant 'CONE_HEIGHT'. -enum -{ - shape_msgs__msg__SolidPrimitive__CONE_HEIGHT = 0 -}; - -/// Constant 'CONE_RADIUS'. -enum -{ - shape_msgs__msg__SolidPrimitive__CONE_RADIUS = 1 -}; - -// Include directives for member types -// Member 'dimensions' -#include "rosidl_runtime_c/primitives_sequence.h" - -// constants for array fields with an upper bound -// dimensions -enum -{ - shape_msgs__msg__SolidPrimitive__dimensions__MAX_SIZE = 3 -}; - -// Struct defined in msg/SolidPrimitive in the package shape_msgs. -typedef struct shape_msgs__msg__SolidPrimitive -{ - uint8_t type; - rosidl_runtime_c__double__Sequence dimensions; -} shape_msgs__msg__SolidPrimitive; - -// Struct for a sequence of shape_msgs__msg__SolidPrimitive. -typedef struct shape_msgs__msg__SolidPrimitive__Sequence -{ - shape_msgs__msg__SolidPrimitive * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} shape_msgs__msg__SolidPrimitive__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.hpp deleted file mode 100644 index a6586c843..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__struct.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from shape_msgs:msg/SolidPrimitive.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__shape_msgs__msg__SolidPrimitive __attribute__((deprecated)) -#else -# define DEPRECATED__shape_msgs__msg__SolidPrimitive __declspec(deprecated) -#endif - -namespace shape_msgs -{ - -namespace msg -{ - -// message struct -template -struct SolidPrimitive_ -{ - using Type = SolidPrimitive_; - - explicit SolidPrimitive_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->type = 0; - } - } - - explicit SolidPrimitive_(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->type = 0; - } - } - - // field types and members - using _type_type = - uint8_t; - _type_type type; - using _dimensions_type = - rosidl_runtime_cpp::BoundedVector::other>; - _dimensions_type dimensions; - - // setters for named parameter idiom - Type & set__type( - const uint8_t & _arg) - { - this->type = _arg; - return *this; - } - Type & set__dimensions( - const rosidl_runtime_cpp::BoundedVector::other> & _arg) - { - this->dimensions = _arg; - return *this; - } - - // constant declarations - static constexpr uint8_t BOX = - 1u; - static constexpr uint8_t SPHERE = - 2u; - static constexpr uint8_t CYLINDER = - 3u; - static constexpr uint8_t CONE = - 4u; - static constexpr uint8_t BOX_X = - 0u; - static constexpr uint8_t BOX_Y = - 1u; - static constexpr uint8_t BOX_Z = - 2u; - static constexpr uint8_t SPHERE_RADIUS = - 0u; - static constexpr uint8_t CYLINDER_HEIGHT = - 0u; - static constexpr uint8_t CYLINDER_RADIUS = - 1u; - static constexpr uint8_t CONE_HEIGHT = - 0u; - static constexpr uint8_t CONE_RADIUS = - 1u; - - // pointer types - using RawPtr = - shape_msgs::msg::SolidPrimitive_ *; - using ConstRawPtr = - const shape_msgs::msg::SolidPrimitive_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__shape_msgs__msg__SolidPrimitive - std::shared_ptr> - Ptr; - typedef DEPRECATED__shape_msgs__msg__SolidPrimitive - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const SolidPrimitive_ & other) const - { - if (this->type != other.type) { - return false; - } - if (this->dimensions != other.dimensions) { - return false; - } - return true; - } - bool operator!=(const SolidPrimitive_ & other) const - { - return !this->operator==(other); - } -}; // struct SolidPrimitive_ - -// alias to use template instance with default allocator -using SolidPrimitive = - shape_msgs::msg::SolidPrimitive_>; - -// constant definitions -template -constexpr uint8_t SolidPrimitive_::BOX; -template -constexpr uint8_t SolidPrimitive_::SPHERE; -template -constexpr uint8_t SolidPrimitive_::CYLINDER; -template -constexpr uint8_t SolidPrimitive_::CONE; -template -constexpr uint8_t SolidPrimitive_::BOX_X; -template -constexpr uint8_t SolidPrimitive_::BOX_Y; -template -constexpr uint8_t SolidPrimitive_::BOX_Z; -template -constexpr uint8_t SolidPrimitive_::SPHERE_RADIUS; -template -constexpr uint8_t SolidPrimitive_::CYLINDER_HEIGHT; -template -constexpr uint8_t SolidPrimitive_::CYLINDER_RADIUS; -template -constexpr uint8_t SolidPrimitive_::CONE_HEIGHT; -template -constexpr uint8_t SolidPrimitive_::CONE_RADIUS; - -} // namespace msg - -} // namespace shape_msgs - -#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__traits.hpp b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__traits.hpp deleted file mode 100644 index 65ca70cc5..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from shape_msgs:msg/SolidPrimitive.idl -// generated code does not contain a copyright notice - -#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ -#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ - -#include "shape_msgs/msg/detail/solid_primitive__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "shape_msgs::msg::SolidPrimitive"; -} - -template<> -inline const char * name() -{ - return "shape_msgs/msg/SolidPrimitive"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.c b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.c deleted file mode 100644 index 4a42605ad..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.c +++ /dev/null @@ -1,100 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from shape_msgs:msg/SolidPrimitive.idl -// generated code does not contain a copyright notice - -#include -#include "shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h" -#include "shape_msgs/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 "shape_msgs/msg/detail/solid_primitive__functions.h" -#include "shape_msgs/msg/detail/solid_primitive__struct.h" - - -// Include directives for member types -// Member `dimensions` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_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; - shape_msgs__msg__SolidPrimitive__init(message_memory); -} - -void SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_fini_function(void * message_memory) -{ - shape_msgs__msg__SolidPrimitive__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_member_array[2] = { - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(shape_msgs__msg__SolidPrimitive, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "dimensions", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 3, // array size - true, // is upper bound - offsetof(shape_msgs__msg__SolidPrimitive, dimensions), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_members = { - "shape_msgs__msg", // message namespace - "SolidPrimitive", // message name - 2, // number of fields - sizeof(shape_msgs__msg__SolidPrimitive), - SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_member_array, // message members - SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_init_function, // function to initialize message memory (memory has to be allocated) - SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_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 SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle = { - 0, - &SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, SolidPrimitive)() { - if (!SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle.typesupport_identifier) { - SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.cpp b/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.cpp deleted file mode 100644 index eccae50dc..000000000 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from shape_msgs:msg/SolidPrimitive.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 "shape_msgs/msg/detail/solid_primitive__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 shape_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void SolidPrimitive_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) shape_msgs::msg::SolidPrimitive(_init); -} - -void SolidPrimitive_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~SolidPrimitive(); -} - -size_t size_function__SolidPrimitive__dimensions(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__SolidPrimitive__dimensions(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__SolidPrimitive__dimensions(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__SolidPrimitive__dimensions(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember SolidPrimitive_message_member_array[2] = { - { - "type", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(shape_msgs::msg::SolidPrimitive, type), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "dimensions", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 3, // array size - true, // is upper bound - offsetof(shape_msgs::msg::SolidPrimitive, dimensions), // bytes offset in struct - nullptr, // default value - size_function__SolidPrimitive__dimensions, // size() function pointer - get_const_function__SolidPrimitive__dimensions, // get_const(index) function pointer - get_function__SolidPrimitive__dimensions, // get(index) function pointer - resize_function__SolidPrimitive__dimensions // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers SolidPrimitive_message_members = { - "shape_msgs::msg", // message namespace - "SolidPrimitive", // message name - 2, // number of fields - sizeof(shape_msgs::msg::SolidPrimitive), - SolidPrimitive_message_member_array, // message members - SolidPrimitive_init_function, // function to initialize message memory (memory has to be allocated) - SolidPrimitive_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t SolidPrimitive_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SolidPrimitive_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace shape_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::shape_msgs::msg::rosidl_typesupport_introspection_cpp::SolidPrimitive_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, shape_msgs, msg, SolidPrimitive)() { - return &::shape_msgs::msg::rosidl_typesupport_introspection_cpp::SolidPrimitive_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__builder.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__builder.hpp similarity index 95% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__builder.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__builder.hpp index bcee46a0b..ab38478a4 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__builder.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__builder.hpp @@ -5,11 +5,12 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__MESH__BUILDER_HPP_ #define SHAPE_MSGS__MSG__DETAIL__MESH__BUILDER_HPP_ -#include "shape_msgs/msg/detail/mesh__struct.hpp" -#include #include #include +#include "shape_msgs/msg/detail/mesh__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace shape_msgs { diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__functions.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__functions.c similarity index 91% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__functions.c rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__functions.c index a5e8740a9..08f29273f 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__functions.c +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__functions.c @@ -237,22 +237,27 @@ shape_msgs__msg__Mesh__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(shape_msgs__msg__Mesh); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); shape_msgs__msg__Mesh * data = - (shape_msgs__msg__Mesh *)realloc(output->data, allocation_size); + (shape_msgs__msg__Mesh *)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 (!shape_msgs__msg__Mesh__init(&data[i])) { - /* free currently allocated and return false */ + if (!shape_msgs__msg__Mesh__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; ) { - shape_msgs__msg__Mesh__fini(&data[i]); + shape_msgs__msg__Mesh__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__functions.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__functions.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__functions.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__functions.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h index 5b7110620..e8d86f43e 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_shape_msgs__msg__Mesh( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs size_t max_serialized_size_shape_msgs__msg__Mesh( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp index 03008aea7..de5cb9b25 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_shape_msgs max_serialized_size_Mesh( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.h similarity index 83% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.h index 4774f22a5..5e4d160b1 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.h @@ -23,10 +23,15 @@ extern "C" // Member 'vertices' #include "geometry_msgs/msg/detail/point__struct.h" -// Struct defined in msg/Mesh in the package shape_msgs. +/// Struct defined in msg/Mesh in the package shape_msgs. +/** + * Definition of a mesh. + */ typedef struct shape_msgs__msg__Mesh { + /// List of triangles; the index values refer to positions in vertices[]. shape_msgs__msg__MeshTriangle__Sequence triangles; + /// The actual vertices that make up the mesh. geometry_msgs__msg__Point__Sequence vertices; } shape_msgs__msg__Mesh; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.hpp similarity index 85% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.hpp index cb4c1304d..c29fad43e 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__struct.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__struct.hpp @@ -5,14 +5,15 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__MESH__STRUCT_HPP_ #define SHAPE_MSGS__MSG__DETAIL__MESH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'triangles' @@ -51,21 +52,21 @@ struct Mesh_ // field types and members using _triangles_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _triangles_type triangles; using _vertices_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _vertices_type vertices; // setters for named parameter idiom Type & set__triangles( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->triangles = _arg; return *this; } Type & set__vertices( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->vertices = _arg; return *this; diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__traits.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__traits.hpp new file mode 100644 index 000000000..2828e7ece --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__traits.hpp @@ -0,0 +1,172 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from shape_msgs:msg/Mesh.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "shape_msgs/msg/detail/mesh__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'triangles' +#include "shape_msgs/msg/detail/mesh_triangle__traits.hpp" +// Member 'vertices' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace shape_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Mesh & msg, + std::ostream & out) +{ + out << "{"; + // member: triangles + { + if (msg.triangles.size() == 0) { + out << "triangles: []"; + } else { + out << "triangles: ["; + size_t pending_items = msg.triangles.size(); + for (auto item : msg.triangles) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: vertices + { + if (msg.vertices.size() == 0) { + out << "vertices: []"; + } else { + out << "vertices: ["; + size_t pending_items = msg.vertices.size(); + for (auto item : msg.vertices) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Mesh & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: triangles + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.triangles.size() == 0) { + out << "triangles: []\n"; + } else { + out << "triangles:\n"; + for (auto item : msg.triangles) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: vertices + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.vertices.size() == 0) { + out << "vertices: []\n"; + } else { + out << "vertices:\n"; + for (auto item : msg.vertices) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Mesh & 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 shape_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use shape_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const shape_msgs::msg::Mesh & msg, + std::ostream & out, size_t indentation = 0) +{ + shape_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use shape_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const shape_msgs::msg::Mesh & msg) +{ + return shape_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "shape_msgs::msg::Mesh"; +} + +template<> +inline const char * name() +{ + return "shape_msgs/msg/Mesh"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SHAPE_MSGS__MSG__DETAIL__MESH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.c new file mode 100644 index 000000000..df482a13a --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.c @@ -0,0 +1,224 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from shape_msgs:msg/Mesh.idl +// generated code does not contain a copyright notice + +#include +#include "shape_msgs/msg/detail/mesh__rosidl_typesupport_introspection_c.h" +#include "shape_msgs/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 "shape_msgs/msg/detail/mesh__functions.h" +#include "shape_msgs/msg/detail/mesh__struct.h" + + +// Include directives for member types +// Member `triangles` +#include "shape_msgs/msg/mesh_triangle.h" +// Member `triangles` +#include "shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h" +// Member `vertices` +#include "geometry_msgs/msg/point.h" +// Member `vertices` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_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; + shape_msgs__msg__Mesh__init(message_memory); +} + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_fini_function(void * message_memory) +{ + shape_msgs__msg__Mesh__fini(message_memory); +} + +size_t shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__size_function__Mesh__triangles( + const void * untyped_member) +{ + const shape_msgs__msg__MeshTriangle__Sequence * member = + (const shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); + return member->size; +} + +const void * shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__triangles( + const void * untyped_member, size_t index) +{ + const shape_msgs__msg__MeshTriangle__Sequence * member = + (const shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__triangles( + void * untyped_member, size_t index) +{ + shape_msgs__msg__MeshTriangle__Sequence * member = + (shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); + return &member->data[index]; +} + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__fetch_function__Mesh__triangles( + const void * untyped_member, size_t index, void * untyped_value) +{ + const shape_msgs__msg__MeshTriangle * item = + ((const shape_msgs__msg__MeshTriangle *) + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__triangles(untyped_member, index)); + shape_msgs__msg__MeshTriangle * value = + (shape_msgs__msg__MeshTriangle *)(untyped_value); + *value = *item; +} + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__assign_function__Mesh__triangles( + void * untyped_member, size_t index, const void * untyped_value) +{ + shape_msgs__msg__MeshTriangle * item = + ((shape_msgs__msg__MeshTriangle *) + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__triangles(untyped_member, index)); + const shape_msgs__msg__MeshTriangle * value = + (const shape_msgs__msg__MeshTriangle *)(untyped_value); + *item = *value; +} + +bool shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__resize_function__Mesh__triangles( + void * untyped_member, size_t size) +{ + shape_msgs__msg__MeshTriangle__Sequence * member = + (shape_msgs__msg__MeshTriangle__Sequence *)(untyped_member); + shape_msgs__msg__MeshTriangle__Sequence__fini(member); + return shape_msgs__msg__MeshTriangle__Sequence__init(member, size); +} + +size_t shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__size_function__Mesh__vertices( + const void * untyped_member) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return member->size; +} + +const void * shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__vertices( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__vertices( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__fetch_function__Mesh__vertices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point * item = + ((const geometry_msgs__msg__Point *) + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__vertices(untyped_member, index)); + geometry_msgs__msg__Point * value = + (geometry_msgs__msg__Point *)(untyped_value); + *value = *item; +} + +void shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__assign_function__Mesh__vertices( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point * item = + ((geometry_msgs__msg__Point *) + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__vertices(untyped_member, index)); + const geometry_msgs__msg__Point * value = + (const geometry_msgs__msg__Point *)(untyped_value); + *item = *value; +} + +bool shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__resize_function__Mesh__vertices( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + geometry_msgs__msg__Point__Sequence__fini(member); + return geometry_msgs__msg__Point__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[2] = { + { + "triangles", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(shape_msgs__msg__Mesh, triangles), // bytes offset in struct + NULL, // default value + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__size_function__Mesh__triangles, // size() function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__triangles, // get_const(index) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__triangles, // get(index) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__fetch_function__Mesh__triangles, // fetch(index, &value) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__assign_function__Mesh__triangles, // assign(index, value) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__resize_function__Mesh__triangles // resize(index) function pointer + }, + { + "vertices", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(shape_msgs__msg__Mesh, vertices), // bytes offset in struct + NULL, // default value + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__size_function__Mesh__vertices, // size() function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_const_function__Mesh__vertices, // get_const(index) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__get_function__Mesh__vertices, // get(index) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__fetch_function__Mesh__vertices, // fetch(index, &value) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__assign_function__Mesh__vertices, // assign(index, value) function pointer + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__resize_function__Mesh__vertices // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_members = { + "shape_msgs__msg", // message namespace + "Mesh", // message name + 2, // number of fields + sizeof(shape_msgs__msg__Mesh), + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array, // message members + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_init_function, // function to initialize message memory (memory has to be allocated) + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_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 shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle = { + 0, + &shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, Mesh)() { + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, MeshTriangle)(); + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle.typesupport_identifier) { + shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &shape_msgs__msg__Mesh__rosidl_typesupport_introspection_c__Mesh_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.cpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.cpp similarity index 77% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.cpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.cpp index 0a24b7816..35286244f 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.cpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Mesh__triangles(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Mesh__triangles( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Mesh__triangles(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Mesh__triangles( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Mesh__triangles(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Mesh__triangles(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__Mesh__vertices(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Mesh__vertices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Mesh__vertices(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Mesh__vertices( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Mesh__vertices(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__Mesh__vertices(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Mesh_message_ size_function__Mesh__triangles, // size() function pointer get_const_function__Mesh__triangles, // get_const(index) function pointer get_function__Mesh__triangles, // get(index) function pointer + fetch_function__Mesh__triangles, // fetch(index, &value) function pointer + assign_function__Mesh__triangles, // assign(index, value) function pointer resize_function__Mesh__triangles // resize(index) function pointer }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Mesh_message_ size_function__Mesh__vertices, // size() function pointer get_const_function__Mesh__vertices, // get_const(index) function pointer get_function__Mesh__vertices, // get(index) function pointer + fetch_function__Mesh__vertices, // fetch(index, &value) function pointer + assign_function__Mesh__vertices, // assign(index, value) function pointer resize_function__Mesh__vertices // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh__type_support.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.h diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.hpp new file mode 100644 index 000000000..5b31b8f9c --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from shape_msgs:msg/Mesh.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__MESH__TYPE_SUPPORT_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__MESH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "shape_msgs/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_shape_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + shape_msgs, + msg, + Mesh +)(); +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__DETAIL__MESH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__builder.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__builder.hpp similarity index 95% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__builder.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__builder.hpp index 48c91796d..c2a3bcb4f 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__builder.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__builder.hpp @@ -5,11 +5,12 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__BUILDER_HPP_ #define SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__BUILDER_HPP_ -#include "shape_msgs/msg/detail/mesh_triangle__struct.hpp" -#include #include #include +#include "shape_msgs/msg/detail/mesh_triangle__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace shape_msgs { diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__functions.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__functions.c similarity index 90% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__functions.c rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__functions.c index 58c5fc5ce..e6776d9b7 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__functions.c +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__functions.c @@ -205,22 +205,27 @@ shape_msgs__msg__MeshTriangle__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(shape_msgs__msg__MeshTriangle); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); shape_msgs__msg__MeshTriangle * data = - (shape_msgs__msg__MeshTriangle *)realloc(output->data, allocation_size); + (shape_msgs__msg__MeshTriangle *)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 (!shape_msgs__msg__MeshTriangle__init(&data[i])) { - /* free currently allocated and return false */ + if (!shape_msgs__msg__MeshTriangle__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; ) { - shape_msgs__msg__MeshTriangle__fini(&data[i]); + shape_msgs__msg__MeshTriangle__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__functions.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__functions.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__functions.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__functions.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h index 5896dc4fd..49781d397 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_shape_msgs__msg__MeshTriangle( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs size_t max_serialized_size_shape_msgs__msg__MeshTriangle( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp index 4334ad575..dc002b12a 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_shape_msgs max_serialized_size_MeshTriangle( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.h similarity index 89% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.h index c30ddd5e4..28ccec502 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.h @@ -17,7 +17,10 @@ extern "C" // Constants defined in the message -// Struct defined in msg/MeshTriangle in the package shape_msgs. +/// Struct defined in msg/MeshTriangle in the package shape_msgs. +/** + * Definition of a triangle's vertices. + */ typedef struct shape_msgs__msg__MeshTriangle { uint32_t vertex_indices[3]; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.hpp similarity index 97% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.hpp index 795649cf0..3f8fda0c9 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__struct.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__struct.hpp @@ -5,14 +5,15 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__STRUCT_HPP_ #define SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__shape_msgs__msg__MeshTriangle __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__traits.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__traits.hpp new file mode 100644 index 000000000..afdd55fd3 --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from shape_msgs:msg/MeshTriangle.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "shape_msgs/msg/detail/mesh_triangle__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace shape_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MeshTriangle & msg, + std::ostream & out) +{ + out << "{"; + // member: vertex_indices + { + if (msg.vertex_indices.size() == 0) { + out << "vertex_indices: []"; + } else { + out << "vertex_indices: ["; + size_t pending_items = msg.vertex_indices.size(); + for (auto item : msg.vertex_indices) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MeshTriangle & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: vertex_indices + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.vertex_indices.size() == 0) { + out << "vertex_indices: []\n"; + } else { + out << "vertex_indices:\n"; + for (auto item : msg.vertex_indices) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MeshTriangle & 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 shape_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use shape_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const shape_msgs::msg::MeshTriangle & msg, + std::ostream & out, size_t indentation = 0) +{ + shape_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use shape_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const shape_msgs::msg::MeshTriangle & msg) +{ + return shape_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "shape_msgs::msg::MeshTriangle"; +} + +template<> +inline const char * name() +{ + return "shape_msgs/msg/MeshTriangle"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.c new file mode 100644 index 000000000..98ba5cfd5 --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.c @@ -0,0 +1,128 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from shape_msgs:msg/MeshTriangle.idl +// generated code does not contain a copyright notice + +#include +#include "shape_msgs/msg/detail/mesh_triangle__rosidl_typesupport_introspection_c.h" +#include "shape_msgs/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 "shape_msgs/msg/detail/mesh_triangle__functions.h" +#include "shape_msgs/msg/detail/mesh_triangle__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_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; + shape_msgs__msg__MeshTriangle__init(message_memory); +} + +void shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_fini_function(void * message_memory) +{ + shape_msgs__msg__MeshTriangle__fini(message_memory); +} + +size_t shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__size_function__MeshTriangle__vertex_indices( + const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_const_function__MeshTriangle__vertex_indices( + const void * untyped_member, size_t index) +{ + const uint32_t * member = + (const uint32_t *)(untyped_member); + return &member[index]; +} + +void * shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_function__MeshTriangle__vertex_indices( + void * untyped_member, size_t index) +{ + uint32_t * member = + (uint32_t *)(untyped_member); + return &member[index]; +} + +void shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__fetch_function__MeshTriangle__vertex_indices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint32_t * item = + ((const uint32_t *) + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_const_function__MeshTriangle__vertex_indices(untyped_member, index)); + uint32_t * value = + (uint32_t *)(untyped_value); + *value = *item; +} + +void shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__assign_function__MeshTriangle__vertex_indices( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint32_t * item = + ((uint32_t *) + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_function__MeshTriangle__vertex_indices(untyped_member, index)); + const uint32_t * value = + (const uint32_t *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_member_array[1] = { + { + "vertex_indices", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(shape_msgs__msg__MeshTriangle, vertex_indices), // bytes offset in struct + NULL, // default value + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__size_function__MeshTriangle__vertex_indices, // size() function pointer + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_const_function__MeshTriangle__vertex_indices, // get_const(index) function pointer + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__get_function__MeshTriangle__vertex_indices, // get(index) function pointer + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__fetch_function__MeshTriangle__vertex_indices, // fetch(index, &value) function pointer + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__assign_function__MeshTriangle__vertex_indices, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_members = { + "shape_msgs__msg", // message namespace + "MeshTriangle", // message name + 1, // number of fields + sizeof(shape_msgs__msg__MeshTriangle), + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_member_array, // message members + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_init_function, // function to initialize message memory (memory has to be allocated) + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_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 shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle = { + 0, + &shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, MeshTriangle)() { + if (!shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle.typesupport_identifier) { + shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &shape_msgs__msg__MeshTriangle__rosidl_typesupport_introspection_c__MeshTriangle_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.cpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.cpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.cpp index abd83f242..d6b6881b5 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.cpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MeshTriangle__vertex_indices(void * untyped_member, size_t return &member[index]; } +void fetch_function__MeshTriangle__vertex_indices( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MeshTriangle__vertex_indices(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MeshTriangle__vertex_indices( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MeshTriangle__vertex_indices(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember MeshTriangle_message_member_array[1] = { { "vertex_indices", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MeshTriangle_ size_function__MeshTriangle__vertex_indices, // size() function pointer get_const_function__MeshTriangle__vertex_indices, // get_const(index) function pointer get_function__MeshTriangle__vertex_indices, // get(index) function pointer + fetch_function__MeshTriangle__vertex_indices, // fetch(index, &value) function pointer + assign_function__MeshTriangle__vertex_indices, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/mesh_triangle__type_support.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.h diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.hpp new file mode 100644 index 000000000..dc709225b --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/mesh_triangle__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from shape_msgs:msg/MeshTriangle.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TYPE_SUPPORT_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "shape_msgs/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_shape_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + shape_msgs, + msg, + MeshTriangle +)(); +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__DETAIL__MESH_TRIANGLE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__builder.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__builder.hpp similarity index 94% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__builder.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__builder.hpp index 37a9afda0..c7a430ea1 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__builder.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__builder.hpp @@ -5,11 +5,12 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__PLANE__BUILDER_HPP_ #define SHAPE_MSGS__MSG__DETAIL__PLANE__BUILDER_HPP_ -#include "shape_msgs/msg/detail/plane__struct.hpp" -#include #include #include +#include "shape_msgs/msg/detail/plane__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace shape_msgs { diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__functions.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__functions.c similarity index 90% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__functions.c rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__functions.c index fcf8e4d4e..8aa47fcee 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__functions.c +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__functions.c @@ -205,22 +205,27 @@ shape_msgs__msg__Plane__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(shape_msgs__msg__Plane); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); shape_msgs__msg__Plane * data = - (shape_msgs__msg__Plane *)realloc(output->data, allocation_size); + (shape_msgs__msg__Plane *)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 (!shape_msgs__msg__Plane__init(&data[i])) { - /* free currently allocated and return false */ + if (!shape_msgs__msg__Plane__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; ) { - shape_msgs__msg__Plane__fini(&data[i]); + shape_msgs__msg__Plane__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__functions.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__functions.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__functions.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__functions.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h index 909c11598..feb7a8165 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_shape_msgs__msg__Plane( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs size_t max_serialized_size_shape_msgs__msg__Plane( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp index 1504752d2..18b6eb27a 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_shape_msgs max_serialized_size_Plane( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.h similarity index 79% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.h index 2d3c7e0ab..4cdbaad29 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.h @@ -17,7 +17,15 @@ extern "C" // Constants defined in the message -// Struct defined in msg/Plane in the package shape_msgs. +/// Struct defined in msg/Plane in the package shape_msgs. +/** + * Representation of a plane, using the plane equation ax + by + cz + d = 0. + * + * a := coef[0] + * b := coef[1] + * c := coef[2] + * d := coef[3] + */ typedef struct shape_msgs__msg__Plane { double coef[4]; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.hpp similarity index 97% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.hpp index 83a405ff0..eb434dd87 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__struct.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__struct.hpp @@ -5,14 +5,15 @@ #ifndef SHAPE_MSGS__MSG__DETAIL__PLANE__STRUCT_HPP_ #define SHAPE_MSGS__MSG__DETAIL__PLANE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__shape_msgs__msg__Plane __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__traits.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__traits.hpp new file mode 100644 index 000000000..8ec4b6490 --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from shape_msgs:msg/Plane.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "shape_msgs/msg/detail/plane__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace shape_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Plane & msg, + std::ostream & out) +{ + out << "{"; + // member: coef + { + if (msg.coef.size() == 0) { + out << "coef: []"; + } else { + out << "coef: ["; + size_t pending_items = msg.coef.size(); + for (auto item : msg.coef) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Plane & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: coef + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.coef.size() == 0) { + out << "coef: []\n"; + } else { + out << "coef:\n"; + for (auto item : msg.coef) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Plane & 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 shape_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use shape_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const shape_msgs::msg::Plane & msg, + std::ostream & out, size_t indentation = 0) +{ + shape_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use shape_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const shape_msgs::msg::Plane & msg) +{ + return shape_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "shape_msgs::msg::Plane"; +} + +template<> +inline const char * name() +{ + return "shape_msgs/msg/Plane"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SHAPE_MSGS__MSG__DETAIL__PLANE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.c new file mode 100644 index 000000000..b9a63374a --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.c @@ -0,0 +1,128 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from shape_msgs:msg/Plane.idl +// generated code does not contain a copyright notice + +#include +#include "shape_msgs/msg/detail/plane__rosidl_typesupport_introspection_c.h" +#include "shape_msgs/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 "shape_msgs/msg/detail/plane__functions.h" +#include "shape_msgs/msg/detail/plane__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_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; + shape_msgs__msg__Plane__init(message_memory); +} + +void shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_fini_function(void * message_memory) +{ + shape_msgs__msg__Plane__fini(message_memory); +} + +size_t shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__size_function__Plane__coef( + const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_const_function__Plane__coef( + const void * untyped_member, size_t index) +{ + const double * member = + (const double *)(untyped_member); + return &member[index]; +} + +void * shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_function__Plane__coef( + void * untyped_member, size_t index) +{ + double * member = + (double *)(untyped_member); + return &member[index]; +} + +void shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__fetch_function__Plane__coef( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_const_function__Plane__coef(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__assign_function__Plane__coef( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_function__Plane__coef(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_member_array[1] = { + { + "coef", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(shape_msgs__msg__Plane, coef), // bytes offset in struct + NULL, // default value + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__size_function__Plane__coef, // size() function pointer + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_const_function__Plane__coef, // get_const(index) function pointer + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__get_function__Plane__coef, // get(index) function pointer + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__fetch_function__Plane__coef, // fetch(index, &value) function pointer + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__assign_function__Plane__coef, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_members = { + "shape_msgs__msg", // message namespace + "Plane", // message name + 1, // number of fields + sizeof(shape_msgs__msg__Plane), + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_member_array, // message members + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_init_function, // function to initialize message memory (memory has to be allocated) + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_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 shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle = { + 0, + &shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, Plane)() { + if (!shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle.typesupport_identifier) { + shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &shape_msgs__msg__Plane__rosidl_typesupport_introspection_c__Plane_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.cpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.cpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.cpp index 880191b54..6953bdeec 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.cpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__Plane__coef(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__Plane__coef( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Plane__coef(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Plane__coef( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Plane__coef(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember Plane_message_member_array[1] = { { "coef", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Plane_message size_function__Plane__coef, // size() function pointer get_const_function__Plane__coef, // get_const(index) function pointer get_function__Plane__coef, // get(index) function pointer + fetch_function__Plane__coef, // fetch(index, &value) function pointer + assign_function__Plane__coef, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/plane__type_support.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.h diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.hpp new file mode 100644 index 000000000..16c7dc84b --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/plane__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from shape_msgs:msg/Plane.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__PLANE__TYPE_SUPPORT_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__PLANE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "shape_msgs/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_shape_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + shape_msgs, + msg, + Plane +)(); +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__DETAIL__PLANE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__builder.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__builder.hpp new file mode 100644 index 000000000..5e4f3fe7b --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__builder.hpp @@ -0,0 +1,88 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ + +#include +#include + +#include "shape_msgs/msg/detail/solid_primitive__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace shape_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_SolidPrimitive_polygon +{ +public: + explicit Init_SolidPrimitive_polygon(::shape_msgs::msg::SolidPrimitive & msg) + : msg_(msg) + {} + ::shape_msgs::msg::SolidPrimitive polygon(::shape_msgs::msg::SolidPrimitive::_polygon_type arg) + { + msg_.polygon = std::move(arg); + return std::move(msg_); + } + +private: + ::shape_msgs::msg::SolidPrimitive msg_; +}; + +class Init_SolidPrimitive_dimensions +{ +public: + explicit Init_SolidPrimitive_dimensions(::shape_msgs::msg::SolidPrimitive & msg) + : msg_(msg) + {} + Init_SolidPrimitive_polygon dimensions(::shape_msgs::msg::SolidPrimitive::_dimensions_type arg) + { + msg_.dimensions = std::move(arg); + return Init_SolidPrimitive_polygon(msg_); + } + +private: + ::shape_msgs::msg::SolidPrimitive msg_; +}; + +class Init_SolidPrimitive_type +{ +public: + Init_SolidPrimitive_type() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_SolidPrimitive_dimensions type(::shape_msgs::msg::SolidPrimitive::_type_type arg) + { + msg_.type = std::move(arg); + return Init_SolidPrimitive_dimensions(msg_); + } + +private: + ::shape_msgs::msg::SolidPrimitive msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::shape_msgs::msg::SolidPrimitive>() +{ + return shape_msgs::msg::builder::Init_SolidPrimitive_type(); +} + +} // namespace shape_msgs + +#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__functions.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__functions.c similarity index 84% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__functions.c rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__functions.c index cd02ee0de..cd646ce24 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__functions.c +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__functions.c @@ -14,6 +14,8 @@ // Include directives for member types // Member `dimensions` #include "rosidl_runtime_c/primitives_sequence_functions.h" +// Member `polygon` +#include "geometry_msgs/msg/detail/polygon__functions.h" bool shape_msgs__msg__SolidPrimitive__init(shape_msgs__msg__SolidPrimitive * msg) @@ -27,6 +29,11 @@ shape_msgs__msg__SolidPrimitive__init(shape_msgs__msg__SolidPrimitive * msg) shape_msgs__msg__SolidPrimitive__fini(msg); return false; } + // polygon + if (!geometry_msgs__msg__Polygon__init(&msg->polygon)) { + shape_msgs__msg__SolidPrimitive__fini(msg); + return false; + } return true; } @@ -39,6 +46,8 @@ shape_msgs__msg__SolidPrimitive__fini(shape_msgs__msg__SolidPrimitive * msg) // type // dimensions rosidl_runtime_c__double__Sequence__fini(&msg->dimensions); + // polygon + geometry_msgs__msg__Polygon__fini(&msg->polygon); } bool @@ -57,6 +66,12 @@ shape_msgs__msg__SolidPrimitive__are_equal(const shape_msgs__msg__SolidPrimitive { return false; } + // polygon + if (!geometry_msgs__msg__Polygon__are_equal( + &(lhs->polygon), &(rhs->polygon))) + { + return false; + } return true; } @@ -76,6 +91,12 @@ shape_msgs__msg__SolidPrimitive__copy( { return false; } + // polygon + if (!geometry_msgs__msg__Polygon__copy( + &(input->polygon), &(output->polygon))) + { + return false; + } return true; } @@ -224,22 +245,27 @@ shape_msgs__msg__SolidPrimitive__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(shape_msgs__msg__SolidPrimitive); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); shape_msgs__msg__SolidPrimitive * data = - (shape_msgs__msg__SolidPrimitive *)realloc(output->data, allocation_size); + (shape_msgs__msg__SolidPrimitive *)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 (!shape_msgs__msg__SolidPrimitive__init(&data[i])) { - /* free currently allocated and return false */ + if (!shape_msgs__msg__SolidPrimitive__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; ) { - shape_msgs__msg__SolidPrimitive__fini(&data[i]); + shape_msgs__msg__SolidPrimitive__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__functions.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__functions.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__functions.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__functions.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h index f271c5a63..bbde8fb1e 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_shape_msgs__msg__SolidPrimitive( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs size_t max_serialized_size_shape_msgs__msg__SolidPrimitive( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_shape_msgs diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp index 3011bd7cc..977801706 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_shape_msgs max_serialized_size_SolidPrimitive( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.h new file mode 100644 index 000000000..64e40a52f --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.h @@ -0,0 +1,172 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ +#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'BOX'. +enum +{ + shape_msgs__msg__SolidPrimitive__BOX = 1 +}; + +/// Constant 'SPHERE'. +enum +{ + shape_msgs__msg__SolidPrimitive__SPHERE = 2 +}; + +/// Constant 'CYLINDER'. +enum +{ + shape_msgs__msg__SolidPrimitive__CYLINDER = 3 +}; + +/// Constant 'CONE'. +enum +{ + shape_msgs__msg__SolidPrimitive__CONE = 4 +}; + +/// Constant 'PRISM'. +enum +{ + shape_msgs__msg__SolidPrimitive__PRISM = 5 +}; + +/// Constant 'BOX_X'. +/** + * The meaning of the shape dimensions: each constant defines the index in the 'dimensions' array. + * For type BOX, the X, Y, and Z dimensions are the length of the corresponding sides of the box. + */ +enum +{ + shape_msgs__msg__SolidPrimitive__BOX_X = 0 +}; + +/// Constant 'BOX_Y'. +enum +{ + shape_msgs__msg__SolidPrimitive__BOX_Y = 1 +}; + +/// Constant 'BOX_Z'. +enum +{ + shape_msgs__msg__SolidPrimitive__BOX_Z = 2 +}; + +/// Constant 'SPHERE_RADIUS'. +/** + * For the SPHERE type, only one component is used, and it gives the radius of the sphere. + */ +enum +{ + shape_msgs__msg__SolidPrimitive__SPHERE_RADIUS = 0 +}; + +/// Constant 'CYLINDER_HEIGHT'. +/** + * For the CYLINDER and CONE types, the center line is oriented along the Z axis. + * Therefore the CYLINDER_HEIGHT (CONE_HEIGHT) component of dimensions gives the + * height of the cylinder (cone). + * The CYLINDER_RADIUS (CONE_RADIUS) component of dimensions gives the radius of + * the base of the cylinder (cone). + * Cone and cylinder primitives are defined to be circular. The tip of the cone + * is pointing up, along +Z axis. + */ +enum +{ + shape_msgs__msg__SolidPrimitive__CYLINDER_HEIGHT = 0 +}; + +/// Constant 'CYLINDER_RADIUS'. +enum +{ + shape_msgs__msg__SolidPrimitive__CYLINDER_RADIUS = 1 +}; + +/// Constant 'CONE_HEIGHT'. +enum +{ + shape_msgs__msg__SolidPrimitive__CONE_HEIGHT = 0 +}; + +/// Constant 'CONE_RADIUS'. +enum +{ + shape_msgs__msg__SolidPrimitive__CONE_RADIUS = 1 +}; + +/// Constant 'PRISM_HEIGHT'. +/** + * For the type PRISM, the center line is oriented along Z axis. + * The PRISM_HEIGHT component of dimensions gives the + * height of the prism. + * The polygon defines the Z axis centered base of the prism. + * The prism is constructed by extruding the base in +Z and -Z + * directions by half of the PRISM_HEIGHT + * Only x and y fields of the points are used in the polygon. + * Points of the polygon are ordered counter-clockwise. + */ +enum +{ + shape_msgs__msg__SolidPrimitive__PRISM_HEIGHT = 0 +}; + +// Include directives for member types +// Member 'dimensions' +#include "rosidl_runtime_c/primitives_sequence.h" +// Member 'polygon' +#include "geometry_msgs/msg/detail/polygon__struct.h" + +// constants for array fields with an upper bound +// dimensions +enum +{ + shape_msgs__msg__SolidPrimitive__dimensions__MAX_SIZE = 3 +}; + +/// Struct defined in msg/SolidPrimitive in the package shape_msgs. +/** + * Defines box, sphere, cylinder, cone and prism. + * All shapes are defined to have their bounding boxes centered around 0,0,0. + */ +typedef struct shape_msgs__msg__SolidPrimitive +{ + /// The type of the shape + uint8_t type; + /// The dimensions of the shape + /// At no point will dimensions have a length > 3. + rosidl_runtime_c__double__Sequence dimensions; + geometry_msgs__msg__Polygon polygon; +} shape_msgs__msg__SolidPrimitive; + +// Struct for a sequence of shape_msgs__msg__SolidPrimitive. +typedef struct shape_msgs__msg__SolidPrimitive__Sequence +{ + shape_msgs__msg__SolidPrimitive * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} shape_msgs__msg__SolidPrimitive__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_H_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.hpp new file mode 100644 index 000000000..c444eb11d --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__struct.hpp @@ -0,0 +1,258 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'polygon' +#include "geometry_msgs/msg/detail/polygon__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__shape_msgs__msg__SolidPrimitive __attribute__((deprecated)) +#else +# define DEPRECATED__shape_msgs__msg__SolidPrimitive __declspec(deprecated) +#endif + +namespace shape_msgs +{ + +namespace msg +{ + +// message struct +template +struct SolidPrimitive_ +{ + using Type = SolidPrimitive_; + + explicit SolidPrimitive_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : polygon(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->type = 0; + } + } + + explicit SolidPrimitive_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : polygon(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->type = 0; + } + } + + // field types and members + using _type_type = + uint8_t; + _type_type type; + using _dimensions_type = + rosidl_runtime_cpp::BoundedVector::template rebind_alloc>; + _dimensions_type dimensions; + using _polygon_type = + geometry_msgs::msg::Polygon_; + _polygon_type polygon; + + // setters for named parameter idiom + Type & set__type( + const uint8_t & _arg) + { + this->type = _arg; + return *this; + } + Type & set__dimensions( + const rosidl_runtime_cpp::BoundedVector::template rebind_alloc> & _arg) + { + this->dimensions = _arg; + return *this; + } + Type & set__polygon( + const geometry_msgs::msg::Polygon_ & _arg) + { + this->polygon = _arg; + return *this; + } + + // constant declarations + static constexpr uint8_t BOX = + 1u; + static constexpr uint8_t SPHERE = + 2u; + static constexpr uint8_t CYLINDER = + 3u; + static constexpr uint8_t CONE = + 4u; + static constexpr uint8_t PRISM = + 5u; + static constexpr uint8_t BOX_X = + 0u; + static constexpr uint8_t BOX_Y = + 1u; + static constexpr uint8_t BOX_Z = + 2u; + static constexpr uint8_t SPHERE_RADIUS = + 0u; + static constexpr uint8_t CYLINDER_HEIGHT = + 0u; + static constexpr uint8_t CYLINDER_RADIUS = + 1u; + static constexpr uint8_t CONE_HEIGHT = + 0u; + static constexpr uint8_t CONE_RADIUS = + 1u; + static constexpr uint8_t PRISM_HEIGHT = + 0u; + + // pointer types + using RawPtr = + shape_msgs::msg::SolidPrimitive_ *; + using ConstRawPtr = + const shape_msgs::msg::SolidPrimitive_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__shape_msgs__msg__SolidPrimitive + std::shared_ptr> + Ptr; + typedef DEPRECATED__shape_msgs__msg__SolidPrimitive + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SolidPrimitive_ & other) const + { + if (this->type != other.type) { + return false; + } + if (this->dimensions != other.dimensions) { + return false; + } + if (this->polygon != other.polygon) { + return false; + } + return true; + } + bool operator!=(const SolidPrimitive_ & other) const + { + return !this->operator==(other); + } +}; // struct SolidPrimitive_ + +// alias to use template instance with default allocator +using SolidPrimitive = + shape_msgs::msg::SolidPrimitive_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::BOX; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::SPHERE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CYLINDER; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CONE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::PRISM; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::BOX_X; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::BOX_Y; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::BOX_Z; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::SPHERE_RADIUS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CYLINDER_HEIGHT; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CYLINDER_RADIUS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CONE_HEIGHT; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::CONE_RADIUS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr uint8_t SolidPrimitive_::PRISM_HEIGHT; +#endif // __cplusplus < 201703L + +} // namespace msg + +} // namespace shape_msgs + +#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__traits.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__traits.hpp new file mode 100644 index 000000000..62b81c6c7 --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__traits.hpp @@ -0,0 +1,167 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "shape_msgs/msg/detail/solid_primitive__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'polygon' +#include "geometry_msgs/msg/detail/polygon__traits.hpp" + +namespace shape_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const SolidPrimitive & msg, + std::ostream & out) +{ + out << "{"; + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: dimensions + { + if (msg.dimensions.size() == 0) { + out << "dimensions: []"; + } else { + out << "dimensions: ["; + size_t pending_items = msg.dimensions.size(); + for (auto item : msg.dimensions) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: polygon + { + out << "polygon: "; + to_flow_style_yaml(msg.polygon, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SolidPrimitive & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: dimensions + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.dimensions.size() == 0) { + out << "dimensions: []\n"; + } else { + out << "dimensions:\n"; + for (auto item : msg.dimensions) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: polygon + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "polygon:\n"; + to_block_style_yaml(msg.polygon, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SolidPrimitive & 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 shape_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use shape_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const shape_msgs::msg::SolidPrimitive & msg, + std::ostream & out, size_t indentation = 0) +{ + shape_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use shape_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const shape_msgs::msg::SolidPrimitive & msg) +{ + return shape_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "shape_msgs::msg::SolidPrimitive"; +} + +template<> +inline const char * name() +{ + return "shape_msgs/msg/SolidPrimitive"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.c b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.c new file mode 100644 index 000000000..1920a346d --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.c @@ -0,0 +1,182 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#include +#include "shape_msgs/msg/detail/solid_primitive__rosidl_typesupport_introspection_c.h" +#include "shape_msgs/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 "shape_msgs/msg/detail/solid_primitive__functions.h" +#include "shape_msgs/msg/detail/solid_primitive__struct.h" + + +// Include directives for member types +// Member `dimensions` +#include "rosidl_runtime_c/primitives_sequence_functions.h" +// Member `polygon` +#include "geometry_msgs/msg/polygon.h" +// Member `polygon` +#include "geometry_msgs/msg/detail/polygon__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_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; + shape_msgs__msg__SolidPrimitive__init(message_memory); +} + +void shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_fini_function(void * message_memory) +{ + shape_msgs__msg__SolidPrimitive__fini(message_memory); +} + +size_t shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__size_function__SolidPrimitive__dimensions( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_const_function__SolidPrimitive__dimensions( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_function__SolidPrimitive__dimensions( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__fetch_function__SolidPrimitive__dimensions( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_const_function__SolidPrimitive__dimensions(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__assign_function__SolidPrimitive__dimensions( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_function__SolidPrimitive__dimensions(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__resize_function__SolidPrimitive__dimensions( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_member_array[3] = { + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(shape_msgs__msg__SolidPrimitive, type), // 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 + }, + { + "dimensions", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + true, // is upper bound + offsetof(shape_msgs__msg__SolidPrimitive, dimensions), // bytes offset in struct + NULL, // default value + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__size_function__SolidPrimitive__dimensions, // size() function pointer + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_const_function__SolidPrimitive__dimensions, // get_const(index) function pointer + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__get_function__SolidPrimitive__dimensions, // get(index) function pointer + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__fetch_function__SolidPrimitive__dimensions, // fetch(index, &value) function pointer + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__assign_function__SolidPrimitive__dimensions, // assign(index, value) function pointer + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__resize_function__SolidPrimitive__dimensions // resize(index) function pointer + }, + { + "polygon", // 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(shape_msgs__msg__SolidPrimitive, polygon), // 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 shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_members = { + "shape_msgs__msg", // message namespace + "SolidPrimitive", // message name + 3, // number of fields + sizeof(shape_msgs__msg__SolidPrimitive), + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_member_array, // message members + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_init_function, // function to initialize message memory (memory has to be allocated) + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_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 shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle = { + 0, + &shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_shape_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, shape_msgs, msg, SolidPrimitive)() { + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Polygon)(); + if (!shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle.typesupport_identifier) { + shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &shape_msgs__msg__SolidPrimitive__rosidl_typesupport_introspection_c__SolidPrimitive_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.cpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.cpp new file mode 100644 index 000000000..62e71f358 --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.cpp @@ -0,0 +1,188 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from shape_msgs:msg/SolidPrimitive.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 "shape_msgs/msg/detail/solid_primitive__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 shape_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SolidPrimitive_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) shape_msgs::msg::SolidPrimitive(_init); +} + +void SolidPrimitive_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SolidPrimitive(); +} + +size_t size_function__SolidPrimitive__dimensions(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__SolidPrimitive__dimensions(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SolidPrimitive__dimensions(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__SolidPrimitive__dimensions( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SolidPrimitive__dimensions(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SolidPrimitive__dimensions( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SolidPrimitive__dimensions(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__SolidPrimitive__dimensions(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SolidPrimitive_message_member_array[3] = { + { + "type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(shape_msgs::msg::SolidPrimitive, type), // 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 + }, + { + "dimensions", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + true, // is upper bound + offsetof(shape_msgs::msg::SolidPrimitive, dimensions), // bytes offset in struct + nullptr, // default value + size_function__SolidPrimitive__dimensions, // size() function pointer + get_const_function__SolidPrimitive__dimensions, // get_const(index) function pointer + get_function__SolidPrimitive__dimensions, // get(index) function pointer + fetch_function__SolidPrimitive__dimensions, // fetch(index, &value) function pointer + assign_function__SolidPrimitive__dimensions, // assign(index, value) function pointer + resize_function__SolidPrimitive__dimensions // resize(index) function pointer + }, + { + "polygon", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(shape_msgs::msg::SolidPrimitive, polygon), // 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 SolidPrimitive_message_members = { + "shape_msgs::msg", // message namespace + "SolidPrimitive", // message name + 3, // number of fields + sizeof(shape_msgs::msg::SolidPrimitive), + SolidPrimitive_message_member_array, // message members + SolidPrimitive_init_function, // function to initialize message memory (memory has to be allocated) + SolidPrimitive_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SolidPrimitive_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SolidPrimitive_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace shape_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::shape_msgs::msg::rosidl_typesupport_introspection_cpp::SolidPrimitive_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, shape_msgs, msg, SolidPrimitive)() { + return &::shape_msgs::msg::rosidl_typesupport_introspection_cpp::SolidPrimitive_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/detail/solid_primitive__type_support.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.h diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.hpp new file mode 100644 index 000000000..da3b30ddf --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/detail/solid_primitive__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from shape_msgs:msg/SolidPrimitive.idl +// generated code does not contain a copyright notice + +#ifndef SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TYPE_SUPPORT_HPP_ +#define SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "shape_msgs/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_shape_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + shape_msgs, + msg, + SolidPrimitive +)(); +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__DETAIL__SOLID_PRIMITIVE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/mesh.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/mesh.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/mesh.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh.hpp similarity index 87% rename from ThirdParty/ros/include/shape_msgs/msg/mesh.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh.hpp index d8c24bd33..be6e255fe 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/mesh.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh.hpp @@ -7,5 +7,6 @@ #include "shape_msgs/msg/detail/mesh__struct.hpp" #include "shape_msgs/msg/detail/mesh__builder.hpp" #include "shape_msgs/msg/detail/mesh__traits.hpp" +#include "shape_msgs/msg/detail/mesh__type_support.hpp" #endif // SHAPE_MSGS__MSG__MESH_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/mesh_triangle.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh_triangle.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/mesh_triangle.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh_triangle.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/mesh_triangle.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh_triangle.hpp similarity index 86% rename from ThirdParty/ros/include/shape_msgs/msg/mesh_triangle.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh_triangle.hpp index bccb4636d..de9184a4a 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/mesh_triangle.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/mesh_triangle.hpp @@ -7,5 +7,6 @@ #include "shape_msgs/msg/detail/mesh_triangle__struct.hpp" #include "shape_msgs/msg/detail/mesh_triangle__builder.hpp" #include "shape_msgs/msg/detail/mesh_triangle__traits.hpp" +#include "shape_msgs/msg/detail/mesh_triangle__type_support.hpp" #endif // SHAPE_MSGS__MSG__MESH_TRIANGLE_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/plane.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/plane.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/plane.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/plane.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/plane.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/plane.hpp similarity index 86% rename from ThirdParty/ros/include/shape_msgs/msg/plane.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/plane.hpp index 8dcbdc08d..8e8ba49c6 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/plane.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/plane.hpp @@ -7,5 +7,6 @@ #include "shape_msgs/msg/detail/plane__struct.hpp" #include "shape_msgs/msg/detail/plane__builder.hpp" #include "shape_msgs/msg/detail/plane__traits.hpp" +#include "shape_msgs/msg/detail/plane__type_support.hpp" #endif // SHAPE_MSGS__MSG__PLANE_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..90c47c12c --- /dev/null +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 SHAPE_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define SHAPE_MSGS__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_shape_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_shape_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_shape_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_shape_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_shape_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_shape_msgs ROSIDL_GENERATOR_CPP_EXPORT_shape_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_shape_msgs ROSIDL_GENERATOR_CPP_IMPORT_shape_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_shape_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_shape_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_shape_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_shape_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // SHAPE_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/solid_primitive.h b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/solid_primitive.h similarity index 100% rename from ThirdParty/ros/include/shape_msgs/msg/solid_primitive.h rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/solid_primitive.h diff --git a/ThirdParty/ros/include/shape_msgs/msg/solid_primitive.hpp b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/solid_primitive.hpp similarity index 86% rename from ThirdParty/ros/include/shape_msgs/msg/solid_primitive.hpp rename to ThirdParty/ros/include/shape_msgs/shape_msgs/msg/solid_primitive.hpp index 0982c622b..f56ccb4d4 100644 --- a/ThirdParty/ros/include/shape_msgs/msg/solid_primitive.hpp +++ b/ThirdParty/ros/include/shape_msgs/shape_msgs/msg/solid_primitive.hpp @@ -7,5 +7,6 @@ #include "shape_msgs/msg/detail/solid_primitive__struct.hpp" #include "shape_msgs/msg/detail/solid_primitive__builder.hpp" #include "shape_msgs/msg/detail/solid_primitive__traits.hpp" +#include "shape_msgs/msg/detail/solid_primitive__type_support.hpp" #endif // SHAPE_MSGS__MSG__SOLID_PRIMITIVE_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/bool.hpp b/ThirdParty/ros/include/std_msgs/msg/bool.hpp deleted file mode 100644 index 5ace46d76..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/bool.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__BOOL_HPP_ -#define STD_MSGS__MSG__BOOL_HPP_ - -#include "std_msgs/msg/detail/bool__struct.hpp" -#include "std_msgs/msg/detail/bool__builder.hpp" -#include "std_msgs/msg/detail/bool__traits.hpp" - -#endif // STD_MSGS__MSG__BOOL_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/byte.hpp b/ThirdParty/ros/include/std_msgs/msg/byte.hpp deleted file mode 100644 index 3d0cb8e0c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/byte.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__BYTE_HPP_ -#define STD_MSGS__MSG__BYTE_HPP_ - -#include "std_msgs/msg/detail/byte__struct.hpp" -#include "std_msgs/msg/detail/byte__builder.hpp" -#include "std_msgs/msg/detail/byte__traits.hpp" - -#endif // STD_MSGS__MSG__BYTE_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/byte_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/byte_multi_array.hpp deleted file mode 100644 index c91edaeaf..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/byte_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" -#include "std_msgs/msg/detail/byte_multi_array__builder.hpp" -#include "std_msgs/msg/detail/byte_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/char.hpp b/ThirdParty/ros/include/std_msgs/msg/char.hpp deleted file mode 100644 index 9455a28d8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/char.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__CHAR_HPP_ -#define STD_MSGS__MSG__CHAR_HPP_ - -#include "std_msgs/msg/detail/char__struct.hpp" -#include "std_msgs/msg/detail/char__builder.hpp" -#include "std_msgs/msg/detail/char__traits.hpp" - -#endif // STD_MSGS__MSG__CHAR_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/bool__builder.hpp deleted file mode 100644 index 6e59fe743..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ - -#include "std_msgs/msg/detail/bool__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Bool_data -{ -public: - Init_Bool_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Bool data(::std_msgs::msg::Bool::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Bool msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Bool>() -{ - return std_msgs::msg::builder::Init_Bool_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/bool__functions.c deleted file mode 100644 index f7e104416..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/bool__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Bool__init(std_msgs__msg__Bool * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Bool__fini(std_msgs__msg__Bool * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Bool__are_equal(const std_msgs__msg__Bool * lhs, const std_msgs__msg__Bool * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Bool__copy( - const std_msgs__msg__Bool * input, - std_msgs__msg__Bool * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Bool * -std_msgs__msg__Bool__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Bool * msg = (std_msgs__msg__Bool *)allocator.allocate(sizeof(std_msgs__msg__Bool), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Bool)); - bool success = std_msgs__msg__Bool__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Bool__destroy(std_msgs__msg__Bool * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Bool__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Bool__Sequence__init(std_msgs__msg__Bool__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Bool * data = NULL; - - if (size) { - data = (std_msgs__msg__Bool *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Bool), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Bool__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Bool__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Bool__Sequence__fini(std_msgs__msg__Bool__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) { - std_msgs__msg__Bool__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); - } -} - -std_msgs__msg__Bool__Sequence * -std_msgs__msg__Bool__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Bool__Sequence * array = (std_msgs__msg__Bool__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Bool__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Bool__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Bool__Sequence__destroy(std_msgs__msg__Bool__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Bool__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Bool__Sequence__are_equal(const std_msgs__msg__Bool__Sequence * lhs, const std_msgs__msg__Bool__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Bool__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Bool__Sequence__copy( - const std_msgs__msg__Bool__Sequence * input, - std_msgs__msg__Bool__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Bool); - std_msgs__msg__Bool * data = - (std_msgs__msg__Bool *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Bool__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Bool__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Bool__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 525b0d410..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Bool( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Bool( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Bool)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 7d965c628..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/bool__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Bool & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Bool & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Bool & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Bool( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Bool)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.h deleted file mode 100644 index 377c21fc3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Bool in the package std_msgs. -typedef struct std_msgs__msg__Bool -{ - bool data; -} std_msgs__msg__Bool; - -// Struct for a sequence of std_msgs__msg__Bool. -typedef struct std_msgs__msg__Bool__Sequence -{ - std_msgs__msg__Bool * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Bool__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.hpp deleted file mode 100644 index d826fdfaf..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Bool __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Bool __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Bool_ -{ - using Type = Bool_; - - explicit Bool_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = false; - } - } - - explicit Bool_(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->data = false; - } - } - - // field types and members - using _data_type = - bool; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const bool & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Bool_ *; - using ConstRawPtr = - const std_msgs::msg::Bool_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Bool - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Bool - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Bool_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Bool_ & other) const - { - return !this->operator==(other); - } -}; // struct Bool_ - -// alias to use template instance with default allocator -using Bool = - std_msgs::msg::Bool_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/bool__traits.hpp deleted file mode 100644 index 3e1fbe324..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ - -#include "std_msgs/msg/detail/bool__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Bool"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Bool"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.c deleted file mode 100644 index 1f7fd99db..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Bool.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/bool__functions.h" -#include "std_msgs/msg/detail/bool__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Bool__rosidl_typesupport_introspection_c__Bool_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; - std_msgs__msg__Bool__init(message_memory); -} - -void Bool__rosidl_typesupport_introspection_c__Bool_fini_function(void * message_memory) -{ - std_msgs__msg__Bool__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Bool__rosidl_typesupport_introspection_c__Bool_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Bool, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Bool__rosidl_typesupport_introspection_c__Bool_message_members = { - "std_msgs__msg", // message namespace - "Bool", // message name - 1, // number of fields - sizeof(std_msgs__msg__Bool), - Bool__rosidl_typesupport_introspection_c__Bool_message_member_array, // message members - Bool__rosidl_typesupport_introspection_c__Bool_init_function, // function to initialize message memory (memory has to be allocated) - Bool__rosidl_typesupport_introspection_c__Bool_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 Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle = { - 0, - &Bool__rosidl_typesupport_introspection_c__Bool_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Bool)() { - if (!Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier) { - Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.cpp deleted file mode 100644 index 2a1789596..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Bool.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 "std_msgs/msg/detail/bool__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Bool_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Bool(_init); -} - -void Bool_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Bool(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Bool_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Bool, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Bool_message_members = { - "std_msgs::msg", // message namespace - "Bool", // message name - 1, // number of fields - sizeof(std_msgs::msg::Bool), - Bool_message_member_array, // message members - Bool_init_function, // function to initialize message memory (memory has to be allocated) - Bool_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Bool_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Bool_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Bool_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, std_msgs, msg, Bool)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Bool_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte__builder.hpp deleted file mode 100644 index c4f41bd16..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ - -#include "std_msgs/msg/detail/byte__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Byte_data -{ -public: - Init_Byte_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Byte data(::std_msgs::msg::Byte::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Byte msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Byte>() -{ - return std_msgs::msg::builder::Init_Byte_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/byte__functions.c deleted file mode 100644 index ea27afdb7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/byte__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Byte__init(std_msgs__msg__Byte * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Byte__fini(std_msgs__msg__Byte * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Byte__are_equal(const std_msgs__msg__Byte * lhs, const std_msgs__msg__Byte * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Byte__copy( - const std_msgs__msg__Byte * input, - std_msgs__msg__Byte * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Byte * -std_msgs__msg__Byte__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Byte * msg = (std_msgs__msg__Byte *)allocator.allocate(sizeof(std_msgs__msg__Byte), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Byte)); - bool success = std_msgs__msg__Byte__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Byte__destroy(std_msgs__msg__Byte * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Byte__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Byte__Sequence__init(std_msgs__msg__Byte__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Byte * data = NULL; - - if (size) { - data = (std_msgs__msg__Byte *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Byte), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Byte__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Byte__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Byte__Sequence__fini(std_msgs__msg__Byte__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) { - std_msgs__msg__Byte__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); - } -} - -std_msgs__msg__Byte__Sequence * -std_msgs__msg__Byte__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Byte__Sequence * array = (std_msgs__msg__Byte__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Byte__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Byte__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Byte__Sequence__destroy(std_msgs__msg__Byte__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Byte__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Byte__Sequence__are_equal(const std_msgs__msg__Byte__Sequence * lhs, const std_msgs__msg__Byte__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Byte__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Byte__Sequence__copy( - const std_msgs__msg__Byte__Sequence * input, - std_msgs__msg__Byte__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Byte); - std_msgs__msg__Byte * data = - (std_msgs__msg__Byte *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Byte__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Byte__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Byte__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index a4a38043a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Byte( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Byte( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Byte)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index b1b3083c1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/byte__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Byte & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Byte & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Byte & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Byte( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Byte)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.h deleted file mode 100644 index aee17b3b7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Byte in the package std_msgs. -typedef struct std_msgs__msg__Byte -{ - uint8_t data; -} std_msgs__msg__Byte; - -// Struct for a sequence of std_msgs__msg__Byte. -typedef struct std_msgs__msg__Byte__Sequence -{ - std_msgs__msg__Byte * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Byte__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.hpp deleted file mode 100644 index 37183dd3e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Byte __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Byte __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Byte_ -{ - using Type = Byte_; - - explicit Byte_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Byte_(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->data = 0; - } - } - - // field types and members - using _data_type = - unsigned char; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const unsigned char & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Byte_ *; - using ConstRawPtr = - const std_msgs::msg::Byte_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Byte - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Byte - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Byte_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Byte_ & other) const - { - return !this->operator==(other); - } -}; // struct Byte_ - -// alias to use template instance with default allocator -using Byte = - std_msgs::msg::Byte_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte__traits.hpp deleted file mode 100644 index b7d980f0e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ - -#include "std_msgs/msg/detail/byte__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Byte"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Byte"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.c deleted file mode 100644 index f27676202..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Byte.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/byte__functions.h" -#include "std_msgs/msg/detail/byte__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Byte__rosidl_typesupport_introspection_c__Byte_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; - std_msgs__msg__Byte__init(message_memory); -} - -void Byte__rosidl_typesupport_introspection_c__Byte_fini_function(void * message_memory) -{ - std_msgs__msg__Byte__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Byte__rosidl_typesupport_introspection_c__Byte_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Byte, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Byte__rosidl_typesupport_introspection_c__Byte_message_members = { - "std_msgs__msg", // message namespace - "Byte", // message name - 1, // number of fields - sizeof(std_msgs__msg__Byte), - Byte__rosidl_typesupport_introspection_c__Byte_message_member_array, // message members - Byte__rosidl_typesupport_introspection_c__Byte_init_function, // function to initialize message memory (memory has to be allocated) - Byte__rosidl_typesupport_introspection_c__Byte_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 Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle = { - 0, - &Byte__rosidl_typesupport_introspection_c__Byte_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Byte)() { - if (!Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier) { - Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.cpp deleted file mode 100644 index 3f6fd8ec1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Byte.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 "std_msgs/msg/detail/byte__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Byte_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Byte(_init); -} - -void Byte_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Byte(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Byte_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Byte, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Byte_message_members = { - "std_msgs::msg", // message namespace - "Byte", // message name - 1, // number of fields - sizeof(std_msgs::msg::Byte), - Byte_message_member_array, // message members - Byte_init_function, // function to initialize message memory (memory has to be allocated) - Byte_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Byte_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Byte_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Byte_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, std_msgs, msg, Byte)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Byte_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__builder.hpp deleted file mode 100644 index 3bb2d7f7d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_ByteMultiArray_data -{ -public: - explicit Init_ByteMultiArray_data(::std_msgs::msg::ByteMultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::ByteMultiArray data(::std_msgs::msg::ByteMultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::ByteMultiArray msg_; -}; - -class Init_ByteMultiArray_layout -{ -public: - Init_ByteMultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_ByteMultiArray_data layout(::std_msgs::msg::ByteMultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_ByteMultiArray_data(msg_); - } - -private: - ::std_msgs::msg::ByteMultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::ByteMultiArray>() -{ - return std_msgs::msg::builder::Init_ByteMultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__functions.c deleted file mode 100644 index 6c9a6f908..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/byte_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__ByteMultiArray__init(std_msgs__msg__ByteMultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__ByteMultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__init(&msg->data, 0)) { - std_msgs__msg__ByteMultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__ByteMultiArray__fini(std_msgs__msg__ByteMultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__octet__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__ByteMultiArray__are_equal(const std_msgs__msg__ByteMultiArray * lhs, const std_msgs__msg__ByteMultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__ByteMultiArray__copy( - const std_msgs__msg__ByteMultiArray * input, - std_msgs__msg__ByteMultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__octet__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__ByteMultiArray * -std_msgs__msg__ByteMultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__ByteMultiArray * msg = (std_msgs__msg__ByteMultiArray *)allocator.allocate(sizeof(std_msgs__msg__ByteMultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__ByteMultiArray)); - bool success = std_msgs__msg__ByteMultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__ByteMultiArray__destroy(std_msgs__msg__ByteMultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__ByteMultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__ByteMultiArray__Sequence__init(std_msgs__msg__ByteMultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__ByteMultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__ByteMultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__ByteMultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__ByteMultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__ByteMultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__ByteMultiArray__Sequence__fini(std_msgs__msg__ByteMultiArray__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) { - std_msgs__msg__ByteMultiArray__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); - } -} - -std_msgs__msg__ByteMultiArray__Sequence * -std_msgs__msg__ByteMultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__ByteMultiArray__Sequence * array = (std_msgs__msg__ByteMultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__ByteMultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__ByteMultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__ByteMultiArray__Sequence__destroy(std_msgs__msg__ByteMultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__ByteMultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__ByteMultiArray__Sequence__are_equal(const std_msgs__msg__ByteMultiArray__Sequence * lhs, const std_msgs__msg__ByteMultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__ByteMultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__ByteMultiArray__Sequence__copy( - const std_msgs__msg__ByteMultiArray__Sequence * input, - std_msgs__msg__ByteMultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__ByteMultiArray); - std_msgs__msg__ByteMultiArray * data = - (std_msgs__msg__ByteMultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__ByteMultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__ByteMultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__ByteMultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index d3c19a43b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__ByteMultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__ByteMultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, ByteMultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a900e18ce..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/byte_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::ByteMultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::ByteMultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::ByteMultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_ByteMultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, ByteMultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.h deleted file mode 100644 index db2d8b6ef..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/ByteMultiArray in the package std_msgs. -typedef struct std_msgs__msg__ByteMultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__octet__Sequence data; -} std_msgs__msg__ByteMultiArray; - -// Struct for a sequence of std_msgs__msg__ByteMultiArray. -typedef struct std_msgs__msg__ByteMultiArray__Sequence -{ - std_msgs__msg__ByteMultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__ByteMultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.hpp deleted file mode 100644 index 8032dfd05..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__ByteMultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__ByteMultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct ByteMultiArray_ -{ - using Type = ByteMultiArray_; - - explicit ByteMultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit ByteMultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::ByteMultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::ByteMultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__ByteMultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__ByteMultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const ByteMultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const ByteMultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct ByteMultiArray_ - -// alias to use template instance with default allocator -using ByteMultiArray = - std_msgs::msg::ByteMultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__traits.hpp deleted file mode 100644 index 78b4a4bfd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::ByteMultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/ByteMultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.c deleted file mode 100644 index 7fd34fadc..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/ByteMultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/byte_multi_array__functions.h" -#include "std_msgs/msg/detail/byte_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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; - std_msgs__msg__ByteMultiArray__init(message_memory); -} - -void ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__ByteMultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__ByteMultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__ByteMultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members = { - "std_msgs__msg", // message namespace - "ByteMultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__ByteMultiArray), - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array, // message members - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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 ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle = { - 0, - &ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ByteMultiArray)() { - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier) { - ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.cpp deleted file mode 100644 index 78eabb836..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/ByteMultiArray.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 "std_msgs/msg/detail/byte_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void ByteMultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::ByteMultiArray(_init); -} - -void ByteMultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~ByteMultiArray(); -} - -size_t size_function__ByteMultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__ByteMultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__ByteMultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__ByteMultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember ByteMultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::ByteMultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::ByteMultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__ByteMultiArray__data, // size() function pointer - get_const_function__ByteMultiArray__data, // get_const(index) function pointer - get_function__ByteMultiArray__data, // get(index) function pointer - resize_function__ByteMultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers ByteMultiArray_message_members = { - "std_msgs::msg", // message namespace - "ByteMultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::ByteMultiArray), - ByteMultiArray_message_member_array, // message members - ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) - ByteMultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t ByteMultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &ByteMultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_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, std_msgs, msg, ByteMultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/char__builder.hpp deleted file mode 100644 index 53533a136..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ - -#include "std_msgs/msg/detail/char__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Char_data -{ -public: - Init_Char_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Char data(::std_msgs::msg::Char::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Char msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Char>() -{ - return std_msgs::msg::builder::Init_Char_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/char__functions.c deleted file mode 100644 index c6366ad3f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/char__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Char__init(std_msgs__msg__Char * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Char__fini(std_msgs__msg__Char * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Char__are_equal(const std_msgs__msg__Char * lhs, const std_msgs__msg__Char * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Char__copy( - const std_msgs__msg__Char * input, - std_msgs__msg__Char * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Char * -std_msgs__msg__Char__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Char * msg = (std_msgs__msg__Char *)allocator.allocate(sizeof(std_msgs__msg__Char), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Char)); - bool success = std_msgs__msg__Char__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Char__destroy(std_msgs__msg__Char * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Char__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Char__Sequence__init(std_msgs__msg__Char__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Char * data = NULL; - - if (size) { - data = (std_msgs__msg__Char *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Char), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Char__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Char__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Char__Sequence__fini(std_msgs__msg__Char__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) { - std_msgs__msg__Char__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); - } -} - -std_msgs__msg__Char__Sequence * -std_msgs__msg__Char__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Char__Sequence * array = (std_msgs__msg__Char__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Char__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Char__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Char__Sequence__destroy(std_msgs__msg__Char__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Char__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Char__Sequence__are_equal(const std_msgs__msg__Char__Sequence * lhs, const std_msgs__msg__Char__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Char__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Char__Sequence__copy( - const std_msgs__msg__Char__Sequence * input, - std_msgs__msg__Char__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Char); - std_msgs__msg__Char * data = - (std_msgs__msg__Char *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Char__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Char__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Char__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index c605f1db2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Char( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Char( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Char)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a1e6fb5bf..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/char__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Char & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Char & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Char & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Char( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Char)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.h deleted file mode 100644 index 8cf8df360..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Char in the package std_msgs. -typedef struct std_msgs__msg__Char -{ - uint8_t data; -} std_msgs__msg__Char; - -// Struct for a sequence of std_msgs__msg__Char. -typedef struct std_msgs__msg__Char__Sequence -{ - std_msgs__msg__Char * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Char__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.hpp deleted file mode 100644 index 01a10d75a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Char __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Char __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Char_ -{ - using Type = Char_; - - explicit Char_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Char_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Char_ *; - using ConstRawPtr = - const std_msgs::msg::Char_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Char - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Char - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Char_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Char_ & other) const - { - return !this->operator==(other); - } -}; // struct Char_ - -// alias to use template instance with default allocator -using Char = - std_msgs::msg::Char_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/char__traits.hpp deleted file mode 100644 index 020ea8b8e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ - -#include "std_msgs/msg/detail/char__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Char"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Char"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.c deleted file mode 100644 index 561a40412..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Char.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/char__functions.h" -#include "std_msgs/msg/detail/char__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Char__rosidl_typesupport_introspection_c__Char_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; - std_msgs__msg__Char__init(message_memory); -} - -void Char__rosidl_typesupport_introspection_c__Char_fini_function(void * message_memory) -{ - std_msgs__msg__Char__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Char__rosidl_typesupport_introspection_c__Char_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Char, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Char__rosidl_typesupport_introspection_c__Char_message_members = { - "std_msgs__msg", // message namespace - "Char", // message name - 1, // number of fields - sizeof(std_msgs__msg__Char), - Char__rosidl_typesupport_introspection_c__Char_message_member_array, // message members - Char__rosidl_typesupport_introspection_c__Char_init_function, // function to initialize message memory (memory has to be allocated) - Char__rosidl_typesupport_introspection_c__Char_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 Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle = { - 0, - &Char__rosidl_typesupport_introspection_c__Char_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Char)() { - if (!Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier) { - Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.cpp deleted file mode 100644 index 8fe2b6f42..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Char.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 "std_msgs/msg/detail/char__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Char_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Char(_init); -} - -void Char_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Char(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Char_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Char, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Char_message_members = { - "std_msgs::msg", // message namespace - "Char", // message name - 1, // number of fields - sizeof(std_msgs::msg::Char), - Char_message_member_array, // message members - Char_init_function, // function to initialize message memory (memory has to be allocated) - Char_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Char_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Char_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Char_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, std_msgs, msg, Char)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Char_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__traits.hpp deleted file mode 100644 index 680d56200..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/ColorRGBA.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ - -#include "std_msgs/msg/detail/color_rgba__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::ColorRGBA"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/ColorRGBA"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.c deleted file mode 100644 index 89bb0271f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.c +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/ColorRGBA.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/color_rgba__functions.h" -#include "std_msgs/msg/detail/color_rgba__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_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; - std_msgs__msg__ColorRGBA__init(message_memory); -} - -void ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_fini_function(void * message_memory) -{ - std_msgs__msg__ColorRGBA__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_member_array[4] = { - { - "r", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__ColorRGBA, r), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "g", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__ColorRGBA, g), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "b", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__ColorRGBA, b), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "a", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__ColorRGBA, a), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_members = { - "std_msgs__msg", // message namespace - "ColorRGBA", // message name - 4, // number of fields - sizeof(std_msgs__msg__ColorRGBA), - ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_member_array, // message members - ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_init_function, // function to initialize message memory (memory has to be allocated) - ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_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 ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle = { - 0, - &ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)() { - if (!ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle.typesupport_identifier) { - ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/empty__builder.hpp deleted file mode 100644 index c1c9c5344..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__builder.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/empty__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Empty>() -{ - return ::std_msgs::msg::Empty(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/empty__functions.c deleted file mode 100644 index 9de7b5c05..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/empty__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Empty__init(std_msgs__msg__Empty * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -std_msgs__msg__Empty__fini(std_msgs__msg__Empty * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -std_msgs__msg__Empty__are_equal(const std_msgs__msg__Empty * lhs, const std_msgs__msg__Empty * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -std_msgs__msg__Empty__copy( - const std_msgs__msg__Empty * input, - std_msgs__msg__Empty * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -std_msgs__msg__Empty * -std_msgs__msg__Empty__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Empty * msg = (std_msgs__msg__Empty *)allocator.allocate(sizeof(std_msgs__msg__Empty), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Empty)); - bool success = std_msgs__msg__Empty__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Empty__destroy(std_msgs__msg__Empty * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Empty__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Empty__Sequence__init(std_msgs__msg__Empty__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Empty * data = NULL; - - if (size) { - data = (std_msgs__msg__Empty *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Empty), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Empty__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Empty__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Empty__Sequence__fini(std_msgs__msg__Empty__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) { - std_msgs__msg__Empty__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); - } -} - -std_msgs__msg__Empty__Sequence * -std_msgs__msg__Empty__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Empty__Sequence * array = (std_msgs__msg__Empty__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Empty__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Empty__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Empty__Sequence__destroy(std_msgs__msg__Empty__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Empty__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Empty__Sequence__are_equal(const std_msgs__msg__Empty__Sequence * lhs, const std_msgs__msg__Empty__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Empty__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Empty__Sequence__copy( - const std_msgs__msg__Empty__Sequence * input, - std_msgs__msg__Empty__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Empty); - std_msgs__msg__Empty * data = - (std_msgs__msg__Empty *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Empty__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Empty__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Empty__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index ab297c66c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Empty( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Empty( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index a44cdeb92..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/empty__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Empty & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Empty & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Empty & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Empty( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.h deleted file mode 100644 index 4aaa201d4..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Empty in the package std_msgs. -typedef struct std_msgs__msg__Empty -{ - uint8_t structure_needs_at_least_one_member; -} std_msgs__msg__Empty; - -// Struct for a sequence of std_msgs__msg__Empty. -typedef struct std_msgs__msg__Empty__Sequence -{ - std_msgs__msg__Empty * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Empty__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.hpp deleted file mode 100644 index b9377dd44..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__struct.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Empty __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Empty __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Empty_ -{ - using Type = Empty_; - - explicit Empty_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->structure_needs_at_least_one_member = 0; - } - } - - explicit Empty_(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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Empty_ *; - using ConstRawPtr = - const std_msgs::msg::Empty_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Empty - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Empty - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Empty_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Empty_ & other) const - { - return !this->operator==(other); - } -}; // struct Empty_ - -// alias to use template instance with default allocator -using Empty = - std_msgs::msg::Empty_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/empty__traits.hpp deleted file mode 100644 index 6cd017e33..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/empty__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Empty"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Empty"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.c deleted file mode 100644 index b5905819e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Empty.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/empty__functions.h" -#include "std_msgs/msg/detail/empty__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Empty__rosidl_typesupport_introspection_c__Empty_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; - std_msgs__msg__Empty__init(message_memory); -} - -void Empty__rosidl_typesupport_introspection_c__Empty_fini_function(void * message_memory) -{ - std_msgs__msg__Empty__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Empty__rosidl_typesupport_introspection_c__Empty_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Empty, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Empty__rosidl_typesupport_introspection_c__Empty_message_members = { - "std_msgs__msg", // message namespace - "Empty", // message name - 1, // number of fields - sizeof(std_msgs__msg__Empty), - Empty__rosidl_typesupport_introspection_c__Empty_message_member_array, // message members - Empty__rosidl_typesupport_introspection_c__Empty_init_function, // function to initialize message memory (memory has to be allocated) - Empty__rosidl_typesupport_introspection_c__Empty_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 Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle = { - 0, - &Empty__rosidl_typesupport_introspection_c__Empty_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Empty)() { - if (!Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier) { - Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.cpp deleted file mode 100644 index 3c7f7f2e9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Empty.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 "std_msgs/msg/detail/empty__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Empty_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Empty(_init); -} - -void Empty_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Empty(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Empty, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Empty_message_members = { - "std_msgs::msg", // message namespace - "Empty", // message name - 1, // number of fields - sizeof(std_msgs::msg::Empty), - Empty_message_member_array, // message members - Empty_init_function, // function to initialize message memory (memory has to be allocated) - Empty_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Empty_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Empty_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Empty_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, std_msgs, msg, Empty)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Empty_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32__builder.hpp deleted file mode 100644 index 00acd6e91..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ - -#include "std_msgs/msg/detail/float32__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float32_data -{ -public: - Init_Float32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Float32 data(::std_msgs::msg::Float32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Float32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Float32>() -{ - return std_msgs::msg::builder::Init_Float32_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/float32__functions.c deleted file mode 100644 index 08fabf1e1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/float32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Float32__init(std_msgs__msg__Float32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Float32__fini(std_msgs__msg__Float32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Float32__are_equal(const std_msgs__msg__Float32 * lhs, const std_msgs__msg__Float32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Float32__copy( - const std_msgs__msg__Float32 * input, - std_msgs__msg__Float32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Float32 * -std_msgs__msg__Float32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32 * msg = (std_msgs__msg__Float32 *)allocator.allocate(sizeof(std_msgs__msg__Float32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Float32)); - bool success = std_msgs__msg__Float32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Float32__destroy(std_msgs__msg__Float32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Float32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Float32__Sequence__init(std_msgs__msg__Float32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32 * data = NULL; - - if (size) { - data = (std_msgs__msg__Float32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Float32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Float32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Float32__Sequence__fini(std_msgs__msg__Float32__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) { - std_msgs__msg__Float32__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); - } -} - -std_msgs__msg__Float32__Sequence * -std_msgs__msg__Float32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32__Sequence * array = (std_msgs__msg__Float32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Float32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Float32__Sequence__destroy(std_msgs__msg__Float32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Float32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Float32__Sequence__are_equal(const std_msgs__msg__Float32__Sequence * lhs, const std_msgs__msg__Float32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Float32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Float32__Sequence__copy( - const std_msgs__msg__Float32__Sequence * input, - std_msgs__msg__Float32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Float32); - std_msgs__msg__Float32 * data = - (std_msgs__msg__Float32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Float32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Float32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Float32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 115388cff..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Float32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Float32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index f202fa110..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/float32__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Float32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Float32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Float32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Float32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.h deleted file mode 100644 index 371ea2cb8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Float32 in the package std_msgs. -typedef struct std_msgs__msg__Float32 -{ - float data; -} std_msgs__msg__Float32; - -// Struct for a sequence of std_msgs__msg__Float32. -typedef struct std_msgs__msg__Float32__Sequence -{ - std_msgs__msg__Float32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Float32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.hpp deleted file mode 100644 index 5869f3353..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Float32 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Float32 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Float32_ -{ - using Type = Float32_; - - explicit Float32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0.0f; - } - } - - explicit Float32_(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->data = 0.0f; - } - } - - // field types and members - using _data_type = - float; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const float & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Float32_ *; - using ConstRawPtr = - const std_msgs::msg::Float32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Float32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Float32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float32_ & other) const - { - return !this->operator==(other); - } -}; // struct Float32_ - -// alias to use template instance with default allocator -using Float32 = - std_msgs::msg::Float32_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32__traits.hpp deleted file mode 100644 index af6bb8cba..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ - -#include "std_msgs/msg/detail/float32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Float32"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Float32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.c deleted file mode 100644 index d8f5e6eeb..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Float32.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/float32__functions.h" -#include "std_msgs/msg/detail/float32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float32__rosidl_typesupport_introspection_c__Float32_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; - std_msgs__msg__Float32__init(message_memory); -} - -void Float32__rosidl_typesupport_introspection_c__Float32_fini_function(void * message_memory) -{ - std_msgs__msg__Float32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float32__rosidl_typesupport_introspection_c__Float32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Float32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float32__rosidl_typesupport_introspection_c__Float32_message_members = { - "std_msgs__msg", // message namespace - "Float32", // message name - 1, // number of fields - sizeof(std_msgs__msg__Float32), - Float32__rosidl_typesupport_introspection_c__Float32_message_member_array, // message members - Float32__rosidl_typesupport_introspection_c__Float32_init_function, // function to initialize message memory (memory has to be allocated) - Float32__rosidl_typesupport_introspection_c__Float32_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 Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle = { - 0, - &Float32__rosidl_typesupport_introspection_c__Float32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float32)() { - if (!Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier) { - Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.cpp deleted file mode 100644 index a7a4dbd02..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Float32.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 "std_msgs/msg/detail/float32__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Float32(_init); -} - -void Float32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Float32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32_message_members = { - "std_msgs::msg", // message namespace - "Float32", // message name - 1, // number of fields - sizeof(std_msgs::msg::Float32), - Float32_message_member_array, // message members - Float32_init_function, // function to initialize message memory (memory has to be allocated) - Float32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32_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, std_msgs, msg, Float32)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__builder.hpp deleted file mode 100644 index 3a1bf6e99..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float32MultiArray_data -{ -public: - explicit Init_Float32MultiArray_data(::std_msgs::msg::Float32MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Float32MultiArray data(::std_msgs::msg::Float32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Float32MultiArray msg_; -}; - -class Init_Float32MultiArray_layout -{ -public: - Init_Float32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Float32MultiArray_data layout(::std_msgs::msg::Float32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Float32MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Float32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Float32MultiArray>() -{ - return std_msgs::msg::builder::Init_Float32MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__functions.c deleted file mode 100644 index 0c383bcc4..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/float32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Float32MultiArray__init(std_msgs__msg__Float32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Float32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Float32MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Float32MultiArray__fini(std_msgs__msg__Float32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__float__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Float32MultiArray__are_equal(const std_msgs__msg__Float32MultiArray * lhs, const std_msgs__msg__Float32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Float32MultiArray__copy( - const std_msgs__msg__Float32MultiArray * input, - std_msgs__msg__Float32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__float__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Float32MultiArray * -std_msgs__msg__Float32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32MultiArray * msg = (std_msgs__msg__Float32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Float32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Float32MultiArray)); - bool success = std_msgs__msg__Float32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Float32MultiArray__destroy(std_msgs__msg__Float32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Float32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Float32MultiArray__Sequence__init(std_msgs__msg__Float32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Float32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Float32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Float32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Float32MultiArray__Sequence__fini(std_msgs__msg__Float32MultiArray__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) { - std_msgs__msg__Float32MultiArray__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); - } -} - -std_msgs__msg__Float32MultiArray__Sequence * -std_msgs__msg__Float32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float32MultiArray__Sequence * array = (std_msgs__msg__Float32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Float32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Float32MultiArray__Sequence__destroy(std_msgs__msg__Float32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Float32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Float32MultiArray__Sequence__are_equal(const std_msgs__msg__Float32MultiArray__Sequence * lhs, const std_msgs__msg__Float32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Float32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Float32MultiArray__Sequence__copy( - const std_msgs__msg__Float32MultiArray__Sequence * input, - std_msgs__msg__Float32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Float32MultiArray); - std_msgs__msg__Float32MultiArray * data = - (std_msgs__msg__Float32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Float32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Float32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Float32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 81b36df19..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Float32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Float32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index d5509c14f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/float32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Float32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Float32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Float32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Float32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.h deleted file mode 100644 index f6360b818..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Float32MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Float32MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__float__Sequence data; -} std_msgs__msg__Float32MultiArray; - -// Struct for a sequence of std_msgs__msg__Float32MultiArray. -typedef struct std_msgs__msg__Float32MultiArray__Sequence -{ - std_msgs__msg__Float32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Float32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.hpp deleted file mode 100644 index cb9500873..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Float32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Float32MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Float32MultiArray_ -{ - using Type = Float32MultiArray_; - - explicit Float32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Float32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Float32MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Float32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Float32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Float32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Float32MultiArray_ - -// alias to use template instance with default allocator -using Float32MultiArray = - std_msgs::msg::Float32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__traits.hpp deleted file mode 100644 index cc33fa03b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Float32MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Float32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.c deleted file mode 100644 index 62a150389..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Float32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/float32_multi_array__functions.h" -#include "std_msgs/msg/detail/float32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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; - std_msgs__msg__Float32MultiArray__init(message_memory); -} - -void Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Float32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Float32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Float32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Float32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Float32MultiArray), - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array, // message members - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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 Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle = { - 0, - &Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float32MultiArray)() { - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier) { - Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.cpp deleted file mode 100644 index 6600bc9d9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Float32MultiArray.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 "std_msgs/msg/detail/float32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Float32MultiArray(_init); -} - -void Float32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float32MultiArray(); -} - -size_t size_function__Float32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Float32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Float32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Float32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Float32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Float32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Float32MultiArray__data, // size() function pointer - get_const_function__Float32MultiArray__data, // get_const(index) function pointer - get_function__Float32MultiArray__data, // get(index) function pointer - resize_function__Float32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Float32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Float32MultiArray), - Float32MultiArray_message_member_array, // message members - Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_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, std_msgs, msg, Float32MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64__builder.hpp deleted file mode 100644 index a91971fd5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ - -#include "std_msgs/msg/detail/float64__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float64_data -{ -public: - Init_Float64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Float64 data(::std_msgs::msg::Float64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Float64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Float64>() -{ - return std_msgs::msg::builder::Init_Float64_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/float64__functions.c deleted file mode 100644 index 483b4072c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/float64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Float64__init(std_msgs__msg__Float64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Float64__fini(std_msgs__msg__Float64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Float64__are_equal(const std_msgs__msg__Float64 * lhs, const std_msgs__msg__Float64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Float64__copy( - const std_msgs__msg__Float64 * input, - std_msgs__msg__Float64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Float64 * -std_msgs__msg__Float64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64 * msg = (std_msgs__msg__Float64 *)allocator.allocate(sizeof(std_msgs__msg__Float64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Float64)); - bool success = std_msgs__msg__Float64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Float64__destroy(std_msgs__msg__Float64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Float64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Float64__Sequence__init(std_msgs__msg__Float64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64 * data = NULL; - - if (size) { - data = (std_msgs__msg__Float64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Float64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Float64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Float64__Sequence__fini(std_msgs__msg__Float64__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) { - std_msgs__msg__Float64__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); - } -} - -std_msgs__msg__Float64__Sequence * -std_msgs__msg__Float64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64__Sequence * array = (std_msgs__msg__Float64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Float64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Float64__Sequence__destroy(std_msgs__msg__Float64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Float64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Float64__Sequence__are_equal(const std_msgs__msg__Float64__Sequence * lhs, const std_msgs__msg__Float64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Float64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Float64__Sequence__copy( - const std_msgs__msg__Float64__Sequence * input, - std_msgs__msg__Float64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Float64); - std_msgs__msg__Float64 * data = - (std_msgs__msg__Float64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Float64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Float64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Float64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index de8aca446..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Float64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Float64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index e1f045eb8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/float64__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Float64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Float64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Float64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Float64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.h deleted file mode 100644 index 820ed024b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Float64 in the package std_msgs. -typedef struct std_msgs__msg__Float64 -{ - double data; -} std_msgs__msg__Float64; - -// Struct for a sequence of std_msgs__msg__Float64. -typedef struct std_msgs__msg__Float64__Sequence -{ - std_msgs__msg__Float64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Float64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.hpp deleted file mode 100644 index 1d0ebf324..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Float64 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Float64 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Float64_ -{ - using Type = Float64_; - - explicit Float64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0.0; - } - } - - explicit Float64_(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->data = 0.0; - } - } - - // field types and members - using _data_type = - double; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const double & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Float64_ *; - using ConstRawPtr = - const std_msgs::msg::Float64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Float64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Float64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float64_ & other) const - { - return !this->operator==(other); - } -}; // struct Float64_ - -// alias to use template instance with default allocator -using Float64 = - std_msgs::msg::Float64_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64__traits.hpp deleted file mode 100644 index a8bcc6349..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ - -#include "std_msgs/msg/detail/float64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Float64"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Float64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.c deleted file mode 100644 index e08565a15..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Float64.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/float64__functions.h" -#include "std_msgs/msg/detail/float64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float64__rosidl_typesupport_introspection_c__Float64_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; - std_msgs__msg__Float64__init(message_memory); -} - -void Float64__rosidl_typesupport_introspection_c__Float64_fini_function(void * message_memory) -{ - std_msgs__msg__Float64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float64__rosidl_typesupport_introspection_c__Float64_message_member_array[1] = { - { - "data", // 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(std_msgs__msg__Float64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float64__rosidl_typesupport_introspection_c__Float64_message_members = { - "std_msgs__msg", // message namespace - "Float64", // message name - 1, // number of fields - sizeof(std_msgs__msg__Float64), - Float64__rosidl_typesupport_introspection_c__Float64_message_member_array, // message members - Float64__rosidl_typesupport_introspection_c__Float64_init_function, // function to initialize message memory (memory has to be allocated) - Float64__rosidl_typesupport_introspection_c__Float64_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 Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle = { - 0, - &Float64__rosidl_typesupport_introspection_c__Float64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float64)() { - if (!Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier) { - Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.cpp deleted file mode 100644 index 42c489913..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Float64.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 "std_msgs/msg/detail/float64__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Float64(_init); -} - -void Float64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64_message_member_array[1] = { - { - "data", // 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(std_msgs::msg::Float64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64_message_members = { - "std_msgs::msg", // message namespace - "Float64", // message name - 1, // number of fields - sizeof(std_msgs::msg::Float64), - Float64_message_member_array, // message members - Float64_init_function, // function to initialize message memory (memory has to be allocated) - Float64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64_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, std_msgs, msg, Float64)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__builder.hpp deleted file mode 100644 index 1bfb81b1b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Float64MultiArray_data -{ -public: - explicit Init_Float64MultiArray_data(::std_msgs::msg::Float64MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Float64MultiArray data(::std_msgs::msg::Float64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Float64MultiArray msg_; -}; - -class Init_Float64MultiArray_layout -{ -public: - Init_Float64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Float64MultiArray_data layout(::std_msgs::msg::Float64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Float64MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Float64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Float64MultiArray>() -{ - return std_msgs::msg::builder::Init_Float64MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__functions.c deleted file mode 100644 index 05790d05a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/float64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Float64MultiArray__init(std_msgs__msg__Float64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Float64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Float64MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Float64MultiArray__fini(std_msgs__msg__Float64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__double__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Float64MultiArray__are_equal(const std_msgs__msg__Float64MultiArray * lhs, const std_msgs__msg__Float64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Float64MultiArray__copy( - const std_msgs__msg__Float64MultiArray * input, - std_msgs__msg__Float64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__double__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Float64MultiArray * -std_msgs__msg__Float64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64MultiArray * msg = (std_msgs__msg__Float64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Float64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Float64MultiArray)); - bool success = std_msgs__msg__Float64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Float64MultiArray__destroy(std_msgs__msg__Float64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Float64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Float64MultiArray__Sequence__init(std_msgs__msg__Float64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Float64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Float64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Float64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Float64MultiArray__Sequence__fini(std_msgs__msg__Float64MultiArray__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) { - std_msgs__msg__Float64MultiArray__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); - } -} - -std_msgs__msg__Float64MultiArray__Sequence * -std_msgs__msg__Float64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Float64MultiArray__Sequence * array = (std_msgs__msg__Float64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Float64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Float64MultiArray__Sequence__destroy(std_msgs__msg__Float64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Float64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Float64MultiArray__Sequence__are_equal(const std_msgs__msg__Float64MultiArray__Sequence * lhs, const std_msgs__msg__Float64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Float64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Float64MultiArray__Sequence__copy( - const std_msgs__msg__Float64MultiArray__Sequence * input, - std_msgs__msg__Float64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Float64MultiArray); - std_msgs__msg__Float64MultiArray * data = - (std_msgs__msg__Float64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Float64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Float64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Float64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 21fdc67db..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Float64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Float64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 325584904..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/float64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Float64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Float64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Float64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Float64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.h deleted file mode 100644 index a49c83e0f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Float64MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Float64MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__double__Sequence data; -} std_msgs__msg__Float64MultiArray; - -// Struct for a sequence of std_msgs__msg__Float64MultiArray. -typedef struct std_msgs__msg__Float64MultiArray__Sequence -{ - std_msgs__msg__Float64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Float64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.hpp deleted file mode 100644 index 69086e741..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Float64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Float64MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Float64MultiArray_ -{ - using Type = Float64MultiArray_; - - explicit Float64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Float64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Float64MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Float64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Float64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Float64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Float64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Float64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Float64MultiArray_ - -// alias to use template instance with default allocator -using Float64MultiArray = - std_msgs::msg::Float64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__traits.hpp deleted file mode 100644 index 6b65095d7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Float64MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Float64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.c deleted file mode 100644 index 25f8573a1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Float64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/float64_multi_array__functions.h" -#include "std_msgs/msg/detail/float64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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; - std_msgs__msg__Float64MultiArray__init(message_memory); -} - -void Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Float64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Float64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Float64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Float64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Float64MultiArray), - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array, // message members - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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 Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle = { - 0, - &Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float64MultiArray)() { - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier) { - Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.cpp deleted file mode 100644 index bc3d868c6..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Float64MultiArray.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 "std_msgs/msg/detail/float64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Float64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Float64MultiArray(_init); -} - -void Float64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Float64MultiArray(); -} - -size_t size_function__Float64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Float64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Float64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Float64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Float64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Float64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Float64MultiArray__data, // size() function pointer - get_const_function__Float64MultiArray__data, // get_const(index) function pointer - get_function__Float64MultiArray__data, // get(index) function pointer - resize_function__Float64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Float64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Float64MultiArray), - Float64MultiArray_message_member_array, // message members - Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Float64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Float64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Float64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_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, std_msgs, msg, Float64MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/header__traits.hpp deleted file mode 100644 index 89f9ca13d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Header.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ - -#include "std_msgs/msg/detail/header__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'stamp' -#include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Header"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Header"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.c deleted file mode 100644 index 8bf265b9a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Header.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/header__functions.h" -#include "std_msgs/msg/detail/header__struct.h" - - -// Include directives for member types -// Member `stamp` -#include "builtin_interfaces/msg/time.h" -// Member `stamp` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `frame_id` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Header__rosidl_typesupport_introspection_c__Header_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; - std_msgs__msg__Header__init(message_memory); -} - -void Header__rosidl_typesupport_introspection_c__Header_fini_function(void * message_memory) -{ - std_msgs__msg__Header__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Header__rosidl_typesupport_introspection_c__Header_message_member_array[2] = { - { - "stamp", // 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(std_msgs__msg__Header, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "frame_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Header, frame_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Header__rosidl_typesupport_introspection_c__Header_message_members = { - "std_msgs__msg", // message namespace - "Header", // message name - 2, // number of fields - sizeof(std_msgs__msg__Header), - Header__rosidl_typesupport_introspection_c__Header_message_member_array, // message members - Header__rosidl_typesupport_introspection_c__Header_init_function, // function to initialize message memory (memory has to be allocated) - Header__rosidl_typesupport_introspection_c__Header_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 Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle = { - 0, - &Header__rosidl_typesupport_introspection_c__Header_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)() { - Header__rosidl_typesupport_introspection_c__Header_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle.typesupport_identifier) { - Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16__builder.hpp deleted file mode 100644 index dc3d32f03..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int16__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int16_data -{ -public: - Init_Int16_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Int16 data(::std_msgs::msg::Int16::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int16 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int16>() -{ - return std_msgs::msg::builder::Init_Int16_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int16__functions.c deleted file mode 100644 index b12340414..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int16__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Int16__init(std_msgs__msg__Int16 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Int16__fini(std_msgs__msg__Int16 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Int16__are_equal(const std_msgs__msg__Int16 * lhs, const std_msgs__msg__Int16 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Int16__copy( - const std_msgs__msg__Int16 * input, - std_msgs__msg__Int16 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Int16 * -std_msgs__msg__Int16__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16 * msg = (std_msgs__msg__Int16 *)allocator.allocate(sizeof(std_msgs__msg__Int16), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int16)); - bool success = std_msgs__msg__Int16__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int16__destroy(std_msgs__msg__Int16 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int16__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int16__Sequence__init(std_msgs__msg__Int16__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16 * data = NULL; - - if (size) { - data = (std_msgs__msg__Int16 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int16), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int16__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int16__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int16__Sequence__fini(std_msgs__msg__Int16__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) { - std_msgs__msg__Int16__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); - } -} - -std_msgs__msg__Int16__Sequence * -std_msgs__msg__Int16__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16__Sequence * array = (std_msgs__msg__Int16__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int16__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int16__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int16__Sequence__destroy(std_msgs__msg__Int16__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int16__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int16__Sequence__are_equal(const std_msgs__msg__Int16__Sequence * lhs, const std_msgs__msg__Int16__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int16__Sequence__copy( - const std_msgs__msg__Int16__Sequence * input, - std_msgs__msg__Int16__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int16); - std_msgs__msg__Int16 * data = - (std_msgs__msg__Int16 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int16__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int16__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int16__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 330f5a94c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int16( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int16( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int16)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 5167fd94b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int16__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int16 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int16 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int16 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int16( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int16)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.h deleted file mode 100644 index 420f64594..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int16 in the package std_msgs. -typedef struct std_msgs__msg__Int16 -{ - int16_t data; -} std_msgs__msg__Int16; - -// Struct for a sequence of std_msgs__msg__Int16. -typedef struct std_msgs__msg__Int16__Sequence -{ - std_msgs__msg__Int16 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int16__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.hpp deleted file mode 100644 index 4b8397912..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int16 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int16 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int16_ -{ - using Type = Int16_; - - explicit Int16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Int16_(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->data = 0; - } - } - - // field types and members - using _data_type = - int16_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int16_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int16_ *; - using ConstRawPtr = - const std_msgs::msg::Int16_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int16 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int16 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int16_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int16_ & other) const - { - return !this->operator==(other); - } -}; // struct Int16_ - -// alias to use template instance with default allocator -using Int16 = - std_msgs::msg::Int16_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16__traits.hpp deleted file mode 100644 index aa7fb6d7c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int16__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int16"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int16"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.c deleted file mode 100644 index 97de79d39..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int16.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int16__functions.h" -#include "std_msgs/msg/detail/int16__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int16__rosidl_typesupport_introspection_c__Int16_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; - std_msgs__msg__Int16__init(message_memory); -} - -void Int16__rosidl_typesupport_introspection_c__Int16_fini_function(void * message_memory) -{ - std_msgs__msg__Int16__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int16__rosidl_typesupport_introspection_c__Int16_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int16, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int16__rosidl_typesupport_introspection_c__Int16_message_members = { - "std_msgs__msg", // message namespace - "Int16", // message name - 1, // number of fields - sizeof(std_msgs__msg__Int16), - Int16__rosidl_typesupport_introspection_c__Int16_message_member_array, // message members - Int16__rosidl_typesupport_introspection_c__Int16_init_function, // function to initialize message memory (memory has to be allocated) - Int16__rosidl_typesupport_introspection_c__Int16_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 Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle = { - 0, - &Int16__rosidl_typesupport_introspection_c__Int16_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int16)() { - if (!Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier) { - Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.cpp deleted file mode 100644 index 717ab67df..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int16.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 "std_msgs/msg/detail/int16__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int16_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int16(_init); -} - -void Int16_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int16(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int16, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16_message_members = { - "std_msgs::msg", // message namespace - "Int16", // message name - 1, // number of fields - sizeof(std_msgs::msg::Int16), - Int16_message_member_array, // message members - Int16_init_function, // function to initialize message memory (memory has to be allocated) - Int16_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int16_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int16_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16_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, std_msgs, msg, Int16)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__builder.hpp deleted file mode 100644 index 24ba43c54..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int16MultiArray_data -{ -public: - explicit Init_Int16MultiArray_data(::std_msgs::msg::Int16MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Int16MultiArray data(::std_msgs::msg::Int16MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int16MultiArray msg_; -}; - -class Init_Int16MultiArray_layout -{ -public: - Init_Int16MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int16MultiArray_data layout(::std_msgs::msg::Int16MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int16MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Int16MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int16MultiArray>() -{ - return std_msgs::msg::builder::Init_Int16MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__functions.c deleted file mode 100644 index 0857900d0..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int16_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Int16MultiArray__init(std_msgs__msg__Int16MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Int16MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Int16MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Int16MultiArray__fini(std_msgs__msg__Int16MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int16__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Int16MultiArray__are_equal(const std_msgs__msg__Int16MultiArray * lhs, const std_msgs__msg__Int16MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Int16MultiArray__copy( - const std_msgs__msg__Int16MultiArray * input, - std_msgs__msg__Int16MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int16__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Int16MultiArray * -std_msgs__msg__Int16MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16MultiArray * msg = (std_msgs__msg__Int16MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int16MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int16MultiArray)); - bool success = std_msgs__msg__Int16MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int16MultiArray__destroy(std_msgs__msg__Int16MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int16MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int16MultiArray__Sequence__init(std_msgs__msg__Int16MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Int16MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int16MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int16MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int16MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int16MultiArray__Sequence__fini(std_msgs__msg__Int16MultiArray__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) { - std_msgs__msg__Int16MultiArray__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); - } -} - -std_msgs__msg__Int16MultiArray__Sequence * -std_msgs__msg__Int16MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int16MultiArray__Sequence * array = (std_msgs__msg__Int16MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int16MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int16MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int16MultiArray__Sequence__destroy(std_msgs__msg__Int16MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int16MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int16MultiArray__Sequence__are_equal(const std_msgs__msg__Int16MultiArray__Sequence * lhs, const std_msgs__msg__Int16MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int16MultiArray__Sequence__copy( - const std_msgs__msg__Int16MultiArray__Sequence * input, - std_msgs__msg__Int16MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int16MultiArray); - std_msgs__msg__Int16MultiArray * data = - (std_msgs__msg__Int16MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int16MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int16MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int16MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index fa82cefbd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int16MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int16MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 53b35fcfb..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int16_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int16MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int16MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int16MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int16MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.h deleted file mode 100644 index 6ffe5dd9f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int16MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Int16MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__int16__Sequence data; -} std_msgs__msg__Int16MultiArray; - -// Struct for a sequence of std_msgs__msg__Int16MultiArray. -typedef struct std_msgs__msg__Int16MultiArray__Sequence -{ - std_msgs__msg__Int16MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int16MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.hpp deleted file mode 100644 index 9e84e0081..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int16MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int16MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int16MultiArray_ -{ - using Type = Int16MultiArray_; - - explicit Int16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int16MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Int16MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int16MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int16MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int16MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int16MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int16MultiArray_ - -// alias to use template instance with default allocator -using Int16MultiArray = - std_msgs::msg::Int16MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__traits.hpp deleted file mode 100644 index b7e459af8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int16MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int16MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.c deleted file mode 100644 index c568ce3cc..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int16MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int16_multi_array__functions.h" -#include "std_msgs/msg/detail/int16_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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; - std_msgs__msg__Int16MultiArray__init(message_memory); -} - -void Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Int16MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Int16MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int16MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Int16MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Int16MultiArray), - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array, // message members - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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 Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle = { - 0, - &Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int16MultiArray)() { - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier) { - Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.cpp deleted file mode 100644 index 64b360a06..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int16MultiArray.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 "std_msgs/msg/detail/int16_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int16MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int16MultiArray(_init); -} - -void Int16MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int16MultiArray(); -} - -size_t size_function__Int16MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int16MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int16MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int16MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int16MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int16MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int16MultiArray__data, // size() function pointer - get_const_function__Int16MultiArray__data, // get_const(index) function pointer - get_function__Int16MultiArray__data, // get(index) function pointer - resize_function__Int16MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Int16MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Int16MultiArray), - Int16MultiArray_message_member_array, // message members - Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int16MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int16MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_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, std_msgs, msg, Int16MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32__builder.hpp deleted file mode 100644 index c306dcc4d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int32__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int32_data -{ -public: - Init_Int32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Int32 data(::std_msgs::msg::Int32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int32>() -{ - return std_msgs::msg::builder::Init_Int32_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int32__functions.c deleted file mode 100644 index ae76c3885..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Int32__init(std_msgs__msg__Int32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Int32__fini(std_msgs__msg__Int32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Int32__are_equal(const std_msgs__msg__Int32 * lhs, const std_msgs__msg__Int32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Int32__copy( - const std_msgs__msg__Int32 * input, - std_msgs__msg__Int32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Int32 * -std_msgs__msg__Int32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32 * msg = (std_msgs__msg__Int32 *)allocator.allocate(sizeof(std_msgs__msg__Int32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int32)); - bool success = std_msgs__msg__Int32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int32__destroy(std_msgs__msg__Int32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int32__Sequence__init(std_msgs__msg__Int32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32 * data = NULL; - - if (size) { - data = (std_msgs__msg__Int32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int32__Sequence__fini(std_msgs__msg__Int32__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) { - std_msgs__msg__Int32__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); - } -} - -std_msgs__msg__Int32__Sequence * -std_msgs__msg__Int32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32__Sequence * array = (std_msgs__msg__Int32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int32__Sequence__destroy(std_msgs__msg__Int32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int32__Sequence__are_equal(const std_msgs__msg__Int32__Sequence * lhs, const std_msgs__msg__Int32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int32__Sequence__copy( - const std_msgs__msg__Int32__Sequence * input, - std_msgs__msg__Int32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int32); - std_msgs__msg__Int32 * data = - (std_msgs__msg__Int32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 41ae219f3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 4277b3a5b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int32__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.h deleted file mode 100644 index 46e1dc3f9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int32 in the package std_msgs. -typedef struct std_msgs__msg__Int32 -{ - int32_t data; -} std_msgs__msg__Int32; - -// Struct for a sequence of std_msgs__msg__Int32. -typedef struct std_msgs__msg__Int32__Sequence -{ - std_msgs__msg__Int32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.hpp deleted file mode 100644 index c540020b1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int32 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int32 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int32_ -{ - using Type = Int32_; - - explicit Int32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0l; - } - } - - explicit Int32_(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->data = 0l; - } - } - - // field types and members - using _data_type = - int32_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int32_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int32_ *; - using ConstRawPtr = - const std_msgs::msg::Int32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int32_ & other) const - { - return !this->operator==(other); - } -}; // struct Int32_ - -// alias to use template instance with default allocator -using Int32 = - std_msgs::msg::Int32_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32__traits.hpp deleted file mode 100644 index 2fc866932..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int32"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.c deleted file mode 100644 index f151465ae..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int32.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int32__functions.h" -#include "std_msgs/msg/detail/int32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int32__rosidl_typesupport_introspection_c__Int32_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; - std_msgs__msg__Int32__init(message_memory); -} - -void Int32__rosidl_typesupport_introspection_c__Int32_fini_function(void * message_memory) -{ - std_msgs__msg__Int32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int32__rosidl_typesupport_introspection_c__Int32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int32__rosidl_typesupport_introspection_c__Int32_message_members = { - "std_msgs__msg", // message namespace - "Int32", // message name - 1, // number of fields - sizeof(std_msgs__msg__Int32), - Int32__rosidl_typesupport_introspection_c__Int32_message_member_array, // message members - Int32__rosidl_typesupport_introspection_c__Int32_init_function, // function to initialize message memory (memory has to be allocated) - Int32__rosidl_typesupport_introspection_c__Int32_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 Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle = { - 0, - &Int32__rosidl_typesupport_introspection_c__Int32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int32)() { - if (!Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier) { - Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.cpp deleted file mode 100644 index c766b06ec..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int32.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 "std_msgs/msg/detail/int32__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int32(_init); -} - -void Int32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32_message_members = { - "std_msgs::msg", // message namespace - "Int32", // message name - 1, // number of fields - sizeof(std_msgs::msg::Int32), - Int32_message_member_array, // message members - Int32_init_function, // function to initialize message memory (memory has to be allocated) - Int32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32_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, std_msgs, msg, Int32)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__builder.hpp deleted file mode 100644 index 3fc4435ee..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int32MultiArray_data -{ -public: - explicit Init_Int32MultiArray_data(::std_msgs::msg::Int32MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Int32MultiArray data(::std_msgs::msg::Int32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int32MultiArray msg_; -}; - -class Init_Int32MultiArray_layout -{ -public: - Init_Int32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int32MultiArray_data layout(::std_msgs::msg::Int32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int32MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Int32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int32MultiArray>() -{ - return std_msgs::msg::builder::Init_Int32MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__functions.c deleted file mode 100644 index 3e16b62c5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Int32MultiArray__init(std_msgs__msg__Int32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Int32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Int32MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Int32MultiArray__fini(std_msgs__msg__Int32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int32__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Int32MultiArray__are_equal(const std_msgs__msg__Int32MultiArray * lhs, const std_msgs__msg__Int32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Int32MultiArray__copy( - const std_msgs__msg__Int32MultiArray * input, - std_msgs__msg__Int32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int32__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Int32MultiArray * -std_msgs__msg__Int32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32MultiArray * msg = (std_msgs__msg__Int32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int32MultiArray)); - bool success = std_msgs__msg__Int32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int32MultiArray__destroy(std_msgs__msg__Int32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int32MultiArray__Sequence__init(std_msgs__msg__Int32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Int32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int32MultiArray__Sequence__fini(std_msgs__msg__Int32MultiArray__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) { - std_msgs__msg__Int32MultiArray__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); - } -} - -std_msgs__msg__Int32MultiArray__Sequence * -std_msgs__msg__Int32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int32MultiArray__Sequence * array = (std_msgs__msg__Int32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int32MultiArray__Sequence__destroy(std_msgs__msg__Int32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int32MultiArray__Sequence__are_equal(const std_msgs__msg__Int32MultiArray__Sequence * lhs, const std_msgs__msg__Int32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int32MultiArray__Sequence__copy( - const std_msgs__msg__Int32MultiArray__Sequence * input, - std_msgs__msg__Int32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int32MultiArray); - std_msgs__msg__Int32MultiArray * data = - (std_msgs__msg__Int32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index ffa01440f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index f1cad46a1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.h deleted file mode 100644 index f4b1166d8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int32MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Int32MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__int32__Sequence data; -} std_msgs__msg__Int32MultiArray; - -// Struct for a sequence of std_msgs__msg__Int32MultiArray. -typedef struct std_msgs__msg__Int32MultiArray__Sequence -{ - std_msgs__msg__Int32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.hpp deleted file mode 100644 index aa7f4aacc..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int32MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int32MultiArray_ -{ - using Type = Int32MultiArray_; - - explicit Int32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int32MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Int32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int32MultiArray_ - -// alias to use template instance with default allocator -using Int32MultiArray = - std_msgs::msg::Int32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__traits.hpp deleted file mode 100644 index 2e72d3042..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int32MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.c deleted file mode 100644 index 904fa1001..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int32_multi_array__functions.h" -#include "std_msgs/msg/detail/int32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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; - std_msgs__msg__Int32MultiArray__init(message_memory); -} - -void Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Int32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Int32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Int32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Int32MultiArray), - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array, // message members - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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 Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle = { - 0, - &Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int32MultiArray)() { - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier) { - Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.cpp deleted file mode 100644 index 89e277b00..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int32MultiArray.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 "std_msgs/msg/detail/int32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int32MultiArray(_init); -} - -void Int32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int32MultiArray(); -} - -size_t size_function__Int32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int32MultiArray__data, // size() function pointer - get_const_function__Int32MultiArray__data, // get_const(index) function pointer - get_function__Int32MultiArray__data, // get(index) function pointer - resize_function__Int32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Int32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Int32MultiArray), - Int32MultiArray_message_member_array, // message members - Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_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, std_msgs, msg, Int32MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64__builder.hpp deleted file mode 100644 index 246da1ce9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int64__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int64_data -{ -public: - Init_Int64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Int64 data(::std_msgs::msg::Int64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int64>() -{ - return std_msgs::msg::builder::Init_Int64_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int64__functions.c deleted file mode 100644 index 2c2d09c95..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Int64__init(std_msgs__msg__Int64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Int64__fini(std_msgs__msg__Int64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Int64__are_equal(const std_msgs__msg__Int64 * lhs, const std_msgs__msg__Int64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Int64__copy( - const std_msgs__msg__Int64 * input, - std_msgs__msg__Int64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Int64 * -std_msgs__msg__Int64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64 * msg = (std_msgs__msg__Int64 *)allocator.allocate(sizeof(std_msgs__msg__Int64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int64)); - bool success = std_msgs__msg__Int64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int64__destroy(std_msgs__msg__Int64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int64__Sequence__init(std_msgs__msg__Int64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64 * data = NULL; - - if (size) { - data = (std_msgs__msg__Int64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int64__Sequence__fini(std_msgs__msg__Int64__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) { - std_msgs__msg__Int64__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); - } -} - -std_msgs__msg__Int64__Sequence * -std_msgs__msg__Int64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64__Sequence * array = (std_msgs__msg__Int64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int64__Sequence__destroy(std_msgs__msg__Int64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int64__Sequence__are_equal(const std_msgs__msg__Int64__Sequence * lhs, const std_msgs__msg__Int64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int64__Sequence__copy( - const std_msgs__msg__Int64__Sequence * input, - std_msgs__msg__Int64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int64); - std_msgs__msg__Int64 * data = - (std_msgs__msg__Int64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index a1444d475..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index e97263adb..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int64__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.h deleted file mode 100644 index 951d0cbfd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int64 in the package std_msgs. -typedef struct std_msgs__msg__Int64 -{ - int64_t data; -} std_msgs__msg__Int64; - -// Struct for a sequence of std_msgs__msg__Int64. -typedef struct std_msgs__msg__Int64__Sequence -{ - std_msgs__msg__Int64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.hpp deleted file mode 100644 index 684b10d72..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int64 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int64 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int64_ -{ - using Type = Int64_; - - explicit Int64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ll; - } - } - - explicit Int64_(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->data = 0ll; - } - } - - // field types and members - using _data_type = - int64_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int64_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int64_ *; - using ConstRawPtr = - const std_msgs::msg::Int64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int64_ & other) const - { - return !this->operator==(other); - } -}; // struct Int64_ - -// alias to use template instance with default allocator -using Int64 = - std_msgs::msg::Int64_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64__traits.hpp deleted file mode 100644 index 25b109dc3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int64"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.c deleted file mode 100644 index 9ab10590c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int64.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int64__functions.h" -#include "std_msgs/msg/detail/int64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int64__rosidl_typesupport_introspection_c__Int64_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; - std_msgs__msg__Int64__init(message_memory); -} - -void Int64__rosidl_typesupport_introspection_c__Int64_fini_function(void * message_memory) -{ - std_msgs__msg__Int64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int64__rosidl_typesupport_introspection_c__Int64_message_member_array[1] = { - { - "data", // 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(std_msgs__msg__Int64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int64__rosidl_typesupport_introspection_c__Int64_message_members = { - "std_msgs__msg", // message namespace - "Int64", // message name - 1, // number of fields - sizeof(std_msgs__msg__Int64), - Int64__rosidl_typesupport_introspection_c__Int64_message_member_array, // message members - Int64__rosidl_typesupport_introspection_c__Int64_init_function, // function to initialize message memory (memory has to be allocated) - Int64__rosidl_typesupport_introspection_c__Int64_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 Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle = { - 0, - &Int64__rosidl_typesupport_introspection_c__Int64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int64)() { - if (!Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier) { - Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.cpp deleted file mode 100644 index 5268694f9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int64.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 "std_msgs/msg/detail/int64__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int64(_init); -} - -void Int64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64_message_member_array[1] = { - { - "data", // 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(std_msgs::msg::Int64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64_message_members = { - "std_msgs::msg", // message namespace - "Int64", // message name - 1, // number of fields - sizeof(std_msgs::msg::Int64), - Int64_message_member_array, // message members - Int64_init_function, // function to initialize message memory (memory has to be allocated) - Int64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64_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, std_msgs, msg, Int64)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__builder.hpp deleted file mode 100644 index 493baa264..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int64MultiArray_data -{ -public: - explicit Init_Int64MultiArray_data(::std_msgs::msg::Int64MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Int64MultiArray data(::std_msgs::msg::Int64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int64MultiArray msg_; -}; - -class Init_Int64MultiArray_layout -{ -public: - Init_Int64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int64MultiArray_data layout(::std_msgs::msg::Int64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int64MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Int64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int64MultiArray>() -{ - return std_msgs::msg::builder::Init_Int64MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__functions.c deleted file mode 100644 index 089c7aae7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Int64MultiArray__init(std_msgs__msg__Int64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Int64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Int64MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Int64MultiArray__fini(std_msgs__msg__Int64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int64__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Int64MultiArray__are_equal(const std_msgs__msg__Int64MultiArray * lhs, const std_msgs__msg__Int64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Int64MultiArray__copy( - const std_msgs__msg__Int64MultiArray * input, - std_msgs__msg__Int64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int64__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Int64MultiArray * -std_msgs__msg__Int64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64MultiArray * msg = (std_msgs__msg__Int64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int64MultiArray)); - bool success = std_msgs__msg__Int64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int64MultiArray__destroy(std_msgs__msg__Int64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int64MultiArray__Sequence__init(std_msgs__msg__Int64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Int64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int64MultiArray__Sequence__fini(std_msgs__msg__Int64MultiArray__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) { - std_msgs__msg__Int64MultiArray__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); - } -} - -std_msgs__msg__Int64MultiArray__Sequence * -std_msgs__msg__Int64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int64MultiArray__Sequence * array = (std_msgs__msg__Int64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int64MultiArray__Sequence__destroy(std_msgs__msg__Int64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int64MultiArray__Sequence__are_equal(const std_msgs__msg__Int64MultiArray__Sequence * lhs, const std_msgs__msg__Int64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int64MultiArray__Sequence__copy( - const std_msgs__msg__Int64MultiArray__Sequence * input, - std_msgs__msg__Int64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int64MultiArray); - std_msgs__msg__Int64MultiArray * data = - (std_msgs__msg__Int64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 4a4fe8fff..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 7b02ed2ca..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.h deleted file mode 100644 index b983e2908..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int64MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Int64MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__int64__Sequence data; -} std_msgs__msg__Int64MultiArray; - -// Struct for a sequence of std_msgs__msg__Int64MultiArray. -typedef struct std_msgs__msg__Int64MultiArray__Sequence -{ - std_msgs__msg__Int64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.hpp deleted file mode 100644 index c359281c5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int64MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int64MultiArray_ -{ - using Type = Int64MultiArray_; - - explicit Int64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int64MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Int64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int64MultiArray_ - -// alias to use template instance with default allocator -using Int64MultiArray = - std_msgs::msg::Int64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__traits.hpp deleted file mode 100644 index 9f8c866f7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int64MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.c deleted file mode 100644 index e781c7204..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int64_multi_array__functions.h" -#include "std_msgs/msg/detail/int64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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; - std_msgs__msg__Int64MultiArray__init(message_memory); -} - -void Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Int64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Int64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Int64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Int64MultiArray), - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array, // message members - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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 Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle = { - 0, - &Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int64MultiArray)() { - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier) { - Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.cpp deleted file mode 100644 index 10e9eb91d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int64MultiArray.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 "std_msgs/msg/detail/int64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int64MultiArray(_init); -} - -void Int64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int64MultiArray(); -} - -size_t size_function__Int64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int64MultiArray__data, // size() function pointer - get_const_function__Int64MultiArray__data, // get_const(index) function pointer - get_function__Int64MultiArray__data, // get(index) function pointer - resize_function__Int64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Int64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Int64MultiArray), - Int64MultiArray_message_member_array, // message members - Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_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, std_msgs, msg, Int64MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8__builder.hpp deleted file mode 100644 index 4c0b65e32..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int8__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int8_data -{ -public: - Init_Int8_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::Int8 data(::std_msgs::msg::Int8::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int8 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int8>() -{ - return std_msgs::msg::builder::Init_Int8_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int8__functions.c deleted file mode 100644 index 66b248f73..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int8__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__Int8__init(std_msgs__msg__Int8 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__Int8__fini(std_msgs__msg__Int8 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__Int8__are_equal(const std_msgs__msg__Int8 * lhs, const std_msgs__msg__Int8 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__Int8__copy( - const std_msgs__msg__Int8 * input, - std_msgs__msg__Int8 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__Int8 * -std_msgs__msg__Int8__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8 * msg = (std_msgs__msg__Int8 *)allocator.allocate(sizeof(std_msgs__msg__Int8), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int8)); - bool success = std_msgs__msg__Int8__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int8__destroy(std_msgs__msg__Int8 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int8__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int8__Sequence__init(std_msgs__msg__Int8__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8 * data = NULL; - - if (size) { - data = (std_msgs__msg__Int8 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int8), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int8__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int8__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int8__Sequence__fini(std_msgs__msg__Int8__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) { - std_msgs__msg__Int8__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); - } -} - -std_msgs__msg__Int8__Sequence * -std_msgs__msg__Int8__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8__Sequence * array = (std_msgs__msg__Int8__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int8__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int8__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int8__Sequence__destroy(std_msgs__msg__Int8__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int8__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int8__Sequence__are_equal(const std_msgs__msg__Int8__Sequence * lhs, const std_msgs__msg__Int8__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int8__Sequence__copy( - const std_msgs__msg__Int8__Sequence * input, - std_msgs__msg__Int8__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int8); - std_msgs__msg__Int8 * data = - (std_msgs__msg__Int8 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int8__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int8__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int8__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index bd593e044..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int8( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int8( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int8)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 9b0fb254f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int8__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int8 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int8 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int8 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int8( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int8)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.h deleted file mode 100644 index 0faa22f25..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/Int8 in the package std_msgs. -typedef struct std_msgs__msg__Int8 -{ - int8_t data; -} std_msgs__msg__Int8; - -// Struct for a sequence of std_msgs__msg__Int8. -typedef struct std_msgs__msg__Int8__Sequence -{ - std_msgs__msg__Int8 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int8__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.hpp deleted file mode 100644 index 23c1d2ac2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int8 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int8 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int8_ -{ - using Type = Int8_; - - explicit Int8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit Int8_(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->data = 0; - } - } - - // field types and members - using _data_type = - int8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const int8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int8_ *; - using ConstRawPtr = - const std_msgs::msg::Int8_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int8 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int8 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int8_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int8_ & other) const - { - return !this->operator==(other); - } -}; // struct Int8_ - -// alias to use template instance with default allocator -using Int8 = - std_msgs::msg::Int8_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8__traits.hpp deleted file mode 100644 index b555f5f6e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int8__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int8"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int8"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.c deleted file mode 100644 index 386bc8564..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int8.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int8__functions.h" -#include "std_msgs/msg/detail/int8__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int8__rosidl_typesupport_introspection_c__Int8_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; - std_msgs__msg__Int8__init(message_memory); -} - -void Int8__rosidl_typesupport_introspection_c__Int8_fini_function(void * message_memory) -{ - std_msgs__msg__Int8__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int8__rosidl_typesupport_introspection_c__Int8_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int8, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int8__rosidl_typesupport_introspection_c__Int8_message_members = { - "std_msgs__msg", // message namespace - "Int8", // message name - 1, // number of fields - sizeof(std_msgs__msg__Int8), - Int8__rosidl_typesupport_introspection_c__Int8_message_member_array, // message members - Int8__rosidl_typesupport_introspection_c__Int8_init_function, // function to initialize message memory (memory has to be allocated) - Int8__rosidl_typesupport_introspection_c__Int8_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 Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle = { - 0, - &Int8__rosidl_typesupport_introspection_c__Int8_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int8)() { - if (!Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier) { - Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.cpp deleted file mode 100644 index c0763986d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int8.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 "std_msgs/msg/detail/int8__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int8_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int8(_init); -} - -void Int8_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int8(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int8, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8_message_members = { - "std_msgs::msg", // message namespace - "Int8", // message name - 1, // number of fields - sizeof(std_msgs::msg::Int8), - Int8_message_member_array, // message members - Int8_init_function, // function to initialize message memory (memory has to be allocated) - Int8_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int8_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int8_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8_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, std_msgs, msg, Int8)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__builder.hpp deleted file mode 100644 index 21981c942..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_Int8MultiArray_data -{ -public: - explicit Init_Int8MultiArray_data(::std_msgs::msg::Int8MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::Int8MultiArray data(::std_msgs::msg::Int8MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::Int8MultiArray msg_; -}; - -class Init_Int8MultiArray_layout -{ -public: - Init_Int8MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Int8MultiArray_data layout(::std_msgs::msg::Int8MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_Int8MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::Int8MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::Int8MultiArray>() -{ - return std_msgs::msg::builder::Init_Int8MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__functions.c deleted file mode 100644 index fc594d1b7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/int8_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__Int8MultiArray__init(std_msgs__msg__Int8MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__Int8MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__init(&msg->data, 0)) { - std_msgs__msg__Int8MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__Int8MultiArray__fini(std_msgs__msg__Int8MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__int8__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__Int8MultiArray__are_equal(const std_msgs__msg__Int8MultiArray * lhs, const std_msgs__msg__Int8MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__Int8MultiArray__copy( - const std_msgs__msg__Int8MultiArray * input, - std_msgs__msg__Int8MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__int8__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__Int8MultiArray * -std_msgs__msg__Int8MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8MultiArray * msg = (std_msgs__msg__Int8MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int8MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__Int8MultiArray)); - bool success = std_msgs__msg__Int8MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__Int8MultiArray__destroy(std_msgs__msg__Int8MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__Int8MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__Int8MultiArray__Sequence__init(std_msgs__msg__Int8MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__Int8MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int8MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__Int8MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__Int8MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__Int8MultiArray__Sequence__fini(std_msgs__msg__Int8MultiArray__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) { - std_msgs__msg__Int8MultiArray__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); - } -} - -std_msgs__msg__Int8MultiArray__Sequence * -std_msgs__msg__Int8MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__Int8MultiArray__Sequence * array = (std_msgs__msg__Int8MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int8MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__Int8MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__Int8MultiArray__Sequence__destroy(std_msgs__msg__Int8MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__Int8MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__Int8MultiArray__Sequence__are_equal(const std_msgs__msg__Int8MultiArray__Sequence * lhs, const std_msgs__msg__Int8MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__Int8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__Int8MultiArray__Sequence__copy( - const std_msgs__msg__Int8MultiArray__Sequence * input, - std_msgs__msg__Int8MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__Int8MultiArray); - std_msgs__msg__Int8MultiArray * data = - (std_msgs__msg__Int8MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__Int8MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__Int8MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__Int8MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 6e614867b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__Int8MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__Int8MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 7ca03a4c0..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/int8_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::Int8MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::Int8MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::Int8MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_Int8MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.h deleted file mode 100644 index 673b8d18c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/Int8MultiArray in the package std_msgs. -typedef struct std_msgs__msg__Int8MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__int8__Sequence data; -} std_msgs__msg__Int8MultiArray; - -// Struct for a sequence of std_msgs__msg__Int8MultiArray. -typedef struct std_msgs__msg__Int8MultiArray__Sequence -{ - std_msgs__msg__Int8MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__Int8MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.hpp deleted file mode 100644 index 89e9fabe8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__Int8MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__Int8MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct Int8MultiArray_ -{ - using Type = Int8MultiArray_; - - explicit Int8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit Int8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::Int8MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::Int8MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__Int8MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__Int8MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Int8MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const Int8MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct Int8MultiArray_ - -// alias to use template instance with default allocator -using Int8MultiArray = - std_msgs::msg::Int8MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__traits.hpp deleted file mode 100644 index 770632b01..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::Int8MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/Int8MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.c deleted file mode 100644 index cafef019f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/Int8MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/int8_multi_array__functions.h" -#include "std_msgs/msg/detail/int8_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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; - std_msgs__msg__Int8MultiArray__init(message_memory); -} - -void Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__Int8MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__Int8MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__Int8MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members = { - "std_msgs__msg", // message namespace - "Int8MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__Int8MultiArray), - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array, // message members - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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 Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle = { - 0, - &Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int8MultiArray)() { - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier) { - Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.cpp deleted file mode 100644 index 4dd155801..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/Int8MultiArray.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 "std_msgs/msg/detail/int8_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Int8MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::Int8MultiArray(_init); -} - -void Int8MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Int8MultiArray(); -} - -size_t size_function__Int8MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Int8MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Int8MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Int8MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int8MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::Int8MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__Int8MultiArray__data, // size() function pointer - get_const_function__Int8MultiArray__data, // get_const(index) function pointer - get_function__Int8MultiArray__data, // get(index) function pointer - resize_function__Int8MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8MultiArray_message_members = { - "std_msgs::msg", // message namespace - "Int8MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::Int8MultiArray), - Int8MultiArray_message_member_array, // message members - Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - Int8MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Int8MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Int8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_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, std_msgs, msg, Int8MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__builder.hpp deleted file mode 100644 index 120078cb2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__builder.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ - -#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_MultiArrayDimension_stride -{ -public: - explicit Init_MultiArrayDimension_stride(::std_msgs::msg::MultiArrayDimension & msg) - : msg_(msg) - {} - ::std_msgs::msg::MultiArrayDimension stride(::std_msgs::msg::MultiArrayDimension::_stride_type arg) - { - msg_.stride = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::MultiArrayDimension msg_; -}; - -class Init_MultiArrayDimension_size -{ -public: - explicit Init_MultiArrayDimension_size(::std_msgs::msg::MultiArrayDimension & msg) - : msg_(msg) - {} - Init_MultiArrayDimension_stride size(::std_msgs::msg::MultiArrayDimension::_size_type arg) - { - msg_.size = std::move(arg); - return Init_MultiArrayDimension_stride(msg_); - } - -private: - ::std_msgs::msg::MultiArrayDimension msg_; -}; - -class Init_MultiArrayDimension_label -{ -public: - Init_MultiArrayDimension_label() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_MultiArrayDimension_size label(::std_msgs::msg::MultiArrayDimension::_label_type arg) - { - msg_.label = std::move(arg); - return Init_MultiArrayDimension_size(msg_); - } - -private: - ::std_msgs::msg::MultiArrayDimension msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::MultiArrayDimension>() -{ - return std_msgs::msg::builder::Init_MultiArrayDimension_label(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__functions.c deleted file mode 100644 index 59ed39044..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__functions.c +++ /dev/null @@ -1,262 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/multi_array_dimension__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `label` -#include "rosidl_runtime_c/string_functions.h" - -bool -std_msgs__msg__MultiArrayDimension__init(std_msgs__msg__MultiArrayDimension * msg) -{ - if (!msg) { - return false; - } - // label - if (!rosidl_runtime_c__String__init(&msg->label)) { - std_msgs__msg__MultiArrayDimension__fini(msg); - return false; - } - // size - // stride - return true; -} - -void -std_msgs__msg__MultiArrayDimension__fini(std_msgs__msg__MultiArrayDimension * msg) -{ - if (!msg) { - return; - } - // label - rosidl_runtime_c__String__fini(&msg->label); - // size - // stride -} - -bool -std_msgs__msg__MultiArrayDimension__are_equal(const std_msgs__msg__MultiArrayDimension * lhs, const std_msgs__msg__MultiArrayDimension * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // label - if (!rosidl_runtime_c__String__are_equal( - &(lhs->label), &(rhs->label))) - { - return false; - } - // size - if (lhs->size != rhs->size) { - return false; - } - // stride - if (lhs->stride != rhs->stride) { - return false; - } - return true; -} - -bool -std_msgs__msg__MultiArrayDimension__copy( - const std_msgs__msg__MultiArrayDimension * input, - std_msgs__msg__MultiArrayDimension * output) -{ - if (!input || !output) { - return false; - } - // label - if (!rosidl_runtime_c__String__copy( - &(input->label), &(output->label))) - { - return false; - } - // size - output->size = input->size; - // stride - output->stride = input->stride; - return true; -} - -std_msgs__msg__MultiArrayDimension * -std_msgs__msg__MultiArrayDimension__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayDimension * msg = (std_msgs__msg__MultiArrayDimension *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayDimension), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__MultiArrayDimension)); - bool success = std_msgs__msg__MultiArrayDimension__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__MultiArrayDimension__destroy(std_msgs__msg__MultiArrayDimension * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__MultiArrayDimension__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__MultiArrayDimension__Sequence__init(std_msgs__msg__MultiArrayDimension__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayDimension * data = NULL; - - if (size) { - data = (std_msgs__msg__MultiArrayDimension *)allocator.zero_allocate(size, sizeof(std_msgs__msg__MultiArrayDimension), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__MultiArrayDimension__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__MultiArrayDimension__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__MultiArrayDimension__Sequence__fini(std_msgs__msg__MultiArrayDimension__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) { - std_msgs__msg__MultiArrayDimension__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); - } -} - -std_msgs__msg__MultiArrayDimension__Sequence * -std_msgs__msg__MultiArrayDimension__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayDimension__Sequence * array = (std_msgs__msg__MultiArrayDimension__Sequence *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayDimension__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__MultiArrayDimension__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__MultiArrayDimension__Sequence__destroy(std_msgs__msg__MultiArrayDimension__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__MultiArrayDimension__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__MultiArrayDimension__Sequence__are_equal(const std_msgs__msg__MultiArrayDimension__Sequence * lhs, const std_msgs__msg__MultiArrayDimension__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__MultiArrayDimension__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__MultiArrayDimension__Sequence__copy( - const std_msgs__msg__MultiArrayDimension__Sequence * input, - std_msgs__msg__MultiArrayDimension__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__MultiArrayDimension); - std_msgs__msg__MultiArrayDimension * data = - (std_msgs__msg__MultiArrayDimension *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__MultiArrayDimension__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__MultiArrayDimension__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__MultiArrayDimension__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 90a08c09a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__MultiArrayDimension( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__MultiArrayDimension( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, MultiArrayDimension)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index c5f07d345..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/multi_array_dimension__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::MultiArrayDimension & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::MultiArrayDimension & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::MultiArrayDimension & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_MultiArrayDimension( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, MultiArrayDimension)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.h deleted file mode 100644 index dd73f7cdd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.h +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'label' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/MultiArrayDimension in the package std_msgs. -typedef struct std_msgs__msg__MultiArrayDimension -{ - rosidl_runtime_c__String label; - uint32_t size; - uint32_t stride; -} std_msgs__msg__MultiArrayDimension; - -// Struct for a sequence of std_msgs__msg__MultiArrayDimension. -typedef struct std_msgs__msg__MultiArrayDimension__Sequence -{ - std_msgs__msg__MultiArrayDimension * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__MultiArrayDimension__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.hpp deleted file mode 100644 index 9b4f3c1a5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__struct.hpp +++ /dev/null @@ -1,158 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__MultiArrayDimension __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__MultiArrayDimension __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct MultiArrayDimension_ -{ - using Type = MultiArrayDimension_; - - explicit MultiArrayDimension_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->label = ""; - this->size = 0ul; - this->stride = 0ul; - } - } - - explicit MultiArrayDimension_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : label(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->label = ""; - this->size = 0ul; - this->stride = 0ul; - } - } - - // field types and members - using _label_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _label_type label; - using _size_type = - uint32_t; - _size_type size; - using _stride_type = - uint32_t; - _stride_type stride; - - // setters for named parameter idiom - Type & set__label( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->label = _arg; - return *this; - } - Type & set__size( - const uint32_t & _arg) - { - this->size = _arg; - return *this; - } - Type & set__stride( - const uint32_t & _arg) - { - this->stride = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::MultiArrayDimension_ *; - using ConstRawPtr = - const std_msgs::msg::MultiArrayDimension_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__MultiArrayDimension - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__MultiArrayDimension - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const MultiArrayDimension_ & other) const - { - if (this->label != other.label) { - return false; - } - if (this->size != other.size) { - return false; - } - if (this->stride != other.stride) { - return false; - } - return true; - } - bool operator!=(const MultiArrayDimension_ & other) const - { - return !this->operator==(other); - } -}; // struct MultiArrayDimension_ - -// alias to use template instance with default allocator -using MultiArrayDimension = - std_msgs::msg::MultiArrayDimension_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__traits.hpp deleted file mode 100644 index e9410fa14..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ - -#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::MultiArrayDimension"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/MultiArrayDimension"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.c deleted file mode 100644 index bddc53c02..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.c +++ /dev/null @@ -1,115 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/MultiArrayDimension.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/multi_array_dimension__functions.h" -#include "std_msgs/msg/detail/multi_array_dimension__struct.h" - - -// Include directives for member types -// Member `label` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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; - std_msgs__msg__MultiArrayDimension__init(message_memory); -} - -void MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_fini_function(void * message_memory) -{ - std_msgs__msg__MultiArrayDimension__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array[3] = { - { - "label", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__MultiArrayDimension, label), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "size", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__MultiArrayDimension, size), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "stride", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__MultiArrayDimension, stride), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members = { - "std_msgs__msg", // message namespace - "MultiArrayDimension", // message name - 3, // number of fields - sizeof(std_msgs__msg__MultiArrayDimension), - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array, // message members - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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 MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle = { - 0, - &MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayDimension)() { - if (!MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier) { - MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.cpp deleted file mode 100644 index 535c2f748..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.cpp +++ /dev/null @@ -1,137 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/MultiArrayDimension.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 "std_msgs/msg/detail/multi_array_dimension__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void MultiArrayDimension_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::MultiArrayDimension(_init); -} - -void MultiArrayDimension_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~MultiArrayDimension(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayDimension_message_member_array[3] = { - { - "label", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::MultiArrayDimension, label), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "size", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::MultiArrayDimension, size), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "stride", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::MultiArrayDimension, stride), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiArrayDimension_message_members = { - "std_msgs::msg", // message namespace - "MultiArrayDimension", // message name - 3, // number of fields - sizeof(std_msgs::msg::MultiArrayDimension), - MultiArrayDimension_message_member_array, // message members - MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayDimension_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t MultiArrayDimension_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &MultiArrayDimension_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_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, std_msgs, msg, MultiArrayDimension)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__builder.hpp deleted file mode 100644 index 055ef38d0..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ - -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_MultiArrayLayout_data_offset -{ -public: - explicit Init_MultiArrayLayout_data_offset(::std_msgs::msg::MultiArrayLayout & msg) - : msg_(msg) - {} - ::std_msgs::msg::MultiArrayLayout data_offset(::std_msgs::msg::MultiArrayLayout::_data_offset_type arg) - { - msg_.data_offset = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::MultiArrayLayout msg_; -}; - -class Init_MultiArrayLayout_dim -{ -public: - Init_MultiArrayLayout_dim() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_MultiArrayLayout_data_offset dim(::std_msgs::msg::MultiArrayLayout::_dim_type arg) - { - msg_.dim = std::move(arg); - return Init_MultiArrayLayout_data_offset(msg_); - } - -private: - ::std_msgs::msg::MultiArrayLayout msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::MultiArrayLayout>() -{ - return std_msgs::msg::builder::Init_MultiArrayLayout_dim(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__functions.c deleted file mode 100644 index 105220389..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__functions.c +++ /dev/null @@ -1,254 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/multi_array_layout__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `dim` -#include "std_msgs/msg/detail/multi_array_dimension__functions.h" - -bool -std_msgs__msg__MultiArrayLayout__init(std_msgs__msg__MultiArrayLayout * msg) -{ - if (!msg) { - return false; - } - // dim - if (!std_msgs__msg__MultiArrayDimension__Sequence__init(&msg->dim, 0)) { - std_msgs__msg__MultiArrayLayout__fini(msg); - return false; - } - // data_offset - return true; -} - -void -std_msgs__msg__MultiArrayLayout__fini(std_msgs__msg__MultiArrayLayout * msg) -{ - if (!msg) { - return; - } - // dim - std_msgs__msg__MultiArrayDimension__Sequence__fini(&msg->dim); - // data_offset -} - -bool -std_msgs__msg__MultiArrayLayout__are_equal(const std_msgs__msg__MultiArrayLayout * lhs, const std_msgs__msg__MultiArrayLayout * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // dim - if (!std_msgs__msg__MultiArrayDimension__Sequence__are_equal( - &(lhs->dim), &(rhs->dim))) - { - return false; - } - // data_offset - if (lhs->data_offset != rhs->data_offset) { - return false; - } - return true; -} - -bool -std_msgs__msg__MultiArrayLayout__copy( - const std_msgs__msg__MultiArrayLayout * input, - std_msgs__msg__MultiArrayLayout * output) -{ - if (!input || !output) { - return false; - } - // dim - if (!std_msgs__msg__MultiArrayDimension__Sequence__copy( - &(input->dim), &(output->dim))) - { - return false; - } - // data_offset - output->data_offset = input->data_offset; - return true; -} - -std_msgs__msg__MultiArrayLayout * -std_msgs__msg__MultiArrayLayout__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayLayout * msg = (std_msgs__msg__MultiArrayLayout *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayLayout), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__MultiArrayLayout)); - bool success = std_msgs__msg__MultiArrayLayout__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__MultiArrayLayout__destroy(std_msgs__msg__MultiArrayLayout * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__MultiArrayLayout__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__MultiArrayLayout__Sequence__init(std_msgs__msg__MultiArrayLayout__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayLayout * data = NULL; - - if (size) { - data = (std_msgs__msg__MultiArrayLayout *)allocator.zero_allocate(size, sizeof(std_msgs__msg__MultiArrayLayout), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__MultiArrayLayout__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__MultiArrayLayout__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__MultiArrayLayout__Sequence__fini(std_msgs__msg__MultiArrayLayout__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) { - std_msgs__msg__MultiArrayLayout__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); - } -} - -std_msgs__msg__MultiArrayLayout__Sequence * -std_msgs__msg__MultiArrayLayout__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__MultiArrayLayout__Sequence * array = (std_msgs__msg__MultiArrayLayout__Sequence *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayLayout__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__MultiArrayLayout__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__MultiArrayLayout__Sequence__destroy(std_msgs__msg__MultiArrayLayout__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__MultiArrayLayout__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__MultiArrayLayout__Sequence__are_equal(const std_msgs__msg__MultiArrayLayout__Sequence * lhs, const std_msgs__msg__MultiArrayLayout__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__MultiArrayLayout__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__MultiArrayLayout__Sequence__copy( - const std_msgs__msg__MultiArrayLayout__Sequence * input, - std_msgs__msg__MultiArrayLayout__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__MultiArrayLayout); - std_msgs__msg__MultiArrayLayout * data = - (std_msgs__msg__MultiArrayLayout *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__MultiArrayLayout__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__MultiArrayLayout__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 16dab313e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__MultiArrayLayout( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__MultiArrayLayout( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, MultiArrayLayout)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 53c839e3a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/multi_array_layout__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::MultiArrayLayout & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::MultiArrayLayout & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::MultiArrayLayout & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_MultiArrayLayout( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, MultiArrayLayout)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.h deleted file mode 100644 index 58bef633b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.h +++ /dev/null @@ -1,45 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'dim' -#include "std_msgs/msg/detail/multi_array_dimension__struct.h" - -// Struct defined in msg/MultiArrayLayout in the package std_msgs. -typedef struct std_msgs__msg__MultiArrayLayout -{ - std_msgs__msg__MultiArrayDimension__Sequence dim; - uint32_t data_offset; -} std_msgs__msg__MultiArrayLayout; - -// Struct for a sequence of std_msgs__msg__MultiArrayLayout. -typedef struct std_msgs__msg__MultiArrayLayout__Sequence -{ - std_msgs__msg__MultiArrayLayout * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__MultiArrayLayout__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.hpp deleted file mode 100644 index ded03a1a2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__struct.hpp +++ /dev/null @@ -1,146 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'dim' -#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__MultiArrayLayout __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__MultiArrayLayout __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct MultiArrayLayout_ -{ - using Type = MultiArrayLayout_; - - explicit MultiArrayLayout_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data_offset = 0ul; - } - } - - explicit MultiArrayLayout_(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->data_offset = 0ul; - } - } - - // field types and members - using _dim_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _dim_type dim; - using _data_offset_type = - uint32_t; - _data_offset_type data_offset; - - // setters for named parameter idiom - Type & set__dim( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->dim = _arg; - return *this; - } - Type & set__data_offset( - const uint32_t & _arg) - { - this->data_offset = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::MultiArrayLayout_ *; - using ConstRawPtr = - const std_msgs::msg::MultiArrayLayout_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__MultiArrayLayout - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__MultiArrayLayout - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const MultiArrayLayout_ & other) const - { - if (this->dim != other.dim) { - return false; - } - if (this->data_offset != other.data_offset) { - return false; - } - return true; - } - bool operator!=(const MultiArrayLayout_ & other) const - { - return !this->operator==(other); - } -}; // struct MultiArrayLayout_ - -// alias to use template instance with default allocator -using MultiArrayLayout = - std_msgs::msg::MultiArrayLayout_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__traits.hpp deleted file mode 100644 index 2f0127fc9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ - -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::MultiArrayLayout"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/MultiArrayLayout"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.c deleted file mode 100644 index bbd89ea5b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.c +++ /dev/null @@ -1,137 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/MultiArrayLayout.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/multi_array_layout__functions.h" -#include "std_msgs/msg/detail/multi_array_layout__struct.h" - - -// Include directives for member types -// Member `dim` -#include "std_msgs/msg/multi_array_dimension.h" -// Member `dim` -#include "std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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; - std_msgs__msg__MultiArrayLayout__init(message_memory); -} - -void MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_fini_function(void * message_memory) -{ - std_msgs__msg__MultiArrayLayout__fini(message_memory); -} - -size_t MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayDimension__dim( - const void * untyped_member) -{ - const std_msgs__msg__MultiArrayDimension__Sequence * member = - (const std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayDimension__dim( - const void * untyped_member, size_t index) -{ - const std_msgs__msg__MultiArrayDimension__Sequence * member = - (const std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayDimension__dim( - void * untyped_member, size_t index) -{ - std_msgs__msg__MultiArrayDimension__Sequence * member = - (std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayDimension__dim( - void * untyped_member, size_t size) -{ - std_msgs__msg__MultiArrayDimension__Sequence * member = - (std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); - std_msgs__msg__MultiArrayDimension__Sequence__fini(member); - return std_msgs__msg__MultiArrayDimension__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[2] = { - { - "dim", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__MultiArrayLayout, dim), // bytes offset in struct - NULL, // default value - MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayDimension__dim, // size() function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayDimension__dim, // get_const(index) function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayDimension__dim, // get(index) function pointer - MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayDimension__dim // resize(index) function pointer - }, - { - "data_offset", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__MultiArrayLayout, data_offset), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members = { - "std_msgs__msg", // message namespace - "MultiArrayLayout", // message name - 2, // number of fields - sizeof(std_msgs__msg__MultiArrayLayout), - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array, // message members - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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 MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle = { - 0, - &MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)() { - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayDimension)(); - if (!MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier) { - MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.cpp deleted file mode 100644 index c46700fc9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/MultiArrayLayout.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 "std_msgs/msg/detail/multi_array_layout__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void MultiArrayLayout_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::MultiArrayLayout(_init); -} - -void MultiArrayLayout_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~MultiArrayLayout(); -} - -size_t size_function__MultiArrayLayout__dim(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__MultiArrayLayout__dim(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__MultiArrayLayout__dim(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__MultiArrayLayout__dim(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayLayout_message_member_array[2] = { - { - "dim", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::MultiArrayLayout, dim), // bytes offset in struct - nullptr, // default value - size_function__MultiArrayLayout__dim, // size() function pointer - get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer - get_function__MultiArrayLayout__dim, // get(index) function pointer - resize_function__MultiArrayLayout__dim // resize(index) function pointer - }, - { - "data_offset", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::MultiArrayLayout, data_offset), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers MultiArrayLayout_message_members = { - "std_msgs::msg", // message namespace - "MultiArrayLayout", // message name - 2, // number of fields - sizeof(std_msgs::msg::MultiArrayLayout), - MultiArrayLayout_message_member_array, // message members - MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) - MultiArrayLayout_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t MultiArrayLayout_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &MultiArrayLayout_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_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, std_msgs, msg, MultiArrayLayout)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/string__builder.hpp deleted file mode 100644 index 85c350304..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ - -#include "std_msgs/msg/detail/string__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_String_data -{ -public: - Init_String_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::String data(::std_msgs::msg::String::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::String msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::String>() -{ - return std_msgs::msg::builder::Init_String_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/string__functions.c deleted file mode 100644 index 5ccc10f5b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__functions.c +++ /dev/null @@ -1,246 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/string__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `data` -#include "rosidl_runtime_c/string_functions.h" - -bool -std_msgs__msg__String__init(std_msgs__msg__String * msg) -{ - if (!msg) { - return false; - } - // data - if (!rosidl_runtime_c__String__init(&msg->data)) { - std_msgs__msg__String__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__String__fini(std_msgs__msg__String * msg) -{ - if (!msg) { - return; - } - // data - rosidl_runtime_c__String__fini(&msg->data); -} - -bool -std_msgs__msg__String__are_equal(const std_msgs__msg__String * lhs, const std_msgs__msg__String * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (!rosidl_runtime_c__String__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__String__copy( - const std_msgs__msg__String * input, - std_msgs__msg__String * output) -{ - if (!input || !output) { - return false; - } - // data - if (!rosidl_runtime_c__String__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__String * -std_msgs__msg__String__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__String * msg = (std_msgs__msg__String *)allocator.allocate(sizeof(std_msgs__msg__String), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__String)); - bool success = std_msgs__msg__String__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__String__destroy(std_msgs__msg__String * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__String__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__String__Sequence__init(std_msgs__msg__String__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__String * data = NULL; - - if (size) { - data = (std_msgs__msg__String *)allocator.zero_allocate(size, sizeof(std_msgs__msg__String), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__String__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__String__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__String__Sequence__fini(std_msgs__msg__String__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) { - std_msgs__msg__String__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); - } -} - -std_msgs__msg__String__Sequence * -std_msgs__msg__String__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__String__Sequence * array = (std_msgs__msg__String__Sequence *)allocator.allocate(sizeof(std_msgs__msg__String__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__String__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__String__Sequence__destroy(std_msgs__msg__String__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__String__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__String__Sequence__are_equal(const std_msgs__msg__String__Sequence * lhs, const std_msgs__msg__String__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__String__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__String__Sequence__copy( - const std_msgs__msg__String__Sequence * input, - std_msgs__msg__String__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__String); - std_msgs__msg__String * data = - (std_msgs__msg__String *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__String__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__String__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__String__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 591ce09ee..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__String( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__String( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, String)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 96a219856..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/string__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::String & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::String & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::String & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_String( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, String)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.h deleted file mode 100644 index e0f8cf8cd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.h +++ /dev/null @@ -1,44 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'data' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/String in the package std_msgs. -typedef struct std_msgs__msg__String -{ - rosidl_runtime_c__String data; -} std_msgs__msg__String; - -// Struct for a sequence of std_msgs__msg__String. -typedef struct std_msgs__msg__String__Sequence -{ - std_msgs__msg__String * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__String__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.hpp deleted file mode 100644 index 009661654..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__String __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__String __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct String_ -{ - using Type = String_; - - explicit String_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = ""; - } - } - - explicit String_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : data(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = ""; - } - } - - // field types and members - using _data_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::String_ *; - using ConstRawPtr = - const std_msgs::msg::String_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__String - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__String - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const String_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const String_ & other) const - { - return !this->operator==(other); - } -}; // struct String_ - -// alias to use template instance with default allocator -using String = - std_msgs::msg::String_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/string__traits.hpp deleted file mode 100644 index 6edd058e8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ - -#include "std_msgs/msg/detail/string__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::String"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/String"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.c deleted file mode 100644 index fc72c51aa..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.c +++ /dev/null @@ -1,85 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/String.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/string__functions.h" -#include "std_msgs/msg/detail/string__struct.h" - - -// Include directives for member types -// Member `data` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void String__rosidl_typesupport_introspection_c__String_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; - std_msgs__msg__String__init(message_memory); -} - -void String__rosidl_typesupport_introspection_c__String_fini_function(void * message_memory) -{ - std_msgs__msg__String__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember String__rosidl_typesupport_introspection_c__String_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__String, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers String__rosidl_typesupport_introspection_c__String_message_members = { - "std_msgs__msg", // message namespace - "String", // message name - 1, // number of fields - sizeof(std_msgs__msg__String), - String__rosidl_typesupport_introspection_c__String_message_member_array, // message members - String__rosidl_typesupport_introspection_c__String_init_function, // function to initialize message memory (memory has to be allocated) - String__rosidl_typesupport_introspection_c__String_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 String__rosidl_typesupport_introspection_c__String_message_type_support_handle = { - 0, - &String__rosidl_typesupport_introspection_c__String_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, String)() { - if (!String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier) { - String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &String__rosidl_typesupport_introspection_c__String_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.cpp deleted file mode 100644 index 7c2cae550..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/String.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 "std_msgs/msg/detail/string__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void String_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::String(_init); -} - -void String_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~String(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember String_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::String, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers String_message_members = { - "std_msgs::msg", // message namespace - "String", // message name - 1, // number of fields - sizeof(std_msgs::msg::String), - String_message_member_array, // message members - String_init_function, // function to initialize message memory (memory has to be allocated) - String_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t String_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &String_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::String_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, std_msgs, msg, String)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::String_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__builder.hpp deleted file mode 100644 index a8ace29d1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int16__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt16_data -{ -public: - Init_UInt16_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::UInt16 data(::std_msgs::msg::UInt16::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt16 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt16>() -{ - return std_msgs::msg::builder::Init_UInt16_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__functions.c deleted file mode 100644 index 0cc057c47..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int16__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__UInt16__init(std_msgs__msg__UInt16 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__UInt16__fini(std_msgs__msg__UInt16 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__UInt16__are_equal(const std_msgs__msg__UInt16 * lhs, const std_msgs__msg__UInt16 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt16__copy( - const std_msgs__msg__UInt16 * input, - std_msgs__msg__UInt16 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__UInt16 * -std_msgs__msg__UInt16__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16 * msg = (std_msgs__msg__UInt16 *)allocator.allocate(sizeof(std_msgs__msg__UInt16), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt16)); - bool success = std_msgs__msg__UInt16__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt16__destroy(std_msgs__msg__UInt16 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt16__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt16__Sequence__init(std_msgs__msg__UInt16__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16 * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt16 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt16), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt16__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt16__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt16__Sequence__fini(std_msgs__msg__UInt16__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) { - std_msgs__msg__UInt16__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); - } -} - -std_msgs__msg__UInt16__Sequence * -std_msgs__msg__UInt16__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16__Sequence * array = (std_msgs__msg__UInt16__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt16__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt16__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt16__Sequence__destroy(std_msgs__msg__UInt16__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt16__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt16__Sequence__are_equal(const std_msgs__msg__UInt16__Sequence * lhs, const std_msgs__msg__UInt16__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt16__Sequence__copy( - const std_msgs__msg__UInt16__Sequence * input, - std_msgs__msg__UInt16__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt16); - std_msgs__msg__UInt16 * data = - (std_msgs__msg__UInt16 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt16__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt16__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt16__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index c72e77aea..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt16( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt16( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt16)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 279c442c4..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int16__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt16 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt16 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt16 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt16( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt16)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.h deleted file mode 100644 index 48fdfeb95..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt16 in the package std_msgs. -typedef struct std_msgs__msg__UInt16 -{ - uint16_t data; -} std_msgs__msg__UInt16; - -// Struct for a sequence of std_msgs__msg__UInt16. -typedef struct std_msgs__msg__UInt16__Sequence -{ - std_msgs__msg__UInt16 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt16__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.hpp deleted file mode 100644 index 240d2d2ae..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt16 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt16 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt16_ -{ - using Type = UInt16_; - - explicit UInt16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit UInt16_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint16_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint16_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt16_ *; - using ConstRawPtr = - const std_msgs::msg::UInt16_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt16 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt16 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt16_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt16_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt16_ - -// alias to use template instance with default allocator -using UInt16 = - std_msgs::msg::UInt16_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__traits.hpp deleted file mode 100644 index 2798dfae5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int16__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt16"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt16"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.c deleted file mode 100644 index 92f58debd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt16.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int16__functions.h" -#include "std_msgs/msg/detail/u_int16__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt16__rosidl_typesupport_introspection_c__UInt16_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; - std_msgs__msg__UInt16__init(message_memory); -} - -void UInt16__rosidl_typesupport_introspection_c__UInt16_fini_function(void * message_memory) -{ - std_msgs__msg__UInt16__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt16, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt16__rosidl_typesupport_introspection_c__UInt16_message_members = { - "std_msgs__msg", // message namespace - "UInt16", // message name - 1, // number of fields - sizeof(std_msgs__msg__UInt16), - UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array, // message members - UInt16__rosidl_typesupport_introspection_c__UInt16_init_function, // function to initialize message memory (memory has to be allocated) - UInt16__rosidl_typesupport_introspection_c__UInt16_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 UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle = { - 0, - &UInt16__rosidl_typesupport_introspection_c__UInt16_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt16)() { - if (!UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier) { - UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.cpp deleted file mode 100644 index 0cd4753e9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt16.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 "std_msgs/msg/detail/u_int16__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt16_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt16(_init); -} - -void UInt16_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt16(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt16, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16_message_members = { - "std_msgs::msg", // message namespace - "UInt16", // message name - 1, // number of fields - sizeof(std_msgs::msg::UInt16), - UInt16_message_member_array, // message members - UInt16_init_function, // function to initialize message memory (memory has to be allocated) - UInt16_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt16_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt16_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16_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, std_msgs, msg, UInt16)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__builder.hpp deleted file mode 100644 index 290e8bcb7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt16MultiArray_data -{ -public: - explicit Init_UInt16MultiArray_data(::std_msgs::msg::UInt16MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::UInt16MultiArray data(::std_msgs::msg::UInt16MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt16MultiArray msg_; -}; - -class Init_UInt16MultiArray_layout -{ -public: - Init_UInt16MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt16MultiArray_data layout(::std_msgs::msg::UInt16MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt16MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::UInt16MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt16MultiArray>() -{ - return std_msgs::msg::builder::Init_UInt16MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__functions.c deleted file mode 100644 index 1e647bf2c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int16_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__UInt16MultiArray__init(std_msgs__msg__UInt16MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__UInt16MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__init(&msg->data, 0)) { - std_msgs__msg__UInt16MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__UInt16MultiArray__fini(std_msgs__msg__UInt16MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint16__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__UInt16MultiArray__are_equal(const std_msgs__msg__UInt16MultiArray * lhs, const std_msgs__msg__UInt16MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt16MultiArray__copy( - const std_msgs__msg__UInt16MultiArray * input, - std_msgs__msg__UInt16MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint16__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__UInt16MultiArray * -std_msgs__msg__UInt16MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16MultiArray * msg = (std_msgs__msg__UInt16MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt16MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt16MultiArray)); - bool success = std_msgs__msg__UInt16MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt16MultiArray__destroy(std_msgs__msg__UInt16MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt16MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt16MultiArray__Sequence__init(std_msgs__msg__UInt16MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt16MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt16MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt16MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt16MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt16MultiArray__Sequence__fini(std_msgs__msg__UInt16MultiArray__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) { - std_msgs__msg__UInt16MultiArray__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); - } -} - -std_msgs__msg__UInt16MultiArray__Sequence * -std_msgs__msg__UInt16MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt16MultiArray__Sequence * array = (std_msgs__msg__UInt16MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt16MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt16MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt16MultiArray__Sequence__destroy(std_msgs__msg__UInt16MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt16MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt16MultiArray__Sequence__are_equal(const std_msgs__msg__UInt16MultiArray__Sequence * lhs, const std_msgs__msg__UInt16MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt16MultiArray__Sequence__copy( - const std_msgs__msg__UInt16MultiArray__Sequence * input, - std_msgs__msg__UInt16MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt16MultiArray); - std_msgs__msg__UInt16MultiArray * data = - (std_msgs__msg__UInt16MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt16MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt16MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt16MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 05163bd39..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt16MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt16MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 630d3c0a2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int16_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt16MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt16MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt16MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt16MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt16MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.h deleted file mode 100644 index e498f902a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt16MultiArray in the package std_msgs. -typedef struct std_msgs__msg__UInt16MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint16__Sequence data; -} std_msgs__msg__UInt16MultiArray; - -// Struct for a sequence of std_msgs__msg__UInt16MultiArray. -typedef struct std_msgs__msg__UInt16MultiArray__Sequence -{ - std_msgs__msg__UInt16MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt16MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.hpp deleted file mode 100644 index b1dcbbb3c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt16MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt16MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt16MultiArray_ -{ - using Type = UInt16MultiArray_; - - explicit UInt16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt16MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::UInt16MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt16MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt16MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt16MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt16MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt16MultiArray_ - -// alias to use template instance with default allocator -using UInt16MultiArray = - std_msgs::msg::UInt16MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__traits.hpp deleted file mode 100644 index b003d42c7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt16MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt16MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.c deleted file mode 100644 index 37247eb03..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt16MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int16_multi_array__functions.h" -#include "std_msgs/msg/detail/u_int16_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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; - std_msgs__msg__UInt16MultiArray__init(message_memory); -} - -void UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__UInt16MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__UInt16MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt16MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members = { - "std_msgs__msg", // message namespace - "UInt16MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__UInt16MultiArray), - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array, // message members - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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 UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle = { - 0, - &UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt16MultiArray)() { - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier) { - UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp deleted file mode 100644 index fb3c85b3d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt16MultiArray.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 "std_msgs/msg/detail/u_int16_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt16MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt16MultiArray(_init); -} - -void UInt16MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt16MultiArray(); -} - -size_t size_function__UInt16MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt16MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt16MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt16MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt16MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt16MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt16MultiArray__data, // size() function pointer - get_const_function__UInt16MultiArray__data, // get_const(index) function pointer - get_function__UInt16MultiArray__data, // get(index) function pointer - resize_function__UInt16MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16MultiArray_message_members = { - "std_msgs::msg", // message namespace - "UInt16MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::UInt16MultiArray), - UInt16MultiArray_message_member_array, // message members - UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt16MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt16MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt16MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_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, std_msgs, msg, UInt16MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__builder.hpp deleted file mode 100644 index c8bb8fa0a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int32__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt32_data -{ -public: - Init_UInt32_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::UInt32 data(::std_msgs::msg::UInt32::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt32 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt32>() -{ - return std_msgs::msg::builder::Init_UInt32_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__functions.c deleted file mode 100644 index 7b6fe9cc7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int32__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__UInt32__init(std_msgs__msg__UInt32 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__UInt32__fini(std_msgs__msg__UInt32 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__UInt32__are_equal(const std_msgs__msg__UInt32 * lhs, const std_msgs__msg__UInt32 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt32__copy( - const std_msgs__msg__UInt32 * input, - std_msgs__msg__UInt32 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__UInt32 * -std_msgs__msg__UInt32__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32 * msg = (std_msgs__msg__UInt32 *)allocator.allocate(sizeof(std_msgs__msg__UInt32), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt32)); - bool success = std_msgs__msg__UInt32__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt32__destroy(std_msgs__msg__UInt32 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt32__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt32__Sequence__init(std_msgs__msg__UInt32__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32 * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt32), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt32__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt32__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt32__Sequence__fini(std_msgs__msg__UInt32__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) { - std_msgs__msg__UInt32__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); - } -} - -std_msgs__msg__UInt32__Sequence * -std_msgs__msg__UInt32__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32__Sequence * array = (std_msgs__msg__UInt32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt32__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt32__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt32__Sequence__destroy(std_msgs__msg__UInt32__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt32__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt32__Sequence__are_equal(const std_msgs__msg__UInt32__Sequence * lhs, const std_msgs__msg__UInt32__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt32__Sequence__copy( - const std_msgs__msg__UInt32__Sequence * input, - std_msgs__msg__UInt32__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt32); - std_msgs__msg__UInt32 * data = - (std_msgs__msg__UInt32 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt32__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt32__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt32__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 42e5bf5ae..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt32( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt32( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 2b9f51be4..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int32__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt32 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt32 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt32 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt32( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt32)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.h deleted file mode 100644 index bdfb1768a..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt32 in the package std_msgs. -typedef struct std_msgs__msg__UInt32 -{ - uint32_t data; -} std_msgs__msg__UInt32; - -// Struct for a sequence of std_msgs__msg__UInt32. -typedef struct std_msgs__msg__UInt32__Sequence -{ - std_msgs__msg__UInt32 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt32__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.hpp deleted file mode 100644 index a8f1eb9df..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt32 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt32 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt32_ -{ - using Type = UInt32_; - - explicit UInt32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ul; - } - } - - explicit UInt32_(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->data = 0ul; - } - } - - // field types and members - using _data_type = - uint32_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint32_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt32_ *; - using ConstRawPtr = - const std_msgs::msg::UInt32_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt32 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt32 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt32_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt32_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt32_ - -// alias to use template instance with default allocator -using UInt32 = - std_msgs::msg::UInt32_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__traits.hpp deleted file mode 100644 index 412346b04..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt32"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt32"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.c deleted file mode 100644 index 2c9da469b..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt32.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int32__functions.h" -#include "std_msgs/msg/detail/u_int32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt32__rosidl_typesupport_introspection_c__UInt32_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; - std_msgs__msg__UInt32__init(message_memory); -} - -void UInt32__rosidl_typesupport_introspection_c__UInt32_fini_function(void * message_memory) -{ - std_msgs__msg__UInt32__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt32, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt32__rosidl_typesupport_introspection_c__UInt32_message_members = { - "std_msgs__msg", // message namespace - "UInt32", // message name - 1, // number of fields - sizeof(std_msgs__msg__UInt32), - UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array, // message members - UInt32__rosidl_typesupport_introspection_c__UInt32_init_function, // function to initialize message memory (memory has to be allocated) - UInt32__rosidl_typesupport_introspection_c__UInt32_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 UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle = { - 0, - &UInt32__rosidl_typesupport_introspection_c__UInt32_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt32)() { - if (!UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier) { - UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.cpp deleted file mode 100644 index 4489ad416..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt32.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 "std_msgs/msg/detail/u_int32__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt32_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt32(_init); -} - -void UInt32_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt32(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt32, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32_message_members = { - "std_msgs::msg", // message namespace - "UInt32", // message name - 1, // number of fields - sizeof(std_msgs::msg::UInt32), - UInt32_message_member_array, // message members - UInt32_init_function, // function to initialize message memory (memory has to be allocated) - UInt32_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt32_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt32_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32_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, std_msgs, msg, UInt32)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__builder.hpp deleted file mode 100644 index ace4d3680..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt32MultiArray_data -{ -public: - explicit Init_UInt32MultiArray_data(::std_msgs::msg::UInt32MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::UInt32MultiArray data(::std_msgs::msg::UInt32MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt32MultiArray msg_; -}; - -class Init_UInt32MultiArray_layout -{ -public: - Init_UInt32MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt32MultiArray_data layout(::std_msgs::msg::UInt32MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt32MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::UInt32MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt32MultiArray>() -{ - return std_msgs::msg::builder::Init_UInt32MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__functions.c deleted file mode 100644 index dde5e5b66..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int32_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__UInt32MultiArray__init(std_msgs__msg__UInt32MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__UInt32MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__init(&msg->data, 0)) { - std_msgs__msg__UInt32MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__UInt32MultiArray__fini(std_msgs__msg__UInt32MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint32__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__UInt32MultiArray__are_equal(const std_msgs__msg__UInt32MultiArray * lhs, const std_msgs__msg__UInt32MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt32MultiArray__copy( - const std_msgs__msg__UInt32MultiArray * input, - std_msgs__msg__UInt32MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint32__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__UInt32MultiArray * -std_msgs__msg__UInt32MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32MultiArray * msg = (std_msgs__msg__UInt32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt32MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt32MultiArray)); - bool success = std_msgs__msg__UInt32MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt32MultiArray__destroy(std_msgs__msg__UInt32MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt32MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt32MultiArray__Sequence__init(std_msgs__msg__UInt32MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt32MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt32MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt32MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt32MultiArray__Sequence__fini(std_msgs__msg__UInt32MultiArray__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) { - std_msgs__msg__UInt32MultiArray__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); - } -} - -std_msgs__msg__UInt32MultiArray__Sequence * -std_msgs__msg__UInt32MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt32MultiArray__Sequence * array = (std_msgs__msg__UInt32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt32MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt32MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt32MultiArray__Sequence__destroy(std_msgs__msg__UInt32MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt32MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt32MultiArray__Sequence__are_equal(const std_msgs__msg__UInt32MultiArray__Sequence * lhs, const std_msgs__msg__UInt32MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt32MultiArray__Sequence__copy( - const std_msgs__msg__UInt32MultiArray__Sequence * input, - std_msgs__msg__UInt32MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt32MultiArray); - std_msgs__msg__UInt32MultiArray * data = - (std_msgs__msg__UInt32MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt32MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt32MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt32MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 95093bcd6..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt32MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt32MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index b29691cf6..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt32MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt32MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt32MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt32MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt32MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.h deleted file mode 100644 index 74f505ee2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt32MultiArray in the package std_msgs. -typedef struct std_msgs__msg__UInt32MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint32__Sequence data; -} std_msgs__msg__UInt32MultiArray; - -// Struct for a sequence of std_msgs__msg__UInt32MultiArray. -typedef struct std_msgs__msg__UInt32MultiArray__Sequence -{ - std_msgs__msg__UInt32MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt32MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.hpp deleted file mode 100644 index fbafad080..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt32MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt32MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt32MultiArray_ -{ - using Type = UInt32MultiArray_; - - explicit UInt32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt32MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::UInt32MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt32MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt32MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt32MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt32MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt32MultiArray_ - -// alias to use template instance with default allocator -using UInt32MultiArray = - std_msgs::msg::UInt32MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__traits.hpp deleted file mode 100644 index 032d070a1..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt32MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt32MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.c deleted file mode 100644 index c4086e903..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt32MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int32_multi_array__functions.h" -#include "std_msgs/msg/detail/u_int32_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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; - std_msgs__msg__UInt32MultiArray__init(message_memory); -} - -void UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__UInt32MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__UInt32MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt32MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members = { - "std_msgs__msg", // message namespace - "UInt32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__UInt32MultiArray), - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array, // message members - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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 UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle = { - 0, - &UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt32MultiArray)() { - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier) { - UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp deleted file mode 100644 index 222bc0dd8..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt32MultiArray.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 "std_msgs/msg/detail/u_int32_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt32MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt32MultiArray(_init); -} - -void UInt32MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt32MultiArray(); -} - -size_t size_function__UInt32MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt32MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt32MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt32MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt32MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt32MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt32MultiArray__data, // size() function pointer - get_const_function__UInt32MultiArray__data, // get_const(index) function pointer - get_function__UInt32MultiArray__data, // get(index) function pointer - resize_function__UInt32MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32MultiArray_message_members = { - "std_msgs::msg", // message namespace - "UInt32MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::UInt32MultiArray), - UInt32MultiArray_message_member_array, // message members - UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt32MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt32MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt32MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_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, std_msgs, msg, UInt32MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__builder.hpp deleted file mode 100644 index 7ca197b82..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int64__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt64_data -{ -public: - Init_UInt64_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::UInt64 data(::std_msgs::msg::UInt64::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt64 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt64>() -{ - return std_msgs::msg::builder::Init_UInt64_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__functions.c deleted file mode 100644 index 0bef0d63f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int64__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__UInt64__init(std_msgs__msg__UInt64 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__UInt64__fini(std_msgs__msg__UInt64 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__UInt64__are_equal(const std_msgs__msg__UInt64 * lhs, const std_msgs__msg__UInt64 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt64__copy( - const std_msgs__msg__UInt64 * input, - std_msgs__msg__UInt64 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__UInt64 * -std_msgs__msg__UInt64__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64 * msg = (std_msgs__msg__UInt64 *)allocator.allocate(sizeof(std_msgs__msg__UInt64), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt64)); - bool success = std_msgs__msg__UInt64__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt64__destroy(std_msgs__msg__UInt64 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt64__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt64__Sequence__init(std_msgs__msg__UInt64__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64 * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt64), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt64__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt64__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt64__Sequence__fini(std_msgs__msg__UInt64__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) { - std_msgs__msg__UInt64__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); - } -} - -std_msgs__msg__UInt64__Sequence * -std_msgs__msg__UInt64__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64__Sequence * array = (std_msgs__msg__UInt64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt64__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt64__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt64__Sequence__destroy(std_msgs__msg__UInt64__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt64__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt64__Sequence__are_equal(const std_msgs__msg__UInt64__Sequence * lhs, const std_msgs__msg__UInt64__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt64__Sequence__copy( - const std_msgs__msg__UInt64__Sequence * input, - std_msgs__msg__UInt64__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt64); - std_msgs__msg__UInt64 * data = - (std_msgs__msg__UInt64 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt64__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt64__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt64__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index de0b8d8d9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt64( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt64( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index bda1c8854..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int64__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt64 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt64 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt64 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt64( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt64)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.h deleted file mode 100644 index c11ae6681..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt64 in the package std_msgs. -typedef struct std_msgs__msg__UInt64 -{ - uint64_t data; -} std_msgs__msg__UInt64; - -// Struct for a sequence of std_msgs__msg__UInt64. -typedef struct std_msgs__msg__UInt64__Sequence -{ - std_msgs__msg__UInt64 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt64__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.hpp deleted file mode 100644 index 4ebcd8e00..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt64 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt64 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt64_ -{ - using Type = UInt64_; - - explicit UInt64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0ull; - } - } - - explicit UInt64_(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->data = 0ull; - } - } - - // field types and members - using _data_type = - uint64_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint64_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt64_ *; - using ConstRawPtr = - const std_msgs::msg::UInt64_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt64 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt64 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt64_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt64_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt64_ - -// alias to use template instance with default allocator -using UInt64 = - std_msgs::msg::UInt64_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__traits.hpp deleted file mode 100644 index bda320112..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int64__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt64"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt64"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.c deleted file mode 100644 index 380534c22..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt64.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int64__functions.h" -#include "std_msgs/msg/detail/u_int64__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt64__rosidl_typesupport_introspection_c__UInt64_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; - std_msgs__msg__UInt64__init(message_memory); -} - -void UInt64__rosidl_typesupport_introspection_c__UInt64_fini_function(void * message_memory) -{ - std_msgs__msg__UInt64__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt64, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt64__rosidl_typesupport_introspection_c__UInt64_message_members = { - "std_msgs__msg", // message namespace - "UInt64", // message name - 1, // number of fields - sizeof(std_msgs__msg__UInt64), - UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array, // message members - UInt64__rosidl_typesupport_introspection_c__UInt64_init_function, // function to initialize message memory (memory has to be allocated) - UInt64__rosidl_typesupport_introspection_c__UInt64_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 UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle = { - 0, - &UInt64__rosidl_typesupport_introspection_c__UInt64_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt64)() { - if (!UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier) { - UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.cpp deleted file mode 100644 index da8070d16..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt64.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 "std_msgs/msg/detail/u_int64__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt64_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt64(_init); -} - -void UInt64_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt64(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt64, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64_message_members = { - "std_msgs::msg", // message namespace - "UInt64", // message name - 1, // number of fields - sizeof(std_msgs::msg::UInt64), - UInt64_message_member_array, // message members - UInt64_init_function, // function to initialize message memory (memory has to be allocated) - UInt64_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt64_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt64_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64_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, std_msgs, msg, UInt64)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__builder.hpp deleted file mode 100644 index ef2e5dc50..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt64MultiArray_data -{ -public: - explicit Init_UInt64MultiArray_data(::std_msgs::msg::UInt64MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::UInt64MultiArray data(::std_msgs::msg::UInt64MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt64MultiArray msg_; -}; - -class Init_UInt64MultiArray_layout -{ -public: - Init_UInt64MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt64MultiArray_data layout(::std_msgs::msg::UInt64MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt64MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::UInt64MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt64MultiArray>() -{ - return std_msgs::msg::builder::Init_UInt64MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__functions.c deleted file mode 100644 index 08941a3d9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int64_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__UInt64MultiArray__init(std_msgs__msg__UInt64MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__UInt64MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__init(&msg->data, 0)) { - std_msgs__msg__UInt64MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__UInt64MultiArray__fini(std_msgs__msg__UInt64MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint64__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__UInt64MultiArray__are_equal(const std_msgs__msg__UInt64MultiArray * lhs, const std_msgs__msg__UInt64MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt64MultiArray__copy( - const std_msgs__msg__UInt64MultiArray * input, - std_msgs__msg__UInt64MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint64__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__UInt64MultiArray * -std_msgs__msg__UInt64MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64MultiArray * msg = (std_msgs__msg__UInt64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt64MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt64MultiArray)); - bool success = std_msgs__msg__UInt64MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt64MultiArray__destroy(std_msgs__msg__UInt64MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt64MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt64MultiArray__Sequence__init(std_msgs__msg__UInt64MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt64MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt64MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt64MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt64MultiArray__Sequence__fini(std_msgs__msg__UInt64MultiArray__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) { - std_msgs__msg__UInt64MultiArray__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); - } -} - -std_msgs__msg__UInt64MultiArray__Sequence * -std_msgs__msg__UInt64MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt64MultiArray__Sequence * array = (std_msgs__msg__UInt64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt64MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt64MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt64MultiArray__Sequence__destroy(std_msgs__msg__UInt64MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt64MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt64MultiArray__Sequence__are_equal(const std_msgs__msg__UInt64MultiArray__Sequence * lhs, const std_msgs__msg__UInt64MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt64MultiArray__Sequence__copy( - const std_msgs__msg__UInt64MultiArray__Sequence * input, - std_msgs__msg__UInt64MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt64MultiArray); - std_msgs__msg__UInt64MultiArray * data = - (std_msgs__msg__UInt64MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt64MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt64MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt64MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 630e9850f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt64MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt64MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 04f8e99ae..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt64MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt64MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt64MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt64MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt64MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.h deleted file mode 100644 index 0b0b706e0..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt64MultiArray in the package std_msgs. -typedef struct std_msgs__msg__UInt64MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint64__Sequence data; -} std_msgs__msg__UInt64MultiArray; - -// Struct for a sequence of std_msgs__msg__UInt64MultiArray. -typedef struct std_msgs__msg__UInt64MultiArray__Sequence -{ - std_msgs__msg__UInt64MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt64MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.hpp deleted file mode 100644 index cb9744896..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt64MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt64MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt64MultiArray_ -{ - using Type = UInt64MultiArray_; - - explicit UInt64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt64MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::UInt64MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt64MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt64MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt64MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt64MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt64MultiArray_ - -// alias to use template instance with default allocator -using UInt64MultiArray = - std_msgs::msg::UInt64MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__traits.hpp deleted file mode 100644 index 172448ecd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt64MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt64MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.c deleted file mode 100644 index 115b2aece..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt64MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int64_multi_array__functions.h" -#include "std_msgs/msg/detail/u_int64_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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; - std_msgs__msg__UInt64MultiArray__init(message_memory); -} - -void UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__UInt64MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__UInt64MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt64MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members = { - "std_msgs__msg", // message namespace - "UInt64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__UInt64MultiArray), - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array, // message members - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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 UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle = { - 0, - &UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt64MultiArray)() { - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier) { - UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp deleted file mode 100644 index ca2704d14..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt64MultiArray.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 "std_msgs/msg/detail/u_int64_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt64MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt64MultiArray(_init); -} - -void UInt64MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt64MultiArray(); -} - -size_t size_function__UInt64MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt64MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt64MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt64MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt64MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt64MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt64MultiArray__data, // size() function pointer - get_const_function__UInt64MultiArray__data, // get_const(index) function pointer - get_function__UInt64MultiArray__data, // get(index) function pointer - resize_function__UInt64MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64MultiArray_message_members = { - "std_msgs::msg", // message namespace - "UInt64MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::UInt64MultiArray), - UInt64MultiArray_message_member_array, // message members - UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt64MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt64MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt64MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_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, std_msgs, msg, UInt64MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__builder.hpp deleted file mode 100644 index 232a0e452..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__builder.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int8__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt8_data -{ -public: - Init_UInt8_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_msgs::msg::UInt8 data(::std_msgs::msg::UInt8::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt8 msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt8>() -{ - return std_msgs::msg::builder::Init_UInt8_data(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__functions.c deleted file mode 100644 index e2a1f06f7..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__functions.c +++ /dev/null @@ -1,231 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int8__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -bool -std_msgs__msg__UInt8__init(std_msgs__msg__UInt8 * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_msgs__msg__UInt8__fini(std_msgs__msg__UInt8 * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_msgs__msg__UInt8__are_equal(const std_msgs__msg__UInt8 * lhs, const std_msgs__msg__UInt8 * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt8__copy( - const std_msgs__msg__UInt8 * input, - std_msgs__msg__UInt8 * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_msgs__msg__UInt8 * -std_msgs__msg__UInt8__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8 * msg = (std_msgs__msg__UInt8 *)allocator.allocate(sizeof(std_msgs__msg__UInt8), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt8)); - bool success = std_msgs__msg__UInt8__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt8__destroy(std_msgs__msg__UInt8 * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt8__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt8__Sequence__init(std_msgs__msg__UInt8__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8 * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt8 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt8), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt8__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt8__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt8__Sequence__fini(std_msgs__msg__UInt8__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) { - std_msgs__msg__UInt8__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); - } -} - -std_msgs__msg__UInt8__Sequence * -std_msgs__msg__UInt8__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8__Sequence * array = (std_msgs__msg__UInt8__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt8__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt8__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt8__Sequence__destroy(std_msgs__msg__UInt8__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt8__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt8__Sequence__are_equal(const std_msgs__msg__UInt8__Sequence * lhs, const std_msgs__msg__UInt8__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt8__Sequence__copy( - const std_msgs__msg__UInt8__Sequence * input, - std_msgs__msg__UInt8__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt8); - std_msgs__msg__UInt8 * data = - (std_msgs__msg__UInt8 *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt8__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt8__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt8__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 4ddcaaf48..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt8( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt8( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt8)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 1c32d9fb3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int8__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt8 & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt8 & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt8 & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt8( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt8)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.h deleted file mode 100644 index 869fcaa65..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.h +++ /dev/null @@ -1,40 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in msg/UInt8 in the package std_msgs. -typedef struct std_msgs__msg__UInt8 -{ - uint8_t data; -} std_msgs__msg__UInt8; - -// Struct for a sequence of std_msgs__msg__UInt8. -typedef struct std_msgs__msg__UInt8__Sequence -{ - std_msgs__msg__UInt8 * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt8__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.hpp deleted file mode 100644 index 4a5b6bee5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__struct.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt8 __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt8 __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt8_ -{ - using Type = UInt8_; - - explicit UInt8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->data = 0; - } - } - - explicit UInt8_(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->data = 0; - } - } - - // field types and members - using _data_type = - uint8_t; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const uint8_t & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt8_ *; - using ConstRawPtr = - const std_msgs::msg::UInt8_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt8 - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt8 - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt8_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt8_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt8_ - -// alias to use template instance with default allocator -using UInt8 = - std_msgs::msg::UInt8_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__traits.hpp deleted file mode 100644 index c3c61009c..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int8__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt8"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt8"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.c deleted file mode 100644 index 18f4830f5..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt8.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int8__functions.h" -#include "std_msgs/msg/detail/u_int8__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt8__rosidl_typesupport_introspection_c__UInt8_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; - std_msgs__msg__UInt8__init(message_memory); -} - -void UInt8__rosidl_typesupport_introspection_c__UInt8_fini_function(void * message_memory) -{ - std_msgs__msg__UInt8__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt8, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt8__rosidl_typesupport_introspection_c__UInt8_message_members = { - "std_msgs__msg", // message namespace - "UInt8", // message name - 1, // number of fields - sizeof(std_msgs__msg__UInt8), - UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array, // message members - UInt8__rosidl_typesupport_introspection_c__UInt8_init_function, // function to initialize message memory (memory has to be allocated) - UInt8__rosidl_typesupport_introspection_c__UInt8_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 UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle = { - 0, - &UInt8__rosidl_typesupport_introspection_c__UInt8_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt8)() { - if (!UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier) { - UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.cpp deleted file mode 100644 index 722dfe0ae..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt8.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 "std_msgs/msg/detail/u_int8__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt8_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt8(_init); -} - -void UInt8_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt8(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt8, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8_message_members = { - "std_msgs::msg", // message namespace - "UInt8", // message name - 1, // number of fields - sizeof(std_msgs::msg::UInt8), - UInt8_message_member_array, // message members - UInt8_init_function, // function to initialize message memory (memory has to be allocated) - UInt8_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt8_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt8_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8_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, std_msgs, msg, UInt8)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__builder.hpp deleted file mode 100644 index e68b2758f..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__builder.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ - -#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" -#include -#include -#include - - -namespace std_msgs -{ - -namespace msg -{ - -namespace builder -{ - -class Init_UInt8MultiArray_data -{ -public: - explicit Init_UInt8MultiArray_data(::std_msgs::msg::UInt8MultiArray & msg) - : msg_(msg) - {} - ::std_msgs::msg::UInt8MultiArray data(::std_msgs::msg::UInt8MultiArray::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_msgs::msg::UInt8MultiArray msg_; -}; - -class Init_UInt8MultiArray_layout -{ -public: - Init_UInt8MultiArray_layout() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_UInt8MultiArray_data layout(::std_msgs::msg::UInt8MultiArray::_layout_type arg) - { - msg_.layout = std::move(arg); - return Init_UInt8MultiArray_data(msg_); - } - -private: - ::std_msgs::msg::UInt8MultiArray msg_; -}; - -} // namespace builder - -} // namespace msg - -template -auto build(); - -template<> -inline -auto build<::std_msgs::msg::UInt8MultiArray>() -{ - return std_msgs::msg::builder::Init_UInt8MultiArray_layout(); -} - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__functions.c deleted file mode 100644 index 678a96369..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__functions.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice -#include "std_msgs/msg/detail/u_int8_multi_array__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__functions.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -bool -std_msgs__msg__UInt8MultiArray__init(std_msgs__msg__UInt8MultiArray * msg) -{ - if (!msg) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { - std_msgs__msg__UInt8MultiArray__fini(msg); - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { - std_msgs__msg__UInt8MultiArray__fini(msg); - return false; - } - return true; -} - -void -std_msgs__msg__UInt8MultiArray__fini(std_msgs__msg__UInt8MultiArray * msg) -{ - if (!msg) { - return; - } - // layout - std_msgs__msg__MultiArrayLayout__fini(&msg->layout); - // data - rosidl_runtime_c__uint8__Sequence__fini(&msg->data); -} - -bool -std_msgs__msg__UInt8MultiArray__are_equal(const std_msgs__msg__UInt8MultiArray * lhs, const std_msgs__msg__UInt8MultiArray * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__are_equal( - &(lhs->layout), &(rhs->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__are_equal( - &(lhs->data), &(rhs->data))) - { - return false; - } - return true; -} - -bool -std_msgs__msg__UInt8MultiArray__copy( - const std_msgs__msg__UInt8MultiArray * input, - std_msgs__msg__UInt8MultiArray * output) -{ - if (!input || !output) { - return false; - } - // layout - if (!std_msgs__msg__MultiArrayLayout__copy( - &(input->layout), &(output->layout))) - { - return false; - } - // data - if (!rosidl_runtime_c__uint8__Sequence__copy( - &(input->data), &(output->data))) - { - return false; - } - return true; -} - -std_msgs__msg__UInt8MultiArray * -std_msgs__msg__UInt8MultiArray__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8MultiArray * msg = (std_msgs__msg__UInt8MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt8MultiArray), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_msgs__msg__UInt8MultiArray)); - bool success = std_msgs__msg__UInt8MultiArray__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_msgs__msg__UInt8MultiArray__destroy(std_msgs__msg__UInt8MultiArray * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_msgs__msg__UInt8MultiArray__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_msgs__msg__UInt8MultiArray__Sequence__init(std_msgs__msg__UInt8MultiArray__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8MultiArray * data = NULL; - - if (size) { - data = (std_msgs__msg__UInt8MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt8MultiArray), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_msgs__msg__UInt8MultiArray__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_msgs__msg__UInt8MultiArray__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_msgs__msg__UInt8MultiArray__Sequence__fini(std_msgs__msg__UInt8MultiArray__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) { - std_msgs__msg__UInt8MultiArray__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); - } -} - -std_msgs__msg__UInt8MultiArray__Sequence * -std_msgs__msg__UInt8MultiArray__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_msgs__msg__UInt8MultiArray__Sequence * array = (std_msgs__msg__UInt8MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt8MultiArray__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_msgs__msg__UInt8MultiArray__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_msgs__msg__UInt8MultiArray__Sequence__destroy(std_msgs__msg__UInt8MultiArray__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_msgs__msg__UInt8MultiArray__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_msgs__msg__UInt8MultiArray__Sequence__are_equal(const std_msgs__msg__UInt8MultiArray__Sequence * lhs, const std_msgs__msg__UInt8MultiArray__Sequence * rhs) -{ - if (!lhs || !rhs) { - return false; - } - if (lhs->size != rhs->size) { - return false; - } - for (size_t i = 0; i < lhs->size; ++i) { - if (!std_msgs__msg__UInt8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_msgs__msg__UInt8MultiArray__Sequence__copy( - const std_msgs__msg__UInt8MultiArray__Sequence * input, - std_msgs__msg__UInt8MultiArray__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_msgs__msg__UInt8MultiArray); - std_msgs__msg__UInt8MultiArray * data = - (std_msgs__msg__UInt8MultiArray *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_msgs__msg__UInt8MultiArray__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_msgs__msg__UInt8MultiArray__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_msgs__msg__UInt8MultiArray__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 2797d7673..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,36 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t get_serialized_size_std_msgs__msg__UInt8MultiArray( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -size_t max_serialized_size_std_msgs__msg__UInt8MultiArray( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index f33104f39..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,79 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_msgs/msg/detail/u_int8_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_serialize( - const std_msgs::msg::UInt8MultiArray & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_msgs::msg::UInt8MultiArray & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -get_serialized_size( - const std_msgs::msg::UInt8MultiArray & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -max_serialized_size_UInt8MultiArray( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace msg - -} // namespace std_msgs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt8MultiArray)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.h deleted file mode 100644 index c2cb368d4..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.h +++ /dev/null @@ -1,47 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.h" -// Member 'data' -#include "rosidl_runtime_c/primitives_sequence.h" - -// Struct defined in msg/UInt8MultiArray in the package std_msgs. -typedef struct std_msgs__msg__UInt8MultiArray -{ - std_msgs__msg__MultiArrayLayout layout; - rosidl_runtime_c__uint8__Sequence data; -} std_msgs__msg__UInt8MultiArray; - -// Struct for a sequence of std_msgs__msg__UInt8MultiArray. -typedef struct std_msgs__msg__UInt8MultiArray__Sequence -{ - std_msgs__msg__UInt8MultiArray * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_msgs__msg__UInt8MultiArray__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.hpp deleted file mode 100644 index 5a516a105..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__struct.hpp +++ /dev/null @@ -1,139 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__std_msgs__msg__UInt8MultiArray __attribute__((deprecated)) -#else -# define DEPRECATED__std_msgs__msg__UInt8MultiArray __declspec(deprecated) -#endif - -namespace std_msgs -{ - -namespace msg -{ - -// message struct -template -struct UInt8MultiArray_ -{ - using Type = UInt8MultiArray_; - - explicit UInt8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_init) - { - (void)_init; - } - - explicit UInt8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : layout(_alloc, _init) - { - (void)_init; - } - - // field types and members - using _layout_type = - std_msgs::msg::MultiArrayLayout_; - _layout_type layout; - using _data_type = - std::vector::other>; - _data_type data; - - // setters for named parameter idiom - Type & set__layout( - const std_msgs::msg::MultiArrayLayout_ & _arg) - { - this->layout = _arg; - return *this; - } - Type & set__data( - const std::vector::other> & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_msgs::msg::UInt8MultiArray_ *; - using ConstRawPtr = - const std_msgs::msg::UInt8MultiArray_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_msgs__msg__UInt8MultiArray - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_msgs__msg__UInt8MultiArray - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const UInt8MultiArray_ & other) const - { - if (this->layout != other.layout) { - return false; - } - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const UInt8MultiArray_ & other) const - { - return !this->operator==(other); - } -}; // struct UInt8MultiArray_ - -// alias to use template instance with default allocator -using UInt8MultiArray = - std_msgs::msg::UInt8MultiArray_>; - -// constant definitions - -} // namespace msg - -} // namespace std_msgs - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__traits.hpp deleted file mode 100644 index 874c4fae2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ -#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ - -#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'layout' -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_msgs::msg::UInt8MultiArray"; -} - -template<> -inline const char * name() -{ - return "std_msgs/msg/UInt8MultiArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.c deleted file mode 100644 index 242251c65..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.c +++ /dev/null @@ -1,106 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_msgs:msg/UInt8MultiArray.idl -// generated code does not contain a copyright notice - -#include -#include "std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h" -#include "std_msgs/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 "std_msgs/msg/detail/u_int8_multi_array__functions.h" -#include "std_msgs/msg/detail/u_int8_multi_array__struct.h" - - -// Include directives for member types -// Member `layout` -#include "std_msgs/msg/multi_array_layout.h" -// Member `layout` -#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" -// Member `data` -#include "rosidl_runtime_c/primitives_sequence_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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; - std_msgs__msg__UInt8MultiArray__init(message_memory); -} - -void UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_fini_function(void * message_memory) -{ - std_msgs__msg__UInt8MultiArray__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[2] = { - { - "layout", // 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(std_msgs__msg__UInt8MultiArray, layout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs__msg__UInt8MultiArray, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members = { - "std_msgs__msg", // message namespace - "UInt8MultiArray", // message name - 2, // number of fields - sizeof(std_msgs__msg__UInt8MultiArray), - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array, // message members - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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 UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle = { - 0, - &UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt8MultiArray)() { - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); - if (!UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier) { - UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp deleted file mode 100644 index 0ce0af411..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_msgs:msg/UInt8MultiArray.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 "std_msgs/msg/detail/u_int8_multi_array__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 std_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void UInt8MultiArray_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_msgs::msg::UInt8MultiArray(_init); -} - -void UInt8MultiArray_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~UInt8MultiArray(); -} - -size_t size_function__UInt8MultiArray__data(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__UInt8MultiArray__data(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__UInt8MultiArray__data(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__UInt8MultiArray__data(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8MultiArray_message_member_array[2] = { - { - "layout", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt8MultiArray, layout), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(std_msgs::msg::UInt8MultiArray, data), // bytes offset in struct - nullptr, // default value - size_function__UInt8MultiArray__data, // size() function pointer - get_const_function__UInt8MultiArray__data, // get_const(index) function pointer - get_function__UInt8MultiArray__data, // get(index) function pointer - resize_function__UInt8MultiArray__data // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8MultiArray_message_members = { - "std_msgs::msg", // message namespace - "UInt8MultiArray", // message name - 2, // number of fields - sizeof(std_msgs::msg::UInt8MultiArray), - UInt8MultiArray_message_member_array, // message members - UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) - UInt8MultiArray_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t UInt8MultiArray_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &UInt8MultiArray_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace std_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_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, std_msgs, msg, UInt8MultiArray)() { - return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/empty.hpp b/ThirdParty/ros/include/std_msgs/msg/empty.hpp deleted file mode 100644 index 32d2ed0ef..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/empty.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__EMPTY_HPP_ -#define STD_MSGS__MSG__EMPTY_HPP_ - -#include "std_msgs/msg/detail/empty__struct.hpp" -#include "std_msgs/msg/detail/empty__builder.hpp" -#include "std_msgs/msg/detail/empty__traits.hpp" - -#endif // STD_MSGS__MSG__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float32.hpp b/ThirdParty/ros/include/std_msgs/msg/float32.hpp deleted file mode 100644 index bebb68605..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/float32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__FLOAT32_HPP_ -#define STD_MSGS__MSG__FLOAT32_HPP_ - -#include "std_msgs/msg/detail/float32__struct.hpp" -#include "std_msgs/msg/detail/float32__builder.hpp" -#include "std_msgs/msg/detail/float32__traits.hpp" - -#endif // STD_MSGS__MSG__FLOAT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/float32_multi_array.hpp deleted file mode 100644 index 8ca378962..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/float32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" -#include "std_msgs/msg/detail/float32_multi_array__builder.hpp" -#include "std_msgs/msg/detail/float32_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float64.hpp b/ThirdParty/ros/include/std_msgs/msg/float64.hpp deleted file mode 100644 index 29c4ca545..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/float64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__FLOAT64_HPP_ -#define STD_MSGS__MSG__FLOAT64_HPP_ - -#include "std_msgs/msg/detail/float64__struct.hpp" -#include "std_msgs/msg/detail/float64__builder.hpp" -#include "std_msgs/msg/detail/float64__traits.hpp" - -#endif // STD_MSGS__MSG__FLOAT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/float64_multi_array.hpp deleted file mode 100644 index 47c547689..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/float64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" -#include "std_msgs/msg/detail/float64_multi_array__builder.hpp" -#include "std_msgs/msg/detail/float64_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int16.hpp b/ThirdParty/ros/include/std_msgs/msg/int16.hpp deleted file mode 100644 index d3770c397..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int16.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT16_HPP_ -#define STD_MSGS__MSG__INT16_HPP_ - -#include "std_msgs/msg/detail/int16__struct.hpp" -#include "std_msgs/msg/detail/int16__builder.hpp" -#include "std_msgs/msg/detail/int16__traits.hpp" - -#endif // STD_MSGS__MSG__INT16_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int16_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/int16_multi_array.hpp deleted file mode 100644 index 81872a780..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int16_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" -#include "std_msgs/msg/detail/int16_multi_array__builder.hpp" -#include "std_msgs/msg/detail/int16_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int32.hpp b/ThirdParty/ros/include/std_msgs/msg/int32.hpp deleted file mode 100644 index bae4ba6e2..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT32_HPP_ -#define STD_MSGS__MSG__INT32_HPP_ - -#include "std_msgs/msg/detail/int32__struct.hpp" -#include "std_msgs/msg/detail/int32__builder.hpp" -#include "std_msgs/msg/detail/int32__traits.hpp" - -#endif // STD_MSGS__MSG__INT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/int32_multi_array.hpp deleted file mode 100644 index d21099476..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" -#include "std_msgs/msg/detail/int32_multi_array__builder.hpp" -#include "std_msgs/msg/detail/int32_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int64.hpp b/ThirdParty/ros/include/std_msgs/msg/int64.hpp deleted file mode 100644 index a34d6605d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT64_HPP_ -#define STD_MSGS__MSG__INT64_HPP_ - -#include "std_msgs/msg/detail/int64__struct.hpp" -#include "std_msgs/msg/detail/int64__builder.hpp" -#include "std_msgs/msg/detail/int64__traits.hpp" - -#endif // STD_MSGS__MSG__INT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/int64_multi_array.hpp deleted file mode 100644 index 6e50a1172..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" -#include "std_msgs/msg/detail/int64_multi_array__builder.hpp" -#include "std_msgs/msg/detail/int64_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int8.hpp b/ThirdParty/ros/include/std_msgs/msg/int8.hpp deleted file mode 100644 index 029a078dd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int8.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT8_HPP_ -#define STD_MSGS__MSG__INT8_HPP_ - -#include "std_msgs/msg/detail/int8__struct.hpp" -#include "std_msgs/msg/detail/int8__builder.hpp" -#include "std_msgs/msg/detail/int8__traits.hpp" - -#endif // STD_MSGS__MSG__INT8_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int8_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/int8_multi_array.hpp deleted file mode 100644 index a4c2b2bd3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/int8_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" -#include "std_msgs/msg/detail/int8_multi_array__builder.hpp" -#include "std_msgs/msg/detail/int8_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/multi_array_dimension.hpp b/ThirdParty/ros/include/std_msgs/msg/multi_array_dimension.hpp deleted file mode 100644 index e6f0842ce..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/multi_array_dimension.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ -#define STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ - -#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" -#include "std_msgs/msg/detail/multi_array_dimension__builder.hpp" -#include "std_msgs/msg/detail/multi_array_dimension__traits.hpp" - -#endif // STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/multi_array_layout.hpp b/ThirdParty/ros/include/std_msgs/msg/multi_array_layout.hpp deleted file mode 100644 index 53d3224f0..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/multi_array_layout.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ -#define STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ - -#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" -#include "std_msgs/msg/detail/multi_array_layout__builder.hpp" -#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" - -#endif // STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/string.hpp b/ThirdParty/ros/include/std_msgs/msg/string.hpp deleted file mode 100644 index 0adae558e..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/string.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__STRING_HPP_ -#define STD_MSGS__MSG__STRING_HPP_ - -#include "std_msgs/msg/detail/string__struct.hpp" -#include "std_msgs/msg/detail/string__builder.hpp" -#include "std_msgs/msg/detail/string__traits.hpp" - -#endif // STD_MSGS__MSG__STRING_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int16.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int16.hpp deleted file mode 100644 index 9913cb921..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int16.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT16_HPP_ -#define STD_MSGS__MSG__U_INT16_HPP_ - -#include "std_msgs/msg/detail/u_int16__struct.hpp" -#include "std_msgs/msg/detail/u_int16__builder.hpp" -#include "std_msgs/msg/detail/u_int16__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT16_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int16_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int16_multi_array.hpp deleted file mode 100644 index 5addbe9fd..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int16_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" -#include "std_msgs/msg/detail/u_int16_multi_array__builder.hpp" -#include "std_msgs/msg/detail/u_int16_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int32.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int32.hpp deleted file mode 100644 index 5548226d9..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int32.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT32_HPP_ -#define STD_MSGS__MSG__U_INT32_HPP_ - -#include "std_msgs/msg/detail/u_int32__struct.hpp" -#include "std_msgs/msg/detail/u_int32__builder.hpp" -#include "std_msgs/msg/detail/u_int32__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int32_multi_array.hpp deleted file mode 100644 index 33178ea49..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int32_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" -#include "std_msgs/msg/detail/u_int32_multi_array__builder.hpp" -#include "std_msgs/msg/detail/u_int32_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int64.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int64.hpp deleted file mode 100644 index bdb64c6f3..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int64.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT64_HPP_ -#define STD_MSGS__MSG__U_INT64_HPP_ - -#include "std_msgs/msg/detail/u_int64__struct.hpp" -#include "std_msgs/msg/detail/u_int64__builder.hpp" -#include "std_msgs/msg/detail/u_int64__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int64_multi_array.hpp deleted file mode 100644 index 58027d91d..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int64_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" -#include "std_msgs/msg/detail/u_int64_multi_array__builder.hpp" -#include "std_msgs/msg/detail/u_int64_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int8.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int8.hpp deleted file mode 100644 index 3e58ac0ca..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int8.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT8_HPP_ -#define STD_MSGS__MSG__U_INT8_HPP_ - -#include "std_msgs/msg/detail/u_int8__struct.hpp" -#include "std_msgs/msg/detail/u_int8__builder.hpp" -#include "std_msgs/msg/detail/u_int8__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT8_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int8_multi_array.hpp b/ThirdParty/ros/include/std_msgs/msg/u_int8_multi_array.hpp deleted file mode 100644 index df6df44ca..000000000 --- a/ThirdParty/ros/include/std_msgs/msg/u_int8_multi_array.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ -#define STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ - -#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" -#include "std_msgs/msg/detail/u_int8_multi_array__builder.hpp" -#include "std_msgs/msg/detail/u_int8_multi_array__traits.hpp" - -#endif // STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/bool.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/bool.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/bool.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/bool.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/bool.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/bool.hpp new file mode 100644 index 000000000..d7ee041e3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/bool.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__BOOL_HPP_ +#define STD_MSGS__MSG__BOOL_HPP_ + +#include "std_msgs/msg/detail/bool__struct.hpp" +#include "std_msgs/msg/detail/bool__builder.hpp" +#include "std_msgs/msg/detail/bool__traits.hpp" +#include "std_msgs/msg/detail/bool__type_support.hpp" + +#endif // STD_MSGS__MSG__BOOL_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/byte.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/byte.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/byte.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte.hpp new file mode 100644 index 000000000..fa222badc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__BYTE_HPP_ +#define STD_MSGS__MSG__BYTE_HPP_ + +#include "std_msgs/msg/detail/byte__struct.hpp" +#include "std_msgs/msg/detail/byte__builder.hpp" +#include "std_msgs/msg/detail/byte__traits.hpp" +#include "std_msgs/msg/detail/byte__type_support.hpp" + +#endif // STD_MSGS__MSG__BYTE_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/byte_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/byte_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/byte_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte_multi_array.hpp new file mode 100644 index 000000000..ca32c92e0 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/byte_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" +#include "std_msgs/msg/detail/byte_multi_array__builder.hpp" +#include "std_msgs/msg/detail/byte_multi_array__traits.hpp" +#include "std_msgs/msg/detail/byte_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__BYTE_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/char.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/char.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/char.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/char.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/char.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/char.hpp new file mode 100644 index 000000000..9be90427f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/char.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__CHAR_HPP_ +#define STD_MSGS__MSG__CHAR_HPP_ + +#include "std_msgs/msg/detail/char__struct.hpp" +#include "std_msgs/msg/detail/char__builder.hpp" +#include "std_msgs/msg/detail/char__traits.hpp" +#include "std_msgs/msg/detail/char__type_support.hpp" + +#endif // STD_MSGS__MSG__CHAR_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/color_rgba.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/color_rgba.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/color_rgba.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/color_rgba.h diff --git a/ThirdParty/ros/include/std_msgs/msg/color_rgba.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/color_rgba.hpp similarity index 86% rename from ThirdParty/ros/include/std_msgs/msg/color_rgba.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/color_rgba.hpp index 49a8ab4f4..21bc6a581 100644 --- a/ThirdParty/ros/include/std_msgs/msg/color_rgba.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/color_rgba.hpp @@ -7,5 +7,6 @@ #include "std_msgs/msg/detail/color_rgba__struct.hpp" #include "std_msgs/msg/detail/color_rgba__builder.hpp" #include "std_msgs/msg/detail/color_rgba__traits.hpp" +#include "std_msgs/msg/detail/color_rgba__type_support.hpp" #endif // STD_MSGS__MSG__COLOR_RGBA_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__builder.hpp new file mode 100644 index 000000000..b5c6d28e2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/bool__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Bool_data +{ +public: + Init_Bool_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Bool data(::std_msgs::msg::Bool::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Bool msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Bool>() +{ + return std_msgs::msg::builder::Init_Bool_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__functions.c new file mode 100644 index 000000000..6d4446afd --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/bool__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Bool__init(std_msgs__msg__Bool * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Bool__fini(std_msgs__msg__Bool * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Bool__are_equal(const std_msgs__msg__Bool * lhs, const std_msgs__msg__Bool * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Bool__copy( + const std_msgs__msg__Bool * input, + std_msgs__msg__Bool * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Bool * +std_msgs__msg__Bool__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Bool * msg = (std_msgs__msg__Bool *)allocator.allocate(sizeof(std_msgs__msg__Bool), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Bool)); + bool success = std_msgs__msg__Bool__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Bool__destroy(std_msgs__msg__Bool * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Bool__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Bool__Sequence__init(std_msgs__msg__Bool__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Bool * data = NULL; + + if (size) { + data = (std_msgs__msg__Bool *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Bool), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Bool__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Bool__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Bool__Sequence__fini(std_msgs__msg__Bool__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) { + std_msgs__msg__Bool__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); + } +} + +std_msgs__msg__Bool__Sequence * +std_msgs__msg__Bool__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Bool__Sequence * array = (std_msgs__msg__Bool__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Bool__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Bool__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Bool__Sequence__destroy(std_msgs__msg__Bool__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Bool__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Bool__Sequence__are_equal(const std_msgs__msg__Bool__Sequence * lhs, const std_msgs__msg__Bool__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Bool__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Bool__Sequence__copy( + const std_msgs__msg__Bool__Sequence * input, + std_msgs__msg__Bool__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Bool); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Bool * data = + (std_msgs__msg__Bool *)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 (!std_msgs__msg__Bool__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; ) { + std_msgs__msg__Bool__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Bool__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/bool__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..a9ffd75cb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Bool( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Bool( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Bool)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..c9a8f4eaf --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/bool__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Bool & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Bool & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Bool & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Bool( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Bool)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.h new file mode 100644 index 000000000..170a4ced3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Bool in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Bool +{ + bool data; +} std_msgs__msg__Bool; + +// Struct for a sequence of std_msgs__msg__Bool. +typedef struct std_msgs__msg__Bool__Sequence +{ + std_msgs__msg__Bool * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Bool__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.hpp new file mode 100644 index 000000000..bd8b38e64 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Bool __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Bool __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Bool_ +{ + using Type = Bool_; + + explicit Bool_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = false; + } + } + + explicit Bool_(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->data = false; + } + } + + // field types and members + using _data_type = + bool; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const bool & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Bool_ *; + using ConstRawPtr = + const std_msgs::msg::Bool_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Bool + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Bool + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Bool_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Bool_ & other) const + { + return !this->operator==(other); + } +}; // struct Bool_ + +// alias to use template instance with default allocator +using Bool = + std_msgs::msg::Bool_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__traits.hpp new file mode 100644 index 000000000..398bb1cf1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/bool__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Bool & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Bool & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Bool & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Bool & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Bool & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Bool"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Bool"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.c new file mode 100644 index 000000000..60635e2a8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/bool__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/bool__functions.h" +#include "std_msgs/msg/detail/bool__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_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; + std_msgs__msg__Bool__init(message_memory); +} + +void std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_fini_function(void * message_memory) +{ + std_msgs__msg__Bool__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Bool, data), // 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 std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_members = { + "std_msgs__msg", // message namespace + "Bool", // message name + 1, // number of fields + sizeof(std_msgs__msg__Bool), + std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_member_array, // message members + std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_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 std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle = { + 0, + &std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Bool)() { + if (!std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Bool__rosidl_typesupport_introspection_c__Bool_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.cpp new file mode 100644 index 000000000..fc7454137 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Bool.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 "std_msgs/msg/detail/bool__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Bool_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Bool(_init); +} + +void Bool_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Bool(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Bool_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Bool, data), // 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 Bool_message_members = { + "std_msgs::msg", // message namespace + "Bool", // message name + 1, // number of fields + sizeof(std_msgs::msg::Bool), + Bool_message_member_array, // message members + Bool_init_function, // function to initialize message memory (memory has to be allocated) + Bool_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Bool_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Bool_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Bool_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, std_msgs, msg, Bool)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Bool_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/bool__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.hpp new file mode 100644 index 000000000..fcf36c1ad --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/bool__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Bool.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Bool +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BOOL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__builder.hpp new file mode 100644 index 000000000..6fdda542a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/byte__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Byte_data +{ +public: + Init_Byte_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Byte data(::std_msgs::msg::Byte::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Byte msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Byte>() +{ + return std_msgs::msg::builder::Init_Byte_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BYTE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__functions.c new file mode 100644 index 000000000..8200fd7c1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/byte__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Byte__init(std_msgs__msg__Byte * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Byte__fini(std_msgs__msg__Byte * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Byte__are_equal(const std_msgs__msg__Byte * lhs, const std_msgs__msg__Byte * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Byte__copy( + const std_msgs__msg__Byte * input, + std_msgs__msg__Byte * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Byte * +std_msgs__msg__Byte__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Byte * msg = (std_msgs__msg__Byte *)allocator.allocate(sizeof(std_msgs__msg__Byte), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Byte)); + bool success = std_msgs__msg__Byte__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Byte__destroy(std_msgs__msg__Byte * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Byte__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Byte__Sequence__init(std_msgs__msg__Byte__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Byte * data = NULL; + + if (size) { + data = (std_msgs__msg__Byte *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Byte), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Byte__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Byte__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Byte__Sequence__fini(std_msgs__msg__Byte__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) { + std_msgs__msg__Byte__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); + } +} + +std_msgs__msg__Byte__Sequence * +std_msgs__msg__Byte__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Byte__Sequence * array = (std_msgs__msg__Byte__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Byte__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Byte__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Byte__Sequence__destroy(std_msgs__msg__Byte__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Byte__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Byte__Sequence__are_equal(const std_msgs__msg__Byte__Sequence * lhs, const std_msgs__msg__Byte__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Byte__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Byte__Sequence__copy( + const std_msgs__msg__Byte__Sequence * input, + std_msgs__msg__Byte__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Byte); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Byte * data = + (std_msgs__msg__Byte *)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 (!std_msgs__msg__Byte__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; ) { + std_msgs__msg__Byte__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Byte__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b8a7eceee --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Byte( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Byte( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Byte)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..9d8a74a27 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/byte__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Byte & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Byte & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Byte & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Byte( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Byte)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.h new file mode 100644 index 000000000..0d85fe759 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Byte in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Byte +{ + uint8_t data; +} std_msgs__msg__Byte; + +// Struct for a sequence of std_msgs__msg__Byte. +typedef struct std_msgs__msg__Byte__Sequence +{ + std_msgs__msg__Byte * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Byte__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.hpp new file mode 100644 index 000000000..f56155908 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Byte __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Byte __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Byte_ +{ + using Type = Byte_; + + explicit Byte_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Byte_(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->data = 0; + } + } + + // field types and members + using _data_type = + unsigned char; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const unsigned char & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Byte_ *; + using ConstRawPtr = + const std_msgs::msg::Byte_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Byte + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Byte + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Byte_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Byte_ & other) const + { + return !this->operator==(other); + } +}; // struct Byte_ + +// alias to use template instance with default allocator +using Byte = + std_msgs::msg::Byte_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BYTE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__traits.hpp new file mode 100644 index 000000000..5d738cdc7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/byte__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Byte & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::character_value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Byte & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::character_value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Byte & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Byte & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Byte & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Byte"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Byte"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__BYTE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.c new file mode 100644 index 000000000..f0d05ec4e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/byte__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/byte__functions.h" +#include "std_msgs/msg/detail/byte__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_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; + std_msgs__msg__Byte__init(message_memory); +} + +void std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_fini_function(void * message_memory) +{ + std_msgs__msg__Byte__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Byte, data), // 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 std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_members = { + "std_msgs__msg", // message namespace + "Byte", // message name + 1, // number of fields + sizeof(std_msgs__msg__Byte), + std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_member_array, // message members + std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_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 std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle = { + 0, + &std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Byte)() { + if (!std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Byte__rosidl_typesupport_introspection_c__Byte_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.cpp new file mode 100644 index 000000000..9668dde92 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Byte.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 "std_msgs/msg/detail/byte__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Byte_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Byte(_init); +} + +void Byte_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Byte(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Byte_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Byte, data), // 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 Byte_message_members = { + "std_msgs::msg", // message namespace + "Byte", // message name + 1, // number of fields + sizeof(std_msgs::msg::Byte), + Byte_message_member_array, // message members + Byte_init_function, // function to initialize message memory (memory has to be allocated) + Byte_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Byte_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Byte_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Byte_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, std_msgs, msg, Byte)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Byte_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.hpp new file mode 100644 index 000000000..9f068267e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Byte.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Byte +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__builder.hpp new file mode 100644 index 000000000..7d25c60dd --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_ByteMultiArray_data +{ +public: + explicit Init_ByteMultiArray_data(::std_msgs::msg::ByteMultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::ByteMultiArray data(::std_msgs::msg::ByteMultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::ByteMultiArray msg_; +}; + +class Init_ByteMultiArray_layout +{ +public: + Init_ByteMultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_ByteMultiArray_data layout(::std_msgs::msg::ByteMultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_ByteMultiArray_data(msg_); + } + +private: + ::std_msgs::msg::ByteMultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::ByteMultiArray>() +{ + return std_msgs::msg::builder::Init_ByteMultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__functions.c new file mode 100644 index 000000000..ee7e254ba --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/byte_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__ByteMultiArray__init(std_msgs__msg__ByteMultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__ByteMultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__init(&msg->data, 0)) { + std_msgs__msg__ByteMultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__ByteMultiArray__fini(std_msgs__msg__ByteMultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__octet__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__ByteMultiArray__are_equal(const std_msgs__msg__ByteMultiArray * lhs, const std_msgs__msg__ByteMultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__ByteMultiArray__copy( + const std_msgs__msg__ByteMultiArray * input, + std_msgs__msg__ByteMultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__octet__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__ByteMultiArray * +std_msgs__msg__ByteMultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__ByteMultiArray * msg = (std_msgs__msg__ByteMultiArray *)allocator.allocate(sizeof(std_msgs__msg__ByteMultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__ByteMultiArray)); + bool success = std_msgs__msg__ByteMultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__ByteMultiArray__destroy(std_msgs__msg__ByteMultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__ByteMultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__ByteMultiArray__Sequence__init(std_msgs__msg__ByteMultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__ByteMultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__ByteMultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__ByteMultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__ByteMultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__ByteMultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__ByteMultiArray__Sequence__fini(std_msgs__msg__ByteMultiArray__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) { + std_msgs__msg__ByteMultiArray__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); + } +} + +std_msgs__msg__ByteMultiArray__Sequence * +std_msgs__msg__ByteMultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__ByteMultiArray__Sequence * array = (std_msgs__msg__ByteMultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__ByteMultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__ByteMultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__ByteMultiArray__Sequence__destroy(std_msgs__msg__ByteMultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__ByteMultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__ByteMultiArray__Sequence__are_equal(const std_msgs__msg__ByteMultiArray__Sequence * lhs, const std_msgs__msg__ByteMultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__ByteMultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__ByteMultiArray__Sequence__copy( + const std_msgs__msg__ByteMultiArray__Sequence * input, + std_msgs__msg__ByteMultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__ByteMultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__ByteMultiArray * data = + (std_msgs__msg__ByteMultiArray *)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 (!std_msgs__msg__ByteMultiArray__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; ) { + std_msgs__msg__ByteMultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__ByteMultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..e12291920 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__ByteMultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__ByteMultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, ByteMultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..e92846809 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/byte_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::ByteMultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::ByteMultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::ByteMultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_ByteMultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, ByteMultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.h new file mode 100644 index 000000000..5f864d29a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/ByteMultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__ByteMultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__octet__Sequence data; +} std_msgs__msg__ByteMultiArray; + +// Struct for a sequence of std_msgs__msg__ByteMultiArray. +typedef struct std_msgs__msg__ByteMultiArray__Sequence +{ + std_msgs__msg__ByteMultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__ByteMultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.hpp new file mode 100644 index 000000000..2a3432dd1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__ByteMultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__ByteMultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct ByteMultiArray_ +{ + using Type = ByteMultiArray_; + + explicit ByteMultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit ByteMultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::ByteMultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::ByteMultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__ByteMultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__ByteMultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const ByteMultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const ByteMultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct ByteMultiArray_ + +// alias to use template instance with default allocator +using ByteMultiArray = + std_msgs::msg::ByteMultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__traits.hpp new file mode 100644 index 000000000..542ea4f22 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/byte_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ByteMultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::character_value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ByteMultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::character_value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ByteMultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::ByteMultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::ByteMultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::ByteMultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/ByteMultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.c new file mode 100644 index 000000000..ac2e72d39 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/byte_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/byte_multi_array__functions.h" +#include "std_msgs/msg/detail/byte_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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; + std_msgs__msg__ByteMultiArray__init(message_memory); +} + +void std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__ByteMultiArray__fini(message_memory); +} + +size_t std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__size_function__ByteMultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__octet__Sequence * member = + (const rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__fetch_function__ByteMultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__assign_function__ByteMultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__resize_function__ByteMultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__octet__Sequence * member = + (rosidl_runtime_c__octet__Sequence *)(untyped_member); + rosidl_runtime_c__octet__Sequence__fini(member); + return rosidl_runtime_c__octet__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__ByteMultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_OCTET, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__ByteMultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__size_function__ByteMultiArray__data, // size() function pointer + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_const_function__ByteMultiArray__data, // get_const(index) function pointer + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__get_function__ByteMultiArray__data, // get(index) function pointer + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__fetch_function__ByteMultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__assign_function__ByteMultiArray__data, // assign(index, value) function pointer + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__resize_function__ByteMultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members = { + "std_msgs__msg", // message namespace + "ByteMultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__ByteMultiArray), + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array, // message members + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_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 std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ByteMultiArray)() { + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__ByteMultiArray__rosidl_typesupport_introspection_c__ByteMultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.cpp new file mode 100644 index 000000000..aa4c909f2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/ByteMultiArray.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 "std_msgs/msg/detail/byte_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ByteMultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::ByteMultiArray(_init); +} + +void ByteMultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ByteMultiArray(); +} + +size_t size_function__ByteMultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__ByteMultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__ByteMultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__ByteMultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ByteMultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ByteMultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ByteMultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__ByteMultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ByteMultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::ByteMultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_OCTET, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::ByteMultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__ByteMultiArray__data, // size() function pointer + get_const_function__ByteMultiArray__data, // get_const(index) function pointer + get_function__ByteMultiArray__data, // get(index) function pointer + fetch_function__ByteMultiArray__data, // fetch(index, &value) function pointer + assign_function__ByteMultiArray__data, // assign(index, value) function pointer + resize_function__ByteMultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ByteMultiArray_message_members = { + "std_msgs::msg", // message namespace + "ByteMultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::ByteMultiArray), + ByteMultiArray_message_member_array, // message members + ByteMultiArray_init_function, // function to initialize message memory (memory has to be allocated) + ByteMultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ByteMultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ByteMultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_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, std_msgs, msg, ByteMultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::ByteMultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/byte_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.hpp new file mode 100644 index 000000000..3244e8bbb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/byte_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/ByteMultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + ByteMultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__BYTE_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__builder.hpp new file mode 100644 index 000000000..91f90b884 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/char__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Char_data +{ +public: + Init_Char_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Char data(::std_msgs::msg::Char::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Char msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Char>() +{ + return std_msgs::msg::builder::Init_Char_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__CHAR__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__functions.c new file mode 100644 index 000000000..f927bda2d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/char__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Char__init(std_msgs__msg__Char * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Char__fini(std_msgs__msg__Char * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Char__are_equal(const std_msgs__msg__Char * lhs, const std_msgs__msg__Char * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Char__copy( + const std_msgs__msg__Char * input, + std_msgs__msg__Char * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Char * +std_msgs__msg__Char__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Char * msg = (std_msgs__msg__Char *)allocator.allocate(sizeof(std_msgs__msg__Char), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Char)); + bool success = std_msgs__msg__Char__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Char__destroy(std_msgs__msg__Char * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Char__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Char__Sequence__init(std_msgs__msg__Char__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Char * data = NULL; + + if (size) { + data = (std_msgs__msg__Char *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Char), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Char__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Char__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Char__Sequence__fini(std_msgs__msg__Char__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) { + std_msgs__msg__Char__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); + } +} + +std_msgs__msg__Char__Sequence * +std_msgs__msg__Char__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Char__Sequence * array = (std_msgs__msg__Char__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Char__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Char__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Char__Sequence__destroy(std_msgs__msg__Char__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Char__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Char__Sequence__are_equal(const std_msgs__msg__Char__Sequence * lhs, const std_msgs__msg__Char__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Char__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Char__Sequence__copy( + const std_msgs__msg__Char__Sequence * input, + std_msgs__msg__Char__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Char); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Char * data = + (std_msgs__msg__Char *)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 (!std_msgs__msg__Char__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; ) { + std_msgs__msg__Char__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Char__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/char__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..7b4e7153d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Char( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Char( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Char)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..2f6970ee1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/char__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Char & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Char & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Char & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Char( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Char)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__CHAR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.h new file mode 100644 index 000000000..4a8f7cd76 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Char in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Char +{ + uint8_t data; +} std_msgs__msg__Char; + +// Struct for a sequence of std_msgs__msg__Char. +typedef struct std_msgs__msg__Char__Sequence +{ + std_msgs__msg__Char * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Char__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__CHAR__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.hpp new file mode 100644 index 000000000..7280bc899 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Char __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Char __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Char_ +{ + using Type = Char_; + + explicit Char_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Char_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Char_ *; + using ConstRawPtr = + const std_msgs::msg::Char_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Char + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Char + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Char_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Char_ & other) const + { + return !this->operator==(other); + } +}; // struct Char_ + +// alias to use template instance with default allocator +using Char = + std_msgs::msg::Char_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__CHAR__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__traits.hpp new file mode 100644 index 000000000..4ac8ecf10 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/char__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Char & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Char & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Char & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Char & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Char & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Char"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Char"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__CHAR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.c new file mode 100644 index 000000000..8e3f94247 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/char__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/char__functions.h" +#include "std_msgs/msg/detail/char__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_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; + std_msgs__msg__Char__init(message_memory); +} + +void std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_fini_function(void * message_memory) +{ + std_msgs__msg__Char__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Char, data), // 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 std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_members = { + "std_msgs__msg", // message namespace + "Char", // message name + 1, // number of fields + sizeof(std_msgs__msg__Char), + std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_member_array, // message members + std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_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 std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle = { + 0, + &std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Char)() { + if (!std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Char__rosidl_typesupport_introspection_c__Char_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.cpp new file mode 100644 index 000000000..5873c127a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Char.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 "std_msgs/msg/detail/char__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Char_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Char(_init); +} + +void Char_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Char(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Char_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Char, data), // 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 Char_message_members = { + "std_msgs::msg", // message namespace + "Char", // message name + 1, // number of fields + sizeof(std_msgs::msg::Char), + Char_message_member_array, // message members + Char_init_function, // function to initialize message memory (memory has to be allocated) + Char_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Char_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Char_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Char_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, std_msgs, msg, Char)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Char_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/char__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.hpp new file mode 100644 index 000000000..b1674b449 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/char__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Char.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Char +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__CHAR__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__builder.hpp similarity index 97% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__builder.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__builder.hpp index 87f4410e7..28ee3dd4c 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__builder.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__builder.hpp @@ -5,11 +5,12 @@ #ifndef STD_MSGS__MSG__DETAIL__COLOR_RGBA__BUILDER_HPP_ #define STD_MSGS__MSG__DETAIL__COLOR_RGBA__BUILDER_HPP_ -#include "std_msgs/msg/detail/color_rgba__struct.hpp" -#include #include #include +#include "std_msgs/msg/detail/color_rgba__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace std_msgs { diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__functions.c similarity index 90% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__functions.c rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__functions.c index 113f45c85..f384d745b 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__functions.c +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__functions.c @@ -225,22 +225,27 @@ std_msgs__msg__ColorRGBA__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(std_msgs__msg__ColorRGBA); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); std_msgs__msg__ColorRGBA * data = - (std_msgs__msg__ColorRGBA *)realloc(output->data, allocation_size); + (std_msgs__msg__ColorRGBA *)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 (!std_msgs__msg__ColorRGBA__init(&data[i])) { - /* free currently allocated and return false */ + if (!std_msgs__msg__ColorRGBA__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; ) { - std_msgs__msg__ColorRGBA__fini(&data[i]); + std_msgs__msg__ColorRGBA__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__functions.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h index bbc4f87ec..e785a6714 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_std_msgs__msg__ColorRGBA( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs size_t max_serialized_size_std_msgs__msg__ColorRGBA( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp index 7e5892d9a..4577c6394 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs max_serialized_size_ColorRGBA( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.h similarity index 93% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.h index ab1c3e9df..6b469eb47 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.h +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in msg/ColorRGBA in the package std_msgs. +/// Struct defined in msg/ColorRGBA in the package std_msgs. typedef struct std_msgs__msg__ColorRGBA { float r; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.hpp similarity index 97% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.hpp index cb15bdb54..714caefdb 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__struct.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__struct.hpp @@ -5,14 +5,15 @@ #ifndef STD_MSGS__MSG__DETAIL__COLOR_RGBA__STRUCT_HPP_ #define STD_MSGS__MSG__DETAIL__COLOR_RGBA__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__std_msgs__msg__ColorRGBA __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__traits.hpp new file mode 100644 index 000000000..680950e24 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__traits.hpp @@ -0,0 +1,160 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/ColorRGBA.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/color_rgba__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ColorRGBA & msg, + std::ostream & out) +{ + out << "{"; + // member: r + { + out << "r: "; + rosidl_generator_traits::value_to_yaml(msg.r, out); + out << ", "; + } + + // member: g + { + out << "g: "; + rosidl_generator_traits::value_to_yaml(msg.g, out); + out << ", "; + } + + // member: b + { + out << "b: "; + rosidl_generator_traits::value_to_yaml(msg.b, out); + out << ", "; + } + + // member: a + { + out << "a: "; + rosidl_generator_traits::value_to_yaml(msg.a, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ColorRGBA & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: r + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "r: "; + rosidl_generator_traits::value_to_yaml(msg.r, out); + out << "\n"; + } + + // member: g + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "g: "; + rosidl_generator_traits::value_to_yaml(msg.g, 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: a + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "a: "; + rosidl_generator_traits::value_to_yaml(msg.a, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ColorRGBA & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::ColorRGBA & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::ColorRGBA & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::ColorRGBA"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/ColorRGBA"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__COLOR_RGBA__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.c new file mode 100644 index 000000000..be280c472 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.c @@ -0,0 +1,134 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/ColorRGBA.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/color_rgba__functions.h" +#include "std_msgs/msg/detail/color_rgba__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_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; + std_msgs__msg__ColorRGBA__init(message_memory); +} + +void std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_fini_function(void * message_memory) +{ + std_msgs__msg__ColorRGBA__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_member_array[4] = { + { + "r", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__ColorRGBA, r), // 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 + }, + { + "g", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__ColorRGBA, g), // 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_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__ColorRGBA, 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 + }, + { + "a", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__ColorRGBA, 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 + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_members = { + "std_msgs__msg", // message namespace + "ColorRGBA", // message name + 4, // number of fields + sizeof(std_msgs__msg__ColorRGBA), + std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_member_array, // message members + std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_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 std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle = { + 0, + &std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)() { + if (!std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__ColorRGBA__rosidl_typesupport_introspection_c__ColorRGBA_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.cpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.cpp index f6e1f2de4..04ed211d0 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.cpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ColorRGBA_mes 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ColorRGBA_mes 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ColorRGBA_mes 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ColorRGBA_mes 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 } }; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/color_rgba__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.hpp new file mode 100644 index 000000000..aa1a89515 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/color_rgba__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/ColorRGBA.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__COLOR_RGBA__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__COLOR_RGBA__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + ColorRGBA +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__COLOR_RGBA__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__builder.hpp new file mode 100644 index 000000000..dd0d406f4 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__builder.hpp @@ -0,0 +1,36 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Empty>() +{ + return ::std_msgs::msg::Empty(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__functions.c new file mode 100644 index 000000000..7db4ec4ef --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/empty__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Empty__init(std_msgs__msg__Empty * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +std_msgs__msg__Empty__fini(std_msgs__msg__Empty * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +std_msgs__msg__Empty__are_equal(const std_msgs__msg__Empty * lhs, const std_msgs__msg__Empty * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +std_msgs__msg__Empty__copy( + const std_msgs__msg__Empty * input, + std_msgs__msg__Empty * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +std_msgs__msg__Empty * +std_msgs__msg__Empty__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Empty * msg = (std_msgs__msg__Empty *)allocator.allocate(sizeof(std_msgs__msg__Empty), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Empty)); + bool success = std_msgs__msg__Empty__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Empty__destroy(std_msgs__msg__Empty * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Empty__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Empty__Sequence__init(std_msgs__msg__Empty__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Empty * data = NULL; + + if (size) { + data = (std_msgs__msg__Empty *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Empty), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Empty__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Empty__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Empty__Sequence__fini(std_msgs__msg__Empty__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) { + std_msgs__msg__Empty__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); + } +} + +std_msgs__msg__Empty__Sequence * +std_msgs__msg__Empty__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Empty__Sequence * array = (std_msgs__msg__Empty__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Empty__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Empty__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Empty__Sequence__destroy(std_msgs__msg__Empty__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Empty__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Empty__Sequence__are_equal(const std_msgs__msg__Empty__Sequence * lhs, const std_msgs__msg__Empty__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Empty__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Empty__Sequence__copy( + const std_msgs__msg__Empty__Sequence * input, + std_msgs__msg__Empty__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Empty); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Empty * data = + (std_msgs__msg__Empty *)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 (!std_msgs__msg__Empty__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; ) { + std_msgs__msg__Empty__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Empty__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/empty__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..3b95452b8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Empty( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Empty( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..75411cc29 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/empty__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Empty & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Empty & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Empty & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Empty( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.h new file mode 100644 index 000000000..7e8cf6c21 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.h @@ -0,0 +1,40 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Empty in the package std_msgs. +typedef struct std_msgs__msg__Empty +{ + uint8_t structure_needs_at_least_one_member; +} std_msgs__msg__Empty; + +// Struct for a sequence of std_msgs__msg__Empty. +typedef struct std_msgs__msg__Empty__Sequence +{ + std_msgs__msg__Empty * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Empty__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.hpp new file mode 100644 index 000000000..83d0a66b9 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__struct.hpp @@ -0,0 +1,124 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Empty __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Empty __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Empty_ +{ + using Type = Empty_; + + explicit Empty_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->structure_needs_at_least_one_member = 0; + } + } + + explicit Empty_(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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Empty_ *; + using ConstRawPtr = + const std_msgs::msg::Empty_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Empty + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Empty + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Empty_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Empty_ & other) const + { + return !this->operator==(other); + } +}; // struct Empty_ + +// alias to use template instance with default allocator +using Empty = + std_msgs::msg::Empty_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__traits.hpp new file mode 100644 index 000000000..1da84346e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__traits.hpp @@ -0,0 +1,98 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Empty & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Empty & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Empty & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Empty & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Empty & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Empty"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Empty"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.c new file mode 100644 index 000000000..3a8ec3b22 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/empty__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/empty__functions.h" +#include "std_msgs/msg/detail/empty__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_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; + std_msgs__msg__Empty__init(message_memory); +} + +void std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_fini_function(void * message_memory) +{ + std_msgs__msg__Empty__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Empty, structure_needs_at_least_one_member), // 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 std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_members = { + "std_msgs__msg", // message namespace + "Empty", // message name + 1, // number of fields + sizeof(std_msgs__msg__Empty), + std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_member_array, // message members + std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_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 std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle = { + 0, + &std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Empty)() { + if (!std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Empty__rosidl_typesupport_introspection_c__Empty_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.cpp new file mode 100644 index 000000000..2a525df85 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Empty.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 "std_msgs/msg/detail/empty__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Empty_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Empty(_init); +} + +void Empty_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Empty(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Empty, structure_needs_at_least_one_member), // 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 Empty_message_members = { + "std_msgs::msg", // message namespace + "Empty", // message name + 1, // number of fields + sizeof(std_msgs::msg::Empty), + Empty_message_member_array, // message members + Empty_init_function, // function to initialize message memory (memory has to be allocated) + Empty_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Empty_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Empty_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Empty_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, std_msgs, msg, Empty)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Empty_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/empty__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.hpp new file mode 100644 index 000000000..de0eca1d3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/empty__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Empty +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__builder.hpp new file mode 100644 index 000000000..f361b6482 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/float32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float32_data +{ +public: + Init_Float32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Float32 data(::std_msgs::msg::Float32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Float32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Float32>() +{ + return std_msgs::msg::builder::Init_Float32_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__functions.c new file mode 100644 index 000000000..0fc34eaa7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/float32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Float32__init(std_msgs__msg__Float32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Float32__fini(std_msgs__msg__Float32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Float32__are_equal(const std_msgs__msg__Float32 * lhs, const std_msgs__msg__Float32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Float32__copy( + const std_msgs__msg__Float32 * input, + std_msgs__msg__Float32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Float32 * +std_msgs__msg__Float32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32 * msg = (std_msgs__msg__Float32 *)allocator.allocate(sizeof(std_msgs__msg__Float32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Float32)); + bool success = std_msgs__msg__Float32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Float32__destroy(std_msgs__msg__Float32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Float32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Float32__Sequence__init(std_msgs__msg__Float32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32 * data = NULL; + + if (size) { + data = (std_msgs__msg__Float32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Float32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Float32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Float32__Sequence__fini(std_msgs__msg__Float32__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) { + std_msgs__msg__Float32__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); + } +} + +std_msgs__msg__Float32__Sequence * +std_msgs__msg__Float32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32__Sequence * array = (std_msgs__msg__Float32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Float32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Float32__Sequence__destroy(std_msgs__msg__Float32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Float32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Float32__Sequence__are_equal(const std_msgs__msg__Float32__Sequence * lhs, const std_msgs__msg__Float32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Float32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Float32__Sequence__copy( + const std_msgs__msg__Float32__Sequence * input, + std_msgs__msg__Float32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Float32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32 * data = + (std_msgs__msg__Float32 *)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 (!std_msgs__msg__Float32__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; ) { + std_msgs__msg__Float32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Float32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..e8b687212 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Float32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Float32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ed380f4f1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/float32__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Float32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Float32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Float32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Float32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.h new file mode 100644 index 000000000..55942a82d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Float32 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Float32 +{ + float data; +} std_msgs__msg__Float32; + +// Struct for a sequence of std_msgs__msg__Float32. +typedef struct std_msgs__msg__Float32__Sequence +{ + std_msgs__msg__Float32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Float32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.hpp new file mode 100644 index 000000000..52e89d6d3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Float32 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Float32 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Float32_ +{ + using Type = Float32_; + + explicit Float32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0.0f; + } + } + + explicit Float32_(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->data = 0.0f; + } + } + + // field types and members + using _data_type = + float; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const float & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Float32_ *; + using ConstRawPtr = + const std_msgs::msg::Float32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Float32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Float32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float32_ & other) const + { + return !this->operator==(other); + } +}; // struct Float32_ + +// alias to use template instance with default allocator +using Float32 = + std_msgs::msg::Float32_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__traits.hpp new file mode 100644 index 000000000..555c48ee1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/float32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float32 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Float32 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Float32 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Float32"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Float32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.c new file mode 100644 index 000000000..b833ba289 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/float32__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/float32__functions.h" +#include "std_msgs/msg/detail/float32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_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; + std_msgs__msg__Float32__init(message_memory); +} + +void std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_fini_function(void * message_memory) +{ + std_msgs__msg__Float32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Float32, data), // 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 std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_members = { + "std_msgs__msg", // message namespace + "Float32", // message name + 1, // number of fields + sizeof(std_msgs__msg__Float32), + std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_member_array, // message members + std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_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 std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle = { + 0, + &std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float32)() { + if (!std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Float32__rosidl_typesupport_introspection_c__Float32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.cpp new file mode 100644 index 000000000..24398d9d0 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Float32.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 "std_msgs/msg/detail/float32__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Float32(_init); +} + +void Float32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Float32, data), // 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 Float32_message_members = { + "std_msgs::msg", // message namespace + "Float32", // message name + 1, // number of fields + sizeof(std_msgs::msg::Float32), + Float32_message_member_array, // message members + Float32_init_function, // function to initialize message memory (memory has to be allocated) + Float32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32_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, std_msgs, msg, Float32)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.hpp new file mode 100644 index 000000000..107d2fb2d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Float32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Float32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__builder.hpp new file mode 100644 index 000000000..cf94f2714 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float32MultiArray_data +{ +public: + explicit Init_Float32MultiArray_data(::std_msgs::msg::Float32MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Float32MultiArray data(::std_msgs::msg::Float32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Float32MultiArray msg_; +}; + +class Init_Float32MultiArray_layout +{ +public: + Init_Float32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Float32MultiArray_data layout(::std_msgs::msg::Float32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Float32MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Float32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Float32MultiArray>() +{ + return std_msgs::msg::builder::Init_Float32MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__functions.c new file mode 100644 index 000000000..6cc3e91dc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/float32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Float32MultiArray__init(std_msgs__msg__Float32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Float32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Float32MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Float32MultiArray__fini(std_msgs__msg__Float32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__float__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Float32MultiArray__are_equal(const std_msgs__msg__Float32MultiArray * lhs, const std_msgs__msg__Float32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Float32MultiArray__copy( + const std_msgs__msg__Float32MultiArray * input, + std_msgs__msg__Float32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__float__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Float32MultiArray * +std_msgs__msg__Float32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32MultiArray * msg = (std_msgs__msg__Float32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Float32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Float32MultiArray)); + bool success = std_msgs__msg__Float32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Float32MultiArray__destroy(std_msgs__msg__Float32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Float32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Float32MultiArray__Sequence__init(std_msgs__msg__Float32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Float32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Float32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Float32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Float32MultiArray__Sequence__fini(std_msgs__msg__Float32MultiArray__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) { + std_msgs__msg__Float32MultiArray__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); + } +} + +std_msgs__msg__Float32MultiArray__Sequence * +std_msgs__msg__Float32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32MultiArray__Sequence * array = (std_msgs__msg__Float32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Float32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Float32MultiArray__Sequence__destroy(std_msgs__msg__Float32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Float32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Float32MultiArray__Sequence__are_equal(const std_msgs__msg__Float32MultiArray__Sequence * lhs, const std_msgs__msg__Float32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Float32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Float32MultiArray__Sequence__copy( + const std_msgs__msg__Float32MultiArray__Sequence * input, + std_msgs__msg__Float32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Float32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float32MultiArray * data = + (std_msgs__msg__Float32MultiArray *)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 (!std_msgs__msg__Float32MultiArray__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; ) { + std_msgs__msg__Float32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Float32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b7bbb73e3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Float32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Float32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..3e522d773 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/float32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Float32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Float32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Float32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Float32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.h new file mode 100644 index 000000000..d3c02c6c3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Float32MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Float32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__float__Sequence data; +} std_msgs__msg__Float32MultiArray; + +// Struct for a sequence of std_msgs__msg__Float32MultiArray. +typedef struct std_msgs__msg__Float32MultiArray__Sequence +{ + std_msgs__msg__Float32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Float32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.hpp new file mode 100644 index 000000000..07622b032 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Float32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Float32MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Float32MultiArray_ +{ + using Type = Float32MultiArray_; + + explicit Float32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Float32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Float32MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Float32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Float32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Float32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Float32MultiArray_ + +// alias to use template instance with default allocator +using Float32MultiArray = + std_msgs::msg::Float32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__traits.hpp new file mode 100644 index 000000000..fad5ffe2f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float32MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Float32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Float32MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Float32MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Float32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.c new file mode 100644 index 000000000..7ccd03524 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/float32_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/float32_multi_array__functions.h" +#include "std_msgs/msg/detail/float32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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; + std_msgs__msg__Float32MultiArray__init(message_memory); +} + +void std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Float32MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__size_function__Float32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__float__Sequence * member = + (const rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const float * item = + ((const float *) + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data(untyped_member, index)); + float * value = + (float *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__assign_function__Float32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + float * item = + ((float *) + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data(untyped_member, index)); + const float * value = + (const float *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__resize_function__Float32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__float__Sequence * member = + (rosidl_runtime_c__float__Sequence *)(untyped_member); + rosidl_runtime_c__float__Sequence__fini(member); + return rosidl_runtime_c__float__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Float32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Float32MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__size_function__Float32MultiArray__data, // size() function pointer + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float32MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__get_function__Float32MultiArray__data, // get(index) function pointer + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float32MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__assign_function__Float32MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__resize_function__Float32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Float32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Float32MultiArray), + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array, // message members + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_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 std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float32MultiArray)() { + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Float32MultiArray__rosidl_typesupport_introspection_c__Float32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.cpp new file mode 100644 index 000000000..339a29aef --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Float32MultiArray.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 "std_msgs/msg/detail/float32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Float32MultiArray(_init); +} + +void Float32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float32MultiArray(); +} + +size_t size_function__Float32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Float32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Float32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Float32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Float32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Float32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Float32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Float32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Float32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Float32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Float32MultiArray__data, // size() function pointer + get_const_function__Float32MultiArray__data, // get_const(index) function pointer + get_function__Float32MultiArray__data, // get(index) function pointer + fetch_function__Float32MultiArray__data, // fetch(index, &value) function pointer + assign_function__Float32MultiArray__data, // assign(index, value) function pointer + resize_function__Float32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float32MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Float32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Float32MultiArray), + Float32MultiArray_message_member_array, // message members + Float32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Float32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_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, std_msgs, msg, Float32MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float32_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.hpp new file mode 100644 index 000000000..19ebd666d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Float32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Float32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__builder.hpp new file mode 100644 index 000000000..4fb98b2b3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/float64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float64_data +{ +public: + Init_Float64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Float64 data(::std_msgs::msg::Float64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Float64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Float64>() +{ + return std_msgs::msg::builder::Init_Float64_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__functions.c new file mode 100644 index 000000000..3a56e02ce --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/float64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Float64__init(std_msgs__msg__Float64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Float64__fini(std_msgs__msg__Float64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Float64__are_equal(const std_msgs__msg__Float64 * lhs, const std_msgs__msg__Float64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Float64__copy( + const std_msgs__msg__Float64 * input, + std_msgs__msg__Float64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Float64 * +std_msgs__msg__Float64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64 * msg = (std_msgs__msg__Float64 *)allocator.allocate(sizeof(std_msgs__msg__Float64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Float64)); + bool success = std_msgs__msg__Float64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Float64__destroy(std_msgs__msg__Float64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Float64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Float64__Sequence__init(std_msgs__msg__Float64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64 * data = NULL; + + if (size) { + data = (std_msgs__msg__Float64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Float64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Float64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Float64__Sequence__fini(std_msgs__msg__Float64__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) { + std_msgs__msg__Float64__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); + } +} + +std_msgs__msg__Float64__Sequence * +std_msgs__msg__Float64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64__Sequence * array = (std_msgs__msg__Float64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Float64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Float64__Sequence__destroy(std_msgs__msg__Float64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Float64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Float64__Sequence__are_equal(const std_msgs__msg__Float64__Sequence * lhs, const std_msgs__msg__Float64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Float64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Float64__Sequence__copy( + const std_msgs__msg__Float64__Sequence * input, + std_msgs__msg__Float64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Float64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64 * data = + (std_msgs__msg__Float64 *)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 (!std_msgs__msg__Float64__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; ) { + std_msgs__msg__Float64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Float64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..196845dc6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Float64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Float64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..00113c241 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/float64__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Float64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Float64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Float64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Float64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.h new file mode 100644 index 000000000..69d3a174f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Float64 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Float64 +{ + double data; +} std_msgs__msg__Float64; + +// Struct for a sequence of std_msgs__msg__Float64. +typedef struct std_msgs__msg__Float64__Sequence +{ + std_msgs__msg__Float64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Float64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.hpp new file mode 100644 index 000000000..c8494f96e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Float64 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Float64 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Float64_ +{ + using Type = Float64_; + + explicit Float64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0.0; + } + } + + explicit Float64_(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->data = 0.0; + } + } + + // field types and members + using _data_type = + double; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const double & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Float64_ *; + using ConstRawPtr = + const std_msgs::msg::Float64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Float64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Float64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float64_ & other) const + { + return !this->operator==(other); + } +}; // struct Float64_ + +// alias to use template instance with default allocator +using Float64 = + std_msgs::msg::Float64_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__traits.hpp new file mode 100644 index 000000000..e26e94317 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/float64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float64 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Float64 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Float64 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Float64"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Float64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.c new file mode 100644 index 000000000..2c24f8c96 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/float64__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/float64__functions.h" +#include "std_msgs/msg/detail/float64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_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; + std_msgs__msg__Float64__init(message_memory); +} + +void std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_fini_function(void * message_memory) +{ + std_msgs__msg__Float64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_member_array[1] = { + { + "data", // 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(std_msgs__msg__Float64, data), // 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 std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_members = { + "std_msgs__msg", // message namespace + "Float64", // message name + 1, // number of fields + sizeof(std_msgs__msg__Float64), + std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_member_array, // message members + std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_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 std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle = { + 0, + &std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float64)() { + if (!std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Float64__rosidl_typesupport_introspection_c__Float64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.cpp new file mode 100644 index 000000000..7bb8a33dd --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Float64.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 "std_msgs/msg/detail/float64__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Float64(_init); +} + +void Float64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64_message_member_array[1] = { + { + "data", // 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(std_msgs::msg::Float64, data), // 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 Float64_message_members = { + "std_msgs::msg", // message namespace + "Float64", // message name + 1, // number of fields + sizeof(std_msgs::msg::Float64), + Float64_message_member_array, // message members + Float64_init_function, // function to initialize message memory (memory has to be allocated) + Float64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64_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, std_msgs, msg, Float64)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.hpp new file mode 100644 index 000000000..fb26e27a7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Float64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Float64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__builder.hpp new file mode 100644 index 000000000..ea8d0b648 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Float64MultiArray_data +{ +public: + explicit Init_Float64MultiArray_data(::std_msgs::msg::Float64MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Float64MultiArray data(::std_msgs::msg::Float64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Float64MultiArray msg_; +}; + +class Init_Float64MultiArray_layout +{ +public: + Init_Float64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Float64MultiArray_data layout(::std_msgs::msg::Float64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Float64MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Float64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Float64MultiArray>() +{ + return std_msgs::msg::builder::Init_Float64MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__functions.c new file mode 100644 index 000000000..f34c8057b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/float64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Float64MultiArray__init(std_msgs__msg__Float64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Float64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Float64MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Float64MultiArray__fini(std_msgs__msg__Float64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__double__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Float64MultiArray__are_equal(const std_msgs__msg__Float64MultiArray * lhs, const std_msgs__msg__Float64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Float64MultiArray__copy( + const std_msgs__msg__Float64MultiArray * input, + std_msgs__msg__Float64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__double__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Float64MultiArray * +std_msgs__msg__Float64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64MultiArray * msg = (std_msgs__msg__Float64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Float64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Float64MultiArray)); + bool success = std_msgs__msg__Float64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Float64MultiArray__destroy(std_msgs__msg__Float64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Float64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Float64MultiArray__Sequence__init(std_msgs__msg__Float64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Float64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Float64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Float64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Float64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Float64MultiArray__Sequence__fini(std_msgs__msg__Float64MultiArray__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) { + std_msgs__msg__Float64MultiArray__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); + } +} + +std_msgs__msg__Float64MultiArray__Sequence * +std_msgs__msg__Float64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64MultiArray__Sequence * array = (std_msgs__msg__Float64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Float64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Float64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Float64MultiArray__Sequence__destroy(std_msgs__msg__Float64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Float64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Float64MultiArray__Sequence__are_equal(const std_msgs__msg__Float64MultiArray__Sequence * lhs, const std_msgs__msg__Float64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Float64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Float64MultiArray__Sequence__copy( + const std_msgs__msg__Float64MultiArray__Sequence * input, + std_msgs__msg__Float64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Float64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Float64MultiArray * data = + (std_msgs__msg__Float64MultiArray *)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 (!std_msgs__msg__Float64MultiArray__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; ) { + std_msgs__msg__Float64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Float64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..d712ddd6f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Float64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Float64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Float64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..5fc7827bf --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/float64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Float64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Float64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Float64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Float64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Float64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.h new file mode 100644 index 000000000..cdb5e0147 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Float64MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Float64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__double__Sequence data; +} std_msgs__msg__Float64MultiArray; + +// Struct for a sequence of std_msgs__msg__Float64MultiArray. +typedef struct std_msgs__msg__Float64MultiArray__Sequence +{ + std_msgs__msg__Float64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Float64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.hpp new file mode 100644 index 000000000..0ff2b4058 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Float64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Float64MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Float64MultiArray_ +{ + using Type = Float64MultiArray_; + + explicit Float64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Float64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Float64MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Float64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Float64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Float64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Float64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Float64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Float64MultiArray_ + +// alias to use template instance with default allocator +using Float64MultiArray = + std_msgs::msg::Float64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__traits.hpp new file mode 100644 index 000000000..48a2d014b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Float64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Float64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Float64MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Float64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Float64MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Float64MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Float64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.c new file mode 100644 index 000000000..2563d555d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/float64_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/float64_multi_array__functions.h" +#include "std_msgs/msg/detail/float64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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; + std_msgs__msg__Float64MultiArray__init(message_memory); +} + +void std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Float64MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__size_function__Float64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__assign_function__Float64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__resize_function__Float64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Float64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Float64MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__size_function__Float64MultiArray__data, // size() function pointer + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Float64MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__get_function__Float64MultiArray__data, // get(index) function pointer + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Float64MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__assign_function__Float64MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__resize_function__Float64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Float64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Float64MultiArray), + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array, // message members + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_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 std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Float64MultiArray)() { + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Float64MultiArray__rosidl_typesupport_introspection_c__Float64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.cpp new file mode 100644 index 000000000..b91bc76c3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Float64MultiArray.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 "std_msgs/msg/detail/float64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Float64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Float64MultiArray(_init); +} + +void Float64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Float64MultiArray(); +} + +size_t size_function__Float64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Float64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Float64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Float64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Float64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Float64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Float64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Float64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Float64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Float64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Float64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Float64MultiArray__data, // size() function pointer + get_const_function__Float64MultiArray__data, // get_const(index) function pointer + get_function__Float64MultiArray__data, // get(index) function pointer + fetch_function__Float64MultiArray__data, // fetch(index, &value) function pointer + assign_function__Float64MultiArray__data, // assign(index, value) function pointer + resize_function__Float64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Float64MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Float64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Float64MultiArray), + Float64MultiArray_message_member_array, // message members + Float64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Float64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Float64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Float64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_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, std_msgs, msg, Float64MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Float64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/float64_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.hpp new file mode 100644 index 000000000..385fd8641 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/float64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Float64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Float64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__FLOAT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__builder.hpp similarity index 95% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__builder.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__builder.hpp index 7ab89c64e..017840c2c 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__builder.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__builder.hpp @@ -5,11 +5,12 @@ #ifndef STD_MSGS__MSG__DETAIL__HEADER__BUILDER_HPP_ #define STD_MSGS__MSG__DETAIL__HEADER__BUILDER_HPP_ -#include "std_msgs/msg/detail/header__struct.hpp" -#include #include #include +#include "std_msgs/msg/detail/header__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace std_msgs { diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__functions.c similarity index 91% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__functions.c rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__functions.c index ced9d9e27..2403b4cc4 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__functions.c +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__functions.c @@ -237,22 +237,27 @@ std_msgs__msg__Header__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(std_msgs__msg__Header); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); std_msgs__msg__Header * data = - (std_msgs__msg__Header *)realloc(output->data, allocation_size); + (std_msgs__msg__Header *)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 (!std_msgs__msg__Header__init(&data[i])) { - /* free currently allocated and return false */ + if (!std_msgs__msg__Header__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; ) { - std_msgs__msg__Header__fini(&data[i]); + std_msgs__msg__Header__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__functions.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h index 39cb7818b..8225760e4 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_std_msgs__msg__Header( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs size_t max_serialized_size_std_msgs__msg__Header( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp index e0ef5d646..8430c2b22 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs max_serialized_size_Header( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.h similarity index 75% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__struct.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.h index 021a41b17..286884c16 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__struct.h +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.h @@ -23,10 +23,17 @@ extern "C" // Member 'frame_id' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/Header in the package std_msgs. +/// Struct defined in msg/Header in the package std_msgs. +/** + * Standard metadata for higher-level stamped data types. + * This is generally used to communicate timestamped data + * in a particular coordinate frame. + */ typedef struct std_msgs__msg__Header { + /// Two-integer timestamp that is expressed as seconds and nanoseconds. builtin_interfaces__msg__Time stamp; + /// Transform frame with which this data is associated. rosidl_runtime_c__String frame_id; } std_msgs__msg__Header; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.hpp similarity index 92% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__struct.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.hpp index 7db73ee74..b1a91d8c7 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__struct.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__struct.hpp @@ -5,14 +5,15 @@ #ifndef STD_MSGS__MSG__DETAIL__HEADER__STRUCT_HPP_ #define STD_MSGS__MSG__DETAIL__HEADER__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'stamp' @@ -62,7 +63,7 @@ struct Header_ builtin_interfaces::msg::Time_; _stamp_type stamp; using _frame_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _frame_id_type frame_id; // setters for named parameter idiom @@ -73,7 +74,7 @@ struct Header_ return *this; } Type & set__frame_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->frame_id = _arg; return *this; diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__traits.hpp new file mode 100644 index 000000000..0b83fee06 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__traits.hpp @@ -0,0 +1,129 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Header.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/header__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'stamp' +#include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Header & msg, + std::ostream & out) +{ + out << "{"; + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + out << ", "; + } + + // member: frame_id + { + out << "frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.frame_id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Header & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } + + // member: frame_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "frame_id: "; + rosidl_generator_traits::value_to_yaml(msg.frame_id, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Header & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Header & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Header & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Header"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Header"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__HEADER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.c new file mode 100644 index 000000000..382592433 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.c @@ -0,0 +1,110 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Header.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/header__functions.h" +#include "std_msgs/msg/detail/header__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "builtin_interfaces/msg/time.h" +// Member `stamp` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `frame_id` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_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; + std_msgs__msg__Header__init(message_memory); +} + +void std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_fini_function(void * message_memory) +{ + std_msgs__msg__Header__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_member_array[2] = { + { + "stamp", // 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(std_msgs__msg__Header, stamp), // 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 + }, + { + "frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Header, frame_id), // 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 std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_members = { + "std_msgs__msg", // message namespace + "Header", // message name + 2, // number of fields + sizeof(std_msgs__msg__Header), + std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_member_array, // message members + std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_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 std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle = { + 0, + &std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)() { + std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Header__rosidl_typesupport_introspection_c__Header_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.cpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.cpp index c932d2182..5b6dee0c5 100644 --- a/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.cpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Header_messag 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Header_messag 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 } }; diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/header__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.hpp new file mode 100644 index 000000000..d7ccfb172 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/header__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Header.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__HEADER__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__HEADER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Header +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__HEADER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__builder.hpp new file mode 100644 index 000000000..c54d54a14 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int16__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int16_data +{ +public: + Init_Int16_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Int16 data(::std_msgs::msg::Int16::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int16 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int16>() +{ + return std_msgs::msg::builder::Init_Int16_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__functions.c new file mode 100644 index 000000000..6cf584b87 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int16__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Int16__init(std_msgs__msg__Int16 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Int16__fini(std_msgs__msg__Int16 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Int16__are_equal(const std_msgs__msg__Int16 * lhs, const std_msgs__msg__Int16 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Int16__copy( + const std_msgs__msg__Int16 * input, + std_msgs__msg__Int16 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Int16 * +std_msgs__msg__Int16__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16 * msg = (std_msgs__msg__Int16 *)allocator.allocate(sizeof(std_msgs__msg__Int16), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int16)); + bool success = std_msgs__msg__Int16__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int16__destroy(std_msgs__msg__Int16 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int16__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int16__Sequence__init(std_msgs__msg__Int16__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16 * data = NULL; + + if (size) { + data = (std_msgs__msg__Int16 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int16), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int16__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int16__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int16__Sequence__fini(std_msgs__msg__Int16__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) { + std_msgs__msg__Int16__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); + } +} + +std_msgs__msg__Int16__Sequence * +std_msgs__msg__Int16__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16__Sequence * array = (std_msgs__msg__Int16__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int16__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int16__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int16__Sequence__destroy(std_msgs__msg__Int16__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int16__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int16__Sequence__are_equal(const std_msgs__msg__Int16__Sequence * lhs, const std_msgs__msg__Int16__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int16__Sequence__copy( + const std_msgs__msg__Int16__Sequence * input, + std_msgs__msg__Int16__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int16); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16 * data = + (std_msgs__msg__Int16 *)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 (!std_msgs__msg__Int16__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; ) { + std_msgs__msg__Int16__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int16__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..0afa4d121 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int16( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int16)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..24edcab5a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int16__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int16 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int16 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int16 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int16)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.h new file mode 100644 index 000000000..402809caa --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int16 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int16 +{ + int16_t data; +} std_msgs__msg__Int16; + +// Struct for a sequence of std_msgs__msg__Int16. +typedef struct std_msgs__msg__Int16__Sequence +{ + std_msgs__msg__Int16 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int16__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.hpp new file mode 100644 index 000000000..fa5247e93 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int16 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int16 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int16_ +{ + using Type = Int16_; + + explicit Int16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Int16_(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->data = 0; + } + } + + // field types and members + using _data_type = + int16_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int16_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int16_ *; + using ConstRawPtr = + const std_msgs::msg::Int16_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int16 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int16 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int16_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int16_ & other) const + { + return !this->operator==(other); + } +}; // struct Int16_ + +// alias to use template instance with default allocator +using Int16 = + std_msgs::msg::Int16_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__traits.hpp new file mode 100644 index 000000000..fb9949a8a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int16__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int16 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int16 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int16 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int16 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int16 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int16"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int16"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.c new file mode 100644 index 000000000..cac9063f9 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int16__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int16__functions.h" +#include "std_msgs/msg/detail/int16__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_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; + std_msgs__msg__Int16__init(message_memory); +} + +void std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_fini_function(void * message_memory) +{ + std_msgs__msg__Int16__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int16, data), // 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 std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_members = { + "std_msgs__msg", // message namespace + "Int16", // message name + 1, // number of fields + sizeof(std_msgs__msg__Int16), + std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_member_array, // message members + std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_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 std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle = { + 0, + &std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int16)() { + if (!std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int16__rosidl_typesupport_introspection_c__Int16_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.cpp new file mode 100644 index 000000000..a4e84beef --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int16.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 "std_msgs/msg/detail/int16__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int16_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int16(_init); +} + +void Int16_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int16(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int16, data), // 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 Int16_message_members = { + "std_msgs::msg", // message namespace + "Int16", // message name + 1, // number of fields + sizeof(std_msgs::msg::Int16), + Int16_message_member_array, // message members + Int16_init_function, // function to initialize message memory (memory has to be allocated) + Int16_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int16_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int16_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16_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, std_msgs, msg, Int16)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.hpp new file mode 100644 index 000000000..0f2f07a51 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int16 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__builder.hpp new file mode 100644 index 000000000..34b7fcd2a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int16MultiArray_data +{ +public: + explicit Init_Int16MultiArray_data(::std_msgs::msg::Int16MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Int16MultiArray data(::std_msgs::msg::Int16MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int16MultiArray msg_; +}; + +class Init_Int16MultiArray_layout +{ +public: + Init_Int16MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int16MultiArray_data layout(::std_msgs::msg::Int16MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int16MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Int16MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int16MultiArray>() +{ + return std_msgs::msg::builder::Init_Int16MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__functions.c new file mode 100644 index 000000000..2d1dcc69d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int16_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Int16MultiArray__init(std_msgs__msg__Int16MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Int16MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Int16MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Int16MultiArray__fini(std_msgs__msg__Int16MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int16__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Int16MultiArray__are_equal(const std_msgs__msg__Int16MultiArray * lhs, const std_msgs__msg__Int16MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Int16MultiArray__copy( + const std_msgs__msg__Int16MultiArray * input, + std_msgs__msg__Int16MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int16__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Int16MultiArray * +std_msgs__msg__Int16MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16MultiArray * msg = (std_msgs__msg__Int16MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int16MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int16MultiArray)); + bool success = std_msgs__msg__Int16MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int16MultiArray__destroy(std_msgs__msg__Int16MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int16MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int16MultiArray__Sequence__init(std_msgs__msg__Int16MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Int16MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int16MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int16MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int16MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int16MultiArray__Sequence__fini(std_msgs__msg__Int16MultiArray__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) { + std_msgs__msg__Int16MultiArray__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); + } +} + +std_msgs__msg__Int16MultiArray__Sequence * +std_msgs__msg__Int16MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16MultiArray__Sequence * array = (std_msgs__msg__Int16MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int16MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int16MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int16MultiArray__Sequence__destroy(std_msgs__msg__Int16MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int16MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int16MultiArray__Sequence__are_equal(const std_msgs__msg__Int16MultiArray__Sequence * lhs, const std_msgs__msg__Int16MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int16MultiArray__Sequence__copy( + const std_msgs__msg__Int16MultiArray__Sequence * input, + std_msgs__msg__Int16MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int16MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int16MultiArray * data = + (std_msgs__msg__Int16MultiArray *)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 (!std_msgs__msg__Int16MultiArray__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; ) { + std_msgs__msg__Int16MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int16MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..1af670976 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int16MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..d969b1959 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int16_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int16MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int16MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int16MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.h new file mode 100644 index 000000000..41cca9b82 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int16MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int16MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int16__Sequence data; +} std_msgs__msg__Int16MultiArray; + +// Struct for a sequence of std_msgs__msg__Int16MultiArray. +typedef struct std_msgs__msg__Int16MultiArray__Sequence +{ + std_msgs__msg__Int16MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int16MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.hpp new file mode 100644 index 000000000..e275c7952 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int16MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int16MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int16MultiArray_ +{ + using Type = Int16MultiArray_; + + explicit Int16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int16MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Int16MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int16MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int16MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int16MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int16MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int16MultiArray_ + +// alias to use template instance with default allocator +using Int16MultiArray = + std_msgs::msg::Int16MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__traits.hpp new file mode 100644 index 000000000..1485336b8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int16MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int16MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int16MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int16MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int16MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.c new file mode 100644 index 000000000..a534f3008 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int16_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int16_multi_array__functions.h" +#include "std_msgs/msg/detail/int16_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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; + std_msgs__msg__Int16MultiArray__init(message_memory); +} + +void std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Int16MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__size_function__Int16MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int16__Sequence * member = + (const rosidl_runtime_c__int16__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int16__Sequence * member = + (const rosidl_runtime_c__int16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int16__Sequence * member = + (rosidl_runtime_c__int16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int16_t * item = + ((const int16_t *) + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data(untyped_member, index)); + int16_t * value = + (int16_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__assign_function__Int16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int16_t * item = + ((int16_t *) + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data(untyped_member, index)); + const int16_t * value = + (const int16_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__resize_function__Int16MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int16__Sequence * member = + (rosidl_runtime_c__int16__Sequence *)(untyped_member); + rosidl_runtime_c__int16__Sequence__fini(member); + return rosidl_runtime_c__int16__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Int16MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int16MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__size_function__Int16MultiArray__data, // size() function pointer + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int16MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__get_function__Int16MultiArray__data, // get(index) function pointer + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int16MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__assign_function__Int16MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__resize_function__Int16MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Int16MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Int16MultiArray), + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array, // message members + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_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 std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int16MultiArray)() { + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int16MultiArray__rosidl_typesupport_introspection_c__Int16MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.cpp new file mode 100644 index 000000000..47bdea746 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int16MultiArray.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 "std_msgs/msg/detail/int16_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int16MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int16MultiArray(_init); +} + +void Int16MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int16MultiArray(); +} + +size_t size_function__Int16MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int16MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int16MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int16MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int16MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int16MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int16MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int16MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int16MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int16MultiArray__data, // size() function pointer + get_const_function__Int16MultiArray__data, // get_const(index) function pointer + get_function__Int16MultiArray__data, // get(index) function pointer + fetch_function__Int16MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int16MultiArray__data, // assign(index, value) function pointer + resize_function__Int16MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int16MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Int16MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Int16MultiArray), + Int16MultiArray_message_member_array, // message members + Int16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int16MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int16MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_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, std_msgs, msg, Int16MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int16MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int16_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.hpp new file mode 100644 index 000000000..22811661e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int16_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int16MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__builder.hpp new file mode 100644 index 000000000..f7b81b982 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int32_data +{ +public: + Init_Int32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Int32 data(::std_msgs::msg::Int32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int32>() +{ + return std_msgs::msg::builder::Init_Int32_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__functions.c new file mode 100644 index 000000000..e1c139e94 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Int32__init(std_msgs__msg__Int32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Int32__fini(std_msgs__msg__Int32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Int32__are_equal(const std_msgs__msg__Int32 * lhs, const std_msgs__msg__Int32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Int32__copy( + const std_msgs__msg__Int32 * input, + std_msgs__msg__Int32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Int32 * +std_msgs__msg__Int32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32 * msg = (std_msgs__msg__Int32 *)allocator.allocate(sizeof(std_msgs__msg__Int32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int32)); + bool success = std_msgs__msg__Int32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int32__destroy(std_msgs__msg__Int32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int32__Sequence__init(std_msgs__msg__Int32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32 * data = NULL; + + if (size) { + data = (std_msgs__msg__Int32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int32__Sequence__fini(std_msgs__msg__Int32__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) { + std_msgs__msg__Int32__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); + } +} + +std_msgs__msg__Int32__Sequence * +std_msgs__msg__Int32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32__Sequence * array = (std_msgs__msg__Int32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int32__Sequence__destroy(std_msgs__msg__Int32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int32__Sequence__are_equal(const std_msgs__msg__Int32__Sequence * lhs, const std_msgs__msg__Int32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int32__Sequence__copy( + const std_msgs__msg__Int32__Sequence * input, + std_msgs__msg__Int32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32 * data = + (std_msgs__msg__Int32 *)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 (!std_msgs__msg__Int32__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; ) { + std_msgs__msg__Int32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..f24df7c02 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..862aa6813 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int32__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.h new file mode 100644 index 000000000..218217a35 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int32 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int32 +{ + int32_t data; +} std_msgs__msg__Int32; + +// Struct for a sequence of std_msgs__msg__Int32. +typedef struct std_msgs__msg__Int32__Sequence +{ + std_msgs__msg__Int32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.hpp new file mode 100644 index 000000000..c6d0b66f6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int32 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int32 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int32_ +{ + using Type = Int32_; + + explicit Int32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0l; + } + } + + explicit Int32_(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->data = 0l; + } + } + + // field types and members + using _data_type = + int32_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int32_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int32_ *; + using ConstRawPtr = + const std_msgs::msg::Int32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int32_ & other) const + { + return !this->operator==(other); + } +}; // struct Int32_ + +// alias to use template instance with default allocator +using Int32 = + std_msgs::msg::Int32_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__traits.hpp new file mode 100644 index 000000000..d1f0975ef --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int32 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int32 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int32 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int32"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.c new file mode 100644 index 000000000..0ffcffb60 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int32__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int32__functions.h" +#include "std_msgs/msg/detail/int32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_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; + std_msgs__msg__Int32__init(message_memory); +} + +void std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_fini_function(void * message_memory) +{ + std_msgs__msg__Int32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int32, data), // 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 std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_members = { + "std_msgs__msg", // message namespace + "Int32", // message name + 1, // number of fields + sizeof(std_msgs__msg__Int32), + std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_member_array, // message members + std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_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 std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle = { + 0, + &std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int32)() { + if (!std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int32__rosidl_typesupport_introspection_c__Int32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.cpp new file mode 100644 index 000000000..0cf46a056 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int32.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 "std_msgs/msg/detail/int32__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int32(_init); +} + +void Int32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int32, data), // 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 Int32_message_members = { + "std_msgs::msg", // message namespace + "Int32", // message name + 1, // number of fields + sizeof(std_msgs::msg::Int32), + Int32_message_member_array, // message members + Int32_init_function, // function to initialize message memory (memory has to be allocated) + Int32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32_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, std_msgs, msg, Int32)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.hpp new file mode 100644 index 000000000..206ce722a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__builder.hpp new file mode 100644 index 000000000..18e0195ea --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int32MultiArray_data +{ +public: + explicit Init_Int32MultiArray_data(::std_msgs::msg::Int32MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Int32MultiArray data(::std_msgs::msg::Int32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int32MultiArray msg_; +}; + +class Init_Int32MultiArray_layout +{ +public: + Init_Int32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int32MultiArray_data layout(::std_msgs::msg::Int32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int32MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Int32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int32MultiArray>() +{ + return std_msgs::msg::builder::Init_Int32MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__functions.c new file mode 100644 index 000000000..53991d0fa --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Int32MultiArray__init(std_msgs__msg__Int32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Int32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Int32MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Int32MultiArray__fini(std_msgs__msg__Int32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int32__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Int32MultiArray__are_equal(const std_msgs__msg__Int32MultiArray * lhs, const std_msgs__msg__Int32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Int32MultiArray__copy( + const std_msgs__msg__Int32MultiArray * input, + std_msgs__msg__Int32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int32__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Int32MultiArray * +std_msgs__msg__Int32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32MultiArray * msg = (std_msgs__msg__Int32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int32MultiArray)); + bool success = std_msgs__msg__Int32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int32MultiArray__destroy(std_msgs__msg__Int32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int32MultiArray__Sequence__init(std_msgs__msg__Int32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Int32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int32MultiArray__Sequence__fini(std_msgs__msg__Int32MultiArray__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) { + std_msgs__msg__Int32MultiArray__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); + } +} + +std_msgs__msg__Int32MultiArray__Sequence * +std_msgs__msg__Int32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32MultiArray__Sequence * array = (std_msgs__msg__Int32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int32MultiArray__Sequence__destroy(std_msgs__msg__Int32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int32MultiArray__Sequence__are_equal(const std_msgs__msg__Int32MultiArray__Sequence * lhs, const std_msgs__msg__Int32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int32MultiArray__Sequence__copy( + const std_msgs__msg__Int32MultiArray__Sequence * input, + std_msgs__msg__Int32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int32MultiArray * data = + (std_msgs__msg__Int32MultiArray *)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 (!std_msgs__msg__Int32MultiArray__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; ) { + std_msgs__msg__Int32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..35bec9814 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..c921db74c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.h new file mode 100644 index 000000000..b4d15dbf5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int32MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int32__Sequence data; +} std_msgs__msg__Int32MultiArray; + +// Struct for a sequence of std_msgs__msg__Int32MultiArray. +typedef struct std_msgs__msg__Int32MultiArray__Sequence +{ + std_msgs__msg__Int32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.hpp new file mode 100644 index 000000000..66cc557eb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int32MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int32MultiArray_ +{ + using Type = Int32MultiArray_; + + explicit Int32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int32MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Int32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int32MultiArray_ + +// alias to use template instance with default allocator +using Int32MultiArray = + std_msgs::msg::Int32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__traits.hpp new file mode 100644 index 000000000..485522c7a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int32MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int32MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int32MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.c new file mode 100644 index 000000000..1170993d5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int32_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int32_multi_array__functions.h" +#include "std_msgs/msg/detail/int32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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; + std_msgs__msg__Int32MultiArray__init(message_memory); +} + +void std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Int32MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__size_function__Int32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int32__Sequence * member = + (const rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int32_t * item = + ((const int32_t *) + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data(untyped_member, index)); + int32_t * value = + (int32_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__assign_function__Int32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int32_t * item = + ((int32_t *) + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data(untyped_member, index)); + const int32_t * value = + (const int32_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__resize_function__Int32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int32__Sequence * member = + (rosidl_runtime_c__int32__Sequence *)(untyped_member); + rosidl_runtime_c__int32__Sequence__fini(member); + return rosidl_runtime_c__int32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Int32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int32MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__size_function__Int32MultiArray__data, // size() function pointer + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int32MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__get_function__Int32MultiArray__data, // get(index) function pointer + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int32MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__assign_function__Int32MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__resize_function__Int32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Int32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Int32MultiArray), + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array, // message members + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_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 std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int32MultiArray)() { + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int32MultiArray__rosidl_typesupport_introspection_c__Int32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.cpp new file mode 100644 index 000000000..efbe8786c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int32MultiArray.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 "std_msgs/msg/detail/int32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int32MultiArray(_init); +} + +void Int32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int32MultiArray(); +} + +size_t size_function__Int32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int32MultiArray__data, // size() function pointer + get_const_function__Int32MultiArray__data, // get_const(index) function pointer + get_function__Int32MultiArray__data, // get(index) function pointer + fetch_function__Int32MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int32MultiArray__data, // assign(index, value) function pointer + resize_function__Int32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int32MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Int32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Int32MultiArray), + Int32MultiArray_message_member_array, // message members + Int32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_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, std_msgs, msg, Int32MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int32_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.hpp new file mode 100644 index 000000000..16b5c7116 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__builder.hpp new file mode 100644 index 000000000..711ca259c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int64_data +{ +public: + Init_Int64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Int64 data(::std_msgs::msg::Int64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int64>() +{ + return std_msgs::msg::builder::Init_Int64_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__functions.c new file mode 100644 index 000000000..6c6cf796b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Int64__init(std_msgs__msg__Int64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Int64__fini(std_msgs__msg__Int64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Int64__are_equal(const std_msgs__msg__Int64 * lhs, const std_msgs__msg__Int64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Int64__copy( + const std_msgs__msg__Int64 * input, + std_msgs__msg__Int64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Int64 * +std_msgs__msg__Int64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64 * msg = (std_msgs__msg__Int64 *)allocator.allocate(sizeof(std_msgs__msg__Int64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int64)); + bool success = std_msgs__msg__Int64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int64__destroy(std_msgs__msg__Int64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int64__Sequence__init(std_msgs__msg__Int64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64 * data = NULL; + + if (size) { + data = (std_msgs__msg__Int64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int64__Sequence__fini(std_msgs__msg__Int64__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) { + std_msgs__msg__Int64__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); + } +} + +std_msgs__msg__Int64__Sequence * +std_msgs__msg__Int64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64__Sequence * array = (std_msgs__msg__Int64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int64__Sequence__destroy(std_msgs__msg__Int64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int64__Sequence__are_equal(const std_msgs__msg__Int64__Sequence * lhs, const std_msgs__msg__Int64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int64__Sequence__copy( + const std_msgs__msg__Int64__Sequence * input, + std_msgs__msg__Int64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64 * data = + (std_msgs__msg__Int64 *)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 (!std_msgs__msg__Int64__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; ) { + std_msgs__msg__Int64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..17a42a874 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..85645c0c1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int64__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.h new file mode 100644 index 000000000..e45fe4871 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int64 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int64 +{ + int64_t data; +} std_msgs__msg__Int64; + +// Struct for a sequence of std_msgs__msg__Int64. +typedef struct std_msgs__msg__Int64__Sequence +{ + std_msgs__msg__Int64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.hpp new file mode 100644 index 000000000..72c2d6f05 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int64 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int64 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int64_ +{ + using Type = Int64_; + + explicit Int64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ll; + } + } + + explicit Int64_(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->data = 0ll; + } + } + + // field types and members + using _data_type = + int64_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int64_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int64_ *; + using ConstRawPtr = + const std_msgs::msg::Int64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int64_ & other) const + { + return !this->operator==(other); + } +}; // struct Int64_ + +// alias to use template instance with default allocator +using Int64 = + std_msgs::msg::Int64_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__traits.hpp new file mode 100644 index 000000000..c225e8c00 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int64 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int64 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int64 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int64"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.c new file mode 100644 index 000000000..4905f834d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int64__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int64__functions.h" +#include "std_msgs/msg/detail/int64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_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; + std_msgs__msg__Int64__init(message_memory); +} + +void std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_fini_function(void * message_memory) +{ + std_msgs__msg__Int64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_member_array[1] = { + { + "data", // 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(std_msgs__msg__Int64, data), // 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 std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_members = { + "std_msgs__msg", // message namespace + "Int64", // message name + 1, // number of fields + sizeof(std_msgs__msg__Int64), + std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_member_array, // message members + std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_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 std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle = { + 0, + &std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int64)() { + if (!std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int64__rosidl_typesupport_introspection_c__Int64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.cpp new file mode 100644 index 000000000..55ab86485 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int64.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 "std_msgs/msg/detail/int64__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int64(_init); +} + +void Int64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64_message_member_array[1] = { + { + "data", // 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(std_msgs::msg::Int64, data), // 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 Int64_message_members = { + "std_msgs::msg", // message namespace + "Int64", // message name + 1, // number of fields + sizeof(std_msgs::msg::Int64), + Int64_message_member_array, // message members + Int64_init_function, // function to initialize message memory (memory has to be allocated) + Int64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64_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, std_msgs, msg, Int64)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.hpp new file mode 100644 index 000000000..4c05b8ac8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__builder.hpp new file mode 100644 index 000000000..675ef92f9 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int64MultiArray_data +{ +public: + explicit Init_Int64MultiArray_data(::std_msgs::msg::Int64MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Int64MultiArray data(::std_msgs::msg::Int64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int64MultiArray msg_; +}; + +class Init_Int64MultiArray_layout +{ +public: + Init_Int64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int64MultiArray_data layout(::std_msgs::msg::Int64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int64MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Int64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int64MultiArray>() +{ + return std_msgs::msg::builder::Init_Int64MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__functions.c new file mode 100644 index 000000000..f6c1b4b58 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Int64MultiArray__init(std_msgs__msg__Int64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Int64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Int64MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Int64MultiArray__fini(std_msgs__msg__Int64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int64__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Int64MultiArray__are_equal(const std_msgs__msg__Int64MultiArray * lhs, const std_msgs__msg__Int64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Int64MultiArray__copy( + const std_msgs__msg__Int64MultiArray * input, + std_msgs__msg__Int64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int64__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Int64MultiArray * +std_msgs__msg__Int64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64MultiArray * msg = (std_msgs__msg__Int64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int64MultiArray)); + bool success = std_msgs__msg__Int64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int64MultiArray__destroy(std_msgs__msg__Int64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int64MultiArray__Sequence__init(std_msgs__msg__Int64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Int64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int64MultiArray__Sequence__fini(std_msgs__msg__Int64MultiArray__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) { + std_msgs__msg__Int64MultiArray__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); + } +} + +std_msgs__msg__Int64MultiArray__Sequence * +std_msgs__msg__Int64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64MultiArray__Sequence * array = (std_msgs__msg__Int64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int64MultiArray__Sequence__destroy(std_msgs__msg__Int64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int64MultiArray__Sequence__are_equal(const std_msgs__msg__Int64MultiArray__Sequence * lhs, const std_msgs__msg__Int64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int64MultiArray__Sequence__copy( + const std_msgs__msg__Int64MultiArray__Sequence * input, + std_msgs__msg__Int64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int64MultiArray * data = + (std_msgs__msg__Int64MultiArray *)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 (!std_msgs__msg__Int64MultiArray__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; ) { + std_msgs__msg__Int64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..94da5df65 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..7a4a8179f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.h new file mode 100644 index 000000000..c3ea4a453 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int64MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int64__Sequence data; +} std_msgs__msg__Int64MultiArray; + +// Struct for a sequence of std_msgs__msg__Int64MultiArray. +typedef struct std_msgs__msg__Int64MultiArray__Sequence +{ + std_msgs__msg__Int64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.hpp new file mode 100644 index 000000000..281119b76 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int64MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int64MultiArray_ +{ + using Type = Int64MultiArray_; + + explicit Int64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int64MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Int64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int64MultiArray_ + +// alias to use template instance with default allocator +using Int64MultiArray = + std_msgs::msg::Int64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__traits.hpp new file mode 100644 index 000000000..8aab1519a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int64MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int64MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int64MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.c new file mode 100644 index 000000000..69ae9c600 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int64_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int64_multi_array__functions.h" +#include "std_msgs/msg/detail/int64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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; + std_msgs__msg__Int64MultiArray__init(message_memory); +} + +void std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Int64MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__size_function__Int64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int64__Sequence * member = + (const rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int64_t * item = + ((const int64_t *) + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data(untyped_member, index)); + int64_t * value = + (int64_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__assign_function__Int64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int64_t * item = + ((int64_t *) + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data(untyped_member, index)); + const int64_t * value = + (const int64_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__resize_function__Int64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int64__Sequence * member = + (rosidl_runtime_c__int64__Sequence *)(untyped_member); + rosidl_runtime_c__int64__Sequence__fini(member); + return rosidl_runtime_c__int64__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Int64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int64MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__size_function__Int64MultiArray__data, // size() function pointer + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int64MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__get_function__Int64MultiArray__data, // get(index) function pointer + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int64MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__assign_function__Int64MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__resize_function__Int64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Int64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Int64MultiArray), + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array, // message members + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_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 std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int64MultiArray)() { + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int64MultiArray__rosidl_typesupport_introspection_c__Int64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.cpp new file mode 100644 index 000000000..8de84044d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int64MultiArray.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 "std_msgs/msg/detail/int64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int64MultiArray(_init); +} + +void Int64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int64MultiArray(); +} + +size_t size_function__Int64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int64MultiArray__data, // size() function pointer + get_const_function__Int64MultiArray__data, // get_const(index) function pointer + get_function__Int64MultiArray__data, // get(index) function pointer + fetch_function__Int64MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int64MultiArray__data, // assign(index, value) function pointer + resize_function__Int64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int64MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Int64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Int64MultiArray), + Int64MultiArray_message_member_array, // message members + Int64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_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, std_msgs, msg, Int64MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int64_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.hpp new file mode 100644 index 000000000..d3b300bb1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__builder.hpp new file mode 100644 index 000000000..e7b40fa8e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int8__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int8_data +{ +public: + Init_Int8_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::Int8 data(::std_msgs::msg::Int8::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int8 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int8>() +{ + return std_msgs::msg::builder::Init_Int8_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__functions.c new file mode 100644 index 000000000..53ac4856a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int8__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__Int8__init(std_msgs__msg__Int8 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__Int8__fini(std_msgs__msg__Int8 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__Int8__are_equal(const std_msgs__msg__Int8 * lhs, const std_msgs__msg__Int8 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__Int8__copy( + const std_msgs__msg__Int8 * input, + std_msgs__msg__Int8 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__Int8 * +std_msgs__msg__Int8__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8 * msg = (std_msgs__msg__Int8 *)allocator.allocate(sizeof(std_msgs__msg__Int8), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int8)); + bool success = std_msgs__msg__Int8__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int8__destroy(std_msgs__msg__Int8 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int8__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int8__Sequence__init(std_msgs__msg__Int8__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8 * data = NULL; + + if (size) { + data = (std_msgs__msg__Int8 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int8), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int8__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int8__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int8__Sequence__fini(std_msgs__msg__Int8__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) { + std_msgs__msg__Int8__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); + } +} + +std_msgs__msg__Int8__Sequence * +std_msgs__msg__Int8__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8__Sequence * array = (std_msgs__msg__Int8__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int8__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int8__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int8__Sequence__destroy(std_msgs__msg__Int8__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int8__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int8__Sequence__are_equal(const std_msgs__msg__Int8__Sequence * lhs, const std_msgs__msg__Int8__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int8__Sequence__copy( + const std_msgs__msg__Int8__Sequence * input, + std_msgs__msg__Int8__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int8); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8 * data = + (std_msgs__msg__Int8 *)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 (!std_msgs__msg__Int8__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; ) { + std_msgs__msg__Int8__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int8__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..e6f8a9c37 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int8( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int8)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ca54482cb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int8__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int8 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int8 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int8 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int8)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.h new file mode 100644 index 000000000..c5a4c7043 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/Int8 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int8 +{ + int8_t data; +} std_msgs__msg__Int8; + +// Struct for a sequence of std_msgs__msg__Int8. +typedef struct std_msgs__msg__Int8__Sequence +{ + std_msgs__msg__Int8 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int8__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.hpp new file mode 100644 index 000000000..ebea7dfdb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int8 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int8 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int8_ +{ + using Type = Int8_; + + explicit Int8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit Int8_(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->data = 0; + } + } + + // field types and members + using _data_type = + int8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const int8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int8_ *; + using ConstRawPtr = + const std_msgs::msg::Int8_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int8 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int8 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int8_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int8_ & other) const + { + return !this->operator==(other); + } +}; // struct Int8_ + +// alias to use template instance with default allocator +using Int8 = + std_msgs::msg::Int8_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__traits.hpp new file mode 100644 index 000000000..599576911 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int8__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int8 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int8 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int8 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int8 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int8 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int8"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int8"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.c new file mode 100644 index 000000000..1a62e105a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int8__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int8__functions.h" +#include "std_msgs/msg/detail/int8__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_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; + std_msgs__msg__Int8__init(message_memory); +} + +void std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_fini_function(void * message_memory) +{ + std_msgs__msg__Int8__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int8, data), // 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 std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_members = { + "std_msgs__msg", // message namespace + "Int8", // message name + 1, // number of fields + sizeof(std_msgs__msg__Int8), + std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_member_array, // message members + std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_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 std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle = { + 0, + &std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int8)() { + if (!std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int8__rosidl_typesupport_introspection_c__Int8_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.cpp new file mode 100644 index 000000000..a4de6ea58 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int8.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 "std_msgs/msg/detail/int8__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int8_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int8(_init); +} + +void Int8_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int8(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int8, data), // 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 Int8_message_members = { + "std_msgs::msg", // message namespace + "Int8", // message name + 1, // number of fields + sizeof(std_msgs::msg::Int8), + Int8_message_member_array, // message members + Int8_init_function, // function to initialize message memory (memory has to be allocated) + Int8_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int8_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int8_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8_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, std_msgs, msg, Int8)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.hpp new file mode 100644 index 000000000..19f1f3791 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int8 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__builder.hpp new file mode 100644 index 000000000..e3060c7cd --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Int8MultiArray_data +{ +public: + explicit Init_Int8MultiArray_data(::std_msgs::msg::Int8MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::Int8MultiArray data(::std_msgs::msg::Int8MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::Int8MultiArray msg_; +}; + +class Init_Int8MultiArray_layout +{ +public: + Init_Int8MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Int8MultiArray_data layout(::std_msgs::msg::Int8MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_Int8MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::Int8MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::Int8MultiArray>() +{ + return std_msgs::msg::builder::Init_Int8MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__functions.c new file mode 100644 index 000000000..fbb861af7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/int8_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__Int8MultiArray__init(std_msgs__msg__Int8MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__Int8MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__init(&msg->data, 0)) { + std_msgs__msg__Int8MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__Int8MultiArray__fini(std_msgs__msg__Int8MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__int8__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__Int8MultiArray__are_equal(const std_msgs__msg__Int8MultiArray * lhs, const std_msgs__msg__Int8MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__Int8MultiArray__copy( + const std_msgs__msg__Int8MultiArray * input, + std_msgs__msg__Int8MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__int8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__Int8MultiArray * +std_msgs__msg__Int8MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8MultiArray * msg = (std_msgs__msg__Int8MultiArray *)allocator.allocate(sizeof(std_msgs__msg__Int8MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__Int8MultiArray)); + bool success = std_msgs__msg__Int8MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__Int8MultiArray__destroy(std_msgs__msg__Int8MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__Int8MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__Int8MultiArray__Sequence__init(std_msgs__msg__Int8MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__Int8MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__Int8MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__Int8MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__Int8MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__Int8MultiArray__Sequence__fini(std_msgs__msg__Int8MultiArray__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) { + std_msgs__msg__Int8MultiArray__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); + } +} + +std_msgs__msg__Int8MultiArray__Sequence * +std_msgs__msg__Int8MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8MultiArray__Sequence * array = (std_msgs__msg__Int8MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__Int8MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__Int8MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__Int8MultiArray__Sequence__destroy(std_msgs__msg__Int8MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__Int8MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__Int8MultiArray__Sequence__are_equal(const std_msgs__msg__Int8MultiArray__Sequence * lhs, const std_msgs__msg__Int8MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__Int8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__Int8MultiArray__Sequence__copy( + const std_msgs__msg__Int8MultiArray__Sequence * input, + std_msgs__msg__Int8MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__Int8MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__Int8MultiArray * data = + (std_msgs__msg__Int8MultiArray *)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 (!std_msgs__msg__Int8MultiArray__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; ) { + std_msgs__msg__Int8MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__Int8MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..52651a11c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__Int8MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__Int8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, Int8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..c48b5b690 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/int8_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::Int8MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::Int8MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::Int8MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_Int8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, Int8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.h new file mode 100644 index 000000000..94be0a457 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/Int8MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__Int8MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__int8__Sequence data; +} std_msgs__msg__Int8MultiArray; + +// Struct for a sequence of std_msgs__msg__Int8MultiArray. +typedef struct std_msgs__msg__Int8MultiArray__Sequence +{ + std_msgs__msg__Int8MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__Int8MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.hpp new file mode 100644 index 000000000..15659e729 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__Int8MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__Int8MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct Int8MultiArray_ +{ + using Type = Int8MultiArray_; + + explicit Int8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit Int8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::Int8MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::Int8MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__Int8MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__Int8MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Int8MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const Int8MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct Int8MultiArray_ + +// alias to use template instance with default allocator +using Int8MultiArray = + std_msgs::msg::Int8MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__traits.hpp new file mode 100644 index 000000000..f7623dcb9 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Int8MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Int8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Int8MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::Int8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::Int8MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::Int8MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/Int8MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.c new file mode 100644 index 000000000..9bcbb3cb1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/int8_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/int8_multi_array__functions.h" +#include "std_msgs/msg/detail/int8_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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; + std_msgs__msg__Int8MultiArray__init(message_memory); +} + +void std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__Int8MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__size_function__Int8MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__int8__Sequence * member = + (const rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const int8_t * item = + ((const int8_t *) + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data(untyped_member, index)); + int8_t * value = + (int8_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__assign_function__Int8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + int8_t * item = + ((int8_t *) + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data(untyped_member, index)); + const int8_t * value = + (const int8_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__resize_function__Int8MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__int8__Sequence * member = + (rosidl_runtime_c__int8__Sequence *)(untyped_member); + rosidl_runtime_c__int8__Sequence__fini(member); + return rosidl_runtime_c__int8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__Int8MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__Int8MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__size_function__Int8MultiArray__data, // size() function pointer + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_const_function__Int8MultiArray__data, // get_const(index) function pointer + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__get_function__Int8MultiArray__data, // get(index) function pointer + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__fetch_function__Int8MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__assign_function__Int8MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__resize_function__Int8MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members = { + "std_msgs__msg", // message namespace + "Int8MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__Int8MultiArray), + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array, // message members + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_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 std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Int8MultiArray)() { + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__Int8MultiArray__rosidl_typesupport_introspection_c__Int8MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.cpp new file mode 100644 index 000000000..1ed2c4dea --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/Int8MultiArray.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 "std_msgs/msg/detail/int8_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Int8MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::Int8MultiArray(_init); +} + +void Int8MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Int8MultiArray(); +} + +size_t size_function__Int8MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Int8MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Int8MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Int8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Int8MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Int8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Int8MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Int8MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Int8MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int8MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::Int8MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__Int8MultiArray__data, // size() function pointer + get_const_function__Int8MultiArray__data, // get_const(index) function pointer + get_function__Int8MultiArray__data, // get(index) function pointer + fetch_function__Int8MultiArray__data, // fetch(index, &value) function pointer + assign_function__Int8MultiArray__data, // assign(index, value) function pointer + resize_function__Int8MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Int8MultiArray_message_members = { + "std_msgs::msg", // message namespace + "Int8MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::Int8MultiArray), + Int8MultiArray_message_member_array, // message members + Int8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + Int8MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Int8MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Int8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_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, std_msgs, msg, Int8MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::Int8MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/int8_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.hpp new file mode 100644 index 000000000..2d44ab37a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/int8_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/Int8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + Int8MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__builder.hpp new file mode 100644 index 000000000..65ed955f2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__builder.hpp @@ -0,0 +1,88 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MultiArrayDimension_stride +{ +public: + explicit Init_MultiArrayDimension_stride(::std_msgs::msg::MultiArrayDimension & msg) + : msg_(msg) + {} + ::std_msgs::msg::MultiArrayDimension stride(::std_msgs::msg::MultiArrayDimension::_stride_type arg) + { + msg_.stride = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::MultiArrayDimension msg_; +}; + +class Init_MultiArrayDimension_size +{ +public: + explicit Init_MultiArrayDimension_size(::std_msgs::msg::MultiArrayDimension & msg) + : msg_(msg) + {} + Init_MultiArrayDimension_stride size(::std_msgs::msg::MultiArrayDimension::_size_type arg) + { + msg_.size = std::move(arg); + return Init_MultiArrayDimension_stride(msg_); + } + +private: + ::std_msgs::msg::MultiArrayDimension msg_; +}; + +class Init_MultiArrayDimension_label +{ +public: + Init_MultiArrayDimension_label() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MultiArrayDimension_size label(::std_msgs::msg::MultiArrayDimension::_label_type arg) + { + msg_.label = std::move(arg); + return Init_MultiArrayDimension_size(msg_); + } + +private: + ::std_msgs::msg::MultiArrayDimension msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::MultiArrayDimension>() +{ + return std_msgs::msg::builder::Init_MultiArrayDimension_label(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__functions.c new file mode 100644 index 000000000..3a5ae6c8d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__functions.c @@ -0,0 +1,267 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/multi_array_dimension__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `label` +#include "rosidl_runtime_c/string_functions.h" + +bool +std_msgs__msg__MultiArrayDimension__init(std_msgs__msg__MultiArrayDimension * msg) +{ + if (!msg) { + return false; + } + // label + if (!rosidl_runtime_c__String__init(&msg->label)) { + std_msgs__msg__MultiArrayDimension__fini(msg); + return false; + } + // size + // stride + return true; +} + +void +std_msgs__msg__MultiArrayDimension__fini(std_msgs__msg__MultiArrayDimension * msg) +{ + if (!msg) { + return; + } + // label + rosidl_runtime_c__String__fini(&msg->label); + // size + // stride +} + +bool +std_msgs__msg__MultiArrayDimension__are_equal(const std_msgs__msg__MultiArrayDimension * lhs, const std_msgs__msg__MultiArrayDimension * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // label + if (!rosidl_runtime_c__String__are_equal( + &(lhs->label), &(rhs->label))) + { + return false; + } + // size + if (lhs->size != rhs->size) { + return false; + } + // stride + if (lhs->stride != rhs->stride) { + return false; + } + return true; +} + +bool +std_msgs__msg__MultiArrayDimension__copy( + const std_msgs__msg__MultiArrayDimension * input, + std_msgs__msg__MultiArrayDimension * output) +{ + if (!input || !output) { + return false; + } + // label + if (!rosidl_runtime_c__String__copy( + &(input->label), &(output->label))) + { + return false; + } + // size + output->size = input->size; + // stride + output->stride = input->stride; + return true; +} + +std_msgs__msg__MultiArrayDimension * +std_msgs__msg__MultiArrayDimension__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayDimension * msg = (std_msgs__msg__MultiArrayDimension *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayDimension), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__MultiArrayDimension)); + bool success = std_msgs__msg__MultiArrayDimension__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__MultiArrayDimension__destroy(std_msgs__msg__MultiArrayDimension * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__MultiArrayDimension__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__MultiArrayDimension__Sequence__init(std_msgs__msg__MultiArrayDimension__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayDimension * data = NULL; + + if (size) { + data = (std_msgs__msg__MultiArrayDimension *)allocator.zero_allocate(size, sizeof(std_msgs__msg__MultiArrayDimension), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__MultiArrayDimension__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__MultiArrayDimension__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__MultiArrayDimension__Sequence__fini(std_msgs__msg__MultiArrayDimension__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) { + std_msgs__msg__MultiArrayDimension__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); + } +} + +std_msgs__msg__MultiArrayDimension__Sequence * +std_msgs__msg__MultiArrayDimension__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayDimension__Sequence * array = (std_msgs__msg__MultiArrayDimension__Sequence *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayDimension__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__MultiArrayDimension__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__MultiArrayDimension__Sequence__destroy(std_msgs__msg__MultiArrayDimension__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__MultiArrayDimension__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__MultiArrayDimension__Sequence__are_equal(const std_msgs__msg__MultiArrayDimension__Sequence * lhs, const std_msgs__msg__MultiArrayDimension__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__MultiArrayDimension__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__MultiArrayDimension__Sequence__copy( + const std_msgs__msg__MultiArrayDimension__Sequence * input, + std_msgs__msg__MultiArrayDimension__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__MultiArrayDimension); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayDimension * data = + (std_msgs__msg__MultiArrayDimension *)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 (!std_msgs__msg__MultiArrayDimension__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; ) { + std_msgs__msg__MultiArrayDimension__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__MultiArrayDimension__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b5e5aed9f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__MultiArrayDimension( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__MultiArrayDimension( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, MultiArrayDimension)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..bb58b51d9 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/multi_array_dimension__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::MultiArrayDimension & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::MultiArrayDimension & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::MultiArrayDimension & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_MultiArrayDimension( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, MultiArrayDimension)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.h new file mode 100644 index 000000000..12bc83466 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.h @@ -0,0 +1,55 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'label' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/MultiArrayDimension in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__MultiArrayDimension +{ + /// label of given dimension + rosidl_runtime_c__String label; + /// size of given dimension (in type units) + uint32_t size; + /// stride of given dimension + uint32_t stride; +} std_msgs__msg__MultiArrayDimension; + +// Struct for a sequence of std_msgs__msg__MultiArrayDimension. +typedef struct std_msgs__msg__MultiArrayDimension__Sequence +{ + std_msgs__msg__MultiArrayDimension * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__MultiArrayDimension__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.hpp new file mode 100644 index 000000000..90b95c3d1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__struct.hpp @@ -0,0 +1,159 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__MultiArrayDimension __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__MultiArrayDimension __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct MultiArrayDimension_ +{ + using Type = MultiArrayDimension_; + + explicit MultiArrayDimension_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->label = ""; + this->size = 0ul; + this->stride = 0ul; + } + } + + explicit MultiArrayDimension_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : label(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->label = ""; + this->size = 0ul; + this->stride = 0ul; + } + } + + // field types and members + using _label_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _label_type label; + using _size_type = + uint32_t; + _size_type size; + using _stride_type = + uint32_t; + _stride_type stride; + + // setters for named parameter idiom + Type & set__label( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->label = _arg; + return *this; + } + Type & set__size( + const uint32_t & _arg) + { + this->size = _arg; + return *this; + } + Type & set__stride( + const uint32_t & _arg) + { + this->stride = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::MultiArrayDimension_ *; + using ConstRawPtr = + const std_msgs::msg::MultiArrayDimension_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__MultiArrayDimension + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__MultiArrayDimension + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MultiArrayDimension_ & other) const + { + if (this->label != other.label) { + return false; + } + if (this->size != other.size) { + return false; + } + if (this->stride != other.stride) { + return false; + } + return true; + } + bool operator!=(const MultiArrayDimension_ & other) const + { + return !this->operator==(other); + } +}; // struct MultiArrayDimension_ + +// alias to use template instance with default allocator +using MultiArrayDimension = + std_msgs::msg::MultiArrayDimension_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__traits.hpp new file mode 100644 index 000000000..811f22ec2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__traits.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiArrayDimension & msg, + std::ostream & out) +{ + out << "{"; + // member: label + { + out << "label: "; + rosidl_generator_traits::value_to_yaml(msg.label, out); + out << ", "; + } + + // member: size + { + out << "size: "; + rosidl_generator_traits::value_to_yaml(msg.size, out); + out << ", "; + } + + // member: stride + { + out << "stride: "; + rosidl_generator_traits::value_to_yaml(msg.stride, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiArrayDimension & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: label + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "label: "; + rosidl_generator_traits::value_to_yaml(msg.label, out); + out << "\n"; + } + + // member: size + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "size: "; + rosidl_generator_traits::value_to_yaml(msg.size, out); + out << "\n"; + } + + // member: stride + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stride: "; + rosidl_generator_traits::value_to_yaml(msg.stride, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiArrayDimension & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::MultiArrayDimension & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::MultiArrayDimension & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::MultiArrayDimension"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/MultiArrayDimension"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.c new file mode 100644 index 000000000..52fef4d9b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.c @@ -0,0 +1,121 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/multi_array_dimension__functions.h" +#include "std_msgs/msg/detail/multi_array_dimension__struct.h" + + +// Include directives for member types +// Member `label` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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; + std_msgs__msg__MultiArrayDimension__init(message_memory); +} + +void std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_fini_function(void * message_memory) +{ + std_msgs__msg__MultiArrayDimension__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array[3] = { + { + "label", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__MultiArrayDimension, label), // 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 + }, + { + "size", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__MultiArrayDimension, size), // 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 + }, + { + "stride", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__MultiArrayDimension, stride), // 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 std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members = { + "std_msgs__msg", // message namespace + "MultiArrayDimension", // message name + 3, // number of fields + sizeof(std_msgs__msg__MultiArrayDimension), + std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_member_array, // message members + std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_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 std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle = { + 0, + &std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayDimension)() { + if (!std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__MultiArrayDimension__rosidl_typesupport_introspection_c__MultiArrayDimension_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.cpp new file mode 100644 index 000000000..0d4c59c46 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.cpp @@ -0,0 +1,143 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/MultiArrayDimension.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 "std_msgs/msg/detail/multi_array_dimension__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MultiArrayDimension_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::MultiArrayDimension(_init); +} + +void MultiArrayDimension_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MultiArrayDimension(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayDimension_message_member_array[3] = { + { + "label", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::MultiArrayDimension, label), // 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 + }, + { + "size", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::MultiArrayDimension, size), // 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 + }, + { + "stride", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::MultiArrayDimension, stride), // 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 MultiArrayDimension_message_members = { + "std_msgs::msg", // message namespace + "MultiArrayDimension", // message name + 3, // number of fields + sizeof(std_msgs::msg::MultiArrayDimension), + MultiArrayDimension_message_member_array, // message members + MultiArrayDimension_init_function, // function to initialize message memory (memory has to be allocated) + MultiArrayDimension_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MultiArrayDimension_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MultiArrayDimension_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_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, std_msgs, msg, MultiArrayDimension)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayDimension_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_dimension__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.hpp new file mode 100644 index 000000000..e68671e8d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_dimension__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/MultiArrayDimension.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + MultiArrayDimension +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_DIMENSION__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__builder.hpp new file mode 100644 index 000000000..a68d785d0 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MultiArrayLayout_data_offset +{ +public: + explicit Init_MultiArrayLayout_data_offset(::std_msgs::msg::MultiArrayLayout & msg) + : msg_(msg) + {} + ::std_msgs::msg::MultiArrayLayout data_offset(::std_msgs::msg::MultiArrayLayout::_data_offset_type arg) + { + msg_.data_offset = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::MultiArrayLayout msg_; +}; + +class Init_MultiArrayLayout_dim +{ +public: + Init_MultiArrayLayout_dim() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MultiArrayLayout_data_offset dim(::std_msgs::msg::MultiArrayLayout::_dim_type arg) + { + msg_.dim = std::move(arg); + return Init_MultiArrayLayout_data_offset(msg_); + } + +private: + ::std_msgs::msg::MultiArrayLayout msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::MultiArrayLayout>() +{ + return std_msgs::msg::builder::Init_MultiArrayLayout_dim(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__functions.c new file mode 100644 index 000000000..e9a4e6f5a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__functions.c @@ -0,0 +1,259 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/multi_array_layout__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `dim` +#include "std_msgs/msg/detail/multi_array_dimension__functions.h" + +bool +std_msgs__msg__MultiArrayLayout__init(std_msgs__msg__MultiArrayLayout * msg) +{ + if (!msg) { + return false; + } + // dim + if (!std_msgs__msg__MultiArrayDimension__Sequence__init(&msg->dim, 0)) { + std_msgs__msg__MultiArrayLayout__fini(msg); + return false; + } + // data_offset + return true; +} + +void +std_msgs__msg__MultiArrayLayout__fini(std_msgs__msg__MultiArrayLayout * msg) +{ + if (!msg) { + return; + } + // dim + std_msgs__msg__MultiArrayDimension__Sequence__fini(&msg->dim); + // data_offset +} + +bool +std_msgs__msg__MultiArrayLayout__are_equal(const std_msgs__msg__MultiArrayLayout * lhs, const std_msgs__msg__MultiArrayLayout * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // dim + if (!std_msgs__msg__MultiArrayDimension__Sequence__are_equal( + &(lhs->dim), &(rhs->dim))) + { + return false; + } + // data_offset + if (lhs->data_offset != rhs->data_offset) { + return false; + } + return true; +} + +bool +std_msgs__msg__MultiArrayLayout__copy( + const std_msgs__msg__MultiArrayLayout * input, + std_msgs__msg__MultiArrayLayout * output) +{ + if (!input || !output) { + return false; + } + // dim + if (!std_msgs__msg__MultiArrayDimension__Sequence__copy( + &(input->dim), &(output->dim))) + { + return false; + } + // data_offset + output->data_offset = input->data_offset; + return true; +} + +std_msgs__msg__MultiArrayLayout * +std_msgs__msg__MultiArrayLayout__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayLayout * msg = (std_msgs__msg__MultiArrayLayout *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayLayout), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__MultiArrayLayout)); + bool success = std_msgs__msg__MultiArrayLayout__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__MultiArrayLayout__destroy(std_msgs__msg__MultiArrayLayout * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__MultiArrayLayout__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__MultiArrayLayout__Sequence__init(std_msgs__msg__MultiArrayLayout__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayLayout * data = NULL; + + if (size) { + data = (std_msgs__msg__MultiArrayLayout *)allocator.zero_allocate(size, sizeof(std_msgs__msg__MultiArrayLayout), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__MultiArrayLayout__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__MultiArrayLayout__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__MultiArrayLayout__Sequence__fini(std_msgs__msg__MultiArrayLayout__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) { + std_msgs__msg__MultiArrayLayout__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); + } +} + +std_msgs__msg__MultiArrayLayout__Sequence * +std_msgs__msg__MultiArrayLayout__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayLayout__Sequence * array = (std_msgs__msg__MultiArrayLayout__Sequence *)allocator.allocate(sizeof(std_msgs__msg__MultiArrayLayout__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__MultiArrayLayout__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__MultiArrayLayout__Sequence__destroy(std_msgs__msg__MultiArrayLayout__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__MultiArrayLayout__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__MultiArrayLayout__Sequence__are_equal(const std_msgs__msg__MultiArrayLayout__Sequence * lhs, const std_msgs__msg__MultiArrayLayout__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__MultiArrayLayout__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__MultiArrayLayout__Sequence__copy( + const std_msgs__msg__MultiArrayLayout__Sequence * input, + std_msgs__msg__MultiArrayLayout__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__MultiArrayLayout); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__MultiArrayLayout * data = + (std_msgs__msg__MultiArrayLayout *)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 (!std_msgs__msg__MultiArrayLayout__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; ) { + std_msgs__msg__MultiArrayLayout__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..46cf07e23 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__MultiArrayLayout( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__MultiArrayLayout( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, MultiArrayLayout)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..b604a70e8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/multi_array_layout__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::MultiArrayLayout & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::MultiArrayLayout & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::MultiArrayLayout & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_MultiArrayLayout( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, MultiArrayLayout)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.h new file mode 100644 index 000000000..a9ba94b33 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.h @@ -0,0 +1,76 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'dim' +#include "std_msgs/msg/detail/multi_array_dimension__struct.h" + +/// Struct defined in msg/MultiArrayLayout in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__MultiArrayLayout +{ + /// The multiarray declares a generic multi-dimensional array of a + /// particular data type. Dimensions are ordered from outer most + /// to inner most. + /// + /// Accessors should ALWAYS be written in terms of dimension stride + /// and specified outer-most dimension first. + /// + /// multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k] + /// + /// A standard, 3-channel 640x480 image with interleaved color channels + /// would be specified as: + /// + /// dim[0].label = "height" + /// dim[0].size = 480 + /// dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image) + /// dim[1].label = "width" + /// dim[1].size = 640 + /// dim[1].stride = 3*640 = 1920 + /// dim[2].label = "channel" + /// dim[2].size = 3 + /// dim[2].stride = 3 + /// + /// multiarray(i,j,k) refers to the ith row, jth column, and kth channel. + /// Array of dimension properties + std_msgs__msg__MultiArrayDimension__Sequence dim; + /// padding bytes at front of data + uint32_t data_offset; +} std_msgs__msg__MultiArrayLayout; + +// Struct for a sequence of std_msgs__msg__MultiArrayLayout. +typedef struct std_msgs__msg__MultiArrayLayout__Sequence +{ + std_msgs__msg__MultiArrayLayout * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__MultiArrayLayout__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.hpp new file mode 100644 index 000000000..8de511dab --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__struct.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'dim' +#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__MultiArrayLayout __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__MultiArrayLayout __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct MultiArrayLayout_ +{ + using Type = MultiArrayLayout_; + + explicit MultiArrayLayout_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data_offset = 0ul; + } + } + + explicit MultiArrayLayout_(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->data_offset = 0ul; + } + } + + // field types and members + using _dim_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _dim_type dim; + using _data_offset_type = + uint32_t; + _data_offset_type data_offset; + + // setters for named parameter idiom + Type & set__dim( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->dim = _arg; + return *this; + } + Type & set__data_offset( + const uint32_t & _arg) + { + this->data_offset = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::MultiArrayLayout_ *; + using ConstRawPtr = + const std_msgs::msg::MultiArrayLayout_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__MultiArrayLayout + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__MultiArrayLayout + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MultiArrayLayout_ & other) const + { + if (this->dim != other.dim) { + return false; + } + if (this->data_offset != other.data_offset) { + return false; + } + return true; + } + bool operator!=(const MultiArrayLayout_ & other) const + { + return !this->operator==(other); + } +}; // struct MultiArrayLayout_ + +// alias to use template instance with default allocator +using MultiArrayLayout = + std_msgs::msg::MultiArrayLayout_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__traits.hpp new file mode 100644 index 000000000..aa78a42ba --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'dim' +#include "std_msgs/msg/detail/multi_array_dimension__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiArrayLayout & msg, + std::ostream & out) +{ + out << "{"; + // member: dim + { + if (msg.dim.size() == 0) { + out << "dim: []"; + } else { + out << "dim: ["; + size_t pending_items = msg.dim.size(); + for (auto item : msg.dim) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: data_offset + { + out << "data_offset: "; + rosidl_generator_traits::value_to_yaml(msg.data_offset, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiArrayLayout & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: dim + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.dim.size() == 0) { + out << "dim: []\n"; + } else { + out << "dim:\n"; + for (auto item : msg.dim) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: data_offset + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data_offset: "; + rosidl_generator_traits::value_to_yaml(msg.data_offset, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiArrayLayout & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::MultiArrayLayout & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::MultiArrayLayout & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::MultiArrayLayout"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/MultiArrayLayout"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.c new file mode 100644 index 000000000..91ad232b3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.c @@ -0,0 +1,163 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/multi_array_layout__functions.h" +#include "std_msgs/msg/detail/multi_array_layout__struct.h" + + +// Include directives for member types +// Member `dim` +#include "std_msgs/msg/multi_array_dimension.h" +// Member `dim` +#include "std_msgs/msg/detail/multi_array_dimension__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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; + std_msgs__msg__MultiArrayLayout__init(message_memory); +} + +void std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_fini_function(void * message_memory) +{ + std_msgs__msg__MultiArrayLayout__fini(message_memory); +} + +size_t std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayLayout__dim( + const void * untyped_member) +{ + const std_msgs__msg__MultiArrayDimension__Sequence * member = + (const std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index) +{ + const std_msgs__msg__MultiArrayDimension__Sequence * member = + (const std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim( + void * untyped_member, size_t index) +{ + std_msgs__msg__MultiArrayDimension__Sequence * member = + (std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__fetch_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index, void * untyped_value) +{ + const std_msgs__msg__MultiArrayDimension * item = + ((const std_msgs__msg__MultiArrayDimension *) + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim(untyped_member, index)); + std_msgs__msg__MultiArrayDimension * value = + (std_msgs__msg__MultiArrayDimension *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__assign_function__MultiArrayLayout__dim( + void * untyped_member, size_t index, const void * untyped_value) +{ + std_msgs__msg__MultiArrayDimension * item = + ((std_msgs__msg__MultiArrayDimension *) + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim(untyped_member, index)); + const std_msgs__msg__MultiArrayDimension * value = + (const std_msgs__msg__MultiArrayDimension *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayLayout__dim( + void * untyped_member, size_t size) +{ + std_msgs__msg__MultiArrayDimension__Sequence * member = + (std_msgs__msg__MultiArrayDimension__Sequence *)(untyped_member); + std_msgs__msg__MultiArrayDimension__Sequence__fini(member); + return std_msgs__msg__MultiArrayDimension__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[2] = { + { + "dim", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__MultiArrayLayout, dim), // bytes offset in struct + NULL, // default value + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__size_function__MultiArrayLayout__dim, // size() function pointer + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__get_function__MultiArrayLayout__dim, // get(index) function pointer + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__fetch_function__MultiArrayLayout__dim, // fetch(index, &value) function pointer + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__assign_function__MultiArrayLayout__dim, // assign(index, value) function pointer + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__resize_function__MultiArrayLayout__dim // resize(index) function pointer + }, + { + "data_offset", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__MultiArrayLayout, data_offset), // 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 std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members = { + "std_msgs__msg", // message namespace + "MultiArrayLayout", // message name + 2, // number of fields + sizeof(std_msgs__msg__MultiArrayLayout), + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array, // message members + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_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 std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle = { + 0, + &std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)() { + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayDimension)(); + if (!std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__MultiArrayLayout__rosidl_typesupport_introspection_c__MultiArrayLayout_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.cpp new file mode 100644 index 000000000..03f585b76 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/MultiArrayLayout.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 "std_msgs/msg/detail/multi_array_layout__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MultiArrayLayout_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::MultiArrayLayout(_init); +} + +void MultiArrayLayout_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MultiArrayLayout(); +} + +size_t size_function__MultiArrayLayout__dim(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MultiArrayLayout__dim(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MultiArrayLayout__dim(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MultiArrayLayout__dim( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiArrayLayout__dim(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiArrayLayout__dim( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiArrayLayout__dim(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MultiArrayLayout__dim(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiArrayLayout_message_member_array[2] = { + { + "dim", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::MultiArrayLayout, dim), // bytes offset in struct + nullptr, // default value + size_function__MultiArrayLayout__dim, // size() function pointer + get_const_function__MultiArrayLayout__dim, // get_const(index) function pointer + get_function__MultiArrayLayout__dim, // get(index) function pointer + fetch_function__MultiArrayLayout__dim, // fetch(index, &value) function pointer + assign_function__MultiArrayLayout__dim, // assign(index, value) function pointer + resize_function__MultiArrayLayout__dim // resize(index) function pointer + }, + { + "data_offset", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::MultiArrayLayout, data_offset), // 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 MultiArrayLayout_message_members = { + "std_msgs::msg", // message namespace + "MultiArrayLayout", // message name + 2, // number of fields + sizeof(std_msgs::msg::MultiArrayLayout), + MultiArrayLayout_message_member_array, // message members + MultiArrayLayout_init_function, // function to initialize message memory (memory has to be allocated) + MultiArrayLayout_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MultiArrayLayout_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MultiArrayLayout_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_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, std_msgs, msg, MultiArrayLayout)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::MultiArrayLayout_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/multi_array_layout__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.hpp new file mode 100644 index 000000000..21c52a02c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/multi_array_layout__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/MultiArrayLayout.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + MultiArrayLayout +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__MULTI_ARRAY_LAYOUT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__builder.hpp new file mode 100644 index 000000000..f6fc05f37 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/string__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_String_data +{ +public: + Init_String_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::String data(::std_msgs::msg::String::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::String msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::String>() +{ + return std_msgs::msg::builder::Init_String_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__STRING__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__functions.c new file mode 100644 index 000000000..fc0bcbb96 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__functions.c @@ -0,0 +1,251 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/string__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/string_functions.h" + +bool +std_msgs__msg__String__init(std_msgs__msg__String * msg) +{ + if (!msg) { + return false; + } + // data + if (!rosidl_runtime_c__String__init(&msg->data)) { + std_msgs__msg__String__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__String__fini(std_msgs__msg__String * msg) +{ + if (!msg) { + return; + } + // data + rosidl_runtime_c__String__fini(&msg->data); +} + +bool +std_msgs__msg__String__are_equal(const std_msgs__msg__String * lhs, const std_msgs__msg__String * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (!rosidl_runtime_c__String__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__String__copy( + const std_msgs__msg__String * input, + std_msgs__msg__String * output) +{ + if (!input || !output) { + return false; + } + // data + if (!rosidl_runtime_c__String__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__String * +std_msgs__msg__String__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__String * msg = (std_msgs__msg__String *)allocator.allocate(sizeof(std_msgs__msg__String), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__String)); + bool success = std_msgs__msg__String__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__String__destroy(std_msgs__msg__String * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__String__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__String__Sequence__init(std_msgs__msg__String__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__String * data = NULL; + + if (size) { + data = (std_msgs__msg__String *)allocator.zero_allocate(size, sizeof(std_msgs__msg__String), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__String__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__String__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__String__Sequence__fini(std_msgs__msg__String__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) { + std_msgs__msg__String__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); + } +} + +std_msgs__msg__String__Sequence * +std_msgs__msg__String__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__String__Sequence * array = (std_msgs__msg__String__Sequence *)allocator.allocate(sizeof(std_msgs__msg__String__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__String__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__String__Sequence__destroy(std_msgs__msg__String__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__String__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__String__Sequence__are_equal(const std_msgs__msg__String__Sequence * lhs, const std_msgs__msg__String__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__String__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__String__Sequence__copy( + const std_msgs__msg__String__Sequence * input, + std_msgs__msg__String__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__String); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__String * data = + (std_msgs__msg__String *)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 (!std_msgs__msg__String__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; ) { + std_msgs__msg__String__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__String__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/string__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..33dd0d64b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__String( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__String( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, String)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..11ca1c1dc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/string__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::String & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::String & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::String & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_String( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, String)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__STRING__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.h new file mode 100644 index 000000000..0233d959d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'data' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/String in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__String +{ + rosidl_runtime_c__String data; +} std_msgs__msg__String; + +// Struct for a sequence of std_msgs__msg__String. +typedef struct std_msgs__msg__String__Sequence +{ + std_msgs__msg__String * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__String__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__STRING__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.hpp new file mode 100644 index 000000000..f17515769 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__String __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__String __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct String_ +{ + using Type = String_; + + explicit String_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + explicit String_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : data(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + // field types and members + using _data_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::String_ *; + using ConstRawPtr = + const std_msgs::msg::String_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__String + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__String + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const String_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const String_ & other) const + { + return !this->operator==(other); + } +}; // struct String_ + +// alias to use template instance with default allocator +using String = + std_msgs::msg::String_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__STRING__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__traits.hpp new file mode 100644 index 000000000..316de87f8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/string__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const String & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const String & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const String & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::String & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::String & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::String"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/String"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__STRING__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.c new file mode 100644 index 000000000..6d318122f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.c @@ -0,0 +1,87 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/string__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/string__functions.h" +#include "std_msgs/msg/detail/string__struct.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__String__rosidl_typesupport_introspection_c__String_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; + std_msgs__msg__String__init(message_memory); +} + +void std_msgs__msg__String__rosidl_typesupport_introspection_c__String_fini_function(void * message_memory) +{ + std_msgs__msg__String__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__String, data), // 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 std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_members = { + "std_msgs__msg", // message namespace + "String", // message name + 1, // number of fields + sizeof(std_msgs__msg__String), + std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_member_array, // message members + std_msgs__msg__String__rosidl_typesupport_introspection_c__String_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__String__rosidl_typesupport_introspection_c__String_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 std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle = { + 0, + &std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, String)() { + if (!std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__String__rosidl_typesupport_introspection_c__String_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.cpp new file mode 100644 index 000000000..08c586bb8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/String.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 "std_msgs/msg/detail/string__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void String_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::String(_init); +} + +void String_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~String(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember String_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::String, data), // 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 String_message_members = { + "std_msgs::msg", // message namespace + "String", // message name + 1, // number of fields + sizeof(std_msgs::msg::String), + String_message_member_array, // message members + String_init_function, // function to initialize message memory (memory has to be allocated) + String_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t String_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &String_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::String_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, std_msgs, msg, String)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::String_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/string__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.hpp new file mode 100644 index 000000000..d2a039f5f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/string__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/String.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + String +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__STRING__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__builder.hpp new file mode 100644 index 000000000..0f61fd129 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int16__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt16_data +{ +public: + Init_UInt16_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::UInt16 data(::std_msgs::msg::UInt16::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt16 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt16>() +{ + return std_msgs::msg::builder::Init_UInt16_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__functions.c new file mode 100644 index 000000000..fc4a54442 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int16__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__UInt16__init(std_msgs__msg__UInt16 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__UInt16__fini(std_msgs__msg__UInt16 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__UInt16__are_equal(const std_msgs__msg__UInt16 * lhs, const std_msgs__msg__UInt16 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt16__copy( + const std_msgs__msg__UInt16 * input, + std_msgs__msg__UInt16 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__UInt16 * +std_msgs__msg__UInt16__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16 * msg = (std_msgs__msg__UInt16 *)allocator.allocate(sizeof(std_msgs__msg__UInt16), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt16)); + bool success = std_msgs__msg__UInt16__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt16__destroy(std_msgs__msg__UInt16 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt16__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt16__Sequence__init(std_msgs__msg__UInt16__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16 * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt16 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt16), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt16__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt16__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt16__Sequence__fini(std_msgs__msg__UInt16__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) { + std_msgs__msg__UInt16__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); + } +} + +std_msgs__msg__UInt16__Sequence * +std_msgs__msg__UInt16__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16__Sequence * array = (std_msgs__msg__UInt16__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt16__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt16__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt16__Sequence__destroy(std_msgs__msg__UInt16__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt16__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt16__Sequence__are_equal(const std_msgs__msg__UInt16__Sequence * lhs, const std_msgs__msg__UInt16__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt16__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt16__Sequence__copy( + const std_msgs__msg__UInt16__Sequence * input, + std_msgs__msg__UInt16__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt16); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16 * data = + (std_msgs__msg__UInt16 *)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 (!std_msgs__msg__UInt16__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; ) { + std_msgs__msg__UInt16__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt16__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..600f94bd2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt16( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt16)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ae98960cb --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int16__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt16 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt16 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt16 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt16( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt16)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.h new file mode 100644 index 000000000..d727d3e1f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt16 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt16 +{ + uint16_t data; +} std_msgs__msg__UInt16; + +// Struct for a sequence of std_msgs__msg__UInt16. +typedef struct std_msgs__msg__UInt16__Sequence +{ + std_msgs__msg__UInt16 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt16__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.hpp new file mode 100644 index 000000000..deafd1568 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt16 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt16 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt16_ +{ + using Type = UInt16_; + + explicit UInt16_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit UInt16_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint16_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint16_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt16_ *; + using ConstRawPtr = + const std_msgs::msg::UInt16_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt16 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt16 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt16_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt16_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt16_ + +// alias to use template instance with default allocator +using UInt16 = + std_msgs::msg::UInt16_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__traits.hpp new file mode 100644 index 000000000..3a2bf1ccf --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int16__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt16 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt16 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt16 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt16 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt16 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt16"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt16"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.c new file mode 100644 index 000000000..e11a83fd8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int16__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int16__functions.h" +#include "std_msgs/msg/detail/u_int16__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_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; + std_msgs__msg__UInt16__init(message_memory); +} + +void std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_fini_function(void * message_memory) +{ + std_msgs__msg__UInt16__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt16, data), // 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 std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_members = { + "std_msgs__msg", // message namespace + "UInt16", // message name + 1, // number of fields + sizeof(std_msgs__msg__UInt16), + std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_member_array, // message members + std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_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 std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle = { + 0, + &std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt16)() { + if (!std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt16__rosidl_typesupport_introspection_c__UInt16_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.cpp new file mode 100644 index 000000000..49f77e0a5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt16.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 "std_msgs/msg/detail/u_int16__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt16_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt16(_init); +} + +void UInt16_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt16(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt16, data), // 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 UInt16_message_members = { + "std_msgs::msg", // message namespace + "UInt16", // message name + 1, // number of fields + sizeof(std_msgs::msg::UInt16), + UInt16_message_member_array, // message members + UInt16_init_function, // function to initialize message memory (memory has to be allocated) + UInt16_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt16_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt16_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16_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, std_msgs, msg, UInt16)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.hpp new file mode 100644 index 000000000..7a6096736 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt16.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt16 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__builder.hpp new file mode 100644 index 000000000..b5bd0f7f6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt16MultiArray_data +{ +public: + explicit Init_UInt16MultiArray_data(::std_msgs::msg::UInt16MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::UInt16MultiArray data(::std_msgs::msg::UInt16MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt16MultiArray msg_; +}; + +class Init_UInt16MultiArray_layout +{ +public: + Init_UInt16MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt16MultiArray_data layout(::std_msgs::msg::UInt16MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt16MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::UInt16MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt16MultiArray>() +{ + return std_msgs::msg::builder::Init_UInt16MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__functions.c new file mode 100644 index 000000000..ac68f17f5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int16_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__UInt16MultiArray__init(std_msgs__msg__UInt16MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__UInt16MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__init(&msg->data, 0)) { + std_msgs__msg__UInt16MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__UInt16MultiArray__fini(std_msgs__msg__UInt16MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint16__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__UInt16MultiArray__are_equal(const std_msgs__msg__UInt16MultiArray * lhs, const std_msgs__msg__UInt16MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt16MultiArray__copy( + const std_msgs__msg__UInt16MultiArray * input, + std_msgs__msg__UInt16MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint16__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__UInt16MultiArray * +std_msgs__msg__UInt16MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16MultiArray * msg = (std_msgs__msg__UInt16MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt16MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt16MultiArray)); + bool success = std_msgs__msg__UInt16MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt16MultiArray__destroy(std_msgs__msg__UInt16MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt16MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt16MultiArray__Sequence__init(std_msgs__msg__UInt16MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt16MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt16MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt16MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt16MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt16MultiArray__Sequence__fini(std_msgs__msg__UInt16MultiArray__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) { + std_msgs__msg__UInt16MultiArray__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); + } +} + +std_msgs__msg__UInt16MultiArray__Sequence * +std_msgs__msg__UInt16MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16MultiArray__Sequence * array = (std_msgs__msg__UInt16MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt16MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt16MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt16MultiArray__Sequence__destroy(std_msgs__msg__UInt16MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt16MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt16MultiArray__Sequence__are_equal(const std_msgs__msg__UInt16MultiArray__Sequence * lhs, const std_msgs__msg__UInt16MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt16MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt16MultiArray__Sequence__copy( + const std_msgs__msg__UInt16MultiArray__Sequence * input, + std_msgs__msg__UInt16MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt16MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt16MultiArray * data = + (std_msgs__msg__UInt16MultiArray *)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 (!std_msgs__msg__UInt16MultiArray__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; ) { + std_msgs__msg__UInt16MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt16MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..53bfd12a5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt16MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..b7f201a86 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int16_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt16MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt16MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt16MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt16MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt16MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.h new file mode 100644 index 000000000..86bb6a8bc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt16MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt16MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint16__Sequence data; +} std_msgs__msg__UInt16MultiArray; + +// Struct for a sequence of std_msgs__msg__UInt16MultiArray. +typedef struct std_msgs__msg__UInt16MultiArray__Sequence +{ + std_msgs__msg__UInt16MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt16MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.hpp new file mode 100644 index 000000000..1e9a60894 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt16MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt16MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt16MultiArray_ +{ + using Type = UInt16MultiArray_; + + explicit UInt16MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt16MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt16MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::UInt16MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt16MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt16MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt16MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt16MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt16MultiArray_ + +// alias to use template instance with default allocator +using UInt16MultiArray = + std_msgs::msg::UInt16MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__traits.hpp new file mode 100644 index 000000000..43b750f7a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt16MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt16MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt16MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt16MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt16MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt16MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.c new file mode 100644 index 000000000..fd0956eda --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int16_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int16_multi_array__functions.h" +#include "std_msgs/msg/detail/u_int16_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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; + std_msgs__msg__UInt16MultiArray__init(message_memory); +} + +void std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__UInt16MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__size_function__UInt16MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint16__Sequence * member = + (const rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint16__Sequence * member = + (const rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint16__Sequence * member = + (rosidl_runtime_c__uint16__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint16_t * item = + ((const uint16_t *) + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data(untyped_member, index)); + uint16_t * value = + (uint16_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint16_t * item = + ((uint16_t *) + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data(untyped_member, index)); + const uint16_t * value = + (const uint16_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt16MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint16__Sequence * member = + (rosidl_runtime_c__uint16__Sequence *)(untyped_member); + rosidl_runtime_c__uint16__Sequence__fini(member); + return rosidl_runtime_c__uint16__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__UInt16MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt16MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__size_function__UInt16MultiArray__data, // size() function pointer + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt16MultiArray__data, // get_const(index) function pointer + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__get_function__UInt16MultiArray__data, // get(index) function pointer + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt16MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt16MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt16MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members = { + "std_msgs__msg", // message namespace + "UInt16MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__UInt16MultiArray), + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array, // message members + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_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 std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt16MultiArray)() { + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt16MultiArray__rosidl_typesupport_introspection_c__UInt16MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp new file mode 100644 index 000000000..3b4c3dcbc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt16MultiArray.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 "std_msgs/msg/detail/u_int16_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt16MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt16MultiArray(_init); +} + +void UInt16MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt16MultiArray(); +} + +size_t size_function__UInt16MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt16MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt16MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt16MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt16MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt16MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt16MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt16MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt16MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt16MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt16MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt16MultiArray__data, // size() function pointer + get_const_function__UInt16MultiArray__data, // get_const(index) function pointer + get_function__UInt16MultiArray__data, // get(index) function pointer + fetch_function__UInt16MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt16MultiArray__data, // assign(index, value) function pointer + resize_function__UInt16MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt16MultiArray_message_members = { + "std_msgs::msg", // message namespace + "UInt16MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::UInt16MultiArray), + UInt16MultiArray_message_member_array, // message members + UInt16MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt16MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt16MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt16MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_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, std_msgs, msg, UInt16MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt16MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int16_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.hpp new file mode 100644 index 000000000..b6fc8dc70 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int16_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt16MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt16MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT16_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__builder.hpp new file mode 100644 index 000000000..b6541a379 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt32_data +{ +public: + Init_UInt32_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::UInt32 data(::std_msgs::msg::UInt32::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt32 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt32>() +{ + return std_msgs::msg::builder::Init_UInt32_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__functions.c new file mode 100644 index 000000000..84a5a9315 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int32__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__UInt32__init(std_msgs__msg__UInt32 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__UInt32__fini(std_msgs__msg__UInt32 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__UInt32__are_equal(const std_msgs__msg__UInt32 * lhs, const std_msgs__msg__UInt32 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt32__copy( + const std_msgs__msg__UInt32 * input, + std_msgs__msg__UInt32 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__UInt32 * +std_msgs__msg__UInt32__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32 * msg = (std_msgs__msg__UInt32 *)allocator.allocate(sizeof(std_msgs__msg__UInt32), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt32)); + bool success = std_msgs__msg__UInt32__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt32__destroy(std_msgs__msg__UInt32 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt32__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt32__Sequence__init(std_msgs__msg__UInt32__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32 * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt32 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt32), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt32__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt32__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt32__Sequence__fini(std_msgs__msg__UInt32__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) { + std_msgs__msg__UInt32__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); + } +} + +std_msgs__msg__UInt32__Sequence * +std_msgs__msg__UInt32__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32__Sequence * array = (std_msgs__msg__UInt32__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt32__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt32__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt32__Sequence__destroy(std_msgs__msg__UInt32__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt32__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt32__Sequence__are_equal(const std_msgs__msg__UInt32__Sequence * lhs, const std_msgs__msg__UInt32__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt32__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt32__Sequence__copy( + const std_msgs__msg__UInt32__Sequence * input, + std_msgs__msg__UInt32__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt32); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32 * data = + (std_msgs__msg__UInt32 *)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 (!std_msgs__msg__UInt32__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; ) { + std_msgs__msg__UInt32__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt32__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..828d13430 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt32( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..5bc664104 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int32__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt32 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt32 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt32 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt32( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt32)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.h new file mode 100644 index 000000000..bb95e6f24 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt32 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt32 +{ + uint32_t data; +} std_msgs__msg__UInt32; + +// Struct for a sequence of std_msgs__msg__UInt32. +typedef struct std_msgs__msg__UInt32__Sequence +{ + std_msgs__msg__UInt32 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt32__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.hpp new file mode 100644 index 000000000..b1123f6d7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt32 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt32 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt32_ +{ + using Type = UInt32_; + + explicit UInt32_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ul; + } + } + + explicit UInt32_(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->data = 0ul; + } + } + + // field types and members + using _data_type = + uint32_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint32_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt32_ *; + using ConstRawPtr = + const std_msgs::msg::UInt32_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt32 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt32 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt32_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt32_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt32_ + +// alias to use template instance with default allocator +using UInt32 = + std_msgs::msg::UInt32_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__traits.hpp new file mode 100644 index 000000000..3ddaa45e8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt32 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt32 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt32 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt32 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt32 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt32"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt32"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.c new file mode 100644 index 000000000..8b95bb493 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int32__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int32__functions.h" +#include "std_msgs/msg/detail/u_int32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_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; + std_msgs__msg__UInt32__init(message_memory); +} + +void std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_fini_function(void * message_memory) +{ + std_msgs__msg__UInt32__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt32, data), // 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 std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_members = { + "std_msgs__msg", // message namespace + "UInt32", // message name + 1, // number of fields + sizeof(std_msgs__msg__UInt32), + std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_member_array, // message members + std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_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 std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle = { + 0, + &std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt32)() { + if (!std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt32__rosidl_typesupport_introspection_c__UInt32_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.cpp new file mode 100644 index 000000000..1320ea8e6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt32.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 "std_msgs/msg/detail/u_int32__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt32_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt32(_init); +} + +void UInt32_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt32(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt32, data), // 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 UInt32_message_members = { + "std_msgs::msg", // message namespace + "UInt32", // message name + 1, // number of fields + sizeof(std_msgs::msg::UInt32), + UInt32_message_member_array, // message members + UInt32_init_function, // function to initialize message memory (memory has to be allocated) + UInt32_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt32_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt32_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32_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, std_msgs, msg, UInt32)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.hpp new file mode 100644 index 000000000..a5441ccb3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt32.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt32 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__builder.hpp new file mode 100644 index 000000000..37ce5310c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt32MultiArray_data +{ +public: + explicit Init_UInt32MultiArray_data(::std_msgs::msg::UInt32MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::UInt32MultiArray data(::std_msgs::msg::UInt32MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt32MultiArray msg_; +}; + +class Init_UInt32MultiArray_layout +{ +public: + Init_UInt32MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt32MultiArray_data layout(::std_msgs::msg::UInt32MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt32MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::UInt32MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt32MultiArray>() +{ + return std_msgs::msg::builder::Init_UInt32MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__functions.c new file mode 100644 index 000000000..202680ff8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int32_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__UInt32MultiArray__init(std_msgs__msg__UInt32MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__UInt32MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__init(&msg->data, 0)) { + std_msgs__msg__UInt32MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__UInt32MultiArray__fini(std_msgs__msg__UInt32MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint32__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__UInt32MultiArray__are_equal(const std_msgs__msg__UInt32MultiArray * lhs, const std_msgs__msg__UInt32MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt32MultiArray__copy( + const std_msgs__msg__UInt32MultiArray * input, + std_msgs__msg__UInt32MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint32__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__UInt32MultiArray * +std_msgs__msg__UInt32MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32MultiArray * msg = (std_msgs__msg__UInt32MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt32MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt32MultiArray)); + bool success = std_msgs__msg__UInt32MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt32MultiArray__destroy(std_msgs__msg__UInt32MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt32MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt32MultiArray__Sequence__init(std_msgs__msg__UInt32MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt32MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt32MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt32MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt32MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt32MultiArray__Sequence__fini(std_msgs__msg__UInt32MultiArray__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) { + std_msgs__msg__UInt32MultiArray__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); + } +} + +std_msgs__msg__UInt32MultiArray__Sequence * +std_msgs__msg__UInt32MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32MultiArray__Sequence * array = (std_msgs__msg__UInt32MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt32MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt32MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt32MultiArray__Sequence__destroy(std_msgs__msg__UInt32MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt32MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt32MultiArray__Sequence__are_equal(const std_msgs__msg__UInt32MultiArray__Sequence * lhs, const std_msgs__msg__UInt32MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt32MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt32MultiArray__Sequence__copy( + const std_msgs__msg__UInt32MultiArray__Sequence * input, + std_msgs__msg__UInt32MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt32MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt32MultiArray * data = + (std_msgs__msg__UInt32MultiArray *)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 (!std_msgs__msg__UInt32MultiArray__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; ) { + std_msgs__msg__UInt32MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt32MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..3bcb0c7ed --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt32MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ee3972d71 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt32MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt32MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt32MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt32MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt32MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.h new file mode 100644 index 000000000..72f634985 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt32MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt32MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint32__Sequence data; +} std_msgs__msg__UInt32MultiArray; + +// Struct for a sequence of std_msgs__msg__UInt32MultiArray. +typedef struct std_msgs__msg__UInt32MultiArray__Sequence +{ + std_msgs__msg__UInt32MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt32MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.hpp new file mode 100644 index 000000000..99a3eb3e3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt32MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt32MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt32MultiArray_ +{ + using Type = UInt32MultiArray_; + + explicit UInt32MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt32MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt32MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::UInt32MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt32MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt32MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt32MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt32MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt32MultiArray_ + +// alias to use template instance with default allocator +using UInt32MultiArray = + std_msgs::msg::UInt32MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__traits.hpp new file mode 100644 index 000000000..5a3250e8b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt32MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt32MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt32MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt32MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt32MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt32MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.c new file mode 100644 index 000000000..ec108f45d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int32_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int32_multi_array__functions.h" +#include "std_msgs/msg/detail/u_int32_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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; + std_msgs__msg__UInt32MultiArray__init(message_memory); +} + +void std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__UInt32MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__size_function__UInt32MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint32__Sequence * member = + (const rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint32_t * item = + ((const uint32_t *) + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data(untyped_member, index)); + uint32_t * value = + (uint32_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint32_t * item = + ((uint32_t *) + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data(untyped_member, index)); + const uint32_t * value = + (const uint32_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt32MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint32__Sequence * member = + (rosidl_runtime_c__uint32__Sequence *)(untyped_member); + rosidl_runtime_c__uint32__Sequence__fini(member); + return rosidl_runtime_c__uint32__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__UInt32MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt32MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__size_function__UInt32MultiArray__data, // size() function pointer + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt32MultiArray__data, // get_const(index) function pointer + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__get_function__UInt32MultiArray__data, // get(index) function pointer + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt32MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt32MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt32MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members = { + "std_msgs__msg", // message namespace + "UInt32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__UInt32MultiArray), + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array, // message members + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_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 std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt32MultiArray)() { + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt32MultiArray__rosidl_typesupport_introspection_c__UInt32MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp new file mode 100644 index 000000000..d48cff923 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt32MultiArray.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 "std_msgs/msg/detail/u_int32_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt32MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt32MultiArray(_init); +} + +void UInt32MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt32MultiArray(); +} + +size_t size_function__UInt32MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt32MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt32MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt32MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt32MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt32MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt32MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt32MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt32MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt32MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt32MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt32MultiArray__data, // size() function pointer + get_const_function__UInt32MultiArray__data, // get_const(index) function pointer + get_function__UInt32MultiArray__data, // get(index) function pointer + fetch_function__UInt32MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt32MultiArray__data, // assign(index, value) function pointer + resize_function__UInt32MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt32MultiArray_message_members = { + "std_msgs::msg", // message namespace + "UInt32MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::UInt32MultiArray), + UInt32MultiArray_message_member_array, // message members + UInt32MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt32MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt32MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt32MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_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, std_msgs, msg, UInt32MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt32MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int32_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.hpp new file mode 100644 index 000000000..9a225f24e --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int32_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt32MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt32MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT32_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__builder.hpp new file mode 100644 index 000000000..161391f7d --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int64__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt64_data +{ +public: + Init_UInt64_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::UInt64 data(::std_msgs::msg::UInt64::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt64 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt64>() +{ + return std_msgs::msg::builder::Init_UInt64_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__functions.c new file mode 100644 index 000000000..d5fabbea3 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int64__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__UInt64__init(std_msgs__msg__UInt64 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__UInt64__fini(std_msgs__msg__UInt64 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__UInt64__are_equal(const std_msgs__msg__UInt64 * lhs, const std_msgs__msg__UInt64 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt64__copy( + const std_msgs__msg__UInt64 * input, + std_msgs__msg__UInt64 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__UInt64 * +std_msgs__msg__UInt64__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64 * msg = (std_msgs__msg__UInt64 *)allocator.allocate(sizeof(std_msgs__msg__UInt64), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt64)); + bool success = std_msgs__msg__UInt64__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt64__destroy(std_msgs__msg__UInt64 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt64__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt64__Sequence__init(std_msgs__msg__UInt64__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64 * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt64 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt64), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt64__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt64__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt64__Sequence__fini(std_msgs__msg__UInt64__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) { + std_msgs__msg__UInt64__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); + } +} + +std_msgs__msg__UInt64__Sequence * +std_msgs__msg__UInt64__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64__Sequence * array = (std_msgs__msg__UInt64__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt64__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt64__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt64__Sequence__destroy(std_msgs__msg__UInt64__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt64__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt64__Sequence__are_equal(const std_msgs__msg__UInt64__Sequence * lhs, const std_msgs__msg__UInt64__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt64__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt64__Sequence__copy( + const std_msgs__msg__UInt64__Sequence * input, + std_msgs__msg__UInt64__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt64); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64 * data = + (std_msgs__msg__UInt64 *)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 (!std_msgs__msg__UInt64__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; ) { + std_msgs__msg__UInt64__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt64__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..cc3dd75d1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt64( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..868f6df04 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int64__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt64 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt64 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt64 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt64( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt64)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.h new file mode 100644 index 000000000..8be188dac --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt64 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt64 +{ + uint64_t data; +} std_msgs__msg__UInt64; + +// Struct for a sequence of std_msgs__msg__UInt64. +typedef struct std_msgs__msg__UInt64__Sequence +{ + std_msgs__msg__UInt64 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt64__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.hpp new file mode 100644 index 000000000..0079a24ce --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt64 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt64 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt64_ +{ + using Type = UInt64_; + + explicit UInt64_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0ull; + } + } + + explicit UInt64_(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->data = 0ull; + } + } + + // field types and members + using _data_type = + uint64_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint64_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt64_ *; + using ConstRawPtr = + const std_msgs::msg::UInt64_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt64 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt64 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt64_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt64_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt64_ + +// alias to use template instance with default allocator +using UInt64 = + std_msgs::msg::UInt64_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__traits.hpp new file mode 100644 index 000000000..9dbc323d4 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int64__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt64 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt64 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt64 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt64 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt64 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt64"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt64"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.c new file mode 100644 index 000000000..5394ddae6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int64__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int64__functions.h" +#include "std_msgs/msg/detail/u_int64__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_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; + std_msgs__msg__UInt64__init(message_memory); +} + +void std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_fini_function(void * message_memory) +{ + std_msgs__msg__UInt64__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt64, data), // 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 std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_members = { + "std_msgs__msg", // message namespace + "UInt64", // message name + 1, // number of fields + sizeof(std_msgs__msg__UInt64), + std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_member_array, // message members + std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_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 std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle = { + 0, + &std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt64)() { + if (!std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt64__rosidl_typesupport_introspection_c__UInt64_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.cpp new file mode 100644 index 000000000..d59d35ab7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt64.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 "std_msgs/msg/detail/u_int64__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt64_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt64(_init); +} + +void UInt64_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt64(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt64, data), // 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 UInt64_message_members = { + "std_msgs::msg", // message namespace + "UInt64", // message name + 1, // number of fields + sizeof(std_msgs::msg::UInt64), + UInt64_message_member_array, // message members + UInt64_init_function, // function to initialize message memory (memory has to be allocated) + UInt64_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt64_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt64_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64_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, std_msgs, msg, UInt64)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.hpp new file mode 100644 index 000000000..d485e46e2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt64.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt64 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__builder.hpp new file mode 100644 index 000000000..b82ece739 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt64MultiArray_data +{ +public: + explicit Init_UInt64MultiArray_data(::std_msgs::msg::UInt64MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::UInt64MultiArray data(::std_msgs::msg::UInt64MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt64MultiArray msg_; +}; + +class Init_UInt64MultiArray_layout +{ +public: + Init_UInt64MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt64MultiArray_data layout(::std_msgs::msg::UInt64MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt64MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::UInt64MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt64MultiArray>() +{ + return std_msgs::msg::builder::Init_UInt64MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__functions.c new file mode 100644 index 000000000..2f75a1c5a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int64_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__UInt64MultiArray__init(std_msgs__msg__UInt64MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__UInt64MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__init(&msg->data, 0)) { + std_msgs__msg__UInt64MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__UInt64MultiArray__fini(std_msgs__msg__UInt64MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint64__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__UInt64MultiArray__are_equal(const std_msgs__msg__UInt64MultiArray * lhs, const std_msgs__msg__UInt64MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt64MultiArray__copy( + const std_msgs__msg__UInt64MultiArray * input, + std_msgs__msg__UInt64MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint64__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__UInt64MultiArray * +std_msgs__msg__UInt64MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64MultiArray * msg = (std_msgs__msg__UInt64MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt64MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt64MultiArray)); + bool success = std_msgs__msg__UInt64MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt64MultiArray__destroy(std_msgs__msg__UInt64MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt64MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt64MultiArray__Sequence__init(std_msgs__msg__UInt64MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt64MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt64MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt64MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt64MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt64MultiArray__Sequence__fini(std_msgs__msg__UInt64MultiArray__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) { + std_msgs__msg__UInt64MultiArray__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); + } +} + +std_msgs__msg__UInt64MultiArray__Sequence * +std_msgs__msg__UInt64MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64MultiArray__Sequence * array = (std_msgs__msg__UInt64MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt64MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt64MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt64MultiArray__Sequence__destroy(std_msgs__msg__UInt64MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt64MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt64MultiArray__Sequence__are_equal(const std_msgs__msg__UInt64MultiArray__Sequence * lhs, const std_msgs__msg__UInt64MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt64MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt64MultiArray__Sequence__copy( + const std_msgs__msg__UInt64MultiArray__Sequence * input, + std_msgs__msg__UInt64MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt64MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt64MultiArray * data = + (std_msgs__msg__UInt64MultiArray *)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 (!std_msgs__msg__UInt64MultiArray__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; ) { + std_msgs__msg__UInt64MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt64MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..c9d7506fc --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt64MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..79d7399e6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt64MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt64MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt64MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt64MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt64MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.h new file mode 100644 index 000000000..9c2fc89f5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt64MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt64MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint64__Sequence data; +} std_msgs__msg__UInt64MultiArray; + +// Struct for a sequence of std_msgs__msg__UInt64MultiArray. +typedef struct std_msgs__msg__UInt64MultiArray__Sequence +{ + std_msgs__msg__UInt64MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt64MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.hpp new file mode 100644 index 000000000..9a59b1062 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt64MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt64MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt64MultiArray_ +{ + using Type = UInt64MultiArray_; + + explicit UInt64MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt64MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt64MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::UInt64MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt64MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt64MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt64MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt64MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt64MultiArray_ + +// alias to use template instance with default allocator +using UInt64MultiArray = + std_msgs::msg::UInt64MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__traits.hpp new file mode 100644 index 000000000..7295e77b2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt64MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt64MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt64MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt64MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt64MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt64MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.c new file mode 100644 index 000000000..49e8507df --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int64_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int64_multi_array__functions.h" +#include "std_msgs/msg/detail/u_int64_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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; + std_msgs__msg__UInt64MultiArray__init(message_memory); +} + +void std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__UInt64MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__size_function__UInt64MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint64__Sequence * member = + (const rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint64__Sequence * member = + (const rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint64__Sequence * member = + (rosidl_runtime_c__uint64__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint64_t * item = + ((const uint64_t *) + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data(untyped_member, index)); + uint64_t * value = + (uint64_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint64_t * item = + ((uint64_t *) + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data(untyped_member, index)); + const uint64_t * value = + (const uint64_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt64MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint64__Sequence * member = + (rosidl_runtime_c__uint64__Sequence *)(untyped_member); + rosidl_runtime_c__uint64__Sequence__fini(member); + return rosidl_runtime_c__uint64__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__UInt64MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt64MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__size_function__UInt64MultiArray__data, // size() function pointer + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt64MultiArray__data, // get_const(index) function pointer + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__get_function__UInt64MultiArray__data, // get(index) function pointer + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt64MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt64MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt64MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members = { + "std_msgs__msg", // message namespace + "UInt64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__UInt64MultiArray), + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array, // message members + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_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 std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt64MultiArray)() { + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt64MultiArray__rosidl_typesupport_introspection_c__UInt64MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp new file mode 100644 index 000000000..cef8f9244 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt64MultiArray.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 "std_msgs/msg/detail/u_int64_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt64MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt64MultiArray(_init); +} + +void UInt64MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt64MultiArray(); +} + +size_t size_function__UInt64MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt64MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt64MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt64MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt64MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt64MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt64MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt64MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt64MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt64MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt64MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt64MultiArray__data, // size() function pointer + get_const_function__UInt64MultiArray__data, // get_const(index) function pointer + get_function__UInt64MultiArray__data, // get(index) function pointer + fetch_function__UInt64MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt64MultiArray__data, // assign(index, value) function pointer + resize_function__UInt64MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt64MultiArray_message_members = { + "std_msgs::msg", // message namespace + "UInt64MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::UInt64MultiArray), + UInt64MultiArray_message_member_array, // message members + UInt64MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt64MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt64MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt64MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_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, std_msgs, msg, UInt64MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt64MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int64_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.hpp new file mode 100644 index 000000000..e9f3a7961 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int64_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt64MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt64MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT64_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__builder.hpp new file mode 100644 index 000000000..2932efcdf --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__builder.hpp @@ -0,0 +1,56 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int8__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt8_data +{ +public: + Init_UInt8_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_msgs::msg::UInt8 data(::std_msgs::msg::UInt8::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt8 msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt8>() +{ + return std_msgs::msg::builder::Init_UInt8_data(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__functions.c new file mode 100644 index 000000000..450a414e5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__functions.c @@ -0,0 +1,236 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int8__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +std_msgs__msg__UInt8__init(std_msgs__msg__UInt8 * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_msgs__msg__UInt8__fini(std_msgs__msg__UInt8 * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_msgs__msg__UInt8__are_equal(const std_msgs__msg__UInt8 * lhs, const std_msgs__msg__UInt8 * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt8__copy( + const std_msgs__msg__UInt8 * input, + std_msgs__msg__UInt8 * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_msgs__msg__UInt8 * +std_msgs__msg__UInt8__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8 * msg = (std_msgs__msg__UInt8 *)allocator.allocate(sizeof(std_msgs__msg__UInt8), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt8)); + bool success = std_msgs__msg__UInt8__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt8__destroy(std_msgs__msg__UInt8 * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt8__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt8__Sequence__init(std_msgs__msg__UInt8__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8 * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt8 *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt8), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt8__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt8__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt8__Sequence__fini(std_msgs__msg__UInt8__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) { + std_msgs__msg__UInt8__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); + } +} + +std_msgs__msg__UInt8__Sequence * +std_msgs__msg__UInt8__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8__Sequence * array = (std_msgs__msg__UInt8__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt8__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt8__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt8__Sequence__destroy(std_msgs__msg__UInt8__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt8__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt8__Sequence__are_equal(const std_msgs__msg__UInt8__Sequence * lhs, const std_msgs__msg__UInt8__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt8__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt8__Sequence__copy( + const std_msgs__msg__UInt8__Sequence * input, + std_msgs__msg__UInt8__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt8); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8 * data = + (std_msgs__msg__UInt8 *)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 (!std_msgs__msg__UInt8__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; ) { + std_msgs__msg__UInt8__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt8__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..ad9322407 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt8( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt8)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..beb0b2499 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int8__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt8 & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt8 & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt8 & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt8( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt8)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.h new file mode 100644 index 000000000..09c297370 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UInt8 in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt8 +{ + uint8_t data; +} std_msgs__msg__UInt8; + +// Struct for a sequence of std_msgs__msg__UInt8. +typedef struct std_msgs__msg__UInt8__Sequence +{ + std_msgs__msg__UInt8 * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt8__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.hpp new file mode 100644 index 000000000..371441e89 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__struct.hpp @@ -0,0 +1,131 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt8 __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt8 __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt8_ +{ + using Type = UInt8_; + + explicit UInt8_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = 0; + } + } + + explicit UInt8_(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->data = 0; + } + } + + // field types and members + using _data_type = + uint8_t; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const uint8_t & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt8_ *; + using ConstRawPtr = + const std_msgs::msg::UInt8_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt8 + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt8 + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt8_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt8_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt8_ + +// alias to use template instance with default allocator +using UInt8 = + std_msgs::msg::UInt8_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__traits.hpp new file mode 100644 index 000000000..057711913 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__traits.hpp @@ -0,0 +1,109 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int8__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt8 & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt8 & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt8 & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt8 & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt8 & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt8"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt8"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.c new file mode 100644 index 000000000..e461054ac --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.c @@ -0,0 +1,83 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int8__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int8__functions.h" +#include "std_msgs/msg/detail/u_int8__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_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; + std_msgs__msg__UInt8__init(message_memory); +} + +void std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_fini_function(void * message_memory) +{ + std_msgs__msg__UInt8__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt8, data), // 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 std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_members = { + "std_msgs__msg", // message namespace + "UInt8", // message name + 1, // number of fields + sizeof(std_msgs__msg__UInt8), + std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_member_array, // message members + std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_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 std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle = { + 0, + &std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt8)() { + if (!std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt8__rosidl_typesupport_introspection_c__UInt8_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.cpp new file mode 100644 index 000000000..596dab34f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.cpp @@ -0,0 +1,109 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt8.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 "std_msgs/msg/detail/u_int8__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt8_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt8(_init); +} + +void UInt8_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt8(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt8, data), // 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 UInt8_message_members = { + "std_msgs::msg", // message namespace + "UInt8", // message name + 1, // number of fields + sizeof(std_msgs::msg::UInt8), + UInt8_message_member_array, // message members + UInt8_init_function, // function to initialize message memory (memory has to be allocated) + UInt8_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt8_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt8_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8_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, std_msgs, msg, UInt8)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.hpp new file mode 100644 index 000000000..aece7c687 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt8.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt8 +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__builder.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__builder.hpp new file mode 100644 index 000000000..925f1d6c0 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ + +#include +#include + +#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UInt8MultiArray_data +{ +public: + explicit Init_UInt8MultiArray_data(::std_msgs::msg::UInt8MultiArray & msg) + : msg_(msg) + {} + ::std_msgs::msg::UInt8MultiArray data(::std_msgs::msg::UInt8MultiArray::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_msgs::msg::UInt8MultiArray msg_; +}; + +class Init_UInt8MultiArray_layout +{ +public: + Init_UInt8MultiArray_layout() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UInt8MultiArray_data layout(::std_msgs::msg::UInt8MultiArray::_layout_type arg) + { + msg_.layout = std::move(arg); + return Init_UInt8MultiArray_data(msg_); + } + +private: + ::std_msgs::msg::UInt8MultiArray msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::std_msgs::msg::UInt8MultiArray>() +{ + return std_msgs::msg::builder::Init_UInt8MultiArray_layout(); +} + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__functions.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__functions.c new file mode 100644 index 000000000..c53e56690 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice +#include "std_msgs/msg/detail/u_int8_multi_array__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +std_msgs__msg__UInt8MultiArray__init(std_msgs__msg__UInt8MultiArray * msg) +{ + if (!msg) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__init(&msg->layout)) { + std_msgs__msg__UInt8MultiArray__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { + std_msgs__msg__UInt8MultiArray__fini(msg); + return false; + } + return true; +} + +void +std_msgs__msg__UInt8MultiArray__fini(std_msgs__msg__UInt8MultiArray * msg) +{ + if (!msg) { + return; + } + // layout + std_msgs__msg__MultiArrayLayout__fini(&msg->layout); + // data + rosidl_runtime_c__uint8__Sequence__fini(&msg->data); +} + +bool +std_msgs__msg__UInt8MultiArray__are_equal(const std_msgs__msg__UInt8MultiArray * lhs, const std_msgs__msg__UInt8MultiArray * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__are_equal( + &(lhs->layout), &(rhs->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +std_msgs__msg__UInt8MultiArray__copy( + const std_msgs__msg__UInt8MultiArray * input, + std_msgs__msg__UInt8MultiArray * output) +{ + if (!input || !output) { + return false; + } + // layout + if (!std_msgs__msg__MultiArrayLayout__copy( + &(input->layout), &(output->layout))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +std_msgs__msg__UInt8MultiArray * +std_msgs__msg__UInt8MultiArray__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8MultiArray * msg = (std_msgs__msg__UInt8MultiArray *)allocator.allocate(sizeof(std_msgs__msg__UInt8MultiArray), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_msgs__msg__UInt8MultiArray)); + bool success = std_msgs__msg__UInt8MultiArray__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_msgs__msg__UInt8MultiArray__destroy(std_msgs__msg__UInt8MultiArray * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_msgs__msg__UInt8MultiArray__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_msgs__msg__UInt8MultiArray__Sequence__init(std_msgs__msg__UInt8MultiArray__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8MultiArray * data = NULL; + + if (size) { + data = (std_msgs__msg__UInt8MultiArray *)allocator.zero_allocate(size, sizeof(std_msgs__msg__UInt8MultiArray), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_msgs__msg__UInt8MultiArray__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_msgs__msg__UInt8MultiArray__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_msgs__msg__UInt8MultiArray__Sequence__fini(std_msgs__msg__UInt8MultiArray__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) { + std_msgs__msg__UInt8MultiArray__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); + } +} + +std_msgs__msg__UInt8MultiArray__Sequence * +std_msgs__msg__UInt8MultiArray__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8MultiArray__Sequence * array = (std_msgs__msg__UInt8MultiArray__Sequence *)allocator.allocate(sizeof(std_msgs__msg__UInt8MultiArray__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_msgs__msg__UInt8MultiArray__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_msgs__msg__UInt8MultiArray__Sequence__destroy(std_msgs__msg__UInt8MultiArray__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_msgs__msg__UInt8MultiArray__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_msgs__msg__UInt8MultiArray__Sequence__are_equal(const std_msgs__msg__UInt8MultiArray__Sequence * lhs, const std_msgs__msg__UInt8MultiArray__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!std_msgs__msg__UInt8MultiArray__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_msgs__msg__UInt8MultiArray__Sequence__copy( + const std_msgs__msg__UInt8MultiArray__Sequence * input, + std_msgs__msg__UInt8MultiArray__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_msgs__msg__UInt8MultiArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_msgs__msg__UInt8MultiArray * data = + (std_msgs__msg__UInt8MultiArray *)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 (!std_msgs__msg__UInt8MultiArray__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; ) { + std_msgs__msg__UInt8MultiArray__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!std_msgs__msg__UInt8MultiArray__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__functions.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__functions.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__functions.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__functions.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..0048c62b2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t get_serialized_size_std_msgs__msg__UInt8MultiArray( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +size_t max_serialized_size_std_msgs__msg__UInt8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_msgs, msg, UInt8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ba359b241 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_msgs/msg/detail/u_int8_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_serialize( + const std_msgs::msg::UInt8MultiArray & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_msgs::msg::UInt8MultiArray & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +get_serialized_size( + const std_msgs::msg::UInt8MultiArray & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +max_serialized_size_UInt8MultiArray( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace std_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_msgs, msg, UInt8MultiArray)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.h new file mode 100644 index 000000000..80cdda7c1 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/UInt8MultiArray in the package std_msgs. +/** + * This was originally provided as an example message. + * It is deprecated as of Foxy + * It is recommended to create your own semantically meaningful message. + * However if you would like to continue using this please use the equivalent in example_msgs. + */ +typedef struct std_msgs__msg__UInt8MultiArray +{ + /// Please look at the MultiArrayLayout message definition for + /// documentation on all multiarrays. + /// specification of data layout + std_msgs__msg__MultiArrayLayout layout; + /// array of data + rosidl_runtime_c__uint8__Sequence data; +} std_msgs__msg__UInt8MultiArray; + +// Struct for a sequence of std_msgs__msg__UInt8MultiArray. +typedef struct std_msgs__msg__UInt8MultiArray__Sequence +{ + std_msgs__msg__UInt8MultiArray * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_msgs__msg__UInt8MultiArray__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.hpp new file mode 100644 index 000000000..7177a7039 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__struct.hpp @@ -0,0 +1,140 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__std_msgs__msg__UInt8MultiArray __attribute__((deprecated)) +#else +# define DEPRECATED__std_msgs__msg__UInt8MultiArray __declspec(deprecated) +#endif + +namespace std_msgs +{ + +namespace msg +{ + +// message struct +template +struct UInt8MultiArray_ +{ + using Type = UInt8MultiArray_; + + explicit UInt8MultiArray_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_init) + { + (void)_init; + } + + explicit UInt8MultiArray_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : layout(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _layout_type = + std_msgs::msg::MultiArrayLayout_; + _layout_type layout; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__layout( + const std_msgs::msg::MultiArrayLayout_ & _arg) + { + this->layout = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_msgs::msg::UInt8MultiArray_ *; + using ConstRawPtr = + const std_msgs::msg::UInt8MultiArray_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_msgs__msg__UInt8MultiArray + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_msgs__msg__UInt8MultiArray + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UInt8MultiArray_ & other) const + { + if (this->layout != other.layout) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const UInt8MultiArray_ & other) const + { + return !this->operator==(other); + } +}; // struct UInt8MultiArray_ + +// alias to use template instance with default allocator +using UInt8MultiArray = + std_msgs::msg::UInt8MultiArray_>; + +// constant definitions + +} // namespace msg + +} // namespace std_msgs + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__traits.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__traits.hpp new file mode 100644 index 000000000..98fda9f35 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__traits.hpp @@ -0,0 +1,150 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'layout' +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" + +namespace std_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UInt8MultiArray & msg, + std::ostream & out) +{ + out << "{"; + // member: layout + { + out << "layout: "; + to_flow_style_yaml(msg.layout, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UInt8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: layout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "layout:\n"; + to_block_style_yaml(msg.layout, out, indentation + 2); + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UInt8MultiArray & 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 std_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_msgs::msg::UInt8MultiArray & msg, + std::ostream & out, size_t indentation = 0) +{ + std_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const std_msgs::msg::UInt8MultiArray & msg) +{ + return std_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_msgs::msg::UInt8MultiArray"; +} + +template<> +inline const char * name() +{ + return "std_msgs/msg/UInt8MultiArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.c b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.c new file mode 100644 index 000000000..4eb26b17f --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.c @@ -0,0 +1,165 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#include +#include "std_msgs/msg/detail/u_int8_multi_array__rosidl_typesupport_introspection_c.h" +#include "std_msgs/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 "std_msgs/msg/detail/u_int8_multi_array__functions.h" +#include "std_msgs/msg/detail/u_int8_multi_array__struct.h" + + +// Include directives for member types +// Member `layout` +#include "std_msgs/msg/multi_array_layout.h" +// Member `layout` +#include "std_msgs/msg/detail/multi_array_layout__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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; + std_msgs__msg__UInt8MultiArray__init(message_memory); +} + +void std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_fini_function(void * message_memory) +{ + std_msgs__msg__UInt8MultiArray__fini(message_memory); +} + +size_t std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__size_function__UInt8MultiArray__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt8MultiArray__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[2] = { + { + "layout", // 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(std_msgs__msg__UInt8MultiArray, layout), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs__msg__UInt8MultiArray, data), // bytes offset in struct + NULL, // default value + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__size_function__UInt8MultiArray__data, // size() function pointer + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_const_function__UInt8MultiArray__data, // get_const(index) function pointer + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__get_function__UInt8MultiArray__data, // get(index) function pointer + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__fetch_function__UInt8MultiArray__data, // fetch(index, &value) function pointer + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__assign_function__UInt8MultiArray__data, // assign(index, value) function pointer + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__resize_function__UInt8MultiArray__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members = { + "std_msgs__msg", // message namespace + "UInt8MultiArray", // message name + 2, // number of fields + sizeof(std_msgs__msg__UInt8MultiArray), + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array, // message members + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_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 std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle = { + 0, + &std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, UInt8MultiArray)() { + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, MultiArrayLayout)(); + if (!std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier) { + std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_msgs__msg__UInt8MultiArray__rosidl_typesupport_introspection_c__UInt8MultiArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp new file mode 100644 index 000000000..e57c4a764 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_msgs:msg/UInt8MultiArray.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 "std_msgs/msg/detail/u_int8_multi_array__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 std_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UInt8MultiArray_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_msgs::msg::UInt8MultiArray(_init); +} + +void UInt8MultiArray_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UInt8MultiArray(); +} + +size_t size_function__UInt8MultiArray__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__UInt8MultiArray__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UInt8MultiArray__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__UInt8MultiArray__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UInt8MultiArray__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UInt8MultiArray__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UInt8MultiArray__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__UInt8MultiArray__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UInt8MultiArray_message_member_array[2] = { + { + "layout", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt8MultiArray, layout), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(std_msgs::msg::UInt8MultiArray, data), // bytes offset in struct + nullptr, // default value + size_function__UInt8MultiArray__data, // size() function pointer + get_const_function__UInt8MultiArray__data, // get_const(index) function pointer + get_function__UInt8MultiArray__data, // get(index) function pointer + fetch_function__UInt8MultiArray__data, // fetch(index, &value) function pointer + assign_function__UInt8MultiArray__data, // assign(index, value) function pointer + resize_function__UInt8MultiArray__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UInt8MultiArray_message_members = { + "std_msgs::msg", // message namespace + "UInt8MultiArray", // message name + 2, // number of fields + sizeof(std_msgs::msg::UInt8MultiArray), + UInt8MultiArray_message_member_array, // message members + UInt8MultiArray_init_function, // function to initialize message memory (memory has to be allocated) + UInt8MultiArray_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UInt8MultiArray_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UInt8MultiArray_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace std_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_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, std_msgs, msg, UInt8MultiArray)() { + return &::std_msgs::msg::rosidl_typesupport_introspection_cpp::UInt8MultiArray_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/detail/u_int8_multi_array__type_support.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.hpp new file mode 100644 index 000000000..de27fc622 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/detail/u_int8_multi_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_msgs:msg/UInt8MultiArray.idl +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ +#define STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_msgs/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_std_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_msgs, + msg, + UInt8MultiArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__DETAIL__U_INT8_MULTI_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/empty.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/empty.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/empty.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/empty.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/empty.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/empty.hpp new file mode 100644 index 000000000..5a1102578 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/empty.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__EMPTY_HPP_ +#define STD_MSGS__MSG__EMPTY_HPP_ + +#include "std_msgs/msg/detail/empty__struct.hpp" +#include "std_msgs/msg/detail/empty__builder.hpp" +#include "std_msgs/msg/detail/empty__traits.hpp" +#include "std_msgs/msg/detail/empty__type_support.hpp" + +#endif // STD_MSGS__MSG__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float32.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/float32.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/float32.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32.hpp new file mode 100644 index 000000000..a74f9dc26 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__FLOAT32_HPP_ +#define STD_MSGS__MSG__FLOAT32_HPP_ + +#include "std_msgs/msg/detail/float32__struct.hpp" +#include "std_msgs/msg/detail/float32__builder.hpp" +#include "std_msgs/msg/detail/float32__traits.hpp" +#include "std_msgs/msg/detail/float32__type_support.hpp" + +#endif // STD_MSGS__MSG__FLOAT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float32_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/float32_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/float32_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32_multi_array.hpp new file mode 100644 index 000000000..a5c092eb0 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/float32_multi_array__struct.hpp" +#include "std_msgs/msg/detail/float32_multi_array__builder.hpp" +#include "std_msgs/msg/detail/float32_multi_array__traits.hpp" +#include "std_msgs/msg/detail/float32_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__FLOAT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float64.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/float64.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/float64.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64.hpp new file mode 100644 index 000000000..2f9673e3b --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__FLOAT64_HPP_ +#define STD_MSGS__MSG__FLOAT64_HPP_ + +#include "std_msgs/msg/detail/float64__struct.hpp" +#include "std_msgs/msg/detail/float64__builder.hpp" +#include "std_msgs/msg/detail/float64__traits.hpp" +#include "std_msgs/msg/detail/float64__type_support.hpp" + +#endif // STD_MSGS__MSG__FLOAT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/float64_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/float64_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/float64_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64_multi_array.hpp new file mode 100644 index 000000000..56fb37994 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/float64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/float64_multi_array__struct.hpp" +#include "std_msgs/msg/detail/float64_multi_array__builder.hpp" +#include "std_msgs/msg/detail/float64_multi_array__traits.hpp" +#include "std_msgs/msg/detail/float64_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__FLOAT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/header.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/header.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/header.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/header.h diff --git a/ThirdParty/ros/include/std_msgs/msg/header.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/header.hpp similarity index 87% rename from ThirdParty/ros/include/std_msgs/msg/header.hpp rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/header.hpp index 46940e01b..582539a38 100644 --- a/ThirdParty/ros/include/std_msgs/msg/header.hpp +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/header.hpp @@ -7,5 +7,6 @@ #include "std_msgs/msg/detail/header__struct.hpp" #include "std_msgs/msg/detail/header__builder.hpp" #include "std_msgs/msg/detail/header__traits.hpp" +#include "std_msgs/msg/detail/header__type_support.hpp" #endif // STD_MSGS__MSG__HEADER_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int16.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int16.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int16.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16.hpp new file mode 100644 index 000000000..e9fb4bbde --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT16_HPP_ +#define STD_MSGS__MSG__INT16_HPP_ + +#include "std_msgs/msg/detail/int16__struct.hpp" +#include "std_msgs/msg/detail/int16__builder.hpp" +#include "std_msgs/msg/detail/int16__traits.hpp" +#include "std_msgs/msg/detail/int16__type_support.hpp" + +#endif // STD_MSGS__MSG__INT16_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int16_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int16_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int16_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16_multi_array.hpp new file mode 100644 index 000000000..43148d9e7 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int16_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/int16_multi_array__struct.hpp" +#include "std_msgs/msg/detail/int16_multi_array__builder.hpp" +#include "std_msgs/msg/detail/int16_multi_array__traits.hpp" +#include "std_msgs/msg/detail/int16_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int32.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int32.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int32.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32.hpp new file mode 100644 index 000000000..88c270fad --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT32_HPP_ +#define STD_MSGS__MSG__INT32_HPP_ + +#include "std_msgs/msg/detail/int32__struct.hpp" +#include "std_msgs/msg/detail/int32__builder.hpp" +#include "std_msgs/msg/detail/int32__traits.hpp" +#include "std_msgs/msg/detail/int32__type_support.hpp" + +#endif // STD_MSGS__MSG__INT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int32_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int32_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int32_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32_multi_array.hpp new file mode 100644 index 000000000..8b6c90207 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/int32_multi_array__struct.hpp" +#include "std_msgs/msg/detail/int32_multi_array__builder.hpp" +#include "std_msgs/msg/detail/int32_multi_array__traits.hpp" +#include "std_msgs/msg/detail/int32_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int64.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int64.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int64.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64.hpp new file mode 100644 index 000000000..08e1fb294 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT64_HPP_ +#define STD_MSGS__MSG__INT64_HPP_ + +#include "std_msgs/msg/detail/int64__struct.hpp" +#include "std_msgs/msg/detail/int64__builder.hpp" +#include "std_msgs/msg/detail/int64__traits.hpp" +#include "std_msgs/msg/detail/int64__type_support.hpp" + +#endif // STD_MSGS__MSG__INT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int64_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int64_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int64_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64_multi_array.hpp new file mode 100644 index 000000000..db7fedb60 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/int64_multi_array__struct.hpp" +#include "std_msgs/msg/detail/int64_multi_array__builder.hpp" +#include "std_msgs/msg/detail/int64_multi_array__traits.hpp" +#include "std_msgs/msg/detail/int64_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int8.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int8.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int8.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8.hpp new file mode 100644 index 000000000..fb77fb14a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT8_HPP_ +#define STD_MSGS__MSG__INT8_HPP_ + +#include "std_msgs/msg/detail/int8__struct.hpp" +#include "std_msgs/msg/detail/int8__builder.hpp" +#include "std_msgs/msg/detail/int8__traits.hpp" +#include "std_msgs/msg/detail/int8__type_support.hpp" + +#endif // STD_MSGS__MSG__INT8_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/int8_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/int8_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/int8_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8_multi_array.hpp new file mode 100644 index 000000000..a733bc169 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/int8_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/int8_multi_array__struct.hpp" +#include "std_msgs/msg/detail/int8_multi_array__builder.hpp" +#include "std_msgs/msg/detail/int8_multi_array__traits.hpp" +#include "std_msgs/msg/detail/int8_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/multi_array_dimension.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_dimension.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/multi_array_dimension.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_dimension.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_dimension.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_dimension.hpp new file mode 100644 index 000000000..6d973cbb2 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_dimension.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ +#define STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ + +#include "std_msgs/msg/detail/multi_array_dimension__struct.hpp" +#include "std_msgs/msg/detail/multi_array_dimension__builder.hpp" +#include "std_msgs/msg/detail/multi_array_dimension__traits.hpp" +#include "std_msgs/msg/detail/multi_array_dimension__type_support.hpp" + +#endif // STD_MSGS__MSG__MULTI_ARRAY_DIMENSION_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/multi_array_layout.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_layout.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/multi_array_layout.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_layout.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_layout.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_layout.hpp new file mode 100644 index 000000000..ede4c22c4 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/multi_array_layout.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ +#define STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ + +#include "std_msgs/msg/detail/multi_array_layout__struct.hpp" +#include "std_msgs/msg/detail/multi_array_layout__builder.hpp" +#include "std_msgs/msg/detail/multi_array_layout__traits.hpp" +#include "std_msgs/msg/detail/multi_array_layout__type_support.hpp" + +#endif // STD_MSGS__MSG__MULTI_ARRAY_LAYOUT_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..6637d2700 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 STD_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define STD_MSGS__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_std_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_std_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_std_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_msgs ROSIDL_GENERATOR_CPP_EXPORT_std_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_msgs ROSIDL_GENERATOR_CPP_IMPORT_std_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_std_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // STD_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_msgs/msg/string.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/string.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/string.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/string.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/string.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/string.hpp new file mode 100644 index 000000000..6de71fd94 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/string.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__STRING_HPP_ +#define STD_MSGS__MSG__STRING_HPP_ + +#include "std_msgs/msg/detail/string__struct.hpp" +#include "std_msgs/msg/detail/string__builder.hpp" +#include "std_msgs/msg/detail/string__traits.hpp" +#include "std_msgs/msg/detail/string__type_support.hpp" + +#endif // STD_MSGS__MSG__STRING_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int16.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int16.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16.hpp new file mode 100644 index 000000000..d8f6a52c8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT16_HPP_ +#define STD_MSGS__MSG__U_INT16_HPP_ + +#include "std_msgs/msg/detail/u_int16__struct.hpp" +#include "std_msgs/msg/detail/u_int16__builder.hpp" +#include "std_msgs/msg/detail/u_int16__traits.hpp" +#include "std_msgs/msg/detail/u_int16__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT16_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int16_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int16_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16_multi_array.hpp new file mode 100644 index 000000000..58fb21ae6 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int16_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/u_int16_multi_array__struct.hpp" +#include "std_msgs/msg/detail/u_int16_multi_array__builder.hpp" +#include "std_msgs/msg/detail/u_int16_multi_array__traits.hpp" +#include "std_msgs/msg/detail/u_int16_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT16_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int32.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int32.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32.hpp new file mode 100644 index 000000000..cac9a08e5 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT32_HPP_ +#define STD_MSGS__MSG__U_INT32_HPP_ + +#include "std_msgs/msg/detail/u_int32__struct.hpp" +#include "std_msgs/msg/detail/u_int32__builder.hpp" +#include "std_msgs/msg/detail/u_int32__traits.hpp" +#include "std_msgs/msg/detail/u_int32__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT32_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int32_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int32_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32_multi_array.hpp new file mode 100644 index 000000000..13df5a6c8 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int32_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/u_int32_multi_array__struct.hpp" +#include "std_msgs/msg/detail/u_int32_multi_array__builder.hpp" +#include "std_msgs/msg/detail/u_int32_multi_array__traits.hpp" +#include "std_msgs/msg/detail/u_int32_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT32_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int64.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int64.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64.hpp new file mode 100644 index 000000000..a0fb4ea7a --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT64_HPP_ +#define STD_MSGS__MSG__U_INT64_HPP_ + +#include "std_msgs/msg/detail/u_int64__struct.hpp" +#include "std_msgs/msg/detail/u_int64__builder.hpp" +#include "std_msgs/msg/detail/u_int64__traits.hpp" +#include "std_msgs/msg/detail/u_int64__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT64_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int64_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int64_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64_multi_array.hpp new file mode 100644 index 000000000..56003dc3c --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int64_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/u_int64_multi_array__struct.hpp" +#include "std_msgs/msg/detail/u_int64_multi_array__builder.hpp" +#include "std_msgs/msg/detail/u_int64_multi_array__traits.hpp" +#include "std_msgs/msg/detail/u_int64_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT64_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int8.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int8.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8.hpp new file mode 100644 index 000000000..f4fef0701 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT8_HPP_ +#define STD_MSGS__MSG__U_INT8_HPP_ + +#include "std_msgs/msg/detail/u_int8__struct.hpp" +#include "std_msgs/msg/detail/u_int8__builder.hpp" +#include "std_msgs/msg/detail/u_int8__traits.hpp" +#include "std_msgs/msg/detail/u_int8__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT8_HPP_ diff --git a/ThirdParty/ros/include/std_msgs/msg/u_int8_multi_array.h b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8_multi_array.h similarity index 100% rename from ThirdParty/ros/include/std_msgs/msg/u_int8_multi_array.h rename to ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8_multi_array.h diff --git a/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8_multi_array.hpp b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8_multi_array.hpp new file mode 100644 index 000000000..1ac7be528 --- /dev/null +++ b/ThirdParty/ros/include/std_msgs/std_msgs/msg/u_int8_multi_array.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ +#define STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ + +#include "std_msgs/msg/detail/u_int8_multi_array__struct.hpp" +#include "std_msgs/msg/detail/u_int8_multi_array__builder.hpp" +#include "std_msgs/msg/detail/u_int8_multi_array__traits.hpp" +#include "std_msgs/msg/detail/u_int8_multi_array__type_support.hpp" + +#endif // STD_MSGS__MSG__U_INT8_MULTI_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__builder.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/empty__builder.hpp deleted file mode 100644 index ddb14178c..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__builder.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ -#define STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ - -#include "std_srvs/srv/detail/empty__struct.hpp" -#include -#include -#include - - -namespace std_srvs -{ - -namespace srv -{ - - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::Empty_Request>() -{ - return ::std_srvs::srv::Empty_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace std_srvs - - -namespace std_srvs -{ - -namespace srv -{ - - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::Empty_Response>() -{ - return ::std_srvs::srv::Empty_Response(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__functions.c b/ThirdParty/ros/include/std_srvs/srv/detail/empty__functions.c deleted file mode 100644 index 4bd708788..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__functions.c +++ /dev/null @@ -1,450 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice -#include "std_srvs/srv/detail/empty__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - -bool -std_srvs__srv__Empty_Request__init(std_srvs__srv__Empty_Request * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -std_srvs__srv__Empty_Request__fini(std_srvs__srv__Empty_Request * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -std_srvs__srv__Empty_Request__are_equal(const std_srvs__srv__Empty_Request * lhs, const std_srvs__srv__Empty_Request * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -std_srvs__srv__Empty_Request__copy( - const std_srvs__srv__Empty_Request * input, - std_srvs__srv__Empty_Request * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -std_srvs__srv__Empty_Request * -std_srvs__srv__Empty_Request__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Request * msg = (std_srvs__srv__Empty_Request *)allocator.allocate(sizeof(std_srvs__srv__Empty_Request), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__Empty_Request)); - bool success = std_srvs__srv__Empty_Request__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__Empty_Request__destroy(std_srvs__srv__Empty_Request * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__Empty_Request__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__Empty_Request__Sequence__init(std_srvs__srv__Empty_Request__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Request * data = NULL; - - if (size) { - data = (std_srvs__srv__Empty_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Empty_Request), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__Empty_Request__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__Empty_Request__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__Empty_Request__Sequence__fini(std_srvs__srv__Empty_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) { - std_srvs__srv__Empty_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); - } -} - -std_srvs__srv__Empty_Request__Sequence * -std_srvs__srv__Empty_Request__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Request__Sequence * array = (std_srvs__srv__Empty_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Empty_Request__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__Empty_Request__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__Empty_Request__Sequence__destroy(std_srvs__srv__Empty_Request__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__Empty_Request__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__Empty_Request__Sequence__are_equal(const std_srvs__srv__Empty_Request__Sequence * lhs, const std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__Empty_Request__Sequence__copy( - const std_srvs__srv__Empty_Request__Sequence * input, - std_srvs__srv__Empty_Request__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__Empty_Request); - std_srvs__srv__Empty_Request * data = - (std_srvs__srv__Empty_Request *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__Empty_Request__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__Empty_Request__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__Empty_Request__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} - - -bool -std_srvs__srv__Empty_Response__init(std_srvs__srv__Empty_Response * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -std_srvs__srv__Empty_Response__fini(std_srvs__srv__Empty_Response * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -std_srvs__srv__Empty_Response__are_equal(const std_srvs__srv__Empty_Response * lhs, const std_srvs__srv__Empty_Response * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -std_srvs__srv__Empty_Response__copy( - const std_srvs__srv__Empty_Response * input, - std_srvs__srv__Empty_Response * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -std_srvs__srv__Empty_Response * -std_srvs__srv__Empty_Response__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Response * msg = (std_srvs__srv__Empty_Response *)allocator.allocate(sizeof(std_srvs__srv__Empty_Response), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__Empty_Response)); - bool success = std_srvs__srv__Empty_Response__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__Empty_Response__destroy(std_srvs__srv__Empty_Response * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__Empty_Response__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__Empty_Response__Sequence__init(std_srvs__srv__Empty_Response__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Response * data = NULL; - - if (size) { - data = (std_srvs__srv__Empty_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Empty_Response), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__Empty_Response__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__Empty_Response__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__Empty_Response__Sequence__fini(std_srvs__srv__Empty_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) { - std_srvs__srv__Empty_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); - } -} - -std_srvs__srv__Empty_Response__Sequence * -std_srvs__srv__Empty_Response__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Empty_Response__Sequence * array = (std_srvs__srv__Empty_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Empty_Response__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__Empty_Response__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__Empty_Response__Sequence__destroy(std_srvs__srv__Empty_Response__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__Empty_Response__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__Empty_Response__Sequence__are_equal(const std_srvs__srv__Empty_Response__Sequence * lhs, const std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__Empty_Response__Sequence__copy( - const std_srvs__srv__Empty_Response__Sequence * input, - std_srvs__srv__Empty_Response__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__Empty_Response); - std_srvs__srv__Empty_Response * data = - (std_srvs__srv__Empty_Response *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__Empty_Response__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__Empty_Response__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__Empty_Response__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index 8df0a5c69..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__Empty_Request( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__Empty_Request( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty_Request)(); - -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__Empty_Response( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__Empty_Response( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 23c4562e4..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_srvs/srv/detail/empty__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::Empty_Request & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::Empty_Request & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::Empty_Request & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_Empty_Request( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/empty__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::Empty_Response & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::Empty_Response & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::Empty_Response & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_Empty_Response( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_service_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.h b/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.h deleted file mode 100644 index 8b52172fc..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.h +++ /dev/null @@ -1,59 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ -#define STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in srv/Empty in the package std_srvs. -typedef struct std_srvs__srv__Empty_Request -{ - uint8_t structure_needs_at_least_one_member; -} std_srvs__srv__Empty_Request; - -// Struct for a sequence of std_srvs__srv__Empty_Request. -typedef struct std_srvs__srv__Empty_Request__Sequence -{ - std_srvs__srv__Empty_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__Empty_Request__Sequence; - - -// Constants defined in the message - -// Struct defined in srv/Empty in the package std_srvs. -typedef struct std_srvs__srv__Empty_Response -{ - uint8_t structure_needs_at_least_one_member; -} std_srvs__srv__Empty_Response; - -// Struct for a sequence of std_srvs__srv__Empty_Response. -typedef struct std_srvs__srv__Empty_Response__Sequence -{ - std_srvs__srv__Empty_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__Empty_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.hpp deleted file mode 100644 index 9fdb5d237..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__struct.hpp +++ /dev/null @@ -1,246 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ -#define STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__Empty_Request __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__Empty_Request __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct Empty_Request_ -{ - using Type = Empty_Request_; - - explicit Empty_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->structure_needs_at_least_one_member = 0; - } - } - - explicit Empty_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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::Empty_Request_ *; - using ConstRawPtr = - const std_srvs::srv::Empty_Request_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__Empty_Request - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__Empty_Request - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Empty_Request_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Empty_Request_ & other) const - { - return !this->operator==(other); - } -}; // struct Empty_Request_ - -// alias to use template instance with default allocator -using Empty_Request = - std_srvs::srv::Empty_Request_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__Empty_Response __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__Empty_Response __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct Empty_Response_ -{ - using Type = Empty_Response_; - - explicit Empty_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->structure_needs_at_least_one_member = 0; - } - } - - explicit Empty_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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::Empty_Response_ *; - using ConstRawPtr = - const std_srvs::srv::Empty_Response_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__Empty_Response - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__Empty_Response - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Empty_Response_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Empty_Response_ & other) const - { - return !this->operator==(other); - } -}; // struct Empty_Response_ - -// alias to use template instance with default allocator -using Empty_Response = - std_srvs::srv::Empty_Response_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - -namespace std_srvs -{ - -namespace srv -{ - -struct Empty -{ - using Request = std_srvs::srv::Empty_Request; - using Response = std_srvs::srv::Empty_Response; -}; - -} // namespace srv - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__traits.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/empty__traits.hpp deleted file mode 100644 index 6b7471e78..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ -#define STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ - -#include "std_srvs/srv/detail/empty__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Empty_Request"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Empty_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Empty_Response"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Empty_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Empty"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Empty"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.c b/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.c deleted file mode 100644 index f6b6e9619..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.c +++ /dev/null @@ -1,224 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_srvs:srv/Empty.idl -// generated code does not contain a copyright notice - -#include -#include "std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h" -#include "std_srvs/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 "std_srvs/srv/detail/empty__functions.h" -#include "std_srvs/srv/detail/empty__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Empty_Request__rosidl_typesupport_introspection_c__Empty_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; - std_srvs__srv__Empty_Request__init(message_memory); -} - -void Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_fini_function(void * message_memory) -{ - std_srvs__srv__Empty_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__Empty_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_members = { - "std_srvs__srv", // message namespace - "Empty_Request", // message name - 1, // number of fields - sizeof(std_srvs__srv__Empty_Request), - Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_member_array, // message members - Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_init_function, // function to initialize message memory (memory has to be allocated) - Empty_Request__rosidl_typesupport_introspection_c__Empty_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 Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle = { - 0, - &Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Request)() { - if (!Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle.typesupport_identifier) { - Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h" -// already included above -// #include "std_srvs/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 "std_srvs/srv/detail/empty__functions.h" -// already included above -// #include "std_srvs/srv/detail/empty__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Empty_Response__rosidl_typesupport_introspection_c__Empty_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; - std_srvs__srv__Empty_Response__init(message_memory); -} - -void Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_fini_function(void * message_memory) -{ - std_srvs__srv__Empty_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__Empty_Response, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_members = { - "std_srvs__srv", // message namespace - "Empty_Response", // message name - 1, // number of fields - sizeof(std_srvs__srv__Empty_Response), - Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_member_array, // message members - Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_init_function, // function to initialize message memory (memory has to be allocated) - Empty_Response__rosidl_typesupport_introspection_c__Empty_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 Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle = { - 0, - &Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Response)() { - if (!Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle.typesupport_identifier) { - Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/empty__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 std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_members = { - "std_srvs__srv", // service namespace - "Empty", // service name - // these two fields are initialized below on the first access - NULL, // request message - // std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle, - NULL // response message - // std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle = { - 0, - &std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_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, std_srvs, srv, Empty_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty)() { - if (!std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle.typesupport_identifier) { - std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_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, std_srvs, srv, Empty_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, std_srvs, srv, Empty_Response)()->data; - } - - return &std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.cpp b/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.cpp deleted file mode 100644 index d855cd569..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.cpp +++ /dev/null @@ -1,332 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_srvs:srv/Empty.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 "std_srvs/srv/detail/empty__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Empty_Request_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::Empty_Request(_init); -} - -void Empty_Request_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Empty_Request(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::Empty_Request, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Empty_Request_message_members = { - "std_srvs::srv", // message namespace - "Empty_Request", // message name - 1, // number of fields - sizeof(std_srvs::srv::Empty_Request), - Empty_Request_message_member_array, // message members - Empty_Request_init_function, // function to initialize message memory (memory has to be allocated) - Empty_Request_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Empty_Request_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Empty_Request_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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, std_srvs, srv, Empty_Request)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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 "std_srvs/srv/detail/empty__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Empty_Response_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::Empty_Response(_init); -} - -void Empty_Response_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Empty_Response(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_Response_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::Empty_Response, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Empty_Response_message_members = { - "std_srvs::srv", // message namespace - "Empty_Response", // message name - 1, // number of fields - sizeof(std_srvs::srv::Empty_Response), - Empty_Response_message_member_array, // message members - Empty_Response_init_function, // function to initialize message memory (memory has to be allocated) - Empty_Response_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Empty_Response_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Empty_Response_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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, std_srvs, srv, Empty_Response)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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 "std_srvs/srv/detail/empty__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 std_srvs -{ - -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 Empty_service_members = { - "std_srvs::srv", // service namespace - "Empty", // service name - // these two fields are initialized below on the first access - // see get_service_type_support_handle() - nullptr, // request message - nullptr // response message -}; - -static const rosidl_service_type_support_t Empty_service_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Empty_service_members, - get_service_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_service_type_support_t * -get_service_type_support_handle() -{ - // get a handle to the value to be returned - auto service_type_support = - &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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( - 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< - ::std_srvs::srv::Empty_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< - ::std_srvs::srv::Empty_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, std_srvs, srv, Empty)() { - return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__builder.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__builder.hpp deleted file mode 100644 index b2b9903ed..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__builder.hpp +++ /dev/null @@ -1,113 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ - -#include "std_srvs/srv/detail/set_bool__struct.hpp" -#include -#include -#include - - -namespace std_srvs -{ - -namespace srv -{ - -namespace builder -{ - -class Init_SetBool_Request_data -{ -public: - Init_SetBool_Request_data() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - ::std_srvs::srv::SetBool_Request data(::std_srvs::srv::SetBool_Request::_data_type arg) - { - msg_.data = std::move(arg); - return std::move(msg_); - } - -private: - ::std_srvs::srv::SetBool_Request msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::SetBool_Request>() -{ - return std_srvs::srv::builder::Init_SetBool_Request_data(); -} - -} // namespace std_srvs - - -namespace std_srvs -{ - -namespace srv -{ - -namespace builder -{ - -class Init_SetBool_Response_message -{ -public: - explicit Init_SetBool_Response_message(::std_srvs::srv::SetBool_Response & msg) - : msg_(msg) - {} - ::std_srvs::srv::SetBool_Response message(::std_srvs::srv::SetBool_Response::_message_type arg) - { - msg_.message = std::move(arg); - return std::move(msg_); - } - -private: - ::std_srvs::srv::SetBool_Response msg_; -}; - -class Init_SetBool_Response_success -{ -public: - Init_SetBool_Response_success() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_SetBool_Response_message success(::std_srvs::srv::SetBool_Response::_success_type arg) - { - msg_.success = std::move(arg); - return Init_SetBool_Response_message(msg_); - } - -private: - ::std_srvs::srv::SetBool_Response msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::SetBool_Response>() -{ - return std_srvs::srv::builder::Init_SetBool_Response_success(); -} - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__functions.c b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__functions.c deleted file mode 100644 index a0d0bfae6..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__functions.c +++ /dev/null @@ -1,473 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice -#include "std_srvs/srv/detail/set_bool__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - -bool -std_srvs__srv__SetBool_Request__init(std_srvs__srv__SetBool_Request * msg) -{ - if (!msg) { - return false; - } - // data - return true; -} - -void -std_srvs__srv__SetBool_Request__fini(std_srvs__srv__SetBool_Request * msg) -{ - if (!msg) { - return; - } - // data -} - -bool -std_srvs__srv__SetBool_Request__are_equal(const std_srvs__srv__SetBool_Request * lhs, const std_srvs__srv__SetBool_Request * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // data - if (lhs->data != rhs->data) { - return false; - } - return true; -} - -bool -std_srvs__srv__SetBool_Request__copy( - const std_srvs__srv__SetBool_Request * input, - std_srvs__srv__SetBool_Request * output) -{ - if (!input || !output) { - return false; - } - // data - output->data = input->data; - return true; -} - -std_srvs__srv__SetBool_Request * -std_srvs__srv__SetBool_Request__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Request * msg = (std_srvs__srv__SetBool_Request *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Request), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__SetBool_Request)); - bool success = std_srvs__srv__SetBool_Request__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__SetBool_Request__destroy(std_srvs__srv__SetBool_Request * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__SetBool_Request__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__SetBool_Request__Sequence__init(std_srvs__srv__SetBool_Request__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Request * data = NULL; - - if (size) { - data = (std_srvs__srv__SetBool_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__SetBool_Request), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__SetBool_Request__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__SetBool_Request__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__SetBool_Request__Sequence__fini(std_srvs__srv__SetBool_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) { - std_srvs__srv__SetBool_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); - } -} - -std_srvs__srv__SetBool_Request__Sequence * -std_srvs__srv__SetBool_Request__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Request__Sequence * array = (std_srvs__srv__SetBool_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Request__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__SetBool_Request__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__SetBool_Request__Sequence__destroy(std_srvs__srv__SetBool_Request__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__SetBool_Request__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__SetBool_Request__Sequence__are_equal(const std_srvs__srv__SetBool_Request__Sequence * lhs, const std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__SetBool_Request__Sequence__copy( - const std_srvs__srv__SetBool_Request__Sequence * input, - std_srvs__srv__SetBool_Request__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__SetBool_Request); - std_srvs__srv__SetBool_Request * data = - (std_srvs__srv__SetBool_Request *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__SetBool_Request__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__SetBool_Request__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__SetBool_Request__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -bool -std_srvs__srv__SetBool_Response__init(std_srvs__srv__SetBool_Response * msg) -{ - if (!msg) { - return false; - } - // success - // message - if (!rosidl_runtime_c__String__init(&msg->message)) { - std_srvs__srv__SetBool_Response__fini(msg); - return false; - } - return true; -} - -void -std_srvs__srv__SetBool_Response__fini(std_srvs__srv__SetBool_Response * msg) -{ - if (!msg) { - return; - } - // success - // message - rosidl_runtime_c__String__fini(&msg->message); -} - -bool -std_srvs__srv__SetBool_Response__are_equal(const std_srvs__srv__SetBool_Response * lhs, const std_srvs__srv__SetBool_Response * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // success - if (lhs->success != rhs->success) { - return false; - } - // message - if (!rosidl_runtime_c__String__are_equal( - &(lhs->message), &(rhs->message))) - { - return false; - } - return true; -} - -bool -std_srvs__srv__SetBool_Response__copy( - const std_srvs__srv__SetBool_Response * input, - std_srvs__srv__SetBool_Response * output) -{ - if (!input || !output) { - return false; - } - // success - output->success = input->success; - // message - if (!rosidl_runtime_c__String__copy( - &(input->message), &(output->message))) - { - return false; - } - return true; -} - -std_srvs__srv__SetBool_Response * -std_srvs__srv__SetBool_Response__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Response * msg = (std_srvs__srv__SetBool_Response *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Response), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__SetBool_Response)); - bool success = std_srvs__srv__SetBool_Response__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__SetBool_Response__destroy(std_srvs__srv__SetBool_Response * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__SetBool_Response__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__SetBool_Response__Sequence__init(std_srvs__srv__SetBool_Response__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Response * data = NULL; - - if (size) { - data = (std_srvs__srv__SetBool_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__SetBool_Response), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__SetBool_Response__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__SetBool_Response__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__SetBool_Response__Sequence__fini(std_srvs__srv__SetBool_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) { - std_srvs__srv__SetBool_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); - } -} - -std_srvs__srv__SetBool_Response__Sequence * -std_srvs__srv__SetBool_Response__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__SetBool_Response__Sequence * array = (std_srvs__srv__SetBool_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Response__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__SetBool_Response__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__SetBool_Response__Sequence__destroy(std_srvs__srv__SetBool_Response__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__SetBool_Response__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__SetBool_Response__Sequence__are_equal(const std_srvs__srv__SetBool_Response__Sequence * lhs, const std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__SetBool_Response__Sequence__copy( - const std_srvs__srv__SetBool_Response__Sequence * input, - std_srvs__srv__SetBool_Response__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__SetBool_Response); - std_srvs__srv__SetBool_Response * data = - (std_srvs__srv__SetBool_Response *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__SetBool_Response__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__SetBool_Response__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__SetBool_Response__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index b77a11b97..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__SetBool_Request( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__SetBool_Request( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool_Request)(); - -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__SetBool_Response( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__SetBool_Response( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index ac373eaf1..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_srvs/srv/detail/set_bool__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::SetBool_Request & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::SetBool_Request & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::SetBool_Request & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_SetBool_Request( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/set_bool__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::SetBool_Response & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::SetBool_Response & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::SetBool_Response & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_SetBool_Response( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_service_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.h b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.h deleted file mode 100644 index 384cf2cf1..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.h +++ /dev/null @@ -1,64 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in srv/SetBool in the package std_srvs. -typedef struct std_srvs__srv__SetBool_Request -{ - bool data; -} std_srvs__srv__SetBool_Request; - -// Struct for a sequence of std_srvs__srv__SetBool_Request. -typedef struct std_srvs__srv__SetBool_Request__Sequence -{ - std_srvs__srv__SetBool_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__SetBool_Request__Sequence; - - -// Constants defined in the message - -// Include directives for member types -// Member 'message' -#include "rosidl_runtime_c/string.h" - -// Struct defined in srv/SetBool in the package std_srvs. -typedef struct std_srvs__srv__SetBool_Response -{ - bool success; - rosidl_runtime_c__String message; -} std_srvs__srv__SetBool_Response; - -// Struct for a sequence of std_srvs__srv__SetBool_Response. -typedef struct std_srvs__srv__SetBool_Response__Sequence -{ - std_srvs__srv__SetBool_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__SetBool_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.hpp deleted file mode 100644 index 8c48487bc..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__struct.hpp +++ /dev/null @@ -1,274 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__SetBool_Request __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__SetBool_Request __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct SetBool_Request_ -{ - using Type = SetBool_Request_; - - explicit SetBool_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->data = false; - } - } - - explicit SetBool_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->data = false; - } - } - - // field types and members - using _data_type = - bool; - _data_type data; - - // setters for named parameter idiom - Type & set__data( - const bool & _arg) - { - this->data = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::SetBool_Request_ *; - using ConstRawPtr = - const std_srvs::srv::SetBool_Request_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__SetBool_Request - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__SetBool_Request - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const SetBool_Request_ & other) const - { - if (this->data != other.data) { - return false; - } - return true; - } - bool operator!=(const SetBool_Request_ & other) const - { - return !this->operator==(other); - } -}; // struct SetBool_Request_ - -// alias to use template instance with default allocator -using SetBool_Request = - std_srvs::srv::SetBool_Request_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__SetBool_Response __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__SetBool_Response __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct SetBool_Response_ -{ - using Type = SetBool_Response_; - - explicit SetBool_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->success = false; - this->message = ""; - } - } - - explicit SetBool_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : message(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->success = false; - this->message = ""; - } - } - - // field types and members - using _success_type = - bool; - _success_type success; - using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _message_type message; - - // setters for named parameter idiom - Type & set__success( - const bool & _arg) - { - this->success = _arg; - return *this; - } - Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->message = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::SetBool_Response_ *; - using ConstRawPtr = - const std_srvs::srv::SetBool_Response_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__SetBool_Response - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__SetBool_Response - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const SetBool_Response_ & other) const - { - if (this->success != other.success) { - return false; - } - if (this->message != other.message) { - return false; - } - return true; - } - bool operator!=(const SetBool_Response_ & other) const - { - return !this->operator==(other); - } -}; // struct SetBool_Response_ - -// alias to use template instance with default allocator -using SetBool_Response = - std_srvs::srv::SetBool_Response_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - -namespace std_srvs -{ - -namespace srv -{ - -struct SetBool -{ - using Request = std_srvs::srv::SetBool_Request; - using Response = std_srvs::srv::SetBool_Response; -}; - -} // namespace srv - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__traits.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__traits.hpp deleted file mode 100644 index 7fe82f1cf..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ -#define STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ - -#include "std_srvs/srv/detail/set_bool__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::SetBool_Request"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/SetBool_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::SetBool_Response"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/SetBool_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::SetBool"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/SetBool"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.c b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.c deleted file mode 100644 index 645d24a29..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.c +++ /dev/null @@ -1,243 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_srvs:srv/SetBool.idl -// generated code does not contain a copyright notice - -#include -#include "std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" -#include "std_srvs/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 "std_srvs/srv/detail/set_bool__functions.h" -#include "std_srvs/srv/detail/set_bool__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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; - std_srvs__srv__SetBool_Request__init(message_memory); -} - -void SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_fini_function(void * message_memory) -{ - std_srvs__srv__SetBool_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__SetBool_Request, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members = { - "std_srvs__srv", // message namespace - "SetBool_Request", // message name - 1, // number of fields - sizeof(std_srvs__srv__SetBool_Request), - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array, // message members - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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 SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle = { - 0, - &SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Request)() { - if (!SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier) { - SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" -// already included above -// #include "std_srvs/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 "std_srvs/srv/detail/set_bool__functions.h" -// already included above -// #include "std_srvs/srv/detail/set_bool__struct.h" - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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; - std_srvs__srv__SetBool_Response__init(message_memory); -} - -void SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_fini_function(void * message_memory) -{ - std_srvs__srv__SetBool_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__SetBool_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__SetBool_Response, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members = { - "std_srvs__srv", // message namespace - "SetBool_Response", // message name - 2, // number of fields - sizeof(std_srvs__srv__SetBool_Response), - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array, // message members - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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 SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle = { - 0, - &SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Response)() { - if (!SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier) { - SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/set_bool__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 std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_members = { - "std_srvs__srv", // service namespace - "SetBool", // service name - // these two fields are initialized below on the first access - NULL, // request message - // std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle, - NULL // response message - // std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle = { - 0, - &std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, std_srvs, srv, SetBool_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool)() { - if (!std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier) { - std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, std_srvs, srv, SetBool_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, std_srvs, srv, SetBool_Response)()->data; - } - - return &std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.cpp b/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.cpp deleted file mode 100644 index 61522b13f..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.cpp +++ /dev/null @@ -1,347 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_srvs:srv/SetBool.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 "std_srvs/srv/detail/set_bool__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void SetBool_Request_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::SetBool_Request(_init); -} - -void SetBool_Request_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~SetBool_Request(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Request_message_member_array[1] = { - { - "data", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::SetBool_Request, data), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers SetBool_Request_message_members = { - "std_srvs::srv", // message namespace - "SetBool_Request", // message name - 1, // number of fields - sizeof(std_srvs::srv::SetBool_Request), - SetBool_Request_message_member_array, // message members - SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Request_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t SetBool_Request_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_Request_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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, std_srvs, srv, SetBool_Request)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "std_srvs/srv/detail/set_bool__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void SetBool_Response_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::SetBool_Response(_init); -} - -void SetBool_Response_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~SetBool_Response(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Response_message_member_array[2] = { - { - "success", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::SetBool_Response, success), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "message", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::SetBool_Response, message), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers SetBool_Response_message_members = { - "std_srvs::srv", // message namespace - "SetBool_Response", // message name - 2, // number of fields - sizeof(std_srvs::srv::SetBool_Response), - SetBool_Response_message_member_array, // message members - SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetBool_Response_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t SetBool_Response_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_Response_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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, std_srvs, srv, SetBool_Response)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "std_srvs/srv/detail/set_bool__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 std_srvs -{ - -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 SetBool_service_members = { - "std_srvs::srv", // service namespace - "SetBool", // service name - // these two fields are initialized below on the first access - // see get_service_type_support_handle() - nullptr, // request message - nullptr // response message -}; - -static const rosidl_service_type_support_t SetBool_service_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &SetBool_service_members, - get_service_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_service_type_support_t * -get_service_type_support_handle() -{ - // get a handle to the value to be returned - auto service_type_support = - &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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( - 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< - ::std_srvs::srv::SetBool_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< - ::std_srvs::srv::SetBool_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, std_srvs, srv, SetBool)() { - return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__builder.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__builder.hpp deleted file mode 100644 index c4ddbec19..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__builder.hpp +++ /dev/null @@ -1,93 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ - -#include "std_srvs/srv/detail/trigger__struct.hpp" -#include -#include -#include - - -namespace std_srvs -{ - -namespace srv -{ - - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::Trigger_Request>() -{ - return ::std_srvs::srv::Trigger_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); -} - -} // namespace std_srvs - - -namespace std_srvs -{ - -namespace srv -{ - -namespace builder -{ - -class Init_Trigger_Response_message -{ -public: - explicit Init_Trigger_Response_message(::std_srvs::srv::Trigger_Response & msg) - : msg_(msg) - {} - ::std_srvs::srv::Trigger_Response message(::std_srvs::srv::Trigger_Response::_message_type arg) - { - msg_.message = std::move(arg); - return std::move(msg_); - } - -private: - ::std_srvs::srv::Trigger_Response msg_; -}; - -class Init_Trigger_Response_success -{ -public: - Init_Trigger_Response_success() - : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) - {} - Init_Trigger_Response_message success(::std_srvs::srv::Trigger_Response::_success_type arg) - { - msg_.success = std::move(arg); - return Init_Trigger_Response_message(msg_); - } - -private: - ::std_srvs::srv::Trigger_Response msg_; -}; - -} // namespace builder - -} // namespace srv - -template -auto build(); - -template<> -inline -auto build<::std_srvs::srv::Trigger_Response>() -{ - return std_srvs::srv::builder::Init_Trigger_Response_success(); -} - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__functions.c b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__functions.c deleted file mode 100644 index 5ad37f2a9..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__functions.c +++ /dev/null @@ -1,473 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__functions.c.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice -#include "std_srvs/srv/detail/trigger__functions.h" - -#include -#include -#include -#include - -#include "rcutils/allocator.h" - -bool -std_srvs__srv__Trigger_Request__init(std_srvs__srv__Trigger_Request * msg) -{ - if (!msg) { - return false; - } - // structure_needs_at_least_one_member - return true; -} - -void -std_srvs__srv__Trigger_Request__fini(std_srvs__srv__Trigger_Request * msg) -{ - if (!msg) { - return; - } - // structure_needs_at_least_one_member -} - -bool -std_srvs__srv__Trigger_Request__are_equal(const std_srvs__srv__Trigger_Request * lhs, const std_srvs__srv__Trigger_Request * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // structure_needs_at_least_one_member - if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { - return false; - } - return true; -} - -bool -std_srvs__srv__Trigger_Request__copy( - const std_srvs__srv__Trigger_Request * input, - std_srvs__srv__Trigger_Request * output) -{ - if (!input || !output) { - return false; - } - // structure_needs_at_least_one_member - output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; - return true; -} - -std_srvs__srv__Trigger_Request * -std_srvs__srv__Trigger_Request__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Request * msg = (std_srvs__srv__Trigger_Request *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Request), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__Trigger_Request)); - bool success = std_srvs__srv__Trigger_Request__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__Trigger_Request__destroy(std_srvs__srv__Trigger_Request * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__Trigger_Request__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__Trigger_Request__Sequence__init(std_srvs__srv__Trigger_Request__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Request * data = NULL; - - if (size) { - data = (std_srvs__srv__Trigger_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Trigger_Request), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__Trigger_Request__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__Trigger_Request__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__Trigger_Request__Sequence__fini(std_srvs__srv__Trigger_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) { - std_srvs__srv__Trigger_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); - } -} - -std_srvs__srv__Trigger_Request__Sequence * -std_srvs__srv__Trigger_Request__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Request__Sequence * array = (std_srvs__srv__Trigger_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Request__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__Trigger_Request__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__Trigger_Request__Sequence__destroy(std_srvs__srv__Trigger_Request__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__Trigger_Request__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__Trigger_Request__Sequence__are_equal(const std_srvs__srv__Trigger_Request__Sequence * lhs, const std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__Trigger_Request__Sequence__copy( - const std_srvs__srv__Trigger_Request__Sequence * input, - std_srvs__srv__Trigger_Request__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__Trigger_Request); - std_srvs__srv__Trigger_Request * data = - (std_srvs__srv__Trigger_Request *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__Trigger_Request__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__Trigger_Request__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__Trigger_Request__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -bool -std_srvs__srv__Trigger_Response__init(std_srvs__srv__Trigger_Response * msg) -{ - if (!msg) { - return false; - } - // success - // message - if (!rosidl_runtime_c__String__init(&msg->message)) { - std_srvs__srv__Trigger_Response__fini(msg); - return false; - } - return true; -} - -void -std_srvs__srv__Trigger_Response__fini(std_srvs__srv__Trigger_Response * msg) -{ - if (!msg) { - return; - } - // success - // message - rosidl_runtime_c__String__fini(&msg->message); -} - -bool -std_srvs__srv__Trigger_Response__are_equal(const std_srvs__srv__Trigger_Response * lhs, const std_srvs__srv__Trigger_Response * rhs) -{ - if (!lhs || !rhs) { - return false; - } - // success - if (lhs->success != rhs->success) { - return false; - } - // message - if (!rosidl_runtime_c__String__are_equal( - &(lhs->message), &(rhs->message))) - { - return false; - } - return true; -} - -bool -std_srvs__srv__Trigger_Response__copy( - const std_srvs__srv__Trigger_Response * input, - std_srvs__srv__Trigger_Response * output) -{ - if (!input || !output) { - return false; - } - // success - output->success = input->success; - // message - if (!rosidl_runtime_c__String__copy( - &(input->message), &(output->message))) - { - return false; - } - return true; -} - -std_srvs__srv__Trigger_Response * -std_srvs__srv__Trigger_Response__create() -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Response * msg = (std_srvs__srv__Trigger_Response *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Response), allocator.state); - if (!msg) { - return NULL; - } - memset(msg, 0, sizeof(std_srvs__srv__Trigger_Response)); - bool success = std_srvs__srv__Trigger_Response__init(msg); - if (!success) { - allocator.deallocate(msg, allocator.state); - return NULL; - } - return msg; -} - -void -std_srvs__srv__Trigger_Response__destroy(std_srvs__srv__Trigger_Response * msg) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (msg) { - std_srvs__srv__Trigger_Response__fini(msg); - } - allocator.deallocate(msg, allocator.state); -} - - -bool -std_srvs__srv__Trigger_Response__Sequence__init(std_srvs__srv__Trigger_Response__Sequence * array, size_t size) -{ - if (!array) { - return false; - } - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Response * data = NULL; - - if (size) { - data = (std_srvs__srv__Trigger_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Trigger_Response), allocator.state); - if (!data) { - return false; - } - // initialize all array elements - size_t i; - for (i = 0; i < size; ++i) { - bool success = std_srvs__srv__Trigger_Response__init(&data[i]); - if (!success) { - break; - } - } - if (i < size) { - // if initialization failed finalize the already initialized array elements - for (; i > 0; --i) { - std_srvs__srv__Trigger_Response__fini(&data[i - 1]); - } - allocator.deallocate(data, allocator.state); - return false; - } - } - array->data = data; - array->size = size; - array->capacity = size; - return true; -} - -void -std_srvs__srv__Trigger_Response__Sequence__fini(std_srvs__srv__Trigger_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) { - std_srvs__srv__Trigger_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); - } -} - -std_srvs__srv__Trigger_Response__Sequence * -std_srvs__srv__Trigger_Response__Sequence__create(size_t size) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - std_srvs__srv__Trigger_Response__Sequence * array = (std_srvs__srv__Trigger_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Response__Sequence), allocator.state); - if (!array) { - return NULL; - } - bool success = std_srvs__srv__Trigger_Response__Sequence__init(array, size); - if (!success) { - allocator.deallocate(array, allocator.state); - return NULL; - } - return array; -} - -void -std_srvs__srv__Trigger_Response__Sequence__destroy(std_srvs__srv__Trigger_Response__Sequence * array) -{ - rcutils_allocator_t allocator = rcutils_get_default_allocator(); - if (array) { - std_srvs__srv__Trigger_Response__Sequence__fini(array); - } - allocator.deallocate(array, allocator.state); -} - -bool -std_srvs__srv__Trigger_Response__Sequence__are_equal(const std_srvs__srv__Trigger_Response__Sequence * lhs, const std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { - return false; - } - } - return true; -} - -bool -std_srvs__srv__Trigger_Response__Sequence__copy( - const std_srvs__srv__Trigger_Response__Sequence * input, - std_srvs__srv__Trigger_Response__Sequence * output) -{ - if (!input || !output) { - return false; - } - if (output->capacity < input->size) { - const size_t allocation_size = - input->size * sizeof(std_srvs__srv__Trigger_Response); - std_srvs__srv__Trigger_Response * data = - (std_srvs__srv__Trigger_Response *)realloc(output->data, allocation_size); - if (!data) { - return false; - } - for (size_t i = output->capacity; i < input->size; ++i) { - if (!std_srvs__srv__Trigger_Response__init(&data[i])) { - /* free currently allocated and return false */ - for (; i-- > output->capacity; ) { - std_srvs__srv__Trigger_Response__fini(&data[i]); - } - free(data); - return false; - } - } - output->data = data; - output->capacity = input->size; - } - output->size = input->size; - for (size_t i = 0; i < input->size; ++i) { - if (!std_srvs__srv__Trigger_Response__copy( - &(input->data[i]), &(output->data[i]))) - { - return false; - } - } - return true; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h deleted file mode 100644 index e4cec5cd0..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h +++ /dev/null @@ -1,87 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ - - -#include -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__Trigger_Request( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__Trigger_Request( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger_Request)(); - -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t get_serialized_size_std_srvs__srv__Trigger_Response( - const void * untyped_ros_message, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -size_t max_serialized_size_std_srvs__srv__Trigger_Response( - bool & full_bounded, - size_t current_alignment); - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp deleted file mode 100644 index 59fcab468..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ - -#include "rosidl_runtime_c/message_type_support_struct.h" -#include "rosidl_typesupport_interface/macros.h" -#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -#include "std_srvs/srv/detail/trigger__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::Trigger_Request & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::Trigger_Request & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::Trigger_Request & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_Trigger_Request( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/trigger__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 std_srvs -{ - -namespace srv -{ - -namespace typesupport_fastrtps_cpp -{ - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_serialize( - const std_srvs::srv::Trigger_Response & ros_message, - eprosima::fastcdr::Cdr & cdr); - -bool -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -cdr_deserialize( - eprosima::fastcdr::Cdr & cdr, - std_srvs::srv::Trigger_Response & ros_message); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -get_serialized_size( - const std_srvs::srv::Trigger_Response & ros_message, - size_t current_alignment); - -size_t -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -max_serialized_size_Trigger_Response( - bool & full_bounded, - size_t current_alignment); - -} // namespace typesupport_fastrtps_cpp - -} // namespace srv - -} // namespace std_srvs - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_message_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs -const rosidl_service_type_support_t * - ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger)(); - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.h b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.h deleted file mode 100644 index 022172792..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.h +++ /dev/null @@ -1,64 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Struct defined in srv/Trigger in the package std_srvs. -typedef struct std_srvs__srv__Trigger_Request -{ - uint8_t structure_needs_at_least_one_member; -} std_srvs__srv__Trigger_Request; - -// Struct for a sequence of std_srvs__srv__Trigger_Request. -typedef struct std_srvs__srv__Trigger_Request__Sequence -{ - std_srvs__srv__Trigger_Request * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__Trigger_Request__Sequence; - - -// Constants defined in the message - -// Include directives for member types -// Member 'message' -#include "rosidl_runtime_c/string.h" - -// Struct defined in srv/Trigger in the package std_srvs. -typedef struct std_srvs__srv__Trigger_Response -{ - bool success; - rosidl_runtime_c__String message; -} std_srvs__srv__Trigger_Response; - -// Struct for a sequence of std_srvs__srv__Trigger_Response. -typedef struct std_srvs__srv__Trigger_Response__Sequence -{ - std_srvs__srv__Trigger_Response * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} std_srvs__srv__Trigger_Response__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.hpp deleted file mode 100644 index d63b35cf0..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__struct.hpp +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__Trigger_Request __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__Trigger_Request __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct Trigger_Request_ -{ - using Type = Trigger_Request_; - - explicit Trigger_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->structure_needs_at_least_one_member = 0; - } - } - - explicit Trigger_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->structure_needs_at_least_one_member = 0; - } - } - - // field types and members - using _structure_needs_at_least_one_member_type = - uint8_t; - _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; - - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::Trigger_Request_ *; - using ConstRawPtr = - const std_srvs::srv::Trigger_Request_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__Trigger_Request - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__Trigger_Request - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Trigger_Request_ & other) const - { - if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { - return false; - } - return true; - } - bool operator!=(const Trigger_Request_ & other) const - { - return !this->operator==(other); - } -}; // struct Trigger_Request_ - -// alias to use template instance with default allocator -using Trigger_Request = - std_srvs::srv::Trigger_Request_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - - -#ifndef _WIN32 -# define DEPRECATED__std_srvs__srv__Trigger_Response __attribute__((deprecated)) -#else -# define DEPRECATED__std_srvs__srv__Trigger_Response __declspec(deprecated) -#endif - -namespace std_srvs -{ - -namespace srv -{ - -// message struct -template -struct Trigger_Response_ -{ - using Type = Trigger_Response_; - - explicit Trigger_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->success = false; - this->message = ""; - } - } - - explicit Trigger_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : message(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->success = false; - this->message = ""; - } - } - - // field types and members - using _success_type = - bool; - _success_type success; - using _message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _message_type message; - - // setters for named parameter idiom - Type & set__success( - const bool & _arg) - { - this->success = _arg; - return *this; - } - Type & set__message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->message = _arg; - return *this; - } - - // constant declarations - - // pointer types - using RawPtr = - std_srvs::srv::Trigger_Response_ *; - using ConstRawPtr = - const std_srvs::srv::Trigger_Response_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__std_srvs__srv__Trigger_Response - std::shared_ptr> - Ptr; - typedef DEPRECATED__std_srvs__srv__Trigger_Response - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Trigger_Response_ & other) const - { - if (this->success != other.success) { - return false; - } - if (this->message != other.message) { - return false; - } - return true; - } - bool operator!=(const Trigger_Response_ & other) const - { - return !this->operator==(other); - } -}; // struct Trigger_Response_ - -// alias to use template instance with default allocator -using Trigger_Response = - std_srvs::srv::Trigger_Response_>; - -// constant definitions - -} // namespace srv - -} // namespace std_srvs - -namespace std_srvs -{ - -namespace srv -{ - -struct Trigger -{ - using Request = std_srvs::srv::Trigger_Request; - using Response = std_srvs::srv::Trigger_Response; -}; - -} // namespace srv - -} // namespace std_srvs - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__traits.hpp b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__traits.hpp deleted file mode 100644 index 1036cef30..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ -#define STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ - -#include "std_srvs/srv/detail/trigger__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Trigger_Request"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Trigger_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Trigger_Response"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Trigger_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "std_srvs::srv::Trigger"; -} - -template<> -inline const char * name() -{ - return "std_srvs/srv/Trigger"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.c b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.c deleted file mode 100644 index 389cdc8c1..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.c +++ /dev/null @@ -1,243 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from std_srvs:srv/Trigger.idl -// generated code does not contain a copyright notice - -#include -#include "std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h" -#include "std_srvs/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 "std_srvs/srv/detail/trigger__functions.h" -#include "std_srvs/srv/detail/trigger__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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; - std_srvs__srv__Trigger_Request__init(message_memory); -} - -void Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_fini_function(void * message_memory) -{ - std_srvs__srv__Trigger_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__Trigger_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members = { - "std_srvs__srv", // message namespace - "Trigger_Request", // message name - 1, // number of fields - sizeof(std_srvs__srv__Trigger_Request), - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array, // message members - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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 Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle = { - 0, - &Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Request)() { - if (!Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier) { - Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h" -// already included above -// #include "std_srvs/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 "std_srvs/srv/detail/trigger__functions.h" -// already included above -// #include "std_srvs/srv/detail/trigger__struct.h" - - -// Include directives for member types -// Member `message` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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; - std_srvs__srv__Trigger_Response__init(message_memory); -} - -void Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_fini_function(void * message_memory) -{ - std_srvs__srv__Trigger_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__Trigger_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs__srv__Trigger_Response, message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members = { - "std_srvs__srv", // message namespace - "Trigger_Response", // message name - 2, // number of fields - sizeof(std_srvs__srv__Trigger_Response), - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array, // message members - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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 Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle = { - 0, - &Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Response)() { - if (!Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier) { - Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "std_srvs/srv/detail/trigger__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 std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_members = { - "std_srvs__srv", // service namespace - "Trigger", // service name - // these two fields are initialized below on the first access - NULL, // request message - // std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle, - NULL // response message - // std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle = { - 0, - &std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, std_srvs, srv, Trigger_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger)() { - if (!std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier) { - std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, std_srvs, srv, Trigger_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, std_srvs, srv, Trigger_Response)()->data; - } - - return &std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.cpp b/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.cpp deleted file mode 100644 index 68c8c2caa..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.cpp +++ /dev/null @@ -1,347 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from std_srvs:srv/Trigger.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 "std_srvs/srv/detail/trigger__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Trigger_Request_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::Trigger_Request(_init); -} - -void Trigger_Request_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Trigger_Request(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::Trigger_Request, structure_needs_at_least_one_member), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Trigger_Request_message_members = { - "std_srvs::srv", // message namespace - "Trigger_Request", // message name - 1, // number of fields - sizeof(std_srvs::srv::Trigger_Request), - Trigger_Request_message_member_array, // message members - Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Request_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Trigger_Request_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_Request_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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, std_srvs, srv, Trigger_Request)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "std_srvs/srv/detail/trigger__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 std_srvs -{ - -namespace srv -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Trigger_Response_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) std_srvs::srv::Trigger_Response(_init); -} - -void Trigger_Response_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Trigger_Response(); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Response_message_member_array[2] = { - { - "success", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::Trigger_Response, success), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "message", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(std_srvs::srv::Trigger_Response, message), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Trigger_Response_message_members = { - "std_srvs::srv", // message namespace - "Trigger_Response", // message name - 2, // number of fields - sizeof(std_srvs::srv::Trigger_Response), - Trigger_Response_message_member_array, // message members - Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) - Trigger_Response_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Trigger_Response_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_Response_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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, std_srvs, srv, Trigger_Response)() { - return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "std_srvs/srv/detail/trigger__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 std_srvs -{ - -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 Trigger_service_members = { - "std_srvs::srv", // service namespace - "Trigger", // service name - // these two fields are initialized below on the first access - // see get_service_type_support_handle() - nullptr, // request message - nullptr // response message -}; - -static const rosidl_service_type_support_t Trigger_service_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Trigger_service_members, - get_service_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace srv - -} // namespace std_srvs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_service_type_support_t * -get_service_type_support_handle() -{ - // get a handle to the value to be returned - auto service_type_support = - &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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( - 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< - ::std_srvs::srv::Trigger_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< - ::std_srvs::srv::Trigger_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, std_srvs, srv, Trigger)() { - return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/empty.hpp b/ThirdParty/ros/include/std_srvs/srv/empty.hpp deleted file mode 100644 index 93cd5b613..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/empty.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__EMPTY_HPP_ -#define STD_SRVS__SRV__EMPTY_HPP_ - -#include "std_srvs/srv/detail/empty__struct.hpp" -#include "std_srvs/srv/detail/empty__builder.hpp" -#include "std_srvs/srv/detail/empty__traits.hpp" - -#endif // STD_SRVS__SRV__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/set_bool.hpp b/ThirdParty/ros/include/std_srvs/srv/set_bool.hpp deleted file mode 100644 index 907aa1234..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/set_bool.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__SET_BOOL_HPP_ -#define STD_SRVS__SRV__SET_BOOL_HPP_ - -#include "std_srvs/srv/detail/set_bool__struct.hpp" -#include "std_srvs/srv/detail/set_bool__builder.hpp" -#include "std_srvs/srv/detail/set_bool__traits.hpp" - -#endif // STD_SRVS__SRV__SET_BOOL_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/trigger.hpp b/ThirdParty/ros/include/std_srvs/srv/trigger.hpp deleted file mode 100644 index aa340435b..000000000 --- a/ThirdParty/ros/include/std_srvs/srv/trigger.hpp +++ /dev/null @@ -1,11 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl.hpp.em -// generated code does not contain a copyright notice - -#ifndef STD_SRVS__SRV__TRIGGER_HPP_ -#define STD_SRVS__SRV__TRIGGER_HPP_ - -#include "std_srvs/srv/detail/trigger__struct.hpp" -#include "std_srvs/srv/detail/trigger__builder.hpp" -#include "std_srvs/srv/detail/trigger__traits.hpp" - -#endif // STD_SRVS__SRV__TRIGGER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..b1cea9d94 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 STD_SRVS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define STD_SRVS__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_std_srvs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_srvs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_std_srvs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_srvs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_std_srvs + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_srvs ROSIDL_GENERATOR_CPP_EXPORT_std_srvs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_srvs ROSIDL_GENERATOR_CPP_IMPORT_std_srvs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_std_srvs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_std_srvs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_srvs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_std_srvs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/std_srvs/std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__builder.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__builder.hpp new file mode 100644 index 000000000..13f811bef --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__builder.hpp @@ -0,0 +1,58 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ +#define STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ + +#include +#include + +#include "std_srvs/srv/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_srvs +{ + +namespace srv +{ + + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::Empty_Request>() +{ + return ::std_srvs::srv::Empty_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace std_srvs + + +namespace std_srvs +{ + +namespace srv +{ + + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::Empty_Response>() +{ + return ::std_srvs::srv::Empty_Response(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__functions.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__functions.c new file mode 100644 index 000000000..92c4e6d73 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__functions.c @@ -0,0 +1,460 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice +#include "std_srvs/srv/detail/empty__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +bool +std_srvs__srv__Empty_Request__init(std_srvs__srv__Empty_Request * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +std_srvs__srv__Empty_Request__fini(std_srvs__srv__Empty_Request * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +std_srvs__srv__Empty_Request__are_equal(const std_srvs__srv__Empty_Request * lhs, const std_srvs__srv__Empty_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +std_srvs__srv__Empty_Request__copy( + const std_srvs__srv__Empty_Request * input, + std_srvs__srv__Empty_Request * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +std_srvs__srv__Empty_Request * +std_srvs__srv__Empty_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Request * msg = (std_srvs__srv__Empty_Request *)allocator.allocate(sizeof(std_srvs__srv__Empty_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__Empty_Request)); + bool success = std_srvs__srv__Empty_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__Empty_Request__destroy(std_srvs__srv__Empty_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__Empty_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__Empty_Request__Sequence__init(std_srvs__srv__Empty_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Request * data = NULL; + + if (size) { + data = (std_srvs__srv__Empty_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Empty_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__Empty_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__Empty_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__Empty_Request__Sequence__fini(std_srvs__srv__Empty_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) { + std_srvs__srv__Empty_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); + } +} + +std_srvs__srv__Empty_Request__Sequence * +std_srvs__srv__Empty_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Request__Sequence * array = (std_srvs__srv__Empty_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Empty_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__Empty_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__Empty_Request__Sequence__destroy(std_srvs__srv__Empty_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__Empty_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__Empty_Request__Sequence__are_equal(const std_srvs__srv__Empty_Request__Sequence * lhs, const std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__Empty_Request__Sequence__copy( + const std_srvs__srv__Empty_Request__Sequence * input, + std_srvs__srv__Empty_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__Empty_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Request * data = + (std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_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; ) { + std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +bool +std_srvs__srv__Empty_Response__init(std_srvs__srv__Empty_Response * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +std_srvs__srv__Empty_Response__fini(std_srvs__srv__Empty_Response * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +std_srvs__srv__Empty_Response__are_equal(const std_srvs__srv__Empty_Response * lhs, const std_srvs__srv__Empty_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +std_srvs__srv__Empty_Response__copy( + const std_srvs__srv__Empty_Response * input, + std_srvs__srv__Empty_Response * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +std_srvs__srv__Empty_Response * +std_srvs__srv__Empty_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Response * msg = (std_srvs__srv__Empty_Response *)allocator.allocate(sizeof(std_srvs__srv__Empty_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__Empty_Response)); + bool success = std_srvs__srv__Empty_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__Empty_Response__destroy(std_srvs__srv__Empty_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__Empty_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__Empty_Response__Sequence__init(std_srvs__srv__Empty_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Response * data = NULL; + + if (size) { + data = (std_srvs__srv__Empty_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Empty_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__Empty_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__Empty_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__Empty_Response__Sequence__fini(std_srvs__srv__Empty_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) { + std_srvs__srv__Empty_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); + } +} + +std_srvs__srv__Empty_Response__Sequence * +std_srvs__srv__Empty_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Response__Sequence * array = (std_srvs__srv__Empty_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Empty_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__Empty_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__Empty_Response__Sequence__destroy(std_srvs__srv__Empty_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__Empty_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__Empty_Response__Sequence__are_equal(const std_srvs__srv__Empty_Response__Sequence * lhs, const std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__Empty_Response__Sequence__copy( + const std_srvs__srv__Empty_Response__Sequence * input, + std_srvs__srv__Empty_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__Empty_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Empty_Response * data = + (std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_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; ) { + std_srvs__srv__Empty_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 (!std_srvs__srv__Empty_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__functions.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__functions.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/empty__functions.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__functions.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2e858b1a1 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__Empty_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__Empty_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__Empty_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__Empty_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..10c144311 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_srvs/srv/detail/empty__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::Empty_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::Empty_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::Empty_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_Empty_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/empty__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::Empty_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::Empty_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::Empty_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_Empty_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Empty)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.h new file mode 100644 index 000000000..3b6ea4375 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.h @@ -0,0 +1,59 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ +#define STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in srv/Empty in the package std_srvs. +typedef struct std_srvs__srv__Empty_Request +{ + uint8_t structure_needs_at_least_one_member; +} std_srvs__srv__Empty_Request; + +// Struct for a sequence of std_srvs__srv__Empty_Request. +typedef struct std_srvs__srv__Empty_Request__Sequence +{ + std_srvs__srv__Empty_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__Empty_Request__Sequence; + + +// Constants defined in the message + +/// Struct defined in srv/Empty in the package std_srvs. +typedef struct std_srvs__srv__Empty_Response +{ + uint8_t structure_needs_at_least_one_member; +} std_srvs__srv__Empty_Response; + +// Struct for a sequence of std_srvs__srv__Empty_Response. +typedef struct std_srvs__srv__Empty_Response__Sequence +{ + std_srvs__srv__Empty_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__Empty_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.hpp new file mode 100644 index 000000000..d41d39959 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__struct.hpp @@ -0,0 +1,247 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ +#define STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__Empty_Request __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__Empty_Request __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct Empty_Request_ +{ + using Type = Empty_Request_; + + explicit Empty_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->structure_needs_at_least_one_member = 0; + } + } + + explicit Empty_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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::Empty_Request_ *; + using ConstRawPtr = + const std_srvs::srv::Empty_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__Empty_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__Empty_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Empty_Request_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Empty_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct Empty_Request_ + +// alias to use template instance with default allocator +using Empty_Request = + std_srvs::srv::Empty_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__Empty_Response __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__Empty_Response __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct Empty_Response_ +{ + using Type = Empty_Response_; + + explicit Empty_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->structure_needs_at_least_one_member = 0; + } + } + + explicit Empty_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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::Empty_Response_ *; + using ConstRawPtr = + const std_srvs::srv::Empty_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__Empty_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__Empty_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Empty_Response_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Empty_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct Empty_Response_ + +// alias to use template instance with default allocator +using Empty_Response = + std_srvs::srv::Empty_Response_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + +namespace std_srvs +{ + +namespace srv +{ + +struct Empty +{ + using Request = std_srvs::srv::Empty_Request; + using Response = std_srvs::srv::Empty_Response; +}; + +} // namespace srv + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__traits.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__traits.hpp new file mode 100644 index 000000000..257d3be44 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__traits.hpp @@ -0,0 +1,234 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ +#define STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_srvs/srv/detail/empty__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Empty_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Empty_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Empty_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::Empty_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::Empty_Request & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Empty_Request"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Empty_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Empty_Response & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Empty_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Empty_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::Empty_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::Empty_Response & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Empty_Response"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Empty_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Empty"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Empty"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.c new file mode 100644 index 000000000..fc98316e0 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.c @@ -0,0 +1,228 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#include +#include "std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h" +#include "std_srvs/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 "std_srvs/srv/detail/empty__functions.h" +#include "std_srvs/srv/detail/empty__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_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; + std_srvs__srv__Empty_Request__init(message_memory); +} + +void std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_fini_function(void * message_memory) +{ + std_srvs__srv__Empty_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__Empty_Request, structure_needs_at_least_one_member), // 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 std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_members = { + "std_srvs__srv", // message namespace + "Empty_Request", // message name + 1, // number of fields + sizeof(std_srvs__srv__Empty_Request), + std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_member_array, // message members + std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_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 std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle = { + 0, + &std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Request)() { + if (!std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__Empty_Request__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "std_srvs/srv/detail/empty__rosidl_typesupport_introspection_c.h" +// already included above +// #include "std_srvs/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 "std_srvs/srv/detail/empty__functions.h" +// already included above +// #include "std_srvs/srv/detail/empty__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_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; + std_srvs__srv__Empty_Response__init(message_memory); +} + +void std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_fini_function(void * message_memory) +{ + std_srvs__srv__Empty_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__Empty_Response, structure_needs_at_least_one_member), // 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 std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_members = { + "std_srvs__srv", // message namespace + "Empty_Response", // message name + 1, // number of fields + sizeof(std_srvs__srv__Empty_Response), + std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_member_array, // message members + std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_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 std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle = { + 0, + &std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Response)() { + if (!std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__Empty_Response__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/empty__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 std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_members = { + "std_srvs__srv", // service namespace + "Empty", // service name + // these two fields are initialized below on the first access + NULL, // request message + // std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_Request_message_type_support_handle, + NULL // response message + // std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle = { + 0, + &std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_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, std_srvs, srv, Empty_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Empty)() { + if (!std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle.typesupport_identifier) { + std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_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, std_srvs, srv, Empty_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, std_srvs, srv, Empty_Response)()->data; + } + + return &std_srvs__srv__detail__empty__rosidl_typesupport_introspection_c__Empty_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.cpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.cpp new file mode 100644 index 000000000..e3e44808f --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.cpp @@ -0,0 +1,336 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_srvs:srv/Empty.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 "std_srvs/srv/detail/empty__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Empty_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::Empty_Request(_init); +} + +void Empty_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Empty_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::Empty_Request, structure_needs_at_least_one_member), // 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 Empty_Request_message_members = { + "std_srvs::srv", // message namespace + "Empty_Request", // message name + 1, // number of fields + sizeof(std_srvs::srv::Empty_Request), + Empty_Request_message_member_array, // message members + Empty_Request_init_function, // function to initialize message memory (memory has to be allocated) + Empty_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Empty_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Empty_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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, std_srvs, srv, Empty_Request)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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 "std_srvs/srv/detail/empty__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Empty_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::Empty_Response(_init); +} + +void Empty_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Empty_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Empty_Response_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::Empty_Response, structure_needs_at_least_one_member), // 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 Empty_Response_message_members = { + "std_srvs::srv", // message namespace + "Empty_Response", // message name + 1, // number of fields + sizeof(std_srvs::srv::Empty_Response), + Empty_Response_message_member_array, // message members + Empty_Response_init_function, // function to initialize message memory (memory has to be allocated) + Empty_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Empty_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Empty_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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, std_srvs, srv, Empty_Response)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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 "std_srvs/srv/detail/empty__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 std_srvs +{ + +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 Empty_service_members = { + "std_srvs::srv", // service namespace + "Empty", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t Empty_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Empty_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Empty_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( + 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< + ::std_srvs::srv::Empty_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< + ::std_srvs::srv::Empty_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, std_srvs, srv, Empty)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/empty__type_support.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.hpp new file mode 100644 index 000000000..2bad0b859 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/empty__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_srvs:srv/Empty.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ +#define STD_SRVS__SRV__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_srvs/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_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Empty +)(); +#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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Empty_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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Empty_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // STD_SRVS__SRV__DETAIL__EMPTY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__builder.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__builder.hpp new file mode 100644 index 000000000..8407b274d --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__builder.hpp @@ -0,0 +1,114 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ + +#include +#include + +#include "std_srvs/srv/detail/set_bool__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_srvs +{ + +namespace srv +{ + +namespace builder +{ + +class Init_SetBool_Request_data +{ +public: + Init_SetBool_Request_data() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::std_srvs::srv::SetBool_Request data(::std_srvs::srv::SetBool_Request::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::std_srvs::srv::SetBool_Request msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::SetBool_Request>() +{ + return std_srvs::srv::builder::Init_SetBool_Request_data(); +} + +} // namespace std_srvs + + +namespace std_srvs +{ + +namespace srv +{ + +namespace builder +{ + +class Init_SetBool_Response_message +{ +public: + explicit Init_SetBool_Response_message(::std_srvs::srv::SetBool_Response & msg) + : msg_(msg) + {} + ::std_srvs::srv::SetBool_Response message(::std_srvs::srv::SetBool_Response::_message_type arg) + { + msg_.message = std::move(arg); + return std::move(msg_); + } + +private: + ::std_srvs::srv::SetBool_Response msg_; +}; + +class Init_SetBool_Response_success +{ +public: + Init_SetBool_Response_success() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_SetBool_Response_message success(::std_srvs::srv::SetBool_Response::_success_type arg) + { + msg_.success = std::move(arg); + return Init_SetBool_Response_message(msg_); + } + +private: + ::std_srvs::srv::SetBool_Response msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::SetBool_Response>() +{ + return std_srvs::srv::builder::Init_SetBool_Response_success(); +} + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__functions.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__functions.c new file mode 100644 index 000000000..9e42cbbd5 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__functions.c @@ -0,0 +1,483 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice +#include "std_srvs/srv/detail/set_bool__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +bool +std_srvs__srv__SetBool_Request__init(std_srvs__srv__SetBool_Request * msg) +{ + if (!msg) { + return false; + } + // data + return true; +} + +void +std_srvs__srv__SetBool_Request__fini(std_srvs__srv__SetBool_Request * msg) +{ + if (!msg) { + return; + } + // data +} + +bool +std_srvs__srv__SetBool_Request__are_equal(const std_srvs__srv__SetBool_Request * lhs, const std_srvs__srv__SetBool_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // data + if (lhs->data != rhs->data) { + return false; + } + return true; +} + +bool +std_srvs__srv__SetBool_Request__copy( + const std_srvs__srv__SetBool_Request * input, + std_srvs__srv__SetBool_Request * output) +{ + if (!input || !output) { + return false; + } + // data + output->data = input->data; + return true; +} + +std_srvs__srv__SetBool_Request * +std_srvs__srv__SetBool_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Request * msg = (std_srvs__srv__SetBool_Request *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__SetBool_Request)); + bool success = std_srvs__srv__SetBool_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__SetBool_Request__destroy(std_srvs__srv__SetBool_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__SetBool_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__SetBool_Request__Sequence__init(std_srvs__srv__SetBool_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Request * data = NULL; + + if (size) { + data = (std_srvs__srv__SetBool_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__SetBool_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__SetBool_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__SetBool_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__SetBool_Request__Sequence__fini(std_srvs__srv__SetBool_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) { + std_srvs__srv__SetBool_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); + } +} + +std_srvs__srv__SetBool_Request__Sequence * +std_srvs__srv__SetBool_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Request__Sequence * array = (std_srvs__srv__SetBool_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__SetBool_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__SetBool_Request__Sequence__destroy(std_srvs__srv__SetBool_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__SetBool_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__SetBool_Request__Sequence__are_equal(const std_srvs__srv__SetBool_Request__Sequence * lhs, const std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__SetBool_Request__Sequence__copy( + const std_srvs__srv__SetBool_Request__Sequence * input, + std_srvs__srv__SetBool_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__SetBool_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Request * data = + (std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_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; ) { + std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +bool +std_srvs__srv__SetBool_Response__init(std_srvs__srv__SetBool_Response * msg) +{ + if (!msg) { + return false; + } + // success + // message + if (!rosidl_runtime_c__String__init(&msg->message)) { + std_srvs__srv__SetBool_Response__fini(msg); + return false; + } + return true; +} + +void +std_srvs__srv__SetBool_Response__fini(std_srvs__srv__SetBool_Response * msg) +{ + if (!msg) { + return; + } + // success + // message + rosidl_runtime_c__String__fini(&msg->message); +} + +bool +std_srvs__srv__SetBool_Response__are_equal(const std_srvs__srv__SetBool_Response * lhs, const std_srvs__srv__SetBool_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // success + if (lhs->success != rhs->success) { + return false; + } + // message + if (!rosidl_runtime_c__String__are_equal( + &(lhs->message), &(rhs->message))) + { + return false; + } + return true; +} + +bool +std_srvs__srv__SetBool_Response__copy( + const std_srvs__srv__SetBool_Response * input, + std_srvs__srv__SetBool_Response * output) +{ + if (!input || !output) { + return false; + } + // success + output->success = input->success; + // message + if (!rosidl_runtime_c__String__copy( + &(input->message), &(output->message))) + { + return false; + } + return true; +} + +std_srvs__srv__SetBool_Response * +std_srvs__srv__SetBool_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Response * msg = (std_srvs__srv__SetBool_Response *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__SetBool_Response)); + bool success = std_srvs__srv__SetBool_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__SetBool_Response__destroy(std_srvs__srv__SetBool_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__SetBool_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__SetBool_Response__Sequence__init(std_srvs__srv__SetBool_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Response * data = NULL; + + if (size) { + data = (std_srvs__srv__SetBool_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__SetBool_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__SetBool_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__SetBool_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__SetBool_Response__Sequence__fini(std_srvs__srv__SetBool_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) { + std_srvs__srv__SetBool_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); + } +} + +std_srvs__srv__SetBool_Response__Sequence * +std_srvs__srv__SetBool_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Response__Sequence * array = (std_srvs__srv__SetBool_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__SetBool_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__SetBool_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__SetBool_Response__Sequence__destroy(std_srvs__srv__SetBool_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__SetBool_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__SetBool_Response__Sequence__are_equal(const std_srvs__srv__SetBool_Response__Sequence * lhs, const std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__SetBool_Response__Sequence__copy( + const std_srvs__srv__SetBool_Response__Sequence * input, + std_srvs__srv__SetBool_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__SetBool_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__SetBool_Response * data = + (std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_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; ) { + std_srvs__srv__SetBool_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 (!std_srvs__srv__SetBool_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__functions.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__functions.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/set_bool__functions.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__functions.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..e9167d71b --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__SetBool_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__SetBool_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__SetBool_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__SetBool_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, SetBool)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..20aa5d2d3 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_srvs/srv/detail/set_bool__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::SetBool_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::SetBool_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::SetBool_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_SetBool_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/set_bool__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::SetBool_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::SetBool_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::SetBool_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_SetBool_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, SetBool)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.h new file mode 100644 index 000000000..b493d27ec --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.h @@ -0,0 +1,67 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in srv/SetBool in the package std_srvs. +typedef struct std_srvs__srv__SetBool_Request +{ + /// e.g. for hardware enabling / disabling + bool data; +} std_srvs__srv__SetBool_Request; + +// Struct for a sequence of std_srvs__srv__SetBool_Request. +typedef struct std_srvs__srv__SetBool_Request__Sequence +{ + std_srvs__srv__SetBool_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__SetBool_Request__Sequence; + + +// Constants defined in the message + +// Include directives for member types +// Member 'message' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/SetBool in the package std_srvs. +typedef struct std_srvs__srv__SetBool_Response +{ + /// indicate successful run of triggered service + bool success; + /// informational, e.g. for error messages + rosidl_runtime_c__String message; +} std_srvs__srv__SetBool_Response; + +// Struct for a sequence of std_srvs__srv__SetBool_Response. +typedef struct std_srvs__srv__SetBool_Response__Sequence +{ + std_srvs__srv__SetBool_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__SetBool_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.hpp new file mode 100644 index 000000000..806532ba5 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__struct.hpp @@ -0,0 +1,275 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__SetBool_Request __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__SetBool_Request __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct SetBool_Request_ +{ + using Type = SetBool_Request_; + + explicit SetBool_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->data = false; + } + } + + explicit SetBool_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->data = false; + } + } + + // field types and members + using _data_type = + bool; + _data_type data; + + // setters for named parameter idiom + Type & set__data( + const bool & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::SetBool_Request_ *; + using ConstRawPtr = + const std_srvs::srv::SetBool_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__SetBool_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__SetBool_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SetBool_Request_ & other) const + { + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const SetBool_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct SetBool_Request_ + +// alias to use template instance with default allocator +using SetBool_Request = + std_srvs::srv::SetBool_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__SetBool_Response __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__SetBool_Response __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct SetBool_Response_ +{ + using Type = SetBool_Response_; + + explicit SetBool_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->success = false; + this->message = ""; + } + } + + explicit SetBool_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : message(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->success = false; + this->message = ""; + } + } + + // field types and members + using _success_type = + bool; + _success_type success; + using _message_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _message_type message; + + // setters for named parameter idiom + Type & set__success( + const bool & _arg) + { + this->success = _arg; + return *this; + } + Type & set__message( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->message = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::SetBool_Response_ *; + using ConstRawPtr = + const std_srvs::srv::SetBool_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__SetBool_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__SetBool_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SetBool_Response_ & other) const + { + if (this->success != other.success) { + return false; + } + if (this->message != other.message) { + return false; + } + return true; + } + bool operator!=(const SetBool_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct SetBool_Response_ + +// alias to use template instance with default allocator +using SetBool_Response = + std_srvs::srv::SetBool_Response_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + +namespace std_srvs +{ + +namespace srv +{ + +struct SetBool +{ + using Request = std_srvs::srv::SetBool_Request; + using Response = std_srvs::srv::SetBool_Response; +}; + +} // namespace srv + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__traits.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__traits.hpp new file mode 100644 index 000000000..29ee1b402 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_srvs/srv/detail/set_bool__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetBool_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetBool_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetBool_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::SetBool_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::SetBool_Request & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::SetBool_Request"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/SetBool_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetBool_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetBool_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetBool_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::SetBool_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::SetBool_Response & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::SetBool_Response"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/SetBool_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::SetBool"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/SetBool"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.c new file mode 100644 index 000000000..c289d48d0 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.c @@ -0,0 +1,249 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#include +#include "std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" +#include "std_srvs/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 "std_srvs/srv/detail/set_bool__functions.h" +#include "std_srvs/srv/detail/set_bool__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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; + std_srvs__srv__SetBool_Request__init(message_memory); +} + +void std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_fini_function(void * message_memory) +{ + std_srvs__srv__SetBool_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__SetBool_Request, data), // 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 std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members = { + "std_srvs__srv", // message namespace + "SetBool_Request", // message name + 1, // number of fields + sizeof(std_srvs__srv__SetBool_Request), + std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_member_array, // message members + std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_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 std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle = { + 0, + &std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Request)() { + if (!std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__SetBool_Request__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "std_srvs/srv/detail/set_bool__rosidl_typesupport_introspection_c.h" +// already included above +// #include "std_srvs/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 "std_srvs/srv/detail/set_bool__functions.h" +// already included above +// #include "std_srvs/srv/detail/set_bool__struct.h" + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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; + std_srvs__srv__SetBool_Response__init(message_memory); +} + +void std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_fini_function(void * message_memory) +{ + std_srvs__srv__SetBool_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__SetBool_Response, success), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__SetBool_Response, message), // 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 std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members = { + "std_srvs__srv", // message namespace + "SetBool_Response", // message name + 2, // number of fields + sizeof(std_srvs__srv__SetBool_Response), + std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_member_array, // message members + std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_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 std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle = { + 0, + &std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Response)() { + if (!std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__SetBool_Response__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/set_bool__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 std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_members = { + "std_srvs__srv", // service namespace + "SetBool", // service name + // these two fields are initialized below on the first access + NULL, // request message + // std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Request_message_type_support_handle, + NULL // response message + // std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle = { + 0, + &std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, std_srvs, srv, SetBool_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, SetBool)() { + if (!std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier) { + std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_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, std_srvs, srv, SetBool_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, std_srvs, srv, SetBool_Response)()->data; + } + + return &std_srvs__srv__detail__set_bool__rosidl_typesupport_introspection_c__SetBool_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.cpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.cpp new file mode 100644 index 000000000..099999366 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.cpp @@ -0,0 +1,353 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_srvs:srv/SetBool.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 "std_srvs/srv/detail/set_bool__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SetBool_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::SetBool_Request(_init); +} + +void SetBool_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SetBool_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Request_message_member_array[1] = { + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::SetBool_Request, data), // 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 SetBool_Request_message_members = { + "std_srvs::srv", // message namespace + "SetBool_Request", // message name + 1, // number of fields + sizeof(std_srvs::srv::SetBool_Request), + SetBool_Request_message_member_array, // message members + SetBool_Request_init_function, // function to initialize message memory (memory has to be allocated) + SetBool_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SetBool_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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, std_srvs, srv, SetBool_Request)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "std_srvs/srv/detail/set_bool__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SetBool_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::SetBool_Response(_init); +} + +void SetBool_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SetBool_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SetBool_Response_message_member_array[2] = { + { + "success", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::SetBool_Response, success), // 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 + }, + { + "message", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::SetBool_Response, message), // 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 SetBool_Response_message_members = { + "std_srvs::srv", // message namespace + "SetBool_Response", // message name + 2, // number of fields + sizeof(std_srvs::srv::SetBool_Response), + SetBool_Response_message_member_array, // message members + SetBool_Response_init_function, // function to initialize message memory (memory has to be allocated) + SetBool_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SetBool_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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, std_srvs, srv, SetBool_Response)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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 "std_srvs/srv/detail/set_bool__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 std_srvs +{ + +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 SetBool_service_members = { + "std_srvs::srv", // service namespace + "SetBool", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t SetBool_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SetBool_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::std_srvs::srv::rosidl_typesupport_introspection_cpp::SetBool_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( + 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< + ::std_srvs::srv::SetBool_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< + ::std_srvs::srv::SetBool_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, std_srvs, srv, SetBool)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/set_bool__type_support.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.hpp new file mode 100644 index 000000000..cad0a033f --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/set_bool__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_srvs:srv/SetBool.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ +#define STD_SRVS__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_srvs/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_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + SetBool +)(); +#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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + SetBool_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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + SetBool_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // STD_SRVS__SRV__DETAIL__SET_BOOL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__builder.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__builder.hpp new file mode 100644 index 000000000..3477d855f --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__builder.hpp @@ -0,0 +1,94 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ + +#include +#include + +#include "std_srvs/srv/detail/trigger__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace std_srvs +{ + +namespace srv +{ + + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::Trigger_Request>() +{ + return ::std_srvs::srv::Trigger_Request(rosidl_runtime_cpp::MessageInitialization::ZERO); +} + +} // namespace std_srvs + + +namespace std_srvs +{ + +namespace srv +{ + +namespace builder +{ + +class Init_Trigger_Response_message +{ +public: + explicit Init_Trigger_Response_message(::std_srvs::srv::Trigger_Response & msg) + : msg_(msg) + {} + ::std_srvs::srv::Trigger_Response message(::std_srvs::srv::Trigger_Response::_message_type arg) + { + msg_.message = std::move(arg); + return std::move(msg_); + } + +private: + ::std_srvs::srv::Trigger_Response msg_; +}; + +class Init_Trigger_Response_success +{ +public: + Init_Trigger_Response_success() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Trigger_Response_message success(::std_srvs::srv::Trigger_Response::_success_type arg) + { + msg_.success = std::move(arg); + return Init_Trigger_Response_message(msg_); + } + +private: + ::std_srvs::srv::Trigger_Response msg_; +}; + +} // namespace builder + +} // namespace srv + +template +auto build(); + +template<> +inline +auto build<::std_srvs::srv::Trigger_Response>() +{ + return std_srvs::srv::builder::Init_Trigger_Response_success(); +} + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__functions.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__functions.c new file mode 100644 index 000000000..49052134a --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__functions.c @@ -0,0 +1,483 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice +#include "std_srvs/srv/detail/trigger__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + +bool +std_srvs__srv__Trigger_Request__init(std_srvs__srv__Trigger_Request * msg) +{ + if (!msg) { + return false; + } + // structure_needs_at_least_one_member + return true; +} + +void +std_srvs__srv__Trigger_Request__fini(std_srvs__srv__Trigger_Request * msg) +{ + if (!msg) { + return; + } + // structure_needs_at_least_one_member +} + +bool +std_srvs__srv__Trigger_Request__are_equal(const std_srvs__srv__Trigger_Request * lhs, const std_srvs__srv__Trigger_Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // structure_needs_at_least_one_member + if (lhs->structure_needs_at_least_one_member != rhs->structure_needs_at_least_one_member) { + return false; + } + return true; +} + +bool +std_srvs__srv__Trigger_Request__copy( + const std_srvs__srv__Trigger_Request * input, + std_srvs__srv__Trigger_Request * output) +{ + if (!input || !output) { + return false; + } + // structure_needs_at_least_one_member + output->structure_needs_at_least_one_member = input->structure_needs_at_least_one_member; + return true; +} + +std_srvs__srv__Trigger_Request * +std_srvs__srv__Trigger_Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Request * msg = (std_srvs__srv__Trigger_Request *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__Trigger_Request)); + bool success = std_srvs__srv__Trigger_Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__Trigger_Request__destroy(std_srvs__srv__Trigger_Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__Trigger_Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__Trigger_Request__Sequence__init(std_srvs__srv__Trigger_Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Request * data = NULL; + + if (size) { + data = (std_srvs__srv__Trigger_Request *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Trigger_Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__Trigger_Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__Trigger_Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__Trigger_Request__Sequence__fini(std_srvs__srv__Trigger_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) { + std_srvs__srv__Trigger_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); + } +} + +std_srvs__srv__Trigger_Request__Sequence * +std_srvs__srv__Trigger_Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Request__Sequence * array = (std_srvs__srv__Trigger_Request__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__Trigger_Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__Trigger_Request__Sequence__destroy(std_srvs__srv__Trigger_Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__Trigger_Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__Trigger_Request__Sequence__are_equal(const std_srvs__srv__Trigger_Request__Sequence * lhs, const std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__Trigger_Request__Sequence__copy( + const std_srvs__srv__Trigger_Request__Sequence * input, + std_srvs__srv__Trigger_Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__Trigger_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Request * data = + (std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_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; ) { + std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +bool +std_srvs__srv__Trigger_Response__init(std_srvs__srv__Trigger_Response * msg) +{ + if (!msg) { + return false; + } + // success + // message + if (!rosidl_runtime_c__String__init(&msg->message)) { + std_srvs__srv__Trigger_Response__fini(msg); + return false; + } + return true; +} + +void +std_srvs__srv__Trigger_Response__fini(std_srvs__srv__Trigger_Response * msg) +{ + if (!msg) { + return; + } + // success + // message + rosidl_runtime_c__String__fini(&msg->message); +} + +bool +std_srvs__srv__Trigger_Response__are_equal(const std_srvs__srv__Trigger_Response * lhs, const std_srvs__srv__Trigger_Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // success + if (lhs->success != rhs->success) { + return false; + } + // message + if (!rosidl_runtime_c__String__are_equal( + &(lhs->message), &(rhs->message))) + { + return false; + } + return true; +} + +bool +std_srvs__srv__Trigger_Response__copy( + const std_srvs__srv__Trigger_Response * input, + std_srvs__srv__Trigger_Response * output) +{ + if (!input || !output) { + return false; + } + // success + output->success = input->success; + // message + if (!rosidl_runtime_c__String__copy( + &(input->message), &(output->message))) + { + return false; + } + return true; +} + +std_srvs__srv__Trigger_Response * +std_srvs__srv__Trigger_Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Response * msg = (std_srvs__srv__Trigger_Response *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(std_srvs__srv__Trigger_Response)); + bool success = std_srvs__srv__Trigger_Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +std_srvs__srv__Trigger_Response__destroy(std_srvs__srv__Trigger_Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + std_srvs__srv__Trigger_Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +std_srvs__srv__Trigger_Response__Sequence__init(std_srvs__srv__Trigger_Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Response * data = NULL; + + if (size) { + data = (std_srvs__srv__Trigger_Response *)allocator.zero_allocate(size, sizeof(std_srvs__srv__Trigger_Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = std_srvs__srv__Trigger_Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + std_srvs__srv__Trigger_Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +std_srvs__srv__Trigger_Response__Sequence__fini(std_srvs__srv__Trigger_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) { + std_srvs__srv__Trigger_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); + } +} + +std_srvs__srv__Trigger_Response__Sequence * +std_srvs__srv__Trigger_Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Response__Sequence * array = (std_srvs__srv__Trigger_Response__Sequence *)allocator.allocate(sizeof(std_srvs__srv__Trigger_Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = std_srvs__srv__Trigger_Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +std_srvs__srv__Trigger_Response__Sequence__destroy(std_srvs__srv__Trigger_Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + std_srvs__srv__Trigger_Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +std_srvs__srv__Trigger_Response__Sequence__are_equal(const std_srvs__srv__Trigger_Response__Sequence * lhs, const std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +std_srvs__srv__Trigger_Response__Sequence__copy( + const std_srvs__srv__Trigger_Response__Sequence * input, + std_srvs__srv__Trigger_Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(std_srvs__srv__Trigger_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + std_srvs__srv__Trigger_Response * data = + (std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_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; ) { + std_srvs__srv__Trigger_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 (!std_srvs__srv__Trigger_Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__functions.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__functions.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/trigger__functions.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__functions.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..74d4a5442 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,89 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__Trigger_Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__Trigger_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger_Request)(); + +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// 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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t get_serialized_size_std_srvs__srv__Trigger_Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +size_t max_serialized_size_std_srvs__srv__Trigger_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, std_srvs, srv, Trigger)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..ba072458f --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "std_srvs/srv/detail/trigger__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::Trigger_Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::Trigger_Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::Trigger_Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_Trigger_Request( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/trigger__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 std_srvs +{ + +namespace srv +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_serialize( + const std_srvs::srv::Trigger_Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + std_srvs::srv::Trigger_Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +get_serialized_size( + const std_srvs::srv::Trigger_Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +max_serialized_size_Trigger_Response( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace srv + +} // namespace std_srvs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger_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 "std_srvs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, std_srvs, srv, Trigger)(); + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.h new file mode 100644 index 000000000..18cd27eac --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.h @@ -0,0 +1,66 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in srv/Trigger in the package std_srvs. +typedef struct std_srvs__srv__Trigger_Request +{ + uint8_t structure_needs_at_least_one_member; +} std_srvs__srv__Trigger_Request; + +// Struct for a sequence of std_srvs__srv__Trigger_Request. +typedef struct std_srvs__srv__Trigger_Request__Sequence +{ + std_srvs__srv__Trigger_Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__Trigger_Request__Sequence; + + +// Constants defined in the message + +// Include directives for member types +// Member 'message' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in srv/Trigger in the package std_srvs. +typedef struct std_srvs__srv__Trigger_Response +{ + /// indicate successful run of triggered service + bool success; + /// informational, e.g. for error messages + rosidl_runtime_c__String message; +} std_srvs__srv__Trigger_Response; + +// Struct for a sequence of std_srvs__srv__Trigger_Response. +typedef struct std_srvs__srv__Trigger_Response__Sequence +{ + std_srvs__srv__Trigger_Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} std_srvs__srv__Trigger_Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_H_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.hpp new file mode 100644 index 000000000..0a0b314a2 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__struct.hpp @@ -0,0 +1,268 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__Trigger_Request __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__Trigger_Request __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct Trigger_Request_ +{ + using Type = Trigger_Request_; + + explicit Trigger_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->structure_needs_at_least_one_member = 0; + } + } + + explicit Trigger_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->structure_needs_at_least_one_member = 0; + } + } + + // field types and members + using _structure_needs_at_least_one_member_type = + uint8_t; + _structure_needs_at_least_one_member_type structure_needs_at_least_one_member; + + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::Trigger_Request_ *; + using ConstRawPtr = + const std_srvs::srv::Trigger_Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__Trigger_Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__Trigger_Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Trigger_Request_ & other) const + { + if (this->structure_needs_at_least_one_member != other.structure_needs_at_least_one_member) { + return false; + } + return true; + } + bool operator!=(const Trigger_Request_ & other) const + { + return !this->operator==(other); + } +}; // struct Trigger_Request_ + +// alias to use template instance with default allocator +using Trigger_Request = + std_srvs::srv::Trigger_Request_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + + +#ifndef _WIN32 +# define DEPRECATED__std_srvs__srv__Trigger_Response __attribute__((deprecated)) +#else +# define DEPRECATED__std_srvs__srv__Trigger_Response __declspec(deprecated) +#endif + +namespace std_srvs +{ + +namespace srv +{ + +// message struct +template +struct Trigger_Response_ +{ + using Type = Trigger_Response_; + + explicit Trigger_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->success = false; + this->message = ""; + } + } + + explicit Trigger_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : message(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->success = false; + this->message = ""; + } + } + + // field types and members + using _success_type = + bool; + _success_type success; + using _message_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _message_type message; + + // setters for named parameter idiom + Type & set__success( + const bool & _arg) + { + this->success = _arg; + return *this; + } + Type & set__message( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->message = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + std_srvs::srv::Trigger_Response_ *; + using ConstRawPtr = + const std_srvs::srv::Trigger_Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__std_srvs__srv__Trigger_Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__std_srvs__srv__Trigger_Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Trigger_Response_ & other) const + { + if (this->success != other.success) { + return false; + } + if (this->message != other.message) { + return false; + } + return true; + } + bool operator!=(const Trigger_Response_ & other) const + { + return !this->operator==(other); + } +}; // struct Trigger_Response_ + +// alias to use template instance with default allocator +using Trigger_Response = + std_srvs::srv::Trigger_Response_>; + +// constant definitions + +} // namespace srv + +} // namespace std_srvs + +namespace std_srvs +{ + +namespace srv +{ + +struct Trigger +{ + using Request = std_srvs::srv::Trigger_Request; + using Response = std_srvs::srv::Trigger_Response; +}; + +} // namespace srv + +} // namespace std_srvs + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__traits.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__traits.hpp new file mode 100644 index 000000000..a555f3314 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__traits.hpp @@ -0,0 +1,262 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "std_srvs/srv/detail/trigger__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Trigger_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Trigger_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Trigger_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::Trigger_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::Trigger_Request & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Trigger_Request"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Trigger_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace std_srvs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Trigger_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: message + { + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Trigger_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "message: "; + rosidl_generator_traits::value_to_yaml(msg.message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Trigger_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 std_srvs + +namespace rosidl_generator_traits +{ + +[[deprecated("use std_srvs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const std_srvs::srv::Trigger_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + std_srvs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use std_srvs::srv::to_yaml() instead")]] +inline std::string to_yaml(const std_srvs::srv::Trigger_Response & msg) +{ + return std_srvs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Trigger_Response"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Trigger_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "std_srvs::srv::Trigger"; +} + +template<> +inline const char * name() +{ + return "std_srvs/srv/Trigger"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.c b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.c new file mode 100644 index 000000000..43d15a405 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.c @@ -0,0 +1,249 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#include +#include "std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h" +#include "std_srvs/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 "std_srvs/srv/detail/trigger__functions.h" +#include "std_srvs/srv/detail/trigger__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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; + std_srvs__srv__Trigger_Request__init(message_memory); +} + +void std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_fini_function(void * message_memory) +{ + std_srvs__srv__Trigger_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__Trigger_Request, structure_needs_at_least_one_member), // 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 std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members = { + "std_srvs__srv", // message namespace + "Trigger_Request", // message name + 1, // number of fields + sizeof(std_srvs__srv__Trigger_Request), + std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_member_array, // message members + std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_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 std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle = { + 0, + &std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Request)() { + if (!std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__Trigger_Request__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "std_srvs/srv/detail/trigger__rosidl_typesupport_introspection_c.h" +// already included above +// #include "std_srvs/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 "std_srvs/srv/detail/trigger__functions.h" +// already included above +// #include "std_srvs/srv/detail/trigger__struct.h" + + +// Include directives for member types +// Member `message` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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; + std_srvs__srv__Trigger_Response__init(message_memory); +} + +void std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_fini_function(void * message_memory) +{ + std_srvs__srv__Trigger_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__Trigger_Response, success), // 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 + }, + { + "message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs__srv__Trigger_Response, message), // 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 std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members = { + "std_srvs__srv", // message namespace + "Trigger_Response", // message name + 2, // number of fields + sizeof(std_srvs__srv__Trigger_Response), + std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_member_array, // message members + std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) + std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_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 std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle = { + 0, + &std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Response)() { + if (!std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier) { + std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &std_srvs__srv__Trigger_Response__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "std_srvs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "std_srvs/srv/detail/trigger__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 std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_members = { + "std_srvs__srv", // service namespace + "Trigger", // service name + // these two fields are initialized below on the first access + NULL, // request message + // std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Request_message_type_support_handle, + NULL // response message + // std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle = { + 0, + &std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, std_srvs, srv, Trigger_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_std_srvs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_srvs, srv, Trigger)() { + if (!std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier) { + std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_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, std_srvs, srv, Trigger_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, std_srvs, srv, Trigger_Response)()->data; + } + + return &std_srvs__srv__detail__trigger__rosidl_typesupport_introspection_c__Trigger_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.cpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.cpp new file mode 100644 index 000000000..43100b87e --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.cpp @@ -0,0 +1,353 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from std_srvs:srv/Trigger.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 "std_srvs/srv/detail/trigger__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Trigger_Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::Trigger_Request(_init); +} + +void Trigger_Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Trigger_Request(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::Trigger_Request, structure_needs_at_least_one_member), // 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 Trigger_Request_message_members = { + "std_srvs::srv", // message namespace + "Trigger_Request", // message name + 1, // number of fields + sizeof(std_srvs::srv::Trigger_Request), + Trigger_Request_message_member_array, // message members + Trigger_Request_init_function, // function to initialize message memory (memory has to be allocated) + Trigger_Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Trigger_Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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, std_srvs, srv, Trigger_Request)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "std_srvs/srv/detail/trigger__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 std_srvs +{ + +namespace srv +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Trigger_Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) std_srvs::srv::Trigger_Response(_init); +} + +void Trigger_Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Trigger_Response(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Trigger_Response_message_member_array[2] = { + { + "success", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::Trigger_Response, success), // 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 + }, + { + "message", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(std_srvs::srv::Trigger_Response, message), // 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 Trigger_Response_message_members = { + "std_srvs::srv", // message namespace + "Trigger_Response", // message name + 2, // number of fields + sizeof(std_srvs::srv::Trigger_Response), + Trigger_Response_message_member_array, // message members + Trigger_Response_init_function, // function to initialize message memory (memory has to be allocated) + Trigger_Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Trigger_Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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, std_srvs, srv, Trigger_Response)() { + return &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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 "std_srvs/srv/detail/trigger__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 std_srvs +{ + +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 Trigger_service_members = { + "std_srvs::srv", // service namespace + "Trigger", // service name + // these two fields are initialized below on the first access + // see get_service_type_support_handle() + nullptr, // request message + nullptr // response message +}; + +static const rosidl_service_type_support_t Trigger_service_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Trigger_service_members, + get_service_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace srv + +} // namespace std_srvs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_service_type_support_t * +get_service_type_support_handle() +{ + // get a handle to the value to be returned + auto service_type_support = + &::std_srvs::srv::rosidl_typesupport_introspection_cpp::Trigger_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( + 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< + ::std_srvs::srv::Trigger_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< + ::std_srvs::srv::Trigger_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, std_srvs, srv, Trigger)() { + return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle(); +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/detail/trigger__type_support.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.hpp new file mode 100644 index 000000000..2918401bf --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/detail/trigger__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from std_srvs:srv/Trigger.idl +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ +#define STD_SRVS__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "std_srvs/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_std_srvs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Trigger +)(); +#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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Trigger_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_std_srvs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + std_srvs, + srv, + Trigger_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // STD_SRVS__SRV__DETAIL__TRIGGER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/empty.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/empty.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/empty.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/empty.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/empty.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/empty.hpp new file mode 100644 index 000000000..422885f29 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/empty.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__EMPTY_HPP_ +#define STD_SRVS__SRV__EMPTY_HPP_ + +#include "std_srvs/srv/detail/empty__struct.hpp" +#include "std_srvs/srv/detail/empty__builder.hpp" +#include "std_srvs/srv/detail/empty__traits.hpp" +#include "std_srvs/srv/detail/empty__type_support.hpp" + +#endif // STD_SRVS__SRV__EMPTY_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/set_bool.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/set_bool.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/set_bool.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/set_bool.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/set_bool.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/set_bool.hpp new file mode 100644 index 000000000..dd2829f79 --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/set_bool.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__SET_BOOL_HPP_ +#define STD_SRVS__SRV__SET_BOOL_HPP_ + +#include "std_srvs/srv/detail/set_bool__struct.hpp" +#include "std_srvs/srv/detail/set_bool__builder.hpp" +#include "std_srvs/srv/detail/set_bool__traits.hpp" +#include "std_srvs/srv/detail/set_bool__type_support.hpp" + +#endif // STD_SRVS__SRV__SET_BOOL_HPP_ diff --git a/ThirdParty/ros/include/std_srvs/srv/trigger.h b/ThirdParty/ros/include/std_srvs/std_srvs/srv/trigger.h similarity index 100% rename from ThirdParty/ros/include/std_srvs/srv/trigger.h rename to ThirdParty/ros/include/std_srvs/std_srvs/srv/trigger.h diff --git a/ThirdParty/ros/include/std_srvs/std_srvs/srv/trigger.hpp b/ThirdParty/ros/include/std_srvs/std_srvs/srv/trigger.hpp new file mode 100644 index 000000000..8e7da2e2e --- /dev/null +++ b/ThirdParty/ros/include/std_srvs/std_srvs/srv/trigger.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef STD_SRVS__SRV__TRIGGER_HPP_ +#define STD_SRVS__SRV__TRIGGER_HPP_ + +#include "std_srvs/srv/detail/trigger__struct.hpp" +#include "std_srvs/srv/detail/trigger__builder.hpp" +#include "std_srvs/srv/detail/trigger__traits.hpp" +#include "std_srvs/srv/detail/trigger__type_support.hpp" + +#endif // STD_SRVS__SRV__TRIGGER_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.h b/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.h deleted file mode 100644 index 395382953..000000000 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.h +++ /dev/null @@ -1,55 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from stereo_msgs:msg/DisparityImage.idl -// generated code does not contain a copyright notice - -#ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ -#define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'image' -#include "sensor_msgs/msg/detail/image__struct.h" -// Member 'valid_window' -#include "sensor_msgs/msg/detail/region_of_interest__struct.h" - -// Struct defined in msg/DisparityImage in the package stereo_msgs. -typedef struct stereo_msgs__msg__DisparityImage -{ - std_msgs__msg__Header header; - sensor_msgs__msg__Image image; - float f; - float t; - sensor_msgs__msg__RegionOfInterest valid_window; - float min_disparity; - float max_disparity; - float delta_d; -} stereo_msgs__msg__DisparityImage; - -// Struct for a sequence of stereo_msgs__msg__DisparityImage. -typedef struct stereo_msgs__msg__DisparityImage__Sequence -{ - stereo_msgs__msg__DisparityImage * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} stereo_msgs__msg__DisparityImage__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__traits.hpp b/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__traits.hpp deleted file mode 100644 index 9f259ed31..000000000 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__traits.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from stereo_msgs:msg/DisparityImage.idl -// generated code does not contain a copyright notice - -#ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ -#define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ - -#include "stereo_msgs/msg/detail/disparity_image__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'image' -#include "sensor_msgs/msg/detail/image__traits.hpp" -// Member 'valid_window' -#include "sensor_msgs/msg/detail/region_of_interest__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "stereo_msgs::msg::DisparityImage"; -} - -template<> -inline const char * name() -{ - return "stereo_msgs/msg/DisparityImage"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.c b/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.c deleted file mode 100644 index 49b4ede32..000000000 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.c +++ /dev/null @@ -1,206 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from stereo_msgs:msg/DisparityImage.idl -// generated code does not contain a copyright notice - -#include -#include "stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h" -#include "stereo_msgs/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 "stereo_msgs/msg/detail/disparity_image__functions.h" -#include "stereo_msgs/msg/detail/disparity_image__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `image` -#include "sensor_msgs/msg/image.h" -// Member `image` -#include "sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h" -// Member `valid_window` -#include "sensor_msgs/msg/region_of_interest.h" -// Member `valid_window` -#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_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; - stereo_msgs__msg__DisparityImage__init(message_memory); -} - -void DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_fini_function(void * message_memory) -{ - stereo_msgs__msg__DisparityImage__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[8] = { - { - "header", // 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(stereo_msgs__msg__DisparityImage, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "image", // 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(stereo_msgs__msg__DisparityImage, image), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "f", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(stereo_msgs__msg__DisparityImage, f), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "t", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(stereo_msgs__msg__DisparityImage, t), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "valid_window", // 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(stereo_msgs__msg__DisparityImage, valid_window), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "min_disparity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(stereo_msgs__msg__DisparityImage, min_disparity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "max_disparity", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(stereo_msgs__msg__DisparityImage, max_disparity), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "delta_d", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(stereo_msgs__msg__DisparityImage, delta_d), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_members = { - "stereo_msgs__msg", // message namespace - "DisparityImage", // message name - 8, // number of fields - sizeof(stereo_msgs__msg__DisparityImage), - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array, // message members - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_init_function, // function to initialize message memory (memory has to be allocated) - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_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 DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle = { - 0, - &DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_stereo_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, stereo_msgs, msg, DisparityImage)() { - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Image)(); - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)(); - if (!DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle.typesupport_identifier) { - DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__builder.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__builder.hpp similarity index 98% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__builder.hpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__builder.hpp index 7e2a1d478..9a3211f82 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__builder.hpp +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__builder.hpp @@ -5,11 +5,12 @@ #ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__BUILDER_HPP_ #define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__BUILDER_HPP_ -#include "stereo_msgs/msg/detail/disparity_image__struct.hpp" -#include #include #include +#include "stereo_msgs/msg/detail/disparity_image__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace stereo_msgs { diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__functions.c b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__functions.c similarity index 92% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__functions.c rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__functions.c index 34816edb4..96a39f2fa 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__functions.c +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__functions.c @@ -298,22 +298,27 @@ stereo_msgs__msg__DisparityImage__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(stereo_msgs__msg__DisparityImage); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); stereo_msgs__msg__DisparityImage * data = - (stereo_msgs__msg__DisparityImage *)realloc(output->data, allocation_size); + (stereo_msgs__msg__DisparityImage *)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 (!stereo_msgs__msg__DisparityImage__init(&data[i])) { - /* free currently allocated and return false */ + if (!stereo_msgs__msg__DisparityImage__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; ) { - stereo_msgs__msg__DisparityImage__fini(&data[i]); + stereo_msgs__msg__DisparityImage__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__functions.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__functions.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__functions.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__functions.h diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h index df2ebc5ce..6ea228189 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_stereo_msgs__msg__DisparityImage( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_stereo_msgs size_t max_serialized_size_stereo_msgs__msg__DisparityImage( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_stereo_msgs diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp index 444531cd7..7f3e6875d 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_stereo_msgs max_serialized_size_DisparityImage( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.h new file mode 100644 index 000000000..a4436278c --- /dev/null +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.h @@ -0,0 +1,75 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from stereo_msgs:msg/DisparityImage.idl +// generated code does not contain a copyright notice + +#ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ +#define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'image' +#include "sensor_msgs/msg/detail/image__struct.h" +// Member 'valid_window' +#include "sensor_msgs/msg/detail/region_of_interest__struct.h" + +/// Struct defined in msg/DisparityImage in the package stereo_msgs. +/** + * Separate header for compatibility with current TimeSynchronizer. + * Likely to be removed in a later release, use image.header instead. + */ +typedef struct stereo_msgs__msg__DisparityImage +{ + std_msgs__msg__Header header; + /// Floating point disparity image. The disparities are pre-adjusted for any + /// x-offset between the principal points of the two cameras (in the case + /// that they are verged). That is: d = x_l - x_r - (cx_l - cx_r) + sensor_msgs__msg__Image image; + /// Stereo geometry. For disparity d, the depth from the camera is Z = fT/d. + /// Focal length, pixels + float f; + /// Baseline, world units + float t; + /// Subwindow of (potentially) valid disparity values. + sensor_msgs__msg__RegionOfInterest valid_window; + /// The range of disparities searched. + /// In the disparity image, any disparity less than min_disparity is invalid. + /// The disparity search range defines the horopter, or 3D volume that the + /// stereo algorithm can "see". Points with Z outside of: + /// Z_min = fT / max_disparity + /// Z_max = fT / min_disparity + /// could not be found. + float min_disparity; + float max_disparity; + /// Smallest allowed disparity increment. The smallest achievable depth range + /// resolution is delta_Z = (Z^2/fT)*delta_d. + float delta_d; +} stereo_msgs__msg__DisparityImage; + +// Struct for a sequence of stereo_msgs__msg__DisparityImage. +typedef struct stereo_msgs__msg__DisparityImage__Sequence +{ + stereo_msgs__msg__DisparityImage * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} stereo_msgs__msg__DisparityImage__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_H_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.hpp similarity index 98% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.hpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.hpp index a47b18eb2..5d2ee60b8 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__struct.hpp +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__struct.hpp @@ -5,14 +5,15 @@ #ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_HPP_ #define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' diff --git a/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__traits.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__traits.hpp new file mode 100644 index 000000000..3ead9b9c0 --- /dev/null +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__traits.hpp @@ -0,0 +1,233 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from stereo_msgs:msg/DisparityImage.idl +// generated code does not contain a copyright notice + +#ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ +#define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "stereo_msgs/msg/detail/disparity_image__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'image' +#include "sensor_msgs/msg/detail/image__traits.hpp" +// Member 'valid_window' +#include "sensor_msgs/msg/detail/region_of_interest__traits.hpp" + +namespace stereo_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const DisparityImage & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: image + { + out << "image: "; + to_flow_style_yaml(msg.image, out); + out << ", "; + } + + // member: f + { + out << "f: "; + rosidl_generator_traits::value_to_yaml(msg.f, out); + out << ", "; + } + + // member: t + { + out << "t: "; + rosidl_generator_traits::value_to_yaml(msg.t, out); + out << ", "; + } + + // member: valid_window + { + out << "valid_window: "; + to_flow_style_yaml(msg.valid_window, out); + out << ", "; + } + + // member: min_disparity + { + out << "min_disparity: "; + rosidl_generator_traits::value_to_yaml(msg.min_disparity, out); + out << ", "; + } + + // member: max_disparity + { + out << "max_disparity: "; + rosidl_generator_traits::value_to_yaml(msg.max_disparity, out); + out << ", "; + } + + // member: delta_d + { + out << "delta_d: "; + rosidl_generator_traits::value_to_yaml(msg.delta_d, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DisparityImage & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: image + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "image:\n"; + to_block_style_yaml(msg.image, out, indentation + 2); + } + + // member: f + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "f: "; + rosidl_generator_traits::value_to_yaml(msg.f, out); + out << "\n"; + } + + // member: t + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "t: "; + rosidl_generator_traits::value_to_yaml(msg.t, out); + out << "\n"; + } + + // member: valid_window + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "valid_window:\n"; + to_block_style_yaml(msg.valid_window, out, indentation + 2); + } + + // member: min_disparity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "min_disparity: "; + rosidl_generator_traits::value_to_yaml(msg.min_disparity, out); + out << "\n"; + } + + // member: max_disparity + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "max_disparity: "; + rosidl_generator_traits::value_to_yaml(msg.max_disparity, out); + out << "\n"; + } + + // member: delta_d + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "delta_d: "; + rosidl_generator_traits::value_to_yaml(msg.delta_d, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DisparityImage & 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 stereo_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use stereo_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const stereo_msgs::msg::DisparityImage & msg, + std::ostream & out, size_t indentation = 0) +{ + stereo_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use stereo_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const stereo_msgs::msg::DisparityImage & msg) +{ + return stereo_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "stereo_msgs::msg::DisparityImage"; +} + +template<> +inline const char * name() +{ + return "stereo_msgs/msg/DisparityImage"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.c b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.c new file mode 100644 index 000000000..0d0681fdc --- /dev/null +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.c @@ -0,0 +1,222 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from stereo_msgs:msg/DisparityImage.idl +// generated code does not contain a copyright notice + +#include +#include "stereo_msgs/msg/detail/disparity_image__rosidl_typesupport_introspection_c.h" +#include "stereo_msgs/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 "stereo_msgs/msg/detail/disparity_image__functions.h" +#include "stereo_msgs/msg/detail/disparity_image__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `image` +#include "sensor_msgs/msg/image.h" +// Member `image` +#include "sensor_msgs/msg/detail/image__rosidl_typesupport_introspection_c.h" +// Member `valid_window` +#include "sensor_msgs/msg/region_of_interest.h" +// Member `valid_window` +#include "sensor_msgs/msg/detail/region_of_interest__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_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; + stereo_msgs__msg__DisparityImage__init(message_memory); +} + +void stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_fini_function(void * message_memory) +{ + stereo_msgs__msg__DisparityImage__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[8] = { + { + "header", // 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(stereo_msgs__msg__DisparityImage, header), // 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 + }, + { + "image", // 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(stereo_msgs__msg__DisparityImage, image), // 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 + }, + { + "f", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(stereo_msgs__msg__DisparityImage, f), // 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 + }, + { + "t", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(stereo_msgs__msg__DisparityImage, t), // 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 + }, + { + "valid_window", // 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(stereo_msgs__msg__DisparityImage, valid_window), // 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 + }, + { + "min_disparity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(stereo_msgs__msg__DisparityImage, min_disparity), // 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 + }, + { + "max_disparity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(stereo_msgs__msg__DisparityImage, max_disparity), // 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 + }, + { + "delta_d", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(stereo_msgs__msg__DisparityImage, delta_d), // 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 stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_members = { + "stereo_msgs__msg", // message namespace + "DisparityImage", // message name + 8, // number of fields + sizeof(stereo_msgs__msg__DisparityImage), + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array, // message members + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_init_function, // function to initialize message memory (memory has to be allocated) + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_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 stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle = { + 0, + &stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_stereo_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, stereo_msgs, msg, DisparityImage)() { + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, Image)(); + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, RegionOfInterest)(); + if (!stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle.typesupport_identifier) { + stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &stereo_msgs__msg__DisparityImage__rosidl_typesupport_introspection_c__DisparityImage_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.cpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.cpp similarity index 89% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.cpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.cpp index fa7d2958b..cda662ce9 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.cpp +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -141,6 +153,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 }, { @@ -156,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DisparityImag 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 } }; diff --git a/ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/detail/disparity_image__type_support.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.h diff --git a/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.hpp new file mode 100644 index 000000000..12ef32221 --- /dev/null +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/detail/disparity_image__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from stereo_msgs:msg/DisparityImage.idl +// generated code does not contain a copyright notice + +#ifndef STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TYPE_SUPPORT_HPP_ +#define STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "stereo_msgs/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_stereo_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + stereo_msgs, + msg, + DisparityImage +)(); +#ifdef __cplusplus +} +#endif + +#endif // STEREO_MSGS__MSG__DETAIL__DISPARITY_IMAGE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/disparity_image.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/disparity_image.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/disparity_image.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/disparity_image.h diff --git a/ThirdParty/ros/include/stereo_msgs/msg/disparity_image.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/disparity_image.hpp similarity index 86% rename from ThirdParty/ros/include/stereo_msgs/msg/disparity_image.hpp rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/disparity_image.hpp index a801459bf..541f3d289 100644 --- a/ThirdParty/ros/include/stereo_msgs/msg/disparity_image.hpp +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/disparity_image.hpp @@ -7,5 +7,6 @@ #include "stereo_msgs/msg/detail/disparity_image__struct.hpp" #include "stereo_msgs/msg/detail/disparity_image__builder.hpp" #include "stereo_msgs/msg/detail/disparity_image__traits.hpp" +#include "stereo_msgs/msg/detail/disparity_image__type_support.hpp" #endif // STEREO_MSGS__MSG__DISPARITY_IMAGE_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..7d10c64e0 --- /dev/null +++ b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 STEREO_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define STEREO_MSGS__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_stereo_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_stereo_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_stereo_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_stereo_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_stereo_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_stereo_msgs ROSIDL_GENERATOR_CPP_EXPORT_stereo_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_stereo_msgs ROSIDL_GENERATOR_CPP_IMPORT_stereo_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_stereo_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_stereo_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_stereo_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_stereo_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // STEREO_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/stereo_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/stereo_msgs/stereo_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__traits.hpp b/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__traits.hpp deleted file mode 100644 index 6f3ccd1fd..000000000 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__traits.hpp +++ /dev/null @@ -1,428 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from tf2_msgs:action/LookupTransform.idl -// generated code does not contain a copyright notice - -#ifndef TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ -#define TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ - -#include "tf2_msgs/action/detail/lookup_transform__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'source_time' -// Member 'target_time' -#include "builtin_interfaces/msg/detail/time__traits.hpp" -// Member 'timeout' -#include "builtin_interfaces/msg/detail/duration__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_Goal"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_Goal"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'transform' -#include "geometry_msgs/msg/detail/transform_stamped__traits.hpp" -// Member 'error' -#include "tf2_msgs/msg/detail/tf2_error__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_Result"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_Result"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_Feedback"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_Feedback"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" -// Member 'goal' -#include "tf2_msgs/action/detail/lookup_transform__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_SendGoal_Request"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_SendGoal_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'stamp' -// already included above -// #include "builtin_interfaces/msg/detail/time__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_SendGoal_Response"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_SendGoal_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_SendGoal"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_SendGoal"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_GetResult_Request"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_GetResult_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'result' -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_GetResult_Response"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_GetResult_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_GetResult"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_GetResult"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'goal_id' -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" -// Member 'feedback' -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::action::LookupTransform_FeedbackMessage"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/action/LookupTransform_FeedbackMessage"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value && has_fixed_size::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value && has_bounded_size::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - - -namespace rosidl_generator_traits -{ - -template<> -struct is_action - : std::true_type -{ -}; - -template<> -struct is_action_goal - : std::true_type -{ -}; - -template<> -struct is_action_result - : std::true_type -{ -}; - -template<> -struct is_action_feedback - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - - -#endif // TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.c b/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.c deleted file mode 100644 index 6f8686ae2..000000000 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.c +++ /dev/null @@ -1,1063 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from tf2_msgs:action/LookupTransform.idl -// generated code does not contain a copyright notice - -#include -#include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -#include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -#include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `target_frame` -// Member `source_frame` -// Member `fixed_frame` -#include "rosidl_runtime_c/string_functions.h" -// Member `source_time` -// Member `target_time` -#include "builtin_interfaces/msg/time.h" -// Member `source_time` -// Member `target_time` -#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" -// Member `timeout` -#include "builtin_interfaces/msg/duration.h" -// Member `timeout` -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_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; - tf2_msgs__action__LookupTransform_Goal__init(message_memory); -} - -void LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_Goal__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[7] = { - { - "target_frame", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_Goal, target_frame), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "source_frame", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_Goal, source_frame), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "source_time", // 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(tf2_msgs__action__LookupTransform_Goal, source_time), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "timeout", // 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(tf2_msgs__action__LookupTransform_Goal, timeout), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "target_time", // 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(tf2_msgs__action__LookupTransform_Goal, target_time), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "fixed_frame", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_Goal, fixed_frame), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "advanced", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_Goal, advanced), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_Goal", // message name - 7, // number of fields - sizeof(tf2_msgs__action__LookupTransform_Goal), - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array, // message members - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_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 LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle = { - 0, - &LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Goal)() { - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle.typesupport_identifier) { - LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `transform` -#include "geometry_msgs/msg/transform_stamped.h" -// Member `transform` -#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" -// Member `error` -#include "tf2_msgs/msg/tf2_error.h" -// Member `error` -#include "tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_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; - tf2_msgs__action__LookupTransform_Result__init(message_memory); -} - -void LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_Result__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[2] = { - { - "transform", // 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(tf2_msgs__action__LookupTransform_Result, transform), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "error", // 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(tf2_msgs__action__LookupTransform_Result, error), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_Result", // message name - 2, // number of fields - sizeof(tf2_msgs__action__LookupTransform_Result), - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array, // message members - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_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 LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle = { - 0, - &LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Result)() { - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)(); - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TF2Error)(); - if (!LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle.typesupport_identifier) { - LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_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; - tf2_msgs__action__LookupTransform_Feedback__init(message_memory); -} - -void LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_Feedback__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_Feedback, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_Feedback", // message name - 1, // number of fields - sizeof(tf2_msgs__action__LookupTransform_Feedback), - LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_member_array, // message members - LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_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 LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle = { - 0, - &LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Feedback)() { - if (!LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle.typesupport_identifier) { - LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `goal_id` -#include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -// Member `goal` -#include "tf2_msgs/action/lookup_transform.h" -// Member `goal` -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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; - tf2_msgs__action__LookupTransform_SendGoal_Request__init(message_memory); -} - -void LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_SendGoal_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[2] = { - { - "goal_id", // 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(tf2_msgs__action__LookupTransform_SendGoal_Request, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "goal", // 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(tf2_msgs__action__LookupTransform_SendGoal_Request, goal), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_SendGoal_Request", // message name - 2, // number of fields - sizeof(tf2_msgs__action__LookupTransform_SendGoal_Request), - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array, // message members - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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 LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle = { - 0, - &LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Request)() { - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Goal)(); - if (!LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle.typesupport_identifier) { - LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `stamp` -// already included above -// #include "builtin_interfaces/msg/time.h" -// Member `stamp` -// already included above -// #include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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; - tf2_msgs__action__LookupTransform_SendGoal_Response__init(message_memory); -} - -void LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_SendGoal_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array[2] = { - { - "accepted", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_SendGoal_Response, accepted), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "stamp", // 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(tf2_msgs__action__LookupTransform_SendGoal_Response, stamp), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_SendGoal_Response", // message name - 2, // number of fields - sizeof(tf2_msgs__action__LookupTransform_SendGoal_Response), - LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array, // message members - LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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 LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle = { - 0, - &LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Response)() { - LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); - if (!LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle.typesupport_identifier) { - LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__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 tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_members = { - "tf2_msgs__action", // service namespace - "LookupTransform_SendGoal", // service name - // these two fields are initialized below on the first access - NULL, // request message - // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle, - NULL // response message - // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle = { - 0, - &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal)() { - if (!tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle.typesupport_identifier) { - tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_Response)()->data; - } - - return &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle; -} - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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; - tf2_msgs__action__LookupTransform_GetResult_Request__init(message_memory); -} - -void LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_GetResult_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array[1] = { - { - "goal_id", // 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(tf2_msgs__action__LookupTransform_GetResult_Request, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_GetResult_Request", // message name - 1, // number of fields - sizeof(tf2_msgs__action__LookupTransform_GetResult_Request), - LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array, // message members - LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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 LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle = { - 0, - &LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Request)() { - LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - if (!LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle.typesupport_identifier) { - LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `result` -// already included above -// #include "tf2_msgs/action/lookup_transform.h" -// Member `result` -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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; - tf2_msgs__action__LookupTransform_GetResult_Response__init(message_memory); -} - -void LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_GetResult_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array[2] = { - { - "status", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__action__LookupTransform_GetResult_Response, status), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "result", // 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(tf2_msgs__action__LookupTransform_GetResult_Response, result), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_GetResult_Response", // message name - 2, // number of fields - sizeof(tf2_msgs__action__LookupTransform_GetResult_Response), - LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array, // message members - LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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 LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle = { - 0, - &LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Response)() { - LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Result)(); - if (!LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle.typesupport_identifier) { - LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "rosidl_typesupport_introspection_c/identifier.h" -// already included above -// #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 tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_members = { - "tf2_msgs__action", // service namespace - "LookupTransform_GetResult", // service name - // these two fields are initialized below on the first access - NULL, // request message - // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle, - NULL // response message - // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle = { - 0, - &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult)() { - if (!tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle.typesupport_identifier) { - tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_Response)()->data; - } - - return &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle; -} - -// already included above -// #include -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__struct.h" - - -// Include directives for member types -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/uuid.h" -// Member `goal_id` -// already included above -// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -// Member `feedback` -// already included above -// #include "tf2_msgs/action/lookup_transform.h" -// Member `feedback` -// already included above -// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_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; - tf2_msgs__action__LookupTransform_FeedbackMessage__init(message_memory); -} - -void LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_fini_function(void * message_memory) -{ - tf2_msgs__action__LookupTransform_FeedbackMessage__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[2] = { - { - "goal_id", // 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(tf2_msgs__action__LookupTransform_FeedbackMessage, goal_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "feedback", // 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(tf2_msgs__action__LookupTransform_FeedbackMessage, feedback), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_members = { - "tf2_msgs__action", // message namespace - "LookupTransform_FeedbackMessage", // message name - 2, // number of fields - sizeof(tf2_msgs__action__LookupTransform_FeedbackMessage), - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array, // message members - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_init_function, // function to initialize message memory (memory has to be allocated) - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_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 LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle = { - 0, - &LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_FeedbackMessage)() { - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Feedback)(); - if (!LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle.typesupport_identifier) { - LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__traits.hpp b/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__traits.hpp deleted file mode 100644 index a17fab075..000000000 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from tf2_msgs:msg/TF2Error.idl -// generated code does not contain a copyright notice - -#ifndef TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ -#define TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ - -#include "tf2_msgs/msg/detail/tf2_error__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::msg::TF2Error"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/msg/TF2Error"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.c b/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.c deleted file mode 100644 index 2a2db7db4..000000000 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.c +++ /dev/null @@ -1,100 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from tf2_msgs:msg/TF2Error.idl -// generated code does not contain a copyright notice - -#include -#include "tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h" -#include "tf2_msgs/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 "tf2_msgs/msg/detail/tf2_error__functions.h" -#include "tf2_msgs/msg/detail/tf2_error__struct.h" - - -// Include directives for member types -// Member `error_string` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TF2Error__rosidl_typesupport_introspection_c__TF2Error_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; - tf2_msgs__msg__TF2Error__init(message_memory); -} - -void TF2Error__rosidl_typesupport_introspection_c__TF2Error_fini_function(void * message_memory) -{ - tf2_msgs__msg__TF2Error__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_member_array[2] = { - { - "error", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__msg__TF2Error, error), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "error_string", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__msg__TF2Error, error_string), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_members = { - "tf2_msgs__msg", // message namespace - "TF2Error", // message name - 2, // number of fields - sizeof(tf2_msgs__msg__TF2Error), - TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_member_array, // message members - TF2Error__rosidl_typesupport_introspection_c__TF2Error_init_function, // function to initialize message memory (memory has to be allocated) - TF2Error__rosidl_typesupport_introspection_c__TF2Error_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 TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle = { - 0, - &TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TF2Error)() { - if (!TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle.typesupport_identifier) { - TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__traits.hpp b/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__traits.hpp deleted file mode 100644 index e2ef65a09..000000000 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from tf2_msgs:msg/TFMessage.idl -// generated code does not contain a copyright notice - -#ifndef TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ -#define TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ - -#include "tf2_msgs/msg/detail/tf_message__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::msg::TFMessage"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/msg/TFMessage"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.c b/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.c deleted file mode 100644 index 993635030..000000000 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from tf2_msgs:msg/TFMessage.idl -// generated code does not contain a copyright notice - -#include -#include "tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h" -#include "tf2_msgs/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 "tf2_msgs/msg/detail/tf_message__functions.h" -#include "tf2_msgs/msg/detail/tf_message__struct.h" - - -// Include directives for member types -// Member `transforms` -#include "geometry_msgs/msg/transform_stamped.h" -// Member `transforms` -#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void TFMessage__rosidl_typesupport_introspection_c__TFMessage_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; - tf2_msgs__msg__TFMessage__init(message_memory); -} - -void TFMessage__rosidl_typesupport_introspection_c__TFMessage_fini_function(void * message_memory) -{ - tf2_msgs__msg__TFMessage__fini(message_memory); -} - -size_t TFMessage__rosidl_typesupport_introspection_c__size_function__TransformStamped__transforms( - const void * untyped_member) -{ - const geometry_msgs__msg__TransformStamped__Sequence * member = - (const geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); - return member->size; -} - -const void * TFMessage__rosidl_typesupport_introspection_c__get_const_function__TransformStamped__transforms( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__TransformStamped__Sequence * member = - (const geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * TFMessage__rosidl_typesupport_introspection_c__get_function__TransformStamped__transforms( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__TransformStamped__Sequence * member = - (geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool TFMessage__rosidl_typesupport_introspection_c__resize_function__TransformStamped__transforms( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__TransformStamped__Sequence * member = - (geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); - geometry_msgs__msg__TransformStamped__Sequence__fini(member); - return geometry_msgs__msg__TransformStamped__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array[1] = { - { - "transforms", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__msg__TFMessage, transforms), // bytes offset in struct - NULL, // default value - TFMessage__rosidl_typesupport_introspection_c__size_function__TransformStamped__transforms, // size() function pointer - TFMessage__rosidl_typesupport_introspection_c__get_const_function__TransformStamped__transforms, // get_const(index) function pointer - TFMessage__rosidl_typesupport_introspection_c__get_function__TransformStamped__transforms, // get(index) function pointer - TFMessage__rosidl_typesupport_introspection_c__resize_function__TransformStamped__transforms // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_members = { - "tf2_msgs__msg", // message namespace - "TFMessage", // message name - 1, // number of fields - sizeof(tf2_msgs__msg__TFMessage), - TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array, // message members - TFMessage__rosidl_typesupport_introspection_c__TFMessage_init_function, // function to initialize message memory (memory has to be allocated) - TFMessage__rosidl_typesupport_introspection_c__TFMessage_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 TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle = { - 0, - &TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TFMessage)() { - TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)(); - if (!TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle.typesupport_identifier) { - TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__traits.hpp b/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__traits.hpp deleted file mode 100644 index b65af0568..000000000 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from tf2_msgs:srv/FrameGraph.idl -// generated code does not contain a copyright notice - -#ifndef TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ -#define TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ - -#include "tf2_msgs/srv/detail/frame_graph__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::srv::FrameGraph_Request"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/srv/FrameGraph_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::srv::FrameGraph_Response"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/srv/FrameGraph_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "tf2_msgs::srv::FrameGraph"; -} - -template<> -inline const char * name() -{ - return "tf2_msgs/srv/FrameGraph"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.c b/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.c deleted file mode 100644 index 17f88ebb5..000000000 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.c +++ /dev/null @@ -1,228 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from tf2_msgs:srv/FrameGraph.idl -// generated code does not contain a copyright notice - -#include -#include "tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h" -#include "tf2_msgs/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 "tf2_msgs/srv/detail/frame_graph__functions.h" -#include "tf2_msgs/srv/detail/frame_graph__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_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; - tf2_msgs__srv__FrameGraph_Request__init(message_memory); -} - -void FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_fini_function(void * message_memory) -{ - tf2_msgs__srv__FrameGraph_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__srv__FrameGraph_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_members = { - "tf2_msgs__srv", // message namespace - "FrameGraph_Request", // message name - 1, // number of fields - sizeof(tf2_msgs__srv__FrameGraph_Request), - FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_member_array, // message members - FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_init_function, // function to initialize message memory (memory has to be allocated) - FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_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 FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle = { - 0, - &FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Request)() { - if (!FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle.typesupport_identifier) { - FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h" -// already included above -// #include "tf2_msgs/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 "tf2_msgs/srv/detail/frame_graph__functions.h" -// already included above -// #include "tf2_msgs/srv/detail/frame_graph__struct.h" - - -// Include directives for member types -// Member `frame_yaml` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_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; - tf2_msgs__srv__FrameGraph_Response__init(message_memory); -} - -void FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_fini_function(void * message_memory) -{ - tf2_msgs__srv__FrameGraph_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_member_array[1] = { - { - "frame_yaml", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(tf2_msgs__srv__FrameGraph_Response, frame_yaml), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_members = { - "tf2_msgs__srv", // message namespace - "FrameGraph_Response", // message name - 1, // number of fields - sizeof(tf2_msgs__srv__FrameGraph_Response), - FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_member_array, // message members - FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_init_function, // function to initialize message memory (memory has to be allocated) - FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_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 FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle = { - 0, - &FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Response)() { - if (!FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle.typesupport_identifier) { - FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "tf2_msgs/srv/detail/frame_graph__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 tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_members = { - "tf2_msgs__srv", // service namespace - "FrameGraph", // service name - // these two fields are initialized below on the first access - NULL, // request message - // tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle, - NULL // response message - // tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle = { - 0, - &tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_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, tf2_msgs, srv, FrameGraph_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph)() { - if (!tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle.typesupport_identifier) { - tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_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, tf2_msgs, srv, FrameGraph_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, tf2_msgs, srv, FrameGraph_Response)()->data; - } - - return &tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__builder.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__builder.hpp similarity index 99% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__builder.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__builder.hpp index 374f0be0f..d4a423b77 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__builder.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__builder.hpp @@ -5,11 +5,12 @@ #ifndef TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__BUILDER_HPP_ #define TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__BUILDER_HPP_ -#include "tf2_msgs/action/detail/lookup_transform__struct.hpp" -#include #include #include +#include "tf2_msgs/action/detail/lookup_transform__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace tf2_msgs { diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__functions.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__functions.c similarity index 92% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__functions.c rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__functions.c index 3b0479582..506ba07ea 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__functions.c +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__functions.c @@ -326,22 +326,27 @@ tf2_msgs__action__LookupTransform_Goal__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_Goal); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_Goal * data = - (tf2_msgs__action__LookupTransform_Goal *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_Goal *)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 (!tf2_msgs__action__LookupTransform_Goal__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_Goal__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; ) { - tf2_msgs__action__LookupTransform_Goal__fini(&data[i]); + tf2_msgs__action__LookupTransform_Goal__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -582,22 +587,27 @@ tf2_msgs__action__LookupTransform_Result__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_Result); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_Result * data = - (tf2_msgs__action__LookupTransform_Result *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_Result *)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 (!tf2_msgs__action__LookupTransform_Result__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_Result__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; ) { - tf2_msgs__action__LookupTransform_Result__fini(&data[i]); + tf2_msgs__action__LookupTransform_Result__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -802,22 +812,27 @@ tf2_msgs__action__LookupTransform_Feedback__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_Feedback); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_Feedback * data = - (tf2_msgs__action__LookupTransform_Feedback *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_Feedback *)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 (!tf2_msgs__action__LookupTransform_Feedback__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_Feedback__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; ) { - tf2_msgs__action__LookupTransform_Feedback__fini(&data[i]); + tf2_msgs__action__LookupTransform_Feedback__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1059,22 +1074,27 @@ tf2_msgs__action__LookupTransform_SendGoal_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_SendGoal_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_SendGoal_Request * data = - (tf2_msgs__action__LookupTransform_SendGoal_Request *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_SendGoal_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 (!tf2_msgs__action__LookupTransform_SendGoal_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_SendGoal_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; ) { - tf2_msgs__action__LookupTransform_SendGoal_Request__fini(&data[i]); + tf2_msgs__action__LookupTransform_SendGoal_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1303,22 +1323,27 @@ tf2_msgs__action__LookupTransform_SendGoal_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_SendGoal_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_SendGoal_Response * data = - (tf2_msgs__action__LookupTransform_SendGoal_Response *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_SendGoal_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 (!tf2_msgs__action__LookupTransform_SendGoal_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_SendGoal_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; ) { - tf2_msgs__action__LookupTransform_SendGoal_Response__fini(&data[i]); + tf2_msgs__action__LookupTransform_SendGoal_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1539,22 +1564,27 @@ tf2_msgs__action__LookupTransform_GetResult_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_GetResult_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_GetResult_Request * data = - (tf2_msgs__action__LookupTransform_GetResult_Request *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_GetResult_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 (!tf2_msgs__action__LookupTransform_GetResult_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_GetResult_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; ) { - tf2_msgs__action__LookupTransform_GetResult_Request__fini(&data[i]); + tf2_msgs__action__LookupTransform_GetResult_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -1783,22 +1813,27 @@ tf2_msgs__action__LookupTransform_GetResult_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_GetResult_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_GetResult_Response * data = - (tf2_msgs__action__LookupTransform_GetResult_Response *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_GetResult_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 (!tf2_msgs__action__LookupTransform_GetResult_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_GetResult_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; ) { - tf2_msgs__action__LookupTransform_GetResult_Response__fini(&data[i]); + tf2_msgs__action__LookupTransform_GetResult_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -2041,22 +2076,27 @@ tf2_msgs__action__LookupTransform_FeedbackMessage__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__action__LookupTransform_FeedbackMessage); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__action__LookupTransform_FeedbackMessage * data = - (tf2_msgs__action__LookupTransform_FeedbackMessage *)realloc(output->data, allocation_size); + (tf2_msgs__action__LookupTransform_FeedbackMessage *)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 (!tf2_msgs__action__LookupTransform_FeedbackMessage__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__action__LookupTransform_FeedbackMessage__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; ) { - tf2_msgs__action__LookupTransform_FeedbackMessage__fini(&data[i]); + tf2_msgs__action__LookupTransform_FeedbackMessage__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__functions.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__functions.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__functions.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__functions.h diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h index 48a8f2f39..abfd194ac 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_Goal( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_Goal( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_Result( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_Result( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -87,6 +89,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_Feedback( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_Feedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -119,6 +122,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_SendGoal_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_SendGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -151,6 +155,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_SendGoal_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_SendGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -202,6 +207,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_GetResult_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_GetResult_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -234,6 +240,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_GetResult_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_GetResult_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -286,6 +293,7 @@ size_t get_serialized_size_tf2_msgs__action__LookupTransform_FeedbackMessage( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__action__LookupTransform_FeedbackMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp index 20d49ead1..49d28d56e 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_Goal( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -130,6 +131,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_Result( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -205,6 +207,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_Feedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -280,6 +283,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_SendGoal_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -356,6 +360,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_SendGoal_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -451,6 +456,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_GetResult_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -527,6 +533,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_GetResult_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -624,6 +631,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_LookupTransform_FeedbackMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.h similarity index 91% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.h index ae6857d4b..9d005ae1b 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.h @@ -28,15 +28,17 @@ extern "C" // Member 'timeout' #include "builtin_interfaces/msg/detail/duration__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_Goal { rosidl_runtime_c__String target_frame; rosidl_runtime_c__String source_frame; builtin_interfaces__msg__Time source_time; builtin_interfaces__msg__Duration timeout; + /// Advanced API builtin_interfaces__msg__Time target_time; rosidl_runtime_c__String fixed_frame; + /// Whether or not to use the advanced API bool advanced; } tf2_msgs__action__LookupTransform_Goal; @@ -59,7 +61,7 @@ typedef struct tf2_msgs__action__LookupTransform_Goal__Sequence // Member 'error' #include "tf2_msgs/msg/detail/tf2_error__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_Result { geometry_msgs__msg__TransformStamped transform; @@ -79,7 +81,7 @@ typedef struct tf2_msgs__action__LookupTransform_Result__Sequence // Constants defined in the message -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_Feedback { uint8_t structure_needs_at_least_one_member; @@ -104,7 +106,7 @@ typedef struct tf2_msgs__action__LookupTransform_Feedback__Sequence // Member 'goal' #include "tf2_msgs/action/detail/lookup_transform__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_SendGoal_Request { unique_identifier_msgs__msg__UUID goal_id; @@ -129,7 +131,7 @@ typedef struct tf2_msgs__action__LookupTransform_SendGoal_Request__Sequence // already included above // #include "builtin_interfaces/msg/detail/time__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_SendGoal_Response { bool accepted; @@ -154,7 +156,7 @@ typedef struct tf2_msgs__action__LookupTransform_SendGoal_Response__Sequence // already included above // #include "unique_identifier_msgs/msg/detail/uuid__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_GetResult_Request { unique_identifier_msgs__msg__UUID goal_id; @@ -178,7 +180,7 @@ typedef struct tf2_msgs__action__LookupTransform_GetResult_Request__Sequence // already included above // #include "tf2_msgs/action/detail/lookup_transform__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_GetResult_Response { int8_t status; @@ -206,7 +208,7 @@ typedef struct tf2_msgs__action__LookupTransform_GetResult_Response__Sequence // already included above // #include "tf2_msgs/action/detail/lookup_transform__struct.h" -// Struct defined in action/LookupTransform in the package tf2_msgs. +/// Struct defined in action/LookupTransform in the package tf2_msgs. typedef struct tf2_msgs__action__LookupTransform_FeedbackMessage { unique_identifier_msgs__msg__UUID goal_id; diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.hpp similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.hpp index 1053557ac..fe7033671 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__struct.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__struct.hpp @@ -5,14 +5,15 @@ #ifndef TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__STRUCT_HPP_ #define TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'source_time' @@ -74,10 +75,10 @@ struct LookupTransform_Goal_ // field types and members using _target_frame_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _target_frame_type target_frame; using _source_frame_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _source_frame_type source_frame; using _source_time_type = builtin_interfaces::msg::Time_; @@ -89,7 +90,7 @@ struct LookupTransform_Goal_ builtin_interfaces::msg::Time_; _target_time_type target_time; using _fixed_frame_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _fixed_frame_type fixed_frame; using _advanced_type = bool; @@ -97,13 +98,13 @@ struct LookupTransform_Goal_ // setters for named parameter idiom Type & set__target_frame( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->target_frame = _arg; return *this; } Type & set__source_frame( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->source_frame = _arg; return *this; @@ -127,7 +128,7 @@ struct LookupTransform_Goal_ return *this; } Type & set__fixed_frame( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->fixed_frame = _arg; return *this; diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__traits.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__traits.hpp new file mode 100644 index 000000000..3433e6613 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__traits.hpp @@ -0,0 +1,1100 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from tf2_msgs:action/LookupTransform.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ +#define TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "tf2_msgs/action/detail/lookup_transform__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'source_time' +// Member 'target_time' +#include "builtin_interfaces/msg/detail/time__traits.hpp" +// Member 'timeout' +#include "builtin_interfaces/msg/detail/duration__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_Goal & msg, + std::ostream & out) +{ + out << "{"; + // member: target_frame + { + out << "target_frame: "; + rosidl_generator_traits::value_to_yaml(msg.target_frame, out); + out << ", "; + } + + // member: source_frame + { + out << "source_frame: "; + rosidl_generator_traits::value_to_yaml(msg.source_frame, out); + out << ", "; + } + + // member: source_time + { + out << "source_time: "; + to_flow_style_yaml(msg.source_time, out); + out << ", "; + } + + // member: timeout + { + out << "timeout: "; + to_flow_style_yaml(msg.timeout, out); + out << ", "; + } + + // member: target_time + { + out << "target_time: "; + to_flow_style_yaml(msg.target_time, out); + out << ", "; + } + + // member: fixed_frame + { + out << "fixed_frame: "; + rosidl_generator_traits::value_to_yaml(msg.fixed_frame, out); + out << ", "; + } + + // member: advanced + { + out << "advanced: "; + rosidl_generator_traits::value_to_yaml(msg.advanced, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_Goal & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: target_frame + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "target_frame: "; + rosidl_generator_traits::value_to_yaml(msg.target_frame, out); + out << "\n"; + } + + // member: source_frame + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "source_frame: "; + rosidl_generator_traits::value_to_yaml(msg.source_frame, out); + out << "\n"; + } + + // member: source_time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "source_time:\n"; + to_block_style_yaml(msg.source_time, out, indentation + 2); + } + + // member: timeout + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "timeout:\n"; + to_block_style_yaml(msg.timeout, out, indentation + 2); + } + + // member: target_time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "target_time:\n"; + to_block_style_yaml(msg.target_time, out, indentation + 2); + } + + // member: fixed_frame + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "fixed_frame: "; + rosidl_generator_traits::value_to_yaml(msg.fixed_frame, out); + out << "\n"; + } + + // member: advanced + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "advanced: "; + rosidl_generator_traits::value_to_yaml(msg.advanced, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_Goal & 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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_Goal & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_Goal & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_Goal"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_Goal"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'transform' +#include "geometry_msgs/msg/detail/transform_stamped__traits.hpp" +// Member 'error' +#include "tf2_msgs/msg/detail/tf2_error__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_Result & msg, + std::ostream & out) +{ + out << "{"; + // member: transform + { + out << "transform: "; + to_flow_style_yaml(msg.transform, out); + out << ", "; + } + + // member: error + { + out << "error: "; + to_flow_style_yaml(msg.error, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_Result & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: transform + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "transform:\n"; + to_block_style_yaml(msg.transform, out, indentation + 2); + } + + // member: error + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "error:\n"; + to_block_style_yaml(msg.error, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_Result & 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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_Result & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_Result & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_Result"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_Result"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_Feedback & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_Feedback & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_Feedback & 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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_Feedback & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_Feedback & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_Feedback"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_Feedback"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +#include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +// Member 'goal' +#include "tf2_msgs/action/detail/lookup_transform__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_SendGoal_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: goal + { + out << "goal: "; + to_flow_style_yaml(msg.goal, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_SendGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: goal + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal:\n"; + to_block_style_yaml(msg.goal, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_SendGoal_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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_SendGoal_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_SendGoal_Request & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_SendGoal_Request"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_SendGoal_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'stamp' +// already included above +// #include "builtin_interfaces/msg/detail/time__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_SendGoal_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: accepted + { + out << "accepted: "; + rosidl_generator_traits::value_to_yaml(msg.accepted, out); + out << ", "; + } + + // member: stamp + { + out << "stamp: "; + to_flow_style_yaml(msg.stamp, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_SendGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: accepted + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "accepted: "; + rosidl_generator_traits::value_to_yaml(msg.accepted, out); + out << "\n"; + } + + // member: stamp + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "stamp:\n"; + to_block_style_yaml(msg.stamp, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_SendGoal_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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_SendGoal_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_SendGoal_Response & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_SendGoal_Response"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_SendGoal_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_SendGoal"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_SendGoal"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_GetResult_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_GetResult_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_GetResult_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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_GetResult_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_GetResult_Request & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_GetResult_Request"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_GetResult_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'result' +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_GetResult_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: status + { + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << ", "; + } + + // member: result + { + out << "result: "; + to_flow_style_yaml(msg.result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_GetResult_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: status + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status: "; + rosidl_generator_traits::value_to_yaml(msg.status, out); + out << "\n"; + } + + // member: result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "result:\n"; + to_block_style_yaml(msg.result, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_GetResult_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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_GetResult_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_GetResult_Response & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_GetResult_Response"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_GetResult_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_GetResult"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_GetResult"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'goal_id' +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +// Member 'feedback' +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__traits.hpp" + +namespace tf2_msgs +{ + +namespace action +{ + +inline void to_flow_style_yaml( + const LookupTransform_FeedbackMessage & msg, + std::ostream & out) +{ + out << "{"; + // member: goal_id + { + out << "goal_id: "; + to_flow_style_yaml(msg.goal_id, out); + out << ", "; + } + + // member: feedback + { + out << "feedback: "; + to_flow_style_yaml(msg.feedback, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const LookupTransform_FeedbackMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: goal_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "goal_id:\n"; + to_block_style_yaml(msg.goal_id, out, indentation + 2); + } + + // member: feedback + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "feedback:\n"; + to_block_style_yaml(msg.feedback, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const LookupTransform_FeedbackMessage & 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 action + +} // namespace tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::action::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::action::LookupTransform_FeedbackMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::action::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::action::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::action::LookupTransform_FeedbackMessage & msg) +{ + return tf2_msgs::action::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::action::LookupTransform_FeedbackMessage"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/action/LookupTransform_FeedbackMessage"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + + +namespace rosidl_generator_traits +{ + +template<> +struct is_action + : std::true_type +{ +}; + +template<> +struct is_action_goal + : std::true_type +{ +}; + +template<> +struct is_action_result + : std::true_type +{ +}; + +template<> +struct is_action_feedback + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + + +#endif // TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.c new file mode 100644 index 000000000..d7a1850c6 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.c @@ -0,0 +1,1101 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from tf2_msgs:action/LookupTransform.idl +// generated code does not contain a copyright notice + +#include +#include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +#include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +#include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `target_frame` +// Member `source_frame` +// Member `fixed_frame` +#include "rosidl_runtime_c/string_functions.h" +// Member `source_time` +// Member `target_time` +#include "builtin_interfaces/msg/time.h" +// Member `source_time` +// Member `target_time` +#include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" +// Member `timeout` +#include "builtin_interfaces/msg/duration.h" +// Member `timeout` +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_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; + tf2_msgs__action__LookupTransform_Goal__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_Goal__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[7] = { + { + "target_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_Goal, target_frame), // 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 + }, + { + "source_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_Goal, source_frame), // 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 + }, + { + "source_time", // 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(tf2_msgs__action__LookupTransform_Goal, source_time), // 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 + }, + { + "timeout", // 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(tf2_msgs__action__LookupTransform_Goal, timeout), // 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 + }, + { + "target_time", // 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(tf2_msgs__action__LookupTransform_Goal, target_time), // 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 + }, + { + "fixed_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_Goal, fixed_frame), // 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 + }, + { + "advanced", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_Goal, advanced), // 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 tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_Goal", // message name + 7, // number of fields + sizeof(tf2_msgs__action__LookupTransform_Goal), + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array, // message members + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_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 tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Goal)() { + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_Goal__rosidl_typesupport_introspection_c__LookupTransform_Goal_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `transform` +#include "geometry_msgs/msg/transform_stamped.h" +// Member `transform` +#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" +// Member `error` +#include "tf2_msgs/msg/tf2_error.h" +// Member `error` +#include "tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_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; + tf2_msgs__action__LookupTransform_Result__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_Result__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[2] = { + { + "transform", // 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(tf2_msgs__action__LookupTransform_Result, transform), // 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 + }, + { + "error", // 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(tf2_msgs__action__LookupTransform_Result, error), // 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 tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_Result", // message name + 2, // number of fields + sizeof(tf2_msgs__action__LookupTransform_Result), + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array, // message members + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_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 tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Result)() { + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)(); + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TF2Error)(); + if (!tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_Result__rosidl_typesupport_introspection_c__LookupTransform_Result_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_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; + tf2_msgs__action__LookupTransform_Feedback__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_Feedback__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_Feedback, structure_needs_at_least_one_member), // 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 tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_Feedback", // message name + 1, // number of fields + sizeof(tf2_msgs__action__LookupTransform_Feedback), + tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_member_array, // message members + tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_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 tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Feedback)() { + if (!tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_Feedback__rosidl_typesupport_introspection_c__LookupTransform_Feedback_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `goal_id` +#include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +// Member `goal` +#include "tf2_msgs/action/lookup_transform.h" +// Member `goal` +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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; + tf2_msgs__action__LookupTransform_SendGoal_Request__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_SendGoal_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[2] = { + { + "goal_id", // 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(tf2_msgs__action__LookupTransform_SendGoal_Request, goal_id), // 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 + }, + { + "goal", // 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(tf2_msgs__action__LookupTransform_SendGoal_Request, goal), // 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 tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_SendGoal_Request", // message name + 2, // number of fields + sizeof(tf2_msgs__action__LookupTransform_SendGoal_Request), + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array, // message members + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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 tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Request)() { + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Goal)(); + if (!tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_SendGoal_Request__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `stamp` +// already included above +// #include "builtin_interfaces/msg/time.h" +// Member `stamp` +// already included above +// #include "builtin_interfaces/msg/detail/time__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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; + tf2_msgs__action__LookupTransform_SendGoal_Response__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_SendGoal_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array[2] = { + { + "accepted", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_SendGoal_Response, accepted), // 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 + }, + { + "stamp", // 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(tf2_msgs__action__LookupTransform_SendGoal_Response, stamp), // 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 tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_SendGoal_Response", // message name + 2, // number of fields + sizeof(tf2_msgs__action__LookupTransform_SendGoal_Response), + tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array, // message members + tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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 tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Response)() { + tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Time)(); + if (!tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_SendGoal_Response__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__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 tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_members = { + "tf2_msgs__action", // service namespace + "LookupTransform_SendGoal", // service name + // these two fields are initialized below on the first access + NULL, // request message + // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Request_message_type_support_handle, + NULL // response message + // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle = { + 0, + &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_SendGoal)() { + if (!tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle.typesupport_identifier) { + tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_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, tf2_msgs, action, LookupTransform_SendGoal_Response)()->data; + } + + return &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_SendGoal_service_type_support_handle; +} + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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; + tf2_msgs__action__LookupTransform_GetResult_Request__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_GetResult_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array[1] = { + { + "goal_id", // 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(tf2_msgs__action__LookupTransform_GetResult_Request, goal_id), // 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 tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_GetResult_Request", // message name + 1, // number of fields + sizeof(tf2_msgs__action__LookupTransform_GetResult_Request), + tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array, // message members + tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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 tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Request)() { + tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + if (!tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_GetResult_Request__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `result` +// already included above +// #include "tf2_msgs/action/lookup_transform.h" +// Member `result` +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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; + tf2_msgs__action__LookupTransform_GetResult_Response__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_GetResult_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array[2] = { + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__action__LookupTransform_GetResult_Response, status), // 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 + }, + { + "result", // 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(tf2_msgs__action__LookupTransform_GetResult_Response, result), // 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 tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_GetResult_Response", // message name + 2, // number of fields + sizeof(tf2_msgs__action__LookupTransform_GetResult_Response), + tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array, // message members + tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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 tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Response)() { + tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Result)(); + if (!tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_GetResult_Response__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "rosidl_typesupport_introspection_c/identifier.h" +// already included above +// #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 tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_members = { + "tf2_msgs__action", // service namespace + "LookupTransform_GetResult", // service name + // these two fields are initialized below on the first access + NULL, // request message + // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Request_message_type_support_handle, + NULL // response message + // tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle = { + 0, + &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_GetResult)() { + if (!tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle.typesupport_identifier) { + tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_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, tf2_msgs, action, LookupTransform_GetResult_Response)()->data; + } + + return &tf2_msgs__action__detail__lookup_transform__rosidl_typesupport_introspection_c__LookupTransform_GetResult_service_type_support_handle; +} + +// already included above +// #include +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/action/detail/lookup_transform__functions.h" +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__struct.h" + + +// Include directives for member types +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/uuid.h" +// Member `goal_id` +// already included above +// #include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +// Member `feedback` +// already included above +// #include "tf2_msgs/action/lookup_transform.h" +// Member `feedback` +// already included above +// #include "tf2_msgs/action/detail/lookup_transform__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_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; + tf2_msgs__action__LookupTransform_FeedbackMessage__init(message_memory); +} + +void tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_fini_function(void * message_memory) +{ + tf2_msgs__action__LookupTransform_FeedbackMessage__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[2] = { + { + "goal_id", // 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(tf2_msgs__action__LookupTransform_FeedbackMessage, goal_id), // 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 + }, + { + "feedback", // 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(tf2_msgs__action__LookupTransform_FeedbackMessage, feedback), // 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 tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_members = { + "tf2_msgs__action", // message namespace + "LookupTransform_FeedbackMessage", // message name + 2, // number of fields + sizeof(tf2_msgs__action__LookupTransform_FeedbackMessage), + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array, // message members + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_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 tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle = { + 0, + &tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_FeedbackMessage)() { + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)(); + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, action, LookupTransform_Feedback)(); + if (!tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle.typesupport_identifier) { + tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__action__LookupTransform_FeedbackMessage__rosidl_typesupport_introspection_c__LookupTransform_FeedbackMessage_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.cpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.cpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.cpp index b07628c88..761fa7483 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.cpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -141,6 +153,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -258,6 +272,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -273,6 +289,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -390,6 +408,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -507,6 +527,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -522,6 +544,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -639,6 +663,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -654,6 +680,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -879,6 +907,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -996,6 +1026,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -1011,6 +1043,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; @@ -1240,6 +1274,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 }, { @@ -1255,6 +1291,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember LookupTransfo 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 } }; diff --git a/ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/action/detail/lookup_transform__type_support.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.h diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.hpp new file mode 100644 index 000000000..a6302c6a5 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/detail/lookup_transform__type_support.hpp @@ -0,0 +1,231 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from tf2_msgs:action/LookupTransform.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TYPE_SUPPORT_HPP_ +#define TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "tf2_msgs/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/action_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_tf2_msgs +const rosidl_action_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_Goal +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_Result +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_Feedback +)(); +#ifdef __cplusplus +} +#endif + +#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_tf2_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_SendGoal +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_SendGoal_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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_SendGoal_Response +)(); +#ifdef __cplusplus +} +#endif + + +// already included above +// #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_tf2_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_GetResult +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_GetResult_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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_GetResult_Response +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + action, + LookupTransform_FeedbackMessage +)(); +#ifdef __cplusplus +} +#endif + +#endif // TF2_MSGS__ACTION__DETAIL__LOOKUP_TRANSFORM__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/action/lookup_transform.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/lookup_transform.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/action/lookup_transform.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/lookup_transform.h diff --git a/ThirdParty/ros/include/tf2_msgs/action/lookup_transform.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/lookup_transform.hpp similarity index 86% rename from ThirdParty/ros/include/tf2_msgs/action/lookup_transform.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/lookup_transform.hpp index dbfc449bd..8aced55a9 100644 --- a/ThirdParty/ros/include/tf2_msgs/action/lookup_transform.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/action/lookup_transform.hpp @@ -7,5 +7,6 @@ #include "tf2_msgs/action/detail/lookup_transform__struct.hpp" #include "tf2_msgs/action/detail/lookup_transform__builder.hpp" #include "tf2_msgs/action/detail/lookup_transform__traits.hpp" +#include "tf2_msgs/action/detail/lookup_transform__type_support.hpp" #endif // TF2_MSGS__ACTION__LOOKUP_TRANSFORM_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__builder.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__builder.hpp similarity index 96% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__builder.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__builder.hpp index a4c3ca066..835a72edb 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__builder.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__builder.hpp @@ -5,11 +5,12 @@ #ifndef TF2_MSGS__MSG__DETAIL__TF2_ERROR__BUILDER_HPP_ #define TF2_MSGS__MSG__DETAIL__TF2_ERROR__BUILDER_HPP_ -#include "tf2_msgs/msg/detail/tf2_error__struct.hpp" -#include #include #include +#include "tf2_msgs/msg/detail/tf2_error__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace tf2_msgs { diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__functions.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__functions.c similarity index 90% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__functions.c rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__functions.c index 61e8fd83e..c7fc4774a 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__functions.c +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__functions.c @@ -224,22 +224,27 @@ tf2_msgs__msg__TF2Error__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__msg__TF2Error); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__msg__TF2Error * data = - (tf2_msgs__msg__TF2Error *)realloc(output->data, allocation_size); + (tf2_msgs__msg__TF2Error *)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 (!tf2_msgs__msg__TF2Error__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__msg__TF2Error__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; ) { - tf2_msgs__msg__TF2Error__fini(&data[i]); + tf2_msgs__msg__TF2Error__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__functions.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__functions.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__functions.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__functions.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h index 827318265..7a7a5b394 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_tf2_msgs__msg__TF2Error( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__msg__TF2Error( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp index 41fe2493c..a410a00ec 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_TF2Error( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.h similarity index 96% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.h index b4c2cb3e7..f2012a504 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.h @@ -63,7 +63,7 @@ enum // Member 'error_string' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/TF2Error in the package tf2_msgs. +/// Struct defined in msg/TF2Error in the package tf2_msgs. typedef struct tf2_msgs__msg__TF2Error { uint8_t error; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.hpp similarity index 79% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.hpp index e3f82b1e0..59ded4ec0 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__struct.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__struct.hpp @@ -5,14 +5,15 @@ #ifndef TF2_MSGS__MSG__DETAIL__TF2_ERROR__STRUCT_HPP_ #define TF2_MSGS__MSG__DETAIL__TF2_ERROR__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__tf2_msgs__msg__TF2Error __attribute__((deprecated)) @@ -58,7 +59,7 @@ struct TF2Error_ uint8_t; _error_type error; using _error_string_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _error_string_type error_string; // setters for named parameter idiom @@ -69,7 +70,7 @@ struct TF2Error_ return *this; } Type & set__error_string( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->error_string = _arg; return *this; @@ -168,24 +169,45 @@ using TF2Error = # undef NO_ERROR # endif #endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::NO_ERROR; +#endif // __cplusplus < 201703L #if defined(_WIN32) # pragma warning(suppress : 4602) # pragma pop_macro("NO_ERROR") #endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::LOOKUP_ERROR; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::CONNECTIVITY_ERROR; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::EXTRAPOLATION_ERROR; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::INVALID_ARGUMENT_ERROR; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::TIMEOUT_ERROR; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t TF2Error_::TRANSFORM_ERROR; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__traits.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__traits.hpp new file mode 100644 index 000000000..45b9b9876 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from tf2_msgs:msg/TF2Error.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ +#define TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "tf2_msgs/msg/detail/tf2_error__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace tf2_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TF2Error & msg, + std::ostream & out) +{ + out << "{"; + // member: error + { + out << "error: "; + rosidl_generator_traits::value_to_yaml(msg.error, out); + out << ", "; + } + + // member: error_string + { + out << "error_string: "; + rosidl_generator_traits::value_to_yaml(msg.error_string, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TF2Error & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: error + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "error: "; + rosidl_generator_traits::value_to_yaml(msg.error, out); + out << "\n"; + } + + // member: error_string + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "error_string: "; + rosidl_generator_traits::value_to_yaml(msg.error_string, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TF2Error & 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 tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::msg::TF2Error & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::msg::TF2Error & msg) +{ + return tf2_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::msg::TF2Error"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/msg/TF2Error"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TF2_MSGS__MSG__DETAIL__TF2_ERROR__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.c new file mode 100644 index 000000000..7761d6040 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.c @@ -0,0 +1,104 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from tf2_msgs:msg/TF2Error.idl +// generated code does not contain a copyright notice + +#include +#include "tf2_msgs/msg/detail/tf2_error__rosidl_typesupport_introspection_c.h" +#include "tf2_msgs/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 "tf2_msgs/msg/detail/tf2_error__functions.h" +#include "tf2_msgs/msg/detail/tf2_error__struct.h" + + +// Include directives for member types +// Member `error_string` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_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; + tf2_msgs__msg__TF2Error__init(message_memory); +} + +void tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_fini_function(void * message_memory) +{ + tf2_msgs__msg__TF2Error__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_member_array[2] = { + { + "error", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__msg__TF2Error, error), // 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 + }, + { + "error_string", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__msg__TF2Error, error_string), // 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 tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_members = { + "tf2_msgs__msg", // message namespace + "TF2Error", // message name + 2, // number of fields + sizeof(tf2_msgs__msg__TF2Error), + tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_member_array, // message members + tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_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 tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle = { + 0, + &tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TF2Error)() { + if (!tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle.typesupport_identifier) { + tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__msg__TF2Error__rosidl_typesupport_introspection_c__TF2Error_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.cpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.cpp similarity index 94% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.cpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.cpp index 10f959519..c489f90c6 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.cpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TF2Error_mess 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TF2Error_mess 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 } }; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf2_error__type_support.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.h diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.hpp new file mode 100644 index 000000000..6e2b9e61b --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf2_error__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from tf2_msgs:msg/TF2Error.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__MSG__DETAIL__TF2_ERROR__TYPE_SUPPORT_HPP_ +#define TF2_MSGS__MSG__DETAIL__TF2_ERROR__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "tf2_msgs/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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + msg, + TF2Error +)(); +#ifdef __cplusplus +} +#endif + +#endif // TF2_MSGS__MSG__DETAIL__TF2_ERROR__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__builder.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__builder.hpp similarity index 94% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__builder.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__builder.hpp index 7d5c1d5e5..ff8793509 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__builder.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__builder.hpp @@ -5,11 +5,12 @@ #ifndef TF2_MSGS__MSG__DETAIL__TF_MESSAGE__BUILDER_HPP_ #define TF2_MSGS__MSG__DETAIL__TF_MESSAGE__BUILDER_HPP_ -#include "tf2_msgs/msg/detail/tf_message__struct.hpp" -#include #include #include +#include "tf2_msgs/msg/detail/tf_message__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace tf2_msgs { diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__functions.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__functions.c similarity index 90% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__functions.c rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__functions.c index ca39a0a39..295891e15 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__functions.c +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__functions.c @@ -216,22 +216,27 @@ tf2_msgs__msg__TFMessage__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__msg__TFMessage); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__msg__TFMessage * data = - (tf2_msgs__msg__TFMessage *)realloc(output->data, allocation_size); + (tf2_msgs__msg__TFMessage *)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 (!tf2_msgs__msg__TFMessage__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__msg__TFMessage__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; ) { - tf2_msgs__msg__TFMessage__fini(&data[i]); + tf2_msgs__msg__TFMessage__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__functions.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__functions.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__functions.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__functions.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h index 2cf9e4365..52280a8e6 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_tf2_msgs__msg__TFMessage( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__msg__TFMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp index 27a7acd0e..ea3fa4393 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_TFMessage( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.h similarity index 94% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.h index a92684199..c7ce66249 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'transforms' #include "geometry_msgs/msg/detail/transform_stamped__struct.h" -// Struct defined in msg/TFMessage in the package tf2_msgs. +/// Struct defined in msg/TFMessage in the package tf2_msgs. typedef struct tf2_msgs__msg__TFMessage { geometry_msgs__msg__TransformStamped__Sequence transforms; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.hpp similarity index 89% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.hpp index 415db92ba..06f9486fa 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__struct.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__struct.hpp @@ -5,14 +5,15 @@ #ifndef TF2_MSGS__MSG__DETAIL__TF_MESSAGE__STRUCT_HPP_ #define TF2_MSGS__MSG__DETAIL__TF_MESSAGE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'transforms' @@ -49,12 +50,12 @@ struct TFMessage_ // field types and members using _transforms_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _transforms_type transforms; // setters for named parameter idiom Type & set__transforms( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->transforms = _arg; return *this; diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__traits.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__traits.hpp new file mode 100644 index 000000000..abd75844e --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__traits.hpp @@ -0,0 +1,133 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from tf2_msgs:msg/TFMessage.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ +#define TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "tf2_msgs/msg/detail/tf_message__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'transforms' +#include "geometry_msgs/msg/detail/transform_stamped__traits.hpp" + +namespace tf2_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const TFMessage & msg, + std::ostream & out) +{ + out << "{"; + // member: transforms + { + if (msg.transforms.size() == 0) { + out << "transforms: []"; + } else { + out << "transforms: ["; + size_t pending_items = msg.transforms.size(); + for (auto item : msg.transforms) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const TFMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: transforms + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.transforms.size() == 0) { + out << "transforms: []\n"; + } else { + out << "transforms:\n"; + for (auto item : msg.transforms) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const TFMessage & 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 tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::msg::TFMessage & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::msg::TFMessage & msg) +{ + return tf2_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::msg::TFMessage"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/msg/TFMessage"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.c new file mode 100644 index 000000000..1b0e219b9 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.c @@ -0,0 +1,146 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from tf2_msgs:msg/TFMessage.idl +// generated code does not contain a copyright notice + +#include +#include "tf2_msgs/msg/detail/tf_message__rosidl_typesupport_introspection_c.h" +#include "tf2_msgs/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 "tf2_msgs/msg/detail/tf_message__functions.h" +#include "tf2_msgs/msg/detail/tf_message__struct.h" + + +// Include directives for member types +// Member `transforms` +#include "geometry_msgs/msg/transform_stamped.h" +// Member `transforms` +#include "geometry_msgs/msg/detail/transform_stamped__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_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; + tf2_msgs__msg__TFMessage__init(message_memory); +} + +void tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_fini_function(void * message_memory) +{ + tf2_msgs__msg__TFMessage__fini(message_memory); +} + +size_t tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__size_function__TFMessage__transforms( + const void * untyped_member) +{ + const geometry_msgs__msg__TransformStamped__Sequence * member = + (const geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); + return member->size; +} + +const void * tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_const_function__TFMessage__transforms( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__TransformStamped__Sequence * member = + (const geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_function__TFMessage__transforms( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__TransformStamped__Sequence * member = + (geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); + return &member->data[index]; +} + +void tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__fetch_function__TFMessage__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__TransformStamped * item = + ((const geometry_msgs__msg__TransformStamped *) + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_const_function__TFMessage__transforms(untyped_member, index)); + geometry_msgs__msg__TransformStamped * value = + (geometry_msgs__msg__TransformStamped *)(untyped_value); + *value = *item; +} + +void tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__assign_function__TFMessage__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__TransformStamped * item = + ((geometry_msgs__msg__TransformStamped *) + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_function__TFMessage__transforms(untyped_member, index)); + const geometry_msgs__msg__TransformStamped * value = + (const geometry_msgs__msg__TransformStamped *)(untyped_value); + *item = *value; +} + +bool tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__resize_function__TFMessage__transforms( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__TransformStamped__Sequence * member = + (geometry_msgs__msg__TransformStamped__Sequence *)(untyped_member); + geometry_msgs__msg__TransformStamped__Sequence__fini(member); + return geometry_msgs__msg__TransformStamped__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array[1] = { + { + "transforms", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__msg__TFMessage, transforms), // bytes offset in struct + NULL, // default value + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__size_function__TFMessage__transforms, // size() function pointer + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_const_function__TFMessage__transforms, // get_const(index) function pointer + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__get_function__TFMessage__transforms, // get(index) function pointer + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__fetch_function__TFMessage__transforms, // fetch(index, &value) function pointer + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__assign_function__TFMessage__transforms, // assign(index, value) function pointer + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__resize_function__TFMessage__transforms // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_members = { + "tf2_msgs__msg", // message namespace + "TFMessage", // message name + 1, // number of fields + sizeof(tf2_msgs__msg__TFMessage), + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array, // message members + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_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 tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle = { + 0, + &tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, msg, TFMessage)() { + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, TransformStamped)(); + if (!tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle.typesupport_identifier) { + tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__msg__TFMessage__rosidl_typesupport_introspection_c__TFMessage_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.cpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.cpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.cpp index e7d3cad36..84e9f388c 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.cpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__TFMessage__transforms(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__TFMessage__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__TFMessage__transforms(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__TFMessage__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__TFMessage__transforms(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__TFMessage__transforms(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember TFMessage_mes size_function__TFMessage__transforms, // size() function pointer get_const_function__TFMessage__transforms, // get_const(index) function pointer get_function__TFMessage__transforms, // get(index) function pointer + fetch_function__TFMessage__transforms, // fetch(index, &value) function pointer + assign_function__TFMessage__transforms, // assign(index, value) function pointer resize_function__TFMessage__transforms // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/detail/tf_message__type_support.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.h diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.hpp new file mode 100644 index 000000000..9e4767fa8 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/detail/tf_message__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from tf2_msgs:msg/TFMessage.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TYPE_SUPPORT_HPP_ +#define TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "tf2_msgs/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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + msg, + TFMessage +)(); +#ifdef __cplusplus +} +#endif + +#endif // TF2_MSGS__MSG__DETAIL__TF_MESSAGE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..dd9714737 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 TF2_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define TF2_MSGS__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_tf2_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_tf2_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_tf2_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_tf2_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_tf2_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_tf2_msgs ROSIDL_GENERATOR_CPP_EXPORT_tf2_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_tf2_msgs ROSIDL_GENERATOR_CPP_IMPORT_tf2_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_tf2_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_tf2_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_tf2_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_tf2_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TF2_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/tf2_error.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf2_error.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/tf2_error.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf2_error.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/tf2_error.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf2_error.hpp similarity index 86% rename from ThirdParty/ros/include/tf2_msgs/msg/tf2_error.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf2_error.hpp index fc5eac139..fde1b8b56 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/tf2_error.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf2_error.hpp @@ -7,5 +7,6 @@ #include "tf2_msgs/msg/detail/tf2_error__struct.hpp" #include "tf2_msgs/msg/detail/tf2_error__builder.hpp" #include "tf2_msgs/msg/detail/tf2_error__traits.hpp" +#include "tf2_msgs/msg/detail/tf2_error__type_support.hpp" #endif // TF2_MSGS__MSG__TF2_ERROR_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/msg/tf_message.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf_message.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/msg/tf_message.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf_message.h diff --git a/ThirdParty/ros/include/tf2_msgs/msg/tf_message.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf_message.hpp similarity index 86% rename from ThirdParty/ros/include/tf2_msgs/msg/tf_message.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf_message.hpp index c4e451197..9387c870b 100644 --- a/ThirdParty/ros/include/tf2_msgs/msg/tf_message.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/msg/tf_message.hpp @@ -7,5 +7,6 @@ #include "tf2_msgs/msg/detail/tf_message__struct.hpp" #include "tf2_msgs/msg/detail/tf_message__builder.hpp" #include "tf2_msgs/msg/detail/tf_message__traits.hpp" +#include "tf2_msgs/msg/detail/tf_message__type_support.hpp" #endif // TF2_MSGS__MSG__TF_MESSAGE_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__builder.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__builder.hpp similarity index 96% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__builder.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__builder.hpp index f2f0ce205..cf02dd1fa 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__builder.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__builder.hpp @@ -5,11 +5,12 @@ #ifndef TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__BUILDER_HPP_ #define TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__BUILDER_HPP_ -#include "tf2_msgs/srv/detail/frame_graph__struct.hpp" -#include #include #include +#include "tf2_msgs/srv/detail/frame_graph__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace tf2_msgs { diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__functions.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__functions.c similarity index 90% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__functions.c rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__functions.c index bfec9a10b..cc326ffbb 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__functions.c +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__functions.c @@ -200,22 +200,27 @@ tf2_msgs__srv__FrameGraph_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__srv__FrameGraph_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__srv__FrameGraph_Request * data = - (tf2_msgs__srv__FrameGraph_Request *)realloc(output->data, allocation_size); + (tf2_msgs__srv__FrameGraph_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 (!tf2_msgs__srv__FrameGraph_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__srv__FrameGraph_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; ) { - tf2_msgs__srv__FrameGraph_Request__fini(&data[i]); + tf2_msgs__srv__FrameGraph_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -435,22 +440,27 @@ tf2_msgs__srv__FrameGraph_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(tf2_msgs__srv__FrameGraph_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); tf2_msgs__srv__FrameGraph_Response * data = - (tf2_msgs__srv__FrameGraph_Response *)realloc(output->data, allocation_size); + (tf2_msgs__srv__FrameGraph_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 (!tf2_msgs__srv__FrameGraph_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!tf2_msgs__srv__FrameGraph_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; ) { - tf2_msgs__srv__FrameGraph_Response__fini(&data[i]); + tf2_msgs__srv__FrameGraph_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__functions.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__functions.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__functions.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__functions.h diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h index 21fa3f3c6..1b30a9f28 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_tf2_msgs__srv__FrameGraph_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__srv__FrameGraph_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_tf2_msgs__srv__FrameGraph_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs size_t max_serialized_size_tf2_msgs__srv__FrameGraph_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tf2_msgs diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp index 80f6aaa18..3dc163258 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_FrameGraph_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tf2_msgs max_serialized_size_FrameGraph_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.h similarity index 92% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.h index 21b69d0c0..af6de5764 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.h +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/FrameGraph in the package tf2_msgs. +/// Struct defined in srv/FrameGraph in the package tf2_msgs. typedef struct tf2_msgs__srv__FrameGraph_Request { uint8_t structure_needs_at_least_one_member; @@ -40,7 +40,7 @@ typedef struct tf2_msgs__srv__FrameGraph_Request__Sequence // Member 'frame_yaml' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/FrameGraph in the package tf2_msgs. +/// Struct defined in srv/FrameGraph in the package tf2_msgs. typedef struct tf2_msgs__srv__FrameGraph_Response { rosidl_runtime_c__String frame_yaml; diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.hpp similarity index 95% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.hpp index 447533d3b..837fae46b 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__struct.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__struct.hpp @@ -5,14 +5,15 @@ #ifndef TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__STRUCT_HPP_ #define TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__tf2_msgs__srv__FrameGraph_Request __attribute__((deprecated)) @@ -160,12 +161,12 @@ struct FrameGraph_Response_ // field types and members using _frame_yaml_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _frame_yaml_type frame_yaml; // setters for named parameter idiom Type & set__frame_yaml( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->frame_yaml = _arg; return *this; diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__traits.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__traits.hpp new file mode 100644 index 000000000..a19f795ec --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__traits.hpp @@ -0,0 +1,245 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from tf2_msgs:srv/FrameGraph.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ +#define TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "tf2_msgs/srv/detail/frame_graph__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace tf2_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const FrameGraph_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const FrameGraph_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const FrameGraph_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 tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::srv::FrameGraph_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::srv::FrameGraph_Request & msg) +{ + return tf2_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::srv::FrameGraph_Request"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/srv/FrameGraph_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace tf2_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const FrameGraph_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: frame_yaml + { + out << "frame_yaml: "; + rosidl_generator_traits::value_to_yaml(msg.frame_yaml, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const FrameGraph_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: frame_yaml + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "frame_yaml: "; + rosidl_generator_traits::value_to_yaml(msg.frame_yaml, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const FrameGraph_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 tf2_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use tf2_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const tf2_msgs::srv::FrameGraph_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + tf2_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use tf2_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const tf2_msgs::srv::FrameGraph_Response & msg) +{ + return tf2_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "tf2_msgs::srv::FrameGraph_Response"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/srv/FrameGraph_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "tf2_msgs::srv::FrameGraph"; +} + +template<> +inline const char * name() +{ + return "tf2_msgs/srv/FrameGraph"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.c b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.c new file mode 100644 index 000000000..427a1b983 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.c @@ -0,0 +1,232 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from tf2_msgs:srv/FrameGraph.idl +// generated code does not contain a copyright notice + +#include +#include "tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h" +#include "tf2_msgs/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 "tf2_msgs/srv/detail/frame_graph__functions.h" +#include "tf2_msgs/srv/detail/frame_graph__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_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; + tf2_msgs__srv__FrameGraph_Request__init(message_memory); +} + +void tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_fini_function(void * message_memory) +{ + tf2_msgs__srv__FrameGraph_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__srv__FrameGraph_Request, structure_needs_at_least_one_member), // 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 tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_members = { + "tf2_msgs__srv", // message namespace + "FrameGraph_Request", // message name + 1, // number of fields + sizeof(tf2_msgs__srv__FrameGraph_Request), + tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_member_array, // message members + tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_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 tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle = { + 0, + &tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Request)() { + if (!tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle.typesupport_identifier) { + tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__srv__FrameGraph_Request__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "tf2_msgs/srv/detail/frame_graph__rosidl_typesupport_introspection_c.h" +// already included above +// #include "tf2_msgs/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 "tf2_msgs/srv/detail/frame_graph__functions.h" +// already included above +// #include "tf2_msgs/srv/detail/frame_graph__struct.h" + + +// Include directives for member types +// Member `frame_yaml` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_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; + tf2_msgs__srv__FrameGraph_Response__init(message_memory); +} + +void tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_fini_function(void * message_memory) +{ + tf2_msgs__srv__FrameGraph_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_member_array[1] = { + { + "frame_yaml", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(tf2_msgs__srv__FrameGraph_Response, frame_yaml), // 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 tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_members = { + "tf2_msgs__srv", // message namespace + "FrameGraph_Response", // message name + 1, // number of fields + sizeof(tf2_msgs__srv__FrameGraph_Response), + tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_member_array, // message members + tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_init_function, // function to initialize message memory (memory has to be allocated) + tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_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 tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle = { + 0, + &tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Response)() { + if (!tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle.typesupport_identifier) { + tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &tf2_msgs__srv__FrameGraph_Response__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "tf2_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "tf2_msgs/srv/detail/frame_graph__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 tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_members = { + "tf2_msgs__srv", // service namespace + "FrameGraph", // service name + // these two fields are initialized below on the first access + NULL, // request message + // tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_Request_message_type_support_handle, + NULL // response message + // tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle = { + 0, + &tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_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, tf2_msgs, srv, FrameGraph_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tf2_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tf2_msgs, srv, FrameGraph)() { + if (!tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle.typesupport_identifier) { + tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_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, tf2_msgs, srv, FrameGraph_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, tf2_msgs, srv, FrameGraph_Response)()->data; + } + + return &tf2_msgs__srv__detail__frame_graph__rosidl_typesupport_introspection_c__FrameGraph_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.cpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.cpp similarity index 98% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.cpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.cpp index 7f44acc69..bff828fe5 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.cpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FrameGraph_Re 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember FrameGraph_Re 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 } }; diff --git a/ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/srv/detail/frame_graph__type_support.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.h diff --git a/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.hpp new file mode 100644 index 000000000..6fec3a850 --- /dev/null +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/detail/frame_graph__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from tf2_msgs:srv/FrameGraph.idl +// generated code does not contain a copyright notice + +#ifndef TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TYPE_SUPPORT_HPP_ +#define TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "tf2_msgs/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_tf2_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + srv, + FrameGraph +)(); +#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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + srv, + FrameGraph_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_tf2_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + tf2_msgs, + srv, + FrameGraph_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // TF2_MSGS__SRV__DETAIL__FRAME_GRAPH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/tf2_msgs/srv/frame_graph.h b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/frame_graph.h similarity index 100% rename from ThirdParty/ros/include/tf2_msgs/srv/frame_graph.h rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/frame_graph.h diff --git a/ThirdParty/ros/include/tf2_msgs/srv/frame_graph.hpp b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/frame_graph.hpp similarity index 86% rename from ThirdParty/ros/include/tf2_msgs/srv/frame_graph.hpp rename to ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/frame_graph.hpp index f42ba3b24..c60f42f40 100644 --- a/ThirdParty/ros/include/tf2_msgs/srv/frame_graph.hpp +++ b/ThirdParty/ros/include/tf2_msgs/tf2_msgs/srv/frame_graph.hpp @@ -7,5 +7,6 @@ #include "tf2_msgs/srv/detail/frame_graph__struct.hpp" #include "tf2_msgs/srv/detail/frame_graph__builder.hpp" #include "tf2_msgs/srv/detail/frame_graph__traits.hpp" +#include "tf2_msgs/srv/detail/frame_graph__type_support.hpp" #endif // TF2_MSGS__SRV__FRAME_GRAPH_HPP_ diff --git a/ThirdParty/ros/include/tracetools/tracetools.h b/ThirdParty/ros/include/tracetools/tracetools.h deleted file mode 100644 index 79dabb49f..000000000 --- a/ThirdParty/ros/include/tracetools/tracetools.h +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2019 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** \mainpage tracetools: tracing tools and instrumentation for ROS 2 - * - * `tracetools` provides utilities to instrument ROS. - * It provides two main headers: - * - * - tracetools/tracetools.h - * - instrumentation functions - * - tracetools/utils.hpp - * - utility functions - */ - -#ifndef TRACETOOLS__TRACETOOLS_H_ -#define TRACETOOLS__TRACETOOLS_H_ - -#include -#include -#include -#include "tracetools/config.h" -#include "tracetools/visibility_control.hpp" - -#ifndef TRACETOOLS_DISABLED -/// Call a tracepoint. -/** - * This is the preferred method over calling the actual function directly. - */ -# define TRACEPOINT(event_name, ...) \ - (ros_trace_ ## event_name)(__VA_ARGS__) -# define DECLARE_TRACEPOINT(event_name, ...) \ - TRACETOOLS_PUBLIC void ros_trace_ ## event_name(__VA_ARGS__); -#else -# define TRACEPOINT(event_name, ...) ((void) (0)) -# define DECLARE_TRACEPOINT(event_name, ...) -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Get tracing compilation status. -/** - * \return `true` if tracing is enabled, `false` otherwise - */ -TRACETOOLS_PUBLIC bool ros_trace_compile_status(); - -/// `rcl_init` -/** - * Initialisation for the whole process. - * Notes the `tracetools` version automatically. - * - * \param[in] context_handle pointer to the `rcl_context_t` handle - */ -DECLARE_TRACEPOINT( - rcl_init, - const void * context_handle) - -/// `rcl_node_init` -/** - * Node initialisation. - * Links a `rcl_node_t` handle to its `rmw_node_t` handle. - * - * \param[in] node_handle pointer to the node's `rcl_node_t` handle - * \param[in] rmw_handle pointer to the node's `rmw_node_t` handle - * \param[in] node_name node name - * \param[in] node_namespace node namespace - */ -DECLARE_TRACEPOINT( - rcl_node_init, - const void * node_handle, - const void * rmw_handle, - const char * node_name, - const char * node_namespace) - -/// `rcl_publisher_init` -/** - * Publisher initialisation. - * Links a `rcl_publisher_t` handle to its `rcl_node_t` handle - * and its `rmw_publisher_t` handle, and links it to a topic name. - * - * \param[in] publisher_handle pointer to the publisher's `rcl_publisher_t` handle - * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the publisher belongs to - * \param[in] rmw_publisher_handle pointer to the publisher's `rmw_publisher_t` handle - * \param[in] topic_name full topic name - * \param[in] queue_depth publisher history depth - */ -DECLARE_TRACEPOINT( - rcl_publisher_init, - const void * publisher_handle, - const void * node_handle, - const void * rmw_publisher_handle, - const char * topic_name, - const size_t queue_depth) - -/// `rcl_subscription_init` -/** - * Subscription initialisation. - * Links a `rcl_subscription_t` handle to its `rcl_node_t` handle - * and its `rmw_subscription_t` handle, and links it to a topic name. - * - * \param[in] subscription_handle pointer to the subscription's `rcl_subscription_t` handle - * \param[in] node_handle - * pointer to the `rcl_node_t` handle of the node the subscription belongs to - * \param[in] rmw_subscription_handle pointer to the subscription's `rmw_subscription_t` handle - * \param[in] topic_name full topic name - * \param[in] queue_depth subscription history depth - */ -DECLARE_TRACEPOINT( - rcl_subscription_init, - const void * subscription_handle, - const void * node_handle, - const void * rmw_subscription_handle, - const char * topic_name, - const size_t queue_depth) - -/// `rclcpp_subscription_init` -/** - * Subscription object initialisation. - * Links the `rclcpp::*Subscription*` object to a `rcl_subscription_t` handle. - * Needed since there could be more than 1 `rclcpp::*Subscription*` object - * for one `rcl` subscription (e.g. when using intra-process). - * - * \param[in] subscription_handle - * pointer to the `rcl_subscription_t` handle of the subscription this object belongs to - * \param[in] subscription pointer to this subscription object (e.g. `rclcpp::*Subscription*`) - */ -DECLARE_TRACEPOINT( - rclcpp_subscription_init, - const void * subscription_handle, - const void * subscription) - -/// `rclcpp_subscription_callback_added` -/** - * Link a subscription callback object to a subscription object. - * - * \param[in] subscription pointer to the subscription object this callback belongs to - * \param[in] callback pointer to this callback object (e.g. `rclcpp::AnySubscriptionCallback`) - */ -DECLARE_TRACEPOINT( - rclcpp_subscription_callback_added, - const void * subscription, - const void * callback) - -/// `rcl_service_init` -/** - * Service initialisation. - * Links a `rcl_service_t` handle to its `rcl_node_t` handle - * and its `rmw_service_t` handle, and links it to a service name. - * - * \param[in] service_handle pointer to the service's `rcl_service_t` handle - * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the service belongs to - * \param[in] rmw_service_handle pointer to the service's `rmw_service_t` handle - * \param[in] service_name full service name - */ -DECLARE_TRACEPOINT( - rcl_service_init, - const void * service_handle, - const void * node_handle, - const void * rmw_service_handle, - const char * service_name) - -/// `rclcpp_service_callback_added` -/** - * Link a service callback object to a service. - * - * \param[in] service_handle - * pointer to the `rcl_service_t` handle of the service this callback belongs to - * \param[in] callback pointer to this callback object (e.g. `rclcpp::AnyServiceCallback`) - */ -DECLARE_TRACEPOINT( - rclcpp_service_callback_added, - const void * service_handle, - const void * callback) - -/// `rcl_client_init` -/** - * Client initialisation. - * Links a `rcl_client_t` handle to its `rcl_node_t` handle - * and its `rmw_client_t` handle, and links it to a client name. - * - * \param[in] client_handle pointer to the client's `rcl_client_t` handle - * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the client belongs to - * \param[in] rmw_client_handle pointer to the client's `rmw_client_t` handle - * \param[in] service_name full client name - */ -DECLARE_TRACEPOINT( - rcl_client_init, - const void * client_handle, - const void * node_handle, - const void * rmw_client_handle, - const char * service_name) - -/// `rcl_timer_init` -/** - * Timer initialisation. - * Notes the timer's period. - * - * \param[in] timer_handle pointer to the timer's `rcl_timer_t` handle - * \param[in] period period in nanoseconds - */ -DECLARE_TRACEPOINT( - rcl_timer_init, - const void * timer_handle, - int64_t period) - -/// `rclcpp_timer_callback_added` -/** - * Link a timer callback object to its `rcl_timer_t` handle. - * - * \param[in] timer_handle - * pointer to the `rcl_timer_t` handle of the timer this callback belongs to - * \param[in] callback pointer to the callback object (`std::function`) - */ -DECLARE_TRACEPOINT( - rclcpp_timer_callback_added, - const void * timer_handle, - const void * callback) - -/// `rclcpp_callback_register` -/** - * Register a demangled function symbol with a callback. - * - * \param[in] callback pointer to the callback object - * (e.g. `rclcpp::AnySubscriptionCallback`, - * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) - * \param[in] function_symbol demangled symbol of the callback function/lambda, - * see \ref get_symbol() - */ -DECLARE_TRACEPOINT( - rclcpp_callback_register, - const void * callback, - const char * function_symbol) - -/// `callback_start` -/** - * Start of a callback. - * - * \param[in] callback pointer to this callback object - * (e.g. `rclcpp::AnySubscriptionCallback`, - * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) - * \param[in] is_intra_process whether this callback is done via intra-process or not - */ -DECLARE_TRACEPOINT( - callback_start, - const void * callback, - const bool is_intra_process) - -/// `callback_end` -/** - * End of a callback. - * - * \param[in] callback pointer to this callback object - * (e.g. `rclcpp::AnySubscriptionCallback`, - * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) - */ -DECLARE_TRACEPOINT( - callback_end, - const void * callback) - -#ifdef __cplusplus -} -#endif - -#endif // TRACETOOLS__TRACETOOLS_H_ diff --git a/ThirdParty/ros/include/tracetools/config.h b/ThirdParty/ros/include/tracetools/tracetools/config.h similarity index 100% rename from ThirdParty/ros/include/tracetools/config.h rename to ThirdParty/ros/include/tracetools/tracetools/config.h diff --git a/ThirdParty/ros/include/tracetools/tracetools/status.h b/ThirdParty/ros/include/tracetools/tracetools/status.h new file mode 100644 index 000000000..8dedcd04f --- /dev/null +++ b/ThirdParty/ros/include/tracetools/tracetools/status.h @@ -0,0 +1,31 @@ +// Copyright 2020 Christophe Bedard +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef TRACETOOLS__STATUS_H_ +#define TRACETOOLS__STATUS_H_ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +int tracetools_status(bool trace_compile_status_enabled); + +#ifdef __cplusplus +} +#endif + +#endif // TRACETOOLS__STATUS_H_ diff --git a/ThirdParty/ros/include/tracetools/tracetools/tracetools.h b/ThirdParty/ros/include/tracetools/tracetools/tracetools.h new file mode 100644 index 000000000..c9afdd4c9 --- /dev/null +++ b/ThirdParty/ros/include/tracetools/tracetools/tracetools.h @@ -0,0 +1,489 @@ +// Copyright 2019 Robert Bosch GmbH +// Copyright 2020 Christophe Bedard +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** \mainpage tracetools: tracing tools and instrumentation for ROS 2 + * + * `tracetools` provides utilities to instrument ROS. + * It provides two main headers: + * + * - tracetools/tracetools.h + * - instrumentation functions + * - tracetools/utils.hpp + * - utility functions + */ + +#ifndef TRACETOOLS__TRACETOOLS_H_ +#define TRACETOOLS__TRACETOOLS_H_ + +#include +#include +#include + +#include "tracetools/config.h" +#include "tracetools/visibility_control.hpp" + +#ifndef TRACETOOLS_DISABLED +/** + * This allows us to select between two versions of each macro + * to avoid the 'gnu-zero-variadic-macro-arguments' warning: + * 1. Only one macro argument for tracepoints without any arguments. + * 2. Up to 10 macro arguments for tracepoints with up to 9 arguments. + * We can easily support more than 10 macro arguments if needed. + */ +# define _GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME + +# define _TRACEPOINT_NOARGS(event_name) \ + (ros_trace_ ## event_name)() +# define _TRACEPOINT_ARGS(event_name, ...) \ + (ros_trace_ ## event_name)(__VA_ARGS__) +# define _DECLARE_TRACEPOINT_NOARGS(event_name) \ + TRACETOOLS_PUBLIC void ros_trace_ ## event_name(); +# define _DECLARE_TRACEPOINT_ARGS(event_name, ...) \ + TRACETOOLS_PUBLIC void ros_trace_ ## event_name(__VA_ARGS__); + +# define _GET_MACRO_TRACEPOINT(...) \ + _GET_MACRO( \ + __VA_ARGS__, \ + _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, \ + _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_ARGS, _TRACEPOINT_NOARGS, \ + shoud_not_be_called_without_any_arguments) +# define _GET_MACRO_DECLARE_TRACEPOINT(...) \ + _GET_MACRO( \ + __VA_ARGS__, \ + _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, \ + _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, \ + _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, _DECLARE_TRACEPOINT_ARGS, \ + _DECLARE_TRACEPOINT_NOARGS, shoud_not_be_called_without_any_arguments) + +/// Call a tracepoint. +/** + * The first argument is mandatory and should be the tracepoint event name. + * The other arguments should be the tracepoint arguments. + * This is the preferred method over calling the actual function directly. + * + * This macro currently supports up to 9 tracepoint arguments after the event name. + */ +# define TRACEPOINT(...) \ + _GET_MACRO_TRACEPOINT(__VA_ARGS__)(__VA_ARGS__) +# define DECLARE_TRACEPOINT(...) \ + _GET_MACRO_DECLARE_TRACEPOINT(__VA_ARGS__)(__VA_ARGS__) +#else +# define TRACEPOINT(...) ((void) (0)) +# define DECLARE_TRACEPOINT(...) +#endif // TRACETOOLS_DISABLED + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Get tracing compilation status. +/** + * \return `true` if tracing is enabled, `false` otherwise + */ +TRACETOOLS_PUBLIC bool ros_trace_compile_status(); + +/// `rcl_init` +/** + * Initialisation for the whole process. + * Notes the `tracetools` version automatically. + * + * \param[in] context_handle pointer to the `rcl_context_t` handle + */ +DECLARE_TRACEPOINT( + rcl_init, + const void * context_handle) + +/// `rcl_node_init` +/** + * Node initialisation. + * Links a `rcl_node_t` handle to its `rmw_node_t` handle. + * + * \param[in] node_handle pointer to the node's `rcl_node_t` handle + * \param[in] rmw_handle pointer to the node's `rmw_node_t` handle + * \param[in] node_name node name + * \param[in] node_namespace node namespace + */ +DECLARE_TRACEPOINT( + rcl_node_init, + const void * node_handle, + const void * rmw_handle, + const char * node_name, + const char * node_namespace) + +/// `rmw_publisher_init` +/** + * RMW publisher initialisation. + * Links a `rmw_publisher_t` handle to its DDS/rmw GID. + * + * \param[in] rmw_publisher_handle pointer to the publisher's `rmw_publisher_t` handle + * \param[in] gid pointer to the publisher's DDS/rmw GID + */ +DECLARE_TRACEPOINT( + rmw_publisher_init, + const void * rmw_publisher_handle, + const uint8_t * gid) + +/// `rcl_publisher_init` +/** + * Publisher initialisation. + * Links a `rcl_publisher_t` handle to its `rcl_node_t` handle + * and its `rmw_publisher_t` handle, and links it to a topic name. + * + * \param[in] publisher_handle pointer to the publisher's `rcl_publisher_t` handle + * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the publisher belongs to + * \param[in] rmw_publisher_handle pointer to the publisher's `rmw_publisher_t` handle + * \param[in] topic_name full topic name + * \param[in] queue_depth publisher history depth + */ +DECLARE_TRACEPOINT( + rcl_publisher_init, + const void * publisher_handle, + const void * node_handle, + const void * rmw_publisher_handle, + const char * topic_name, + const size_t queue_depth) + +/// `rclcpp_publish` +/** + * Message publication. + * Notes the pointer to the message being published at the `rclcpp` level. + * + * \param[in] publisher_handle not used, but kept for API/ABI stability + * \param[in] message pointer to the message being published + */ +DECLARE_TRACEPOINT( + rclcpp_publish, + const void * publisher_handle, + const void * message) + +/// `rcl_publish` +/** + * Message publication. + * Links a `rcl_publisher_t` handle to a pointer to + * a message being published at the `rcl` level. + * + * \param[in] publisher_handle pointer to the publisher's `rcl_publisher_t` handle + * \param[in] message pointer to the message being published + */ +DECLARE_TRACEPOINT( + rcl_publish, + const void * publisher_handle, + const void * message) + +/// `rmw_publish` +/** + * Message publication. + * Notes the pointer to the message being published at the `rmw` level. + * + * \param[in] message pointer to the message being published + */ +DECLARE_TRACEPOINT( + rmw_publish, + const void * message) + +/// `rmw_subscription_init` +/** + * RMW subscription initialisation. + * Links a `rmw_subscription_handle` handle to its DDS/rmw GID. + * + * \param[in] rmw_subscription_handle pointer to the publisher's `rmw_subscription_t` handle + * \param[in] gid pointer to the subscription's DDS/rmw GID + */ +DECLARE_TRACEPOINT( + rmw_subscription_init, + const void * rmw_subscription_handle, + const uint8_t * gid) + +/// `rcl_subscription_init` +/** + * Subscription initialisation. + * Links a `rcl_subscription_t` handle to its `rcl_node_t` handle + * and its `rmw_subscription_t` handle, and links it to a topic name. + * + * \param[in] subscription_handle pointer to the subscription's `rcl_subscription_t` handle + * \param[in] node_handle + * pointer to the `rcl_node_t` handle of the node the subscription belongs to + * \param[in] rmw_subscription_handle pointer to the subscription's `rmw_subscription_t` handle + * \param[in] topic_name full topic name + * \param[in] queue_depth subscription history depth + */ +DECLARE_TRACEPOINT( + rcl_subscription_init, + const void * subscription_handle, + const void * node_handle, + const void * rmw_subscription_handle, + const char * topic_name, + const size_t queue_depth) + +/// `rclcpp_subscription_init` +/** + * Subscription object initialisation. + * Links the `rclcpp::*Subscription*` object to a `rcl_subscription_t` handle. + * Needed since there could be more than 1 `rclcpp::*Subscription*` object + * for one `rcl` subscription (e.g. when using intra-process). + * + * \param[in] subscription_handle + * pointer to the `rcl_subscription_t` handle of the subscription this object belongs to + * \param[in] subscription pointer to this subscription object (e.g. `rclcpp::*Subscription*`) + */ +DECLARE_TRACEPOINT( + rclcpp_subscription_init, + const void * subscription_handle, + const void * subscription) + +/// `rclcpp_subscription_callback_added` +/** + * Link a subscription callback object to a subscription object. + * + * \param[in] subscription pointer to the subscription object this callback belongs to + * \param[in] callback pointer to this callback object (e.g. `rclcpp::AnySubscriptionCallback`) + */ +DECLARE_TRACEPOINT( + rclcpp_subscription_callback_added, + const void * subscription, + const void * callback) + +/// `rmw_take` +/** + * Message taking. + * Links a `rmw_subscription_t` handle to a pointer + * to a message being taken at the `rmw` level. + * + * \param[in] rmw_subscription_handle pointer to the subscription's `rmw_subscription_t` handle + * \param[in] message pointer to the message being taken + * \param[in] source_timestamp the source timestamp of the received message, + * or 0 (if no message or no info) + * \param[in] taken whether a message was taken + */ +DECLARE_TRACEPOINT( + rmw_take, + const void * rmw_subscription_handle, + const void * message, + int64_t source_timestamp, + const bool taken) + +/// `rcl_take` +/** + * Message taking. + * Notes the pointer to the message being taken at the `rcl` level. + * + * \param[in] message pointer to the message being taken + */ +DECLARE_TRACEPOINT( + rcl_take, + const void * message) + +/// `rclcpp_take` +/** + * Message taking. + * Notes the pointer to the message being taken at the `rclcpp` level. + * + * \param[in] message pointer to the message being taken + */ +DECLARE_TRACEPOINT( + rclcpp_take, + const void * message) + +/// `rcl_service_init` +/** + * Service initialisation. + * Links a `rcl_service_t` handle to its `rcl_node_t` handle + * and its `rmw_service_t` handle, and links it to a service name. + * + * \param[in] service_handle pointer to the service's `rcl_service_t` handle + * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the service belongs to + * \param[in] rmw_service_handle pointer to the service's `rmw_service_t` handle + * \param[in] service_name full service name + */ +DECLARE_TRACEPOINT( + rcl_service_init, + const void * service_handle, + const void * node_handle, + const void * rmw_service_handle, + const char * service_name) + +/// `rclcpp_service_callback_added` +/** + * Link a service callback object to a service. + * + * \param[in] service_handle + * pointer to the `rcl_service_t` handle of the service this callback belongs to + * \param[in] callback pointer to this callback object (e.g. `rclcpp::AnyServiceCallback`) + */ +DECLARE_TRACEPOINT( + rclcpp_service_callback_added, + const void * service_handle, + const void * callback) + +/// `rcl_client_init` +/** + * Client initialisation. + * Links a `rcl_client_t` handle to its `rcl_node_t` handle + * and its `rmw_client_t` handle, and links it to a client name. + * + * \param[in] client_handle pointer to the client's `rcl_client_t` handle + * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the client belongs to + * \param[in] rmw_client_handle pointer to the client's `rmw_client_t` handle + * \param[in] service_name full client name + */ +DECLARE_TRACEPOINT( + rcl_client_init, + const void * client_handle, + const void * node_handle, + const void * rmw_client_handle, + const char * service_name) + +/// `rcl_timer_init` +/** + * Timer initialisation. + * Notes the timer's period. + * + * \param[in] timer_handle pointer to the timer's `rcl_timer_t` handle + * \param[in] period period in nanoseconds + */ +DECLARE_TRACEPOINT( + rcl_timer_init, + const void * timer_handle, + int64_t period) + +/// `rclcpp_timer_callback_added` +/** + * Link a timer callback object to its `rcl_timer_t` handle. + * + * \param[in] timer_handle + * pointer to the `rcl_timer_t` handle of the timer this callback belongs to + * \param[in] callback pointer to the callback object (`std::function`) + */ +DECLARE_TRACEPOINT( + rclcpp_timer_callback_added, + const void * timer_handle, + const void * callback) + +/// `rclcpp_timer_link_node` +/** + * Link a timer to a node. + * + * \param[in] timer_handle pointer to the timer's `rcl_timer_t` handle + * \param[in] node_handle pointer to the `rcl_node_t` handle of the node the timer belongs to + */ +DECLARE_TRACEPOINT( + rclcpp_timer_link_node, + const void * timer_handle, + const void * node_handle) + +/// `rclcpp_callback_register` +/** + * Register a demangled function symbol with a callback. + * + * \param[in] callback pointer to the callback object + * (e.g. `rclcpp::AnySubscriptionCallback`, + * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) + * \param[in] function_symbol demangled symbol of the callback function/lambda, + * see \ref get_symbol() + */ +DECLARE_TRACEPOINT( + rclcpp_callback_register, + const void * callback, + const char * function_symbol) + +/// `callback_start` +/** + * Start of a callback. + * + * \param[in] callback pointer to this callback object + * (e.g. `rclcpp::AnySubscriptionCallback`, + * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) + * \param[in] is_intra_process whether this callback is done via intra-process or not + */ +DECLARE_TRACEPOINT( + callback_start, + const void * callback, + const bool is_intra_process) + +/// `callback_end` +/** + * End of a callback. + * + * \param[in] callback pointer to this callback object + * (e.g. `rclcpp::AnySubscriptionCallback`, + * `rclcpp::AnyServiceCallback`, timer `std::function`, etc.) + */ +DECLARE_TRACEPOINT( + callback_end, + const void * callback) + +/// `rcl_lifecycle_state_machine_init` +/** + * Lifecycle state machine initialisation. + * Links a `rcl_lifecycle_state_machine_t` handle to a `rcl_node_t` handle. + * + * \param[in] node_handle pointer to the node handle + * \param[in] state_machine pointer to the state machine + */ +DECLARE_TRACEPOINT( + rcl_lifecycle_state_machine_init, + const void * node_handle, + const void * state_machine) + +/// `rcl_lifecycle_transition` +/** + * Lifecycle transition between two states. + * + * \param[in] state_machine pointer to the state machine for the transition + * \param[in] start_label start state label + * \param[in] goal_label goal state label + */ +DECLARE_TRACEPOINT( + rcl_lifecycle_transition, + const void * state_machine, + const char * start_label, + const char * goal_label) + +/// `rclcpp_executor_get_next_ready` +/** + * Notes the start time of the executor phase that gets the next executable that's ready. + */ +DECLARE_TRACEPOINT( + rclcpp_executor_get_next_ready) + +/// `rclcpp_executor_wait_for_work` +/** + * Notes the start time of the executor phase that waits for work and notes the timeout value. + * + * \param[in] timeout the timeout value for the wait call + */ +DECLARE_TRACEPOINT( + rclcpp_executor_wait_for_work, + const int64_t timeout) + +/// `rclcpp_executor_execute` +/** + * Executable execution. + * Notes an executable being executed using its `rcl` handle, which can be a: + * * timer + * * subscription + * + * \param[in] handle pointer to the `rcl` handle of the executable being executed + */ +DECLARE_TRACEPOINT( + rclcpp_executor_execute, + const void * handle) + +#ifdef __cplusplus +} +#endif + +#endif // TRACETOOLS__TRACETOOLS_H_ diff --git a/ThirdParty/ros/include/tracetools/tracetools/utils.hpp b/ThirdParty/ros/include/tracetools/tracetools/utils.hpp new file mode 100644 index 000000000..6cf054215 --- /dev/null +++ b/ThirdParty/ros/include/tracetools/tracetools/utils.hpp @@ -0,0 +1,87 @@ +// Copyright 2019 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef TRACETOOLS__UTILS_HPP_ +#define TRACETOOLS__UTILS_HPP_ + +#include +#include + +#include "tracetools/config.h" + +/// Default symbol, used when address resolution fails. +#define TRACETOOLS_SYMBOL_UNKNOWN "UNKNOWN" + +#ifndef TRACETOOLS_DISABLED + +namespace tracetools +{ + +namespace detail +{ + +/// Demangle symbol string. +/** + * Internal function. + */ +const char * demangle_symbol(const char * mangled); + +/// Get symbol string from function pointer. +/** + * Internal function. + */ +const char * get_symbol_funcptr(void * funcptr); + +} // namespace detail + +/// Get symbol from an std::function object. +/** + * If function address resolution or symbol demangling fails, + * this will return a string that starts with \ref TRACETOOLS_SYMBOL_UNKNOWN. + * + * \param[in] f the std::function object + * \return the symbol, or a placeholder + */ +template +const char * get_symbol(std::function f) +{ + typedef T (fnType)(U...); + fnType ** fnPointer = f.template target(); + // If we get an actual address + if (fnPointer != nullptr) { + void * funcptr = reinterpret_cast(*fnPointer); + return detail::get_symbol_funcptr(funcptr); + } + // Otherwise we have to go through target_type() + return detail::demangle_symbol(f.target_type().name()); +} + +/// Get symbol from a function-related object. +/** + * Fallback meant for lambdas with captures. + * + * \param[in] l a generic object + * \return the symbol + */ +template +const char * get_symbol(L && l) +{ + return detail::demangle_symbol(typeid(l).name()); +} + +} // namespace tracetools + +#endif // TRACETOOLS_DISABLED + +#endif // TRACETOOLS__UTILS_HPP_ diff --git a/ThirdParty/ros/include/tracetools/visibility_control.hpp b/ThirdParty/ros/include/tracetools/tracetools/visibility_control.hpp similarity index 100% rename from ThirdParty/ros/include/tracetools/visibility_control.hpp rename to ThirdParty/ros/include/tracetools/tracetools/visibility_control.hpp diff --git a/ThirdParty/ros/include/tracetools/utils.hpp b/ThirdParty/ros/include/tracetools/utils.hpp deleted file mode 100644 index e3c934d9c..000000000 --- a/ThirdParty/ros/include/tracetools/utils.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2019 Robert Bosch GmbH -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef TRACETOOLS__UTILS_HPP_ -#define TRACETOOLS__UTILS_HPP_ - -#include -#include - -#include "tracetools/visibility_control.hpp" - -/// Default symbol, used when address resolution fails. -#define SYMBOL_UNKNOWN "UNKNOWN" - -TRACETOOLS_PUBLIC const char * _demangle_symbol(const char * mangled); - -TRACETOOLS_PUBLIC const char * _get_symbol_funcptr(void * funcptr); - -/// Get symbol from an std::function object. -/** - * If function address resolution or symbol demangling fails, - * this will return a string that starts with \ref SYMBOL_UNKNOWN. - * - * \param[in] f the std::function object - * \return the symbol, or a placeholder - */ -template -const char * get_symbol(std::function f) -{ - typedef T (fnType)(U...); - fnType ** fnPointer = f.template target(); - // If we get an actual address - if (fnPointer != nullptr) { - void * funcptr = reinterpret_cast(*fnPointer); - return _get_symbol_funcptr(funcptr); - } - // Otherwise we have to go through target_type() - return _demangle_symbol(f.target_type().name()); -} - -/// Get symbol from a function-related object. -/** - * Fallback meant for lambdas with captures. - * - * \param[in] l a generic object - * \return the symbol - */ -template -const char * get_symbol(L && l) -{ - return _demangle_symbol(typeid(l).name()); -} - -#endif // TRACETOOLS__UTILS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.h b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.h deleted file mode 100644 index f8969fa32..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from trajectory_msgs:msg/JointTrajectory.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ -#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'joint_names' -#include "rosidl_runtime_c/string.h" -// Member 'points' -#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.h" - -// Struct defined in msg/JointTrajectory in the package trajectory_msgs. -typedef struct trajectory_msgs__msg__JointTrajectory -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String__Sequence joint_names; - trajectory_msgs__msg__JointTrajectoryPoint__Sequence points; -} trajectory_msgs__msg__JointTrajectory; - -// Struct for a sequence of trajectory_msgs__msg__JointTrajectory. -typedef struct trajectory_msgs__msg__JointTrajectory__Sequence -{ - trajectory_msgs__msg__JointTrajectory * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} trajectory_msgs__msg__JointTrajectory__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp deleted file mode 100644 index df8055241..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from trajectory_msgs:msg/JointTrajectory.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ -#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ - -#include "trajectory_msgs/msg/detail/joint_trajectory__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "trajectory_msgs::msg::JointTrajectory"; -} - -template<> -inline const char * name() -{ - return "trajectory_msgs/msg/JointTrajectory"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.c b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.c deleted file mode 100644 index dc942acaa..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.c +++ /dev/null @@ -1,160 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from trajectory_msgs:msg/JointTrajectory.idl -// generated code does not contain a copyright notice - -#include -#include "trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h" -#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/joint_trajectory__functions.h" -#include "trajectory_msgs/msg/detail/joint_trajectory__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `joint_names` -#include "rosidl_runtime_c/string_functions.h" -// Member `points` -#include "trajectory_msgs/msg/joint_trajectory_point.h" -// Member `points` -#include "trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_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; - trajectory_msgs__msg__JointTrajectory__init(message_memory); -} - -void JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_fini_function(void * message_memory) -{ - trajectory_msgs__msg__JointTrajectory__fini(message_memory); -} - -size_t JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__points( - const void * untyped_member) -{ - const trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = - (const trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); - return member->size; -} - -const void * JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__points( - const void * untyped_member, size_t index) -{ - const trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = - (const trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__points( - void * untyped_member, size_t index) -{ - trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = - (trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__points( - void * untyped_member, size_t size) -{ - trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = - (trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); - trajectory_msgs__msg__JointTrajectoryPoint__Sequence__fini(member); - return trajectory_msgs__msg__JointTrajectoryPoint__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[3] = { - { - "header", // 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(trajectory_msgs__msg__JointTrajectory, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "joint_names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectory, joint_names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectory, points), // bytes offset in struct - NULL, // default value - JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__points, // size() function pointer - JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__points, // get_const(index) function pointer - JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__points, // get(index) function pointer - JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__points // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_members = { - "trajectory_msgs__msg", // message namespace - "JointTrajectory", // message name - 3, // number of fields - sizeof(trajectory_msgs__msg__JointTrajectory), - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array, // message members - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_init_function, // function to initialize message memory (memory has to be allocated) - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_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 JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle = { - 0, - &JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectory)() { - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectoryPoint)(); - if (!JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle.typesupport_identifier) { - JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h deleted file mode 100644 index ebd58646e..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h +++ /dev/null @@ -1,53 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ -#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'positions' -// Member 'velocities' -// Member 'accelerations' -// Member 'effort' -#include "rosidl_runtime_c/primitives_sequence.h" -// Member 'time_from_start' -#include "builtin_interfaces/msg/detail/duration__struct.h" - -// Struct defined in msg/JointTrajectoryPoint in the package trajectory_msgs. -typedef struct trajectory_msgs__msg__JointTrajectoryPoint -{ - rosidl_runtime_c__double__Sequence positions; - rosidl_runtime_c__double__Sequence velocities; - rosidl_runtime_c__double__Sequence accelerations; - rosidl_runtime_c__double__Sequence effort; - builtin_interfaces__msg__Duration time_from_start; -} trajectory_msgs__msg__JointTrajectoryPoint; - -// Struct for a sequence of trajectory_msgs__msg__JointTrajectoryPoint. -typedef struct trajectory_msgs__msg__JointTrajectoryPoint__Sequence -{ - trajectory_msgs__msg__JointTrajectoryPoint * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} trajectory_msgs__msg__JointTrajectoryPoint__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp deleted file mode 100644 index cc18a43a2..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ -#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ - -#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'time_from_start' -#include "builtin_interfaces/msg/detail/duration__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "trajectory_msgs::msg::JointTrajectoryPoint"; -} - -template<> -inline const char * name() -{ - return "trajectory_msgs/msg/JointTrajectoryPoint"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c deleted file mode 100644 index a9305e8b9..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c +++ /dev/null @@ -1,154 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl -// generated code does not contain a copyright notice - -#include -#include "trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h" -#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/joint_trajectory_point__functions.h" -#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.h" - - -// Include directives for member types -// Member `positions` -// Member `velocities` -// Member `accelerations` -// Member `effort` -#include "rosidl_runtime_c/primitives_sequence_functions.h" -// Member `time_from_start` -#include "builtin_interfaces/msg/duration.h" -// Member `time_from_start` -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_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; - trajectory_msgs__msg__JointTrajectoryPoint__init(message_memory); -} - -void JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_fini_function(void * message_memory) -{ - trajectory_msgs__msg__JointTrajectoryPoint__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array[5] = { - { - "positions", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectoryPoint, positions), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "velocities", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectoryPoint, velocities), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "accelerations", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectoryPoint, accelerations), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "effort", // name - rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__JointTrajectoryPoint, effort), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "time_from_start", // 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(trajectory_msgs__msg__JointTrajectoryPoint, time_from_start), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_members = { - "trajectory_msgs__msg", // message namespace - "JointTrajectoryPoint", // message name - 5, // number of fields - sizeof(trajectory_msgs__msg__JointTrajectoryPoint), - JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array, // message members - JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) - JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_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 JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle = { - 0, - &JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectoryPoint)() { - JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); - if (!JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle.typesupport_identifier) { - JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp b/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp deleted file mode 100644 index 9d4dc7520..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp +++ /dev/null @@ -1,275 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from trajectory_msgs:msg/JointTrajectoryPoint.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 "trajectory_msgs/msg/detail/joint_trajectory_point__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 trajectory_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void JointTrajectoryPoint_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) trajectory_msgs::msg::JointTrajectoryPoint(_init); -} - -void JointTrajectoryPoint_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~JointTrajectoryPoint(); -} - -size_t size_function__JointTrajectoryPoint__positions(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointTrajectoryPoint__positions(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointTrajectoryPoint__positions(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointTrajectoryPoint__positions(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointTrajectoryPoint__velocities(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointTrajectoryPoint__velocities(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointTrajectoryPoint__velocities(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointTrajectoryPoint__velocities(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointTrajectoryPoint__accelerations(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointTrajectoryPoint__accelerations(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointTrajectoryPoint__accelerations(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointTrajectoryPoint__accelerations(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__JointTrajectoryPoint__effort(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__JointTrajectoryPoint__effort(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__JointTrajectoryPoint__effort(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__JointTrajectoryPoint__effort(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember JointTrajectoryPoint_message_member_array[5] = { - { - "positions", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs::msg::JointTrajectoryPoint, positions), // bytes offset in struct - nullptr, // default value - size_function__JointTrajectoryPoint__positions, // size() function pointer - get_const_function__JointTrajectoryPoint__positions, // get_const(index) function pointer - get_function__JointTrajectoryPoint__positions, // get(index) function pointer - resize_function__JointTrajectoryPoint__positions // resize(index) function pointer - }, - { - "velocities", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs::msg::JointTrajectoryPoint, velocities), // bytes offset in struct - nullptr, // default value - size_function__JointTrajectoryPoint__velocities, // size() function pointer - get_const_function__JointTrajectoryPoint__velocities, // get_const(index) function pointer - get_function__JointTrajectoryPoint__velocities, // get(index) function pointer - resize_function__JointTrajectoryPoint__velocities // resize(index) function pointer - }, - { - "accelerations", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs::msg::JointTrajectoryPoint, accelerations), // bytes offset in struct - nullptr, // default value - size_function__JointTrajectoryPoint__accelerations, // size() function pointer - get_const_function__JointTrajectoryPoint__accelerations, // get_const(index) function pointer - get_function__JointTrajectoryPoint__accelerations, // get(index) function pointer - resize_function__JointTrajectoryPoint__accelerations // resize(index) function pointer - }, - { - "effort", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type - 0, // upper bound of string - nullptr, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs::msg::JointTrajectoryPoint, effort), // bytes offset in struct - nullptr, // default value - size_function__JointTrajectoryPoint__effort, // size() function pointer - get_const_function__JointTrajectoryPoint__effort, // get_const(index) function pointer - get_function__JointTrajectoryPoint__effort, // get(index) function pointer - resize_function__JointTrajectoryPoint__effort // resize(index) function pointer - }, - { - "time_from_start", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs::msg::JointTrajectoryPoint, time_from_start), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers JointTrajectoryPoint_message_members = { - "trajectory_msgs::msg", // message namespace - "JointTrajectoryPoint", // message name - 5, // number of fields - sizeof(trajectory_msgs::msg::JointTrajectoryPoint), - JointTrajectoryPoint_message_member_array, // message members - JointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) - JointTrajectoryPoint_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t JointTrajectoryPoint_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &JointTrajectoryPoint_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace trajectory_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::trajectory_msgs::msg::rosidl_typesupport_introspection_cpp::JointTrajectoryPoint_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, trajectory_msgs, msg, JointTrajectoryPoint)() { - return &::trajectory_msgs::msg::rosidl_typesupport_introspection_cpp::JointTrajectoryPoint_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h b/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h deleted file mode 100644 index d9faf2778..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ -#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'joint_names' -#include "rosidl_runtime_c/string.h" -// Member 'points' -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h" - -// Struct defined in msg/MultiDOFJointTrajectory in the package trajectory_msgs. -typedef struct trajectory_msgs__msg__MultiDOFJointTrajectory -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String__Sequence joint_names; - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence points; -} trajectory_msgs__msg__MultiDOFJointTrajectory; - -// Struct for a sequence of trajectory_msgs__msg__MultiDOFJointTrajectory. -typedef struct trajectory_msgs__msg__MultiDOFJointTrajectory__Sequence -{ - trajectory_msgs__msg__MultiDOFJointTrajectory * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} trajectory_msgs__msg__MultiDOFJointTrajectory__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp deleted file mode 100644 index 7caa10236..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ -#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ - -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "trajectory_msgs::msg::MultiDOFJointTrajectory"; -} - -template<> -inline const char * name() -{ - return "trajectory_msgs/msg/MultiDOFJointTrajectory"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c b/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c deleted file mode 100644 index 506bc56d4..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c +++ /dev/null @@ -1,160 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl -// generated code does not contain a copyright notice - -#include -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h" -#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h" -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `joint_names` -#include "rosidl_runtime_c/string_functions.h" -// Member `points` -#include "trajectory_msgs/msg/multi_dof_joint_trajectory_point.h" -// Member `points` -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_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; - trajectory_msgs__msg__MultiDOFJointTrajectory__init(message_memory); -} - -void MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_fini_function(void * message_memory) -{ - trajectory_msgs__msg__MultiDOFJointTrajectory__fini(message_memory); -} - -size_t MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__points( - const void * untyped_member) -{ - const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = - (const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__points( - const void * untyped_member, size_t index) -{ - const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = - (const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__points( - void * untyped_member, size_t index) -{ - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = - (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__points( - void * untyped_member, size_t size) -{ - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = - (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__fini(member); - return trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[3] = { - { - "header", // 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(trajectory_msgs__msg__MultiDOFJointTrajectory, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "joint_names", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__MultiDOFJointTrajectory, joint_names), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__MultiDOFJointTrajectory, points), // bytes offset in struct - NULL, // default value - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__points, // size() function pointer - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__points, // get_const(index) function pointer - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__points, // get(index) function pointer - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__points // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_members = { - "trajectory_msgs__msg", // message namespace - "MultiDOFJointTrajectory", // message name - 3, // number of fields - sizeof(trajectory_msgs__msg__MultiDOFJointTrajectory), - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array, // message members - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_init_function, // function to initialize message memory (memory has to be allocated) - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_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 MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle = { - 0, - &MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectory)() { - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectoryPoint)(); - if (!MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle.typesupport_identifier) { - MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp deleted file mode 100644 index aaff5a0aa..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from trajectory_msgs:msg/MultiDOFJointTrajectoryPoint.idl -// generated code does not contain a copyright notice - -#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ -#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ - -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'time_from_start' -#include "builtin_interfaces/msg/detail/duration__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "trajectory_msgs::msg::MultiDOFJointTrajectoryPoint"; -} - -template<> -inline const char * name() -{ - return "trajectory_msgs/msg/MultiDOFJointTrajectoryPoint"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c b/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c deleted file mode 100644 index fad820538..000000000 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c +++ /dev/null @@ -1,249 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from trajectory_msgs:msg/MultiDOFJointTrajectoryPoint.idl -// generated code does not contain a copyright notice - -#include -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h" -#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h" -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h" - - -// Include directives for member types -// Member `transforms` -#include "geometry_msgs/msg/transform.h" -// Member `transforms` -#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" -// Member `velocities` -// Member `accelerations` -#include "geometry_msgs/msg/twist.h" -// Member `velocities` -// Member `accelerations` -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" -// Member `time_from_start` -#include "builtin_interfaces/msg/duration.h" -// Member `time_from_start` -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_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; - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__init(message_memory); -} - -void MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_fini_function(void * message_memory) -{ - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__fini(message_memory); -} - -size_t MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Transform__transforms( - const void * untyped_member) -{ - const geometry_msgs__msg__Transform__Sequence * member = - (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Transform__transforms( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Transform__Sequence * member = - (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Transform__transforms( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Transform__Sequence * member = - (geometry_msgs__msg__Transform__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Transform__transforms( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Transform__Sequence * member = - (geometry_msgs__msg__Transform__Sequence *)(untyped_member); - geometry_msgs__msg__Transform__Sequence__fini(member); - return geometry_msgs__msg__Transform__Sequence__init(member, size); -} - -size_t MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Twist__velocities( - const void * untyped_member) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Twist__velocities( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Twist__velocities( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Twist__velocities( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - geometry_msgs__msg__Twist__Sequence__fini(member); - return geometry_msgs__msg__Twist__Sequence__init(member, size); -} - -size_t MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Twist__accelerations( - const void * untyped_member) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return member->size; -} - -const void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Twist__accelerations( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Twist__Sequence * member = - (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Twist__accelerations( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Twist__accelerations( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Twist__Sequence * member = - (geometry_msgs__msg__Twist__Sequence *)(untyped_member); - geometry_msgs__msg__Twist__Sequence__fini(member); - return geometry_msgs__msg__Twist__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[4] = { - { - "transforms", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, transforms), // bytes offset in struct - NULL, // default value - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Transform__transforms, // size() function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Transform__transforms, // get_const(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Transform__transforms, // get(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Transform__transforms // resize(index) function pointer - }, - { - "velocities", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, velocities), // bytes offset in struct - NULL, // default value - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Twist__velocities, // size() function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Twist__velocities, // get_const(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Twist__velocities, // get(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Twist__velocities // resize(index) function pointer - }, - { - "accelerations", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, accelerations), // bytes offset in struct - NULL, // default value - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__Twist__accelerations, // size() function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__Twist__accelerations, // get_const(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__Twist__accelerations, // get(index) function pointer - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__Twist__accelerations // resize(index) function pointer - }, - { - "time_from_start", // 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(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, time_from_start), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_members = { - "trajectory_msgs__msg", // message namespace - "MultiDOFJointTrajectoryPoint", // message name - 4, // number of fields - sizeof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint), - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array, // message members - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_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 MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle = { - 0, - &MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectoryPoint)() { - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); - if (!MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle.typesupport_identifier) { - MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp similarity index 97% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp index 526eb4757..75e804528 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__builder.hpp @@ -5,11 +5,12 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__BUILDER_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__BUILDER_HPP_ -#include "trajectory_msgs/msg/detail/joint_trajectory__struct.hpp" -#include #include #include +#include "trajectory_msgs/msg/detail/joint_trajectory__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace trajectory_msgs { diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__functions.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__functions.c similarity index 92% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__functions.c rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__functions.c index b5f28154e..7bcceeafc 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__functions.c +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__functions.c @@ -258,22 +258,27 @@ trajectory_msgs__msg__JointTrajectory__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(trajectory_msgs__msg__JointTrajectory); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); trajectory_msgs__msg__JointTrajectory * data = - (trajectory_msgs__msg__JointTrajectory *)realloc(output->data, allocation_size); + (trajectory_msgs__msg__JointTrajectory *)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 (!trajectory_msgs__msg__JointTrajectory__init(&data[i])) { - /* free currently allocated and return false */ + if (!trajectory_msgs__msg__JointTrajectory__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; ) { - trajectory_msgs__msg__JointTrajectory__fini(&data[i]); + trajectory_msgs__msg__JointTrajectory__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__functions.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__functions.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__functions.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__functions.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h index e1896bfff..6f646da00 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_trajectory_msgs__msg__JointTrajectory( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs size_t max_serialized_size_trajectory_msgs__msg__JointTrajectory( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp index b1effb66d..371ac5f89 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_trajectory_msgs max_serialized_size_JointTrajectory( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.h new file mode 100644 index 000000000..36c18ce58 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.h @@ -0,0 +1,58 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from trajectory_msgs:msg/JointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'joint_names' +#include "rosidl_runtime_c/string.h" +// Member 'points' +#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.h" + +/// Struct defined in msg/JointTrajectory in the package trajectory_msgs. +/** + * The header is used to specify the coordinate frame and the reference time for + * the trajectory durations + */ +typedef struct trajectory_msgs__msg__JointTrajectory +{ + std_msgs__msg__Header header; + /// The names of the active joints in each trajectory point. These names are + /// ordered and must correspond to the values in each trajectory point. + rosidl_runtime_c__String__Sequence joint_names; + /// Array of trajectory points, which describe the positions, velocities, + /// accelerations and/or efforts of the joints at each time point. + trajectory_msgs__msg__JointTrajectoryPoint__Sequence points; +} trajectory_msgs__msg__JointTrajectory; + +// Struct for a sequence of trajectory_msgs__msg__JointTrajectory. +typedef struct trajectory_msgs__msg__JointTrajectory__Sequence +{ + trajectory_msgs__msg__JointTrajectory * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} trajectory_msgs__msg__JointTrajectory__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp similarity index 81% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp index 907a21bd0..a36ca891b 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__struct.hpp @@ -5,14 +5,15 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -55,10 +56,10 @@ struct JointTrajectory_ std_msgs::msg::Header_; _header_type header; using _joint_names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _joint_names_type joint_names; using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _points_type points; // setters for named parameter idiom @@ -69,13 +70,13 @@ struct JointTrajectory_ return *this; } Type & set__joint_names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->joint_names = _arg; return *this; } Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->points = _arg; return *this; diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp new file mode 100644 index 000000000..3f8398fa2 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__traits.hpp @@ -0,0 +1,189 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from trajectory_msgs:msg/JointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "trajectory_msgs/msg/detail/joint_trajectory__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'points' +#include "trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp" + +namespace trajectory_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const JointTrajectory & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: joint_names + { + if (msg.joint_names.size() == 0) { + out << "joint_names: []"; + } else { + out << "joint_names: ["; + size_t pending_items = msg.joint_names.size(); + for (auto item : msg.joint_names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const JointTrajectory & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: joint_names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.joint_names.size() == 0) { + out << "joint_names: []\n"; + } else { + out << "joint_names:\n"; + for (auto item : msg.joint_names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const JointTrajectory & 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 trajectory_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use trajectory_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const trajectory_msgs::msg::JointTrajectory & msg, + std::ostream & out, size_t indentation = 0) +{ + trajectory_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use trajectory_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const trajectory_msgs::msg::JointTrajectory & msg) +{ + return trajectory_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "trajectory_msgs::msg::JointTrajectory"; +} + +template<> +inline const char * name() +{ + return "trajectory_msgs/msg/JointTrajectory"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.c new file mode 100644 index 000000000..6066ad901 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.c @@ -0,0 +1,243 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from trajectory_msgs:msg/JointTrajectory.idl +// generated code does not contain a copyright notice + +#include +#include "trajectory_msgs/msg/detail/joint_trajectory__rosidl_typesupport_introspection_c.h" +#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/joint_trajectory__functions.h" +#include "trajectory_msgs/msg/detail/joint_trajectory__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `joint_names` +#include "rosidl_runtime_c/string_functions.h" +// Member `points` +#include "trajectory_msgs/msg/joint_trajectory_point.h" +// Member `points` +#include "trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_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; + trajectory_msgs__msg__JointTrajectory__init(message_memory); +} + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_fini_function(void * message_memory) +{ + trajectory_msgs__msg__JointTrajectory__fini(message_memory); +} + +size_t trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectory__joint_names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__joint_names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__joint_names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__fetch_function__JointTrajectory__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__joint_names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__assign_function__JointTrajectory__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__joint_names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectory__joint_names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectory__points( + const void * untyped_member) +{ + const trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = + (const trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__points( + const void * untyped_member, size_t index) +{ + const trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = + (const trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__points( + void * untyped_member, size_t index) +{ + trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = + (trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__fetch_function__JointTrajectory__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const trajectory_msgs__msg__JointTrajectoryPoint * item = + ((const trajectory_msgs__msg__JointTrajectoryPoint *) + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__points(untyped_member, index)); + trajectory_msgs__msg__JointTrajectoryPoint * value = + (trajectory_msgs__msg__JointTrajectoryPoint *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__assign_function__JointTrajectory__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + trajectory_msgs__msg__JointTrajectoryPoint * item = + ((trajectory_msgs__msg__JointTrajectoryPoint *) + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__points(untyped_member, index)); + const trajectory_msgs__msg__JointTrajectoryPoint * value = + (const trajectory_msgs__msg__JointTrajectoryPoint *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectory__points( + void * untyped_member, size_t size) +{ + trajectory_msgs__msg__JointTrajectoryPoint__Sequence * member = + (trajectory_msgs__msg__JointTrajectoryPoint__Sequence *)(untyped_member); + trajectory_msgs__msg__JointTrajectoryPoint__Sequence__fini(member); + return trajectory_msgs__msg__JointTrajectoryPoint__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[3] = { + { + "header", // 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(trajectory_msgs__msg__JointTrajectory, header), // 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 + }, + { + "joint_names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectory, joint_names), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectory__joint_names, // size() function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__joint_names, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__joint_names, // get(index) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__fetch_function__JointTrajectory__joint_names, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__assign_function__JointTrajectory__joint_names, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectory__joint_names // resize(index) function pointer + }, + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectory, points), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__size_function__JointTrajectory__points, // size() function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_const_function__JointTrajectory__points, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__get_function__JointTrajectory__points, // get(index) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__fetch_function__JointTrajectory__points, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__assign_function__JointTrajectory__points, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__resize_function__JointTrajectory__points // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_members = { + "trajectory_msgs__msg", // message namespace + "JointTrajectory", // message name + 3, // number of fields + sizeof(trajectory_msgs__msg__JointTrajectory), + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array, // message members + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_init_function, // function to initialize message memory (memory has to be allocated) + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_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 trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle = { + 0, + &trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectory)() { + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectoryPoint)(); + if (!trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle.typesupport_identifier) { + trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &trajectory_msgs__msg__JointTrajectory__rosidl_typesupport_introspection_c__JointTrajectory_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp similarity index 78% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp index d69e5fdcf..a9c090017 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__JointTrajectory__joint_names(void * untyped_member, size_t return &member[index]; } +void fetch_function__JointTrajectory__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectory__joint_names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectory__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectory__joint_names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__JointTrajectory__joint_names(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__JointTrajectory__points(void * untyped_member, size_t index return &member[index]; } +void fetch_function__JointTrajectory__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectory__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectory__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectory__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__JointTrajectory__points(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JointTrajecto 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JointTrajecto size_function__JointTrajectory__joint_names, // size() function pointer get_const_function__JointTrajectory__joint_names, // get_const(index) function pointer get_function__JointTrajectory__joint_names, // get(index) function pointer + fetch_function__JointTrajectory__joint_names, // fetch(index, &value) function pointer + assign_function__JointTrajectory__joint_names, // assign(index, value) function pointer resize_function__JointTrajectory__joint_names // resize(index) function pointer }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember JointTrajecto size_function__JointTrajectory__points, // size() function pointer get_const_function__JointTrajectory__points, // get_const(index) function pointer get_function__JointTrajectory__points, // get(index) function pointer + fetch_function__JointTrajectory__points, // fetch(index, &value) function pointer + assign_function__JointTrajectory__points, // assign(index, value) function pointer resize_function__JointTrajectory__points // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory__type_support.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.h diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.hpp new file mode 100644 index 000000000..32a27e47f --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from trajectory_msgs:msg/JointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "trajectory_msgs/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_trajectory_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + trajectory_msgs, + msg, + JointTrajectory +)(); +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp index 574078cc6..b848ae9ab 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp @@ -5,11 +5,12 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__BUILDER_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__BUILDER_HPP_ -#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp" -#include #include #include +#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace trajectory_msgs { diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c similarity index 93% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c index f5f5c9c3e..3c0d661ab 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__functions.c @@ -297,22 +297,27 @@ trajectory_msgs__msg__JointTrajectoryPoint__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(trajectory_msgs__msg__JointTrajectoryPoint); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); trajectory_msgs__msg__JointTrajectoryPoint * data = - (trajectory_msgs__msg__JointTrajectoryPoint *)realloc(output->data, allocation_size); + (trajectory_msgs__msg__JointTrajectoryPoint *)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 (!trajectory_msgs__msg__JointTrajectoryPoint__init(&data[i])) { - /* free currently allocated and return false */ + if (!trajectory_msgs__msg__JointTrajectoryPoint__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; ) { - trajectory_msgs__msg__JointTrajectoryPoint__fini(&data[i]); + trajectory_msgs__msg__JointTrajectoryPoint__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__functions.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__functions.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__functions.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__functions.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h index 876dfd439..fee468e58 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_trajectory_msgs__msg__JointTrajectoryPoint( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs size_t max_serialized_size_trajectory_msgs__msg__JointTrajectoryPoint( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp index cdaecec01..9fd2fc975 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_trajectory_msgs max_serialized_size_JointTrajectoryPoint( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h new file mode 100644 index 000000000..36a6c5147 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.h @@ -0,0 +1,71 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'positions' +// Member 'velocities' +// Member 'accelerations' +// Member 'effort' +#include "rosidl_runtime_c/primitives_sequence.h" +// Member 'time_from_start' +#include "builtin_interfaces/msg/detail/duration__struct.h" + +/// Struct defined in msg/JointTrajectoryPoint in the package trajectory_msgs. +/** + * Each trajectory point specifies either positions[, velocities[, accelerations]] + * or positions[, effort] for the trajectory to be executed. + * All specified values are in the same order as the joint names in JointTrajectory.msg. + */ +typedef struct trajectory_msgs__msg__JointTrajectoryPoint +{ + /// Single DOF joint positions for each joint relative to their "0" position. + /// The units depend on the specific joint type: radians for revolute or + /// continuous joints, and meters for prismatic joints. + rosidl_runtime_c__double__Sequence positions; + /// The rate of change in position of each joint. Units are joint type dependent. + /// Radians/second for revolute or continuous joints, and meters/second for + /// prismatic joints. + rosidl_runtime_c__double__Sequence velocities; + /// Rate of change in velocity of each joint. Units are joint type dependent. + /// Radians/second^2 for revolute or continuous joints, and meters/second^2 for + /// prismatic joints. + rosidl_runtime_c__double__Sequence accelerations; + /// The torque or the force to be applied at each joint. For revolute/continuous + /// joints effort denotes a torque in newton-meters. For prismatic joints, effort + /// denotes a force in newtons. + rosidl_runtime_c__double__Sequence effort; + /// Desired time from the trajectory start to arrive at this trajectory point. + builtin_interfaces__msg__Duration time_from_start; +} trajectory_msgs__msg__JointTrajectoryPoint; + +// Struct for a sequence of trajectory_msgs__msg__JointTrajectoryPoint. +typedef struct trajectory_msgs__msg__JointTrajectoryPoint__Sequence +{ + trajectory_msgs__msg__JointTrajectoryPoint * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} trajectory_msgs__msg__JointTrajectoryPoint__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp similarity index 83% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp index 10a2d3df3..7cfe1e306 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp @@ -5,14 +5,15 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'time_from_start' @@ -50,16 +51,16 @@ struct JointTrajectoryPoint_ // field types and members using _positions_type = - std::vector::other>; + std::vector::template rebind_alloc>; _positions_type positions; using _velocities_type = - std::vector::other>; + std::vector::template rebind_alloc>; _velocities_type velocities; using _accelerations_type = - std::vector::other>; + std::vector::template rebind_alloc>; _accelerations_type accelerations; using _effort_type = - std::vector::other>; + std::vector::template rebind_alloc>; _effort_type effort; using _time_from_start_type = builtin_interfaces::msg::Duration_; @@ -67,25 +68,25 @@ struct JointTrajectoryPoint_ // setters for named parameter idiom Type & set__positions( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->positions = _arg; return *this; } Type & set__velocities( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->velocities = _arg; return *this; } Type & set__accelerations( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->accelerations = _arg; return *this; } Type & set__effort( - const std::vector::other> & _arg) + const std::vector::template rebind_alloc> & _arg) { this->effort = _arg; return *this; diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp new file mode 100644 index 000000000..8f5bbdd31 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp @@ -0,0 +1,264 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'time_from_start' +#include "builtin_interfaces/msg/detail/duration__traits.hpp" + +namespace trajectory_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const JointTrajectoryPoint & msg, + std::ostream & out) +{ + out << "{"; + // member: positions + { + if (msg.positions.size() == 0) { + out << "positions: []"; + } else { + out << "positions: ["; + size_t pending_items = msg.positions.size(); + for (auto item : msg.positions) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: velocities + { + if (msg.velocities.size() == 0) { + out << "velocities: []"; + } else { + out << "velocities: ["; + size_t pending_items = msg.velocities.size(); + for (auto item : msg.velocities) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: accelerations + { + if (msg.accelerations.size() == 0) { + out << "accelerations: []"; + } else { + out << "accelerations: ["; + size_t pending_items = msg.accelerations.size(); + for (auto item : msg.accelerations) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: effort + { + if (msg.effort.size() == 0) { + out << "effort: []"; + } else { + out << "effort: ["; + size_t pending_items = msg.effort.size(); + for (auto item : msg.effort) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: time_from_start + { + out << "time_from_start: "; + to_flow_style_yaml(msg.time_from_start, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const JointTrajectoryPoint & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: positions + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.positions.size() == 0) { + out << "positions: []\n"; + } else { + out << "positions:\n"; + for (auto item : msg.positions) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: velocities + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.velocities.size() == 0) { + out << "velocities: []\n"; + } else { + out << "velocities:\n"; + for (auto item : msg.velocities) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: accelerations + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.accelerations.size() == 0) { + out << "accelerations: []\n"; + } else { + out << "accelerations:\n"; + for (auto item : msg.accelerations) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: effort + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.effort.size() == 0) { + out << "effort: []\n"; + } else { + out << "effort:\n"; + for (auto item : msg.effort) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: time_from_start + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time_from_start:\n"; + to_block_style_yaml(msg.time_from_start, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const JointTrajectoryPoint & 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 trajectory_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use trajectory_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const trajectory_msgs::msg::JointTrajectoryPoint & msg, + std::ostream & out, size_t indentation = 0) +{ + trajectory_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use trajectory_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const trajectory_msgs::msg::JointTrajectoryPoint & msg) +{ + return trajectory_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "trajectory_msgs::msg::JointTrajectoryPoint"; +} + +template<> +inline const char * name() +{ + return "trajectory_msgs/msg/JointTrajectoryPoint"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c new file mode 100644 index 000000000..586850556 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.c @@ -0,0 +1,384 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#include +#include "trajectory_msgs/msg/detail/joint_trajectory_point__rosidl_typesupport_introspection_c.h" +#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/joint_trajectory_point__functions.h" +#include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.h" + + +// Include directives for member types +// Member `positions` +// Member `velocities` +// Member `accelerations` +// Member `effort` +#include "rosidl_runtime_c/primitives_sequence_functions.h" +// Member `time_from_start` +#include "builtin_interfaces/msg/duration.h" +// Member `time_from_start` +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_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; + trajectory_msgs__msg__JointTrajectoryPoint__init(message_memory); +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_fini_function(void * message_memory) +{ + trajectory_msgs__msg__JointTrajectoryPoint__fini(message_memory); +} + +size_t trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__positions( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__positions( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__positions( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__positions( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__positions(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__positions( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__positions(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__positions( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__velocities( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__velocities( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__velocities( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__velocities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__velocities(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__velocities( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__velocities(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__velocities( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__accelerations( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__accelerations( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__accelerations(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__accelerations( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__accelerations(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__accelerations( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__effort( + const void * untyped_member) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__effort( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__double__Sequence * member = + (const rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__effort( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__effort( + const void * untyped_member, size_t index, void * untyped_value) +{ + const double * item = + ((const double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__effort(untyped_member, index)); + double * value = + (double *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__effort( + void * untyped_member, size_t index, const void * untyped_value) +{ + double * item = + ((double *) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__effort(untyped_member, index)); + const double * value = + (const double *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__effort( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__double__Sequence * member = + (rosidl_runtime_c__double__Sequence *)(untyped_member); + rosidl_runtime_c__double__Sequence__fini(member); + return rosidl_runtime_c__double__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array[5] = { + { + "positions", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectoryPoint, positions), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__positions, // size() function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__positions, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__positions, // get(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__positions, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__positions, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__positions // resize(index) function pointer + }, + { + "velocities", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectoryPoint, velocities), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__velocities, // size() function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__velocities, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__velocities, // get(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__velocities, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__velocities, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__velocities // resize(index) function pointer + }, + { + "accelerations", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectoryPoint, accelerations), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__accelerations, // size() function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__accelerations, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__accelerations, // get(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__accelerations, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__accelerations, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__accelerations // resize(index) function pointer + }, + { + "effort", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__JointTrajectoryPoint, effort), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__JointTrajectoryPoint__effort, // size() function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__JointTrajectoryPoint__effort, // get_const(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__JointTrajectoryPoint__effort, // get(index) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__JointTrajectoryPoint__effort, // fetch(index, &value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__JointTrajectoryPoint__effort, // assign(index, value) function pointer + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__JointTrajectoryPoint__effort // resize(index) function pointer + }, + { + "time_from_start", // 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(trajectory_msgs__msg__JointTrajectoryPoint, time_from_start), // 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 trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_members = { + "trajectory_msgs__msg", // message namespace + "JointTrajectoryPoint", // message name + 5, // number of fields + sizeof(trajectory_msgs__msg__JointTrajectoryPoint), + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array, // message members + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_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 trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle = { + 0, + &trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, JointTrajectoryPoint)() { + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); + if (!trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle.typesupport_identifier) { + trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &trajectory_msgs__msg__JointTrajectoryPoint__rosidl_typesupport_introspection_c__JointTrajectoryPoint_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp new file mode 100644 index 000000000..793130515 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.cpp @@ -0,0 +1,357 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from trajectory_msgs:msg/JointTrajectoryPoint.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 "trajectory_msgs/msg/detail/joint_trajectory_point__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 trajectory_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void JointTrajectoryPoint_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) trajectory_msgs::msg::JointTrajectoryPoint(_init); +} + +void JointTrajectoryPoint_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~JointTrajectoryPoint(); +} + +size_t size_function__JointTrajectoryPoint__positions(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointTrajectoryPoint__positions(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointTrajectoryPoint__positions(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointTrajectoryPoint__positions( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectoryPoint__positions(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectoryPoint__positions( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectoryPoint__positions(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointTrajectoryPoint__positions(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointTrajectoryPoint__velocities(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointTrajectoryPoint__velocities(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointTrajectoryPoint__velocities(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointTrajectoryPoint__velocities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectoryPoint__velocities(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectoryPoint__velocities( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectoryPoint__velocities(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointTrajectoryPoint__velocities(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointTrajectoryPoint__accelerations(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointTrajectoryPoint__accelerations(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointTrajectoryPoint__accelerations(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectoryPoint__accelerations(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectoryPoint__accelerations( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectoryPoint__accelerations(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointTrajectoryPoint__accelerations(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__JointTrajectoryPoint__effort(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__JointTrajectoryPoint__effort(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__JointTrajectoryPoint__effort(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__JointTrajectoryPoint__effort( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__JointTrajectoryPoint__effort(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__JointTrajectoryPoint__effort( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__JointTrajectoryPoint__effort(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__JointTrajectoryPoint__effort(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember JointTrajectoryPoint_message_member_array[5] = { + { + "positions", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs::msg::JointTrajectoryPoint, positions), // bytes offset in struct + nullptr, // default value + size_function__JointTrajectoryPoint__positions, // size() function pointer + get_const_function__JointTrajectoryPoint__positions, // get_const(index) function pointer + get_function__JointTrajectoryPoint__positions, // get(index) function pointer + fetch_function__JointTrajectoryPoint__positions, // fetch(index, &value) function pointer + assign_function__JointTrajectoryPoint__positions, // assign(index, value) function pointer + resize_function__JointTrajectoryPoint__positions // resize(index) function pointer + }, + { + "velocities", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs::msg::JointTrajectoryPoint, velocities), // bytes offset in struct + nullptr, // default value + size_function__JointTrajectoryPoint__velocities, // size() function pointer + get_const_function__JointTrajectoryPoint__velocities, // get_const(index) function pointer + get_function__JointTrajectoryPoint__velocities, // get(index) function pointer + fetch_function__JointTrajectoryPoint__velocities, // fetch(index, &value) function pointer + assign_function__JointTrajectoryPoint__velocities, // assign(index, value) function pointer + resize_function__JointTrajectoryPoint__velocities // resize(index) function pointer + }, + { + "accelerations", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs::msg::JointTrajectoryPoint, accelerations), // bytes offset in struct + nullptr, // default value + size_function__JointTrajectoryPoint__accelerations, // size() function pointer + get_const_function__JointTrajectoryPoint__accelerations, // get_const(index) function pointer + get_function__JointTrajectoryPoint__accelerations, // get(index) function pointer + fetch_function__JointTrajectoryPoint__accelerations, // fetch(index, &value) function pointer + assign_function__JointTrajectoryPoint__accelerations, // assign(index, value) function pointer + resize_function__JointTrajectoryPoint__accelerations // resize(index) function pointer + }, + { + "effort", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs::msg::JointTrajectoryPoint, effort), // bytes offset in struct + nullptr, // default value + size_function__JointTrajectoryPoint__effort, // size() function pointer + get_const_function__JointTrajectoryPoint__effort, // get_const(index) function pointer + get_function__JointTrajectoryPoint__effort, // get(index) function pointer + fetch_function__JointTrajectoryPoint__effort, // fetch(index, &value) function pointer + assign_function__JointTrajectoryPoint__effort, // assign(index, value) function pointer + resize_function__JointTrajectoryPoint__effort // resize(index) function pointer + }, + { + "time_from_start", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs::msg::JointTrajectoryPoint, time_from_start), // 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 JointTrajectoryPoint_message_members = { + "trajectory_msgs::msg", // message namespace + "JointTrajectoryPoint", // message name + 5, // number of fields + sizeof(trajectory_msgs::msg::JointTrajectoryPoint), + JointTrajectoryPoint_message_member_array, // message members + JointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) + JointTrajectoryPoint_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t JointTrajectoryPoint_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &JointTrajectoryPoint_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace trajectory_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::trajectory_msgs::msg::rosidl_typesupport_introspection_cpp::JointTrajectoryPoint_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, trajectory_msgs, msg, JointTrajectoryPoint)() { + return &::trajectory_msgs::msg::rosidl_typesupport_introspection_cpp::JointTrajectoryPoint_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.h diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.hpp new file mode 100644 index 000000000..15992a671 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/joint_trajectory_point__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from trajectory_msgs:msg/JointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "trajectory_msgs/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_trajectory_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + trajectory_msgs, + msg, + JointTrajectoryPoint +)(); +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp similarity index 97% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp index 7d55ccecc..c7a42eb34 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp @@ -5,11 +5,12 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__BUILDER_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__BUILDER_HPP_ -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp" -#include #include #include +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace trajectory_msgs { diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c similarity index 93% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c index e14a97617..b79cf9039 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.c @@ -258,22 +258,27 @@ trajectory_msgs__msg__MultiDOFJointTrajectory__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(trajectory_msgs__msg__MultiDOFJointTrajectory); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); trajectory_msgs__msg__MultiDOFJointTrajectory * data = - (trajectory_msgs__msg__MultiDOFJointTrajectory *)realloc(output->data, allocation_size); + (trajectory_msgs__msg__MultiDOFJointTrajectory *)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 (!trajectory_msgs__msg__MultiDOFJointTrajectory__init(&data[i])) { - /* free currently allocated and return false */ + if (!trajectory_msgs__msg__MultiDOFJointTrajectory__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; ) { - trajectory_msgs__msg__MultiDOFJointTrajectory__fini(&data[i]); + trajectory_msgs__msg__MultiDOFJointTrajectory__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h index 3e05b20ab..d2743b24b 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_trajectory_msgs__msg__MultiDOFJointTrajectory( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs size_t max_serialized_size_trajectory_msgs__msg__MultiDOFJointTrajectory( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp index b392061c6..866683738 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_trajectory_msgs max_serialized_size_MultiDOFJointTrajectory( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h new file mode 100644 index 000000000..8eb1bc6ec --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h @@ -0,0 +1,57 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ +#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'joint_names' +#include "rosidl_runtime_c/string.h" +// Member 'points' +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h" + +/// Struct defined in msg/MultiDOFJointTrajectory in the package trajectory_msgs. +/** + * The header is used to specify the coordinate frame and the reference time for the trajectory durations + */ +typedef struct trajectory_msgs__msg__MultiDOFJointTrajectory +{ + std_msgs__msg__Header header; + /// A representation of a multi-dof joint trajectory (each point is a transformation) + /// Each point along the trajectory will include an array of positions/velocities/accelerations + /// that has the same length as the array of joint names, and has the same order of joints as + /// the joint names array. + rosidl_runtime_c__String__Sequence joint_names; + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence points; +} trajectory_msgs__msg__MultiDOFJointTrajectory; + +// Struct for a sequence of trajectory_msgs__msg__MultiDOFJointTrajectory. +typedef struct trajectory_msgs__msg__MultiDOFJointTrajectory__Sequence +{ + trajectory_msgs__msg__MultiDOFJointTrajectory * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} trajectory_msgs__msg__MultiDOFJointTrajectory__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_H_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp similarity index 82% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp index c3c334946..bf97d4971 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp @@ -5,14 +5,15 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -55,10 +56,10 @@ struct MultiDOFJointTrajectory_ std_msgs::msg::Header_; _header_type header; using _joint_names_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _joint_names_type joint_names; using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _points_type points; // setters for named parameter idiom @@ -69,13 +70,13 @@ struct MultiDOFJointTrajectory_ return *this; } Type & set__joint_names( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->joint_names = _arg; return *this; } Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->points = _arg; return *this; diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp new file mode 100644 index 000000000..f5b37032f --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp @@ -0,0 +1,189 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'points' +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp" + +namespace trajectory_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiDOFJointTrajectory & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: joint_names + { + if (msg.joint_names.size() == 0) { + out << "joint_names: []"; + } else { + out << "joint_names: ["; + size_t pending_items = msg.joint_names.size(); + for (auto item : msg.joint_names) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiDOFJointTrajectory & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: joint_names + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.joint_names.size() == 0) { + out << "joint_names: []\n"; + } else { + out << "joint_names:\n"; + for (auto item : msg.joint_names) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiDOFJointTrajectory & 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 trajectory_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use trajectory_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const trajectory_msgs::msg::MultiDOFJointTrajectory & msg, + std::ostream & out, size_t indentation = 0) +{ + trajectory_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use trajectory_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const trajectory_msgs::msg::MultiDOFJointTrajectory & msg) +{ + return trajectory_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "trajectory_msgs::msg::MultiDOFJointTrajectory"; +} + +template<> +inline const char * name() +{ + return "trajectory_msgs/msg/MultiDOFJointTrajectory"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c new file mode 100644 index 000000000..96747dbce --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.c @@ -0,0 +1,243 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl +// generated code does not contain a copyright notice + +#include +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__rosidl_typesupport_introspection_c.h" +#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__functions.h" +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `joint_names` +#include "rosidl_runtime_c/string_functions.h" +// Member `points` +#include "trajectory_msgs/msg/multi_dof_joint_trajectory_point.h" +// Member `points` +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_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; + trajectory_msgs__msg__MultiDOFJointTrajectory__init(message_memory); +} + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_fini_function(void * message_memory) +{ + trajectory_msgs__msg__MultiDOFJointTrajectory__fini(message_memory); +} + +size_t trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectory__joint_names( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__joint_names( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__joint_names( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectory__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__joint_names(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectory__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__joint_names(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectory__joint_names( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectory__points( + const void * untyped_member) +{ + const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = + (const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__points( + const void * untyped_member, size_t index) +{ + const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = + (const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__points( + void * untyped_member, size_t index) +{ + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = + (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectory__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint * item = + ((const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *) + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__points(untyped_member, index)); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint * value = + (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectory__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint * item = + ((trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *) + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__points(untyped_member, index)); + const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint * value = + (const trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectory__points( + void * untyped_member, size_t size) +{ + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence * member = + (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence *)(untyped_member); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__fini(member); + return trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[3] = { + { + "header", // 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(trajectory_msgs__msg__MultiDOFJointTrajectory, header), // 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 + }, + { + "joint_names", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__MultiDOFJointTrajectory, joint_names), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectory__joint_names, // size() function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__joint_names, // get_const(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__joint_names, // get(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectory__joint_names, // fetch(index, &value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectory__joint_names, // assign(index, value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectory__joint_names // resize(index) function pointer + }, + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__MultiDOFJointTrajectory, points), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectory__points, // size() function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectory__points, // get_const(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectory__points, // get(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectory__points, // fetch(index, &value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectory__points, // assign(index, value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectory__points // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_members = { + "trajectory_msgs__msg", // message namespace + "MultiDOFJointTrajectory", // message name + 3, // number of fields + sizeof(trajectory_msgs__msg__MultiDOFJointTrajectory), + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array, // message members + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_init_function, // function to initialize message memory (memory has to be allocated) + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_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 trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle = { + 0, + &trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectory)() { + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectoryPoint)(); + if (!trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle.typesupport_identifier) { + trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &trajectory_msgs__msg__MultiDOFJointTrajectory__rosidl_typesupport_introspection_c__MultiDOFJointTrajectory_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp similarity index 78% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp index bc30189d0..f340af3bf 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MultiDOFJointTrajectory__joint_names(void * untyped_member, return &member[index]; } +void fetch_function__MultiDOFJointTrajectory__joint_names( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointTrajectory__joint_names(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointTrajectory__joint_names( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointTrajectory__joint_names(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiDOFJointTrajectory__joint_names(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__MultiDOFJointTrajectory__points(void * untyped_member, size return &member[index]; } +void fetch_function__MultiDOFJointTrajectory__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointTrajectory__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointTrajectory__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointTrajectory__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiDOFJointTrajectory__points(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint size_function__MultiDOFJointTrajectory__joint_names, // size() function pointer get_const_function__MultiDOFJointTrajectory__joint_names, // get_const(index) function pointer get_function__MultiDOFJointTrajectory__joint_names, // get(index) function pointer + fetch_function__MultiDOFJointTrajectory__joint_names, // fetch(index, &value) function pointer + assign_function__MultiDOFJointTrajectory__joint_names, // assign(index, value) function pointer resize_function__MultiDOFJointTrajectory__joint_names // resize(index) function pointer }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint size_function__MultiDOFJointTrajectory__points, // size() function pointer get_const_function__MultiDOFJointTrajectory__points, // get_const(index) function pointer get_function__MultiDOFJointTrajectory__points, // get(index) function pointer + fetch_function__MultiDOFJointTrajectory__points, // fetch(index, &value) function pointer + assign_function__MultiDOFJointTrajectory__points, // assign(index, value) function pointer resize_function__MultiDOFJointTrajectory__points // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.h diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.hpp new file mode 100644 index 000000000..5208d1fb3 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectory.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "trajectory_msgs/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_trajectory_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + trajectory_msgs, + msg, + MultiDOFJointTrajectory +)(); +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp index 8be563540..79ff0f464 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp @@ -5,11 +5,12 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__BUILDER_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__BUILDER_HPP_ -#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp" -#include #include #include +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace trajectory_msgs { diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c similarity index 94% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c index 446004ddb..a7c2c1f1e 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.c @@ -278,22 +278,27 @@ trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); trajectory_msgs__msg__MultiDOFJointTrajectoryPoint * data = - (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *)realloc(output->data, allocation_size); + (trajectory_msgs__msg__MultiDOFJointTrajectoryPoint *)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 (!trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__init(&data[i])) { - /* free currently allocated and return false */ + if (!trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__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; ) { - trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__fini(&data[i]); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h index 969cd36e3..f98d8bd73 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_trajectory_msgs__msg__MultiDOFJointTrajectoryPoint( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs size_t max_serialized_size_trajectory_msgs__msg__MultiDOFJointTrajectoryPoint( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_trajectory_msgs diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp index ca5f9ddc1..4d59cda17 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_trajectory_msgs max_serialized_size_MultiDOFJointTrajectoryPoint( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h similarity index 81% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h index cb0f4fb0c..304a89632 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h @@ -26,12 +26,18 @@ extern "C" // Member 'time_from_start' #include "builtin_interfaces/msg/detail/duration__struct.h" -// Struct defined in msg/MultiDOFJointTrajectoryPoint in the package trajectory_msgs. +/// Struct defined in msg/MultiDOFJointTrajectoryPoint in the package trajectory_msgs. +/** + * Each multi-dof joint can specify a transform (up to 6 DOF). + */ typedef struct trajectory_msgs__msg__MultiDOFJointTrajectoryPoint { geometry_msgs__msg__Transform__Sequence transforms; + /// There can be a velocity specified for the origin of the joint. geometry_msgs__msg__Twist__Sequence velocities; + /// There can be an acceleration specified for the origin of the joint. geometry_msgs__msg__Twist__Sequence accelerations; + /// Desired time from the trajectory start to arrive at this trajectory point. builtin_interfaces__msg__Duration time_from_start; } trajectory_msgs__msg__MultiDOFJointTrajectoryPoint; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp similarity index 86% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp index ff3049935..80fc57c40 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp @@ -5,14 +5,15 @@ #ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__STRUCT_HPP_ #define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'transforms' @@ -55,13 +56,13 @@ struct MultiDOFJointTrajectoryPoint_ // field types and members using _transforms_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _transforms_type transforms; using _velocities_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _velocities_type velocities; using _accelerations_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _accelerations_type accelerations; using _time_from_start_type = builtin_interfaces::msg::Duration_; @@ -69,19 +70,19 @@ struct MultiDOFJointTrajectoryPoint_ // setters for named parameter idiom Type & set__transforms( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->transforms = _arg; return *this; } Type & set__velocities( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->velocities = _arg; return *this; } Type & set__accelerations( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->accelerations = _arg; return *this; diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp new file mode 100644 index 000000000..45276a749 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp @@ -0,0 +1,228 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'transforms' +#include "geometry_msgs/msg/detail/transform__traits.hpp" +// Member 'velocities' +// Member 'accelerations' +#include "geometry_msgs/msg/detail/twist__traits.hpp" +// Member 'time_from_start' +#include "builtin_interfaces/msg/detail/duration__traits.hpp" + +namespace trajectory_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MultiDOFJointTrajectoryPoint & msg, + std::ostream & out) +{ + out << "{"; + // member: transforms + { + if (msg.transforms.size() == 0) { + out << "transforms: []"; + } else { + out << "transforms: ["; + size_t pending_items = msg.transforms.size(); + for (auto item : msg.transforms) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: velocities + { + if (msg.velocities.size() == 0) { + out << "velocities: []"; + } else { + out << "velocities: ["; + size_t pending_items = msg.velocities.size(); + for (auto item : msg.velocities) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: accelerations + { + if (msg.accelerations.size() == 0) { + out << "accelerations: []"; + } else { + out << "accelerations: ["; + size_t pending_items = msg.accelerations.size(); + for (auto item : msg.accelerations) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: time_from_start + { + out << "time_from_start: "; + to_flow_style_yaml(msg.time_from_start, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MultiDOFJointTrajectoryPoint & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: transforms + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.transforms.size() == 0) { + out << "transforms: []\n"; + } else { + out << "transforms:\n"; + for (auto item : msg.transforms) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: velocities + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.velocities.size() == 0) { + out << "velocities: []\n"; + } else { + out << "velocities:\n"; + for (auto item : msg.velocities) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: accelerations + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.accelerations.size() == 0) { + out << "accelerations: []\n"; + } else { + out << "accelerations:\n"; + for (auto item : msg.accelerations) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: time_from_start + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time_from_start:\n"; + to_block_style_yaml(msg.time_from_start, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MultiDOFJointTrajectoryPoint & 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 trajectory_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use trajectory_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const trajectory_msgs::msg::MultiDOFJointTrajectoryPoint & msg, + std::ostream & out, size_t indentation = 0) +{ + trajectory_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use trajectory_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const trajectory_msgs::msg::MultiDOFJointTrajectoryPoint & msg) +{ + return trajectory_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "trajectory_msgs::msg::MultiDOFJointTrajectoryPoint"; +} + +template<> +inline const char * name() +{ + return "trajectory_msgs/msg/MultiDOFJointTrajectoryPoint"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c new file mode 100644 index 000000000..f29524af9 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.c @@ -0,0 +1,323 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#include +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__rosidl_typesupport_introspection_c.h" +#include "trajectory_msgs/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 "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__functions.h" +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.h" + + +// Include directives for member types +// Member `transforms` +#include "geometry_msgs/msg/transform.h" +// Member `transforms` +#include "geometry_msgs/msg/detail/transform__rosidl_typesupport_introspection_c.h" +// Member `velocities` +// Member `accelerations` +#include "geometry_msgs/msg/twist.h" +// Member `velocities` +// Member `accelerations` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" +// Member `time_from_start` +#include "builtin_interfaces/msg/duration.h" +// Member `time_from_start` +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_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; + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__init(message_memory); +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_fini_function(void * message_memory) +{ + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__fini(message_memory); +} + +size_t trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__transforms( + const void * untyped_member) +{ + const geometry_msgs__msg__Transform__Sequence * member = + (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__transforms( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Transform__Sequence * member = + (const geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__transforms( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Transform__Sequence * member = + (geometry_msgs__msg__Transform__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Transform * item = + ((const geometry_msgs__msg__Transform *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__transforms(untyped_member, index)); + geometry_msgs__msg__Transform * value = + (geometry_msgs__msg__Transform *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Transform * item = + ((geometry_msgs__msg__Transform *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__transforms(untyped_member, index)); + const geometry_msgs__msg__Transform * value = + (const geometry_msgs__msg__Transform *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__transforms( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Transform__Sequence * member = + (geometry_msgs__msg__Transform__Sequence *)(untyped_member); + geometry_msgs__msg__Transform__Sequence__fini(member); + return geometry_msgs__msg__Transform__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__velocities( + const void * untyped_member) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__velocities( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__velocities( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__velocities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Twist * item = + ((const geometry_msgs__msg__Twist *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__velocities(untyped_member, index)); + geometry_msgs__msg__Twist * value = + (geometry_msgs__msg__Twist *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__velocities( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Twist * item = + ((geometry_msgs__msg__Twist *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__velocities(untyped_member, index)); + const geometry_msgs__msg__Twist * value = + (const geometry_msgs__msg__Twist *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__velocities( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + geometry_msgs__msg__Twist__Sequence__fini(member); + return geometry_msgs__msg__Twist__Sequence__init(member, size); +} + +size_t trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__accelerations( + const void * untyped_member) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return member->size; +} + +const void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Twist__Sequence * member = + (const geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__accelerations( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + return &member->data[index]; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Twist * item = + ((const geometry_msgs__msg__Twist *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__accelerations(untyped_member, index)); + geometry_msgs__msg__Twist * value = + (geometry_msgs__msg__Twist *)(untyped_value); + *value = *item; +} + +void trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__accelerations( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Twist * item = + ((geometry_msgs__msg__Twist *) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__accelerations(untyped_member, index)); + const geometry_msgs__msg__Twist * value = + (const geometry_msgs__msg__Twist *)(untyped_value); + *item = *value; +} + +bool trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__accelerations( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Twist__Sequence * member = + (geometry_msgs__msg__Twist__Sequence *)(untyped_member); + geometry_msgs__msg__Twist__Sequence__fini(member); + return geometry_msgs__msg__Twist__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[4] = { + { + "transforms", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, transforms), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__transforms, // size() function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__transforms, // get_const(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__transforms, // get(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__transforms, // fetch(index, &value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__transforms, // assign(index, value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__transforms // resize(index) function pointer + }, + { + "velocities", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, velocities), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__velocities, // size() function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__velocities, // get_const(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__velocities, // get(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__velocities, // fetch(index, &value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__velocities, // assign(index, value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__velocities // resize(index) function pointer + }, + { + "accelerations", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, accelerations), // bytes offset in struct + NULL, // default value + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__size_function__MultiDOFJointTrajectoryPoint__accelerations, // size() function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_const_function__MultiDOFJointTrajectoryPoint__accelerations, // get_const(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__get_function__MultiDOFJointTrajectoryPoint__accelerations, // get(index) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__fetch_function__MultiDOFJointTrajectoryPoint__accelerations, // fetch(index, &value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__assign_function__MultiDOFJointTrajectoryPoint__accelerations, // assign(index, value) function pointer + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__resize_function__MultiDOFJointTrajectoryPoint__accelerations // resize(index) function pointer + }, + { + "time_from_start", // 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(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint, time_from_start), // 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 trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_members = { + "trajectory_msgs__msg", // message namespace + "MultiDOFJointTrajectoryPoint", // message name + 4, // number of fields + sizeof(trajectory_msgs__msg__MultiDOFJointTrajectoryPoint), + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array, // message members + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_init_function, // function to initialize message memory (memory has to be allocated) + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_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 trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle = { + 0, + &trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_trajectory_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, trajectory_msgs, msg, MultiDOFJointTrajectoryPoint)() { + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Transform)(); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); + if (!trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle.typesupport_identifier) { + trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &trajectory_msgs__msg__MultiDOFJointTrajectoryPoint__rosidl_typesupport_introspection_c__MultiDOFJointTrajectoryPoint_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp similarity index 75% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp index 514a251d8..20e86cab1 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MultiDOFJointTrajectoryPoint__transforms(void * untyped_mem return &member[index]; } +void fetch_function__MultiDOFJointTrajectoryPoint__transforms( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointTrajectoryPoint__transforms(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointTrajectoryPoint__transforms( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointTrajectoryPoint__transforms(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiDOFJointTrajectoryPoint__transforms(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__MultiDOFJointTrajectoryPoint__velocities(void * untyped_mem return &member[index]; } +void fetch_function__MultiDOFJointTrajectoryPoint__velocities( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointTrajectoryPoint__velocities(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointTrajectoryPoint__velocities( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointTrajectoryPoint__velocities(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiDOFJointTrajectoryPoint__velocities(void * untyped_member, size_t size) { auto * member = @@ -111,6 +147,24 @@ void * get_function__MultiDOFJointTrajectoryPoint__accelerations(void * untyped_ return &member[index]; } +void fetch_function__MultiDOFJointTrajectoryPoint__accelerations( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MultiDOFJointTrajectoryPoint__accelerations(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MultiDOFJointTrajectoryPoint__accelerations( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MultiDOFJointTrajectoryPoint__accelerations(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MultiDOFJointTrajectoryPoint__accelerations(void * untyped_member, size_t size) { auto * member = @@ -132,6 +186,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint size_function__MultiDOFJointTrajectoryPoint__transforms, // size() function pointer get_const_function__MultiDOFJointTrajectoryPoint__transforms, // get_const(index) function pointer get_function__MultiDOFJointTrajectoryPoint__transforms, // get(index) function pointer + fetch_function__MultiDOFJointTrajectoryPoint__transforms, // fetch(index, &value) function pointer + assign_function__MultiDOFJointTrajectoryPoint__transforms, // assign(index, value) function pointer resize_function__MultiDOFJointTrajectoryPoint__transforms // resize(index) function pointer }, { @@ -147,6 +203,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint size_function__MultiDOFJointTrajectoryPoint__velocities, // size() function pointer get_const_function__MultiDOFJointTrajectoryPoint__velocities, // get_const(index) function pointer get_function__MultiDOFJointTrajectoryPoint__velocities, // get(index) function pointer + fetch_function__MultiDOFJointTrajectoryPoint__velocities, // fetch(index, &value) function pointer + assign_function__MultiDOFJointTrajectoryPoint__velocities, // assign(index, value) function pointer resize_function__MultiDOFJointTrajectoryPoint__velocities // resize(index) function pointer }, { @@ -162,6 +220,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint size_function__MultiDOFJointTrajectoryPoint__accelerations, // size() function pointer get_const_function__MultiDOFJointTrajectoryPoint__accelerations, // get_const(index) function pointer get_function__MultiDOFJointTrajectoryPoint__accelerations, // get(index) function pointer + fetch_function__MultiDOFJointTrajectoryPoint__accelerations, // fetch(index, &value) function pointer + assign_function__MultiDOFJointTrajectoryPoint__accelerations, // assign(index, value) function pointer resize_function__MultiDOFJointTrajectoryPoint__accelerations // resize(index) function pointer }, { @@ -177,6 +237,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MultiDOFJoint 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 } }; diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.h diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.hpp new file mode 100644 index 000000000..f9be210cf --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from trajectory_msgs:msg/MultiDOFJointTrajectoryPoint.idl +// generated code does not contain a copyright notice + +#ifndef TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ +#define TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "trajectory_msgs/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_trajectory_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + trajectory_msgs, + msg, + MultiDOFJointTrajectoryPoint +)(); +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__DETAIL__MULTI_DOF_JOINT_TRAJECTORY_POINT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory.hpp similarity index 86% rename from ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory.hpp index 7a77e37bc..a49da85cd 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory.hpp @@ -7,5 +7,6 @@ #include "trajectory_msgs/msg/detail/joint_trajectory__struct.hpp" #include "trajectory_msgs/msg/detail/joint_trajectory__builder.hpp" #include "trajectory_msgs/msg/detail/joint_trajectory__traits.hpp" +#include "trajectory_msgs/msg/detail/joint_trajectory__type_support.hpp" #endif // TRAJECTORY_MSGS__MSG__JOINT_TRAJECTORY_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory_point.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory_point.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory_point.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory_point.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory_point.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory_point.hpp similarity index 86% rename from ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory_point.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory_point.hpp index 514101b33..7db5988d9 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/joint_trajectory_point.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/joint_trajectory_point.hpp @@ -7,5 +7,6 @@ #include "trajectory_msgs/msg/detail/joint_trajectory_point__struct.hpp" #include "trajectory_msgs/msg/detail/joint_trajectory_point__builder.hpp" #include "trajectory_msgs/msg/detail/joint_trajectory_point__traits.hpp" +#include "trajectory_msgs/msg/detail/joint_trajectory_point__type_support.hpp" #endif // TRAJECTORY_MSGS__MSG__JOINT_TRAJECTORY_POINT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp similarity index 86% rename from ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp index c2050ad49..30def4741 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory.hpp @@ -7,5 +7,6 @@ #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__struct.hpp" #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__builder.hpp" #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__traits.hpp" +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory__type_support.hpp" #endif // TRAJECTORY_MSGS__MSG__MULTI_DOF_JOINT_TRAJECTORY_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory_point.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory_point.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory_point.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory_point.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp similarity index 86% rename from ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp index 659234b8c..93a67ebcc 100644 --- a/ThirdParty/ros/include/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/multi_dof_joint_trajectory_point.hpp @@ -7,5 +7,6 @@ #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__struct.hpp" #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__builder.hpp" #include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__traits.hpp" +#include "trajectory_msgs/msg/detail/multi_dof_joint_trajectory_point__type_support.hpp" #endif // TRAJECTORY_MSGS__MSG__MULTI_DOF_JOINT_TRAJECTORY_POINT_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..159ae5200 --- /dev/null +++ b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 TRAJECTORY_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define TRAJECTORY_MSGS__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_trajectory_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_trajectory_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_trajectory_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_trajectory_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_trajectory_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_trajectory_msgs ROSIDL_GENERATOR_CPP_EXPORT_trajectory_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_trajectory_msgs ROSIDL_GENERATOR_CPP_IMPORT_trajectory_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_trajectory_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_trajectory_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_trajectory_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_trajectory_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TRAJECTORY_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/trajectory_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/trajectory_msgs/trajectory_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.h b/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.h deleted file mode 100644 index eaa92698a..000000000 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.h +++ /dev/null @@ -1,52 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from ue_msgs:msg/EntityState.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ -#define UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'name' -// Member 'reference_frame' -#include "rosidl_runtime_c/string.h" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__struct.h" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist__struct.h" - -// Struct defined in msg/EntityState in the package ue_msgs. -typedef struct ue_msgs__msg__EntityState -{ - rosidl_runtime_c__String name; - geometry_msgs__msg__Pose pose; - geometry_msgs__msg__Twist twist; - rosidl_runtime_c__String reference_frame; -} ue_msgs__msg__EntityState; - -// Struct for a sequence of ue_msgs__msg__EntityState. -typedef struct ue_msgs__msg__EntityState__Sequence -{ - ue_msgs__msg__EntityState * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} ue_msgs__msg__EntityState__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__traits.hpp deleted file mode 100644 index 8ef98ac25..000000000 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:msg/EntityState.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ -#define UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ - -#include "ue_msgs/msg/detail/entity_state__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" -// Member 'twist' -#include "geometry_msgs/msg/detail/twist__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::msg::EntityState"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/msg/EntityState"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.c deleted file mode 100644 index e7bfebb65..000000000 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.c +++ /dev/null @@ -1,143 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:msg/EntityState.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/msg/detail/entity_state__functions.h" -#include "ue_msgs/msg/detail/entity_state__struct.h" - - -// Include directives for member types -// Member `name` -// Member `reference_frame` -#include "rosidl_runtime_c/string_functions.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -// Member `twist` -#include "geometry_msgs/msg/twist.h" -// Member `twist` -#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void EntityState__rosidl_typesupport_introspection_c__EntityState_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; - ue_msgs__msg__EntityState__init(message_memory); -} - -void EntityState__rosidl_typesupport_introspection_c__EntityState_fini_function(void * message_memory) -{ - ue_msgs__msg__EntityState__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[4] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__msg__EntityState, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(ue_msgs__msg__EntityState, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "twist", // 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(ue_msgs__msg__EntityState, twist), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "reference_frame", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__msg__EntityState, reference_frame), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers EntityState__rosidl_typesupport_introspection_c__EntityState_message_members = { - "ue_msgs__msg", // message namespace - "EntityState", // message name - 4, // number of fields - sizeof(ue_msgs__msg__EntityState), - EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array, // message members - EntityState__rosidl_typesupport_introspection_c__EntityState_init_function, // function to initialize message memory (memory has to be allocated) - EntityState__rosidl_typesupport_introspection_c__EntityState_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 EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle = { - 0, - &EntityState__rosidl_typesupport_introspection_c__EntityState_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)() { - EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); - if (!EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle.typesupport_identifier) { - EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/attach__traits.hpp deleted file mode 100644 index 151ad6aa3..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/Attach.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/attach__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::Attach_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/Attach_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::Attach_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/Attach_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::Attach"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/Attach"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.c deleted file mode 100644 index 71e01f3bc..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.c +++ /dev/null @@ -1,244 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/Attach.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/attach__functions.h" -#include "ue_msgs/srv/detail/attach__struct.h" - - -// Include directives for member types -// Member `name1` -// Member `name2` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Attach_Request__rosidl_typesupport_introspection_c__Attach_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; - ue_msgs__srv__Attach_Request__init(message_memory); -} - -void Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__Attach_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_member_array[2] = { - { - "name1", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__Attach_Request, name1), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name2", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__Attach_Request, name2), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_members = { - "ue_msgs__srv", // message namespace - "Attach_Request", // message name - 2, // number of fields - sizeof(ue_msgs__srv__Attach_Request), - Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_member_array, // message members - Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_init_function, // function to initialize message memory (memory has to be allocated) - Attach_Request__rosidl_typesupport_introspection_c__Attach_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 Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle = { - 0, - &Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Request)() { - if (!Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle.typesupport_identifier) { - Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/attach__functions.h" -// already included above -// #include "ue_msgs/srv/detail/attach__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Attach_Response__rosidl_typesupport_introspection_c__Attach_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; - ue_msgs__srv__Attach_Response__init(message_memory); -} - -void Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__Attach_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_member_array[1] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__Attach_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_members = { - "ue_msgs__srv", // message namespace - "Attach_Response", // message name - 1, // number of fields - sizeof(ue_msgs__srv__Attach_Response), - Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_member_array, // message members - Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_init_function, // function to initialize message memory (memory has to be allocated) - Attach_Response__rosidl_typesupport_introspection_c__Attach_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 Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle = { - 0, - &Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Response)() { - if (!Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle.typesupport_identifier) { - Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/attach__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 ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_members = { - "ue_msgs__srv", // service namespace - "Attach", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_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, ue_msgs, srv, Attach_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach)() { - if (!ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_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, ue_msgs, srv, Attach_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, ue_msgs, srv, Attach_Response)()->data; - } - - return &ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__traits.hpp deleted file mode 100644 index 9ef596975..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/DeleteEntity.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/delete_entity__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::DeleteEntity_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/DeleteEntity_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::DeleteEntity_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/DeleteEntity_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::DeleteEntity"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/DeleteEntity"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.c deleted file mode 100644 index c3fd3ffc3..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.c +++ /dev/null @@ -1,248 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/DeleteEntity.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/delete_entity__functions.h" -#include "ue_msgs/srv/detail/delete_entity__struct.h" - - -// Include directives for member types -// Member `name` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_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; - ue_msgs__srv__DeleteEntity_Request__init(message_memory); -} - -void DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__DeleteEntity_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_member_array[1] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__DeleteEntity_Request, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_members = { - "ue_msgs__srv", // message namespace - "DeleteEntity_Request", // message name - 1, // number of fields - sizeof(ue_msgs__srv__DeleteEntity_Request), - DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_member_array, // message members - DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_init_function, // function to initialize message memory (memory has to be allocated) - DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_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 DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle = { - 0, - &DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Request)() { - if (!DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle.typesupport_identifier) { - DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/delete_entity__functions.h" -// already included above -// #include "ue_msgs/srv/detail/delete_entity__struct.h" - - -// Include directives for member types -// Member `status_message` -// already included above -// #include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_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; - ue_msgs__srv__DeleteEntity_Response__init(message_memory); -} - -void DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__DeleteEntity_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__DeleteEntity_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__DeleteEntity_Response, status_message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_members = { - "ue_msgs__srv", // message namespace - "DeleteEntity_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__DeleteEntity_Response), - DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_member_array, // message members - DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_init_function, // function to initialize message memory (memory has to be allocated) - DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_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 DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle = { - 0, - &DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Response)() { - if (!DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle.typesupport_identifier) { - DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/delete_entity__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 ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_members = { - "ue_msgs__srv", // service namespace - "DeleteEntity", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_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, ue_msgs, srv, DeleteEntity_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity)() { - if (!ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_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, ue_msgs, srv, DeleteEntity_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, ue_msgs, srv, DeleteEntity_Response)()->data; - } - - return &ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__traits.hpp deleted file mode 100644 index cb26de5cf..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/GetBoolFromId.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/get_bool_from_id__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetBoolFromId_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetBoolFromId_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetBoolFromId_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetBoolFromId_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetBoolFromId"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetBoolFromId"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.c deleted file mode 100644 index 548c7e9b1..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.c +++ /dev/null @@ -1,258 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/GetBoolFromId.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/get_bool_from_id__functions.h" -#include "ue_msgs/srv/detail/get_bool_from_id__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_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; - ue_msgs__srv__GetBoolFromId_Request__init(message_memory); -} - -void GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__GetBoolFromId_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_member_array[1] = { - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetBoolFromId_Request, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_members = { - "ue_msgs__srv", // message namespace - "GetBoolFromId_Request", // message name - 1, // number of fields - sizeof(ue_msgs__srv__GetBoolFromId_Request), - GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_member_array, // message members - GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_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 GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle = { - 0, - &GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Request)() { - if (!GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle.typesupport_identifier) { - GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/get_bool_from_id__functions.h" -// already included above -// #include "ue_msgs/srv/detail/get_bool_from_id__struct.h" - - -// Include directives for member types -// Member `remarks` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_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; - ue_msgs__srv__GetBoolFromId_Response__init(message_memory); -} - -void GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__GetBoolFromId_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_member_array[3] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetBoolFromId_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "remarks", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetBoolFromId_Response, remarks), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetBoolFromId_Response, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_members = { - "ue_msgs__srv", // message namespace - "GetBoolFromId_Response", // message name - 3, // number of fields - sizeof(ue_msgs__srv__GetBoolFromId_Response), - GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_member_array, // message members - GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_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 GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle = { - 0, - &GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Response)() { - if (!GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle.typesupport_identifier) { - GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/get_bool_from_id__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 ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_members = { - "ue_msgs__srv", // service namespace - "GetBoolFromId", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId)() { - if (!ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_Response)()->data; - } - - return &ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__traits.hpp deleted file mode 100644 index 7412ac002..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/GetEntityState.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/get_entity_state__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetEntityState_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetEntityState_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -// Include directives for member types -// Member 'state' -#include "ue_msgs/msg/detail/entity_state__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetEntityState_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetEntityState_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetEntityState"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetEntityState"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.c deleted file mode 100644 index dbf79c02c..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.c +++ /dev/null @@ -1,267 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/GetEntityState.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/get_entity_state__functions.h" -#include "ue_msgs/srv/detail/get_entity_state__struct.h" - - -// Include directives for member types -// Member `name` -// Member `reference_frame` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_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; - ue_msgs__srv__GetEntityState_Request__init(message_memory); -} - -void GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__GetEntityState_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_member_array[2] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetEntityState_Request, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "reference_frame", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetEntityState_Request, reference_frame), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_members = { - "ue_msgs__srv", // message namespace - "GetEntityState_Request", // message name - 2, // number of fields - sizeof(ue_msgs__srv__GetEntityState_Request), - GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_member_array, // message members - GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_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 GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle = { - 0, - &GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Request)() { - if (!GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle.typesupport_identifier) { - GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/get_entity_state__functions.h" -// already included above -// #include "ue_msgs/srv/detail/get_entity_state__struct.h" - - -// Include directives for member types -// Member `state` -#include "ue_msgs/msg/entity_state.h" -// Member `state` -#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_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; - ue_msgs__srv__GetEntityState_Response__init(message_memory); -} - -void GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__GetEntityState_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array[2] = { - { - "state", // 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(ue_msgs__srv__GetEntityState_Response, state), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetEntityState_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_members = { - "ue_msgs__srv", // message namespace - "GetEntityState_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__GetEntityState_Response), - GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array, // message members - GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_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 GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle = { - 0, - &GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Response)() { - GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); - if (!GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle.typesupport_identifier) { - GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/get_entity_state__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 ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_members = { - "ue_msgs__srv", // service namespace - "GetEntityState", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_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, ue_msgs, srv, GetEntityState_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState)() { - if (!ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_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, ue_msgs, srv, GetEntityState_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, ue_msgs, srv, GetEntityState_Response)()->data; - } - - return &ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__traits.hpp deleted file mode 100644 index b906e1903..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/GetInt32FromId.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/get_int32_from_id__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetInt32FromId_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetInt32FromId_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetInt32FromId_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetInt32FromId_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::GetInt32FromId"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/GetInt32FromId"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.c deleted file mode 100644 index c4ab1ff02..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.c +++ /dev/null @@ -1,258 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/GetInt32FromId.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/get_int32_from_id__functions.h" -#include "ue_msgs/srv/detail/get_int32_from_id__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_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; - ue_msgs__srv__GetInt32FromId_Request__init(message_memory); -} - -void GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__GetInt32FromId_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_member_array[1] = { - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetInt32FromId_Request, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_members = { - "ue_msgs__srv", // message namespace - "GetInt32FromId_Request", // message name - 1, // number of fields - sizeof(ue_msgs__srv__GetInt32FromId_Request), - GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_member_array, // message members - GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_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 GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle = { - 0, - &GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Request)() { - if (!GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle.typesupport_identifier) { - GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/get_int32_from_id__functions.h" -// already included above -// #include "ue_msgs/srv/detail/get_int32_from_id__struct.h" - - -// Include directives for member types -// Member `remarks` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_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; - ue_msgs__srv__GetInt32FromId_Response__init(message_memory); -} - -void GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__GetInt32FromId_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_member_array[3] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetInt32FromId_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "remarks", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetInt32FromId_Response, remarks), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__GetInt32FromId_Response, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_members = { - "ue_msgs__srv", // message namespace - "GetInt32FromId_Response", // message name - 3, // number of fields - sizeof(ue_msgs__srv__GetInt32FromId_Response), - GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_member_array, // message members - GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_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 GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle = { - 0, - &GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Response)() { - if (!GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle.typesupport_identifier) { - GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/get_int32_from_id__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 ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_members = { - "ue_msgs__srv", // service namespace - "GetInt32FromId", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId)() { - if (!ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_Response)()->data; - } - - return &ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__traits.hpp deleted file mode 100644 index 47034ef5e..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/SetEntityState.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/set_entity_state__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'state' -#include "ue_msgs/msg/detail/entity_state__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetEntityState_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetEntityState_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant::value> {}; - -template<> -struct has_bounded_size - : std::integral_constant::value> {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetEntityState_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetEntityState_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetEntityState"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetEntityState"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.c deleted file mode 100644 index 3ad4457e9..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.c +++ /dev/null @@ -1,232 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/SetEntityState.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/set_entity_state__functions.h" -#include "ue_msgs/srv/detail/set_entity_state__struct.h" - - -// Include directives for member types -// Member `state` -#include "ue_msgs/msg/entity_state.h" -// Member `state` -#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_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; - ue_msgs__srv__SetEntityState_Request__init(message_memory); -} - -void SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__SetEntityState_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array[1] = { - { - "state", // 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(ue_msgs__srv__SetEntityState_Request, state), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_members = { - "ue_msgs__srv", // message namespace - "SetEntityState_Request", // message name - 1, // number of fields - sizeof(ue_msgs__srv__SetEntityState_Request), - SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array, // message members - SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_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 SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle = { - 0, - &SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Request)() { - SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); - if (!SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle.typesupport_identifier) { - SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/set_entity_state__functions.h" -// already included above -// #include "ue_msgs/srv/detail/set_entity_state__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_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; - ue_msgs__srv__SetEntityState_Response__init(message_memory); -} - -void SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__SetEntityState_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_member_array[1] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SetEntityState_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_members = { - "ue_msgs__srv", // message namespace - "SetEntityState_Response", // message name - 1, // number of fields - sizeof(ue_msgs__srv__SetEntityState_Response), - SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_member_array, // message members - SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_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 SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle = { - 0, - &SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Response)() { - if (!SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle.typesupport_identifier) { - SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/set_entity_state__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 ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_members = { - "ue_msgs__srv", // service namespace - "SetEntityState", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_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, ue_msgs, srv, SetEntityState_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState)() { - if (!ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_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, ue_msgs, srv, SetEntityState_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, ue_msgs, srv, SetEntityState_Response)()->data; - } - - return &ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__traits.hpp deleted file mode 100644 index c838ceb71..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/SetInt32.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/set_int32__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetInt32_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetInt32_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetInt32_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetInt32_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SetInt32"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SetInt32"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.c deleted file mode 100644 index 0c78d2378..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.c +++ /dev/null @@ -1,243 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/SetInt32.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/set_int32__functions.h" -#include "ue_msgs/srv/detail/set_int32__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_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; - ue_msgs__srv__SetInt32_Request__init(message_memory); -} - -void SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__SetInt32_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_member_array[1] = { - { - "data", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SetInt32_Request, data), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_members = { - "ue_msgs__srv", // message namespace - "SetInt32_Request", // message name - 1, // number of fields - sizeof(ue_msgs__srv__SetInt32_Request), - SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_member_array, // message members - SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_init_function, // function to initialize message memory (memory has to be allocated) - SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_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 SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle = { - 0, - &SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Request)() { - if (!SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle.typesupport_identifier) { - SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/set_int32__functions.h" -// already included above -// #include "ue_msgs/srv/detail/set_int32__struct.h" - - -// Include directives for member types -// Member `remarks` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_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; - ue_msgs__srv__SetInt32_Response__init(message_memory); -} - -void SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__SetInt32_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SetInt32_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "remarks", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SetInt32_Response, remarks), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_members = { - "ue_msgs__srv", // message namespace - "SetInt32_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__SetInt32_Response), - SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_member_array, // message members - SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_init_function, // function to initialize message memory (memory has to be allocated) - SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_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 SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle = { - 0, - &SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Response)() { - if (!SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle.typesupport_identifier) { - SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/set_int32__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 ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_members = { - "ue_msgs__srv", // service namespace - "SetInt32", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_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, ue_msgs, srv, SetInt32_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32)() { - if (!ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_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, ue_msgs, srv, SetInt32_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, ue_msgs, srv, SetInt32_Response)()->data; - } - - return &ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__traits.hpp deleted file mode 100644 index 94cae8fb8..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/SpawnEntities.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/spawn_entities__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntities_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntities_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntities_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntities_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntities"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntities"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.c deleted file mode 100644 index b9a46148b..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.c +++ /dev/null @@ -1,334 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/SpawnEntities.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entities__functions.h" -#include "ue_msgs/srv/detail/spawn_entities__struct.h" - - -// Include directives for member types -// Member `type` -// Member `tags` -// Member `json_parameters` -#include "rosidl_runtime_c/string_functions.h" -// Member `state` -#include "ue_msgs/msg/entity_state.h" -// Member `state` -#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_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; - ue_msgs__srv__SpawnEntities_Request__init(message_memory); -} - -void SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnEntities_Request__fini(message_memory); -} - -size_t SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__EntityState__state( - const void * untyped_member) -{ - const ue_msgs__msg__EntityState__Sequence * member = - (const ue_msgs__msg__EntityState__Sequence *)(untyped_member); - return member->size; -} - -const void * SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__EntityState__state( - const void * untyped_member, size_t index) -{ - const ue_msgs__msg__EntityState__Sequence * member = - (const ue_msgs__msg__EntityState__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__EntityState__state( - void * untyped_member, size_t index) -{ - ue_msgs__msg__EntityState__Sequence * member = - (ue_msgs__msg__EntityState__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__EntityState__state( - void * untyped_member, size_t size) -{ - ue_msgs__msg__EntityState__Sequence * member = - (ue_msgs__msg__EntityState__Sequence *)(untyped_member); - ue_msgs__msg__EntityState__Sequence__fini(member); - return ue_msgs__msg__EntityState__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array[4] = { - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Request, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "state", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Request, state), // bytes offset in struct - NULL, // default value - SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__EntityState__state, // size() function pointer - SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__EntityState__state, // get_const(index) function pointer - SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__EntityState__state, // get(index) function pointer - SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__EntityState__state // resize(index) function pointer - }, - { - "tags", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Request, tags), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "json_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Request, json_parameters), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_members = { - "ue_msgs__srv", // message namespace - "SpawnEntities_Request", // message name - 4, // number of fields - sizeof(ue_msgs__srv__SpawnEntities_Request), - SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array, // message members - SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_init_function, // function to initialize message memory (memory has to be allocated) - SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_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 SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle = { - 0, - &SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Request)() { - SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); - if (!SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle.typesupport_identifier) { - SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entities__functions.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_entities__struct.h" - - -// Include directives for member types -// Member `status_message` -// already included above -// #include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_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; - ue_msgs__srv__SpawnEntities_Response__init(message_memory); -} - -void SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnEntities_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntities_Response, status_message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_members = { - "ue_msgs__srv", // message namespace - "SpawnEntities_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__SpawnEntities_Response), - SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_member_array, // message members - SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_init_function, // function to initialize message memory (memory has to be allocated) - SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_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 SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle = { - 0, - &SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Response)() { - if (!SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle.typesupport_identifier) { - SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_entities__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 ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_members = { - "ue_msgs__srv", // service namespace - "SpawnEntities", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_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, ue_msgs, srv, SpawnEntities_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities)() { - if (!ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_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, ue_msgs, srv, SpawnEntities_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, ue_msgs, srv, SpawnEntities_Response)()->data; - } - - return &ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__traits.hpp deleted file mode 100644 index c5f0b50da..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/SpawnEntity.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/spawn_entity__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'state' -#include "ue_msgs/msg/detail/entity_state__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntity_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntity_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntity_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntity_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnEntity"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnEntity"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.c deleted file mode 100644 index fcbfd5767..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.c +++ /dev/null @@ -1,317 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/SpawnEntity.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entity__functions.h" -#include "ue_msgs/srv/detail/spawn_entity__struct.h" - - -// Include directives for member types -// Member `xml` -// Member `robot_namespace` -// Member `tags` -// Member `json_parameters` -#include "rosidl_runtime_c/string_functions.h" -// Member `state` -#include "ue_msgs/msg/entity_state.h" -// Member `state` -#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_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; - ue_msgs__srv__SpawnEntity_Request__init(message_memory); -} - -void SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnEntity_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array[5] = { - { - "xml", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Request, xml), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "robot_namespace", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Request, robot_namespace), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "state", // 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(ue_msgs__srv__SpawnEntity_Request, state), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "tags", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Request, tags), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "json_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Request, json_parameters), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_members = { - "ue_msgs__srv", // message namespace - "SpawnEntity_Request", // message name - 5, // number of fields - sizeof(ue_msgs__srv__SpawnEntity_Request), - SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array, // message members - SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_init_function, // function to initialize message memory (memory has to be allocated) - SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_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 SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle = { - 0, - &SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Request)() { - SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); - if (!SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle.typesupport_identifier) { - SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entity__functions.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_entity__struct.h" - - -// Include directives for member types -// Member `status_message` -// already included above -// #include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_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; - ue_msgs__srv__SpawnEntity_Response__init(message_memory); -} - -void SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnEntity_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnEntity_Response, status_message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_members = { - "ue_msgs__srv", // message namespace - "SpawnEntity_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__SpawnEntity_Response), - SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_member_array, // message members - SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_init_function, // function to initialize message memory (memory has to be allocated) - SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_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 SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle = { - 0, - &SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Response)() { - if (!SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle.typesupport_identifier) { - SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_entity__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 ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_members = { - "ue_msgs__srv", // service namespace - "SpawnEntity", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_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, ue_msgs, srv, SpawnEntity_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity)() { - if (!ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_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, ue_msgs, srv, SpawnEntity_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, ue_msgs, srv, SpawnEntity_Response)()->data; - } - - return &ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__traits.hpp b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__traits.hpp deleted file mode 100644 index efe1fcaaa..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__traits.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from ue_msgs:srv/SpawnWorld.idl -// generated code does not contain a copyright notice - -#ifndef UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ -#define UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ - -#include "ue_msgs/srv/detail/spawn_world__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnWorld_Request"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnWorld_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnWorld_Response"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnWorld_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "ue_msgs::srv::SpawnWorld"; -} - -template<> -inline const char * name() -{ - return "ue_msgs/srv/SpawnWorld"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.c b/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.c deleted file mode 100644 index 1f095ba38..000000000 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.c +++ /dev/null @@ -1,301 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from ue_msgs:srv/SpawnWorld.idl -// generated code does not contain a copyright notice - -#include -#include "ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h" -#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_world__functions.h" -#include "ue_msgs/srv/detail/spawn_world__struct.h" - - -// Include directives for member types -// Member `world_model` -// Member `world_instance_name` -// Member `json_parameters` -#include "rosidl_runtime_c/string_functions.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_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; - ue_msgs__srv__SpawnWorld_Request__init(message_memory); -} - -void SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnWorld_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array[4] = { - { - "world_model", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnWorld_Request, world_model), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "world_instance_name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnWorld_Request, world_instance_name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(ue_msgs__srv__SpawnWorld_Request, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "json_parameters", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnWorld_Request, json_parameters), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_members = { - "ue_msgs__srv", // message namespace - "SpawnWorld_Request", // message name - 4, // number of fields - sizeof(ue_msgs__srv__SpawnWorld_Request), - SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array, // message members - SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_init_function, // function to initialize message memory (memory has to be allocated) - SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_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 SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle = { - 0, - &SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Request)() { - SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle.typesupport_identifier) { - SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h" -// already included above -// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_world__functions.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_world__struct.h" - - -// Include directives for member types -// Member `status_message` -// already included above -// #include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_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; - ue_msgs__srv__SpawnWorld_Response__init(message_memory); -} - -void SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_fini_function(void * message_memory) -{ - ue_msgs__srv__SpawnWorld_Response__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_member_array[2] = { - { - "success", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnWorld_Response, success), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "status_message", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(ue_msgs__srv__SpawnWorld_Response, status_message), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_members = { - "ue_msgs__srv", // message namespace - "SpawnWorld_Response", // message name - 2, // number of fields - sizeof(ue_msgs__srv__SpawnWorld_Response), - SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_member_array, // message members - SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_init_function, // function to initialize message memory (memory has to be allocated) - SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_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 SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle = { - 0, - &SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Response)() { - if (!SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle.typesupport_identifier) { - SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "ue_msgs/srv/detail/spawn_world__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 ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_members = { - "ue_msgs__srv", // service namespace - "SpawnWorld", // service name - // these two fields are initialized below on the first access - NULL, // request message - // ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle, - NULL // response message - // ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle = { - 0, - &ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_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, ue_msgs, srv, SpawnWorld_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld)() { - if (!ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle.typesupport_identifier) { - ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_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, ue_msgs, srv, SpawnWorld_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, ue_msgs, srv, SpawnWorld_Response)()->data; - } - - return &ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__builder.hpp index 915aa5204..59364ac9a 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__BUILDER_HPP_ #define UE_MSGS__MSG__DETAIL__ENTITY_STATE__BUILDER_HPP_ -#include "ue_msgs/msg/detail/entity_state__struct.hpp" -#include #include #include +#include "ue_msgs/msg/detail/entity_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__functions.c similarity index 92% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__functions.c index 2db0531d4..7492ea1b8 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__functions.c @@ -278,22 +278,27 @@ ue_msgs__msg__EntityState__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__msg__EntityState); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__msg__EntityState * data = - (ue_msgs__msg__EntityState *)realloc(output->data, allocation_size); + (ue_msgs__msg__EntityState *)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 (!ue_msgs__msg__EntityState__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__msg__EntityState__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; ) { - ue_msgs__msg__EntityState__fini(&data[i]); + ue_msgs__msg__EntityState__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h index 009212bfc..23fcb7113 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__msg__EntityState( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__msg__EntityState( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp index c5e8996fe..99a62972f 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_EntityState( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.h new file mode 100644 index 000000000..327069e2a --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/EntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'name' +// Member 'reference_frame' +#include "rosidl_runtime_c/string.h" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__struct.h" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__struct.h" + +/// Struct defined in msg/EntityState in the package ue_msgs. +/** + * Holds an entity's pose and twist + */ +typedef struct ue_msgs__msg__EntityState +{ + /// Entity's scoped name. + /// An entity can be a model, link, collision, light, etc. + /// Be sure to use gazebo scoped naming notation (e.g.) + rosidl_runtime_c__String name; + /// Pose in reference frame. + geometry_msgs__msg__Pose pose; + /// Twist in reference frame. + geometry_msgs__msg__Twist twist; + /// Pose/twist are expressed relative to the frame of this entity. + /// Leaving empty or "world" defaults to inertial world frame. + rosidl_runtime_c__String reference_frame; +} ue_msgs__msg__EntityState; + +// Struct for a sequence of ue_msgs__msg__EntityState. +typedef struct ue_msgs__msg__EntityState__Sequence +{ + ue_msgs__msg__EntityState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__EntityState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.hpp similarity index 90% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.hpp index 7cc36a0b5..9c3ecc5a7 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_HPP_ #define UE_MSGS__MSG__DETAIL__ENTITY_STATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'pose' @@ -66,7 +67,7 @@ struct EntityState_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _pose_type = geometry_msgs::msg::Pose_; @@ -75,12 +76,12 @@ struct EntityState_ geometry_msgs::msg::Twist_; _twist_type twist; using _reference_frame_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _reference_frame_type reference_frame; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; @@ -98,7 +99,7 @@ struct EntityState_ return *this; } Type & set__reference_frame( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->reference_frame = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__traits.hpp new file mode 100644 index 000000000..e57377ce0 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__traits.hpp @@ -0,0 +1,164 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/EntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/entity_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" +// Member 'twist' +#include "geometry_msgs/msg/detail/twist__traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const EntityState & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: twist + { + out << "twist: "; + to_flow_style_yaml(msg.twist, out); + out << ", "; + } + + // member: reference_frame + { + out << "reference_frame: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const EntityState & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: twist + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "twist:\n"; + to_block_style_yaml(msg.twist, out, indentation + 2); + } + + // member: reference_frame + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "reference_frame: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const EntityState & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::EntityState & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::EntityState & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::EntityState"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/EntityState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.c new file mode 100644 index 000000000..9afe38e22 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.c @@ -0,0 +1,151 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/EntityState.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/entity_state__functions.h" +#include "ue_msgs/msg/detail/entity_state__struct.h" + + +// Include directives for member types +// Member `name` +// Member `reference_frame` +#include "rosidl_runtime_c/string_functions.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +// Member `twist` +#include "geometry_msgs/msg/twist.h" +// Member `twist` +#include "geometry_msgs/msg/detail/twist__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_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; + ue_msgs__msg__EntityState__init(message_memory); +} + +void ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_fini_function(void * message_memory) +{ + ue_msgs__msg__EntityState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[4] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__EntityState, name), // 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 + }, + { + "pose", // 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(ue_msgs__msg__EntityState, pose), // 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 + }, + { + "twist", // 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(ue_msgs__msg__EntityState, twist), // 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 + }, + { + "reference_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__EntityState, reference_frame), // 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 ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_members = { + "ue_msgs__msg", // message namespace + "EntityState", // message name + 4, // number of fields + sizeof(ue_msgs__msg__EntityState), + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array, // message members + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_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 ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle = { + 0, + &ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)() { + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Twist)(); + if (!ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__EntityState__rosidl_typesupport_introspection_c__EntityState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.cpp similarity index 92% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.cpp index a5e884ea6..67edf515c 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember EntityState_m 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember EntityState_m 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember EntityState_m 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember EntityState_m 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/detail/entity_state__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.hpp new file mode 100644 index 000000000..c28ea76b2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/entity_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/EntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__ENTITY_STATE__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__ENTITY_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + EntityState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__ENTITY_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__builder.hpp new file mode 100644 index 000000000..7985319b8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__builder.hpp @@ -0,0 +1,120 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__BUILDER_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__BUILDER_HPP_ + +#include +#include + +#include "ue_msgs/msg/detail/hit_event__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace ue_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_HitEvent_other_component_name +{ +public: + explicit Init_HitEvent_other_component_name(::ue_msgs::msg::HitEvent & msg) + : msg_(msg) + {} + ::ue_msgs::msg::HitEvent other_component_name(::ue_msgs::msg::HitEvent::_other_component_name_type arg) + { + msg_.other_component_name = std::move(arg); + return std::move(msg_); + } + +private: + ::ue_msgs::msg::HitEvent msg_; +}; + +class Init_HitEvent_hit_result +{ +public: + explicit Init_HitEvent_hit_result(::ue_msgs::msg::HitEvent & msg) + : msg_(msg) + {} + Init_HitEvent_other_component_name hit_result(::ue_msgs::msg::HitEvent::_hit_result_type arg) + { + msg_.hit_result = std::move(arg); + return Init_HitEvent_other_component_name(msg_); + } + +private: + ::ue_msgs::msg::HitEvent msg_; +}; + +class Init_HitEvent_normal_impluse +{ +public: + explicit Init_HitEvent_normal_impluse(::ue_msgs::msg::HitEvent & msg) + : msg_(msg) + {} + Init_HitEvent_hit_result normal_impluse(::ue_msgs::msg::HitEvent::_normal_impluse_type arg) + { + msg_.normal_impluse = std::move(arg); + return Init_HitEvent_hit_result(msg_); + } + +private: + ::ue_msgs::msg::HitEvent msg_; +}; + +class Init_HitEvent_other_actor_name +{ +public: + explicit Init_HitEvent_other_actor_name(::ue_msgs::msg::HitEvent & msg) + : msg_(msg) + {} + Init_HitEvent_normal_impluse other_actor_name(::ue_msgs::msg::HitEvent::_other_actor_name_type arg) + { + msg_.other_actor_name = std::move(arg); + return Init_HitEvent_normal_impluse(msg_); + } + +private: + ::ue_msgs::msg::HitEvent msg_; +}; + +class Init_HitEvent_self_name +{ +public: + Init_HitEvent_self_name() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_HitEvent_other_actor_name self_name(::ue_msgs::msg::HitEvent::_self_name_type arg) + { + msg_.self_name = std::move(arg); + return Init_HitEvent_other_actor_name(msg_); + } + +private: + ::ue_msgs::msg::HitEvent msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::ue_msgs::msg::HitEvent>() +{ + return ue_msgs::msg::builder::Init_HitEvent_self_name(); +} + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.c new file mode 100644 index 000000000..bd8bed7a6 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.c @@ -0,0 +1,333 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice +#include "ue_msgs/msg/detail/hit_event__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `self_name` +// Member `other_actor_name` +// Member `other_component_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `normal_impluse` +#include "geometry_msgs/msg/detail/vector3__functions.h" +// Member `hit_result` +#include "ue_msgs/msg/detail/hit_result__functions.h" + +bool +ue_msgs__msg__HitEvent__init(ue_msgs__msg__HitEvent * msg) +{ + if (!msg) { + return false; + } + // self_name + if (!rosidl_runtime_c__String__init(&msg->self_name)) { + ue_msgs__msg__HitEvent__fini(msg); + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__init(&msg->other_actor_name)) { + ue_msgs__msg__HitEvent__fini(msg); + return false; + } + // normal_impluse + if (!geometry_msgs__msg__Vector3__init(&msg->normal_impluse)) { + ue_msgs__msg__HitEvent__fini(msg); + return false; + } + // hit_result + if (!ue_msgs__msg__HitResult__init(&msg->hit_result)) { + ue_msgs__msg__HitEvent__fini(msg); + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__init(&msg->other_component_name)) { + ue_msgs__msg__HitEvent__fini(msg); + return false; + } + return true; +} + +void +ue_msgs__msg__HitEvent__fini(ue_msgs__msg__HitEvent * msg) +{ + if (!msg) { + return; + } + // self_name + rosidl_runtime_c__String__fini(&msg->self_name); + // other_actor_name + rosidl_runtime_c__String__fini(&msg->other_actor_name); + // normal_impluse + geometry_msgs__msg__Vector3__fini(&msg->normal_impluse); + // hit_result + ue_msgs__msg__HitResult__fini(&msg->hit_result); + // other_component_name + rosidl_runtime_c__String__fini(&msg->other_component_name); +} + +bool +ue_msgs__msg__HitEvent__are_equal(const ue_msgs__msg__HitEvent * lhs, const ue_msgs__msg__HitEvent * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // self_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->self_name), &(rhs->self_name))) + { + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->other_actor_name), &(rhs->other_actor_name))) + { + return false; + } + // normal_impluse + if (!geometry_msgs__msg__Vector3__are_equal( + &(lhs->normal_impluse), &(rhs->normal_impluse))) + { + return false; + } + // hit_result + if (!ue_msgs__msg__HitResult__are_equal( + &(lhs->hit_result), &(rhs->hit_result))) + { + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->other_component_name), &(rhs->other_component_name))) + { + return false; + } + return true; +} + +bool +ue_msgs__msg__HitEvent__copy( + const ue_msgs__msg__HitEvent * input, + ue_msgs__msg__HitEvent * output) +{ + if (!input || !output) { + return false; + } + // self_name + if (!rosidl_runtime_c__String__copy( + &(input->self_name), &(output->self_name))) + { + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__copy( + &(input->other_actor_name), &(output->other_actor_name))) + { + return false; + } + // normal_impluse + if (!geometry_msgs__msg__Vector3__copy( + &(input->normal_impluse), &(output->normal_impluse))) + { + return false; + } + // hit_result + if (!ue_msgs__msg__HitResult__copy( + &(input->hit_result), &(output->hit_result))) + { + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__copy( + &(input->other_component_name), &(output->other_component_name))) + { + return false; + } + return true; +} + +ue_msgs__msg__HitEvent * +ue_msgs__msg__HitEvent__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitEvent * msg = (ue_msgs__msg__HitEvent *)allocator.allocate(sizeof(ue_msgs__msg__HitEvent), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(ue_msgs__msg__HitEvent)); + bool success = ue_msgs__msg__HitEvent__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +ue_msgs__msg__HitEvent__destroy(ue_msgs__msg__HitEvent * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + ue_msgs__msg__HitEvent__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +ue_msgs__msg__HitEvent__Sequence__init(ue_msgs__msg__HitEvent__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitEvent * data = NULL; + + if (size) { + data = (ue_msgs__msg__HitEvent *)allocator.zero_allocate(size, sizeof(ue_msgs__msg__HitEvent), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = ue_msgs__msg__HitEvent__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + ue_msgs__msg__HitEvent__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +ue_msgs__msg__HitEvent__Sequence__fini(ue_msgs__msg__HitEvent__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) { + ue_msgs__msg__HitEvent__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); + } +} + +ue_msgs__msg__HitEvent__Sequence * +ue_msgs__msg__HitEvent__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitEvent__Sequence * array = (ue_msgs__msg__HitEvent__Sequence *)allocator.allocate(sizeof(ue_msgs__msg__HitEvent__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = ue_msgs__msg__HitEvent__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +ue_msgs__msg__HitEvent__Sequence__destroy(ue_msgs__msg__HitEvent__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + ue_msgs__msg__HitEvent__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +ue_msgs__msg__HitEvent__Sequence__are_equal(const ue_msgs__msg__HitEvent__Sequence * lhs, const ue_msgs__msg__HitEvent__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!ue_msgs__msg__HitEvent__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +ue_msgs__msg__HitEvent__Sequence__copy( + const ue_msgs__msg__HitEvent__Sequence * input, + ue_msgs__msg__HitEvent__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(ue_msgs__msg__HitEvent); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitEvent * data = + (ue_msgs__msg__HitEvent *)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 (!ue_msgs__msg__HitEvent__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; ) { + ue_msgs__msg__HitEvent__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!ue_msgs__msg__HitEvent__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.h new file mode 100644 index 000000000..a517855a5 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__FUNCTIONS_H_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "ue_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "ue_msgs/msg/detail/hit_event__struct.h" + +/// Initialize msg/HitEvent 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( + * ue_msgs__msg__HitEvent + * )) before or use + * ue_msgs__msg__HitEvent__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +bool +ue_msgs__msg__HitEvent__init(ue_msgs__msg__HitEvent * msg); + +/// Finalize msg/HitEvent message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitEvent__fini(ue_msgs__msg__HitEvent * msg); + +/// Create msg/HitEvent message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * ue_msgs__msg__HitEvent__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +ue_msgs__msg__HitEvent * +ue_msgs__msg__HitEvent__create(); + +/// Destroy msg/HitEvent message. +/** + * It calls + * ue_msgs__msg__HitEvent__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitEvent__destroy(ue_msgs__msg__HitEvent * msg); + +/// Check for msg/HitEvent 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_ue_msgs +bool +ue_msgs__msg__HitEvent__are_equal(const ue_msgs__msg__HitEvent * lhs, const ue_msgs__msg__HitEvent * rhs); + +/// Copy a msg/HitEvent 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_ue_msgs +bool +ue_msgs__msg__HitEvent__copy( + const ue_msgs__msg__HitEvent * input, + ue_msgs__msg__HitEvent * output); + +/// Initialize array of msg/HitEvent messages. +/** + * It allocates the memory for the number of elements and calls + * ue_msgs__msg__HitEvent__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_ue_msgs +bool +ue_msgs__msg__HitEvent__Sequence__init(ue_msgs__msg__HitEvent__Sequence * array, size_t size); + +/// Finalize array of msg/HitEvent messages. +/** + * It calls + * ue_msgs__msg__HitEvent__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_ue_msgs +void +ue_msgs__msg__HitEvent__Sequence__fini(ue_msgs__msg__HitEvent__Sequence * array); + +/// Create array of msg/HitEvent messages. +/** + * It allocates the memory for the array and calls + * ue_msgs__msg__HitEvent__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_ue_msgs +ue_msgs__msg__HitEvent__Sequence * +ue_msgs__msg__HitEvent__Sequence__create(size_t size); + +/// Destroy array of msg/HitEvent messages. +/** + * It calls + * ue_msgs__msg__HitEvent__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitEvent__Sequence__destroy(ue_msgs__msg__HitEvent__Sequence * array); + +/// Check for msg/HitEvent 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_ue_msgs +bool +ue_msgs__msg__HitEvent__Sequence__are_equal(const ue_msgs__msg__HitEvent__Sequence * lhs, const ue_msgs__msg__HitEvent__Sequence * rhs); + +/// Copy an array of msg/HitEvent 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_ue_msgs +bool +ue_msgs__msg__HitEvent__Sequence__copy( + const ue_msgs__msg__HitEvent__Sequence * input, + ue_msgs__msg__HitEvent__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..61bdd51ca --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t get_serialized_size_ue_msgs__msg__HitEvent( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t max_serialized_size_ue_msgs__msg__HitEvent( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, ue_msgs, msg, HitEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..9d85abd32 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "ue_msgs/msg/detail/hit_event__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 ue_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_serialize( + const ue_msgs::msg::HitEvent & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + ue_msgs::msg::HitEvent & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +get_serialized_size( + const ue_msgs::msg::HitEvent & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +max_serialized_size_HitEvent( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace ue_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, ue_msgs, msg, HitEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..168bbf3d7 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__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 "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..0fe6460ae --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__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, ue_msgs, msg, HitEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.h new file mode 100644 index 000000000..10227635a --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.h @@ -0,0 +1,64 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'self_name' +// Member 'other_actor_name' +// Member 'other_component_name' +#include "rosidl_runtime_c/string.h" +// Member 'normal_impluse' +#include "geometry_msgs/msg/detail/vector3__struct.h" +// Member 'hit_result' +#include "ue_msgs/msg/detail/hit_result__struct.h" + +/// Struct defined in msg/HitEvent in the package ue_msgs. +/** + * Ref + * doc: https://docs.unrealengine.com/5.2/en-US/using-the-onhit-event/ + * DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FiveParams( FComponentHitSignature, UPrimitiveComponent, OnComponentHit, UPrimitiveComponent*, HitComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, FVector, NormalImpulse, const FHitResult&, Hit ); + * DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams( FActorHitSignature, AActor, OnActorHit, AActor*, SelfActor, AActor*, OtherActor, FVector, NormalImpulse, const FHitResult&, Hit ); + */ +typedef struct ue_msgs__msg__HitEvent +{ + /// common + /// actor or component name + rosidl_runtime_c__String self_name; + rosidl_runtime_c__String other_actor_name; + geometry_msgs__msg__Vector3 normal_impluse; + ue_msgs__msg__HitResult hit_result; + /// component event only + /// empty unless OnComponentHit event + rosidl_runtime_c__String other_component_name; +} ue_msgs__msg__HitEvent; + +// Struct for a sequence of ue_msgs__msg__HitEvent. +typedef struct ue_msgs__msg__HitEvent__Sequence +{ + ue_msgs__msg__HitEvent * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__HitEvent__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.hpp new file mode 100644 index 000000000..e3f69c06f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__struct.hpp @@ -0,0 +1,195 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'normal_impluse' +#include "geometry_msgs/msg/detail/vector3__struct.hpp" +// Member 'hit_result' +#include "ue_msgs/msg/detail/hit_result__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__ue_msgs__msg__HitEvent __attribute__((deprecated)) +#else +# define DEPRECATED__ue_msgs__msg__HitEvent __declspec(deprecated) +#endif + +namespace ue_msgs +{ + +namespace msg +{ + +// message struct +template +struct HitEvent_ +{ + using Type = HitEvent_; + + explicit HitEvent_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : normal_impluse(_init), + hit_result(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->self_name = ""; + this->other_actor_name = ""; + this->other_component_name = ""; + } + } + + explicit HitEvent_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : self_name(_alloc), + other_actor_name(_alloc), + normal_impluse(_alloc, _init), + hit_result(_alloc, _init), + other_component_name(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->self_name = ""; + this->other_actor_name = ""; + this->other_component_name = ""; + } + } + + // field types and members + using _self_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _self_name_type self_name; + using _other_actor_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _other_actor_name_type other_actor_name; + using _normal_impluse_type = + geometry_msgs::msg::Vector3_; + _normal_impluse_type normal_impluse; + using _hit_result_type = + ue_msgs::msg::HitResult_; + _hit_result_type hit_result; + using _other_component_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _other_component_name_type other_component_name; + + // setters for named parameter idiom + Type & set__self_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->self_name = _arg; + return *this; + } + Type & set__other_actor_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->other_actor_name = _arg; + return *this; + } + Type & set__normal_impluse( + const geometry_msgs::msg::Vector3_ & _arg) + { + this->normal_impluse = _arg; + return *this; + } + Type & set__hit_result( + const ue_msgs::msg::HitResult_ & _arg) + { + this->hit_result = _arg; + return *this; + } + Type & set__other_component_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->other_component_name = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + ue_msgs::msg::HitEvent_ *; + using ConstRawPtr = + const ue_msgs::msg::HitEvent_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__ue_msgs__msg__HitEvent + std::shared_ptr> + Ptr; + typedef DEPRECATED__ue_msgs__msg__HitEvent + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const HitEvent_ & other) const + { + if (this->self_name != other.self_name) { + return false; + } + if (this->other_actor_name != other.other_actor_name) { + return false; + } + if (this->normal_impluse != other.normal_impluse) { + return false; + } + if (this->hit_result != other.hit_result) { + return false; + } + if (this->other_component_name != other.other_component_name) { + return false; + } + return true; + } + bool operator!=(const HitEvent_ & other) const + { + return !this->operator==(other); + } +}; // struct HitEvent_ + +// alias to use template instance with default allocator +using HitEvent = + ue_msgs::msg::HitEvent_>; + +// constant definitions + +} // namespace msg + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__traits.hpp new file mode 100644 index 000000000..f2ad9fbfd --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__traits.hpp @@ -0,0 +1,181 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/hit_event__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'normal_impluse' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" +// Member 'hit_result' +#include "ue_msgs/msg/detail/hit_result__traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const HitEvent & msg, + std::ostream & out) +{ + out << "{"; + // member: self_name + { + out << "self_name: "; + rosidl_generator_traits::value_to_yaml(msg.self_name, out); + out << ", "; + } + + // member: other_actor_name + { + out << "other_actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_actor_name, out); + out << ", "; + } + + // member: normal_impluse + { + out << "normal_impluse: "; + to_flow_style_yaml(msg.normal_impluse, out); + out << ", "; + } + + // member: hit_result + { + out << "hit_result: "; + to_flow_style_yaml(msg.hit_result, out); + out << ", "; + } + + // member: other_component_name + { + out << "other_component_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_component_name, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const HitEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: self_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "self_name: "; + rosidl_generator_traits::value_to_yaml(msg.self_name, out); + out << "\n"; + } + + // member: other_actor_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "other_actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_actor_name, out); + out << "\n"; + } + + // member: normal_impluse + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "normal_impluse:\n"; + to_block_style_yaml(msg.normal_impluse, out, indentation + 2); + } + + // member: hit_result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "hit_result:\n"; + to_block_style_yaml(msg.hit_result, out, indentation + 2); + } + + // member: other_component_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "other_component_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_component_name, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const HitEvent & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::HitEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::HitEvent & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::HitEvent"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/HitEvent"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.c new file mode 100644 index 000000000..f09dc10ff --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.c @@ -0,0 +1,169 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/hit_event__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/hit_event__functions.h" +#include "ue_msgs/msg/detail/hit_event__struct.h" + + +// Include directives for member types +// Member `self_name` +// Member `other_actor_name` +// Member `other_component_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `normal_impluse` +#include "geometry_msgs/msg/vector3.h" +// Member `normal_impluse` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" +// Member `hit_result` +#include "ue_msgs/msg/hit_result.h" +// Member `hit_result` +#include "ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_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; + ue_msgs__msg__HitEvent__init(message_memory); +} + +void ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_fini_function(void * message_memory) +{ + ue_msgs__msg__HitEvent__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_member_array[5] = { + { + "self_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitEvent, self_name), // 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 + }, + { + "other_actor_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitEvent, other_actor_name), // 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 + }, + { + "normal_impluse", // 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(ue_msgs__msg__HitEvent, normal_impluse), // 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 + }, + { + "hit_result", // 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(ue_msgs__msg__HitEvent, hit_result), // 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 + }, + { + "other_component_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitEvent, other_component_name), // 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 ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_members = { + "ue_msgs__msg", // message namespace + "HitEvent", // message name + 5, // number of fields + sizeof(ue_msgs__msg__HitEvent), + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_member_array, // message members + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_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 ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_type_support_handle = { + 0, + &ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitEvent)() { + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitResult)(); + if (!ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__HitEvent__rosidl_typesupport_introspection_c__HitEvent_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.cpp new file mode 100644 index 000000000..3ce57c0c2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.cpp @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from ue_msgs:msg/HitEvent.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 "ue_msgs/msg/detail/hit_event__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 ue_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void HitEvent_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) ue_msgs::msg::HitEvent(_init); +} + +void HitEvent_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~HitEvent(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember HitEvent_message_member_array[5] = { + { + "self_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitEvent, self_name), // 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 + }, + { + "other_actor_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitEvent, other_actor_name), // 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 + }, + { + "normal_impluse", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitEvent, normal_impluse), // 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 + }, + { + "hit_result", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitEvent, hit_result), // 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 + }, + { + "other_component_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitEvent, other_component_name), // 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 HitEvent_message_members = { + "ue_msgs::msg", // message namespace + "HitEvent", // message name + 5, // number of fields + sizeof(ue_msgs::msg::HitEvent), + HitEvent_message_member_array, // message members + HitEvent_init_function, // function to initialize message memory (memory has to be allocated) + HitEvent_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t HitEvent_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &HitEvent_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace ue_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::HitEvent_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, ue_msgs, msg, HitEvent)() { + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::HitEvent_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.h new file mode 100644 index 000000000..669d25aa1 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_H_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + ue_msgs, + msg, + HitEvent +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.hpp new file mode 100644 index 000000000..f6cca31c2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_event__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + HitEvent +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_EVENT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__builder.hpp new file mode 100644 index 000000000..80dac8c7c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__builder.hpp @@ -0,0 +1,360 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__BUILDER_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__BUILDER_HPP_ + +#include +#include + +#include "ue_msgs/msg/detail/hit_result__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace ue_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_HitResult_trace_end +{ +public: + explicit Init_HitResult_trace_end(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + ::ue_msgs::msg::HitResult trace_end(::ue_msgs::msg::HitResult::_trace_end_type arg) + { + msg_.trace_end = std::move(arg); + return std::move(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_trace_start +{ +public: + explicit Init_HitResult_trace_start(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_trace_end trace_start(::ue_msgs::msg::HitResult::_trace_start_type arg) + { + msg_.trace_start = std::move(arg); + return Init_HitResult_trace_end(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_location +{ +public: + explicit Init_HitResult_location(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_trace_start location(::ue_msgs::msg::HitResult::_location_type arg) + { + msg_.location = std::move(arg); + return Init_HitResult_trace_start(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_normal +{ +public: + explicit Init_HitResult_normal(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_location normal(::ue_msgs::msg::HitResult::_normal_type arg) + { + msg_.normal = std::move(arg); + return Init_HitResult_location(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_impact_point +{ +public: + explicit Init_HitResult_impact_point(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_normal impact_point(::ue_msgs::msg::HitResult::_impact_point_type arg) + { + msg_.impact_point = std::move(arg); + return Init_HitResult_normal(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_impact_normal +{ +public: + explicit Init_HitResult_impact_normal(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_impact_point impact_normal(::ue_msgs::msg::HitResult::_impact_normal_type arg) + { + msg_.impact_normal = std::move(arg); + return Init_HitResult_impact_point(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_time +{ +public: + explicit Init_HitResult_time(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_impact_normal time(::ue_msgs::msg::HitResult::_time_type arg) + { + msg_.time = std::move(arg); + return Init_HitResult_impact_normal(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_physics_material_name +{ +public: + explicit Init_HitResult_physics_material_name(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_time physics_material_name(::ue_msgs::msg::HitResult::_physics_material_name_type arg) + { + msg_.physics_material_name = std::move(arg); + return Init_HitResult_time(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_penetration_depth +{ +public: + explicit Init_HitResult_penetration_depth(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_physics_material_name penetration_depth(::ue_msgs::msg::HitResult::_penetration_depth_type arg) + { + msg_.penetration_depth = std::move(arg); + return Init_HitResult_physics_material_name(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_my_item +{ +public: + explicit Init_HitResult_my_item(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_penetration_depth my_item(::ue_msgs::msg::HitResult::_my_item_type arg) + { + msg_.my_item = std::move(arg); + return Init_HitResult_penetration_depth(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_my_bone_name +{ +public: + explicit Init_HitResult_my_bone_name(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_my_item my_bone_name(::ue_msgs::msg::HitResult::_my_bone_name_type arg) + { + msg_.my_bone_name = std::move(arg); + return Init_HitResult_my_item(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_item +{ +public: + explicit Init_HitResult_item(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_my_bone_name item(::ue_msgs::msg::HitResult::_item_type arg) + { + msg_.item = std::move(arg); + return Init_HitResult_my_bone_name(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_bone_name +{ +public: + explicit Init_HitResult_bone_name(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_item bone_name(::ue_msgs::msg::HitResult::_bone_name_type arg) + { + msg_.bone_name = std::move(arg); + return Init_HitResult_item(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_face_index +{ +public: + explicit Init_HitResult_face_index(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_bone_name face_index(::ue_msgs::msg::HitResult::_face_index_type arg) + { + msg_.face_index = std::move(arg); + return Init_HitResult_bone_name(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_element_index +{ +public: + explicit Init_HitResult_element_index(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_face_index element_index(::ue_msgs::msg::HitResult::_element_index_type arg) + { + msg_.element_index = std::move(arg); + return Init_HitResult_face_index(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_distance +{ +public: + explicit Init_HitResult_distance(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_element_index distance(::ue_msgs::msg::HitResult::_distance_type arg) + { + msg_.distance = std::move(arg); + return Init_HitResult_element_index(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_actor_name +{ +public: + explicit Init_HitResult_actor_name(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_distance actor_name(::ue_msgs::msg::HitResult::_actor_name_type arg) + { + msg_.actor_name = std::move(arg); + return Init_HitResult_distance(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_component_name +{ +public: + explicit Init_HitResult_component_name(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_actor_name component_name(::ue_msgs::msg::HitResult::_component_name_type arg) + { + msg_.component_name = std::move(arg); + return Init_HitResult_actor_name(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_start_penetrating +{ +public: + explicit Init_HitResult_start_penetrating(::ue_msgs::msg::HitResult & msg) + : msg_(msg) + {} + Init_HitResult_component_name start_penetrating(::ue_msgs::msg::HitResult::_start_penetrating_type arg) + { + msg_.start_penetrating = std::move(arg); + return Init_HitResult_component_name(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +class Init_HitResult_blocking_hit +{ +public: + Init_HitResult_blocking_hit() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_HitResult_start_penetrating blocking_hit(::ue_msgs::msg::HitResult::_blocking_hit_type arg) + { + msg_.blocking_hit = std::move(arg); + return Init_HitResult_start_penetrating(msg_); + } + +private: + ::ue_msgs::msg::HitResult msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::ue_msgs::msg::HitResult>() +{ + return ue_msgs::msg::builder::Init_HitResult_blocking_hit(); +} + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.c new file mode 100644 index 000000000..37cfa723c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.c @@ -0,0 +1,525 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice +#include "ue_msgs/msg/detail/hit_result__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `component_name` +// Member `actor_name` +// Member `bone_name` +// Member `my_bone_name` +// Member `physics_material_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `impact_normal` +// Member `normal` +#include "geometry_msgs/msg/detail/vector3__functions.h" +// Member `impact_point` +// Member `location` +// Member `trace_start` +// Member `trace_end` +#include "geometry_msgs/msg/detail/point__functions.h" + +bool +ue_msgs__msg__HitResult__init(ue_msgs__msg__HitResult * msg) +{ + if (!msg) { + return false; + } + // blocking_hit + // start_penetrating + // component_name + if (!rosidl_runtime_c__String__init(&msg->component_name)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // actor_name + if (!rosidl_runtime_c__String__init(&msg->actor_name)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // distance + // element_index + // face_index + // bone_name + if (!rosidl_runtime_c__String__init(&msg->bone_name)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // item + // my_bone_name + if (!rosidl_runtime_c__String__init(&msg->my_bone_name)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // my_item + // penetration_depth + // physics_material_name + if (!rosidl_runtime_c__String__init(&msg->physics_material_name)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // time + // impact_normal + if (!geometry_msgs__msg__Vector3__init(&msg->impact_normal)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // impact_point + if (!geometry_msgs__msg__Point__init(&msg->impact_point)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // normal + if (!geometry_msgs__msg__Vector3__init(&msg->normal)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // location + if (!geometry_msgs__msg__Point__init(&msg->location)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // trace_start + if (!geometry_msgs__msg__Point__init(&msg->trace_start)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + // trace_end + if (!geometry_msgs__msg__Point__init(&msg->trace_end)) { + ue_msgs__msg__HitResult__fini(msg); + return false; + } + return true; +} + +void +ue_msgs__msg__HitResult__fini(ue_msgs__msg__HitResult * msg) +{ + if (!msg) { + return; + } + // blocking_hit + // start_penetrating + // component_name + rosidl_runtime_c__String__fini(&msg->component_name); + // actor_name + rosidl_runtime_c__String__fini(&msg->actor_name); + // distance + // element_index + // face_index + // bone_name + rosidl_runtime_c__String__fini(&msg->bone_name); + // item + // my_bone_name + rosidl_runtime_c__String__fini(&msg->my_bone_name); + // my_item + // penetration_depth + // physics_material_name + rosidl_runtime_c__String__fini(&msg->physics_material_name); + // time + // impact_normal + geometry_msgs__msg__Vector3__fini(&msg->impact_normal); + // impact_point + geometry_msgs__msg__Point__fini(&msg->impact_point); + // normal + geometry_msgs__msg__Vector3__fini(&msg->normal); + // location + geometry_msgs__msg__Point__fini(&msg->location); + // trace_start + geometry_msgs__msg__Point__fini(&msg->trace_start); + // trace_end + geometry_msgs__msg__Point__fini(&msg->trace_end); +} + +bool +ue_msgs__msg__HitResult__are_equal(const ue_msgs__msg__HitResult * lhs, const ue_msgs__msg__HitResult * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // blocking_hit + if (lhs->blocking_hit != rhs->blocking_hit) { + return false; + } + // start_penetrating + if (lhs->start_penetrating != rhs->start_penetrating) { + return false; + } + // component_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->component_name), &(rhs->component_name))) + { + return false; + } + // actor_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->actor_name), &(rhs->actor_name))) + { + return false; + } + // distance + if (lhs->distance != rhs->distance) { + return false; + } + // element_index + if (lhs->element_index != rhs->element_index) { + return false; + } + // face_index + if (lhs->face_index != rhs->face_index) { + return false; + } + // bone_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->bone_name), &(rhs->bone_name))) + { + return false; + } + // item + if (lhs->item != rhs->item) { + return false; + } + // my_bone_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->my_bone_name), &(rhs->my_bone_name))) + { + return false; + } + // my_item + if (lhs->my_item != rhs->my_item) { + return false; + } + // penetration_depth + if (lhs->penetration_depth != rhs->penetration_depth) { + return false; + } + // physics_material_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->physics_material_name), &(rhs->physics_material_name))) + { + return false; + } + // time + if (lhs->time != rhs->time) { + return false; + } + // impact_normal + if (!geometry_msgs__msg__Vector3__are_equal( + &(lhs->impact_normal), &(rhs->impact_normal))) + { + return false; + } + // impact_point + if (!geometry_msgs__msg__Point__are_equal( + &(lhs->impact_point), &(rhs->impact_point))) + { + return false; + } + // normal + if (!geometry_msgs__msg__Vector3__are_equal( + &(lhs->normal), &(rhs->normal))) + { + return false; + } + // location + if (!geometry_msgs__msg__Point__are_equal( + &(lhs->location), &(rhs->location))) + { + return false; + } + // trace_start + if (!geometry_msgs__msg__Point__are_equal( + &(lhs->trace_start), &(rhs->trace_start))) + { + return false; + } + // trace_end + if (!geometry_msgs__msg__Point__are_equal( + &(lhs->trace_end), &(rhs->trace_end))) + { + return false; + } + return true; +} + +bool +ue_msgs__msg__HitResult__copy( + const ue_msgs__msg__HitResult * input, + ue_msgs__msg__HitResult * output) +{ + if (!input || !output) { + return false; + } + // blocking_hit + output->blocking_hit = input->blocking_hit; + // start_penetrating + output->start_penetrating = input->start_penetrating; + // component_name + if (!rosidl_runtime_c__String__copy( + &(input->component_name), &(output->component_name))) + { + return false; + } + // actor_name + if (!rosidl_runtime_c__String__copy( + &(input->actor_name), &(output->actor_name))) + { + return false; + } + // distance + output->distance = input->distance; + // element_index + output->element_index = input->element_index; + // face_index + output->face_index = input->face_index; + // bone_name + if (!rosidl_runtime_c__String__copy( + &(input->bone_name), &(output->bone_name))) + { + return false; + } + // item + output->item = input->item; + // my_bone_name + if (!rosidl_runtime_c__String__copy( + &(input->my_bone_name), &(output->my_bone_name))) + { + return false; + } + // my_item + output->my_item = input->my_item; + // penetration_depth + output->penetration_depth = input->penetration_depth; + // physics_material_name + if (!rosidl_runtime_c__String__copy( + &(input->physics_material_name), &(output->physics_material_name))) + { + return false; + } + // time + output->time = input->time; + // impact_normal + if (!geometry_msgs__msg__Vector3__copy( + &(input->impact_normal), &(output->impact_normal))) + { + return false; + } + // impact_point + if (!geometry_msgs__msg__Point__copy( + &(input->impact_point), &(output->impact_point))) + { + return false; + } + // normal + if (!geometry_msgs__msg__Vector3__copy( + &(input->normal), &(output->normal))) + { + return false; + } + // location + if (!geometry_msgs__msg__Point__copy( + &(input->location), &(output->location))) + { + return false; + } + // trace_start + if (!geometry_msgs__msg__Point__copy( + &(input->trace_start), &(output->trace_start))) + { + return false; + } + // trace_end + if (!geometry_msgs__msg__Point__copy( + &(input->trace_end), &(output->trace_end))) + { + return false; + } + return true; +} + +ue_msgs__msg__HitResult * +ue_msgs__msg__HitResult__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitResult * msg = (ue_msgs__msg__HitResult *)allocator.allocate(sizeof(ue_msgs__msg__HitResult), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(ue_msgs__msg__HitResult)); + bool success = ue_msgs__msg__HitResult__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +ue_msgs__msg__HitResult__destroy(ue_msgs__msg__HitResult * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + ue_msgs__msg__HitResult__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +ue_msgs__msg__HitResult__Sequence__init(ue_msgs__msg__HitResult__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitResult * data = NULL; + + if (size) { + data = (ue_msgs__msg__HitResult *)allocator.zero_allocate(size, sizeof(ue_msgs__msg__HitResult), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = ue_msgs__msg__HitResult__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + ue_msgs__msg__HitResult__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +ue_msgs__msg__HitResult__Sequence__fini(ue_msgs__msg__HitResult__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) { + ue_msgs__msg__HitResult__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); + } +} + +ue_msgs__msg__HitResult__Sequence * +ue_msgs__msg__HitResult__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitResult__Sequence * array = (ue_msgs__msg__HitResult__Sequence *)allocator.allocate(sizeof(ue_msgs__msg__HitResult__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = ue_msgs__msg__HitResult__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +ue_msgs__msg__HitResult__Sequence__destroy(ue_msgs__msg__HitResult__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + ue_msgs__msg__HitResult__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +ue_msgs__msg__HitResult__Sequence__are_equal(const ue_msgs__msg__HitResult__Sequence * lhs, const ue_msgs__msg__HitResult__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!ue_msgs__msg__HitResult__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +ue_msgs__msg__HitResult__Sequence__copy( + const ue_msgs__msg__HitResult__Sequence * input, + ue_msgs__msg__HitResult__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(ue_msgs__msg__HitResult); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__HitResult * data = + (ue_msgs__msg__HitResult *)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 (!ue_msgs__msg__HitResult__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; ) { + ue_msgs__msg__HitResult__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!ue_msgs__msg__HitResult__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.h new file mode 100644 index 000000000..a875c1142 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__FUNCTIONS_H_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "ue_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "ue_msgs/msg/detail/hit_result__struct.h" + +/// Initialize msg/HitResult 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( + * ue_msgs__msg__HitResult + * )) before or use + * ue_msgs__msg__HitResult__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +bool +ue_msgs__msg__HitResult__init(ue_msgs__msg__HitResult * msg); + +/// Finalize msg/HitResult message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitResult__fini(ue_msgs__msg__HitResult * msg); + +/// Create msg/HitResult message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * ue_msgs__msg__HitResult__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +ue_msgs__msg__HitResult * +ue_msgs__msg__HitResult__create(); + +/// Destroy msg/HitResult message. +/** + * It calls + * ue_msgs__msg__HitResult__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitResult__destroy(ue_msgs__msg__HitResult * msg); + +/// Check for msg/HitResult 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_ue_msgs +bool +ue_msgs__msg__HitResult__are_equal(const ue_msgs__msg__HitResult * lhs, const ue_msgs__msg__HitResult * rhs); + +/// Copy a msg/HitResult 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_ue_msgs +bool +ue_msgs__msg__HitResult__copy( + const ue_msgs__msg__HitResult * input, + ue_msgs__msg__HitResult * output); + +/// Initialize array of msg/HitResult messages. +/** + * It allocates the memory for the number of elements and calls + * ue_msgs__msg__HitResult__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_ue_msgs +bool +ue_msgs__msg__HitResult__Sequence__init(ue_msgs__msg__HitResult__Sequence * array, size_t size); + +/// Finalize array of msg/HitResult messages. +/** + * It calls + * ue_msgs__msg__HitResult__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_ue_msgs +void +ue_msgs__msg__HitResult__Sequence__fini(ue_msgs__msg__HitResult__Sequence * array); + +/// Create array of msg/HitResult messages. +/** + * It allocates the memory for the array and calls + * ue_msgs__msg__HitResult__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_ue_msgs +ue_msgs__msg__HitResult__Sequence * +ue_msgs__msg__HitResult__Sequence__create(size_t size); + +/// Destroy array of msg/HitResult messages. +/** + * It calls + * ue_msgs__msg__HitResult__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__HitResult__Sequence__destroy(ue_msgs__msg__HitResult__Sequence * array); + +/// Check for msg/HitResult 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_ue_msgs +bool +ue_msgs__msg__HitResult__Sequence__are_equal(const ue_msgs__msg__HitResult__Sequence * lhs, const ue_msgs__msg__HitResult__Sequence * rhs); + +/// Copy an array of msg/HitResult 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_ue_msgs +bool +ue_msgs__msg__HitResult__Sequence__copy( + const ue_msgs__msg__HitResult__Sequence * input, + ue_msgs__msg__HitResult__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..b41d9b824 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t get_serialized_size_ue_msgs__msg__HitResult( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t max_serialized_size_ue_msgs__msg__HitResult( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, ue_msgs, msg, HitResult)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..9171bc813 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "ue_msgs/msg/detail/hit_result__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 ue_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_serialize( + const ue_msgs::msg::HitResult & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + ue_msgs::msg::HitResult & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +get_serialized_size( + const ue_msgs::msg::HitResult & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +max_serialized_size_HitResult( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace ue_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, ue_msgs, msg, HitResult)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..05ed51460 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__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 "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitResult)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..9c3b21c33 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__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, ue_msgs, msg, HitResult)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.h new file mode 100644 index 000000000..5a50654f8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.h @@ -0,0 +1,79 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'component_name' +// Member 'actor_name' +// Member 'bone_name' +// Member 'my_bone_name' +// Member 'physics_material_name' +#include "rosidl_runtime_c/string.h" +// Member 'impact_normal' +// Member 'normal' +#include "geometry_msgs/msg/detail/vector3__struct.h" +// Member 'impact_point' +// Member 'location' +// Member 'trace_start' +// Member 'trace_end' +#include "geometry_msgs/msg/detail/point__struct.h" + +/// Struct defined in msg/HitResult in the package ue_msgs. +/** + * HitResult from UnrealEngine + * ref https://docs.unrealengine.com/5.1/en-US/API/Runtime/Engine/Engine/FHitResult/ + */ +typedef struct ue_msgs__msg__HitResult +{ + bool blocking_hit; + bool start_penetrating; + rosidl_runtime_c__String component_name; + rosidl_runtime_c__String actor_name; + float distance; + uint8_t element_index; + int32_t face_index; + rosidl_runtime_c__String bone_name; + int32_t item; + rosidl_runtime_c__String my_bone_name; + int32_t my_item; + float penetration_depth; + rosidl_runtime_c__String physics_material_name; + float time; + geometry_msgs__msg__Vector3 impact_normal; + geometry_msgs__msg__Point impact_point; + geometry_msgs__msg__Vector3 normal; + geometry_msgs__msg__Point location; + geometry_msgs__msg__Point trace_start; + geometry_msgs__msg__Point trace_end; +} ue_msgs__msg__HitResult; + +// Struct for a sequence of ue_msgs__msg__HitResult. +typedef struct ue_msgs__msg__HitResult__Sequence +{ + ue_msgs__msg__HitResult * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__HitResult__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.hpp new file mode 100644 index 000000000..95c8d4cbe --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__struct.hpp @@ -0,0 +1,411 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'impact_normal' +// Member 'normal' +#include "geometry_msgs/msg/detail/vector3__struct.hpp" +// Member 'impact_point' +// Member 'location' +// Member 'trace_start' +// Member 'trace_end' +#include "geometry_msgs/msg/detail/point__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__ue_msgs__msg__HitResult __attribute__((deprecated)) +#else +# define DEPRECATED__ue_msgs__msg__HitResult __declspec(deprecated) +#endif + +namespace ue_msgs +{ + +namespace msg +{ + +// message struct +template +struct HitResult_ +{ + using Type = HitResult_; + + explicit HitResult_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : impact_normal(_init), + impact_point(_init), + normal(_init), + location(_init), + trace_start(_init), + trace_end(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->blocking_hit = false; + this->start_penetrating = false; + this->component_name = ""; + this->actor_name = ""; + this->distance = 0.0f; + this->element_index = 0; + this->face_index = 0l; + this->bone_name = ""; + this->item = 0l; + this->my_bone_name = ""; + this->my_item = 0l; + this->penetration_depth = 0.0f; + this->physics_material_name = ""; + this->time = 0.0f; + } + } + + explicit HitResult_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : component_name(_alloc), + actor_name(_alloc), + bone_name(_alloc), + my_bone_name(_alloc), + physics_material_name(_alloc), + impact_normal(_alloc, _init), + impact_point(_alloc, _init), + normal(_alloc, _init), + location(_alloc, _init), + trace_start(_alloc, _init), + trace_end(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->blocking_hit = false; + this->start_penetrating = false; + this->component_name = ""; + this->actor_name = ""; + this->distance = 0.0f; + this->element_index = 0; + this->face_index = 0l; + this->bone_name = ""; + this->item = 0l; + this->my_bone_name = ""; + this->my_item = 0l; + this->penetration_depth = 0.0f; + this->physics_material_name = ""; + this->time = 0.0f; + } + } + + // field types and members + using _blocking_hit_type = + bool; + _blocking_hit_type blocking_hit; + using _start_penetrating_type = + bool; + _start_penetrating_type start_penetrating; + using _component_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _component_name_type component_name; + using _actor_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _actor_name_type actor_name; + using _distance_type = + float; + _distance_type distance; + using _element_index_type = + uint8_t; + _element_index_type element_index; + using _face_index_type = + int32_t; + _face_index_type face_index; + using _bone_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _bone_name_type bone_name; + using _item_type = + int32_t; + _item_type item; + using _my_bone_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _my_bone_name_type my_bone_name; + using _my_item_type = + int32_t; + _my_item_type my_item; + using _penetration_depth_type = + float; + _penetration_depth_type penetration_depth; + using _physics_material_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _physics_material_name_type physics_material_name; + using _time_type = + float; + _time_type time; + using _impact_normal_type = + geometry_msgs::msg::Vector3_; + _impact_normal_type impact_normal; + using _impact_point_type = + geometry_msgs::msg::Point_; + _impact_point_type impact_point; + using _normal_type = + geometry_msgs::msg::Vector3_; + _normal_type normal; + using _location_type = + geometry_msgs::msg::Point_; + _location_type location; + using _trace_start_type = + geometry_msgs::msg::Point_; + _trace_start_type trace_start; + using _trace_end_type = + geometry_msgs::msg::Point_; + _trace_end_type trace_end; + + // setters for named parameter idiom + Type & set__blocking_hit( + const bool & _arg) + { + this->blocking_hit = _arg; + return *this; + } + Type & set__start_penetrating( + const bool & _arg) + { + this->start_penetrating = _arg; + return *this; + } + Type & set__component_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->component_name = _arg; + return *this; + } + Type & set__actor_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->actor_name = _arg; + return *this; + } + Type & set__distance( + const float & _arg) + { + this->distance = _arg; + return *this; + } + Type & set__element_index( + const uint8_t & _arg) + { + this->element_index = _arg; + return *this; + } + Type & set__face_index( + const int32_t & _arg) + { + this->face_index = _arg; + return *this; + } + Type & set__bone_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->bone_name = _arg; + return *this; + } + Type & set__item( + const int32_t & _arg) + { + this->item = _arg; + return *this; + } + Type & set__my_bone_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->my_bone_name = _arg; + return *this; + } + Type & set__my_item( + const int32_t & _arg) + { + this->my_item = _arg; + return *this; + } + Type & set__penetration_depth( + const float & _arg) + { + this->penetration_depth = _arg; + return *this; + } + Type & set__physics_material_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->physics_material_name = _arg; + return *this; + } + Type & set__time( + const float & _arg) + { + this->time = _arg; + return *this; + } + Type & set__impact_normal( + const geometry_msgs::msg::Vector3_ & _arg) + { + this->impact_normal = _arg; + return *this; + } + Type & set__impact_point( + const geometry_msgs::msg::Point_ & _arg) + { + this->impact_point = _arg; + return *this; + } + Type & set__normal( + const geometry_msgs::msg::Vector3_ & _arg) + { + this->normal = _arg; + return *this; + } + Type & set__location( + const geometry_msgs::msg::Point_ & _arg) + { + this->location = _arg; + return *this; + } + Type & set__trace_start( + const geometry_msgs::msg::Point_ & _arg) + { + this->trace_start = _arg; + return *this; + } + Type & set__trace_end( + const geometry_msgs::msg::Point_ & _arg) + { + this->trace_end = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + ue_msgs::msg::HitResult_ *; + using ConstRawPtr = + const ue_msgs::msg::HitResult_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__ue_msgs__msg__HitResult + std::shared_ptr> + Ptr; + typedef DEPRECATED__ue_msgs__msg__HitResult + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const HitResult_ & other) const + { + if (this->blocking_hit != other.blocking_hit) { + return false; + } + if (this->start_penetrating != other.start_penetrating) { + return false; + } + if (this->component_name != other.component_name) { + return false; + } + if (this->actor_name != other.actor_name) { + return false; + } + if (this->distance != other.distance) { + return false; + } + if (this->element_index != other.element_index) { + return false; + } + if (this->face_index != other.face_index) { + return false; + } + if (this->bone_name != other.bone_name) { + return false; + } + if (this->item != other.item) { + return false; + } + if (this->my_bone_name != other.my_bone_name) { + return false; + } + if (this->my_item != other.my_item) { + return false; + } + if (this->penetration_depth != other.penetration_depth) { + return false; + } + if (this->physics_material_name != other.physics_material_name) { + return false; + } + if (this->time != other.time) { + return false; + } + if (this->impact_normal != other.impact_normal) { + return false; + } + if (this->impact_point != other.impact_point) { + return false; + } + if (this->normal != other.normal) { + return false; + } + if (this->location != other.location) { + return false; + } + if (this->trace_start != other.trace_start) { + return false; + } + if (this->trace_end != other.trace_end) { + return false; + } + return true; + } + bool operator!=(const HitResult_ & other) const + { + return !this->operator==(other); + } +}; // struct HitResult_ + +// alias to use template instance with default allocator +using HitResult = + ue_msgs::msg::HitResult_>; + +// constant definitions + +} // namespace msg + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__traits.hpp new file mode 100644 index 000000000..62898d55a --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__traits.hpp @@ -0,0 +1,436 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/hit_result__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'impact_normal' +// Member 'normal' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" +// Member 'impact_point' +// Member 'location' +// Member 'trace_start' +// Member 'trace_end' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const HitResult & msg, + std::ostream & out) +{ + out << "{"; + // member: blocking_hit + { + out << "blocking_hit: "; + rosidl_generator_traits::value_to_yaml(msg.blocking_hit, out); + out << ", "; + } + + // member: start_penetrating + { + out << "start_penetrating: "; + rosidl_generator_traits::value_to_yaml(msg.start_penetrating, out); + out << ", "; + } + + // member: component_name + { + out << "component_name: "; + rosidl_generator_traits::value_to_yaml(msg.component_name, out); + out << ", "; + } + + // member: actor_name + { + out << "actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.actor_name, out); + out << ", "; + } + + // member: distance + { + out << "distance: "; + rosidl_generator_traits::value_to_yaml(msg.distance, out); + out << ", "; + } + + // member: element_index + { + out << "element_index: "; + rosidl_generator_traits::value_to_yaml(msg.element_index, out); + out << ", "; + } + + // member: face_index + { + out << "face_index: "; + rosidl_generator_traits::value_to_yaml(msg.face_index, out); + out << ", "; + } + + // member: bone_name + { + out << "bone_name: "; + rosidl_generator_traits::value_to_yaml(msg.bone_name, out); + out << ", "; + } + + // member: item + { + out << "item: "; + rosidl_generator_traits::value_to_yaml(msg.item, out); + out << ", "; + } + + // member: my_bone_name + { + out << "my_bone_name: "; + rosidl_generator_traits::value_to_yaml(msg.my_bone_name, out); + out << ", "; + } + + // member: my_item + { + out << "my_item: "; + rosidl_generator_traits::value_to_yaml(msg.my_item, out); + out << ", "; + } + + // member: penetration_depth + { + out << "penetration_depth: "; + rosidl_generator_traits::value_to_yaml(msg.penetration_depth, out); + out << ", "; + } + + // member: physics_material_name + { + out << "physics_material_name: "; + rosidl_generator_traits::value_to_yaml(msg.physics_material_name, out); + out << ", "; + } + + // member: time + { + out << "time: "; + rosidl_generator_traits::value_to_yaml(msg.time, out); + out << ", "; + } + + // member: impact_normal + { + out << "impact_normal: "; + to_flow_style_yaml(msg.impact_normal, out); + out << ", "; + } + + // member: impact_point + { + out << "impact_point: "; + to_flow_style_yaml(msg.impact_point, out); + out << ", "; + } + + // member: normal + { + out << "normal: "; + to_flow_style_yaml(msg.normal, out); + out << ", "; + } + + // member: location + { + out << "location: "; + to_flow_style_yaml(msg.location, out); + out << ", "; + } + + // member: trace_start + { + out << "trace_start: "; + to_flow_style_yaml(msg.trace_start, out); + out << ", "; + } + + // member: trace_end + { + out << "trace_end: "; + to_flow_style_yaml(msg.trace_end, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const HitResult & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: blocking_hit + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "blocking_hit: "; + rosidl_generator_traits::value_to_yaml(msg.blocking_hit, out); + out << "\n"; + } + + // member: start_penetrating + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "start_penetrating: "; + rosidl_generator_traits::value_to_yaml(msg.start_penetrating, out); + out << "\n"; + } + + // member: component_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "component_name: "; + rosidl_generator_traits::value_to_yaml(msg.component_name, out); + out << "\n"; + } + + // member: actor_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.actor_name, out); + out << "\n"; + } + + // member: distance + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "distance: "; + rosidl_generator_traits::value_to_yaml(msg.distance, out); + out << "\n"; + } + + // member: element_index + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "element_index: "; + rosidl_generator_traits::value_to_yaml(msg.element_index, out); + out << "\n"; + } + + // member: face_index + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "face_index: "; + rosidl_generator_traits::value_to_yaml(msg.face_index, out); + out << "\n"; + } + + // member: bone_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "bone_name: "; + rosidl_generator_traits::value_to_yaml(msg.bone_name, out); + out << "\n"; + } + + // member: item + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "item: "; + rosidl_generator_traits::value_to_yaml(msg.item, out); + out << "\n"; + } + + // member: my_bone_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "my_bone_name: "; + rosidl_generator_traits::value_to_yaml(msg.my_bone_name, out); + out << "\n"; + } + + // member: my_item + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "my_item: "; + rosidl_generator_traits::value_to_yaml(msg.my_item, out); + out << "\n"; + } + + // member: penetration_depth + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "penetration_depth: "; + rosidl_generator_traits::value_to_yaml(msg.penetration_depth, out); + out << "\n"; + } + + // member: physics_material_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "physics_material_name: "; + rosidl_generator_traits::value_to_yaml(msg.physics_material_name, out); + out << "\n"; + } + + // member: time + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "time: "; + rosidl_generator_traits::value_to_yaml(msg.time, out); + out << "\n"; + } + + // member: impact_normal + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "impact_normal:\n"; + to_block_style_yaml(msg.impact_normal, out, indentation + 2); + } + + // member: impact_point + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "impact_point:\n"; + to_block_style_yaml(msg.impact_point, out, indentation + 2); + } + + // member: normal + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "normal:\n"; + to_block_style_yaml(msg.normal, out, indentation + 2); + } + + // member: location + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "location:\n"; + to_block_style_yaml(msg.location, out, indentation + 2); + } + + // member: trace_start + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "trace_start:\n"; + to_block_style_yaml(msg.trace_start, out, indentation + 2); + } + + // member: trace_end + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "trace_end:\n"; + to_block_style_yaml(msg.trace_end, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const HitResult & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::HitResult & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::HitResult & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::HitResult"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/HitResult"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.c new file mode 100644 index 000000000..103e6004e --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.c @@ -0,0 +1,442 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/hit_result__functions.h" +#include "ue_msgs/msg/detail/hit_result__struct.h" + + +// Include directives for member types +// Member `component_name` +// Member `actor_name` +// Member `bone_name` +// Member `my_bone_name` +// Member `physics_material_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `impact_normal` +// Member `normal` +#include "geometry_msgs/msg/vector3.h" +// Member `impact_normal` +// Member `normal` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" +// Member `impact_point` +// Member `location` +// Member `trace_start` +// Member `trace_end` +#include "geometry_msgs/msg/point.h" +// Member `impact_point` +// Member `location` +// Member `trace_start` +// Member `trace_end` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_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; + ue_msgs__msg__HitResult__init(message_memory); +} + +void ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_fini_function(void * message_memory) +{ + ue_msgs__msg__HitResult__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[20] = { + { + "blocking_hit", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, blocking_hit), // 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 + }, + { + "start_penetrating", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, start_penetrating), // 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 + }, + { + "component_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, component_name), // 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 + }, + { + "actor_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, actor_name), // 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 + }, + { + "distance", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, distance), // 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 + }, + { + "element_index", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, element_index), // 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 + }, + { + "face_index", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, face_index), // 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 + }, + { + "bone_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, bone_name), // 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 + }, + { + "item", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, item), // 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 + }, + { + "my_bone_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, my_bone_name), // 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 + }, + { + "my_item", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, my_item), // 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 + }, + { + "penetration_depth", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, penetration_depth), // 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 + }, + { + "physics_material_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, physics_material_name), // 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 + }, + { + "time", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__HitResult, time), // 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 + }, + { + "impact_normal", // 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(ue_msgs__msg__HitResult, impact_normal), // 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 + }, + { + "impact_point", // 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(ue_msgs__msg__HitResult, impact_point), // 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 + }, + { + "normal", // 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(ue_msgs__msg__HitResult, normal), // 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 + }, + { + "location", // 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(ue_msgs__msg__HitResult, location), // 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 + }, + { + "trace_start", // 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(ue_msgs__msg__HitResult, trace_start), // 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 + }, + { + "trace_end", // 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(ue_msgs__msg__HitResult, trace_end), // 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 ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_members = { + "ue_msgs__msg", // message namespace + "HitResult", // message name + 20, // number of fields + sizeof(ue_msgs__msg__HitResult), + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array, // message members + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_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 ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_type_support_handle = { + 0, + &ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitResult)() { + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[14].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[15].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[16].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[17].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[18].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_member_array[19].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__HitResult__rosidl_typesupport_introspection_c__HitResult_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.cpp new file mode 100644 index 000000000..5d83ce3f8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.cpp @@ -0,0 +1,432 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from ue_msgs:msg/HitResult.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 "ue_msgs/msg/detail/hit_result__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 ue_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void HitResult_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) ue_msgs::msg::HitResult(_init); +} + +void HitResult_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~HitResult(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember HitResult_message_member_array[20] = { + { + "blocking_hit", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, blocking_hit), // 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 + }, + { + "start_penetrating", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, start_penetrating), // 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 + }, + { + "component_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, component_name), // 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 + }, + { + "actor_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, actor_name), // 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 + }, + { + "distance", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, distance), // 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 + }, + { + "element_index", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, element_index), // 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 + }, + { + "face_index", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, face_index), // 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 + }, + { + "bone_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, bone_name), // 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 + }, + { + "item", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, item), // 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 + }, + { + "my_bone_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, my_bone_name), // 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 + }, + { + "my_item", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, my_item), // 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 + }, + { + "penetration_depth", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, penetration_depth), // 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 + }, + { + "physics_material_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, physics_material_name), // 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 + }, + { + "time", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, time), // 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 + }, + { + "impact_normal", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, impact_normal), // 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 + }, + { + "impact_point", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, impact_point), // 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 + }, + { + "normal", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, normal), // 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 + }, + { + "location", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, location), // 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 + }, + { + "trace_start", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, trace_start), // 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 + }, + { + "trace_end", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::HitResult, trace_end), // 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 HitResult_message_members = { + "ue_msgs::msg", // message namespace + "HitResult", // message name + 20, // number of fields + sizeof(ue_msgs::msg::HitResult), + HitResult_message_member_array, // message members + HitResult_init_function, // function to initialize message memory (memory has to be allocated) + HitResult_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t HitResult_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &HitResult_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace ue_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::HitResult_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, ue_msgs, msg, HitResult)() { + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::HitResult_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.h new file mode 100644 index 000000000..f936aa8cf --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_H_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + ue_msgs, + msg, + HitResult +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.hpp new file mode 100644 index 000000000..6afedda94 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/hit_result__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + HitResult +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__HIT_RESULT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__builder.hpp new file mode 100644 index 000000000..9a7e0567d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__builder.hpp @@ -0,0 +1,152 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__BUILDER_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__BUILDER_HPP_ + +#include +#include + +#include "ue_msgs/msg/detail/overlap_event__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace ue_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_OverlapEvent_sweep_result +{ +public: + explicit Init_OverlapEvent_sweep_result(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + ::ue_msgs::msg::OverlapEvent sweep_result(::ue_msgs::msg::OverlapEvent::_sweep_result_type arg) + { + msg_.sweep_result = std::move(arg); + return std::move(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_from_sweep +{ +public: + explicit Init_OverlapEvent_from_sweep(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + Init_OverlapEvent_sweep_result from_sweep(::ue_msgs::msg::OverlapEvent::_from_sweep_type arg) + { + msg_.from_sweep = std::move(arg); + return Init_OverlapEvent_sweep_result(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_other_body_index +{ +public: + explicit Init_OverlapEvent_other_body_index(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + Init_OverlapEvent_from_sweep other_body_index(::ue_msgs::msg::OverlapEvent::_other_body_index_type arg) + { + msg_.other_body_index = std::move(arg); + return Init_OverlapEvent_from_sweep(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_other_component_name +{ +public: + explicit Init_OverlapEvent_other_component_name(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + Init_OverlapEvent_other_body_index other_component_name(::ue_msgs::msg::OverlapEvent::_other_component_name_type arg) + { + msg_.other_component_name = std::move(arg); + return Init_OverlapEvent_other_body_index(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_other_actor_name +{ +public: + explicit Init_OverlapEvent_other_actor_name(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + Init_OverlapEvent_other_component_name other_actor_name(::ue_msgs::msg::OverlapEvent::_other_actor_name_type arg) + { + msg_.other_actor_name = std::move(arg); + return Init_OverlapEvent_other_component_name(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_self_name +{ +public: + explicit Init_OverlapEvent_self_name(::ue_msgs::msg::OverlapEvent & msg) + : msg_(msg) + {} + Init_OverlapEvent_other_actor_name self_name(::ue_msgs::msg::OverlapEvent::_self_name_type arg) + { + msg_.self_name = std::move(arg); + return Init_OverlapEvent_other_actor_name(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +class Init_OverlapEvent_begin +{ +public: + Init_OverlapEvent_begin() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_OverlapEvent_self_name begin(::ue_msgs::msg::OverlapEvent::_begin_type arg) + { + msg_.begin = std::move(arg); + return Init_OverlapEvent_self_name(msg_); + } + +private: + ::ue_msgs::msg::OverlapEvent msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::ue_msgs::msg::OverlapEvent>() +{ + return ue_msgs::msg::builder::Init_OverlapEvent_begin(); +} + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.c new file mode 100644 index 000000000..787f5f6d7 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.c @@ -0,0 +1,336 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice +#include "ue_msgs/msg/detail/overlap_event__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `self_name` +// Member `other_actor_name` +// Member `other_component_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `sweep_result` +#include "ue_msgs/msg/detail/hit_result__functions.h" + +bool +ue_msgs__msg__OverlapEvent__init(ue_msgs__msg__OverlapEvent * msg) +{ + if (!msg) { + return false; + } + // begin + // self_name + if (!rosidl_runtime_c__String__init(&msg->self_name)) { + ue_msgs__msg__OverlapEvent__fini(msg); + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__init(&msg->other_actor_name)) { + ue_msgs__msg__OverlapEvent__fini(msg); + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__init(&msg->other_component_name)) { + ue_msgs__msg__OverlapEvent__fini(msg); + return false; + } + // other_body_index + // from_sweep + // sweep_result + if (!ue_msgs__msg__HitResult__init(&msg->sweep_result)) { + ue_msgs__msg__OverlapEvent__fini(msg); + return false; + } + return true; +} + +void +ue_msgs__msg__OverlapEvent__fini(ue_msgs__msg__OverlapEvent * msg) +{ + if (!msg) { + return; + } + // begin + // self_name + rosidl_runtime_c__String__fini(&msg->self_name); + // other_actor_name + rosidl_runtime_c__String__fini(&msg->other_actor_name); + // other_component_name + rosidl_runtime_c__String__fini(&msg->other_component_name); + // other_body_index + // from_sweep + // sweep_result + ue_msgs__msg__HitResult__fini(&msg->sweep_result); +} + +bool +ue_msgs__msg__OverlapEvent__are_equal(const ue_msgs__msg__OverlapEvent * lhs, const ue_msgs__msg__OverlapEvent * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // begin + if (lhs->begin != rhs->begin) { + return false; + } + // self_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->self_name), &(rhs->self_name))) + { + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->other_actor_name), &(rhs->other_actor_name))) + { + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__are_equal( + &(lhs->other_component_name), &(rhs->other_component_name))) + { + return false; + } + // other_body_index + if (lhs->other_body_index != rhs->other_body_index) { + return false; + } + // from_sweep + if (lhs->from_sweep != rhs->from_sweep) { + return false; + } + // sweep_result + if (!ue_msgs__msg__HitResult__are_equal( + &(lhs->sweep_result), &(rhs->sweep_result))) + { + return false; + } + return true; +} + +bool +ue_msgs__msg__OverlapEvent__copy( + const ue_msgs__msg__OverlapEvent * input, + ue_msgs__msg__OverlapEvent * output) +{ + if (!input || !output) { + return false; + } + // begin + output->begin = input->begin; + // self_name + if (!rosidl_runtime_c__String__copy( + &(input->self_name), &(output->self_name))) + { + return false; + } + // other_actor_name + if (!rosidl_runtime_c__String__copy( + &(input->other_actor_name), &(output->other_actor_name))) + { + return false; + } + // other_component_name + if (!rosidl_runtime_c__String__copy( + &(input->other_component_name), &(output->other_component_name))) + { + return false; + } + // other_body_index + output->other_body_index = input->other_body_index; + // from_sweep + output->from_sweep = input->from_sweep; + // sweep_result + if (!ue_msgs__msg__HitResult__copy( + &(input->sweep_result), &(output->sweep_result))) + { + return false; + } + return true; +} + +ue_msgs__msg__OverlapEvent * +ue_msgs__msg__OverlapEvent__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlapEvent * msg = (ue_msgs__msg__OverlapEvent *)allocator.allocate(sizeof(ue_msgs__msg__OverlapEvent), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(ue_msgs__msg__OverlapEvent)); + bool success = ue_msgs__msg__OverlapEvent__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +ue_msgs__msg__OverlapEvent__destroy(ue_msgs__msg__OverlapEvent * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + ue_msgs__msg__OverlapEvent__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +ue_msgs__msg__OverlapEvent__Sequence__init(ue_msgs__msg__OverlapEvent__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlapEvent * data = NULL; + + if (size) { + data = (ue_msgs__msg__OverlapEvent *)allocator.zero_allocate(size, sizeof(ue_msgs__msg__OverlapEvent), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = ue_msgs__msg__OverlapEvent__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + ue_msgs__msg__OverlapEvent__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +ue_msgs__msg__OverlapEvent__Sequence__fini(ue_msgs__msg__OverlapEvent__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) { + ue_msgs__msg__OverlapEvent__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); + } +} + +ue_msgs__msg__OverlapEvent__Sequence * +ue_msgs__msg__OverlapEvent__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlapEvent__Sequence * array = (ue_msgs__msg__OverlapEvent__Sequence *)allocator.allocate(sizeof(ue_msgs__msg__OverlapEvent__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = ue_msgs__msg__OverlapEvent__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +ue_msgs__msg__OverlapEvent__Sequence__destroy(ue_msgs__msg__OverlapEvent__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + ue_msgs__msg__OverlapEvent__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +ue_msgs__msg__OverlapEvent__Sequence__are_equal(const ue_msgs__msg__OverlapEvent__Sequence * lhs, const ue_msgs__msg__OverlapEvent__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!ue_msgs__msg__OverlapEvent__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +ue_msgs__msg__OverlapEvent__Sequence__copy( + const ue_msgs__msg__OverlapEvent__Sequence * input, + ue_msgs__msg__OverlapEvent__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(ue_msgs__msg__OverlapEvent); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlapEvent * data = + (ue_msgs__msg__OverlapEvent *)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 (!ue_msgs__msg__OverlapEvent__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; ) { + ue_msgs__msg__OverlapEvent__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!ue_msgs__msg__OverlapEvent__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.h new file mode 100644 index 000000000..e2d18d224 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__FUNCTIONS_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "ue_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "ue_msgs/msg/detail/overlap_event__struct.h" + +/// Initialize msg/OverlapEvent 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( + * ue_msgs__msg__OverlapEvent + * )) before or use + * ue_msgs__msg__OverlapEvent__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +bool +ue_msgs__msg__OverlapEvent__init(ue_msgs__msg__OverlapEvent * msg); + +/// Finalize msg/OverlapEvent message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlapEvent__fini(ue_msgs__msg__OverlapEvent * msg); + +/// Create msg/OverlapEvent message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * ue_msgs__msg__OverlapEvent__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +ue_msgs__msg__OverlapEvent * +ue_msgs__msg__OverlapEvent__create(); + +/// Destroy msg/OverlapEvent message. +/** + * It calls + * ue_msgs__msg__OverlapEvent__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlapEvent__destroy(ue_msgs__msg__OverlapEvent * msg); + +/// Check for msg/OverlapEvent 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_ue_msgs +bool +ue_msgs__msg__OverlapEvent__are_equal(const ue_msgs__msg__OverlapEvent * lhs, const ue_msgs__msg__OverlapEvent * rhs); + +/// Copy a msg/OverlapEvent 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_ue_msgs +bool +ue_msgs__msg__OverlapEvent__copy( + const ue_msgs__msg__OverlapEvent * input, + ue_msgs__msg__OverlapEvent * output); + +/// Initialize array of msg/OverlapEvent messages. +/** + * It allocates the memory for the number of elements and calls + * ue_msgs__msg__OverlapEvent__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_ue_msgs +bool +ue_msgs__msg__OverlapEvent__Sequence__init(ue_msgs__msg__OverlapEvent__Sequence * array, size_t size); + +/// Finalize array of msg/OverlapEvent messages. +/** + * It calls + * ue_msgs__msg__OverlapEvent__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_ue_msgs +void +ue_msgs__msg__OverlapEvent__Sequence__fini(ue_msgs__msg__OverlapEvent__Sequence * array); + +/// Create array of msg/OverlapEvent messages. +/** + * It allocates the memory for the array and calls + * ue_msgs__msg__OverlapEvent__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_ue_msgs +ue_msgs__msg__OverlapEvent__Sequence * +ue_msgs__msg__OverlapEvent__Sequence__create(size_t size); + +/// Destroy array of msg/OverlapEvent messages. +/** + * It calls + * ue_msgs__msg__OverlapEvent__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlapEvent__Sequence__destroy(ue_msgs__msg__OverlapEvent__Sequence * array); + +/// Check for msg/OverlapEvent 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_ue_msgs +bool +ue_msgs__msg__OverlapEvent__Sequence__are_equal(const ue_msgs__msg__OverlapEvent__Sequence * lhs, const ue_msgs__msg__OverlapEvent__Sequence * rhs); + +/// Copy an array of msg/OverlapEvent 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_ue_msgs +bool +ue_msgs__msg__OverlapEvent__Sequence__copy( + const ue_msgs__msg__OverlapEvent__Sequence * input, + ue_msgs__msg__OverlapEvent__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..4a221f70c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t get_serialized_size_ue_msgs__msg__OverlapEvent( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t max_serialized_size_ue_msgs__msg__OverlapEvent( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, ue_msgs, msg, OverlapEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..be56248f2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "ue_msgs/msg/detail/overlap_event__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 ue_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_serialize( + const ue_msgs::msg::OverlapEvent & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + ue_msgs::msg::OverlapEvent & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +get_serialized_size( + const ue_msgs::msg::OverlapEvent & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +max_serialized_size_OverlapEvent( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace ue_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, ue_msgs, msg, OverlapEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..892e8ae2f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__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 "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, OverlapEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..4dc47b614 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__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, ue_msgs, msg, OverlapEvent)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.h new file mode 100644 index 000000000..bcc59e326 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.h @@ -0,0 +1,67 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'self_name' +// Member 'other_actor_name' +// Member 'other_component_name' +#include "rosidl_runtime_c/string.h" +// Member 'sweep_result' +#include "ue_msgs/msg/detail/hit_result__struct.h" + +/// Struct defined in msg/OverlapEvent in the package ue_msgs. +/** + * Ref + * doc: https://docs.unrealengine.com/5.0/en-US/API/Runtime/Engine/Components/UPrimitiveComponent/OnComponentBeginOverlap/ + */ +typedef struct ue_msgs__msg__OverlapEvent +{ + /// DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_SixParams( FComponentBeginOverlapSignature, UPrimitiveComponent, OnComponentBeginOverlap, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex, bool, bFromSweep, const FHitResult &, SweepResult); + /// DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_FourParams( FComponentEndOverlapSignature, UPrimitiveComponent, OnComponentEndOverlap, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex); + /// DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FActorBeginOverlapSignature, AActor, OnActorBeginOverlap, AActor*, OverlappedActor, AActor*, OtherActor ); + /// DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_TwoParams( FActorEndOverlapSignature, AActor, OnActorEndOverlap, AActor*, OverlappedActor, AActor*, OtherActor ); + /// common + /// 0 for begin, 1 for end + bool begin; + /// actor or component name + rosidl_runtime_c__String self_name; + rosidl_runtime_c__String other_actor_name; + /// component event only + rosidl_runtime_c__String other_component_name; + int32_t other_body_index; + /// component begin event only + bool from_sweep; + ue_msgs__msg__HitResult sweep_result; +} ue_msgs__msg__OverlapEvent; + +// Struct for a sequence of ue_msgs__msg__OverlapEvent. +typedef struct ue_msgs__msg__OverlapEvent__Sequence +{ + ue_msgs__msg__OverlapEvent * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__OverlapEvent__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.hpp new file mode 100644 index 000000000..c55b47df1 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__struct.hpp @@ -0,0 +1,221 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'sweep_result' +#include "ue_msgs/msg/detail/hit_result__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__ue_msgs__msg__OverlapEvent __attribute__((deprecated)) +#else +# define DEPRECATED__ue_msgs__msg__OverlapEvent __declspec(deprecated) +#endif + +namespace ue_msgs +{ + +namespace msg +{ + +// message struct +template +struct OverlapEvent_ +{ + using Type = OverlapEvent_; + + explicit OverlapEvent_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : sweep_result(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->begin = false; + this->self_name = ""; + this->other_actor_name = ""; + this->other_component_name = ""; + this->other_body_index = 0l; + this->from_sweep = false; + } + } + + explicit OverlapEvent_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : self_name(_alloc), + other_actor_name(_alloc), + other_component_name(_alloc), + sweep_result(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->begin = false; + this->self_name = ""; + this->other_actor_name = ""; + this->other_component_name = ""; + this->other_body_index = 0l; + this->from_sweep = false; + } + } + + // field types and members + using _begin_type = + bool; + _begin_type begin; + using _self_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _self_name_type self_name; + using _other_actor_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _other_actor_name_type other_actor_name; + using _other_component_name_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _other_component_name_type other_component_name; + using _other_body_index_type = + int32_t; + _other_body_index_type other_body_index; + using _from_sweep_type = + bool; + _from_sweep_type from_sweep; + using _sweep_result_type = + ue_msgs::msg::HitResult_; + _sweep_result_type sweep_result; + + // setters for named parameter idiom + Type & set__begin( + const bool & _arg) + { + this->begin = _arg; + return *this; + } + Type & set__self_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->self_name = _arg; + return *this; + } + Type & set__other_actor_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->other_actor_name = _arg; + return *this; + } + Type & set__other_component_name( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->other_component_name = _arg; + return *this; + } + Type & set__other_body_index( + const int32_t & _arg) + { + this->other_body_index = _arg; + return *this; + } + Type & set__from_sweep( + const bool & _arg) + { + this->from_sweep = _arg; + return *this; + } + Type & set__sweep_result( + const ue_msgs::msg::HitResult_ & _arg) + { + this->sweep_result = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + ue_msgs::msg::OverlapEvent_ *; + using ConstRawPtr = + const ue_msgs::msg::OverlapEvent_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__ue_msgs__msg__OverlapEvent + std::shared_ptr> + Ptr; + typedef DEPRECATED__ue_msgs__msg__OverlapEvent + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const OverlapEvent_ & other) const + { + if (this->begin != other.begin) { + return false; + } + if (this->self_name != other.self_name) { + return false; + } + if (this->other_actor_name != other.other_actor_name) { + return false; + } + if (this->other_component_name != other.other_component_name) { + return false; + } + if (this->other_body_index != other.other_body_index) { + return false; + } + if (this->from_sweep != other.from_sweep) { + return false; + } + if (this->sweep_result != other.sweep_result) { + return false; + } + return true; + } + bool operator!=(const OverlapEvent_ & other) const + { + return !this->operator==(other); + } +}; // struct OverlapEvent_ + +// alias to use template instance with default allocator +using OverlapEvent = + ue_msgs::msg::OverlapEvent_>; + +// constant definitions + +} // namespace msg + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__traits.hpp new file mode 100644 index 000000000..04e9f9a50 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__traits.hpp @@ -0,0 +1,214 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/overlap_event__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'sweep_result' +#include "ue_msgs/msg/detail/hit_result__traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const OverlapEvent & msg, + std::ostream & out) +{ + out << "{"; + // member: begin + { + out << "begin: "; + rosidl_generator_traits::value_to_yaml(msg.begin, out); + out << ", "; + } + + // member: self_name + { + out << "self_name: "; + rosidl_generator_traits::value_to_yaml(msg.self_name, out); + out << ", "; + } + + // member: other_actor_name + { + out << "other_actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_actor_name, out); + out << ", "; + } + + // member: other_component_name + { + out << "other_component_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_component_name, out); + out << ", "; + } + + // member: other_body_index + { + out << "other_body_index: "; + rosidl_generator_traits::value_to_yaml(msg.other_body_index, out); + out << ", "; + } + + // member: from_sweep + { + out << "from_sweep: "; + rosidl_generator_traits::value_to_yaml(msg.from_sweep, out); + out << ", "; + } + + // member: sweep_result + { + out << "sweep_result: "; + to_flow_style_yaml(msg.sweep_result, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const OverlapEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: begin + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "begin: "; + rosidl_generator_traits::value_to_yaml(msg.begin, out); + out << "\n"; + } + + // member: self_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "self_name: "; + rosidl_generator_traits::value_to_yaml(msg.self_name, out); + out << "\n"; + } + + // member: other_actor_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "other_actor_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_actor_name, out); + out << "\n"; + } + + // member: other_component_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "other_component_name: "; + rosidl_generator_traits::value_to_yaml(msg.other_component_name, out); + out << "\n"; + } + + // member: other_body_index + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "other_body_index: "; + rosidl_generator_traits::value_to_yaml(msg.other_body_index, out); + out << "\n"; + } + + // member: from_sweep + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "from_sweep: "; + rosidl_generator_traits::value_to_yaml(msg.from_sweep, out); + out << "\n"; + } + + // member: sweep_result + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "sweep_result:\n"; + to_block_style_yaml(msg.sweep_result, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const OverlapEvent & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::OverlapEvent & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::OverlapEvent & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::OverlapEvent"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/OverlapEvent"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.c new file mode 100644 index 000000000..de12a1684 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.c @@ -0,0 +1,197 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/overlap_event__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/overlap_event__functions.h" +#include "ue_msgs/msg/detail/overlap_event__struct.h" + + +// Include directives for member types +// Member `self_name` +// Member `other_actor_name` +// Member `other_component_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `sweep_result` +#include "ue_msgs/msg/hit_result.h" +// Member `sweep_result` +#include "ue_msgs/msg/detail/hit_result__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_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; + ue_msgs__msg__OverlapEvent__init(message_memory); +} + +void ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_fini_function(void * message_memory) +{ + ue_msgs__msg__OverlapEvent__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_member_array[7] = { + { + "begin", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, begin), // 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 + }, + { + "self_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, self_name), // 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 + }, + { + "other_actor_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, other_actor_name), // 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 + }, + { + "other_component_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, other_component_name), // 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 + }, + { + "other_body_index", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, other_body_index), // 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 + }, + { + "from_sweep", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlapEvent, from_sweep), // 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 + }, + { + "sweep_result", // 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(ue_msgs__msg__OverlapEvent, sweep_result), // 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 ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_members = { + "ue_msgs__msg", // message namespace + "OverlapEvent", // message name + 7, // number of fields + sizeof(ue_msgs__msg__OverlapEvent), + ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_member_array, // message members + ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_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 ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_type_support_handle = { + 0, + &ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, OverlapEvent)() { + ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, HitResult)(); + if (!ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__OverlapEvent__rosidl_typesupport_introspection_c__OverlapEvent_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.cpp new file mode 100644 index 000000000..1f3143944 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.cpp @@ -0,0 +1,211 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from ue_msgs:msg/OverlapEvent.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 "ue_msgs/msg/detail/overlap_event__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 ue_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void OverlapEvent_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) ue_msgs::msg::OverlapEvent(_init); +} + +void OverlapEvent_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~OverlapEvent(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember OverlapEvent_message_member_array[7] = { + { + "begin", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, begin), // 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 + }, + { + "self_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, self_name), // 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 + }, + { + "other_actor_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, other_actor_name), // 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 + }, + { + "other_component_name", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, other_component_name), // 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 + }, + { + "other_body_index", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, other_body_index), // 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 + }, + { + "from_sweep", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, from_sweep), // 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 + }, + { + "sweep_result", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlapEvent, sweep_result), // 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 OverlapEvent_message_members = { + "ue_msgs::msg", // message namespace + "OverlapEvent", // message name + 7, // number of fields + sizeof(ue_msgs::msg::OverlapEvent), + OverlapEvent_message_member_array, // message members + OverlapEvent_init_function, // function to initialize message memory (memory has to be allocated) + OverlapEvent_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t OverlapEvent_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &OverlapEvent_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace ue_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::OverlapEvent_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, ue_msgs, msg, OverlapEvent)() { + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::OverlapEvent_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.h new file mode 100644 index 000000000..542fc4fdc --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + ue_msgs, + msg, + OverlapEvent +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.hpp new file mode 100644 index 000000000..ef94931a8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlap_event__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + OverlapEvent +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAP_EVENT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__builder.hpp new file mode 100644 index 000000000..b22907f8e --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__BUILDER_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__BUILDER_HPP_ + +#include +#include + +#include "ue_msgs/msg/detail/overlapping_objects__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace ue_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_OverlappingObjects_components +{ +public: + explicit Init_OverlappingObjects_components(::ue_msgs::msg::OverlappingObjects & msg) + : msg_(msg) + {} + ::ue_msgs::msg::OverlappingObjects components(::ue_msgs::msg::OverlappingObjects::_components_type arg) + { + msg_.components = std::move(arg); + return std::move(msg_); + } + +private: + ::ue_msgs::msg::OverlappingObjects msg_; +}; + +class Init_OverlappingObjects_actors +{ +public: + Init_OverlappingObjects_actors() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_OverlappingObjects_components actors(::ue_msgs::msg::OverlappingObjects::_actors_type arg) + { + msg_.actors = std::move(arg); + return Init_OverlappingObjects_components(msg_); + } + +private: + ::ue_msgs::msg::OverlappingObjects msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::ue_msgs::msg::OverlappingObjects>() +{ + return ue_msgs::msg::builder::Init_OverlappingObjects_actors(); +} + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.c new file mode 100644 index 000000000..9641d022d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.c @@ -0,0 +1,271 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice +#include "ue_msgs/msg/detail/overlapping_objects__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `actors` +// Member `components` +#include "rosidl_runtime_c/string_functions.h" + +bool +ue_msgs__msg__OverlappingObjects__init(ue_msgs__msg__OverlappingObjects * msg) +{ + if (!msg) { + return false; + } + // actors + if (!rosidl_runtime_c__String__Sequence__init(&msg->actors, 0)) { + ue_msgs__msg__OverlappingObjects__fini(msg); + return false; + } + // components + if (!rosidl_runtime_c__String__Sequence__init(&msg->components, 0)) { + ue_msgs__msg__OverlappingObjects__fini(msg); + return false; + } + return true; +} + +void +ue_msgs__msg__OverlappingObjects__fini(ue_msgs__msg__OverlappingObjects * msg) +{ + if (!msg) { + return; + } + // actors + rosidl_runtime_c__String__Sequence__fini(&msg->actors); + // components + rosidl_runtime_c__String__Sequence__fini(&msg->components); +} + +bool +ue_msgs__msg__OverlappingObjects__are_equal(const ue_msgs__msg__OverlappingObjects * lhs, const ue_msgs__msg__OverlappingObjects * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // actors + if (!rosidl_runtime_c__String__Sequence__are_equal( + &(lhs->actors), &(rhs->actors))) + { + return false; + } + // components + if (!rosidl_runtime_c__String__Sequence__are_equal( + &(lhs->components), &(rhs->components))) + { + return false; + } + return true; +} + +bool +ue_msgs__msg__OverlappingObjects__copy( + const ue_msgs__msg__OverlappingObjects * input, + ue_msgs__msg__OverlappingObjects * output) +{ + if (!input || !output) { + return false; + } + // actors + if (!rosidl_runtime_c__String__Sequence__copy( + &(input->actors), &(output->actors))) + { + return false; + } + // components + if (!rosidl_runtime_c__String__Sequence__copy( + &(input->components), &(output->components))) + { + return false; + } + return true; +} + +ue_msgs__msg__OverlappingObjects * +ue_msgs__msg__OverlappingObjects__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlappingObjects * msg = (ue_msgs__msg__OverlappingObjects *)allocator.allocate(sizeof(ue_msgs__msg__OverlappingObjects), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(ue_msgs__msg__OverlappingObjects)); + bool success = ue_msgs__msg__OverlappingObjects__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +ue_msgs__msg__OverlappingObjects__destroy(ue_msgs__msg__OverlappingObjects * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + ue_msgs__msg__OverlappingObjects__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +ue_msgs__msg__OverlappingObjects__Sequence__init(ue_msgs__msg__OverlappingObjects__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlappingObjects * data = NULL; + + if (size) { + data = (ue_msgs__msg__OverlappingObjects *)allocator.zero_allocate(size, sizeof(ue_msgs__msg__OverlappingObjects), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = ue_msgs__msg__OverlappingObjects__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + ue_msgs__msg__OverlappingObjects__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +ue_msgs__msg__OverlappingObjects__Sequence__fini(ue_msgs__msg__OverlappingObjects__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) { + ue_msgs__msg__OverlappingObjects__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); + } +} + +ue_msgs__msg__OverlappingObjects__Sequence * +ue_msgs__msg__OverlappingObjects__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlappingObjects__Sequence * array = (ue_msgs__msg__OverlappingObjects__Sequence *)allocator.allocate(sizeof(ue_msgs__msg__OverlappingObjects__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = ue_msgs__msg__OverlappingObjects__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +ue_msgs__msg__OverlappingObjects__Sequence__destroy(ue_msgs__msg__OverlappingObjects__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + ue_msgs__msg__OverlappingObjects__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +ue_msgs__msg__OverlappingObjects__Sequence__are_equal(const ue_msgs__msg__OverlappingObjects__Sequence * lhs, const ue_msgs__msg__OverlappingObjects__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!ue_msgs__msg__OverlappingObjects__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +ue_msgs__msg__OverlappingObjects__Sequence__copy( + const ue_msgs__msg__OverlappingObjects__Sequence * input, + ue_msgs__msg__OverlappingObjects__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(ue_msgs__msg__OverlappingObjects); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__OverlappingObjects * data = + (ue_msgs__msg__OverlappingObjects *)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 (!ue_msgs__msg__OverlappingObjects__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; ) { + ue_msgs__msg__OverlappingObjects__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!ue_msgs__msg__OverlappingObjects__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.h new file mode 100644 index 000000000..82a3b1b48 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__FUNCTIONS_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "ue_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "ue_msgs/msg/detail/overlapping_objects__struct.h" + +/// Initialize msg/OverlappingObjects 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( + * ue_msgs__msg__OverlappingObjects + * )) before or use + * ue_msgs__msg__OverlappingObjects__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__init(ue_msgs__msg__OverlappingObjects * msg); + +/// Finalize msg/OverlappingObjects message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlappingObjects__fini(ue_msgs__msg__OverlappingObjects * msg); + +/// Create msg/OverlappingObjects message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * ue_msgs__msg__OverlappingObjects__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +ue_msgs__msg__OverlappingObjects * +ue_msgs__msg__OverlappingObjects__create(); + +/// Destroy msg/OverlappingObjects message. +/** + * It calls + * ue_msgs__msg__OverlappingObjects__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlappingObjects__destroy(ue_msgs__msg__OverlappingObjects * msg); + +/// Check for msg/OverlappingObjects 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_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__are_equal(const ue_msgs__msg__OverlappingObjects * lhs, const ue_msgs__msg__OverlappingObjects * rhs); + +/// Copy a msg/OverlappingObjects 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_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__copy( + const ue_msgs__msg__OverlappingObjects * input, + ue_msgs__msg__OverlappingObjects * output); + +/// Initialize array of msg/OverlappingObjects messages. +/** + * It allocates the memory for the number of elements and calls + * ue_msgs__msg__OverlappingObjects__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_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__Sequence__init(ue_msgs__msg__OverlappingObjects__Sequence * array, size_t size); + +/// Finalize array of msg/OverlappingObjects messages. +/** + * It calls + * ue_msgs__msg__OverlappingObjects__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_ue_msgs +void +ue_msgs__msg__OverlappingObjects__Sequence__fini(ue_msgs__msg__OverlappingObjects__Sequence * array); + +/// Create array of msg/OverlappingObjects messages. +/** + * It allocates the memory for the array and calls + * ue_msgs__msg__OverlappingObjects__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_ue_msgs +ue_msgs__msg__OverlappingObjects__Sequence * +ue_msgs__msg__OverlappingObjects__Sequence__create(size_t size); + +/// Destroy array of msg/OverlappingObjects messages. +/** + * It calls + * ue_msgs__msg__OverlappingObjects__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__OverlappingObjects__Sequence__destroy(ue_msgs__msg__OverlappingObjects__Sequence * array); + +/// Check for msg/OverlappingObjects 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_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__Sequence__are_equal(const ue_msgs__msg__OverlappingObjects__Sequence * lhs, const ue_msgs__msg__OverlappingObjects__Sequence * rhs); + +/// Copy an array of msg/OverlappingObjects 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_ue_msgs +bool +ue_msgs__msg__OverlappingObjects__Sequence__copy( + const ue_msgs__msg__OverlappingObjects__Sequence * input, + ue_msgs__msg__OverlappingObjects__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..58091a876 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t get_serialized_size_ue_msgs__msg__OverlappingObjects( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t max_serialized_size_ue_msgs__msg__OverlappingObjects( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, ue_msgs, msg, OverlappingObjects)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..6fee24a2f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "ue_msgs/msg/detail/overlapping_objects__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 ue_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_serialize( + const ue_msgs::msg::OverlappingObjects & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + ue_msgs::msg::OverlappingObjects & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +get_serialized_size( + const ue_msgs::msg::OverlappingObjects & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +max_serialized_size_OverlappingObjects( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace ue_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, ue_msgs, msg, OverlappingObjects)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..5c84ec7e9 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__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 "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, OverlappingObjects)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..a9ec851a1 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__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, ue_msgs, msg, OverlappingObjects)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.h new file mode 100644 index 000000000..8ceaf73dd --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'actors' +// Member 'components' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/OverlappingObjects in the package ue_msgs. +typedef struct ue_msgs__msg__OverlappingObjects +{ + rosidl_runtime_c__String__Sequence actors; + rosidl_runtime_c__String__Sequence components; +} ue_msgs__msg__OverlappingObjects; + +// Struct for a sequence of ue_msgs__msg__OverlappingObjects. +typedef struct ue_msgs__msg__OverlappingObjects__Sequence +{ + ue_msgs__msg__OverlappingObjects * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__OverlappingObjects__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.hpp new file mode 100644 index 000000000..fd7af558c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__struct.hpp @@ -0,0 +1,135 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__ue_msgs__msg__OverlappingObjects __attribute__((deprecated)) +#else +# define DEPRECATED__ue_msgs__msg__OverlappingObjects __declspec(deprecated) +#endif + +namespace ue_msgs +{ + +namespace msg +{ + +// message struct +template +struct OverlappingObjects_ +{ + using Type = OverlappingObjects_; + + explicit OverlappingObjects_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + } + + explicit OverlappingObjects_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + (void)_alloc; + } + + // field types and members + using _actors_type = + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; + _actors_type actors; + using _components_type = + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; + _components_type components; + + // setters for named parameter idiom + Type & set__actors( + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) + { + this->actors = _arg; + return *this; + } + Type & set__components( + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) + { + this->components = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + ue_msgs::msg::OverlappingObjects_ *; + using ConstRawPtr = + const ue_msgs::msg::OverlappingObjects_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__ue_msgs__msg__OverlappingObjects + std::shared_ptr> + Ptr; + typedef DEPRECATED__ue_msgs__msg__OverlappingObjects + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const OverlappingObjects_ & other) const + { + if (this->actors != other.actors) { + return false; + } + if (this->components != other.components) { + return false; + } + return true; + } + bool operator!=(const OverlappingObjects_ & other) const + { + return !this->operator==(other); + } +}; // struct OverlappingObjects_ + +// alias to use template instance with default allocator +using OverlappingObjects = + ue_msgs::msg::OverlappingObjects_>; + +// constant definitions + +} // namespace msg + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__traits.hpp new file mode 100644 index 000000000..cd27492fc --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__traits.hpp @@ -0,0 +1,168 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/overlapping_objects__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const OverlappingObjects & msg, + std::ostream & out) +{ + out << "{"; + // member: actors + { + if (msg.actors.size() == 0) { + out << "actors: []"; + } else { + out << "actors: ["; + size_t pending_items = msg.actors.size(); + for (auto item : msg.actors) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: components + { + if (msg.components.size() == 0) { + out << "components: []"; + } else { + out << "components: ["; + size_t pending_items = msg.components.size(); + for (auto item : msg.components) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const OverlappingObjects & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: actors + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.actors.size() == 0) { + out << "actors: []\n"; + } else { + out << "actors:\n"; + for (auto item : msg.actors) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: components + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.components.size() == 0) { + out << "components: []\n"; + } else { + out << "components:\n"; + for (auto item : msg.components) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const OverlappingObjects & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::OverlappingObjects & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::OverlappingObjects & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::OverlappingObjects"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/OverlappingObjects"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.c new file mode 100644 index 000000000..199537175 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.c @@ -0,0 +1,215 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/overlapping_objects__functions.h" +#include "ue_msgs/msg/detail/overlapping_objects__struct.h" + + +// Include directives for member types +// Member `actors` +// Member `components` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_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; + ue_msgs__msg__OverlappingObjects__init(message_memory); +} + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_fini_function(void * message_memory) +{ + ue_msgs__msg__OverlappingObjects__fini(message_memory); +} + +size_t ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__size_function__OverlappingObjects__actors( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__actors( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__actors( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__fetch_function__OverlappingObjects__actors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__actors(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__assign_function__OverlappingObjects__actors( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__actors(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__resize_function__OverlappingObjects__actors( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__size_function__OverlappingObjects__components( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__components( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__components( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__fetch_function__OverlappingObjects__components( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__components(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__assign_function__OverlappingObjects__components( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__components(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__resize_function__OverlappingObjects__components( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_member_array[2] = { + { + "actors", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlappingObjects, actors), // bytes offset in struct + NULL, // default value + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__size_function__OverlappingObjects__actors, // size() function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__actors, // get_const(index) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__actors, // get(index) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__fetch_function__OverlappingObjects__actors, // fetch(index, &value) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__assign_function__OverlappingObjects__actors, // assign(index, value) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__resize_function__OverlappingObjects__actors // resize(index) function pointer + }, + { + "components", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__OverlappingObjects, components), // bytes offset in struct + NULL, // default value + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__size_function__OverlappingObjects__components, // size() function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_const_function__OverlappingObjects__components, // get_const(index) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__get_function__OverlappingObjects__components, // get(index) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__fetch_function__OverlappingObjects__components, // fetch(index, &value) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__assign_function__OverlappingObjects__components, // assign(index, value) function pointer + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__resize_function__OverlappingObjects__components // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_members = { + "ue_msgs__msg", // message namespace + "OverlappingObjects", // message name + 2, // number of fields + sizeof(ue_msgs__msg__OverlappingObjects), + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_member_array, // message members + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_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 ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_type_support_handle = { + 0, + &ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, OverlappingObjects)() { + if (!ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__OverlappingObjects__rosidl_typesupport_introspection_c__OverlappingObjects_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.cpp new file mode 100644 index 000000000..16b0f2db0 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.cpp @@ -0,0 +1,216 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from ue_msgs:msg/OverlappingObjects.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 "ue_msgs/msg/detail/overlapping_objects__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 ue_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void OverlappingObjects_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) ue_msgs::msg::OverlappingObjects(_init); +} + +void OverlappingObjects_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~OverlappingObjects(); +} + +size_t size_function__OverlappingObjects__actors(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__OverlappingObjects__actors(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__OverlappingObjects__actors(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__OverlappingObjects__actors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__OverlappingObjects__actors(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__OverlappingObjects__actors( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__OverlappingObjects__actors(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__OverlappingObjects__actors(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__OverlappingObjects__components(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__OverlappingObjects__components(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__OverlappingObjects__components(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__OverlappingObjects__components( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__OverlappingObjects__components(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__OverlappingObjects__components( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__OverlappingObjects__components(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__OverlappingObjects__components(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember OverlappingObjects_message_member_array[2] = { + { + "actors", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlappingObjects, actors), // bytes offset in struct + nullptr, // default value + size_function__OverlappingObjects__actors, // size() function pointer + get_const_function__OverlappingObjects__actors, // get_const(index) function pointer + get_function__OverlappingObjects__actors, // get(index) function pointer + fetch_function__OverlappingObjects__actors, // fetch(index, &value) function pointer + assign_function__OverlappingObjects__actors, // assign(index, value) function pointer + resize_function__OverlappingObjects__actors // resize(index) function pointer + }, + { + "components", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::OverlappingObjects, components), // bytes offset in struct + nullptr, // default value + size_function__OverlappingObjects__components, // size() function pointer + get_const_function__OverlappingObjects__components, // get_const(index) function pointer + get_function__OverlappingObjects__components, // get(index) function pointer + fetch_function__OverlappingObjects__components, // fetch(index, &value) function pointer + assign_function__OverlappingObjects__components, // assign(index, value) function pointer + resize_function__OverlappingObjects__components // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers OverlappingObjects_message_members = { + "ue_msgs::msg", // message namespace + "OverlappingObjects", // message name + 2, // number of fields + sizeof(ue_msgs::msg::OverlappingObjects), + OverlappingObjects_message_member_array, // message members + OverlappingObjects_init_function, // function to initialize message memory (memory has to be allocated) + OverlappingObjects_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t OverlappingObjects_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &OverlappingObjects_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace ue_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::OverlappingObjects_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, ue_msgs, msg, OverlappingObjects)() { + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::OverlappingObjects_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.h new file mode 100644 index 000000000..11b42b654 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + ue_msgs, + msg, + OverlappingObjects +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.hpp new file mode 100644 index 000000000..cd7101cc9 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlapping_objects__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + OverlappingObjects +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPPING_OBJECTS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__builder.hpp new file mode 100644 index 000000000..a4e429a4c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__BUILDER_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__BUILDER_HPP_ + +#include +#include + +#include "ue_msgs/msg/detail/overlaps__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace ue_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Overlaps_overlaps +{ +public: + explicit Init_Overlaps_overlaps(::ue_msgs::msg::Overlaps & msg) + : msg_(msg) + {} + ::ue_msgs::msg::Overlaps overlaps(::ue_msgs::msg::Overlaps::_overlaps_type arg) + { + msg_.overlaps = std::move(arg); + return std::move(msg_); + } + +private: + ::ue_msgs::msg::Overlaps msg_; +}; + +class Init_Overlaps_targets +{ +public: + Init_Overlaps_targets() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Overlaps_overlaps targets(::ue_msgs::msg::Overlaps::_targets_type arg) + { + msg_.targets = std::move(arg); + return Init_Overlaps_overlaps(msg_); + } + +private: + ::ue_msgs::msg::Overlaps msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::ue_msgs::msg::Overlaps>() +{ + return ue_msgs::msg::builder::Init_Overlaps_targets(); +} + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.c new file mode 100644 index 000000000..8e8333745 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice +#include "ue_msgs/msg/detail/overlaps__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `targets` +#include "rosidl_runtime_c/string_functions.h" +// Member `overlaps` +#include "ue_msgs/msg/detail/overlapping_objects__functions.h" + +bool +ue_msgs__msg__Overlaps__init(ue_msgs__msg__Overlaps * msg) +{ + if (!msg) { + return false; + } + // targets + if (!rosidl_runtime_c__String__Sequence__init(&msg->targets, 0)) { + ue_msgs__msg__Overlaps__fini(msg); + return false; + } + // overlaps + if (!ue_msgs__msg__OverlappingObjects__Sequence__init(&msg->overlaps, 0)) { + ue_msgs__msg__Overlaps__fini(msg); + return false; + } + return true; +} + +void +ue_msgs__msg__Overlaps__fini(ue_msgs__msg__Overlaps * msg) +{ + if (!msg) { + return; + } + // targets + rosidl_runtime_c__String__Sequence__fini(&msg->targets); + // overlaps + ue_msgs__msg__OverlappingObjects__Sequence__fini(&msg->overlaps); +} + +bool +ue_msgs__msg__Overlaps__are_equal(const ue_msgs__msg__Overlaps * lhs, const ue_msgs__msg__Overlaps * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // targets + if (!rosidl_runtime_c__String__Sequence__are_equal( + &(lhs->targets), &(rhs->targets))) + { + return false; + } + // overlaps + if (!ue_msgs__msg__OverlappingObjects__Sequence__are_equal( + &(lhs->overlaps), &(rhs->overlaps))) + { + return false; + } + return true; +} + +bool +ue_msgs__msg__Overlaps__copy( + const ue_msgs__msg__Overlaps * input, + ue_msgs__msg__Overlaps * output) +{ + if (!input || !output) { + return false; + } + // targets + if (!rosidl_runtime_c__String__Sequence__copy( + &(input->targets), &(output->targets))) + { + return false; + } + // overlaps + if (!ue_msgs__msg__OverlappingObjects__Sequence__copy( + &(input->overlaps), &(output->overlaps))) + { + return false; + } + return true; +} + +ue_msgs__msg__Overlaps * +ue_msgs__msg__Overlaps__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__Overlaps * msg = (ue_msgs__msg__Overlaps *)allocator.allocate(sizeof(ue_msgs__msg__Overlaps), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(ue_msgs__msg__Overlaps)); + bool success = ue_msgs__msg__Overlaps__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +ue_msgs__msg__Overlaps__destroy(ue_msgs__msg__Overlaps * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + ue_msgs__msg__Overlaps__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +ue_msgs__msg__Overlaps__Sequence__init(ue_msgs__msg__Overlaps__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__Overlaps * data = NULL; + + if (size) { + data = (ue_msgs__msg__Overlaps *)allocator.zero_allocate(size, sizeof(ue_msgs__msg__Overlaps), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = ue_msgs__msg__Overlaps__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + ue_msgs__msg__Overlaps__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +ue_msgs__msg__Overlaps__Sequence__fini(ue_msgs__msg__Overlaps__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) { + ue_msgs__msg__Overlaps__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); + } +} + +ue_msgs__msg__Overlaps__Sequence * +ue_msgs__msg__Overlaps__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__Overlaps__Sequence * array = (ue_msgs__msg__Overlaps__Sequence *)allocator.allocate(sizeof(ue_msgs__msg__Overlaps__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = ue_msgs__msg__Overlaps__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +ue_msgs__msg__Overlaps__Sequence__destroy(ue_msgs__msg__Overlaps__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + ue_msgs__msg__Overlaps__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +ue_msgs__msg__Overlaps__Sequence__are_equal(const ue_msgs__msg__Overlaps__Sequence * lhs, const ue_msgs__msg__Overlaps__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!ue_msgs__msg__Overlaps__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +ue_msgs__msg__Overlaps__Sequence__copy( + const ue_msgs__msg__Overlaps__Sequence * input, + ue_msgs__msg__Overlaps__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(ue_msgs__msg__Overlaps); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + ue_msgs__msg__Overlaps * data = + (ue_msgs__msg__Overlaps *)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 (!ue_msgs__msg__Overlaps__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; ) { + ue_msgs__msg__Overlaps__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!ue_msgs__msg__Overlaps__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.h new file mode 100644 index 000000000..d13855db2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__FUNCTIONS_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "ue_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "ue_msgs/msg/detail/overlaps__struct.h" + +/// Initialize msg/Overlaps 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( + * ue_msgs__msg__Overlaps + * )) before or use + * ue_msgs__msg__Overlaps__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +bool +ue_msgs__msg__Overlaps__init(ue_msgs__msg__Overlaps * msg); + +/// Finalize msg/Overlaps message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__Overlaps__fini(ue_msgs__msg__Overlaps * msg); + +/// Create msg/Overlaps message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * ue_msgs__msg__Overlaps__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +ue_msgs__msg__Overlaps * +ue_msgs__msg__Overlaps__create(); + +/// Destroy msg/Overlaps message. +/** + * It calls + * ue_msgs__msg__Overlaps__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__Overlaps__destroy(ue_msgs__msg__Overlaps * msg); + +/// Check for msg/Overlaps 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_ue_msgs +bool +ue_msgs__msg__Overlaps__are_equal(const ue_msgs__msg__Overlaps * lhs, const ue_msgs__msg__Overlaps * rhs); + +/// Copy a msg/Overlaps 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_ue_msgs +bool +ue_msgs__msg__Overlaps__copy( + const ue_msgs__msg__Overlaps * input, + ue_msgs__msg__Overlaps * output); + +/// Initialize array of msg/Overlaps messages. +/** + * It allocates the memory for the number of elements and calls + * ue_msgs__msg__Overlaps__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_ue_msgs +bool +ue_msgs__msg__Overlaps__Sequence__init(ue_msgs__msg__Overlaps__Sequence * array, size_t size); + +/// Finalize array of msg/Overlaps messages. +/** + * It calls + * ue_msgs__msg__Overlaps__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_ue_msgs +void +ue_msgs__msg__Overlaps__Sequence__fini(ue_msgs__msg__Overlaps__Sequence * array); + +/// Create array of msg/Overlaps messages. +/** + * It allocates the memory for the array and calls + * ue_msgs__msg__Overlaps__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_ue_msgs +ue_msgs__msg__Overlaps__Sequence * +ue_msgs__msg__Overlaps__Sequence__create(size_t size); + +/// Destroy array of msg/Overlaps messages. +/** + * It calls + * ue_msgs__msg__Overlaps__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_ue_msgs +void +ue_msgs__msg__Overlaps__Sequence__destroy(ue_msgs__msg__Overlaps__Sequence * array); + +/// Check for msg/Overlaps 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_ue_msgs +bool +ue_msgs__msg__Overlaps__Sequence__are_equal(const ue_msgs__msg__Overlaps__Sequence * lhs, const ue_msgs__msg__Overlaps__Sequence * rhs); + +/// Copy an array of msg/Overlaps 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_ue_msgs +bool +ue_msgs__msg__Overlaps__Sequence__copy( + const ue_msgs__msg__Overlaps__Sequence * input, + ue_msgs__msg__Overlaps__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..79a31b101 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t get_serialized_size_ue_msgs__msg__Overlaps( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +size_t max_serialized_size_ue_msgs__msg__Overlaps( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, ue_msgs, msg, Overlaps)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..58b2f808f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "ue_msgs/msg/detail/overlaps__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 ue_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_serialize( + const ue_msgs::msg::Overlaps & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + ue_msgs::msg::Overlaps & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +get_serialized_size( + const ue_msgs::msg::Overlaps & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +max_serialized_size_Overlaps( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace ue_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, ue_msgs, msg, Overlaps)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..38fc95300 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__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 "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, Overlaps)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..e387704c6 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__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, ue_msgs, msg, Overlaps)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.h new file mode 100644 index 000000000..e85b6b86c --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.h @@ -0,0 +1,47 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'targets' +#include "rosidl_runtime_c/string.h" +// Member 'overlaps' +#include "ue_msgs/msg/detail/overlapping_objects__struct.h" + +/// Struct defined in msg/Overlaps in the package ue_msgs. +typedef struct ue_msgs__msg__Overlaps +{ + rosidl_runtime_c__String__Sequence targets; + ue_msgs__msg__OverlappingObjects__Sequence overlaps; +} ue_msgs__msg__Overlaps; + +// Struct for a sequence of ue_msgs__msg__Overlaps. +typedef struct ue_msgs__msg__Overlaps__Sequence +{ + ue_msgs__msg__Overlaps * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} ue_msgs__msg__Overlaps__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.hpp new file mode 100644 index 000000000..0762799a6 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__struct.hpp @@ -0,0 +1,139 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'overlaps' +#include "ue_msgs/msg/detail/overlapping_objects__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__ue_msgs__msg__Overlaps __attribute__((deprecated)) +#else +# define DEPRECATED__ue_msgs__msg__Overlaps __declspec(deprecated) +#endif + +namespace ue_msgs +{ + +namespace msg +{ + +// message struct +template +struct Overlaps_ +{ + using Type = Overlaps_; + + explicit Overlaps_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + } + + explicit Overlaps_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_init; + (void)_alloc; + } + + // field types and members + using _targets_type = + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; + _targets_type targets; + using _overlaps_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _overlaps_type overlaps; + + // setters for named parameter idiom + Type & set__targets( + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) + { + this->targets = _arg; + return *this; + } + Type & set__overlaps( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->overlaps = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + ue_msgs::msg::Overlaps_ *; + using ConstRawPtr = + const ue_msgs::msg::Overlaps_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__ue_msgs__msg__Overlaps + std::shared_ptr> + Ptr; + typedef DEPRECATED__ue_msgs__msg__Overlaps + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Overlaps_ & other) const + { + if (this->targets != other.targets) { + return false; + } + if (this->overlaps != other.overlaps) { + return false; + } + return true; + } + bool operator!=(const Overlaps_ & other) const + { + return !this->operator==(other); + } +}; // struct Overlaps_ + +// alias to use template instance with default allocator +using Overlaps = + ue_msgs::msg::Overlaps_>; + +// constant definitions + +} // namespace msg + +} // namespace ue_msgs + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__traits.hpp new file mode 100644 index 000000000..5f0cc4581 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__traits.hpp @@ -0,0 +1,171 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__TRAITS_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/msg/detail/overlaps__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'overlaps' +#include "ue_msgs/msg/detail/overlapping_objects__traits.hpp" + +namespace ue_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Overlaps & msg, + std::ostream & out) +{ + out << "{"; + // member: targets + { + if (msg.targets.size() == 0) { + out << "targets: []"; + } else { + out << "targets: ["; + size_t pending_items = msg.targets.size(); + for (auto item : msg.targets) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: overlaps + { + if (msg.overlaps.size() == 0) { + out << "overlaps: []"; + } else { + out << "overlaps: ["; + size_t pending_items = msg.overlaps.size(); + for (auto item : msg.overlaps) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Overlaps & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: targets + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.targets.size() == 0) { + out << "targets: []\n"; + } else { + out << "targets:\n"; + for (auto item : msg.targets) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: overlaps + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.overlaps.size() == 0) { + out << "overlaps: []\n"; + } else { + out << "overlaps:\n"; + for (auto item : msg.overlaps) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Overlaps & 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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::msg::Overlaps & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::msg::Overlaps & msg) +{ + return ue_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::msg::Overlaps"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/msg/Overlaps"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.c new file mode 100644 index 000000000..309cc17a0 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.c @@ -0,0 +1,220 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/msg/detail/overlaps__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/msg/detail/overlaps__functions.h" +#include "ue_msgs/msg/detail/overlaps__struct.h" + + +// Include directives for member types +// Member `targets` +#include "rosidl_runtime_c/string_functions.h" +// Member `overlaps` +#include "ue_msgs/msg/overlapping_objects.h" +// Member `overlaps` +#include "ue_msgs/msg/detail/overlapping_objects__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_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; + ue_msgs__msg__Overlaps__init(message_memory); +} + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_fini_function(void * message_memory) +{ + ue_msgs__msg__Overlaps__fini(message_memory); +} + +size_t ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__size_function__Overlaps__targets( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__targets( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__targets( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__fetch_function__Overlaps__targets( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__targets(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__assign_function__Overlaps__targets( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__targets(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__resize_function__Overlaps__targets( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__size_function__Overlaps__overlaps( + const void * untyped_member) +{ + const ue_msgs__msg__OverlappingObjects__Sequence * member = + (const ue_msgs__msg__OverlappingObjects__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__overlaps( + const void * untyped_member, size_t index) +{ + const ue_msgs__msg__OverlappingObjects__Sequence * member = + (const ue_msgs__msg__OverlappingObjects__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__overlaps( + void * untyped_member, size_t index) +{ + ue_msgs__msg__OverlappingObjects__Sequence * member = + (ue_msgs__msg__OverlappingObjects__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__fetch_function__Overlaps__overlaps( + const void * untyped_member, size_t index, void * untyped_value) +{ + const ue_msgs__msg__OverlappingObjects * item = + ((const ue_msgs__msg__OverlappingObjects *) + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__overlaps(untyped_member, index)); + ue_msgs__msg__OverlappingObjects * value = + (ue_msgs__msg__OverlappingObjects *)(untyped_value); + *value = *item; +} + +void ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__assign_function__Overlaps__overlaps( + void * untyped_member, size_t index, const void * untyped_value) +{ + ue_msgs__msg__OverlappingObjects * item = + ((ue_msgs__msg__OverlappingObjects *) + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__overlaps(untyped_member, index)); + const ue_msgs__msg__OverlappingObjects * value = + (const ue_msgs__msg__OverlappingObjects *)(untyped_value); + *item = *value; +} + +bool ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__resize_function__Overlaps__overlaps( + void * untyped_member, size_t size) +{ + ue_msgs__msg__OverlappingObjects__Sequence * member = + (ue_msgs__msg__OverlappingObjects__Sequence *)(untyped_member); + ue_msgs__msg__OverlappingObjects__Sequence__fini(member); + return ue_msgs__msg__OverlappingObjects__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_member_array[2] = { + { + "targets", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__Overlaps, targets), // bytes offset in struct + NULL, // default value + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__size_function__Overlaps__targets, // size() function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__targets, // get_const(index) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__targets, // get(index) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__fetch_function__Overlaps__targets, // fetch(index, &value) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__assign_function__Overlaps__targets, // assign(index, value) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__resize_function__Overlaps__targets // resize(index) function pointer + }, + { + "overlaps", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__msg__Overlaps, overlaps), // bytes offset in struct + NULL, // default value + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__size_function__Overlaps__overlaps, // size() function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_const_function__Overlaps__overlaps, // get_const(index) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__get_function__Overlaps__overlaps, // get(index) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__fetch_function__Overlaps__overlaps, // fetch(index, &value) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__assign_function__Overlaps__overlaps, // assign(index, value) function pointer + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__resize_function__Overlaps__overlaps // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_members = { + "ue_msgs__msg", // message namespace + "Overlaps", // message name + 2, // number of fields + sizeof(ue_msgs__msg__Overlaps), + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_member_array, // message members + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_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 ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_type_support_handle = { + 0, + &ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, Overlaps)() { + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, OverlappingObjects)(); + if (!ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_type_support_handle.typesupport_identifier) { + ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__msg__Overlaps__rosidl_typesupport_introspection_c__Overlaps_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.cpp new file mode 100644 index 000000000..c33fb1bd2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.cpp @@ -0,0 +1,216 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from ue_msgs:msg/Overlaps.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 "ue_msgs/msg/detail/overlaps__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 ue_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Overlaps_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) ue_msgs::msg::Overlaps(_init); +} + +void Overlaps_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Overlaps(); +} + +size_t size_function__Overlaps__targets(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Overlaps__targets(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Overlaps__targets(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Overlaps__targets( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Overlaps__targets(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Overlaps__targets( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Overlaps__targets(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Overlaps__targets(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__Overlaps__overlaps(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Overlaps__overlaps(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Overlaps__overlaps(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Overlaps__overlaps( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Overlaps__overlaps(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Overlaps__overlaps( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Overlaps__overlaps(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Overlaps__overlaps(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Overlaps_message_member_array[2] = { + { + "targets", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::Overlaps, targets), // bytes offset in struct + nullptr, // default value + size_function__Overlaps__targets, // size() function pointer + get_const_function__Overlaps__targets, // get_const(index) function pointer + get_function__Overlaps__targets, // get(index) function pointer + fetch_function__Overlaps__targets, // fetch(index, &value) function pointer + assign_function__Overlaps__targets, // assign(index, value) function pointer + resize_function__Overlaps__targets // resize(index) function pointer + }, + { + "overlaps", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs::msg::Overlaps, overlaps), // bytes offset in struct + nullptr, // default value + size_function__Overlaps__overlaps, // size() function pointer + get_const_function__Overlaps__overlaps, // get_const(index) function pointer + get_function__Overlaps__overlaps, // get(index) function pointer + fetch_function__Overlaps__overlaps, // fetch(index, &value) function pointer + assign_function__Overlaps__overlaps, // assign(index, value) function pointer + resize_function__Overlaps__overlaps // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Overlaps_message_members = { + "ue_msgs::msg", // message namespace + "Overlaps", // message name + 2, // number of fields + sizeof(ue_msgs::msg::Overlaps), + Overlaps_message_member_array, // message members + Overlaps_init_function, // function to initialize message memory (memory has to be allocated) + Overlaps_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Overlaps_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Overlaps_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace ue_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::Overlaps_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, ue_msgs, msg, Overlaps)() { + return &::ue_msgs::msg::rosidl_typesupport_introspection_cpp::Overlaps_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.h new file mode 100644 index 000000000..6210376e4 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_H_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + ue_msgs, + msg, + Overlaps +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.hpp new file mode 100644 index 000000000..c263d7aea --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/detail/overlaps__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_HPP_ +#define UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + msg, + Overlaps +)(); +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__DETAIL__OVERLAPS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/entity_state.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/entity_state.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/entity_state.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/entity_state.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/entity_state.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/entity_state.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/msg/entity_state.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/entity_state.hpp index f82047509..9153766bd 100644 --- a/ThirdParty/ros/include/ue_msgs/msg/entity_state.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/entity_state.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/msg/detail/entity_state__struct.hpp" #include "ue_msgs/msg/detail/entity_state__builder.hpp" #include "ue_msgs/msg/detail/entity_state__traits.hpp" +#include "ue_msgs/msg/detail/entity_state__type_support.hpp" #endif // UE_MSGS__MSG__ENTITY_STATE_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.h new file mode 100644 index 000000000..989b2e3a3 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from ue_msgs:msg/HitEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__HIT_EVENT_H_ +#define UE_MSGS__MSG__HIT_EVENT_H_ + +#include "ue_msgs/msg/detail/hit_event__struct.h" +#include "ue_msgs/msg/detail/hit_event__functions.h" +#include "ue_msgs/msg/detail/hit_event__type_support.h" + +#endif // UE_MSGS__MSG__HIT_EVENT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.hpp new file mode 100644 index 000000000..33d4fc3e4 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_event.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__HIT_EVENT_HPP_ +#define UE_MSGS__MSG__HIT_EVENT_HPP_ + +#include "ue_msgs/msg/detail/hit_event__struct.hpp" +#include "ue_msgs/msg/detail/hit_event__builder.hpp" +#include "ue_msgs/msg/detail/hit_event__traits.hpp" +#include "ue_msgs/msg/detail/hit_event__type_support.hpp" + +#endif // UE_MSGS__MSG__HIT_EVENT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.h new file mode 100644 index 000000000..c4e64f75d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from ue_msgs:msg/HitResult.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__HIT_RESULT_H_ +#define UE_MSGS__MSG__HIT_RESULT_H_ + +#include "ue_msgs/msg/detail/hit_result__struct.h" +#include "ue_msgs/msg/detail/hit_result__functions.h" +#include "ue_msgs/msg/detail/hit_result__type_support.h" + +#endif // UE_MSGS__MSG__HIT_RESULT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.hpp new file mode 100644 index 000000000..aa2df33a8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/hit_result.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__HIT_RESULT_HPP_ +#define UE_MSGS__MSG__HIT_RESULT_HPP_ + +#include "ue_msgs/msg/detail/hit_result__struct.hpp" +#include "ue_msgs/msg/detail/hit_result__builder.hpp" +#include "ue_msgs/msg/detail/hit_result__traits.hpp" +#include "ue_msgs/msg/detail/hit_result__type_support.hpp" + +#endif // UE_MSGS__MSG__HIT_RESULT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.h new file mode 100644 index 000000000..4660fd26f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from ue_msgs:msg/OverlapEvent.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAP_EVENT_H_ +#define UE_MSGS__MSG__OVERLAP_EVENT_H_ + +#include "ue_msgs/msg/detail/overlap_event__struct.h" +#include "ue_msgs/msg/detail/overlap_event__functions.h" +#include "ue_msgs/msg/detail/overlap_event__type_support.h" + +#endif // UE_MSGS__MSG__OVERLAP_EVENT_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.hpp new file mode 100644 index 000000000..dab069cb8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlap_event.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAP_EVENT_HPP_ +#define UE_MSGS__MSG__OVERLAP_EVENT_HPP_ + +#include "ue_msgs/msg/detail/overlap_event__struct.hpp" +#include "ue_msgs/msg/detail/overlap_event__builder.hpp" +#include "ue_msgs/msg/detail/overlap_event__traits.hpp" +#include "ue_msgs/msg/detail/overlap_event__type_support.hpp" + +#endif // UE_MSGS__MSG__OVERLAP_EVENT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.h new file mode 100644 index 000000000..64a29d893 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from ue_msgs:msg/OverlappingObjects.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAPPING_OBJECTS_H_ +#define UE_MSGS__MSG__OVERLAPPING_OBJECTS_H_ + +#include "ue_msgs/msg/detail/overlapping_objects__struct.h" +#include "ue_msgs/msg/detail/overlapping_objects__functions.h" +#include "ue_msgs/msg/detail/overlapping_objects__type_support.h" + +#endif // UE_MSGS__MSG__OVERLAPPING_OBJECTS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.hpp new file mode 100644 index 000000000..79d411402 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlapping_objects.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAPPING_OBJECTS_HPP_ +#define UE_MSGS__MSG__OVERLAPPING_OBJECTS_HPP_ + +#include "ue_msgs/msg/detail/overlapping_objects__struct.hpp" +#include "ue_msgs/msg/detail/overlapping_objects__builder.hpp" +#include "ue_msgs/msg/detail/overlapping_objects__traits.hpp" +#include "ue_msgs/msg/detail/overlapping_objects__type_support.hpp" + +#endif // UE_MSGS__MSG__OVERLAPPING_OBJECTS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.h new file mode 100644 index 000000000..3e7089b3e --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from ue_msgs:msg/Overlaps.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAPS_H_ +#define UE_MSGS__MSG__OVERLAPS_H_ + +#include "ue_msgs/msg/detail/overlaps__struct.h" +#include "ue_msgs/msg/detail/overlaps__functions.h" +#include "ue_msgs/msg/detail/overlaps__type_support.h" + +#endif // UE_MSGS__MSG__OVERLAPS_H_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.hpp new file mode 100644 index 000000000..30b8e020d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/overlaps.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__MSG__OVERLAPS_HPP_ +#define UE_MSGS__MSG__OVERLAPS_HPP_ + +#include "ue_msgs/msg/detail/overlaps__struct.hpp" +#include "ue_msgs/msg/detail/overlaps__builder.hpp" +#include "ue_msgs/msg/detail/overlaps__traits.hpp" +#include "ue_msgs/msg/detail/overlaps__type_support.hpp" + +#endif // UE_MSGS__MSG__OVERLAPS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..c348a857f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 UE_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define UE_MSGS__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_ue_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_ue_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_ue_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_ue_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_ue_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_ue_msgs ROSIDL_GENERATOR_CPP_EXPORT_ue_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_ue_msgs ROSIDL_GENERATOR_CPP_IMPORT_ue_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_ue_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_ue_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_ue_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_ue_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UE_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/attach.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/attach.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/attach.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/attach.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/attach.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/attach.hpp similarity index 87% rename from ThirdParty/ros/include/ue_msgs/srv/attach.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/attach.hpp index d378576f1..8bc2ebf15 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/attach.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/attach.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/attach__struct.hpp" #include "ue_msgs/srv/detail/attach__builder.hpp" #include "ue_msgs/srv/detail/attach__traits.hpp" +#include "ue_msgs/srv/detail/attach__type_support.hpp" #endif // UE_MSGS__SRV__ATTACH_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/delete_entity.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/delete_entity.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/delete_entity.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/delete_entity.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/delete_entity.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/delete_entity.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/delete_entity.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/delete_entity.hpp index 58f6bd211..91b1b2d73 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/delete_entity.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/delete_entity.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/delete_entity__struct.hpp" #include "ue_msgs/srv/detail/delete_entity__builder.hpp" #include "ue_msgs/srv/detail/delete_entity__traits.hpp" +#include "ue_msgs/srv/detail/delete_entity__type_support.hpp" #endif // UE_MSGS__SRV__DELETE_ENTITY_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__builder.hpp index ffb084168..8e6f7cc5b 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__ATTACH__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__ATTACH__BUILDER_HPP_ -#include "ue_msgs/srv/detail/attach__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/attach__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__functions.c index 539ea0fc0..468fef4b4 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__functions.c @@ -235,22 +235,27 @@ ue_msgs__srv__Attach_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__Attach_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__Attach_Request * data = - (ue_msgs__srv__Attach_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__Attach_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 (!ue_msgs__srv__Attach_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__Attach_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; ) { - ue_msgs__srv__Attach_Request__fini(&data[i]); + ue_msgs__srv__Attach_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -455,22 +460,27 @@ ue_msgs__srv__Attach_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__Attach_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__Attach_Response * data = - (ue_msgs__srv__Attach_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__Attach_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 (!ue_msgs__srv__Attach_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__Attach_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; ) { - ue_msgs__srv__Attach_Response__fini(&data[i]); + ue_msgs__srv__Attach_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h index 9b47d6671..6081c1a28 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__Attach_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__Attach_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__Attach_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__Attach_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp index a7f2b0634..3796b2e30 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_Attach_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_Attach_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.h similarity index 92% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.h index e866bde78..144dd2b9d 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.h @@ -22,7 +22,7 @@ extern "C" // Member 'name2' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/Attach in the package ue_msgs. +/// Struct defined in srv/Attach in the package ue_msgs. typedef struct ue_msgs__srv__Attach_Request { rosidl_runtime_c__String name1; @@ -42,7 +42,7 @@ typedef struct ue_msgs__srv__Attach_Request__Sequence // Constants defined in the message -// Struct defined in srv/Attach in the package ue_msgs. +/// Struct defined in srv/Attach in the package ue_msgs. typedef struct ue_msgs__srv__Attach_Response { bool success; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.hpp similarity index 93% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.hpp index fde679f0a..91c8fc98b 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__ATTACH__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__ATTACH__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__Attach_Request __attribute__((deprecated)) @@ -56,21 +57,21 @@ struct Attach_Request_ // field types and members using _name1_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name1_type name1; using _name2_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name2_type name2; // setters for named parameter idiom Type & set__name1( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name1 = _arg; return *this; } Type & set__name2( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name2 = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__traits.hpp new file mode 100644 index 000000000..49be2df9a --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/Attach.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/attach__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Attach_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: name1 + { + out << "name1: "; + rosidl_generator_traits::value_to_yaml(msg.name1, out); + out << ", "; + } + + // member: name2 + { + out << "name2: "; + rosidl_generator_traits::value_to_yaml(msg.name2, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Attach_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name1 + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name1: "; + rosidl_generator_traits::value_to_yaml(msg.name1, out); + out << "\n"; + } + + // member: name2 + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name2: "; + rosidl_generator_traits::value_to_yaml(msg.name2, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Attach_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::Attach_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::Attach_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::Attach_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/Attach_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const Attach_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Attach_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Attach_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::Attach_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::Attach_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::Attach_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/Attach_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::Attach"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/Attach"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__ATTACH__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.c new file mode 100644 index 000000000..182912eeb --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.c @@ -0,0 +1,250 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/Attach.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/attach__functions.h" +#include "ue_msgs/srv/detail/attach__struct.h" + + +// Include directives for member types +// Member `name1` +// Member `name2` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_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; + ue_msgs__srv__Attach_Request__init(message_memory); +} + +void ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__Attach_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_member_array[2] = { + { + "name1", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__Attach_Request, name1), // 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 + }, + { + "name2", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__Attach_Request, name2), // 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 ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_members = { + "ue_msgs__srv", // message namespace + "Attach_Request", // message name + 2, // number of fields + sizeof(ue_msgs__srv__Attach_Request), + ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_member_array, // message members + ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_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 ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Request)() { + if (!ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__Attach_Request__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/attach__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/attach__functions.h" +// already included above +// #include "ue_msgs/srv/detail/attach__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_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; + ue_msgs__srv__Attach_Response__init(message_memory); +} + +void ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__Attach_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_member_array[1] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__Attach_Response, success), // 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 ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_members = { + "ue_msgs__srv", // message namespace + "Attach_Response", // message name + 1, // number of fields + sizeof(ue_msgs__srv__Attach_Response), + ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_member_array, // message members + ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_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 ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Response)() { + if (!ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__Attach_Response__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/attach__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 ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_members = { + "ue_msgs__srv", // service namespace + "Attach", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_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, ue_msgs, srv, Attach_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, Attach)() { + if (!ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_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, ue_msgs, srv, Attach_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, ue_msgs, srv, Attach_Response)()->data; + } + + return &ue_msgs__srv__detail__attach__rosidl_typesupport_introspection_c__Attach_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.cpp index e12810cf5..0aaa99e48 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Attach_Reques 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Attach_Reques 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 } }; @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember Attach_Respon 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/attach__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.hpp new file mode 100644 index 000000000..6fb1ef5db --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/attach__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/Attach.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__ATTACH__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__ATTACH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + Attach +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + Attach_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + Attach_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__ATTACH__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__builder.hpp index 46aacf575..c0286ca34 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__DELETE_ENTITY__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__DELETE_ENTITY__BUILDER_HPP_ -#include "ue_msgs/srv/detail/delete_entity__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/delete_entity__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__functions.c index 332a24f6d..80d41c0ba 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__functions.c @@ -215,22 +215,27 @@ ue_msgs__srv__DeleteEntity_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__DeleteEntity_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__DeleteEntity_Request * data = - (ue_msgs__srv__DeleteEntity_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__DeleteEntity_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 (!ue_msgs__srv__DeleteEntity_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__DeleteEntity_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; ) { - ue_msgs__srv__DeleteEntity_Request__fini(&data[i]); + ue_msgs__srv__DeleteEntity_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -459,22 +464,27 @@ ue_msgs__srv__DeleteEntity_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__DeleteEntity_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__DeleteEntity_Response * data = - (ue_msgs__srv__DeleteEntity_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__DeleteEntity_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 (!ue_msgs__srv__DeleteEntity_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__DeleteEntity_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; ) { - ue_msgs__srv__DeleteEntity_Response__fini(&data[i]); + ue_msgs__srv__DeleteEntity_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h index d3b785806..fa4af7601 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__DeleteEntity_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__DeleteEntity_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__DeleteEntity_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__DeleteEntity_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp index f72a20882..25746971c 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_DeleteEntity_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_DeleteEntity_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.h similarity index 88% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.h index ac6fa1176..66f934925 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.h @@ -21,9 +21,10 @@ extern "C" // Member 'name' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/DeleteEntity in the package ue_msgs. +/// Struct defined in srv/DeleteEntity in the package ue_msgs. typedef struct ue_msgs__srv__DeleteEntity_Request { + /// Entity name. rosidl_runtime_c__String name; } ue_msgs__srv__DeleteEntity_Request; @@ -45,10 +46,12 @@ typedef struct ue_msgs__srv__DeleteEntity_Request__Sequence // already included above // #include "rosidl_runtime_c/string.h" -// Struct defined in srv/DeleteEntity in the package ue_msgs. +/// Struct defined in srv/DeleteEntity in the package ue_msgs. typedef struct ue_msgs__srv__DeleteEntity_Response { + /// Return true if spawned successfully. bool success; + /// Comments if available. rosidl_runtime_c__String status_message; } ue_msgs__srv__DeleteEntity_Response; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.hpp similarity index 93% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.hpp index a63725a4a..85d67deac 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__DELETE_ENTITY__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__DELETE_ENTITY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__DeleteEntity_Request __attribute__((deprecated)) @@ -53,12 +54,12 @@ struct DeleteEntity_Request_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; @@ -172,7 +173,7 @@ struct DeleteEntity_Response_ bool; _success_type success; using _status_message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _status_message_type status_message; // setters for named parameter idiom @@ -183,7 +184,7 @@ struct DeleteEntity_Response_ return *this; } Type & set__status_message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->status_message = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__traits.hpp new file mode 100644 index 000000000..b2210f0f4 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/DeleteEntity.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/delete_entity__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const DeleteEntity_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DeleteEntity_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DeleteEntity_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::DeleteEntity_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::DeleteEntity_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::DeleteEntity_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/DeleteEntity_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const DeleteEntity_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: status_message + { + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const DeleteEntity_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: status_message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const DeleteEntity_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::DeleteEntity_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::DeleteEntity_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::DeleteEntity_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/DeleteEntity_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::DeleteEntity"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/DeleteEntity"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.c new file mode 100644 index 000000000..44d6fd3ba --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.c @@ -0,0 +1,254 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/DeleteEntity.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/delete_entity__functions.h" +#include "ue_msgs/srv/detail/delete_entity__struct.h" + + +// Include directives for member types +// Member `name` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_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; + ue_msgs__srv__DeleteEntity_Request__init(message_memory); +} + +void ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__DeleteEntity_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_member_array[1] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__DeleteEntity_Request, name), // 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 ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_members = { + "ue_msgs__srv", // message namespace + "DeleteEntity_Request", // message name + 1, // number of fields + sizeof(ue_msgs__srv__DeleteEntity_Request), + ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_member_array, // message members + ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_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 ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Request)() { + if (!ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__DeleteEntity_Request__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/delete_entity__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/delete_entity__functions.h" +// already included above +// #include "ue_msgs/srv/detail/delete_entity__struct.h" + + +// Include directives for member types +// Member `status_message` +// already included above +// #include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_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; + ue_msgs__srv__DeleteEntity_Response__init(message_memory); +} + +void ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__DeleteEntity_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__DeleteEntity_Response, success), // 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 + }, + { + "status_message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__DeleteEntity_Response, status_message), // 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 ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_members = { + "ue_msgs__srv", // message namespace + "DeleteEntity_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__DeleteEntity_Response), + ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_member_array, // message members + ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_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 ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Response)() { + if (!ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__DeleteEntity_Response__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/delete_entity__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 ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_members = { + "ue_msgs__srv", // service namespace + "DeleteEntity", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_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, ue_msgs, srv, DeleteEntity_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, DeleteEntity)() { + if (!ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_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, ue_msgs, srv, DeleteEntity_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, ue_msgs, srv, DeleteEntity_Response)()->data; + } + + return &ue_msgs__srv__detail__delete_entity__rosidl_typesupport_introspection_c__DeleteEntity_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.cpp index bb7a10672..a181f4eb4 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DeleteEntity_ 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DeleteEntity_ 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember DeleteEntity_ 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/delete_entity__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.hpp new file mode 100644 index 000000000..6278f897b --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/delete_entity__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/DeleteEntity.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + DeleteEntity +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + DeleteEntity_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + DeleteEntity_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__DELETE_ENTITY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__builder.hpp index dfa3e8357..c05882014 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__BUILDER_HPP_ -#include "ue_msgs/srv/detail/get_bool_from_id__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/get_bool_from_id__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__functions.c index 8a0a0f200..d27b6b0a8 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__functions.c @@ -200,22 +200,27 @@ ue_msgs__srv__GetBoolFromId_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetBoolFromId_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetBoolFromId_Request * data = - (ue_msgs__srv__GetBoolFromId_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetBoolFromId_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 (!ue_msgs__srv__GetBoolFromId_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetBoolFromId_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; ) { - ue_msgs__srv__GetBoolFromId_Request__fini(&data[i]); + ue_msgs__srv__GetBoolFromId_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -451,22 +456,27 @@ ue_msgs__srv__GetBoolFromId_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetBoolFromId_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetBoolFromId_Response * data = - (ue_msgs__srv__GetBoolFromId_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetBoolFromId_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 (!ue_msgs__srv__GetBoolFromId_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetBoolFromId_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; ) { - ue_msgs__srv__GetBoolFromId_Response__fini(&data[i]); + ue_msgs__srv__GetBoolFromId_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h index 2b4f04ef3..07267d766 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__GetBoolFromId_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetBoolFromId_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__GetBoolFromId_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetBoolFromId_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp index 78d985f6f..2af1f9103 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetBoolFromId_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetBoolFromId_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.h similarity index 92% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.h index 09e9f7553..e260563f5 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/GetBoolFromId in the package ue_msgs. +/// Struct defined in srv/GetBoolFromId in the package ue_msgs. typedef struct ue_msgs__srv__GetBoolFromId_Request { int32_t id; @@ -40,7 +40,7 @@ typedef struct ue_msgs__srv__GetBoolFromId_Request__Sequence // Member 'remarks' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/GetBoolFromId in the package ue_msgs. +/// Struct defined in srv/GetBoolFromId in the package ue_msgs. typedef struct ue_msgs__srv__GetBoolFromId_Response { bool success; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.hpp similarity index 96% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.hpp index 53c0ca466..e5b08127e 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__GetBoolFromId_Request __attribute__((deprecated)) @@ -174,7 +175,7 @@ struct GetBoolFromId_Response_ bool; _success_type success; using _remarks_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _remarks_type remarks; using _data_type = bool; @@ -188,7 +189,7 @@ struct GetBoolFromId_Response_ return *this; } Type & set__remarks( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->remarks = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__traits.hpp new file mode 100644 index 000000000..4a0822056 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__traits.hpp @@ -0,0 +1,290 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/GetBoolFromId.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/get_bool_from_id__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetBoolFromId_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetBoolFromId_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetBoolFromId_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetBoolFromId_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetBoolFromId_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetBoolFromId_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetBoolFromId_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetBoolFromId_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: remarks + { + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + out << ", "; + } + + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetBoolFromId_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: remarks + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetBoolFromId_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetBoolFromId_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetBoolFromId_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetBoolFromId_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetBoolFromId_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetBoolFromId"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetBoolFromId"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.c new file mode 100644 index 000000000..95927b08d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.c @@ -0,0 +1,266 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/GetBoolFromId.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/get_bool_from_id__functions.h" +#include "ue_msgs/srv/detail/get_bool_from_id__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_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; + ue_msgs__srv__GetBoolFromId_Request__init(message_memory); +} + +void ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__GetBoolFromId_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_member_array[1] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetBoolFromId_Request, id), // 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 ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_members = { + "ue_msgs__srv", // message namespace + "GetBoolFromId_Request", // message name + 1, // number of fields + sizeof(ue_msgs__srv__GetBoolFromId_Request), + ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_member_array, // message members + ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_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 ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Request)() { + if (!ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetBoolFromId_Request__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/get_bool_from_id__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/get_bool_from_id__functions.h" +// already included above +// #include "ue_msgs/srv/detail/get_bool_from_id__struct.h" + + +// Include directives for member types +// Member `remarks` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_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; + ue_msgs__srv__GetBoolFromId_Response__init(message_memory); +} + +void ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__GetBoolFromId_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_member_array[3] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetBoolFromId_Response, success), // 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 + }, + { + "remarks", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetBoolFromId_Response, remarks), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetBoolFromId_Response, data), // 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 ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_members = { + "ue_msgs__srv", // message namespace + "GetBoolFromId_Response", // message name + 3, // number of fields + sizeof(ue_msgs__srv__GetBoolFromId_Response), + ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_member_array, // message members + ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_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 ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Response)() { + if (!ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetBoolFromId_Response__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/get_bool_from_id__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 ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_members = { + "ue_msgs__srv", // service namespace + "GetBoolFromId", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetBoolFromId)() { + if (!ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_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, ue_msgs, srv, GetBoolFromId_Response)()->data; + } + + return &ue_msgs__srv__detail__get_bool_from_id__rosidl_typesupport_introspection_c__GetBoolFromId_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp index 192155c33..60aab61bc 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetBoolFromId 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetBoolFromId 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetBoolFromId 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 }, { @@ -198,6 +204,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetBoolFromId 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_bool_from_id__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.hpp new file mode 100644 index 000000000..06c9df8e1 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_bool_from_id__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/GetBoolFromId.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetBoolFromId +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetBoolFromId_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetBoolFromId_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__GET_BOOL_FROM_ID__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__builder.hpp index 53620c3e8..dd7ae0925 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__BUILDER_HPP_ -#include "ue_msgs/srv/detail/get_entity_state__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/get_entity_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__functions.c similarity index 91% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__functions.c index 314db4c6a..c3478d716 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__functions.c @@ -235,22 +235,27 @@ ue_msgs__srv__GetEntityState_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetEntityState_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetEntityState_Request * data = - (ue_msgs__srv__GetEntityState_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetEntityState_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 (!ue_msgs__srv__GetEntityState_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetEntityState_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; ) { - ue_msgs__srv__GetEntityState_Request__fini(&data[i]); + ue_msgs__srv__GetEntityState_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -478,22 +483,27 @@ ue_msgs__srv__GetEntityState_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetEntityState_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetEntityState_Response * data = - (ue_msgs__srv__GetEntityState_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetEntityState_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 (!ue_msgs__srv__GetEntityState_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetEntityState_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; ) { - ue_msgs__srv__GetEntityState_Response__fini(&data[i]); + ue_msgs__srv__GetEntityState_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h index 2be05c3b0..d4366376a 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__GetEntityState_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetEntityState_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__GetEntityState_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetEntityState_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp index c7f037fae..5cdf0868c 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetEntityState_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetEntityState_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.h similarity index 78% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.h index 54dd90979..7c4804f96 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.h @@ -22,10 +22,15 @@ extern "C" // Member 'reference_frame' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/GetEntityState in the package ue_msgs. +/// Struct defined in srv/GetEntityState in the package ue_msgs. typedef struct ue_msgs__srv__GetEntityState_Request { + /// Entity's scoped name. + /// An entity can be a model, link, collision, light, etc. + /// Be sure to use gazebo scoped naming notation (e.g.) rosidl_runtime_c__String name; + /// Return pose and twist relative to this entity. + /// Leaving empty or "world" will use inertial world frame. rosidl_runtime_c__String reference_frame; } ue_msgs__srv__GetEntityState_Request; @@ -46,10 +51,12 @@ typedef struct ue_msgs__srv__GetEntityState_Request__Sequence // Member 'state' #include "ue_msgs/msg/detail/entity_state__struct.h" -// Struct defined in srv/GetEntityState in the package ue_msgs. +/// Struct defined in srv/GetEntityState in the package ue_msgs. typedef struct ue_msgs__srv__GetEntityState_Response { + /// Contains pose and twist. ue_msgs__msg__EntityState state; + /// Return true if get was successful. If false, the state contains garbage. bool success; } ue_msgs__srv__GetEntityState_Response; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.hpp similarity index 94% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.hpp index 86f71d3e0..a82a11fc2 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__GetEntityState_Request __attribute__((deprecated)) @@ -56,21 +57,21 @@ struct GetEntityState_Request_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _reference_frame_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _reference_frame_type reference_frame; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; } Type & set__reference_frame( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->reference_frame = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__traits.hpp new file mode 100644 index 000000000..6b9f0f72d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__traits.hpp @@ -0,0 +1,293 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/GetEntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/get_entity_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetEntityState_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: reference_frame + { + out << "reference_frame: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetEntityState_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: reference_frame + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "reference_frame: "; + rosidl_generator_traits::value_to_yaml(msg.reference_frame, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetEntityState_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetEntityState_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetEntityState_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetEntityState_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetEntityState_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'state' +#include "ue_msgs/msg/detail/entity_state__traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetEntityState_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: state + { + out << "state: "; + to_flow_style_yaml(msg.state, out); + out << ", "; + } + + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetEntityState_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: state + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "state:\n"; + to_block_style_yaml(msg.state, out, indentation + 2); + } + + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetEntityState_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetEntityState_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetEntityState_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetEntityState_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetEntityState_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetEntityState"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetEntityState"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.c new file mode 100644 index 000000000..6e22f1ae7 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.c @@ -0,0 +1,275 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/GetEntityState.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/get_entity_state__functions.h" +#include "ue_msgs/srv/detail/get_entity_state__struct.h" + + +// Include directives for member types +// Member `name` +// Member `reference_frame` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_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; + ue_msgs__srv__GetEntityState_Request__init(message_memory); +} + +void ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__GetEntityState_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_member_array[2] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetEntityState_Request, name), // 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 + }, + { + "reference_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetEntityState_Request, reference_frame), // 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 ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_members = { + "ue_msgs__srv", // message namespace + "GetEntityState_Request", // message name + 2, // number of fields + sizeof(ue_msgs__srv__GetEntityState_Request), + ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_member_array, // message members + ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_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 ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Request)() { + if (!ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetEntityState_Request__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/get_entity_state__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/get_entity_state__functions.h" +// already included above +// #include "ue_msgs/srv/detail/get_entity_state__struct.h" + + +// Include directives for member types +// Member `state` +#include "ue_msgs/msg/entity_state.h" +// Member `state` +#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_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; + ue_msgs__srv__GetEntityState_Response__init(message_memory); +} + +void ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__GetEntityState_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array[2] = { + { + "state", // 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(ue_msgs__srv__GetEntityState_Response, state), // 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 + }, + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetEntityState_Response, success), // 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 ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_members = { + "ue_msgs__srv", // message namespace + "GetEntityState_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__GetEntityState_Response), + ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array, // message members + ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_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 ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Response)() { + ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); + if (!ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetEntityState_Response__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/get_entity_state__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 ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_members = { + "ue_msgs__srv", // service namespace + "GetEntityState", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_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, ue_msgs, srv, GetEntityState_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetEntityState)() { + if (!ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_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, ue_msgs, srv, GetEntityState_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, ue_msgs, srv, GetEntityState_Response)()->data; + } + + return &ue_msgs__srv__detail__get_entity_state__rosidl_typesupport_introspection_c__GetEntityState_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.cpp index b21a1468e..5fba15179 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetEntityStat 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetEntityStat 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 } }; @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetEntityStat 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 }, { @@ -198,6 +204,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetEntityStat 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_entity_state__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.hpp new file mode 100644 index 000000000..d3b4d8aca --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_entity_state__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/GetEntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetEntityState +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetEntityState_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetEntityState_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__GET_ENTITY_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__builder.hpp index 558153a52..64a59f0da 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__BUILDER_HPP_ -#include "ue_msgs/srv/detail/get_int32_from_id__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/get_int32_from_id__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__functions.c index a0579c444..440cb7338 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__functions.c @@ -200,22 +200,27 @@ ue_msgs__srv__GetInt32FromId_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetInt32FromId_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetInt32FromId_Request * data = - (ue_msgs__srv__GetInt32FromId_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetInt32FromId_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 (!ue_msgs__srv__GetInt32FromId_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetInt32FromId_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; ) { - ue_msgs__srv__GetInt32FromId_Request__fini(&data[i]); + ue_msgs__srv__GetInt32FromId_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -451,22 +456,27 @@ ue_msgs__srv__GetInt32FromId_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__GetInt32FromId_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__GetInt32FromId_Response * data = - (ue_msgs__srv__GetInt32FromId_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__GetInt32FromId_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 (!ue_msgs__srv__GetInt32FromId_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__GetInt32FromId_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; ) { - ue_msgs__srv__GetInt32FromId_Response__fini(&data[i]); + ue_msgs__srv__GetInt32FromId_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h index 24201e642..310d22ab9 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__GetInt32FromId_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetInt32FromId_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__GetInt32FromId_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__GetInt32FromId_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp index d21f34b26..b5e12670c 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetInt32FromId_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_GetInt32FromId_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.h similarity index 92% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.h index 93dbe1c4e..553916715 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/GetInt32FromId in the package ue_msgs. +/// Struct defined in srv/GetInt32FromId in the package ue_msgs. typedef struct ue_msgs__srv__GetInt32FromId_Request { int32_t id; @@ -40,7 +40,7 @@ typedef struct ue_msgs__srv__GetInt32FromId_Request__Sequence // Member 'remarks' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/GetInt32FromId in the package ue_msgs. +/// Struct defined in srv/GetInt32FromId in the package ue_msgs. typedef struct ue_msgs__srv__GetInt32FromId_Response { bool success; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.hpp similarity index 96% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.hpp index 62aa80dce..95fa2d5ee 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__GetInt32FromId_Request __attribute__((deprecated)) @@ -174,7 +175,7 @@ struct GetInt32FromId_Response_ bool; _success_type success; using _remarks_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _remarks_type remarks; using _data_type = int32_t; @@ -188,7 +189,7 @@ struct GetInt32FromId_Response_ return *this; } Type & set__remarks( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->remarks = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__traits.hpp new file mode 100644 index 000000000..482e7f40d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__traits.hpp @@ -0,0 +1,290 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/GetInt32FromId.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/get_int32_from_id__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetInt32FromId_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetInt32FromId_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetInt32FromId_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetInt32FromId_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetInt32FromId_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetInt32FromId_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetInt32FromId_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetInt32FromId_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: remarks + { + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + out << ", "; + } + + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetInt32FromId_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: remarks + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetInt32FromId_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::GetInt32FromId_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::GetInt32FromId_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetInt32FromId_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetInt32FromId_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::GetInt32FromId"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/GetInt32FromId"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.c new file mode 100644 index 000000000..a80efb8de --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.c @@ -0,0 +1,266 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/GetInt32FromId.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/get_int32_from_id__functions.h" +#include "ue_msgs/srv/detail/get_int32_from_id__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_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; + ue_msgs__srv__GetInt32FromId_Request__init(message_memory); +} + +void ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__GetInt32FromId_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_member_array[1] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetInt32FromId_Request, id), // 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 ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_members = { + "ue_msgs__srv", // message namespace + "GetInt32FromId_Request", // message name + 1, // number of fields + sizeof(ue_msgs__srv__GetInt32FromId_Request), + ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_member_array, // message members + ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_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 ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Request)() { + if (!ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetInt32FromId_Request__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/get_int32_from_id__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/get_int32_from_id__functions.h" +// already included above +// #include "ue_msgs/srv/detail/get_int32_from_id__struct.h" + + +// Include directives for member types +// Member `remarks` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_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; + ue_msgs__srv__GetInt32FromId_Response__init(message_memory); +} + +void ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__GetInt32FromId_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_member_array[3] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetInt32FromId_Response, success), // 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 + }, + { + "remarks", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetInt32FromId_Response, remarks), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__GetInt32FromId_Response, data), // 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 ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_members = { + "ue_msgs__srv", // message namespace + "GetInt32FromId_Response", // message name + 3, // number of fields + sizeof(ue_msgs__srv__GetInt32FromId_Response), + ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_member_array, // message members + ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_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 ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Response)() { + if (!ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__GetInt32FromId_Response__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/get_int32_from_id__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 ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_members = { + "ue_msgs__srv", // service namespace + "GetInt32FromId", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, GetInt32FromId)() { + if (!ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_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, ue_msgs, srv, GetInt32FromId_Response)()->data; + } + + return &ue_msgs__srv__detail__get_int32_from_id__rosidl_typesupport_introspection_c__GetInt32FromId_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp similarity index 96% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp index 0fa300ab3..5a5b855ed 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInt32FromI 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInt32FromI 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInt32FromI 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 }, { @@ -198,6 +204,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInt32FromI 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/get_int32_from_id__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.hpp new file mode 100644 index 000000000..b93bda373 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/get_int32_from_id__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/GetInt32FromId.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetInt32FromId +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetInt32FromId_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + GetInt32FromId_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__GET_INT32_FROM_ID__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__builder.hpp index d61f181fa..4f8332ba5 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__BUILDER_HPP_ -#include "ue_msgs/srv/detail/set_entity_state__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/set_entity_state__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__functions.c index 89f6fb831..f61e38af7 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__functions.c @@ -215,22 +215,27 @@ ue_msgs__srv__SetEntityState_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SetEntityState_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SetEntityState_Request * data = - (ue_msgs__srv__SetEntityState_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__SetEntityState_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 (!ue_msgs__srv__SetEntityState_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SetEntityState_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; ) { - ue_msgs__srv__SetEntityState_Request__fini(&data[i]); + ue_msgs__srv__SetEntityState_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -435,22 +440,27 @@ ue_msgs__srv__SetEntityState_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SetEntityState_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SetEntityState_Response * data = - (ue_msgs__srv__SetEntityState_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__SetEntityState_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 (!ue_msgs__srv__SetEntityState_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SetEntityState_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; ) { - ue_msgs__srv__SetEntityState_Response__fini(&data[i]); + ue_msgs__srv__SetEntityState_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h index 313abeda5..0036fd4f6 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__SetEntityState_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SetEntityState_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__SetEntityState_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SetEntityState_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp index 333fbd4ce..f79be71ce 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SetEntityState_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SetEntityState_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.h similarity index 85% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.h index dbde73943..019a15693 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.h @@ -21,9 +21,11 @@ extern "C" // Member 'state' #include "ue_msgs/msg/detail/entity_state__struct.h" -// Struct defined in srv/SetEntityState in the package ue_msgs. +/// Struct defined in srv/SetEntityState in the package ue_msgs. typedef struct ue_msgs__srv__SetEntityState_Request { + /// Entity state to set to. + /// Be sure to fill all fields, values of zero have meaning. ue_msgs__msg__EntityState state; } ue_msgs__srv__SetEntityState_Request; @@ -40,9 +42,10 @@ typedef struct ue_msgs__srv__SetEntityState_Request__Sequence // Constants defined in the message -// Struct defined in srv/SetEntityState in the package ue_msgs. +/// Struct defined in srv/SetEntityState in the package ue_msgs. typedef struct ue_msgs__srv__SetEntityState_Response { + /// Return true if setting state was successful. bool success; } ue_msgs__srv__SetEntityState_Response; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.hpp similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.hpp index 25677b75e..e2f2471c3 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'state' diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__traits.hpp new file mode 100644 index 000000000..0e2fa99db --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__traits.hpp @@ -0,0 +1,259 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/SetEntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/set_entity_state__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'state' +#include "ue_msgs/msg/detail/entity_state__traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetEntityState_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: state + { + out << "state: "; + to_flow_style_yaml(msg.state, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetEntityState_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: state + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "state:\n"; + to_block_style_yaml(msg.state, out, indentation + 2); + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetEntityState_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SetEntityState_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SetEntityState_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetEntityState_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetEntityState_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetEntityState_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetEntityState_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetEntityState_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SetEntityState_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SetEntityState_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetEntityState_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetEntityState_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetEntityState"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetEntityState"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.c new file mode 100644 index 000000000..ce3ee30b9 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.c @@ -0,0 +1,236 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/SetEntityState.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/set_entity_state__functions.h" +#include "ue_msgs/srv/detail/set_entity_state__struct.h" + + +// Include directives for member types +// Member `state` +#include "ue_msgs/msg/entity_state.h" +// Member `state` +#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_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; + ue_msgs__srv__SetEntityState_Request__init(message_memory); +} + +void ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__SetEntityState_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array[1] = { + { + "state", // 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(ue_msgs__srv__SetEntityState_Request, state), // 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 ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_members = { + "ue_msgs__srv", // message namespace + "SetEntityState_Request", // message name + 1, // number of fields + sizeof(ue_msgs__srv__SetEntityState_Request), + ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array, // message members + ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_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 ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Request)() { + ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); + if (!ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SetEntityState_Request__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/set_entity_state__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/set_entity_state__functions.h" +// already included above +// #include "ue_msgs/srv/detail/set_entity_state__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_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; + ue_msgs__srv__SetEntityState_Response__init(message_memory); +} + +void ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__SetEntityState_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_member_array[1] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SetEntityState_Response, success), // 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 ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_members = { + "ue_msgs__srv", // message namespace + "SetEntityState_Response", // message name + 1, // number of fields + sizeof(ue_msgs__srv__SetEntityState_Response), + ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_member_array, // message members + ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_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 ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Response)() { + if (!ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SetEntityState_Response__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/set_entity_state__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 ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_members = { + "ue_msgs__srv", // service namespace + "SetEntityState", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_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, ue_msgs, srv, SetEntityState_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetEntityState)() { + if (!ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_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, ue_msgs, srv, SetEntityState_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, ue_msgs, srv, SetEntityState_Response)()->data; + } + + return &ue_msgs__srv__detail__set_entity_state__rosidl_typesupport_introspection_c__SetEntityState_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.cpp similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.cpp index f2ddbd8d4..3a553b290 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetEntityStat 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetEntityStat 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_entity_state__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.hpp new file mode 100644 index 000000000..2e66540f2 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_entity_state__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/SetEntityState.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetEntityState +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetEntityState_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetEntityState_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__SET_ENTITY_STATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__builder.hpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__builder.hpp index b99bd21af..a6ae468eb 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__SET_INT32__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__SET_INT32__BUILDER_HPP_ -#include "ue_msgs/srv/detail/set_int32__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/set_int32__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__functions.c similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__functions.c index 1db614dbb..268758f96 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__functions.c @@ -200,22 +200,27 @@ ue_msgs__srv__SetInt32_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SetInt32_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SetInt32_Request * data = - (ue_msgs__srv__SetInt32_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__SetInt32_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 (!ue_msgs__srv__SetInt32_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SetInt32_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; ) { - ue_msgs__srv__SetInt32_Request__fini(&data[i]); + ue_msgs__srv__SetInt32_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -443,22 +448,27 @@ ue_msgs__srv__SetInt32_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SetInt32_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SetInt32_Response * data = - (ue_msgs__srv__SetInt32_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__SetInt32_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 (!ue_msgs__srv__SetInt32_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SetInt32_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; ) { - ue_msgs__srv__SetInt32_Response__fini(&data[i]); + ue_msgs__srv__SetInt32_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h index ae6fc2ddb..c628937e5 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__SetInt32_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SetInt32_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__SetInt32_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SetInt32_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp index d1102b4f6..1dc5713d9 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SetInt32_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SetInt32_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.h similarity index 92% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.h index da130a3c1..f3ab49fa6 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/SetInt32 in the package ue_msgs. +/// Struct defined in srv/SetInt32 in the package ue_msgs. typedef struct ue_msgs__srv__SetInt32_Request { int32_t data; @@ -40,7 +40,7 @@ typedef struct ue_msgs__srv__SetInt32_Request__Sequence // Member 'remarks' #include "rosidl_runtime_c/string.h" -// Struct defined in srv/SetInt32 in the package ue_msgs. +/// Struct defined in srv/SetInt32 in the package ue_msgs. typedef struct ue_msgs__srv__SetInt32_Response { bool success; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.hpp similarity index 95% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.hpp index e24723719..72ca7144a 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__SET_INT32__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__SET_INT32__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__ue_msgs__srv__SetInt32_Request __attribute__((deprecated)) @@ -172,7 +173,7 @@ struct SetInt32_Response_ bool; _success_type success; using _remarks_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _remarks_type remarks; // setters for named parameter idiom @@ -183,7 +184,7 @@ struct SetInt32_Response_ return *this; } Type & set__remarks( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->remarks = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__traits.hpp new file mode 100644 index 000000000..152f8a1cf --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__traits.hpp @@ -0,0 +1,273 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/SetInt32.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/set_int32__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetInt32_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: data + { + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetInt32_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "data: "; + rosidl_generator_traits::value_to_yaml(msg.data, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetInt32_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SetInt32_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SetInt32_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetInt32_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetInt32_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SetInt32_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: remarks + { + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SetInt32_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: remarks + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "remarks: "; + rosidl_generator_traits::value_to_yaml(msg.remarks, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SetInt32_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SetInt32_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SetInt32_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetInt32_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetInt32_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SetInt32"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SetInt32"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__SET_INT32__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.c new file mode 100644 index 000000000..0ecf7ba2d --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.c @@ -0,0 +1,249 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/SetInt32.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/set_int32__functions.h" +#include "ue_msgs/srv/detail/set_int32__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_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; + ue_msgs__srv__SetInt32_Request__init(message_memory); +} + +void ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__SetInt32_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_member_array[1] = { + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SetInt32_Request, data), // 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 ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_members = { + "ue_msgs__srv", // message namespace + "SetInt32_Request", // message name + 1, // number of fields + sizeof(ue_msgs__srv__SetInt32_Request), + ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_member_array, // message members + ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_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 ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Request)() { + if (!ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SetInt32_Request__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/set_int32__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/set_int32__functions.h" +// already included above +// #include "ue_msgs/srv/detail/set_int32__struct.h" + + +// Include directives for member types +// Member `remarks` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_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; + ue_msgs__srv__SetInt32_Response__init(message_memory); +} + +void ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__SetInt32_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SetInt32_Response, success), // 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 + }, + { + "remarks", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SetInt32_Response, remarks), // 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 ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_members = { + "ue_msgs__srv", // message namespace + "SetInt32_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__SetInt32_Response), + ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_member_array, // message members + ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_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 ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Response)() { + if (!ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SetInt32_Response__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/set_int32__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 ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_members = { + "ue_msgs__srv", // service namespace + "SetInt32", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_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, ue_msgs, srv, SetInt32_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SetInt32)() { + if (!ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_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, ue_msgs, srv, SetInt32_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, ue_msgs, srv, SetInt32_Response)()->data; + } + + return &ue_msgs__srv__detail__set_int32__rosidl_typesupport_introspection_c__SetInt32_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.cpp similarity index 97% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.cpp index 97e2cd08c..e4793cb4d 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetInt32_Requ 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 } }; @@ -168,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetInt32_Resp 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 }, { @@ -183,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SetInt32_Resp 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/set_int32__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.hpp new file mode 100644 index 000000000..4533c95d8 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/set_int32__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/SetInt32.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SET_INT32__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__SET_INT32__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetInt32 +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetInt32_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SetInt32_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__SET_INT32__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__builder.hpp similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__builder.hpp index cc66a8b92..ef208814f 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__BUILDER_HPP_ -#include "ue_msgs/srv/detail/spawn_entities__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/spawn_entities__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__functions.c similarity index 91% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__functions.c index 5e44c9f47..120f34c56 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__functions.c @@ -276,22 +276,27 @@ ue_msgs__srv__SpawnEntities_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnEntities_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnEntities_Request * data = - (ue_msgs__srv__SpawnEntities_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnEntities_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 (!ue_msgs__srv__SpawnEntities_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnEntities_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; ) { - ue_msgs__srv__SpawnEntities_Request__fini(&data[i]); + ue_msgs__srv__SpawnEntities_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -520,22 +525,27 @@ ue_msgs__srv__SpawnEntities_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnEntities_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnEntities_Response * data = - (ue_msgs__srv__SpawnEntities_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnEntities_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 (!ue_msgs__srv__SpawnEntities_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnEntities_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; ) { - ue_msgs__srv__SpawnEntities_Response__fini(&data[i]); + ue_msgs__srv__SpawnEntities_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h index 737a4876f..650c60175 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnEntities_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnEntities_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnEntities_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnEntities_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp index 2ae9131c3..151641698 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnEntities_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnEntities_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.h similarity index 85% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.h index 2b0898644..140075c14 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.h @@ -25,12 +25,16 @@ extern "C" // Member 'state' #include "ue_msgs/msg/detail/entity_state__struct.h" -// Struct defined in srv/SpawnEntities in the package ue_msgs. +/// Struct defined in srv/SpawnEntities in the package ue_msgs. typedef struct ue_msgs__srv__SpawnEntities_Request { + /// type for each entity rosidl_runtime_c__String__Sequence type; + /// pose, twist, name, reference_frame ue_msgs__msg__EntityState__Sequence state; + /// tags to use in UE rosidl_runtime_c__String__Sequence tags; + /// optional parameters, in json format rosidl_runtime_c__String__Sequence json_parameters; } ue_msgs__srv__SpawnEntities_Request; @@ -52,10 +56,12 @@ typedef struct ue_msgs__srv__SpawnEntities_Request__Sequence // already included above // #include "rosidl_runtime_c/string.h" -// Struct defined in srv/SpawnEntities in the package ue_msgs. +/// Struct defined in srv/SpawnEntities in the package ue_msgs. typedef struct ue_msgs__srv__SpawnEntities_Response { + /// Return true if spawned successfully. bool success; + /// Comments if available. rosidl_runtime_c__String status_message; } ue_msgs__srv__SpawnEntities_Response; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.hpp similarity index 79% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.hpp index 6f09bd03c..431c23fb9 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'state' @@ -49,39 +50,39 @@ struct SpawnEntities_Request_ // field types and members using _type_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _type_type type; using _state_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _state_type state; using _tags_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _tags_type tags; using _json_parameters_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _json_parameters_type json_parameters; // setters for named parameter idiom Type & set__type( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->type = _arg; return *this; } Type & set__state( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->state = _arg; return *this; } Type & set__tags( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->tags = _arg; return *this; } Type & set__json_parameters( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->json_parameters = _arg; return *this; @@ -204,7 +205,7 @@ struct SpawnEntities_Response_ bool; _success_type success; using _status_message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _status_message_type status_message; // setters for named parameter idiom @@ -215,7 +216,7 @@ struct SpawnEntities_Response_ return *this; } Type & set__status_message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->status_message = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__traits.hpp new file mode 100644 index 000000000..99e2f6d87 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__traits.hpp @@ -0,0 +1,411 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/SpawnEntities.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/spawn_entities__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'state' +#include "ue_msgs/msg/detail/entity_state__traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnEntities_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: type + { + if (msg.type.size() == 0) { + out << "type: []"; + } else { + out << "type: ["; + size_t pending_items = msg.type.size(); + for (auto item : msg.type) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: state + { + if (msg.state.size() == 0) { + out << "state: []"; + } else { + out << "state: ["; + size_t pending_items = msg.state.size(); + for (auto item : msg.state) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: tags + { + if (msg.tags.size() == 0) { + out << "tags: []"; + } else { + out << "tags: ["; + size_t pending_items = msg.tags.size(); + for (auto item : msg.tags) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: json_parameters + { + if (msg.json_parameters.size() == 0) { + out << "json_parameters: []"; + } else { + out << "json_parameters: ["; + size_t pending_items = msg.json_parameters.size(); + for (auto item : msg.json_parameters) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnEntities_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.type.size() == 0) { + out << "type: []\n"; + } else { + out << "type:\n"; + for (auto item : msg.type) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: state + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.state.size() == 0) { + out << "state: []\n"; + } else { + out << "state:\n"; + for (auto item : msg.state) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: tags + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.tags.size() == 0) { + out << "tags: []\n"; + } else { + out << "tags:\n"; + for (auto item : msg.tags) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: json_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.json_parameters.size() == 0) { + out << "json_parameters: []\n"; + } else { + out << "json_parameters:\n"; + for (auto item : msg.json_parameters) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnEntities_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnEntities_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnEntities_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntities_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntities_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnEntities_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: status_message + { + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnEntities_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: status_message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnEntities_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnEntities_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnEntities_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntities_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntities_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntities"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntities"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.c new file mode 100644 index 000000000..aae88334e --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.c @@ -0,0 +1,533 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/SpawnEntities.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entities__functions.h" +#include "ue_msgs/srv/detail/spawn_entities__struct.h" + + +// Include directives for member types +// Member `type` +// Member `tags` +// Member `json_parameters` +#include "rosidl_runtime_c/string_functions.h" +// Member `state` +#include "ue_msgs/msg/entity_state.h" +// Member `state` +#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_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; + ue_msgs__srv__SpawnEntities_Request__init(message_memory); +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnEntities_Request__fini(message_memory); +} + +size_t ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__type( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__type( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__type( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__type( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__type(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__type( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__type(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__type( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__state( + const void * untyped_member) +{ + const ue_msgs__msg__EntityState__Sequence * member = + (const ue_msgs__msg__EntityState__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__state( + const void * untyped_member, size_t index) +{ + const ue_msgs__msg__EntityState__Sequence * member = + (const ue_msgs__msg__EntityState__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__state( + void * untyped_member, size_t index) +{ + ue_msgs__msg__EntityState__Sequence * member = + (ue_msgs__msg__EntityState__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__state( + const void * untyped_member, size_t index, void * untyped_value) +{ + const ue_msgs__msg__EntityState * item = + ((const ue_msgs__msg__EntityState *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__state(untyped_member, index)); + ue_msgs__msg__EntityState * value = + (ue_msgs__msg__EntityState *)(untyped_value); + *value = *item; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__state( + void * untyped_member, size_t index, const void * untyped_value) +{ + ue_msgs__msg__EntityState * item = + ((ue_msgs__msg__EntityState *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__state(untyped_member, index)); + const ue_msgs__msg__EntityState * value = + (const ue_msgs__msg__EntityState *)(untyped_value); + *item = *value; +} + +bool ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__state( + void * untyped_member, size_t size) +{ + ue_msgs__msg__EntityState__Sequence * member = + (ue_msgs__msg__EntityState__Sequence *)(untyped_member); + ue_msgs__msg__EntityState__Sequence__fini(member); + return ue_msgs__msg__EntityState__Sequence__init(member, size); +} + +size_t ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__tags( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__tags( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__tags( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__tags( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__tags(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__tags( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__tags(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__tags( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +size_t ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__json_parameters( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__json_parameters( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__json_parameters( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__json_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__json_parameters(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__json_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__json_parameters(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__json_parameters( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array[4] = { + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Request, type), // bytes offset in struct + NULL, // default value + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__type, // size() function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__type, // get_const(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__type, // get(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__type, // fetch(index, &value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__type, // assign(index, value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__type // resize(index) function pointer + }, + { + "state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Request, state), // bytes offset in struct + NULL, // default value + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__state, // size() function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__state, // get_const(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__state, // get(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__state, // fetch(index, &value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__state, // assign(index, value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__state // resize(index) function pointer + }, + { + "tags", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Request, tags), // bytes offset in struct + NULL, // default value + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__tags, // size() function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__tags, // get_const(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__tags, // get(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__tags, // fetch(index, &value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__tags, // assign(index, value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__tags // resize(index) function pointer + }, + { + "json_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Request, json_parameters), // bytes offset in struct + NULL, // default value + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntities_Request__json_parameters, // size() function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntities_Request__json_parameters, // get_const(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntities_Request__json_parameters, // get(index) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntities_Request__json_parameters, // fetch(index, &value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntities_Request__json_parameters, // assign(index, value) function pointer + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntities_Request__json_parameters // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_members = { + "ue_msgs__srv", // message namespace + "SpawnEntities_Request", // message name + 4, // number of fields + sizeof(ue_msgs__srv__SpawnEntities_Request), + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array, // message members + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_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 ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Request)() { + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); + if (!ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnEntities_Request__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/spawn_entities__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entities__functions.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_entities__struct.h" + + +// Include directives for member types +// Member `status_message` +// already included above +// #include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_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; + ue_msgs__srv__SpawnEntities_Response__init(message_memory); +} + +void ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnEntities_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Response, success), // 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 + }, + { + "status_message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntities_Response, status_message), // 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 ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_members = { + "ue_msgs__srv", // message namespace + "SpawnEntities_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__SpawnEntities_Response), + ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_member_array, // message members + ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_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 ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Response)() { + if (!ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnEntities_Response__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_entities__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 ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_members = { + "ue_msgs__srv", // service namespace + "SpawnEntities", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_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, ue_msgs, srv, SpawnEntities_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntities)() { + if (!ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_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, ue_msgs, srv, SpawnEntities_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, ue_msgs, srv, SpawnEntities_Response)()->data; + } + + return &ue_msgs__srv__detail__spawn_entities__rosidl_typesupport_introspection_c__SpawnEntities_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.cpp similarity index 82% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.cpp index a436dbd07..61675eb51 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__SpawnEntities_Request__type(void * untyped_member, size_t i return &member[index]; } +void fetch_function__SpawnEntities_Request__type( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SpawnEntities_Request__type(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SpawnEntities_Request__type( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SpawnEntities_Request__type(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SpawnEntities_Request__type(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__SpawnEntities_Request__state(void * untyped_member, size_t return &member[index]; } +void fetch_function__SpawnEntities_Request__state( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SpawnEntities_Request__state(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SpawnEntities_Request__state( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SpawnEntities_Request__state(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SpawnEntities_Request__state(void * untyped_member, size_t size) { auto * member = @@ -111,6 +147,24 @@ void * get_function__SpawnEntities_Request__tags(void * untyped_member, size_t i return &member[index]; } +void fetch_function__SpawnEntities_Request__tags( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SpawnEntities_Request__tags(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SpawnEntities_Request__tags( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SpawnEntities_Request__tags(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SpawnEntities_Request__tags(void * untyped_member, size_t size) { auto * member = @@ -138,6 +192,24 @@ void * get_function__SpawnEntities_Request__json_parameters(void * untyped_membe return &member[index]; } +void fetch_function__SpawnEntities_Request__json_parameters( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SpawnEntities_Request__json_parameters(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SpawnEntities_Request__json_parameters( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SpawnEntities_Request__json_parameters(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SpawnEntities_Request__json_parameters(void * untyped_member, size_t size) { auto * member = @@ -159,6 +231,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities size_function__SpawnEntities_Request__type, // size() function pointer get_const_function__SpawnEntities_Request__type, // get_const(index) function pointer get_function__SpawnEntities_Request__type, // get(index) function pointer + fetch_function__SpawnEntities_Request__type, // fetch(index, &value) function pointer + assign_function__SpawnEntities_Request__type, // assign(index, value) function pointer resize_function__SpawnEntities_Request__type // resize(index) function pointer }, { @@ -174,6 +248,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities size_function__SpawnEntities_Request__state, // size() function pointer get_const_function__SpawnEntities_Request__state, // get_const(index) function pointer get_function__SpawnEntities_Request__state, // get(index) function pointer + fetch_function__SpawnEntities_Request__state, // fetch(index, &value) function pointer + assign_function__SpawnEntities_Request__state, // assign(index, value) function pointer resize_function__SpawnEntities_Request__state // resize(index) function pointer }, { @@ -189,6 +265,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities size_function__SpawnEntities_Request__tags, // size() function pointer get_const_function__SpawnEntities_Request__tags, // get_const(index) function pointer get_function__SpawnEntities_Request__tags, // get(index) function pointer + fetch_function__SpawnEntities_Request__tags, // fetch(index, &value) function pointer + assign_function__SpawnEntities_Request__tags, // assign(index, value) function pointer resize_function__SpawnEntities_Request__tags // resize(index) function pointer }, { @@ -204,6 +282,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities size_function__SpawnEntities_Request__json_parameters, // size() function pointer get_const_function__SpawnEntities_Request__json_parameters, // get_const(index) function pointer get_function__SpawnEntities_Request__json_parameters, // get(index) function pointer + fetch_function__SpawnEntities_Request__json_parameters, // fetch(index, &value) function pointer + assign_function__SpawnEntities_Request__json_parameters, // assign(index, value) function pointer resize_function__SpawnEntities_Request__json_parameters // resize(index) function pointer } }; @@ -321,6 +401,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities 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 }, { @@ -336,6 +418,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntities 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entities__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.hpp new file mode 100644 index 000000000..2acaff530 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entities__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/SpawnEntities.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntities +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntities_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntities_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITIES__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__builder.hpp similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__builder.hpp index 0d3999aba..e549f9922 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__BUILDER_HPP_ -#include "ue_msgs/srv/detail/spawn_entity__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/spawn_entity__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__functions.c similarity index 92% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__functions.c index e65d41511..a57c7e376 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__functions.c @@ -296,22 +296,27 @@ ue_msgs__srv__SpawnEntity_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnEntity_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnEntity_Request * data = - (ue_msgs__srv__SpawnEntity_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnEntity_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 (!ue_msgs__srv__SpawnEntity_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnEntity_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; ) { - ue_msgs__srv__SpawnEntity_Request__fini(&data[i]); + ue_msgs__srv__SpawnEntity_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -540,22 +545,27 @@ ue_msgs__srv__SpawnEntity_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnEntity_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnEntity_Response * data = - (ue_msgs__srv__SpawnEntity_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnEntity_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 (!ue_msgs__srv__SpawnEntity_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnEntity_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; ) { - ue_msgs__srv__SpawnEntity_Response__fini(&data[i]); + ue_msgs__srv__SpawnEntity_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h index 91d4489e0..144b49c95 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnEntity_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnEntity_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnEntity_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnEntity_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp index 00d6ef340..50f7122a4 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnEntity_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnEntity_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.h similarity index 83% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.h index 7a31b7e60..9731ca9de 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.h @@ -26,13 +26,17 @@ extern "C" // Member 'state' #include "ue_msgs/msg/detail/entity_state__struct.h" -// Struct defined in srv/SpawnEntity in the package ue_msgs. +/// Struct defined in srv/SpawnEntity in the package ue_msgs. typedef struct ue_msgs__srv__SpawnEntity_Request { + /// Entity XML description as a string, either URDF or SDF. rosidl_runtime_c__String xml; + /// Spawn robot and all ROS interfaces under this namespace rosidl_runtime_c__String robot_namespace; + /// Initial entity pose. ue_msgs__msg__EntityState state; rosidl_runtime_c__String__Sequence tags; + /// optional parameters, in json format rosidl_runtime_c__String json_parameters; } ue_msgs__srv__SpawnEntity_Request; @@ -54,10 +58,12 @@ typedef struct ue_msgs__srv__SpawnEntity_Request__Sequence // already included above // #include "rosidl_runtime_c/string.h" -// Struct defined in srv/SpawnEntity in the package ue_msgs. +/// Struct defined in srv/SpawnEntity in the package ue_msgs. typedef struct ue_msgs__srv__SpawnEntity_Response { + /// Return true if spawned successfully. bool success; + /// Comments if available. rosidl_runtime_c__String status_message; } ue_msgs__srv__SpawnEntity_Response; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.hpp similarity index 85% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.hpp index 44f769961..faa943ec9 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'state' @@ -65,30 +66,30 @@ struct SpawnEntity_Request_ // field types and members using _xml_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _xml_type xml; using _robot_namespace_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _robot_namespace_type robot_namespace; using _state_type = ue_msgs::msg::EntityState_; _state_type state; using _tags_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _tags_type tags; using _json_parameters_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _json_parameters_type json_parameters; // setters for named parameter idiom Type & set__xml( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->xml = _arg; return *this; } Type & set__robot_namespace( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->robot_namespace = _arg; return *this; @@ -100,13 +101,13 @@ struct SpawnEntity_Request_ return *this; } Type & set__tags( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->tags = _arg; return *this; } Type & set__json_parameters( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->json_parameters = _arg; return *this; @@ -232,7 +233,7 @@ struct SpawnEntity_Response_ bool; _success_type success; using _status_message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _status_message_type status_message; // setters for named parameter idiom @@ -243,7 +244,7 @@ struct SpawnEntity_Response_ return *this; } Type & set__status_message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->status_message = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__traits.hpp new file mode 100644 index 000000000..3dfc9a557 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__traits.hpp @@ -0,0 +1,365 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/SpawnEntity.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/spawn_entity__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'state' +#include "ue_msgs/msg/detail/entity_state__traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnEntity_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: xml + { + out << "xml: "; + rosidl_generator_traits::value_to_yaml(msg.xml, out); + out << ", "; + } + + // member: robot_namespace + { + out << "robot_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.robot_namespace, out); + out << ", "; + } + + // member: state + { + out << "state: "; + to_flow_style_yaml(msg.state, out); + out << ", "; + } + + // member: tags + { + if (msg.tags.size() == 0) { + out << "tags: []"; + } else { + out << "tags: ["; + size_t pending_items = msg.tags.size(); + for (auto item : msg.tags) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: json_parameters + { + out << "json_parameters: "; + rosidl_generator_traits::value_to_yaml(msg.json_parameters, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnEntity_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: xml + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "xml: "; + rosidl_generator_traits::value_to_yaml(msg.xml, out); + out << "\n"; + } + + // member: robot_namespace + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "robot_namespace: "; + rosidl_generator_traits::value_to_yaml(msg.robot_namespace, out); + out << "\n"; + } + + // member: state + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "state:\n"; + to_block_style_yaml(msg.state, out, indentation + 2); + } + + // member: tags + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.tags.size() == 0) { + out << "tags: []\n"; + } else { + out << "tags:\n"; + for (auto item : msg.tags) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } + + // member: json_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "json_parameters: "; + rosidl_generator_traits::value_to_yaml(msg.json_parameters, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnEntity_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnEntity_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnEntity_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntity_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntity_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnEntity_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: status_message + { + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnEntity_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: status_message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnEntity_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnEntity_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnEntity_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntity_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntity_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnEntity"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnEntity"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.c new file mode 100644 index 000000000..e854ac567 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.c @@ -0,0 +1,386 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/SpawnEntity.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entity__functions.h" +#include "ue_msgs/srv/detail/spawn_entity__struct.h" + + +// Include directives for member types +// Member `xml` +// Member `robot_namespace` +// Member `tags` +// Member `json_parameters` +#include "rosidl_runtime_c/string_functions.h" +// Member `state` +#include "ue_msgs/msg/entity_state.h" +// Member `state` +#include "ue_msgs/msg/detail/entity_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_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; + ue_msgs__srv__SpawnEntity_Request__init(message_memory); +} + +void ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnEntity_Request__fini(message_memory); +} + +size_t ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntity_Request__tags( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntity_Request__tags( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntity_Request__tags( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntity_Request__tags( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntity_Request__tags(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntity_Request__tags( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntity_Request__tags(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntity_Request__tags( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array[5] = { + { + "xml", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Request, xml), // 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 + }, + { + "robot_namespace", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Request, robot_namespace), // 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 + }, + { + "state", // 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(ue_msgs__srv__SpawnEntity_Request, state), // 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 + }, + { + "tags", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Request, tags), // bytes offset in struct + NULL, // default value + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__size_function__SpawnEntity_Request__tags, // size() function pointer + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_const_function__SpawnEntity_Request__tags, // get_const(index) function pointer + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__get_function__SpawnEntity_Request__tags, // get(index) function pointer + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__fetch_function__SpawnEntity_Request__tags, // fetch(index, &value) function pointer + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__assign_function__SpawnEntity_Request__tags, // assign(index, value) function pointer + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__resize_function__SpawnEntity_Request__tags // resize(index) function pointer + }, + { + "json_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Request, json_parameters), // 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 ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_members = { + "ue_msgs__srv", // message namespace + "SpawnEntity_Request", // message name + 5, // number of fields + sizeof(ue_msgs__srv__SpawnEntity_Request), + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array, // message members + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_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 ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Request)() { + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, msg, EntityState)(); + if (!ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnEntity_Request__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/spawn_entity__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_entity__functions.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_entity__struct.h" + + +// Include directives for member types +// Member `status_message` +// already included above +// #include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_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; + ue_msgs__srv__SpawnEntity_Response__init(message_memory); +} + +void ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnEntity_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Response, success), // 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 + }, + { + "status_message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnEntity_Response, status_message), // 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 ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_members = { + "ue_msgs__srv", // message namespace + "SpawnEntity_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__SpawnEntity_Response), + ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_member_array, // message members + ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_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 ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Response)() { + if (!ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnEntity_Response__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_entity__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 ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_members = { + "ue_msgs__srv", // service namespace + "SpawnEntity", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_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, ue_msgs, srv, SpawnEntity_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnEntity)() { + if (!ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_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, ue_msgs, srv, SpawnEntity_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, ue_msgs, srv, SpawnEntity_Response)()->data; + } + + return &ue_msgs__srv__detail__spawn_entity__rosidl_typesupport_introspection_c__SpawnEntity_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.cpp similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.cpp index 0157dc262..26a737f87 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__SpawnEntity_Request__tags(void * untyped_member, size_t ind return &member[index]; } +void fetch_function__SpawnEntity_Request__tags( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__SpawnEntity_Request__tags(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__SpawnEntity_Request__tags( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__SpawnEntity_Request__tags(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__SpawnEntity_Request__tags(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 }, { @@ -123,6 +147,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R size_function__SpawnEntity_Request__tags, // size() function pointer get_const_function__SpawnEntity_Request__tags, // get_const(index) function pointer get_function__SpawnEntity_Request__tags, // get(index) function pointer + fetch_function__SpawnEntity_Request__tags, // fetch(index, &value) function pointer + assign_function__SpawnEntity_Request__tags, // assign(index, value) function pointer resize_function__SpawnEntity_Request__tags // resize(index) function pointer }, { @@ -138,6 +164,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 } }; @@ -255,6 +283,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 }, { @@ -270,6 +300,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnEntity_R 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_entity__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.hpp new file mode 100644 index 000000000..ec89b1e5f --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_entity__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/SpawnEntity.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntity +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntity_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnEntity_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_ENTITY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__builder.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__builder.hpp similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__builder.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__builder.hpp index 2557f0d6d..1dc63b11d 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__builder.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__builder.hpp @@ -5,11 +5,12 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_WORLD__BUILDER_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_WORLD__BUILDER_HPP_ -#include "ue_msgs/srv/detail/spawn_world__struct.hpp" -#include #include #include +#include "ue_msgs/srv/detail/spawn_world__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace ue_msgs { diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__functions.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__functions.c similarity index 91% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__functions.c rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__functions.c index 22ff0ab5f..921a0394c 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__functions.c +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__functions.c @@ -276,22 +276,27 @@ ue_msgs__srv__SpawnWorld_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnWorld_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnWorld_Request * data = - (ue_msgs__srv__SpawnWorld_Request *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnWorld_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 (!ue_msgs__srv__SpawnWorld_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnWorld_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; ) { - ue_msgs__srv__SpawnWorld_Request__fini(&data[i]); + ue_msgs__srv__SpawnWorld_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -520,22 +525,27 @@ ue_msgs__srv__SpawnWorld_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(ue_msgs__srv__SpawnWorld_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); ue_msgs__srv__SpawnWorld_Response * data = - (ue_msgs__srv__SpawnWorld_Response *)realloc(output->data, allocation_size); + (ue_msgs__srv__SpawnWorld_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 (!ue_msgs__srv__SpawnWorld_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!ue_msgs__srv__SpawnWorld_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; ) { - ue_msgs__srv__SpawnWorld_Response__fini(&data[i]); + ue_msgs__srv__SpawnWorld_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__functions.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__functions.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__functions.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__functions.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h index abb992d2b..a6569b85b 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnWorld_Request( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnWorld_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_ue_msgs__srv__SpawnWorld_Response( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs size_t max_serialized_size_ue_msgs__srv__SpawnWorld_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_ue_msgs diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp index 51b398aa3..18e0b98e3 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnWorld_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_ue_msgs max_serialized_size_SpawnWorld_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.h similarity index 88% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.h index a95dba629..ad77a6c5c 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.h +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.h @@ -25,12 +25,16 @@ extern "C" // Member 'pose' #include "geometry_msgs/msg/detail/pose__struct.h" -// Struct defined in srv/SpawnWorld in the package ue_msgs. +/// Struct defined in srv/SpawnWorld in the package ue_msgs. typedef struct ue_msgs__srv__SpawnWorld_Request { + /// World model name rosidl_runtime_c__String world_model; + /// World instance unique name rosidl_runtime_c__String world_instance_name; + /// World instance initial pose geometry_msgs__msg__Pose pose; + /// optional parameters, in json format rosidl_runtime_c__String json_parameters; } ue_msgs__srv__SpawnWorld_Request; @@ -52,7 +56,7 @@ typedef struct ue_msgs__srv__SpawnWorld_Request__Sequence // already included above // #include "rosidl_runtime_c/string.h" -// Struct defined in srv/SpawnWorld in the package ue_msgs. +/// Struct defined in srv/SpawnWorld in the package ue_msgs. typedef struct ue_msgs__srv__SpawnWorld_Response { bool success; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.hpp similarity index 90% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.hpp index 00b17c24b..2fe326423 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__struct.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__struct.hpp @@ -5,14 +5,15 @@ #ifndef UE_MSGS__SRV__DETAIL__SPAWN_WORLD__STRUCT_HPP_ #define UE_MSGS__SRV__DETAIL__SPAWN_WORLD__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'pose' @@ -65,27 +66,27 @@ struct SpawnWorld_Request_ // field types and members using _world_model_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _world_model_type world_model; using _world_instance_name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _world_instance_name_type world_instance_name; using _pose_type = geometry_msgs::msg::Pose_; _pose_type pose; using _json_parameters_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _json_parameters_type json_parameters; // setters for named parameter idiom Type & set__world_model( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->world_model = _arg; return *this; } Type & set__world_instance_name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->world_instance_name = _arg; return *this; @@ -97,7 +98,7 @@ struct SpawnWorld_Request_ return *this; } Type & set__json_parameters( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->json_parameters = _arg; return *this; @@ -220,7 +221,7 @@ struct SpawnWorld_Response_ bool; _success_type success; using _status_message_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _status_message_type status_message; // setters for named parameter idiom @@ -231,7 +232,7 @@ struct SpawnWorld_Response_ return *this; } Type & set__status_message( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->status_message = _arg; return *this; diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__traits.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__traits.hpp new file mode 100644 index 000000000..04493e648 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__traits.hpp @@ -0,0 +1,327 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from ue_msgs:srv/SpawnWorld.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "ue_msgs/srv/detail/spawn_world__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnWorld_Request & msg, + std::ostream & out) +{ + out << "{"; + // member: world_model + { + out << "world_model: "; + rosidl_generator_traits::value_to_yaml(msg.world_model, out); + out << ", "; + } + + // member: world_instance_name + { + out << "world_instance_name: "; + rosidl_generator_traits::value_to_yaml(msg.world_instance_name, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: json_parameters + { + out << "json_parameters: "; + rosidl_generator_traits::value_to_yaml(msg.json_parameters, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnWorld_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: world_model + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "world_model: "; + rosidl_generator_traits::value_to_yaml(msg.world_model, out); + out << "\n"; + } + + // member: world_instance_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "world_instance_name: "; + rosidl_generator_traits::value_to_yaml(msg.world_instance_name, out); + out << "\n"; + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: json_parameters + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "json_parameters: "; + rosidl_generator_traits::value_to_yaml(msg.json_parameters, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnWorld_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnWorld_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnWorld_Request & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnWorld_Request"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnWorld_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace ue_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const SpawnWorld_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: success + { + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << ", "; + } + + // member: status_message + { + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const SpawnWorld_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: success + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "success: "; + rosidl_generator_traits::value_to_yaml(msg.success, out); + out << "\n"; + } + + // member: status_message + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "status_message: "; + rosidl_generator_traits::value_to_yaml(msg.status_message, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const SpawnWorld_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 ue_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use ue_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const ue_msgs::srv::SpawnWorld_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + ue_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use ue_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const ue_msgs::srv::SpawnWorld_Response & msg) +{ + return ue_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnWorld_Response"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnWorld_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "ue_msgs::srv::SpawnWorld"; +} + +template<> +inline const char * name() +{ + return "ue_msgs/srv/SpawnWorld"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.c b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.c new file mode 100644 index 000000000..89ad7b4b1 --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.c @@ -0,0 +1,313 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from ue_msgs:srv/SpawnWorld.idl +// generated code does not contain a copyright notice + +#include +#include "ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h" +#include "ue_msgs/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 "ue_msgs/srv/detail/spawn_world__functions.h" +#include "ue_msgs/srv/detail/spawn_world__struct.h" + + +// Include directives for member types +// Member `world_model` +// Member `world_instance_name` +// Member `json_parameters` +#include "rosidl_runtime_c/string_functions.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_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; + ue_msgs__srv__SpawnWorld_Request__init(message_memory); +} + +void ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnWorld_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array[4] = { + { + "world_model", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnWorld_Request, world_model), // 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 + }, + { + "world_instance_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnWorld_Request, world_instance_name), // 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 + }, + { + "pose", // 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(ue_msgs__srv__SpawnWorld_Request, pose), // 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 + }, + { + "json_parameters", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnWorld_Request, json_parameters), // 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 ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_members = { + "ue_msgs__srv", // message namespace + "SpawnWorld_Request", // message name + 4, // number of fields + sizeof(ue_msgs__srv__SpawnWorld_Request), + ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array, // message members + ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_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 ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Request)() { + ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnWorld_Request__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "ue_msgs/srv/detail/spawn_world__rosidl_typesupport_introspection_c.h" +// already included above +// #include "ue_msgs/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 "ue_msgs/srv/detail/spawn_world__functions.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_world__struct.h" + + +// Include directives for member types +// Member `status_message` +// already included above +// #include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_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; + ue_msgs__srv__SpawnWorld_Response__init(message_memory); +} + +void ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_fini_function(void * message_memory) +{ + ue_msgs__srv__SpawnWorld_Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_member_array[2] = { + { + "success", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnWorld_Response, success), // 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 + }, + { + "status_message", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(ue_msgs__srv__SpawnWorld_Response, status_message), // 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 ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_members = { + "ue_msgs__srv", // message namespace + "SpawnWorld_Response", // message name + 2, // number of fields + sizeof(ue_msgs__srv__SpawnWorld_Response), + ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_member_array, // message members + ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_init_function, // function to initialize message memory (memory has to be allocated) + ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_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 ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle = { + 0, + &ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Response)() { + if (!ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle.typesupport_identifier) { + ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ue_msgs__srv__SpawnWorld_Response__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "ue_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "ue_msgs/srv/detail/spawn_world__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 ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_members = { + "ue_msgs__srv", // service namespace + "SpawnWorld", // service name + // these two fields are initialized below on the first access + NULL, // request message + // ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_Request_message_type_support_handle, + NULL // response message + // ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle = { + 0, + &ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_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, ue_msgs, srv, SpawnWorld_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_ue_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, ue_msgs, srv, SpawnWorld)() { + if (!ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle.typesupport_identifier) { + ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_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, ue_msgs, srv, SpawnWorld_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, ue_msgs, srv, SpawnWorld_Response)()->data; + } + + return &ue_msgs__srv__detail__spawn_world__rosidl_typesupport_introspection_c__SpawnWorld_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.cpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.cpp similarity index 95% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.cpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.cpp index c664025d6..ee35f99e1 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.cpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 } }; @@ -213,6 +221,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 }, { @@ -228,6 +238,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember SpawnWorld_Re 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 } }; diff --git a/ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/detail/spawn_world__type_support.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.h diff --git a/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.hpp new file mode 100644 index 000000000..6c0f68e9b --- /dev/null +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/detail/spawn_world__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from ue_msgs:srv/SpawnWorld.idl +// generated code does not contain a copyright notice + +#ifndef UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TYPE_SUPPORT_HPP_ +#define UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "ue_msgs/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_ue_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnWorld +)(); +#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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnWorld_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_ue_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + ue_msgs, + srv, + SpawnWorld_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // UE_MSGS__SRV__DETAIL__SPAWN_WORLD__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_bool_from_id.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_bool_from_id.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/get_bool_from_id.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_bool_from_id.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_bool_from_id.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_bool_from_id.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/get_bool_from_id.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_bool_from_id.hpp index 063a26aae..8c2b2f5b4 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/get_bool_from_id.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_bool_from_id.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/get_bool_from_id__struct.hpp" #include "ue_msgs/srv/detail/get_bool_from_id__builder.hpp" #include "ue_msgs/srv/detail/get_bool_from_id__traits.hpp" +#include "ue_msgs/srv/detail/get_bool_from_id__type_support.hpp" #endif // UE_MSGS__SRV__GET_BOOL_FROM_ID_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_entity_state.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_entity_state.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/get_entity_state.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_entity_state.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_entity_state.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_entity_state.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/get_entity_state.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_entity_state.hpp index 5d0195e43..d02b1f0c0 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/get_entity_state.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_entity_state.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/get_entity_state__struct.hpp" #include "ue_msgs/srv/detail/get_entity_state__builder.hpp" #include "ue_msgs/srv/detail/get_entity_state__traits.hpp" +#include "ue_msgs/srv/detail/get_entity_state__type_support.hpp" #endif // UE_MSGS__SRV__GET_ENTITY_STATE_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_int32_from_id.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_int32_from_id.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/get_int32_from_id.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_int32_from_id.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/get_int32_from_id.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_int32_from_id.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/get_int32_from_id.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_int32_from_id.hpp index 55c17fa41..4fddcf8cb 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/get_int32_from_id.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/get_int32_from_id.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/get_int32_from_id__struct.hpp" #include "ue_msgs/srv/detail/get_int32_from_id__builder.hpp" #include "ue_msgs/srv/detail/get_int32_from_id__traits.hpp" +#include "ue_msgs/srv/detail/get_int32_from_id__type_support.hpp" #endif // UE_MSGS__SRV__GET_INT32_FROM_ID_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/set_entity_state.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_entity_state.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/set_entity_state.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_entity_state.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/set_entity_state.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_entity_state.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/set_entity_state.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_entity_state.hpp index f58c31859..74af894dd 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/set_entity_state.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_entity_state.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/set_entity_state__struct.hpp" #include "ue_msgs/srv/detail/set_entity_state__builder.hpp" #include "ue_msgs/srv/detail/set_entity_state__traits.hpp" +#include "ue_msgs/srv/detail/set_entity_state__type_support.hpp" #endif // UE_MSGS__SRV__SET_ENTITY_STATE_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/set_int32.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_int32.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/set_int32.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_int32.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/set_int32.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_int32.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/set_int32.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_int32.hpp index 9bde4f00b..f65602e04 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/set_int32.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/set_int32.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/set_int32__struct.hpp" #include "ue_msgs/srv/detail/set_int32__builder.hpp" #include "ue_msgs/srv/detail/set_int32__traits.hpp" +#include "ue_msgs/srv/detail/set_int32__type_support.hpp" #endif // UE_MSGS__SRV__SET_INT32_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_entities.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entities.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_entities.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entities.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_entities.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entities.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_entities.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entities.hpp index 5c8617c42..114478aa6 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/spawn_entities.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entities.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/spawn_entities__struct.hpp" #include "ue_msgs/srv/detail/spawn_entities__builder.hpp" #include "ue_msgs/srv/detail/spawn_entities__traits.hpp" +#include "ue_msgs/srv/detail/spawn_entities__type_support.hpp" #endif // UE_MSGS__SRV__SPAWN_ENTITIES_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_entity.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entity.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_entity.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entity.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_entity.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entity.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_entity.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entity.hpp index d7f6c50dd..2840ea2bd 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/spawn_entity.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_entity.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/spawn_entity__struct.hpp" #include "ue_msgs/srv/detail/spawn_entity__builder.hpp" #include "ue_msgs/srv/detail/spawn_entity__traits.hpp" +#include "ue_msgs/srv/detail/spawn_entity__type_support.hpp" #endif // UE_MSGS__SRV__SPAWN_ENTITY_HPP_ diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_world.h b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_world.h similarity index 100% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_world.h rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_world.h diff --git a/ThirdParty/ros/include/ue_msgs/srv/spawn_world.hpp b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_world.hpp similarity index 86% rename from ThirdParty/ros/include/ue_msgs/srv/spawn_world.hpp rename to ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_world.hpp index 4a95f4225..a5fa2e5bf 100644 --- a/ThirdParty/ros/include/ue_msgs/srv/spawn_world.hpp +++ b/ThirdParty/ros/include/ue_msgs/ue_msgs/srv/spawn_world.hpp @@ -7,5 +7,6 @@ #include "ue_msgs/srv/detail/spawn_world__struct.hpp" #include "ue_msgs/srv/detail/spawn_world__builder.hpp" #include "ue_msgs/srv/detail/spawn_world__traits.hpp" +#include "ue_msgs/srv/detail/spawn_world__type_support.hpp" #endif // UE_MSGS__SRV__SPAWN_WORLD_HPP_ diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__traits.hpp b/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__traits.hpp deleted file mode 100644 index d3f5be629..000000000 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from unique_identifier_msgs:msg/UUID.idl -// generated code does not contain a copyright notice - -#ifndef UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ -#define UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ - -#include "unique_identifier_msgs/msg/detail/uuid__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "unique_identifier_msgs::msg::UUID"; -} - -template<> -inline const char * name() -{ - return "unique_identifier_msgs/msg/UUID"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.c b/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.c deleted file mode 100644 index 79d1f9566..000000000 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.c +++ /dev/null @@ -1,81 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from unique_identifier_msgs:msg/UUID.idl -// generated code does not contain a copyright notice - -#include -#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" -#include "unique_identifier_msgs/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 "unique_identifier_msgs/msg/detail/uuid__functions.h" -#include "unique_identifier_msgs/msg/detail/uuid__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void UUID__rosidl_typesupport_introspection_c__UUID_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; - unique_identifier_msgs__msg__UUID__init(message_memory); -} - -void UUID__rosidl_typesupport_introspection_c__UUID_fini_function(void * message_memory) -{ - unique_identifier_msgs__msg__UUID__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember UUID__rosidl_typesupport_introspection_c__UUID_message_member_array[1] = { - { - "uuid", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 16, // array size - false, // is upper bound - offsetof(unique_identifier_msgs__msg__UUID, uuid), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers UUID__rosidl_typesupport_introspection_c__UUID_message_members = { - "unique_identifier_msgs__msg", // message namespace - "UUID", // message name - 1, // number of fields - sizeof(unique_identifier_msgs__msg__UUID), - UUID__rosidl_typesupport_introspection_c__UUID_message_member_array, // message members - UUID__rosidl_typesupport_introspection_c__UUID_init_function, // function to initialize message memory (memory has to be allocated) - UUID__rosidl_typesupport_introspection_c__UUID_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 UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle = { - 0, - &UUID__rosidl_typesupport_introspection_c__UUID_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unique_identifier_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)() { - if (!UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle.typesupport_identifier) { - UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__builder.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__builder.hpp similarity index 95% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__builder.hpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__builder.hpp index 0a4273268..8bf7c77a7 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__builder.hpp +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__builder.hpp @@ -5,11 +5,12 @@ #ifndef UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__BUILDER_HPP_ #define UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__BUILDER_HPP_ -#include "unique_identifier_msgs/msg/detail/uuid__struct.hpp" -#include #include #include +#include "unique_identifier_msgs/msg/detail/uuid__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace unique_identifier_msgs { diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__functions.c b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__functions.c similarity index 90% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__functions.c rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__functions.c index 1bed0c8b6..aa6384af1 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__functions.c +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__functions.c @@ -205,22 +205,27 @@ unique_identifier_msgs__msg__UUID__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(unique_identifier_msgs__msg__UUID); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); unique_identifier_msgs__msg__UUID * data = - (unique_identifier_msgs__msg__UUID *)realloc(output->data, allocation_size); + (unique_identifier_msgs__msg__UUID *)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 (!unique_identifier_msgs__msg__UUID__init(&data[i])) { - /* free currently allocated and return false */ + if (!unique_identifier_msgs__msg__UUID__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; ) { - unique_identifier_msgs__msg__UUID__fini(&data[i]); + unique_identifier_msgs__msg__UUID__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__functions.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__functions.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__functions.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__functions.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h index 4c59a1ec3..0099d4341 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_unique_identifier_msgs__msg__UUID( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unique_identifier_msgs size_t max_serialized_size_unique_identifier_msgs__msg__UUID( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unique_identifier_msgs diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp index 21653c897..6ecfad73c 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unique_identifier_msgs max_serialized_size_UUID( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.h similarity index 80% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.h index c10a64774..568af1682 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.h +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.h @@ -17,7 +17,13 @@ extern "C" // Constants defined in the message -// Struct defined in msg/UUID in the package unique_identifier_msgs. +/// Struct defined in msg/UUID in the package unique_identifier_msgs. +/** + * A universally unique identifier (UUID). + * + * http://en.wikipedia.org/wiki/Universally_unique_identifier + * http://tools.ietf.org/html/rfc4122.html + */ typedef struct unique_identifier_msgs__msg__UUID { uint8_t uuid[16]; diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.hpp similarity index 97% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.hpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.hpp index a83fc310c..ac1b1bbad 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__struct.hpp +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__struct.hpp @@ -5,14 +5,15 @@ #ifndef UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__STRUCT_HPP_ #define UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__unique_identifier_msgs__msg__UUID __attribute__((deprecated)) diff --git a/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__traits.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__traits.hpp new file mode 100644 index 000000000..a34496d91 --- /dev/null +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__traits.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unique_identifier_msgs:msg/UUID.idl +// generated code does not contain a copyright notice + +#ifndef UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ +#define UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "unique_identifier_msgs/msg/detail/uuid__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace unique_identifier_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UUID & msg, + std::ostream & out) +{ + out << "{"; + // member: uuid + { + if (msg.uuid.size() == 0) { + out << "uuid: []"; + } else { + out << "uuid: ["; + size_t pending_items = msg.uuid.size(); + for (auto item : msg.uuid) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UUID & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: uuid + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.uuid.size() == 0) { + out << "uuid: []\n"; + } else { + out << "uuid:\n"; + for (auto item : msg.uuid) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UUID & 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 unique_identifier_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use unique_identifier_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const unique_identifier_msgs::msg::UUID & msg, + std::ostream & out, size_t indentation = 0) +{ + unique_identifier_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use unique_identifier_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const unique_identifier_msgs::msg::UUID & msg) +{ + return unique_identifier_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "unique_identifier_msgs::msg::UUID"; +} + +template<> +inline const char * name() +{ + return "unique_identifier_msgs/msg/UUID"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.c b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.c new file mode 100644 index 000000000..aad7a9137 --- /dev/null +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.c @@ -0,0 +1,128 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unique_identifier_msgs:msg/UUID.idl +// generated code does not contain a copyright notice + +#include +#include "unique_identifier_msgs/msg/detail/uuid__rosidl_typesupport_introspection_c.h" +#include "unique_identifier_msgs/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 "unique_identifier_msgs/msg/detail/uuid__functions.h" +#include "unique_identifier_msgs/msg/detail/uuid__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_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; + unique_identifier_msgs__msg__UUID__init(message_memory); +} + +void unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_fini_function(void * message_memory) +{ + unique_identifier_msgs__msg__UUID__fini(message_memory); +} + +size_t unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__size_function__UUID__uuid( + const void * untyped_member) +{ + (void)untyped_member; + return 16; +} + +const void * unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_const_function__UUID__uuid( + const void * untyped_member, size_t index) +{ + const uint8_t * member = + (const uint8_t *)(untyped_member); + return &member[index]; +} + +void * unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_function__UUID__uuid( + void * untyped_member, size_t index) +{ + uint8_t * member = + (uint8_t *)(untyped_member); + return &member[index]; +} + +void unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__fetch_function__UUID__uuid( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_const_function__UUID__uuid(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__assign_function__UUID__uuid( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_function__UUID__uuid(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +static rosidl_typesupport_introspection_c__MessageMember unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_member_array[1] = { + { + "uuid", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 16, // array size + false, // is upper bound + offsetof(unique_identifier_msgs__msg__UUID, uuid), // bytes offset in struct + NULL, // default value + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__size_function__UUID__uuid, // size() function pointer + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_const_function__UUID__uuid, // get_const(index) function pointer + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__get_function__UUID__uuid, // get(index) function pointer + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__fetch_function__UUID__uuid, // fetch(index, &value) function pointer + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__assign_function__UUID__uuid, // assign(index, value) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_members = { + "unique_identifier_msgs__msg", // message namespace + "UUID", // message name + 1, // number of fields + sizeof(unique_identifier_msgs__msg__UUID), + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_member_array, // message members + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_init_function, // function to initialize message memory (memory has to be allocated) + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_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 unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle = { + 0, + &unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unique_identifier_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unique_identifier_msgs, msg, UUID)() { + if (!unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle.typesupport_identifier) { + unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &unique_identifier_msgs__msg__UUID__rosidl_typesupport_introspection_c__UUID_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.cpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.cpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.cpp index 8c792315b..7062377f6 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.cpp +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__UUID__uuid(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__UUID__uuid( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__UUID__uuid(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__UUID__uuid( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__UUID__uuid(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + static const ::rosidl_typesupport_introspection_cpp::MessageMember UUID_message_member_array[1] = { { "uuid", // name @@ -71,6 +89,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember UUID_message_ size_function__UUID__uuid, // size() function pointer get_const_function__UUID__uuid, // get_const(index) function pointer get_function__UUID__uuid, // get(index) function pointer + fetch_function__UUID__uuid, // fetch(index, &value) function pointer + assign_function__UUID__uuid, // assign(index, value) function pointer nullptr // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/detail/uuid__type_support.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.hpp new file mode 100644 index 000000000..b4aef5435 --- /dev/null +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/detail/uuid__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unique_identifier_msgs:msg/UUID.idl +// generated code does not contain a copyright notice + +#ifndef UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TYPE_SUPPORT_HPP_ +#define UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unique_identifier_msgs/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_unique_identifier_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unique_identifier_msgs, + msg, + UUID +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNIQUE_IDENTIFIER_MSGS__MSG__DETAIL__UUID__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..9ac9ee4d4 --- /dev/null +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 UNIQUE_IDENTIFIER_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define UNIQUE_IDENTIFIER_MSGS__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_unique_identifier_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_unique_identifier_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_unique_identifier_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_unique_identifier_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_unique_identifier_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_unique_identifier_msgs ROSIDL_GENERATOR_CPP_EXPORT_unique_identifier_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unique_identifier_msgs ROSIDL_GENERATOR_CPP_IMPORT_unique_identifier_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_unique_identifier_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_unique_identifier_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_unique_identifier_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unique_identifier_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNIQUE_IDENTIFIER_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/uuid.h b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/uuid.h similarity index 100% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/uuid.h rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/uuid.h diff --git a/ThirdParty/ros/include/unique_identifier_msgs/msg/uuid.hpp b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/uuid.hpp similarity index 86% rename from ThirdParty/ros/include/unique_identifier_msgs/msg/uuid.hpp rename to ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/uuid.hpp index 34eb374ca..3968279b7 100644 --- a/ThirdParty/ros/include/unique_identifier_msgs/msg/uuid.hpp +++ b/ThirdParty/ros/include/unique_identifier_msgs/unique_identifier_msgs/msg/uuid.hpp @@ -7,5 +7,6 @@ #include "unique_identifier_msgs/msg/detail/uuid__struct.hpp" #include "unique_identifier_msgs/msg/detail/uuid__builder.hpp" #include "unique_identifier_msgs/msg/detail/uuid__traits.hpp" +#include "unique_identifier_msgs/msg/detail/uuid__type_support.hpp" #endif // UNIQUE_IDENTIFIER_MSGS__MSG__UUID_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__traits.hpp deleted file mode 100644 index ff356bbbf..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__traits.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/ImageMarker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/image_marker__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'position' -#include "geometry_msgs/msg/detail/point__traits.hpp" -// Member 'outline_color' -// Member 'fill_color' -#include "std_msgs/msg/detail/color_rgba__traits.hpp" -// Member 'lifetime' -#include "builtin_interfaces/msg/detail/duration__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::ImageMarker"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/ImageMarker"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.c deleted file mode 100644 index 15150c109..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.c +++ /dev/null @@ -1,367 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/ImageMarker.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/image_marker__functions.h" -#include "visualization_msgs/msg/detail/image_marker__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `ns` -#include "rosidl_runtime_c/string_functions.h" -// Member `position` -// Member `points` -#include "geometry_msgs/msg/point.h" -// Member `position` -// Member `points` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" -// Member `outline_color` -// Member `fill_color` -// Member `outline_colors` -#include "std_msgs/msg/color_rgba.h" -// Member `outline_color` -// Member `fill_color` -// Member `outline_colors` -#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" -// Member `lifetime` -#include "builtin_interfaces/msg/duration.h" -// Member `lifetime` -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_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; - visualization_msgs__msg__ImageMarker__init(message_memory); -} - -void ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_fini_function(void * message_memory) -{ - visualization_msgs__msg__ImageMarker__fini(message_memory); -} - -size_t ImageMarker__rosidl_typesupport_introspection_c__size_function__Point__points( - const void * untyped_member) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return member->size; -} - -const void * ImageMarker__rosidl_typesupport_introspection_c__get_const_function__Point__points( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ImageMarker__rosidl_typesupport_introspection_c__get_function__Point__points( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ImageMarker__rosidl_typesupport_introspection_c__resize_function__Point__points( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - geometry_msgs__msg__Point__Sequence__fini(member); - return geometry_msgs__msg__Point__Sequence__init(member, size); -} - -size_t ImageMarker__rosidl_typesupport_introspection_c__size_function__ColorRGBA__outline_colors( - const void * untyped_member) -{ - const std_msgs__msg__ColorRGBA__Sequence * member = - (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return member->size; -} - -const void * ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ColorRGBA__outline_colors( - const void * untyped_member, size_t index) -{ - const std_msgs__msg__ColorRGBA__Sequence * member = - (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * ImageMarker__rosidl_typesupport_introspection_c__get_function__ColorRGBA__outline_colors( - void * untyped_member, size_t index) -{ - std_msgs__msg__ColorRGBA__Sequence * member = - (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool ImageMarker__rosidl_typesupport_introspection_c__resize_function__ColorRGBA__outline_colors( - void * untyped_member, size_t size) -{ - std_msgs__msg__ColorRGBA__Sequence * member = - (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - std_msgs__msg__ColorRGBA__Sequence__fini(member); - return std_msgs__msg__ColorRGBA__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[13] = { - { - "header", // 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(visualization_msgs__msg__ImageMarker, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ns", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, ns), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "action", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, action), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "position", // 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(visualization_msgs__msg__ImageMarker, position), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "scale", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, scale), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "outline_color", // 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(visualization_msgs__msg__ImageMarker, outline_color), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "filled", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, filled), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "fill_color", // 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(visualization_msgs__msg__ImageMarker, fill_color), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "lifetime", // 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(visualization_msgs__msg__ImageMarker, lifetime), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, points), // bytes offset in struct - NULL, // default value - ImageMarker__rosidl_typesupport_introspection_c__size_function__Point__points, // size() function pointer - ImageMarker__rosidl_typesupport_introspection_c__get_const_function__Point__points, // get_const(index) function pointer - ImageMarker__rosidl_typesupport_introspection_c__get_function__Point__points, // get(index) function pointer - ImageMarker__rosidl_typesupport_introspection_c__resize_function__Point__points // resize(index) function pointer - }, - { - "outline_colors", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__ImageMarker, outline_colors), // bytes offset in struct - NULL, // default value - ImageMarker__rosidl_typesupport_introspection_c__size_function__ColorRGBA__outline_colors, // size() function pointer - ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ColorRGBA__outline_colors, // get_const(index) function pointer - ImageMarker__rosidl_typesupport_introspection_c__get_function__ColorRGBA__outline_colors, // get(index) function pointer - ImageMarker__rosidl_typesupport_introspection_c__resize_function__ColorRGBA__outline_colors // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_members = { - "visualization_msgs__msg", // message namespace - "ImageMarker", // message name - 13, // number of fields - sizeof(visualization_msgs__msg__ImageMarker), - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array, // message members - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_init_function, // function to initialize message memory (memory has to be allocated) - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_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 ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle = { - 0, - &ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, ImageMarker)() { - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[7].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[9].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[10].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[11].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[12].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); - if (!ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle.typesupport_identifier) { - ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.h deleted file mode 100644 index f923b3e2e..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.h +++ /dev/null @@ -1,59 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/InteractiveMarker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__struct.h" -// Member 'name' -// Member 'description' -#include "rosidl_runtime_c/string.h" -// Member 'menu_entries' -#include "visualization_msgs/msg/detail/menu_entry__struct.h" -// Member 'controls' -#include "visualization_msgs/msg/detail/interactive_marker_control__struct.h" - -// Struct defined in msg/InteractiveMarker in the package visualization_msgs. -typedef struct visualization_msgs__msg__InteractiveMarker -{ - std_msgs__msg__Header header; - geometry_msgs__msg__Pose pose; - rosidl_runtime_c__String name; - rosidl_runtime_c__String description; - float scale; - visualization_msgs__msg__MenuEntry__Sequence menu_entries; - visualization_msgs__msg__InteractiveMarkerControl__Sequence controls; -} visualization_msgs__msg__InteractiveMarker; - -// Struct for a sequence of visualization_msgs__msg__InteractiveMarker. -typedef struct visualization_msgs__msg__InteractiveMarker__Sequence -{ - visualization_msgs__msg__InteractiveMarker * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__InteractiveMarker__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__traits.hpp deleted file mode 100644 index a4ed019a8..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarker"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarker"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.c deleted file mode 100644 index 80060cf64..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.c +++ /dev/null @@ -1,266 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarker.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -// Member `name` -// Member `description` -#include "rosidl_runtime_c/string_functions.h" -// Member `menu_entries` -#include "visualization_msgs/msg/menu_entry.h" -// Member `menu_entries` -#include "visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h" -// Member `controls` -#include "visualization_msgs/msg/interactive_marker_control.h" -// Member `controls` -#include "visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_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; - visualization_msgs__msg__InteractiveMarker__init(message_memory); -} - -void InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarker__fini(message_memory); -} - -size_t InteractiveMarker__rosidl_typesupport_introspection_c__size_function__MenuEntry__menu_entries( - const void * untyped_member) -{ - const visualization_msgs__msg__MenuEntry__Sequence * member = - (const visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__MenuEntry__menu_entries( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__MenuEntry__Sequence * member = - (const visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarker__rosidl_typesupport_introspection_c__get_function__MenuEntry__menu_entries( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__MenuEntry__Sequence * member = - (visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__MenuEntry__menu_entries( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__MenuEntry__Sequence * member = - (visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); - visualization_msgs__msg__MenuEntry__Sequence__fini(member); - return visualization_msgs__msg__MenuEntry__Sequence__init(member, size); -} - -size_t InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerControl__controls( - const void * untyped_member) -{ - const visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = - (const visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerControl__controls( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = - (const visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerControl__controls( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = - (visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerControl__controls( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = - (visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); - visualization_msgs__msg__InteractiveMarkerControl__Sequence__fini(member); - return visualization_msgs__msg__InteractiveMarkerControl__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[7] = { - { - "header", // 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(visualization_msgs__msg__InteractiveMarker, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(visualization_msgs__msg__InteractiveMarker, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarker, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "description", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarker, description), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "scale", // name - rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarker, scale), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "menu_entries", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarker, menu_entries), // bytes offset in struct - NULL, // default value - InteractiveMarker__rosidl_typesupport_introspection_c__size_function__MenuEntry__menu_entries, // size() function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__MenuEntry__menu_entries, // get_const(index) function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__get_function__MenuEntry__menu_entries, // get(index) function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__MenuEntry__menu_entries // resize(index) function pointer - }, - { - "controls", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarker, controls), // bytes offset in struct - NULL, // default value - InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerControl__controls, // size() function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerControl__controls, // get_const(index) function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerControl__controls, // get(index) function pointer - InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerControl__controls // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarker", // message name - 7, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarker), - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array, // message members - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_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 InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle = { - 0, - &InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)() { - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MenuEntry)(); - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[6].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerControl)(); - if (!InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle.typesupport_identifier) { - InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.h deleted file mode 100644 index c64dc6a2d..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.h +++ /dev/null @@ -1,134 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/InteractiveMarkerControl.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'INHERIT'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__INHERIT = 0 -}; - -/// Constant 'FIXED'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__FIXED = 1 -}; - -/// Constant 'VIEW_FACING'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__VIEW_FACING = 2 -}; - -/// Constant 'NONE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__NONE = 0 -}; - -/// Constant 'MENU'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MENU = 1 -}; - -/// Constant 'BUTTON'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__BUTTON = 2 -}; - -/// Constant 'MOVE_AXIS'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MOVE_AXIS = 3 -}; - -/// Constant 'MOVE_PLANE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MOVE_PLANE = 4 -}; - -/// Constant 'ROTATE_AXIS'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__ROTATE_AXIS = 5 -}; - -/// Constant 'MOVE_ROTATE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MOVE_ROTATE = 6 -}; - -/// Constant 'MOVE_3D'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MOVE_3D = 7 -}; - -/// Constant 'ROTATE_3D'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__ROTATE_3D = 8 -}; - -/// Constant 'MOVE_ROTATE_3D'. -enum -{ - visualization_msgs__msg__InteractiveMarkerControl__MOVE_ROTATE_3D = 9 -}; - -// Include directives for member types -// Member 'name' -// Member 'description' -#include "rosidl_runtime_c/string.h" -// Member 'orientation' -#include "geometry_msgs/msg/detail/quaternion__struct.h" -// Member 'markers' -#include "visualization_msgs/msg/detail/marker__struct.h" - -// Struct defined in msg/InteractiveMarkerControl in the package visualization_msgs. -typedef struct visualization_msgs__msg__InteractiveMarkerControl -{ - rosidl_runtime_c__String name; - geometry_msgs__msg__Quaternion orientation; - uint8_t orientation_mode; - uint8_t interaction_mode; - bool always_visible; - visualization_msgs__msg__Marker__Sequence markers; - bool independent_marker_orientation; - rosidl_runtime_c__String description; -} visualization_msgs__msg__InteractiveMarkerControl; - -// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerControl. -typedef struct visualization_msgs__msg__InteractiveMarkerControl__Sequence -{ - visualization_msgs__msg__InteractiveMarkerControl * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__InteractiveMarkerControl__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp deleted file mode 100644 index 8cefdca29..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarkerControl.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker_control__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'orientation' -#include "geometry_msgs/msg/detail/quaternion__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarkerControl"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarkerControl"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.c deleted file mode 100644 index ff6048a03..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.c +++ /dev/null @@ -1,236 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarkerControl.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_control__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker_control__struct.h" - - -// Include directives for member types -// Member `name` -// Member `description` -#include "rosidl_runtime_c/string_functions.h" -// Member `orientation` -#include "geometry_msgs/msg/quaternion.h" -// Member `orientation` -#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" -// Member `markers` -#include "visualization_msgs/msg/marker.h" -// Member `markers` -#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_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; - visualization_msgs__msg__InteractiveMarkerControl__init(message_memory); -} - -void InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarkerControl__fini(message_memory); -} - -size_t InteractiveMarkerControl__rosidl_typesupport_introspection_c__size_function__Marker__markers( - const void * untyped_member) -{ - const visualization_msgs__msg__Marker__Sequence * member = - (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_const_function__Marker__markers( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__Marker__Sequence * member = - (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_function__Marker__markers( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__Marker__Sequence * member = - (visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarkerControl__rosidl_typesupport_introspection_c__resize_function__Marker__markers( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__Marker__Sequence * member = - (visualization_msgs__msg__Marker__Sequence *)(untyped_member); - visualization_msgs__msg__Marker__Sequence__fini(member); - return visualization_msgs__msg__Marker__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[8] = { - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "orientation", // 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(visualization_msgs__msg__InteractiveMarkerControl, orientation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "orientation_mode", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, orientation_mode), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "interaction_mode", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, interaction_mode), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "always_visible", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, always_visible), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "markers", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, markers), // bytes offset in struct - NULL, // default value - InteractiveMarkerControl__rosidl_typesupport_introspection_c__size_function__Marker__markers, // size() function pointer - InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_const_function__Marker__markers, // get_const(index) function pointer - InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_function__Marker__markers, // get(index) function pointer - InteractiveMarkerControl__rosidl_typesupport_introspection_c__resize_function__Marker__markers // resize(index) function pointer - }, - { - "independent_marker_orientation", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, independent_marker_orientation), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "description", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerControl, description), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarkerControl", // message name - 8, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarkerControl), - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array, // message members - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_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 InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle = { - 0, - &InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerControl)() { - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)(); - if (!InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle.typesupport_identifier) { - InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h deleted file mode 100644 index bb10704e9..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h +++ /dev/null @@ -1,96 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'KEEP_ALIVE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__KEEP_ALIVE = 0 -}; - -/// Constant 'POSE_UPDATE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__POSE_UPDATE = 1 -}; - -/// Constant 'MENU_SELECT'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__MENU_SELECT = 2 -}; - -/// Constant 'BUTTON_CLICK'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__BUTTON_CLICK = 3 -}; - -/// Constant 'MOUSE_DOWN'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__MOUSE_DOWN = 4 -}; - -/// Constant 'MOUSE_UP'. -enum -{ - visualization_msgs__msg__InteractiveMarkerFeedback__MOUSE_UP = 5 -}; - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'client_id' -// Member 'marker_name' -// Member 'control_name' -#include "rosidl_runtime_c/string.h" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__struct.h" -// Member 'mouse_point' -#include "geometry_msgs/msg/detail/point__struct.h" - -// Struct defined in msg/InteractiveMarkerFeedback in the package visualization_msgs. -typedef struct visualization_msgs__msg__InteractiveMarkerFeedback -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String client_id; - rosidl_runtime_c__String marker_name; - rosidl_runtime_c__String control_name; - uint8_t event_type; - geometry_msgs__msg__Pose pose; - uint32_t menu_entry_id; - geometry_msgs__msg__Point mouse_point; - bool mouse_point_valid; -} visualization_msgs__msg__InteractiveMarkerFeedback; - -// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerFeedback. -typedef struct visualization_msgs__msg__InteractiveMarkerFeedback__Sequence -{ - visualization_msgs__msg__InteractiveMarkerFeedback * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__InteractiveMarkerFeedback__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp deleted file mode 100644 index 2c6e7fee9..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" -// Member 'mouse_point' -#include "geometry_msgs/msg/detail/point__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarkerFeedback"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarkerFeedback"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c deleted file mode 100644 index ce0ac9578..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c +++ /dev/null @@ -1,225 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_feedback__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `client_id` -// Member `marker_name` -// Member `control_name` -#include "rosidl_runtime_c/string_functions.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -// Member `mouse_point` -#include "geometry_msgs/msg/point.h" -// Member `mouse_point` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_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; - visualization_msgs__msg__InteractiveMarkerFeedback__init(message_memory); -} - -void InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarkerFeedback__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[9] = { - { - "header", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "client_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, client_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "marker_name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, marker_name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "control_name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, control_name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "event_type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, event_type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "menu_entry_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, menu_entry_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "mouse_point", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, mouse_point), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "mouse_point_valid", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, mouse_point_valid), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarkerFeedback", // message name - 9, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarkerFeedback), - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array, // message members - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_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 InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle = { - 0, - &InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerFeedback)() { - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[7].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - if (!InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle.typesupport_identifier) { - InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.h deleted file mode 100644 index e97db4906..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.h +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/InteractiveMarkerInit.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -// Include directives for member types -// Member 'server_id' -#include "rosidl_runtime_c/string.h" -// Member 'markers' -#include "visualization_msgs/msg/detail/interactive_marker__struct.h" - -// Struct defined in msg/InteractiveMarkerInit in the package visualization_msgs. -typedef struct visualization_msgs__msg__InteractiveMarkerInit -{ - rosidl_runtime_c__String server_id; - uint64_t seq_num; - visualization_msgs__msg__InteractiveMarker__Sequence markers; -} visualization_msgs__msg__InteractiveMarkerInit; - -// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerInit. -typedef struct visualization_msgs__msg__InteractiveMarkerInit__Sequence -{ - visualization_msgs__msg__InteractiveMarkerInit * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__InteractiveMarkerInit__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp deleted file mode 100644 index 1f7bcdb72..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarkerInit.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker_init__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarkerInit"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarkerInit"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.c deleted file mode 100644 index 9f742be5c..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.c +++ /dev/null @@ -1,154 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarkerInit.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_init__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker_init__struct.h" - - -// Include directives for member types -// Member `server_id` -#include "rosidl_runtime_c/string_functions.h" -// Member `markers` -#include "visualization_msgs/msg/interactive_marker.h" -// Member `markers` -#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_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; - visualization_msgs__msg__InteractiveMarkerInit__init(message_memory); -} - -void InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarkerInit__fini(message_memory); -} - -size_t InteractiveMarkerInit__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers( - const void * untyped_member) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarkerInit__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); - return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array[3] = { - { - "server_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerInit, server_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "seq_num", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerInit, seq_num), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "markers", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerInit, markers), // bytes offset in struct - NULL, // default value - InteractiveMarkerInit__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers, // size() function pointer - InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers, // get_const(index) function pointer - InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers, // get(index) function pointer - InteractiveMarkerInit__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarkerInit", // message name - 3, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarkerInit), - InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array, // message members - InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_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 InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle = { - 0, - &InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerInit)() { - InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array[2].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); - if (!InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle.typesupport_identifier) { - InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp deleted file mode 100644 index 71a4b512e..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarkerPose.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarkerPose"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarkerPose"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c deleted file mode 100644 index 7eef50ad4..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c +++ /dev/null @@ -1,127 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarkerPose.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_pose__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -// Member `name` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_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; - visualization_msgs__msg__InteractiveMarkerPose__init(message_memory); -} - -void InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarkerPose__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[3] = { - { - "header", // 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(visualization_msgs__msg__InteractiveMarkerPose, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(visualization_msgs__msg__InteractiveMarkerPose, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "name", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerPose, name), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarkerPose", // message name - 3, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarkerPose), - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array, // message members - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_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 InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle = { - 0, - &InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerPose)() { - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - if (!InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle.typesupport_identifier) { - InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.h deleted file mode 100644 index abb78a697..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.h +++ /dev/null @@ -1,66 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'KEEP_ALIVE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerUpdate__KEEP_ALIVE = 0 -}; - -/// Constant 'UPDATE'. -enum -{ - visualization_msgs__msg__InteractiveMarkerUpdate__UPDATE = 1 -}; - -// Include directives for member types -// Member 'server_id' -// Member 'erases' -#include "rosidl_runtime_c/string.h" -// Member 'markers' -#include "visualization_msgs/msg/detail/interactive_marker__struct.h" -// Member 'poses' -#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.h" - -// Struct defined in msg/InteractiveMarkerUpdate in the package visualization_msgs. -typedef struct visualization_msgs__msg__InteractiveMarkerUpdate -{ - rosidl_runtime_c__String server_id; - uint64_t seq_num; - uint8_t type; - visualization_msgs__msg__InteractiveMarker__Sequence markers; - visualization_msgs__msg__InteractiveMarkerPose__Sequence poses; - rosidl_runtime_c__String__Sequence erases; -} visualization_msgs__msg__InteractiveMarkerUpdate; - -// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerUpdate. -typedef struct visualization_msgs__msg__InteractiveMarkerUpdate__Sequence -{ - visualization_msgs__msg__InteractiveMarkerUpdate * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__InteractiveMarkerUpdate__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp deleted file mode 100644 index d23ee84e3..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/interactive_marker_update__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::InteractiveMarkerUpdate"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/InteractiveMarkerUpdate"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.c deleted file mode 100644 index 55845eaaa..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.c +++ /dev/null @@ -1,239 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_update__functions.h" -#include "visualization_msgs/msg/detail/interactive_marker_update__struct.h" - - -// Include directives for member types -// Member `server_id` -// Member `erases` -#include "rosidl_runtime_c/string_functions.h" -// Member `markers` -#include "visualization_msgs/msg/interactive_marker.h" -// Member `markers` -#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" -// Member `poses` -#include "visualization_msgs/msg/interactive_marker_pose.h" -// Member `poses` -#include "visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_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; - visualization_msgs__msg__InteractiveMarkerUpdate__init(message_memory); -} - -void InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_fini_function(void * message_memory) -{ - visualization_msgs__msg__InteractiveMarkerUpdate__fini(message_memory); -} - -size_t InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers( - const void * untyped_member) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); - return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); -} - -size_t InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerPose__poses( - const void * untyped_member) -{ - const visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = - (const visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); - return member->size; -} - -const void * InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerPose__poses( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = - (const visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerPose__poses( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = - (visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerPose__poses( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = - (visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); - visualization_msgs__msg__InteractiveMarkerPose__Sequence__fini(member); - return visualization_msgs__msg__InteractiveMarkerPose__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[6] = { - { - "server_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, server_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "seq_num", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, seq_num), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "markers", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, markers), // bytes offset in struct - NULL, // default value - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers, // size() function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers, // get_const(index) function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers, // get(index) function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers // resize(index) function pointer - }, - { - "poses", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, poses), // bytes offset in struct - NULL, // default value - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerPose__poses, // size() function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerPose__poses, // get_const(index) function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerPose__poses, // get(index) function pointer - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerPose__poses // resize(index) function pointer - }, - { - "erases", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, erases), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_members = { - "visualization_msgs__msg", // message namespace - "InteractiveMarkerUpdate", // message name - 6, // number of fields - sizeof(visualization_msgs__msg__InteractiveMarkerUpdate), - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array, // message members - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_init_function, // function to initialize message memory (memory has to be allocated) - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_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 InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle = { - 0, - &InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerUpdate)() { - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[3].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[4].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerPose)(); - if (!InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle.typesupport_identifier) { - InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.h deleted file mode 100644 index 2745c9bd6..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.h +++ /dev/null @@ -1,169 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/Marker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'ARROW'. -enum -{ - visualization_msgs__msg__Marker__ARROW = 0l -}; - -/// Constant 'CUBE'. -enum -{ - visualization_msgs__msg__Marker__CUBE = 1l -}; - -/// Constant 'SPHERE'. -enum -{ - visualization_msgs__msg__Marker__SPHERE = 2l -}; - -/// Constant 'CYLINDER'. -enum -{ - visualization_msgs__msg__Marker__CYLINDER = 3l -}; - -/// Constant 'LINE_STRIP'. -enum -{ - visualization_msgs__msg__Marker__LINE_STRIP = 4l -}; - -/// Constant 'LINE_LIST'. -enum -{ - visualization_msgs__msg__Marker__LINE_LIST = 5l -}; - -/// Constant 'CUBE_LIST'. -enum -{ - visualization_msgs__msg__Marker__CUBE_LIST = 6l -}; - -/// Constant 'SPHERE_LIST'. -enum -{ - visualization_msgs__msg__Marker__SPHERE_LIST = 7l -}; - -/// Constant 'POINTS'. -enum -{ - visualization_msgs__msg__Marker__POINTS = 8l -}; - -/// Constant 'TEXT_VIEW_FACING'. -enum -{ - visualization_msgs__msg__Marker__TEXT_VIEW_FACING = 9l -}; - -/// Constant 'MESH_RESOURCE'. -enum -{ - visualization_msgs__msg__Marker__MESH_RESOURCE = 10l -}; - -/// Constant 'TRIANGLE_LIST'. -enum -{ - visualization_msgs__msg__Marker__TRIANGLE_LIST = 11l -}; - -/// Constant 'ADD'. -enum -{ - visualization_msgs__msg__Marker__ADD = 0l -}; - -/// Constant 'MODIFY'. -enum -{ - visualization_msgs__msg__Marker__MODIFY = 0l -}; - -/// Constant 'DELETE'. -enum -{ - visualization_msgs__msg__Marker__DELETE = 2l -}; - -/// Constant 'DELETEALL'. -enum -{ - visualization_msgs__msg__Marker__DELETEALL = 3l -}; - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.h" -// Member 'ns' -// Member 'text' -// Member 'mesh_resource' -#include "rosidl_runtime_c/string.h" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__struct.h" -// Member 'scale' -#include "geometry_msgs/msg/detail/vector3__struct.h" -// Member 'color' -// Member 'colors' -#include "std_msgs/msg/detail/color_rgba__struct.h" -// Member 'lifetime' -#include "builtin_interfaces/msg/detail/duration__struct.h" -// Member 'points' -#include "geometry_msgs/msg/detail/point__struct.h" - -// Struct defined in msg/Marker in the package visualization_msgs. -typedef struct visualization_msgs__msg__Marker -{ - std_msgs__msg__Header header; - rosidl_runtime_c__String ns; - int32_t id; - int32_t type; - int32_t action; - geometry_msgs__msg__Pose pose; - geometry_msgs__msg__Vector3 scale; - std_msgs__msg__ColorRGBA color; - builtin_interfaces__msg__Duration lifetime; - bool frame_locked; - geometry_msgs__msg__Point__Sequence points; - std_msgs__msg__ColorRGBA__Sequence colors; - rosidl_runtime_c__String text; - rosidl_runtime_c__String mesh_resource; - bool mesh_use_embedded_materials; -} visualization_msgs__msg__Marker; - -// Struct for a sequence of visualization_msgs__msg__Marker. -typedef struct visualization_msgs__msg__Marker__Sequence -{ - visualization_msgs__msg__Marker * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__Marker__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.hpp deleted file mode 100644 index a80218023..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__struct.hpp +++ /dev/null @@ -1,425 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em -// with input from visualization_msgs:msg/Marker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ - -#include -#include -#include -#include -#include -#include -#include - - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__struct.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__struct.hpp" -// Member 'scale' -#include "geometry_msgs/msg/detail/vector3__struct.hpp" -// Member 'color' -// Member 'colors' -#include "std_msgs/msg/detail/color_rgba__struct.hpp" -// Member 'lifetime' -#include "builtin_interfaces/msg/detail/duration__struct.hpp" -// Member 'points' -#include "geometry_msgs/msg/detail/point__struct.hpp" - -#ifndef _WIN32 -# define DEPRECATED__visualization_msgs__msg__Marker __attribute__((deprecated)) -#else -# define DEPRECATED__visualization_msgs__msg__Marker __declspec(deprecated) -#endif - -namespace visualization_msgs -{ - -namespace msg -{ - -// message struct -template -struct Marker_ -{ - using Type = Marker_; - - explicit Marker_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_init), - pose(_init), - scale(_init), - color(_init), - lifetime(_init) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->ns = ""; - this->id = 0l; - this->type = 0l; - this->action = 0l; - this->frame_locked = false; - this->text = ""; - this->mesh_resource = ""; - this->mesh_use_embedded_materials = false; - } - } - - explicit Marker_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) - : header(_alloc, _init), - ns(_alloc), - pose(_alloc, _init), - scale(_alloc, _init), - color(_alloc, _init), - lifetime(_alloc, _init), - text(_alloc), - mesh_resource(_alloc) - { - if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || - rosidl_runtime_cpp::MessageInitialization::ZERO == _init) - { - this->ns = ""; - this->id = 0l; - this->type = 0l; - this->action = 0l; - this->frame_locked = false; - this->text = ""; - this->mesh_resource = ""; - this->mesh_use_embedded_materials = false; - } - } - - // field types and members - using _header_type = - std_msgs::msg::Header_; - _header_type header; - using _ns_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _ns_type ns; - using _id_type = - int32_t; - _id_type id; - using _type_type = - int32_t; - _type_type type; - using _action_type = - int32_t; - _action_type action; - using _pose_type = - geometry_msgs::msg::Pose_; - _pose_type pose; - using _scale_type = - geometry_msgs::msg::Vector3_; - _scale_type scale; - using _color_type = - std_msgs::msg::ColorRGBA_; - _color_type color; - using _lifetime_type = - builtin_interfaces::msg::Duration_; - _lifetime_type lifetime; - using _frame_locked_type = - bool; - _frame_locked_type frame_locked; - using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _points_type points; - using _colors_type = - std::vector, typename ContainerAllocator::template rebind>::other>; - _colors_type colors; - using _text_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _text_type text; - using _mesh_resource_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; - _mesh_resource_type mesh_resource; - using _mesh_use_embedded_materials_type = - bool; - _mesh_use_embedded_materials_type mesh_use_embedded_materials; - - // setters for named parameter idiom - Type & set__header( - const std_msgs::msg::Header_ & _arg) - { - this->header = _arg; - return *this; - } - Type & set__ns( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->ns = _arg; - return *this; - } - Type & set__id( - const int32_t & _arg) - { - this->id = _arg; - return *this; - } - Type & set__type( - const int32_t & _arg) - { - this->type = _arg; - return *this; - } - Type & set__action( - const int32_t & _arg) - { - this->action = _arg; - return *this; - } - Type & set__pose( - const geometry_msgs::msg::Pose_ & _arg) - { - this->pose = _arg; - return *this; - } - Type & set__scale( - const geometry_msgs::msg::Vector3_ & _arg) - { - this->scale = _arg; - return *this; - } - Type & set__color( - const std_msgs::msg::ColorRGBA_ & _arg) - { - this->color = _arg; - return *this; - } - Type & set__lifetime( - const builtin_interfaces::msg::Duration_ & _arg) - { - this->lifetime = _arg; - return *this; - } - Type & set__frame_locked( - const bool & _arg) - { - this->frame_locked = _arg; - return *this; - } - Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->points = _arg; - return *this; - } - Type & set__colors( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) - { - this->colors = _arg; - return *this; - } - Type & set__text( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->text = _arg; - return *this; - } - Type & set__mesh_resource( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) - { - this->mesh_resource = _arg; - return *this; - } - Type & set__mesh_use_embedded_materials( - const bool & _arg) - { - this->mesh_use_embedded_materials = _arg; - return *this; - } - - // constant declarations - static constexpr int32_t ARROW = - 0; - static constexpr int32_t CUBE = - 1; - static constexpr int32_t SPHERE = - 2; - static constexpr int32_t CYLINDER = - 3; - static constexpr int32_t LINE_STRIP = - 4; - static constexpr int32_t LINE_LIST = - 5; - static constexpr int32_t CUBE_LIST = - 6; - static constexpr int32_t SPHERE_LIST = - 7; - static constexpr int32_t POINTS = - 8; - static constexpr int32_t TEXT_VIEW_FACING = - 9; - static constexpr int32_t MESH_RESOURCE = - 10; - static constexpr int32_t TRIANGLE_LIST = - 11; - static constexpr int32_t ADD = - 0; - static constexpr int32_t MODIFY = - 0; - // guard against 'DELETE' being predefined by MSVC by temporarily undefining it -#if defined(_WIN32) -# if defined(DELETE) -# pragma push_macro("DELETE") -# undef DELETE -# endif -#endif - static constexpr int32_t DELETE = - 2; -#if defined(_WIN32) -# pragma warning(suppress : 4602) -# pragma pop_macro("DELETE") -#endif - static constexpr int32_t DELETEALL = - 3; - - // pointer types - using RawPtr = - visualization_msgs::msg::Marker_ *; - using ConstRawPtr = - const visualization_msgs::msg::Marker_ *; - using SharedPtr = - std::shared_ptr>; - using ConstSharedPtr = - std::shared_ptr const>; - - template>> - using UniquePtrWithDeleter = - std::unique_ptr, Deleter>; - - using UniquePtr = UniquePtrWithDeleter<>; - - template>> - using ConstUniquePtrWithDeleter = - std::unique_ptr const, Deleter>; - using ConstUniquePtr = ConstUniquePtrWithDeleter<>; - - using WeakPtr = - std::weak_ptr>; - using ConstWeakPtr = - std::weak_ptr 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__visualization_msgs__msg__Marker - std::shared_ptr> - Ptr; - typedef DEPRECATED__visualization_msgs__msg__Marker - std::shared_ptr const> - ConstPtr; - - // comparison operators - bool operator==(const Marker_ & other) const - { - if (this->header != other.header) { - return false; - } - if (this->ns != other.ns) { - return false; - } - if (this->id != other.id) { - return false; - } - if (this->type != other.type) { - return false; - } - if (this->action != other.action) { - return false; - } - if (this->pose != other.pose) { - return false; - } - if (this->scale != other.scale) { - return false; - } - if (this->color != other.color) { - return false; - } - if (this->lifetime != other.lifetime) { - return false; - } - if (this->frame_locked != other.frame_locked) { - return false; - } - if (this->points != other.points) { - return false; - } - if (this->colors != other.colors) { - return false; - } - if (this->text != other.text) { - return false; - } - if (this->mesh_resource != other.mesh_resource) { - return false; - } - if (this->mesh_use_embedded_materials != other.mesh_use_embedded_materials) { - return false; - } - return true; - } - bool operator!=(const Marker_ & other) const - { - return !this->operator==(other); - } -}; // struct Marker_ - -// alias to use template instance with default allocator -using Marker = - visualization_msgs::msg::Marker_>; - -// constant definitions -template -constexpr int32_t Marker_::ARROW; -template -constexpr int32_t Marker_::CUBE; -template -constexpr int32_t Marker_::SPHERE; -template -constexpr int32_t Marker_::CYLINDER; -template -constexpr int32_t Marker_::LINE_STRIP; -template -constexpr int32_t Marker_::LINE_LIST; -template -constexpr int32_t Marker_::CUBE_LIST; -template -constexpr int32_t Marker_::SPHERE_LIST; -template -constexpr int32_t Marker_::POINTS; -template -constexpr int32_t Marker_::TEXT_VIEW_FACING; -template -constexpr int32_t Marker_::MESH_RESOURCE; -template -constexpr int32_t Marker_::TRIANGLE_LIST; -template -constexpr int32_t Marker_::ADD; -template -constexpr int32_t Marker_::MODIFY; -// guard against 'DELETE' being predefined by MSVC by temporarily undefining it -#if defined(_WIN32) -# if defined(DELETE) -# pragma push_macro("DELETE") -# undef DELETE -# endif -#endif -template -constexpr int32_t Marker_::DELETE; -#if defined(_WIN32) -# pragma warning(suppress : 4602) -# pragma pop_macro("DELETE") -#endif -template -constexpr int32_t Marker_::DELETEALL; - -} // namespace msg - -} // namespace visualization_msgs - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__traits.hpp deleted file mode 100644 index 28bb4c859..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__traits.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/Marker.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/marker__struct.hpp" -#include -#include -#include - -// Include directives for member types -// Member 'header' -#include "std_msgs/msg/detail/header__traits.hpp" -// Member 'pose' -#include "geometry_msgs/msg/detail/pose__traits.hpp" -// Member 'scale' -#include "geometry_msgs/msg/detail/vector3__traits.hpp" -// Member 'color' -#include "std_msgs/msg/detail/color_rgba__traits.hpp" -// Member 'lifetime' -#include "builtin_interfaces/msg/detail/duration__traits.hpp" - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::Marker"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/Marker"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.c deleted file mode 100644 index d6aef6062..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.c +++ /dev/null @@ -1,403 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/Marker.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/marker__functions.h" -#include "visualization_msgs/msg/detail/marker__struct.h" - - -// Include directives for member types -// Member `header` -#include "std_msgs/msg/header.h" -// Member `header` -#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" -// Member `ns` -// Member `text` -// Member `mesh_resource` -#include "rosidl_runtime_c/string_functions.h" -// Member `pose` -#include "geometry_msgs/msg/pose.h" -// Member `pose` -#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" -// Member `scale` -#include "geometry_msgs/msg/vector3.h" -// Member `scale` -#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" -// Member `color` -// Member `colors` -#include "std_msgs/msg/color_rgba.h" -// Member `color` -// Member `colors` -#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" -// Member `lifetime` -#include "builtin_interfaces/msg/duration.h" -// Member `lifetime` -#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" -// Member `points` -#include "geometry_msgs/msg/point.h" -// Member `points` -#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void Marker__rosidl_typesupport_introspection_c__Marker_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; - visualization_msgs__msg__Marker__init(message_memory); -} - -void Marker__rosidl_typesupport_introspection_c__Marker_fini_function(void * message_memory) -{ - visualization_msgs__msg__Marker__fini(message_memory); -} - -size_t Marker__rosidl_typesupport_introspection_c__size_function__Point__points( - const void * untyped_member) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return member->size; -} - -const void * Marker__rosidl_typesupport_introspection_c__get_const_function__Point__points( - const void * untyped_member, size_t index) -{ - const geometry_msgs__msg__Point__Sequence * member = - (const geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Marker__rosidl_typesupport_introspection_c__get_function__Point__points( - void * untyped_member, size_t index) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Marker__rosidl_typesupport_introspection_c__resize_function__Point__points( - void * untyped_member, size_t size) -{ - geometry_msgs__msg__Point__Sequence * member = - (geometry_msgs__msg__Point__Sequence *)(untyped_member); - geometry_msgs__msg__Point__Sequence__fini(member); - return geometry_msgs__msg__Point__Sequence__init(member, size); -} - -size_t Marker__rosidl_typesupport_introspection_c__size_function__ColorRGBA__colors( - const void * untyped_member) -{ - const std_msgs__msg__ColorRGBA__Sequence * member = - (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return member->size; -} - -const void * Marker__rosidl_typesupport_introspection_c__get_const_function__ColorRGBA__colors( - const void * untyped_member, size_t index) -{ - const std_msgs__msg__ColorRGBA__Sequence * member = - (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * Marker__rosidl_typesupport_introspection_c__get_function__ColorRGBA__colors( - void * untyped_member, size_t index) -{ - std_msgs__msg__ColorRGBA__Sequence * member = - (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool Marker__rosidl_typesupport_introspection_c__resize_function__ColorRGBA__colors( - void * untyped_member, size_t size) -{ - std_msgs__msg__ColorRGBA__Sequence * member = - (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); - std_msgs__msg__ColorRGBA__Sequence__fini(member); - return std_msgs__msg__ColorRGBA__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[15] = { - { - "header", // 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(visualization_msgs__msg__Marker, header), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "ns", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, ns), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "action", // name - rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, action), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "pose", // 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(visualization_msgs__msg__Marker, pose), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "scale", // 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(visualization_msgs__msg__Marker, scale), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "color", // 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(visualization_msgs__msg__Marker, color), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "lifetime", // 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(visualization_msgs__msg__Marker, lifetime), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "frame_locked", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, frame_locked), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "points", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, points), // bytes offset in struct - NULL, // default value - Marker__rosidl_typesupport_introspection_c__size_function__Point__points, // size() function pointer - Marker__rosidl_typesupport_introspection_c__get_const_function__Point__points, // get_const(index) function pointer - Marker__rosidl_typesupport_introspection_c__get_function__Point__points, // get(index) function pointer - Marker__rosidl_typesupport_introspection_c__resize_function__Point__points // resize(index) function pointer - }, - { - "colors", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, colors), // bytes offset in struct - NULL, // default value - Marker__rosidl_typesupport_introspection_c__size_function__ColorRGBA__colors, // size() function pointer - Marker__rosidl_typesupport_introspection_c__get_const_function__ColorRGBA__colors, // get_const(index) function pointer - Marker__rosidl_typesupport_introspection_c__get_function__ColorRGBA__colors, // get(index) function pointer - Marker__rosidl_typesupport_introspection_c__resize_function__ColorRGBA__colors // resize(index) function pointer - }, - { - "text", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, text), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "mesh_resource", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, mesh_resource), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "mesh_use_embedded_materials", // name - rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__Marker, mesh_use_embedded_materials), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers Marker__rosidl_typesupport_introspection_c__Marker_message_members = { - "visualization_msgs__msg", // message namespace - "Marker", // message name - 15, // number of fields - sizeof(visualization_msgs__msg__Marker), - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array, // message members - Marker__rosidl_typesupport_introspection_c__Marker_init_function, // function to initialize message memory (memory has to be allocated) - Marker__rosidl_typesupport_introspection_c__Marker_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 Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle = { - 0, - &Marker__rosidl_typesupport_introspection_c__Marker_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)() { - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[5].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[6].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[7].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[8].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[10].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); - Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[11].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); - if (!Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle.typesupport_identifier) { - Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.cpp deleted file mode 100644 index e106eae55..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.cpp +++ /dev/null @@ -1,371 +0,0 @@ -// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em -// with input from visualization_msgs:msg/Marker.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 "visualization_msgs/msg/detail/marker__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 visualization_msgs -{ - -namespace msg -{ - -namespace rosidl_typesupport_introspection_cpp -{ - -void Marker_init_function( - void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) -{ - new (message_memory) visualization_msgs::msg::Marker(_init); -} - -void Marker_fini_function(void * message_memory) -{ - auto typed_message = static_cast(message_memory); - typed_message->~Marker(); -} - -size_t size_function__Marker__points(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Marker__points(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Marker__points(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Marker__points(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -size_t size_function__Marker__colors(const void * untyped_member) -{ - const auto * member = reinterpret_cast *>(untyped_member); - return member->size(); -} - -const void * get_const_function__Marker__colors(const void * untyped_member, size_t index) -{ - const auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void * get_function__Marker__colors(void * untyped_member, size_t index) -{ - auto & member = - *reinterpret_cast *>(untyped_member); - return &member[index]; -} - -void resize_function__Marker__colors(void * untyped_member, size_t size) -{ - auto * member = - reinterpret_cast *>(untyped_member); - member->resize(size); -} - -static const ::rosidl_typesupport_introspection_cpp::MessageMember Marker_message_member_array[15] = { - { - "header", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, header), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "ns", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, ns), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "id", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, id), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "type", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, type), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "action", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, action), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "pose", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, pose), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "scale", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, scale), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "color", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, color), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "lifetime", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, lifetime), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "frame_locked", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, frame_locked), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "points", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, points), // bytes offset in struct - nullptr, // default value - size_function__Marker__points, // size() function pointer - get_const_function__Marker__points, // get_const(index) function pointer - get_function__Marker__points, // get(index) function pointer - resize_function__Marker__points // resize(index) function pointer - }, - { - "colors", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, colors), // bytes offset in struct - nullptr, // default value - size_function__Marker__colors, // size() function pointer - get_const_function__Marker__colors, // get_const(index) function pointer - get_function__Marker__colors, // get(index) function pointer - resize_function__Marker__colors // resize(index) function pointer - }, - { - "text", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, text), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "mesh_resource", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, mesh_resource), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - }, - { - "mesh_use_embedded_materials", // name - ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type - 0, // upper bound of string - nullptr, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs::msg::Marker, mesh_use_embedded_materials), // bytes offset in struct - nullptr, // default value - nullptr, // size() function pointer - nullptr, // get_const(index) function pointer - nullptr, // get(index) function pointer - nullptr // resize(index) function pointer - } -}; - -static const ::rosidl_typesupport_introspection_cpp::MessageMembers Marker_message_members = { - "visualization_msgs::msg", // message namespace - "Marker", // message name - 15, // number of fields - sizeof(visualization_msgs::msg::Marker), - Marker_message_member_array, // message members - Marker_init_function, // function to initialize message memory (memory has to be allocated) - Marker_fini_function // function to terminate message instance (will not free memory) -}; - -static const rosidl_message_type_support_t Marker_message_type_support_handle = { - ::rosidl_typesupport_introspection_cpp::typesupport_identifier, - &Marker_message_members, - get_message_typesupport_handle_function, -}; - -} // namespace rosidl_typesupport_introspection_cpp - -} // namespace msg - -} // namespace visualization_msgs - - -namespace rosidl_typesupport_introspection_cpp -{ - -template<> -ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC -const rosidl_message_type_support_t * -get_message_type_support_handle() -{ - return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::Marker_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, visualization_msgs, msg, Marker)() { - return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::Marker_message_type_support_handle; -} - -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__traits.hpp deleted file mode 100644 index 12d90d509..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/MarkerArray.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/marker_array__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::MarkerArray"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/MarkerArray"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.c deleted file mode 100644 index 6000c41c3..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.c +++ /dev/null @@ -1,122 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/MarkerArray.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/marker_array__functions.h" -#include "visualization_msgs/msg/detail/marker_array__struct.h" - - -// Include directives for member types -// Member `markers` -#include "visualization_msgs/msg/marker.h" -// Member `markers` -#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_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; - visualization_msgs__msg__MarkerArray__init(message_memory); -} - -void MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_fini_function(void * message_memory) -{ - visualization_msgs__msg__MarkerArray__fini(message_memory); -} - -size_t MarkerArray__rosidl_typesupport_introspection_c__size_function__Marker__markers( - const void * untyped_member) -{ - const visualization_msgs__msg__Marker__Sequence * member = - (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return member->size; -} - -const void * MarkerArray__rosidl_typesupport_introspection_c__get_const_function__Marker__markers( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__Marker__Sequence * member = - (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * MarkerArray__rosidl_typesupport_introspection_c__get_function__Marker__markers( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__Marker__Sequence * member = - (visualization_msgs__msg__Marker__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool MarkerArray__rosidl_typesupport_introspection_c__resize_function__Marker__markers( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__Marker__Sequence * member = - (visualization_msgs__msg__Marker__Sequence *)(untyped_member); - visualization_msgs__msg__Marker__Sequence__fini(member); - return visualization_msgs__msg__Marker__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array[1] = { - { - "markers", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MarkerArray, markers), // bytes offset in struct - NULL, // default value - MarkerArray__rosidl_typesupport_introspection_c__size_function__Marker__markers, // size() function pointer - MarkerArray__rosidl_typesupport_introspection_c__get_const_function__Marker__markers, // get_const(index) function pointer - MarkerArray__rosidl_typesupport_introspection_c__get_function__Marker__markers, // get(index) function pointer - MarkerArray__rosidl_typesupport_introspection_c__resize_function__Marker__markers // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_members = { - "visualization_msgs__msg", // message namespace - "MarkerArray", // message name - 1, // number of fields - sizeof(visualization_msgs__msg__MarkerArray), - MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array, // message members - MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_init_function, // function to initialize message memory (memory has to be allocated) - MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_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 MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle = { - 0, - &MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MarkerArray)() { - MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array[0].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)(); - if (!MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle.typesupport_identifier) { - MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.h b/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.h deleted file mode 100644 index 10c120d0a..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.h +++ /dev/null @@ -1,67 +0,0 @@ -// generated from rosidl_generator_c/resource/idl__struct.h.em -// with input from visualization_msgs:msg/MenuEntry.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include -#include -#include - - -// Constants defined in the message - -/// Constant 'FEEDBACK'. -enum -{ - visualization_msgs__msg__MenuEntry__FEEDBACK = 0 -}; - -/// Constant 'ROSRUN'. -enum -{ - visualization_msgs__msg__MenuEntry__ROSRUN = 1 -}; - -/// Constant 'ROSLAUNCH'. -enum -{ - visualization_msgs__msg__MenuEntry__ROSLAUNCH = 2 -}; - -// Include directives for member types -// Member 'title' -// Member 'command' -#include "rosidl_runtime_c/string.h" - -// Struct defined in msg/MenuEntry in the package visualization_msgs. -typedef struct visualization_msgs__msg__MenuEntry -{ - uint32_t id; - uint32_t parent_id; - rosidl_runtime_c__String title; - rosidl_runtime_c__String command; - uint8_t command_type; -} visualization_msgs__msg__MenuEntry; - -// Struct for a sequence of visualization_msgs__msg__MenuEntry. -typedef struct visualization_msgs__msg__MenuEntry__Sequence -{ - visualization_msgs__msg__MenuEntry * data; - /// The number of valid items in data - size_t size; - /// The number of allocated items in data - size_t capacity; -} visualization_msgs__msg__MenuEntry__Sequence; - -#ifdef __cplusplus -} -#endif - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__traits.hpp b/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__traits.hpp deleted file mode 100644 index 03802f193..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:msg/MenuEntry.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ -#define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ - -#include "visualization_msgs/msg/detail/menu_entry__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::msg::MenuEntry"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/msg/MenuEntry"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.c b/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.c deleted file mode 100644 index 6de1a881d..000000000 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.c +++ /dev/null @@ -1,146 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:msg/MenuEntry.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/msg/detail/menu_entry__functions.h" -#include "visualization_msgs/msg/detail/menu_entry__struct.h" - - -// Include directives for member types -// Member `title` -// Member `command` -#include "rosidl_runtime_c/string_functions.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_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; - visualization_msgs__msg__MenuEntry__init(message_memory); -} - -void MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_fini_function(void * message_memory) -{ - visualization_msgs__msg__MenuEntry__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_member_array[5] = { - { - "id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MenuEntry, id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "parent_id", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MenuEntry, parent_id), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "title", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MenuEntry, title), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "command", // name - rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MenuEntry, command), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "command_type", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__msg__MenuEntry, command_type), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_members = { - "visualization_msgs__msg", // message namespace - "MenuEntry", // message name - 5, // number of fields - sizeof(visualization_msgs__msg__MenuEntry), - MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_member_array, // message members - MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_init_function, // function to initialize message memory (memory has to be allocated) - MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_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 MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle = { - 0, - &MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MenuEntry)() { - if (!MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle.typesupport_identifier) { - MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp b/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp deleted file mode 100644 index bae97a581..000000000 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em -// with input from visualization_msgs:srv/GetInteractiveMarkers.idl -// generated code does not contain a copyright notice - -#ifndef VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ -#define VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ - -#include "visualization_msgs/srv/detail/get_interactive_markers__struct.hpp" -#include -#include -#include - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::srv::GetInteractiveMarkers_Request"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/srv/GetInteractiveMarkers_Request"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::srv::GetInteractiveMarkers_Response"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/srv/GetInteractiveMarkers_Response"; -} - -template<> -struct has_fixed_size - : std::integral_constant {}; - -template<> -struct has_bounded_size - : std::integral_constant {}; - -template<> -struct is_message - : std::true_type {}; - -} // namespace rosidl_generator_traits - -namespace rosidl_generator_traits -{ - -template<> -inline const char * data_type() -{ - return "visualization_msgs::srv::GetInteractiveMarkers"; -} - -template<> -inline const char * name() -{ - return "visualization_msgs/srv/GetInteractiveMarkers"; -} - -template<> -struct has_fixed_size - : std::integral_constant< - bool, - has_fixed_size::value && - has_fixed_size::value - > -{ -}; - -template<> -struct has_bounded_size - : std::integral_constant< - bool, - has_bounded_size::value && - has_bounded_size::value - > -{ -}; - -template<> -struct is_service - : std::true_type -{ -}; - -template<> -struct is_service_request - : std::true_type -{ -}; - -template<> -struct is_service_response - : std::true_type -{ -}; - -} // namespace rosidl_generator_traits - -#endif // VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.c b/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.c deleted file mode 100644 index 74220ab7d..000000000 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.c +++ /dev/null @@ -1,280 +0,0 @@ -// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em -// with input from visualization_msgs:srv/GetInteractiveMarkers.idl -// generated code does not contain a copyright notice - -#include -#include "visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h" -#include "visualization_msgs/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 "visualization_msgs/srv/detail/get_interactive_markers__functions.h" -#include "visualization_msgs/srv/detail/get_interactive_markers__struct.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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; - visualization_msgs__srv__GetInteractiveMarkers_Request__init(message_memory); -} - -void GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_fini_function(void * message_memory) -{ - visualization_msgs__srv__GetInteractiveMarkers_Request__fini(message_memory); -} - -static rosidl_typesupport_introspection_c__MessageMember GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_member_array[1] = { - { - "structure_needs_at_least_one_member", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__srv__GetInteractiveMarkers_Request, structure_needs_at_least_one_member), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_members = { - "visualization_msgs__srv", // message namespace - "GetInteractiveMarkers_Request", // message name - 1, // number of fields - sizeof(visualization_msgs__srv__GetInteractiveMarkers_Request), - GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_member_array, // message members - GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_init_function, // function to initialize message memory (memory has to be allocated) - GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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 GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle = { - 0, - &GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Request)() { - if (!GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle.typesupport_identifier) { - GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -// already included above -// #include -// already included above -// #include "visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h" -// already included above -// #include "visualization_msgs/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 "visualization_msgs/srv/detail/get_interactive_markers__functions.h" -// already included above -// #include "visualization_msgs/srv/detail/get_interactive_markers__struct.h" - - -// Include directives for member types -// Member `markers` -#include "visualization_msgs/msg/interactive_marker.h" -// Member `markers` -#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -void GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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; - visualization_msgs__srv__GetInteractiveMarkers_Response__init(message_memory); -} - -void GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_fini_function(void * message_memory) -{ - visualization_msgs__srv__GetInteractiveMarkers_Response__fini(message_memory); -} - -size_t GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers( - const void * untyped_member) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return member->size; -} - -const void * GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers( - const void * untyped_member, size_t index) -{ - const visualization_msgs__msg__InteractiveMarker__Sequence * member = - (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -void * GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers( - void * untyped_member, size_t index) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - return &member->data[index]; -} - -bool GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers( - void * untyped_member, size_t size) -{ - visualization_msgs__msg__InteractiveMarker__Sequence * member = - (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); - visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); - return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); -} - -static rosidl_typesupport_introspection_c__MessageMember GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array[2] = { - { - "sequence_number", // name - rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type - 0, // upper bound of string - NULL, // members of sub message - false, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__srv__GetInteractiveMarkers_Response, sequence_number), // bytes offset in struct - NULL, // default value - NULL, // size() function pointer - NULL, // get_const(index) function pointer - NULL, // get(index) function pointer - NULL // resize(index) function pointer - }, - { - "markers", // name - rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type - 0, // upper bound of string - NULL, // members of sub message (initialized later) - true, // is array - 0, // array size - false, // is upper bound - offsetof(visualization_msgs__srv__GetInteractiveMarkers_Response, markers), // bytes offset in struct - NULL, // default value - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__markers, // size() function pointer - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__markers, // get_const(index) function pointer - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__markers, // get(index) function pointer - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__markers // resize(index) function pointer - } -}; - -static const rosidl_typesupport_introspection_c__MessageMembers GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_members = { - "visualization_msgs__srv", // message namespace - "GetInteractiveMarkers_Response", // message name - 2, // number of fields - sizeof(visualization_msgs__srv__GetInteractiveMarkers_Response), - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array, // message members - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_init_function, // function to initialize message memory (memory has to be allocated) - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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 GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle = { - 0, - &GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_members, - get_message_typesupport_handle_function, -}; - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Response)() { - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array[1].members_ = - ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); - if (!GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle.typesupport_identifier) { - GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - return &GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle; -} -#ifdef __cplusplus -} -#endif - -#include "rosidl_runtime_c/service_type_support_struct.h" -// already included above -// #include "visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" -// already included above -// #include "visualization_msgs/srv/detail/get_interactive_markers__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 visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_members = { - "visualization_msgs__srv", // service namespace - "GetInteractiveMarkers", // service name - // these two fields are initialized below on the first access - NULL, // request message - // visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle, - NULL // response message - // visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle -}; - -static rosidl_service_type_support_t visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle = { - 0, - &visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_Request)(); - -const rosidl_message_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Response)(); - -ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs -const rosidl_service_type_support_t * -ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers)() { - if (!visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle.typesupport_identifier) { - visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle.typesupport_identifier = - rosidl_typesupport_introspection_c__identifier; - } - rosidl_typesupport_introspection_c__ServiceMembers * service_members = - (rosidl_typesupport_introspection_c__ServiceMembers *)visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_Response)()->data; - } - - return &visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle; -} diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__builder.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__builder.hpp index 1e504dd81..8478d3ac0 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/image_marker__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/image_marker__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__functions.c similarity index 94% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__functions.c index be44629f1..fe8db3453 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__functions.c @@ -400,22 +400,27 @@ visualization_msgs__msg__ImageMarker__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__ImageMarker); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__ImageMarker * data = - (visualization_msgs__msg__ImageMarker *)realloc(output->data, allocation_size); + (visualization_msgs__msg__ImageMarker *)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 (!visualization_msgs__msg__ImageMarker__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__ImageMarker__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; ) { - visualization_msgs__msg__ImageMarker__fini(&data[i]); + visualization_msgs__msg__ImageMarker__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h index 2485bb231..9d66acdc2 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__ImageMarker( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__ImageMarker( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp index 0d761dad0..cff30f91f 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_ImageMarker( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.h similarity index 76% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.h index cc335e70e..0f0b9ec76 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.h @@ -74,21 +74,34 @@ enum // Member 'lifetime' #include "builtin_interfaces/msg/detail/duration__struct.h" -// Struct defined in msg/ImageMarker in the package visualization_msgs. +/// Struct defined in msg/ImageMarker in the package visualization_msgs. typedef struct visualization_msgs__msg__ImageMarker { std_msgs__msg__Header header; + /// Namespace which is used with the id to form a unique id. rosidl_runtime_c__String ns; + /// Unique id within the namespace. int32_t id; + /// One of the above types, e.g. CIRCLE, LINE_STRIP, etc. int32_t type; + /// Either ADD or REMOVE. int32_t action; + /// Two-dimensional coordinate position, in pixel-coordinates. geometry_msgs__msg__Point position; + /// The scale of the object, e.g. the diameter for a CIRCLE. float scale; + /// The outline color of the marker. std_msgs__msg__ColorRGBA outline_color; + /// Whether or not to fill in the shape with color. uint8_t filled; + /// Fill color; in the range: std_msgs__msg__ColorRGBA fill_color; + /// How long the object should last before being automatically deleted. + /// 0 indicates forever. builtin_interfaces__msg__Duration lifetime; + /// Coordinates in 2D in pixel coords. Used for LINE_STRIP, LINE_LIST, POINTS, etc. geometry_msgs__msg__Point__Sequence points; + /// The color for each line, point, etc. in the points field. std_msgs__msg__ColorRGBA__Sequence outline_colors; } visualization_msgs__msg__ImageMarker; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.hpp similarity index 82% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.hpp index 67a9a5746..ab2daad0c 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -89,7 +90,7 @@ struct ImageMarker_ std_msgs::msg::Header_; _header_type header; using _ns_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _ns_type ns; using _id_type = int32_t; @@ -119,10 +120,10 @@ struct ImageMarker_ builtin_interfaces::msg::Duration_; _lifetime_type lifetime; using _points_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _points_type points; using _outline_colors_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _outline_colors_type outline_colors; // setters for named parameter idiom @@ -133,7 +134,7 @@ struct ImageMarker_ return *this; } Type & set__ns( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->ns = _arg; return *this; @@ -193,13 +194,13 @@ struct ImageMarker_ return *this; } Type & set__points( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->points = _arg; return *this; } Type & set__outline_colors( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->outline_colors = _arg; return *this; @@ -313,20 +314,41 @@ using ImageMarker = visualization_msgs::msg::ImageMarker_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::CIRCLE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::LINE_STRIP; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::LINE_LIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::POLYGON; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::POINTS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::ADD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr int32_t ImageMarker_::REMOVE; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__traits.hpp new file mode 100644 index 000000000..03d5dbaeb --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__traits.hpp @@ -0,0 +1,361 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/ImageMarker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/image_marker__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'position' +// Member 'points' +#include "geometry_msgs/msg/detail/point__traits.hpp" +// Member 'outline_color' +// Member 'fill_color' +// Member 'outline_colors' +#include "std_msgs/msg/detail/color_rgba__traits.hpp" +// Member 'lifetime' +#include "builtin_interfaces/msg/detail/duration__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const ImageMarker & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: ns + { + out << "ns: "; + rosidl_generator_traits::value_to_yaml(msg.ns, out); + out << ", "; + } + + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: action + { + out << "action: "; + rosidl_generator_traits::value_to_yaml(msg.action, out); + out << ", "; + } + + // member: position + { + out << "position: "; + to_flow_style_yaml(msg.position, out); + out << ", "; + } + + // member: scale + { + out << "scale: "; + rosidl_generator_traits::value_to_yaml(msg.scale, out); + out << ", "; + } + + // member: outline_color + { + out << "outline_color: "; + to_flow_style_yaml(msg.outline_color, out); + out << ", "; + } + + // member: filled + { + out << "filled: "; + rosidl_generator_traits::value_to_yaml(msg.filled, out); + out << ", "; + } + + // member: fill_color + { + out << "fill_color: "; + to_flow_style_yaml(msg.fill_color, out); + out << ", "; + } + + // member: lifetime + { + out << "lifetime: "; + to_flow_style_yaml(msg.lifetime, out); + out << ", "; + } + + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: outline_colors + { + if (msg.outline_colors.size() == 0) { + out << "outline_colors: []"; + } else { + out << "outline_colors: ["; + size_t pending_items = msg.outline_colors.size(); + for (auto item : msg.outline_colors) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const ImageMarker & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: ns + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "ns: "; + rosidl_generator_traits::value_to_yaml(msg.ns, out); + out << "\n"; + } + + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: action + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "action: "; + rosidl_generator_traits::value_to_yaml(msg.action, out); + out << "\n"; + } + + // member: position + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "position:\n"; + to_block_style_yaml(msg.position, out, indentation + 2); + } + + // member: scale + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "scale: "; + rosidl_generator_traits::value_to_yaml(msg.scale, out); + out << "\n"; + } + + // member: outline_color + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "outline_color:\n"; + to_block_style_yaml(msg.outline_color, out, indentation + 2); + } + + // member: filled + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "filled: "; + rosidl_generator_traits::value_to_yaml(msg.filled, out); + out << "\n"; + } + + // member: fill_color + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "fill_color:\n"; + to_block_style_yaml(msg.fill_color, out, indentation + 2); + } + + // member: lifetime + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "lifetime:\n"; + to_block_style_yaml(msg.lifetime, out, indentation + 2); + } + + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: outline_colors + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.outline_colors.size() == 0) { + out << "outline_colors: []\n"; + } else { + out << "outline_colors:\n"; + for (auto item : msg.outline_colors) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const ImageMarker & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::ImageMarker & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::ImageMarker & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::ImageMarker"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/ImageMarker"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.c new file mode 100644 index 000000000..c2627d768 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.c @@ -0,0 +1,437 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/ImageMarker.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/image_marker__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/image_marker__functions.h" +#include "visualization_msgs/msg/detail/image_marker__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `ns` +#include "rosidl_runtime_c/string_functions.h" +// Member `position` +// Member `points` +#include "geometry_msgs/msg/point.h" +// Member `position` +// Member `points` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" +// Member `outline_color` +// Member `fill_color` +// Member `outline_colors` +#include "std_msgs/msg/color_rgba.h" +// Member `outline_color` +// Member `fill_color` +// Member `outline_colors` +#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" +// Member `lifetime` +#include "builtin_interfaces/msg/duration.h" +// Member `lifetime` +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_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; + visualization_msgs__msg__ImageMarker__init(message_memory); +} + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_fini_function(void * message_memory) +{ + visualization_msgs__msg__ImageMarker__fini(message_memory); +} + +size_t visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__size_function__ImageMarker__points( + const void * untyped_member) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__points( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__points( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__fetch_function__ImageMarker__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point * item = + ((const geometry_msgs__msg__Point *) + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__points(untyped_member, index)); + geometry_msgs__msg__Point * value = + (geometry_msgs__msg__Point *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__assign_function__ImageMarker__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point * item = + ((geometry_msgs__msg__Point *) + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__points(untyped_member, index)); + const geometry_msgs__msg__Point * value = + (const geometry_msgs__msg__Point *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__resize_function__ImageMarker__points( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + geometry_msgs__msg__Point__Sequence__fini(member); + return geometry_msgs__msg__Point__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__size_function__ImageMarker__outline_colors( + const void * untyped_member) +{ + const std_msgs__msg__ColorRGBA__Sequence * member = + (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__outline_colors( + const void * untyped_member, size_t index) +{ + const std_msgs__msg__ColorRGBA__Sequence * member = + (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__outline_colors( + void * untyped_member, size_t index) +{ + std_msgs__msg__ColorRGBA__Sequence * member = + (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__fetch_function__ImageMarker__outline_colors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const std_msgs__msg__ColorRGBA * item = + ((const std_msgs__msg__ColorRGBA *) + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__outline_colors(untyped_member, index)); + std_msgs__msg__ColorRGBA * value = + (std_msgs__msg__ColorRGBA *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__assign_function__ImageMarker__outline_colors( + void * untyped_member, size_t index, const void * untyped_value) +{ + std_msgs__msg__ColorRGBA * item = + ((std_msgs__msg__ColorRGBA *) + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__outline_colors(untyped_member, index)); + const std_msgs__msg__ColorRGBA * value = + (const std_msgs__msg__ColorRGBA *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__resize_function__ImageMarker__outline_colors( + void * untyped_member, size_t size) +{ + std_msgs__msg__ColorRGBA__Sequence * member = + (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + std_msgs__msg__ColorRGBA__Sequence__fini(member); + return std_msgs__msg__ColorRGBA__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[13] = { + { + "header", // 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(visualization_msgs__msg__ImageMarker, header), // 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 + }, + { + "ns", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, ns), // 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 + }, + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, id), // 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 + }, + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, type), // 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 + }, + { + "action", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, action), // 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 + }, + { + "position", // 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(visualization_msgs__msg__ImageMarker, position), // 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 + }, + { + "scale", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, scale), // 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 + }, + { + "outline_color", // 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(visualization_msgs__msg__ImageMarker, outline_color), // 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 + }, + { + "filled", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, filled), // 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 + }, + { + "fill_color", // 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(visualization_msgs__msg__ImageMarker, fill_color), // 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 + }, + { + "lifetime", // 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(visualization_msgs__msg__ImageMarker, lifetime), // 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 + }, + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, points), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__size_function__ImageMarker__points, // size() function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__points, // get_const(index) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__points, // get(index) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__fetch_function__ImageMarker__points, // fetch(index, &value) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__assign_function__ImageMarker__points, // assign(index, value) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__resize_function__ImageMarker__points // resize(index) function pointer + }, + { + "outline_colors", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__ImageMarker, outline_colors), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__size_function__ImageMarker__outline_colors, // size() function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_const_function__ImageMarker__outline_colors, // get_const(index) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__get_function__ImageMarker__outline_colors, // get(index) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__fetch_function__ImageMarker__outline_colors, // fetch(index, &value) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__assign_function__ImageMarker__outline_colors, // assign(index, value) function pointer + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__resize_function__ImageMarker__outline_colors // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_members = { + "visualization_msgs__msg", // message namespace + "ImageMarker", // message name + 13, // number of fields + sizeof(visualization_msgs__msg__ImageMarker), + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array, // message members + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_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 visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle = { + 0, + &visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, ImageMarker)() { + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[9].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[10].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[11].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_member_array[12].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); + if (!visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__ImageMarker__rosidl_typesupport_introspection_c__ImageMarker_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.cpp similarity index 81% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.cpp index f8b06856f..f844295cf 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__ImageMarker__points(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__ImageMarker__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ImageMarker__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ImageMarker__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ImageMarker__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ImageMarker__points(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__ImageMarker__outline_colors(void * untyped_member, size_t i return &member[index]; } +void fetch_function__ImageMarker__outline_colors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__ImageMarker__outline_colors(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__ImageMarker__outline_colors( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__ImageMarker__outline_colors(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__ImageMarker__outline_colors(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -210,6 +260,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -225,6 +277,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -240,6 +294,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -255,6 +311,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m 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 }, { @@ -270,6 +328,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m size_function__ImageMarker__points, // size() function pointer get_const_function__ImageMarker__points, // get_const(index) function pointer get_function__ImageMarker__points, // get(index) function pointer + fetch_function__ImageMarker__points, // fetch(index, &value) function pointer + assign_function__ImageMarker__points, // assign(index, value) function pointer resize_function__ImageMarker__points // resize(index) function pointer }, { @@ -285,6 +345,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember ImageMarker_m size_function__ImageMarker__outline_colors, // size() function pointer get_const_function__ImageMarker__outline_colors, // get_const(index) function pointer get_function__ImageMarker__outline_colors, // get(index) function pointer + fetch_function__ImageMarker__outline_colors, // fetch(index, &value) function pointer + assign_function__ImageMarker__outline_colors, // assign(index, value) function pointer resize_function__ImageMarker__outline_colors // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.hpp new file mode 100644 index 000000000..b64a0bd58 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/image_marker__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/ImageMarker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + ImageMarker +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__builder.hpp similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__builder.hpp index 91f0c285e..fc693f70f 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__functions.c similarity index 93% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__functions.c index c6bb3f060..acab99a8d 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__functions.c @@ -328,22 +328,27 @@ visualization_msgs__msg__InteractiveMarker__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarker); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarker * data = - (visualization_msgs__msg__InteractiveMarker *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarker *)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 (!visualization_msgs__msg__InteractiveMarker__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarker__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; ) { - visualization_msgs__msg__InteractiveMarker__fini(&data[i]); + visualization_msgs__msg__InteractiveMarker__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h index 6bfff2fd3..d335d3961 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarker( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarker( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp index a434e6dd5..7c263d767 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarker( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.h new file mode 100644 index 000000000..dc53438b7 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.h @@ -0,0 +1,74 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/InteractiveMarker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__struct.h" +// Member 'name' +// Member 'description' +#include "rosidl_runtime_c/string.h" +// Member 'menu_entries' +#include "visualization_msgs/msg/detail/menu_entry__struct.h" +// Member 'controls' +#include "visualization_msgs/msg/detail/interactive_marker_control__struct.h" + +/// Struct defined in msg/InteractiveMarker in the package visualization_msgs. +/** + * Time/frame info. + * If header.time is set to 0, the marker will be retransformed into + * its frame on each timestep. You will receive the pose feedback + * in the same frame. + * Otherwise, you might receive feedback in a different frame. + * For rviz, this will be the current 'fixed frame' set by the user. + */ +typedef struct visualization_msgs__msg__InteractiveMarker +{ + std_msgs__msg__Header header; + /// Initial pose. Also, defines the pivot point for rotations. + geometry_msgs__msg__Pose pose; + /// Identifying string. Must be globally unique in + /// the topic that this message is sent through. + rosidl_runtime_c__String name; + /// Short description (< 40 characters). + rosidl_runtime_c__String description; + /// Scale to be used for default controls (default=1). + float scale; + /// All menu and submenu entries associated with this marker. + visualization_msgs__msg__MenuEntry__Sequence menu_entries; + /// List of controls displayed for this marker. + visualization_msgs__msg__InteractiveMarkerControl__Sequence controls; +} visualization_msgs__msg__InteractiveMarker; + +// Struct for a sequence of visualization_msgs__msg__InteractiveMarker. +typedef struct visualization_msgs__msg__InteractiveMarker__Sequence +{ + visualization_msgs__msg__InteractiveMarker * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__InteractiveMarker__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.hpp similarity index 84% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.hpp index c4c7b8045..120ff7d2b 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -78,19 +79,19 @@ struct InteractiveMarker_ geometry_msgs::msg::Pose_; _pose_type pose; using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _description_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _description_type description; using _scale_type = float; _scale_type scale; using _menu_entries_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _menu_entries_type menu_entries; using _controls_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _controls_type controls; // setters for named parameter idiom @@ -107,13 +108,13 @@ struct InteractiveMarker_ return *this; } Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; } Type & set__description( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->description = _arg; return *this; @@ -125,13 +126,13 @@ struct InteractiveMarker_ return *this; } Type & set__menu_entries( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->menu_entries = _arg; return *this; } Type & set__controls( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->controls = _arg; return *this; diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__traits.hpp new file mode 100644 index 000000000..3fa18de73 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__traits.hpp @@ -0,0 +1,259 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" +// Member 'menu_entries' +#include "visualization_msgs/msg/detail/menu_entry__traits.hpp" +// Member 'controls' +#include "visualization_msgs/msg/detail/interactive_marker_control__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarker & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: description + { + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + out << ", "; + } + + // member: scale + { + out << "scale: "; + rosidl_generator_traits::value_to_yaml(msg.scale, out); + out << ", "; + } + + // member: menu_entries + { + if (msg.menu_entries.size() == 0) { + out << "menu_entries: []"; + } else { + out << "menu_entries: ["; + size_t pending_items = msg.menu_entries.size(); + for (auto item : msg.menu_entries) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: controls + { + if (msg.controls.size() == 0) { + out << "controls: []"; + } else { + out << "controls: ["; + size_t pending_items = msg.controls.size(); + for (auto item : msg.controls) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarker & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: description + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + out << "\n"; + } + + // member: scale + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "scale: "; + rosidl_generator_traits::value_to_yaml(msg.scale, out); + out << "\n"; + } + + // member: menu_entries + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.menu_entries.size() == 0) { + out << "menu_entries: []\n"; + } else { + out << "menu_entries:\n"; + for (auto item : msg.menu_entries) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: controls + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.controls.size() == 0) { + out << "controls: []\n"; + } else { + out << "controls:\n"; + for (auto item : msg.controls) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarker & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarker & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarker & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarker"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarker"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.c new file mode 100644 index 000000000..96507b8ee --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.c @@ -0,0 +1,324 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarker.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +// Member `name` +// Member `description` +#include "rosidl_runtime_c/string_functions.h" +// Member `menu_entries` +#include "visualization_msgs/msg/menu_entry.h" +// Member `menu_entries` +#include "visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h" +// Member `controls` +#include "visualization_msgs/msg/interactive_marker_control.h" +// Member `controls` +#include "visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_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; + visualization_msgs__msg__InteractiveMarker__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarker__fini(message_memory); +} + +size_t visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__menu_entries( + const void * untyped_member) +{ + const visualization_msgs__msg__MenuEntry__Sequence * member = + (const visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__menu_entries( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__MenuEntry__Sequence * member = + (const visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__menu_entries( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__MenuEntry__Sequence * member = + (visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarker__menu_entries( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__MenuEntry * item = + ((const visualization_msgs__msg__MenuEntry *) + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__menu_entries(untyped_member, index)); + visualization_msgs__msg__MenuEntry * value = + (visualization_msgs__msg__MenuEntry *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__assign_function__InteractiveMarker__menu_entries( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__MenuEntry * item = + ((visualization_msgs__msg__MenuEntry *) + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__menu_entries(untyped_member, index)); + const visualization_msgs__msg__MenuEntry * value = + (const visualization_msgs__msg__MenuEntry *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__menu_entries( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__MenuEntry__Sequence * member = + (visualization_msgs__msg__MenuEntry__Sequence *)(untyped_member); + visualization_msgs__msg__MenuEntry__Sequence__fini(member); + return visualization_msgs__msg__MenuEntry__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__controls( + const void * untyped_member) +{ + const visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = + (const visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__controls( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = + (const visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__controls( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = + (visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarker__controls( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__InteractiveMarkerControl * item = + ((const visualization_msgs__msg__InteractiveMarkerControl *) + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__controls(untyped_member, index)); + visualization_msgs__msg__InteractiveMarkerControl * value = + (visualization_msgs__msg__InteractiveMarkerControl *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__assign_function__InteractiveMarker__controls( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__InteractiveMarkerControl * item = + ((visualization_msgs__msg__InteractiveMarkerControl *) + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__controls(untyped_member, index)); + const visualization_msgs__msg__InteractiveMarkerControl * value = + (const visualization_msgs__msg__InteractiveMarkerControl *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__controls( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__InteractiveMarkerControl__Sequence * member = + (visualization_msgs__msg__InteractiveMarkerControl__Sequence *)(untyped_member); + visualization_msgs__msg__InteractiveMarkerControl__Sequence__fini(member); + return visualization_msgs__msg__InteractiveMarkerControl__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[7] = { + { + "header", // 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(visualization_msgs__msg__InteractiveMarker, header), // 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 + }, + { + "pose", // 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(visualization_msgs__msg__InteractiveMarker, pose), // 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 + }, + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarker, name), // 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 + }, + { + "description", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarker, description), // 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 + }, + { + "scale", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarker, scale), // 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 + }, + { + "menu_entries", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarker, menu_entries), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__menu_entries, // size() function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__menu_entries, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__menu_entries, // get(index) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarker__menu_entries, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__assign_function__InteractiveMarker__menu_entries, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__menu_entries // resize(index) function pointer + }, + { + "controls", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarker, controls), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__size_function__InteractiveMarker__controls, // size() function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarker__controls, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__get_function__InteractiveMarker__controls, // get(index) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarker__controls, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__assign_function__InteractiveMarker__controls, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__resize_function__InteractiveMarker__controls // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarker", // message name + 7, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarker), + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array, // message members + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_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 visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)() { + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MenuEntry)(); + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerControl)(); + if (!visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarker__rosidl_typesupport_introspection_c__InteractiveMarker_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.cpp similarity index 79% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.cpp index f6f5d20fc..83b428061 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__InteractiveMarker__menu_entries(void * untyped_member, size return &member[index]; } +void fetch_function__InteractiveMarker__menu_entries( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarker__menu_entries(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarker__menu_entries( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarker__menu_entries(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarker__menu_entries(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__InteractiveMarker__controls(void * untyped_member, size_t i return &member[index]; } +void fetch_function__InteractiveMarker__controls( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarker__controls(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarker__controls( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarker__controls(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarker__controls(void * untyped_member, size_t size) { auto * member = @@ -105,6 +141,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -120,6 +158,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -135,6 +175,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -150,6 +192,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -165,6 +209,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -180,6 +226,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarker__menu_entries, // size() function pointer get_const_function__InteractiveMarker__menu_entries, // get_const(index) function pointer get_function__InteractiveMarker__menu_entries, // get(index) function pointer + fetch_function__InteractiveMarker__menu_entries, // fetch(index, &value) function pointer + assign_function__InteractiveMarker__menu_entries, // assign(index, value) function pointer resize_function__InteractiveMarker__menu_entries // resize(index) function pointer }, { @@ -195,6 +243,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarker__controls, // size() function pointer get_const_function__InteractiveMarker__controls, // get_const(index) function pointer get_function__InteractiveMarker__controls, // get(index) function pointer + fetch_function__InteractiveMarker__controls, // fetch(index, &value) function pointer + assign_function__InteractiveMarker__controls, // assign(index, value) function pointer resize_function__InteractiveMarker__controls // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.hpp new file mode 100644 index 000000000..fff51c8ed --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarker +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp index 28aafbcec..91503e657 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker_control__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker_control__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__functions.c similarity index 94% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__functions.c index 43ef047ed..f8a5bc23e 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__functions.c @@ -310,22 +310,27 @@ visualization_msgs__msg__InteractiveMarkerControl__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarkerControl); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarkerControl * data = - (visualization_msgs__msg__InteractiveMarkerControl *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarkerControl *)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 (!visualization_msgs__msg__InteractiveMarkerControl__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarkerControl__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; ) { - visualization_msgs__msg__InteractiveMarkerControl__fini(&data[i]); + visualization_msgs__msg__InteractiveMarkerControl__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h index 9159afa86..1c6c8c2ac 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarkerControl( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarkerControl( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp index 5679c15e2..c3f375d26 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarkerControl( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.h new file mode 100644 index 000000000..6af706626 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.h @@ -0,0 +1,182 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/InteractiveMarkerControl.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'INHERIT'. +/** + * Orientation mode: controls how orientation changes. + * INHERIT: Follow orientation of interactive marker + * FIXED: Keep orientation fixed at initial state + * VIEW_FACING: Align y-z plane with screen (x: forward, y:left, z:up). + */ +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__INHERIT = 0 +}; + +/// Constant 'FIXED'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__FIXED = 1 +}; + +/// Constant 'VIEW_FACING'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__VIEW_FACING = 2 +}; + +/// Constant 'NONE'. +/** + * Interaction mode for this control + * + * NONE: This control is only meant for visualization; no context menu. + * MENU: Like NONE, but right-click menu is active. + * BUTTON: Element can be left-clicked. + * MOVE_AXIS: Translate along local x-axis. + * MOVE_PLANE: Translate in local y-z plane. + * ROTATE_AXIS: Rotate around local x-axis. + * MOVE_ROTATE: Combines MOVE_PLANE and ROTATE_AXIS. + */ +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__NONE = 0 +}; + +/// Constant 'MENU'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MENU = 1 +}; + +/// Constant 'BUTTON'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__BUTTON = 2 +}; + +/// Constant 'MOVE_AXIS'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MOVE_AXIS = 3 +}; + +/// Constant 'MOVE_PLANE'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MOVE_PLANE = 4 +}; + +/// Constant 'ROTATE_AXIS'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__ROTATE_AXIS = 5 +}; + +/// Constant 'MOVE_ROTATE'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MOVE_ROTATE = 6 +}; + +/// Constant 'MOVE_3D'. +/** + * "3D" interaction modes work with the mouse+SHIFT+CTRL or with 3D cursors. + * MOVE_3D: Translate freely in 3D space. + * ROTATE_3D: Rotate freely in 3D space about the origin of parent frame. + * MOVE_ROTATE_3D: Full 6-DOF freedom of translation and rotation about the cursor origin. + */ +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MOVE_3D = 7 +}; + +/// Constant 'ROTATE_3D'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__ROTATE_3D = 8 +}; + +/// Constant 'MOVE_ROTATE_3D'. +enum +{ + visualization_msgs__msg__InteractiveMarkerControl__MOVE_ROTATE_3D = 9 +}; + +// Include directives for member types +// Member 'name' +// Member 'description' +#include "rosidl_runtime_c/string.h" +// Member 'orientation' +#include "geometry_msgs/msg/detail/quaternion__struct.h" +// Member 'markers' +#include "visualization_msgs/msg/detail/marker__struct.h" + +/// Struct defined in msg/InteractiveMarkerControl in the package visualization_msgs. +/** + * Represents a control that is to be displayed together with an interactive marker + */ +typedef struct visualization_msgs__msg__InteractiveMarkerControl +{ + /// Identifying string for this control. + /// You need to assign a unique value to this to receive feedback from the GUI + /// on what actions the user performs on this control (e.g. a button click). + rosidl_runtime_c__String name; + /// Defines the local coordinate frame (relative to the pose of the parent + /// interactive marker) in which is being rotated and translated. + /// Default: Identity + geometry_msgs__msg__Quaternion orientation; + uint8_t orientation_mode; + uint8_t interaction_mode; + /// If true, the contained markers will also be visible + /// when the gui is not in interactive mode. + bool always_visible; + /// Markers to be displayed as custom visual representation. + /// Leave this empty to use the default control handles. + /// + /// Note: + /// - The markers can be defined in an arbitrary coordinate frame, + /// but will be transformed into the local frame of the interactive marker. + /// - If the header of a marker is empty, its pose will be interpreted as + /// relative to the pose of the parent interactive marker. + visualization_msgs__msg__Marker__Sequence markers; + /// In VIEW_FACING mode, set this to true if you don't want the markers + /// to be aligned with the camera view point. The markers will show up + /// as in INHERIT mode. + bool independent_marker_orientation; + /// Short description (< 40 characters) of what this control does, + /// e.g. "Move the robot". + /// Default: A generic description based on the interaction mode + rosidl_runtime_c__String description; +} visualization_msgs__msg__InteractiveMarkerControl; + +// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerControl. +typedef struct visualization_msgs__msg__InteractiveMarkerControl__Sequence +{ + visualization_msgs__msg__InteractiveMarkerControl * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__InteractiveMarkerControl__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp similarity index 75% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp index 63beb5589..438a5659a 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'orientation' @@ -72,7 +73,7 @@ struct InteractiveMarkerControl_ // field types and members using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; using _orientation_type = geometry_msgs::msg::Quaternion_; @@ -87,18 +88,18 @@ struct InteractiveMarkerControl_ bool; _always_visible_type always_visible; using _markers_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _markers_type markers; using _independent_marker_orientation_type = bool; _independent_marker_orientation_type independent_marker_orientation; using _description_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _description_type description; // setters for named parameter idiom Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; @@ -128,7 +129,7 @@ struct InteractiveMarkerControl_ return *this; } Type & set__markers( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->markers = _arg; return *this; @@ -140,7 +141,7 @@ struct InteractiveMarkerControl_ return *this; } Type & set__description( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->description = _arg; return *this; @@ -251,32 +252,71 @@ using InteractiveMarkerControl = visualization_msgs::msg::InteractiveMarkerControl_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::INHERIT; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::FIXED; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::VIEW_FACING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::NONE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MENU; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::BUTTON; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MOVE_AXIS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MOVE_PLANE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::ROTATE_AXIS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MOVE_ROTATE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MOVE_3D; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::ROTATE_3D; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerControl_::MOVE_ROTATE_3D; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp new file mode 100644 index 000000000..df41b1173 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__traits.hpp @@ -0,0 +1,253 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerControl.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker_control__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'orientation' +#include "geometry_msgs/msg/detail/quaternion__traits.hpp" +// Member 'markers' +#include "visualization_msgs/msg/detail/marker__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarkerControl & msg, + std::ostream & out) +{ + out << "{"; + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << ", "; + } + + // member: orientation + { + out << "orientation: "; + to_flow_style_yaml(msg.orientation, out); + out << ", "; + } + + // member: orientation_mode + { + out << "orientation_mode: "; + rosidl_generator_traits::value_to_yaml(msg.orientation_mode, out); + out << ", "; + } + + // member: interaction_mode + { + out << "interaction_mode: "; + rosidl_generator_traits::value_to_yaml(msg.interaction_mode, out); + out << ", "; + } + + // member: always_visible + { + out << "always_visible: "; + rosidl_generator_traits::value_to_yaml(msg.always_visible, out); + out << ", "; + } + + // member: markers + { + if (msg.markers.size() == 0) { + out << "markers: []"; + } else { + out << "markers: ["; + size_t pending_items = msg.markers.size(); + for (auto item : msg.markers) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: independent_marker_orientation + { + out << "independent_marker_orientation: "; + rosidl_generator_traits::value_to_yaml(msg.independent_marker_orientation, out); + out << ", "; + } + + // member: description + { + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarkerControl & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } + + // member: orientation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "orientation:\n"; + to_block_style_yaml(msg.orientation, out, indentation + 2); + } + + // member: orientation_mode + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "orientation_mode: "; + rosidl_generator_traits::value_to_yaml(msg.orientation_mode, out); + out << "\n"; + } + + // member: interaction_mode + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "interaction_mode: "; + rosidl_generator_traits::value_to_yaml(msg.interaction_mode, out); + out << "\n"; + } + + // member: always_visible + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "always_visible: "; + rosidl_generator_traits::value_to_yaml(msg.always_visible, out); + out << "\n"; + } + + // member: markers + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.markers.size() == 0) { + out << "markers: []\n"; + } else { + out << "markers:\n"; + for (auto item : msg.markers) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: independent_marker_orientation + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "independent_marker_orientation: "; + rosidl_generator_traits::value_to_yaml(msg.independent_marker_orientation, out); + out << "\n"; + } + + // member: description + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "description: "; + rosidl_generator_traits::value_to_yaml(msg.description, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarkerControl & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarkerControl & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarkerControl & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarkerControl"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarkerControl"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.c new file mode 100644 index 000000000..ed2d6e288 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.c @@ -0,0 +1,274 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarkerControl.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker_control__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_control__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker_control__struct.h" + + +// Include directives for member types +// Member `name` +// Member `description` +#include "rosidl_runtime_c/string_functions.h" +// Member `orientation` +#include "geometry_msgs/msg/quaternion.h" +// Member `orientation` +#include "geometry_msgs/msg/detail/quaternion__rosidl_typesupport_introspection_c.h" +// Member `markers` +#include "visualization_msgs/msg/marker.h" +// Member `markers` +#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_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; + visualization_msgs__msg__InteractiveMarkerControl__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarkerControl__fini(message_memory); +} + +size_t visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerControl__markers( + const void * untyped_member) +{ + const visualization_msgs__msg__Marker__Sequence * member = + (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerControl__markers( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__Marker__Sequence * member = + (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerControl__markers( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__Marker__Sequence * member = + (visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerControl__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__Marker * item = + ((const visualization_msgs__msg__Marker *) + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerControl__markers(untyped_member, index)); + visualization_msgs__msg__Marker * value = + (visualization_msgs__msg__Marker *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerControl__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__Marker * item = + ((visualization_msgs__msg__Marker *) + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerControl__markers(untyped_member, index)); + const visualization_msgs__msg__Marker * value = + (const visualization_msgs__msg__Marker *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerControl__markers( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__Marker__Sequence * member = + (visualization_msgs__msg__Marker__Sequence *)(untyped_member); + visualization_msgs__msg__Marker__Sequence__fini(member); + return visualization_msgs__msg__Marker__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[8] = { + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, name), // 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 + }, + { + "orientation", // 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(visualization_msgs__msg__InteractiveMarkerControl, orientation), // 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 + }, + { + "orientation_mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, orientation_mode), // 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 + }, + { + "interaction_mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, interaction_mode), // 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 + }, + { + "always_visible", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, always_visible), // 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 + }, + { + "markers", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, markers), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerControl__markers, // size() function pointer + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerControl__markers, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerControl__markers, // get(index) function pointer + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerControl__markers, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerControl__markers, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerControl__markers // resize(index) function pointer + }, + { + "independent_marker_orientation", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, independent_marker_orientation), // 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 + }, + { + "description", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerControl, description), // 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 visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarkerControl", // message name + 8, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarkerControl), + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array, // message members + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_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 visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerControl)() { + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Quaternion)(); + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)(); + if (!visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarkerControl__rosidl_typesupport_introspection_c__InteractiveMarkerControl_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp similarity index 84% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp index 7d050c55f..01677c106 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__InteractiveMarkerControl__markers(void * untyped_member, si return &member[index]; } +void fetch_function__InteractiveMarkerControl__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarkerControl__markers(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarkerControl__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarkerControl__markers(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarkerControl__markers(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -123,6 +147,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -138,6 +164,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -153,6 +181,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarkerControl__markers, // size() function pointer get_const_function__InteractiveMarkerControl__markers, // get_const(index) function pointer get_function__InteractiveMarkerControl__markers, // get(index) function pointer + fetch_function__InteractiveMarkerControl__markers, // fetch(index, &value) function pointer + assign_function__InteractiveMarkerControl__markers, // assign(index, value) function pointer resize_function__InteractiveMarkerControl__markers // resize(index) function pointer }, { @@ -168,6 +198,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -183,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_control__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.hpp new file mode 100644 index 000000000..bef2a1c8a --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_control__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerControl.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarkerControl +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_CONTROL__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp index 39e46d9cf..b604f7d28 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c similarity index 95% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c index a547e478b..01c65a78f 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__functions.c @@ -343,22 +343,27 @@ visualization_msgs__msg__InteractiveMarkerFeedback__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarkerFeedback); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarkerFeedback * data = - (visualization_msgs__msg__InteractiveMarkerFeedback *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarkerFeedback *)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 (!visualization_msgs__msg__InteractiveMarkerFeedback__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarkerFeedback__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; ) { - visualization_msgs__msg__InteractiveMarkerFeedback__fini(&data[i]); + visualization_msgs__msg__InteractiveMarkerFeedback__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h index 89f17e755..d5d4170b1 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarkerFeedback( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarkerFeedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp index 6ee55673b..b13b20e8f 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarkerFeedback( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h new file mode 100644 index 000000000..624497a53 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.h @@ -0,0 +1,118 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'KEEP_ALIVE'. +/** + * Type of the event + * KEEP_ALIVE: sent while dragging to keep up control of the marker + * MENU_SELECT: a menu entry has been selected + * BUTTON_CLICK: a button control has been clicked + * POSE_UPDATE: the pose has been changed using one of the controls + */ +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__KEEP_ALIVE = 0 +}; + +/// Constant 'POSE_UPDATE'. +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__POSE_UPDATE = 1 +}; + +/// Constant 'MENU_SELECT'. +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__MENU_SELECT = 2 +}; + +/// Constant 'BUTTON_CLICK'. +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__BUTTON_CLICK = 3 +}; + +/// Constant 'MOUSE_DOWN'. +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__MOUSE_DOWN = 4 +}; + +/// Constant 'MOUSE_UP'. +enum +{ + visualization_msgs__msg__InteractiveMarkerFeedback__MOUSE_UP = 5 +}; + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'client_id' +// Member 'marker_name' +// Member 'control_name' +#include "rosidl_runtime_c/string.h" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__struct.h" +// Member 'mouse_point' +#include "geometry_msgs/msg/detail/point__struct.h" + +/// Struct defined in msg/InteractiveMarkerFeedback in the package visualization_msgs. +/** + * Time/frame info. + */ +typedef struct visualization_msgs__msg__InteractiveMarkerFeedback +{ + std_msgs__msg__Header header; + /// Identifying string. Must be unique in the topic namespace. + rosidl_runtime_c__String client_id; + /// Feedback message sent back from the GUI, e.g. + /// when the status of an interactive marker was modified by the user. + /// Specifies which interactive marker and control this message refers to + rosidl_runtime_c__String marker_name; + rosidl_runtime_c__String control_name; + uint8_t event_type; + /// Current pose of the marker + /// Note: Has to be valid for all feedback types. + geometry_msgs__msg__Pose pose; + /// Contains the ID of the selected menu entry + /// Only valid for MENU_SELECT events. + uint32_t menu_entry_id; + /// If event_type is BUTTON_CLICK, MOUSE_DOWN, or MOUSE_UP, mouse_point + /// may contain the 3 dimensional position of the event on the + /// control. If it does, mouse_point_valid will be true. mouse_point + /// will be relative to the frame listed in the header. + geometry_msgs__msg__Point mouse_point; + bool mouse_point_valid; +} visualization_msgs__msg__InteractiveMarkerFeedback; + +// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerFeedback. +typedef struct visualization_msgs__msg__InteractiveMarkerFeedback__Sequence +{ + visualization_msgs__msg__InteractiveMarkerFeedback * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__InteractiveMarkerFeedback__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp similarity index 82% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp index 7bb8da925..c96d55d55 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -82,13 +83,13 @@ struct InteractiveMarkerFeedback_ std_msgs::msg::Header_; _header_type header; using _client_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _client_id_type client_id; using _marker_name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _marker_name_type marker_name; using _control_name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _control_name_type control_name; using _event_type_type = uint8_t; @@ -114,19 +115,19 @@ struct InteractiveMarkerFeedback_ return *this; } Type & set__client_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->client_id = _arg; return *this; } Type & set__marker_name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->marker_name = _arg; return *this; } Type & set__control_name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->control_name = _arg; return *this; @@ -256,18 +257,36 @@ using InteractiveMarkerFeedback = visualization_msgs::msg::InteractiveMarkerFeedback_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::KEEP_ALIVE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::POSE_UPDATE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::MENU_SELECT; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::BUTTON_CLICK; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::MOUSE_DOWN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerFeedback_::MOUSE_UP; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp new file mode 100644 index 000000000..359365cbf --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp @@ -0,0 +1,250 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" +// Member 'mouse_point' +#include "geometry_msgs/msg/detail/point__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarkerFeedback & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: client_id + { + out << "client_id: "; + rosidl_generator_traits::value_to_yaml(msg.client_id, out); + out << ", "; + } + + // member: marker_name + { + out << "marker_name: "; + rosidl_generator_traits::value_to_yaml(msg.marker_name, out); + out << ", "; + } + + // member: control_name + { + out << "control_name: "; + rosidl_generator_traits::value_to_yaml(msg.control_name, out); + out << ", "; + } + + // member: event_type + { + out << "event_type: "; + rosidl_generator_traits::value_to_yaml(msg.event_type, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: menu_entry_id + { + out << "menu_entry_id: "; + rosidl_generator_traits::value_to_yaml(msg.menu_entry_id, out); + out << ", "; + } + + // member: mouse_point + { + out << "mouse_point: "; + to_flow_style_yaml(msg.mouse_point, out); + out << ", "; + } + + // member: mouse_point_valid + { + out << "mouse_point_valid: "; + rosidl_generator_traits::value_to_yaml(msg.mouse_point_valid, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarkerFeedback & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: client_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "client_id: "; + rosidl_generator_traits::value_to_yaml(msg.client_id, out); + out << "\n"; + } + + // member: marker_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "marker_name: "; + rosidl_generator_traits::value_to_yaml(msg.marker_name, out); + out << "\n"; + } + + // member: control_name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "control_name: "; + rosidl_generator_traits::value_to_yaml(msg.control_name, out); + out << "\n"; + } + + // member: event_type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "event_type: "; + rosidl_generator_traits::value_to_yaml(msg.event_type, out); + out << "\n"; + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: menu_entry_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "menu_entry_id: "; + rosidl_generator_traits::value_to_yaml(msg.menu_entry_id, out); + out << "\n"; + } + + // member: mouse_point + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "mouse_point:\n"; + to_block_style_yaml(msg.mouse_point, out, indentation + 2); + } + + // member: mouse_point_valid + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "mouse_point_valid: "; + rosidl_generator_traits::value_to_yaml(msg.mouse_point_valid, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarkerFeedback & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarkerFeedback & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarkerFeedback & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarkerFeedback"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarkerFeedback"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c new file mode 100644 index 000000000..e793583bf --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.c @@ -0,0 +1,243 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker_feedback__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_feedback__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `client_id` +// Member `marker_name` +// Member `control_name` +#include "rosidl_runtime_c/string_functions.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +// Member `mouse_point` +#include "geometry_msgs/msg/point.h" +// Member `mouse_point` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_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; + visualization_msgs__msg__InteractiveMarkerFeedback__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarkerFeedback__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[9] = { + { + "header", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, header), // 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 + }, + { + "client_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, client_id), // 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 + }, + { + "marker_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, marker_name), // 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 + }, + { + "control_name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, control_name), // 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 + }, + { + "event_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, event_type), // 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 + }, + { + "pose", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, pose), // 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 + }, + { + "menu_entry_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, menu_entry_id), // 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 + }, + { + "mouse_point", // 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(visualization_msgs__msg__InteractiveMarkerFeedback, mouse_point), // 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 + }, + { + "mouse_point_valid", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerFeedback, mouse_point_valid), // 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 visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarkerFeedback", // message name + 9, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarkerFeedback), + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array, // message members + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_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 visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerFeedback)() { + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + if (!visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarkerFeedback__rosidl_typesupport_introspection_c__InteractiveMarkerFeedback_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp similarity index 89% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp index 6cf7d5480..4b1112e45 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -126,6 +136,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -141,6 +153,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -156,6 +170,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -171,6 +187,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.hpp new file mode 100644 index 000000000..a576a1663 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_feedback__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerFeedback.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarkerFeedback +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_FEEDBACK__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp similarity index 97% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp index 6e76edf04..2bc7689d9 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker_init__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker_init__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__functions.c similarity index 93% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__functions.c index 510b9e643..bbf5e3984 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__functions.c @@ -245,22 +245,27 @@ visualization_msgs__msg__InteractiveMarkerInit__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarkerInit); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarkerInit * data = - (visualization_msgs__msg__InteractiveMarkerInit *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarkerInit *)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 (!visualization_msgs__msg__InteractiveMarkerInit__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarkerInit__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; ) { - visualization_msgs__msg__InteractiveMarkerInit__fini(&data[i]); + visualization_msgs__msg__InteractiveMarkerInit__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h index 0b3bf6244..0b20f8703 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarkerInit( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarkerInit( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp index f8067edc4..7f31ceba9 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarkerInit( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.h new file mode 100644 index 000000000..576ac06c2 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.h @@ -0,0 +1,59 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/InteractiveMarkerInit.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'server_id' +#include "rosidl_runtime_c/string.h" +// Member 'markers' +#include "visualization_msgs/msg/detail/interactive_marker__struct.h" + +/// Struct defined in msg/InteractiveMarkerInit in the package visualization_msgs. +/** + * Identifying string. Must be unique in the topic namespace + * that this server works on. + */ +typedef struct visualization_msgs__msg__InteractiveMarkerInit +{ + rosidl_runtime_c__String server_id; + /// Sequence number. + /// The client will use this to detect if it has missed a subsequent + /// update. Every update message will have the same sequence number as + /// an init message. Clients will likely want to unsubscribe from the + /// init topic after a successful initialization to avoid receiving + /// duplicate data. + uint64_t seq_num; + /// All markers. + visualization_msgs__msg__InteractiveMarker__Sequence markers; +} visualization_msgs__msg__InteractiveMarkerInit; + +// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerInit. +typedef struct visualization_msgs__msg__InteractiveMarkerInit__Sequence +{ + visualization_msgs__msg__InteractiveMarkerInit * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__InteractiveMarkerInit__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp similarity index 88% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp index 26f3641b7..a719849d4 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'markers' @@ -59,18 +60,18 @@ struct InteractiveMarkerInit_ // field types and members using _server_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _server_id_type server_id; using _seq_num_type = uint64_t; _seq_num_type seq_num; using _markers_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _markers_type markers; // setters for named parameter idiom Type & set__server_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->server_id = _arg; return *this; @@ -82,7 +83,7 @@ struct InteractiveMarkerInit_ return *this; } Type & set__markers( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->markers = _arg; return *this; diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp new file mode 100644 index 000000000..bb83e4b7f --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__traits.hpp @@ -0,0 +1,167 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerInit.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker_init__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'markers' +#include "visualization_msgs/msg/detail/interactive_marker__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarkerInit & msg, + std::ostream & out) +{ + out << "{"; + // member: server_id + { + out << "server_id: "; + rosidl_generator_traits::value_to_yaml(msg.server_id, out); + out << ", "; + } + + // member: seq_num + { + out << "seq_num: "; + rosidl_generator_traits::value_to_yaml(msg.seq_num, out); + out << ", "; + } + + // member: markers + { + if (msg.markers.size() == 0) { + out << "markers: []"; + } else { + out << "markers: ["; + size_t pending_items = msg.markers.size(); + for (auto item : msg.markers) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarkerInit & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: server_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "server_id: "; + rosidl_generator_traits::value_to_yaml(msg.server_id, out); + out << "\n"; + } + + // member: seq_num + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "seq_num: "; + rosidl_generator_traits::value_to_yaml(msg.seq_num, out); + out << "\n"; + } + + // member: markers + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.markers.size() == 0) { + out << "markers: []\n"; + } else { + out << "markers:\n"; + for (auto item : msg.markers) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarkerInit & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarkerInit & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarkerInit & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarkerInit"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarkerInit"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.c new file mode 100644 index 000000000..2415d5c68 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.c @@ -0,0 +1,182 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarkerInit.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker_init__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_init__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker_init__struct.h" + + +// Include directives for member types +// Member `server_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `markers` +#include "visualization_msgs/msg/interactive_marker.h" +// Member `markers` +#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_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; + visualization_msgs__msg__InteractiveMarkerInit__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarkerInit__fini(message_memory); +} + +size_t visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerInit__markers( + const void * untyped_member) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerInit__markers( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerInit__markers( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerInit__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__InteractiveMarker * item = + ((const visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerInit__markers(untyped_member, index)); + visualization_msgs__msg__InteractiveMarker * value = + (visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerInit__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__InteractiveMarker * item = + ((visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerInit__markers(untyped_member, index)); + const visualization_msgs__msg__InteractiveMarker * value = + (const visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerInit__markers( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); + return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array[3] = { + { + "server_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerInit, server_id), // 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 + }, + { + "seq_num", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerInit, seq_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 + }, + { + "markers", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerInit, markers), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerInit__markers, // size() function pointer + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerInit__markers, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerInit__markers, // get(index) function pointer + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerInit__markers, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerInit__markers, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerInit__markers // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarkerInit", // message name + 3, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarkerInit), + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array, // message members + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_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 visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerInit)() { + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); + if (!visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarkerInit__rosidl_typesupport_introspection_c__InteractiveMarkerInit_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp index 337fb203f..331381e06 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__InteractiveMarkerInit__markers(void * untyped_member, size_ return &member[index]; } +void fetch_function__InteractiveMarkerInit__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarkerInit__markers(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarkerInit__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarkerInit__markers(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarkerInit__markers(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -93,6 +113,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -108,6 +130,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarkerInit__markers, // size() function pointer get_const_function__InteractiveMarkerInit__markers, // get_const(index) function pointer get_function__InteractiveMarkerInit__markers, // get(index) function pointer + fetch_function__InteractiveMarkerInit__markers, // fetch(index, &value) function pointer + assign_function__InteractiveMarkerInit__markers, // assign(index, value) function pointer resize_function__InteractiveMarkerInit__markers // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_init__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.hpp new file mode 100644 index 000000000..e7dae2994 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_init__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerInit.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarkerInit +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_INIT__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp similarity index 97% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp index 4f7b52c05..f5d218ac5 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__functions.c similarity index 93% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__functions.c index e69159e70..e395c28bd 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__functions.c @@ -258,22 +258,27 @@ visualization_msgs__msg__InteractiveMarkerPose__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarkerPose); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarkerPose * data = - (visualization_msgs__msg__InteractiveMarkerPose *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarkerPose *)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 (!visualization_msgs__msg__InteractiveMarkerPose__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarkerPose__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; ) { - visualization_msgs__msg__InteractiveMarkerPose__fini(&data[i]); + visualization_msgs__msg__InteractiveMarkerPose__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h index 74f043167..fde46b4d4 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarkerPose( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarkerPose( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp index 51caa3919..9687b4629 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarkerPose( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.h similarity index 83% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.h index 6aad0186e..d56a44976 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.h @@ -25,11 +25,15 @@ extern "C" // Member 'name' #include "rosidl_runtime_c/string.h" -// Struct defined in msg/InteractiveMarkerPose in the package visualization_msgs. +/// Struct defined in msg/InteractiveMarkerPose in the package visualization_msgs. typedef struct visualization_msgs__msg__InteractiveMarkerPose { + /// Time/frame info. std_msgs__msg__Header header; + /// Initial pose. Also, defines the pivot point for rotations. geometry_msgs__msg__Pose pose; + /// Identifying string. Must be globally unique in + /// the topic that this message is sent through. rosidl_runtime_c__String name; } visualization_msgs__msg__InteractiveMarkerPose; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp similarity index 94% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp index 04a5bc0ec..b4660a4c5 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'header' @@ -69,7 +70,7 @@ struct InteractiveMarkerPose_ geometry_msgs::msg::Pose_; _pose_type pose; using _name_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _name_type name; // setters for named parameter idiom @@ -86,7 +87,7 @@ struct InteractiveMarkerPose_ return *this; } Type & set__name( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->name = _arg; return *this; diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp new file mode 100644 index 000000000..09351f3c8 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerPose.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarkerPose & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: name + { + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarkerPose & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: name + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "name: "; + rosidl_generator_traits::value_to_yaml(msg.name, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarkerPose & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarkerPose & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarkerPose & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarkerPose"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarkerPose"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c new file mode 100644 index 000000000..2da49fe52 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.c @@ -0,0 +1,133 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarkerPose.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_pose__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +// Member `name` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_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; + visualization_msgs__msg__InteractiveMarkerPose__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarkerPose__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[3] = { + { + "header", // 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(visualization_msgs__msg__InteractiveMarkerPose, header), // 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 + }, + { + "pose", // 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(visualization_msgs__msg__InteractiveMarkerPose, pose), // 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 + }, + { + "name", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerPose, name), // 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 visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarkerPose", // message name + 3, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarkerPose), + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array, // message members + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_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 visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerPose)() { + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + if (!visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarkerPose__rosidl_typesupport_introspection_c__InteractiveMarkerPose_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp similarity index 93% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp index dcd3d7718..4ab4ec1c3 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_pose__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.hpp new file mode 100644 index 000000000..5bb8acbd2 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_pose__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerPose.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarkerPose +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_POSE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp index e194cd3b9..ab8d6aa75 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/interactive_marker_update__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/interactive_marker_update__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__functions.c similarity index 94% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__functions.c index 37b51c697..037d6b09b 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__functions.c @@ -294,22 +294,27 @@ visualization_msgs__msg__InteractiveMarkerUpdate__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__InteractiveMarkerUpdate); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__InteractiveMarkerUpdate * data = - (visualization_msgs__msg__InteractiveMarkerUpdate *)realloc(output->data, allocation_size); + (visualization_msgs__msg__InteractiveMarkerUpdate *)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 (!visualization_msgs__msg__InteractiveMarkerUpdate__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__InteractiveMarkerUpdate__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; ) { - visualization_msgs__msg__InteractiveMarkerUpdate__fini(&data[i]); + visualization_msgs__msg__InteractiveMarkerUpdate__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h index 50f57b1bc..d3dc45ea9 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__InteractiveMarkerUpdate( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__InteractiveMarkerUpdate( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp index ab383fc84..b248837b0 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_InteractiveMarkerUpdate( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.h new file mode 100644 index 000000000..d35c61d04 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.h @@ -0,0 +1,84 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'KEEP_ALIVE'. +/** + * Type holds the purpose of this message. It must be one of UPDATE or KEEP_ALIVE. + * UPDATE: Incremental update to previous state. + * The sequence number must be 1 higher than for + * the previous update. + * KEEP_ALIVE: Indicates the that the server is still living. + * The sequence number does not increase. + * No payload data should be filled out (markers, poses, or erases). + */ +enum +{ + visualization_msgs__msg__InteractiveMarkerUpdate__KEEP_ALIVE = 0 +}; + +/// Constant 'UPDATE'. +enum +{ + visualization_msgs__msg__InteractiveMarkerUpdate__UPDATE = 1 +}; + +// Include directives for member types +// Member 'server_id' +// Member 'erases' +#include "rosidl_runtime_c/string.h" +// Member 'markers' +#include "visualization_msgs/msg/detail/interactive_marker__struct.h" +// Member 'poses' +#include "visualization_msgs/msg/detail/interactive_marker_pose__struct.h" + +/// Struct defined in msg/InteractiveMarkerUpdate in the package visualization_msgs. +typedef struct visualization_msgs__msg__InteractiveMarkerUpdate +{ + /// Identifying string. Must be unique in the topic namespace + /// that this server works on. + rosidl_runtime_c__String server_id; + /// Sequence number. + /// The client will use this to detect if it has missed an update. + uint64_t seq_num; + uint8_t type; + /// Note: No guarantees on the order of processing. + /// Contents must be kept consistent by sender. + /// Markers to be added or updated + visualization_msgs__msg__InteractiveMarker__Sequence markers; + /// Poses of markers that should be moved + visualization_msgs__msg__InteractiveMarkerPose__Sequence poses; + /// Names of markers to be erased + rosidl_runtime_c__String__Sequence erases; +} visualization_msgs__msg__InteractiveMarkerUpdate; + +// Struct for a sequence of visualization_msgs__msg__InteractiveMarkerUpdate. +typedef struct visualization_msgs__msg__InteractiveMarkerUpdate__Sequence +{ + visualization_msgs__msg__InteractiveMarkerUpdate * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__InteractiveMarkerUpdate__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp similarity index 76% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp index 947bd7a5f..bdf228556 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'markers' @@ -63,7 +64,7 @@ struct InteractiveMarkerUpdate_ // field types and members using _server_id_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _server_id_type server_id; using _seq_num_type = uint64_t; @@ -72,18 +73,18 @@ struct InteractiveMarkerUpdate_ uint8_t; _type_type type; using _markers_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _markers_type markers; using _poses_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _poses_type poses; using _erases_type = - std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>>; _erases_type erases; // setters for named parameter idiom Type & set__server_id( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->server_id = _arg; return *this; @@ -101,19 +102,19 @@ struct InteractiveMarkerUpdate_ return *this; } Type & set__markers( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->markers = _arg; return *this; } Type & set__poses( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->poses = _arg; return *this; } Type & set__erases( - const std::vector, typename ContainerAllocator::template rebind::other>, typename ContainerAllocator::template rebind, typename ContainerAllocator::template rebind::other>>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>, typename std::allocator_traits::template rebind_alloc, typename std::allocator_traits::template rebind_alloc>>> & _arg) { this->erases = _arg; return *this; @@ -196,10 +197,16 @@ using InteractiveMarkerUpdate = visualization_msgs::msg::InteractiveMarkerUpdate_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerUpdate_::KEEP_ALIVE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t InteractiveMarkerUpdate_::UPDATE; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp new file mode 100644 index 000000000..12eeb76a1 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__traits.hpp @@ -0,0 +1,261 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/interactive_marker_update__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'markers' +#include "visualization_msgs/msg/detail/interactive_marker__traits.hpp" +// Member 'poses' +#include "visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const InteractiveMarkerUpdate & msg, + std::ostream & out) +{ + out << "{"; + // member: server_id + { + out << "server_id: "; + rosidl_generator_traits::value_to_yaml(msg.server_id, out); + out << ", "; + } + + // member: seq_num + { + out << "seq_num: "; + rosidl_generator_traits::value_to_yaml(msg.seq_num, out); + out << ", "; + } + + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: markers + { + if (msg.markers.size() == 0) { + out << "markers: []"; + } else { + out << "markers: ["; + size_t pending_items = msg.markers.size(); + for (auto item : msg.markers) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: poses + { + if (msg.poses.size() == 0) { + out << "poses: []"; + } else { + out << "poses: ["; + size_t pending_items = msg.poses.size(); + for (auto item : msg.poses) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: erases + { + if (msg.erases.size() == 0) { + out << "erases: []"; + } else { + out << "erases: ["; + size_t pending_items = msg.erases.size(); + for (auto item : msg.erases) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const InteractiveMarkerUpdate & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: server_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "server_id: "; + rosidl_generator_traits::value_to_yaml(msg.server_id, out); + out << "\n"; + } + + // member: seq_num + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "seq_num: "; + rosidl_generator_traits::value_to_yaml(msg.seq_num, out); + out << "\n"; + } + + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: markers + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.markers.size() == 0) { + out << "markers: []\n"; + } else { + out << "markers:\n"; + for (auto item : msg.markers) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: poses + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.poses.size() == 0) { + out << "poses: []\n"; + } else { + out << "poses:\n"; + for (auto item : msg.poses) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: erases + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.erases.size() == 0) { + out << "erases: []\n"; + } else { + out << "erases:\n"; + for (auto item : msg.erases) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const InteractiveMarkerUpdate & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::InteractiveMarkerUpdate & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::InteractiveMarkerUpdate & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::InteractiveMarkerUpdate"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/InteractiveMarkerUpdate"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.c new file mode 100644 index 000000000..ab3ca4f31 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.c @@ -0,0 +1,350 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/interactive_marker_update__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/interactive_marker_update__functions.h" +#include "visualization_msgs/msg/detail/interactive_marker_update__struct.h" + + +// Include directives for member types +// Member `server_id` +// Member `erases` +#include "rosidl_runtime_c/string_functions.h" +// Member `markers` +#include "visualization_msgs/msg/interactive_marker.h" +// Member `markers` +#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" +// Member `poses` +#include "visualization_msgs/msg/interactive_marker_pose.h" +// Member `poses` +#include "visualization_msgs/msg/detail/interactive_marker_pose__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_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; + visualization_msgs__msg__InteractiveMarkerUpdate__init(message_memory); +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_fini_function(void * message_memory) +{ + visualization_msgs__msg__InteractiveMarkerUpdate__fini(message_memory); +} + +size_t visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__markers( + const void * untyped_member) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__markers( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__markers( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__InteractiveMarker * item = + ((const visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__markers(untyped_member, index)); + visualization_msgs__msg__InteractiveMarker * value = + (visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__InteractiveMarker * item = + ((visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__markers(untyped_member, index)); + const visualization_msgs__msg__InteractiveMarker * value = + (const visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__markers( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); + return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__poses( + const void * untyped_member) +{ + const visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = + (const visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__poses( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = + (const visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__poses( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = + (visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__InteractiveMarkerPose * item = + ((const visualization_msgs__msg__InteractiveMarkerPose *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__poses(untyped_member, index)); + visualization_msgs__msg__InteractiveMarkerPose * value = + (visualization_msgs__msg__InteractiveMarkerPose *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__InteractiveMarkerPose * item = + ((visualization_msgs__msg__InteractiveMarkerPose *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__poses(untyped_member, index)); + const visualization_msgs__msg__InteractiveMarkerPose * value = + (const visualization_msgs__msg__InteractiveMarkerPose *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__poses( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__InteractiveMarkerPose__Sequence * member = + (visualization_msgs__msg__InteractiveMarkerPose__Sequence *)(untyped_member); + visualization_msgs__msg__InteractiveMarkerPose__Sequence__fini(member); + return visualization_msgs__msg__InteractiveMarkerPose__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__erases( + const void * untyped_member) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__erases( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__String__Sequence * member = + (const rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__erases( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__erases( + const void * untyped_member, size_t index, void * untyped_value) +{ + const rosidl_runtime_c__String * item = + ((const rosidl_runtime_c__String *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__erases(untyped_member, index)); + rosidl_runtime_c__String * value = + (rosidl_runtime_c__String *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__erases( + void * untyped_member, size_t index, const void * untyped_value) +{ + rosidl_runtime_c__String * item = + ((rosidl_runtime_c__String *) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__erases(untyped_member, index)); + const rosidl_runtime_c__String * value = + (const rosidl_runtime_c__String *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__erases( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__String__Sequence * member = + (rosidl_runtime_c__String__Sequence *)(untyped_member); + rosidl_runtime_c__String__Sequence__fini(member); + return rosidl_runtime_c__String__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[6] = { + { + "server_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, server_id), // 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 + }, + { + "seq_num", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, seq_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 + }, + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, type), // 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 + }, + { + "markers", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, markers), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__markers, // size() function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__markers, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__markers, // get(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__markers, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__markers, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__markers // resize(index) function pointer + }, + { + "poses", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, poses), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__poses, // size() function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__poses, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__poses, // get(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__poses, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__poses, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__poses // resize(index) function pointer + }, + { + "erases", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__InteractiveMarkerUpdate, erases), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__size_function__InteractiveMarkerUpdate__erases, // size() function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_const_function__InteractiveMarkerUpdate__erases, // get_const(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__get_function__InteractiveMarkerUpdate__erases, // get(index) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__fetch_function__InteractiveMarkerUpdate__erases, // fetch(index, &value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__assign_function__InteractiveMarkerUpdate__erases, // assign(index, value) function pointer + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__resize_function__InteractiveMarkerUpdate__erases // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_members = { + "visualization_msgs__msg", // message namespace + "InteractiveMarkerUpdate", // message name + 6, // number of fields + sizeof(visualization_msgs__msg__InteractiveMarkerUpdate), + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array, // message members + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_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 visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle = { + 0, + &visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerUpdate)() { + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[3].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_member_array[4].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarkerPose)(); + if (!visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__InteractiveMarkerUpdate__rosidl_typesupport_introspection_c__InteractiveMarkerUpdate_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp similarity index 75% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp index 8e3139625..a936c8af2 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__InteractiveMarkerUpdate__markers(void * untyped_member, siz return &member[index]; } +void fetch_function__InteractiveMarkerUpdate__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarkerUpdate__markers(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarkerUpdate__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarkerUpdate__markers(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarkerUpdate__markers(void * untyped_member, size_t size) { auto * member = @@ -84,6 +102,24 @@ void * get_function__InteractiveMarkerUpdate__poses(void * untyped_member, size_ return &member[index]; } +void fetch_function__InteractiveMarkerUpdate__poses( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarkerUpdate__poses(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarkerUpdate__poses( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarkerUpdate__poses(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarkerUpdate__poses(void * untyped_member, size_t size) { auto * member = @@ -111,6 +147,24 @@ void * get_function__InteractiveMarkerUpdate__erases(void * untyped_member, size return &member[index]; } +void fetch_function__InteractiveMarkerUpdate__erases( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__InteractiveMarkerUpdate__erases(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__InteractiveMarkerUpdate__erases( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__InteractiveMarkerUpdate__erases(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__InteractiveMarkerUpdate__erases(void * untyped_member, size_t size) { auto * member = @@ -132,6 +186,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -147,6 +203,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -162,6 +220,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa 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 }, { @@ -177,6 +237,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarkerUpdate__markers, // size() function pointer get_const_function__InteractiveMarkerUpdate__markers, // get_const(index) function pointer get_function__InteractiveMarkerUpdate__markers, // get(index) function pointer + fetch_function__InteractiveMarkerUpdate__markers, // fetch(index, &value) function pointer + assign_function__InteractiveMarkerUpdate__markers, // assign(index, value) function pointer resize_function__InteractiveMarkerUpdate__markers // resize(index) function pointer }, { @@ -192,6 +254,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarkerUpdate__poses, // size() function pointer get_const_function__InteractiveMarkerUpdate__poses, // get_const(index) function pointer get_function__InteractiveMarkerUpdate__poses, // get(index) function pointer + fetch_function__InteractiveMarkerUpdate__poses, // fetch(index, &value) function pointer + assign_function__InteractiveMarkerUpdate__poses, // assign(index, value) function pointer resize_function__InteractiveMarkerUpdate__poses // resize(index) function pointer }, { @@ -207,6 +271,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember InteractiveMa size_function__InteractiveMarkerUpdate__erases, // size() function pointer get_const_function__InteractiveMarkerUpdate__erases, // get_const(index) function pointer get_function__InteractiveMarkerUpdate__erases, // get(index) function pointer + fetch_function__InteractiveMarkerUpdate__erases, // fetch(index, &value) function pointer + assign_function__InteractiveMarkerUpdate__erases, // assign(index, value) function pointer resize_function__InteractiveMarkerUpdate__erases // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/interactive_marker_update__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.hpp new file mode 100644 index 000000000..372da18bf --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/interactive_marker_update__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/InteractiveMarkerUpdate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + InteractiveMarkerUpdate +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__INTERACTIVE_MARKER_UPDATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__builder.hpp similarity index 76% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__builder.hpp index 8269643c3..81801f7ee 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/marker__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/marker__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { @@ -36,16 +37,32 @@ class Init_Marker_mesh_use_embedded_materials ::visualization_msgs::msg::Marker msg_; }; +class Init_Marker_mesh_file +{ +public: + explicit Init_Marker_mesh_file(::visualization_msgs::msg::Marker & msg) + : msg_(msg) + {} + Init_Marker_mesh_use_embedded_materials mesh_file(::visualization_msgs::msg::Marker::_mesh_file_type arg) + { + msg_.mesh_file = std::move(arg); + return Init_Marker_mesh_use_embedded_materials(msg_); + } + +private: + ::visualization_msgs::msg::Marker msg_; +}; + class Init_Marker_mesh_resource { public: explicit Init_Marker_mesh_resource(::visualization_msgs::msg::Marker & msg) : msg_(msg) {} - Init_Marker_mesh_use_embedded_materials mesh_resource(::visualization_msgs::msg::Marker::_mesh_resource_type arg) + Init_Marker_mesh_file mesh_resource(::visualization_msgs::msg::Marker::_mesh_resource_type arg) { msg_.mesh_resource = std::move(arg); - return Init_Marker_mesh_use_embedded_materials(msg_); + return Init_Marker_mesh_file(msg_); } private: @@ -68,16 +85,64 @@ class Init_Marker_text ::visualization_msgs::msg::Marker msg_; }; +class Init_Marker_uv_coordinates +{ +public: + explicit Init_Marker_uv_coordinates(::visualization_msgs::msg::Marker & msg) + : msg_(msg) + {} + Init_Marker_text uv_coordinates(::visualization_msgs::msg::Marker::_uv_coordinates_type arg) + { + msg_.uv_coordinates = std::move(arg); + return Init_Marker_text(msg_); + } + +private: + ::visualization_msgs::msg::Marker msg_; +}; + +class Init_Marker_texture +{ +public: + explicit Init_Marker_texture(::visualization_msgs::msg::Marker & msg) + : msg_(msg) + {} + Init_Marker_uv_coordinates texture(::visualization_msgs::msg::Marker::_texture_type arg) + { + msg_.texture = std::move(arg); + return Init_Marker_uv_coordinates(msg_); + } + +private: + ::visualization_msgs::msg::Marker msg_; +}; + +class Init_Marker_texture_resource +{ +public: + explicit Init_Marker_texture_resource(::visualization_msgs::msg::Marker & msg) + : msg_(msg) + {} + Init_Marker_texture texture_resource(::visualization_msgs::msg::Marker::_texture_resource_type arg) + { + msg_.texture_resource = std::move(arg); + return Init_Marker_texture(msg_); + } + +private: + ::visualization_msgs::msg::Marker msg_; +}; + class Init_Marker_colors { public: explicit Init_Marker_colors(::visualization_msgs::msg::Marker & msg) : msg_(msg) {} - Init_Marker_text colors(::visualization_msgs::msg::Marker::_colors_type arg) + Init_Marker_texture_resource colors(::visualization_msgs::msg::Marker::_colors_type arg) { msg_.colors = std::move(arg); - return Init_Marker_text(msg_); + return Init_Marker_texture_resource(msg_); } private: diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__functions.c similarity index 79% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__functions.c index 8fd431653..c2171591c 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__functions.c @@ -15,6 +15,7 @@ // Member `header` #include "std_msgs/msg/detail/header__functions.h" // Member `ns` +// Member `texture_resource` // Member `text` // Member `mesh_resource` #include "rosidl_runtime_c/string_functions.h" @@ -29,6 +30,12 @@ #include "builtin_interfaces/msg/detail/duration__functions.h" // Member `points` #include "geometry_msgs/msg/detail/point__functions.h" +// Member `texture` +#include "sensor_msgs/msg/detail/compressed_image__functions.h" +// Member `uv_coordinates` +#include "visualization_msgs/msg/detail/uv_coordinate__functions.h" +// Member `mesh_file` +#include "visualization_msgs/msg/detail/mesh_file__functions.h" bool visualization_msgs__msg__Marker__init(visualization_msgs__msg__Marker * msg) @@ -80,6 +87,21 @@ visualization_msgs__msg__Marker__init(visualization_msgs__msg__Marker * msg) visualization_msgs__msg__Marker__fini(msg); return false; } + // texture_resource + if (!rosidl_runtime_c__String__init(&msg->texture_resource)) { + visualization_msgs__msg__Marker__fini(msg); + return false; + } + // texture + if (!sensor_msgs__msg__CompressedImage__init(&msg->texture)) { + visualization_msgs__msg__Marker__fini(msg); + return false; + } + // uv_coordinates + if (!visualization_msgs__msg__UVCoordinate__Sequence__init(&msg->uv_coordinates, 0)) { + visualization_msgs__msg__Marker__fini(msg); + return false; + } // text if (!rosidl_runtime_c__String__init(&msg->text)) { visualization_msgs__msg__Marker__fini(msg); @@ -90,6 +112,11 @@ visualization_msgs__msg__Marker__init(visualization_msgs__msg__Marker * msg) visualization_msgs__msg__Marker__fini(msg); return false; } + // mesh_file + if (!visualization_msgs__msg__MeshFile__init(&msg->mesh_file)) { + visualization_msgs__msg__Marker__fini(msg); + return false; + } // mesh_use_embedded_materials return true; } @@ -120,10 +147,18 @@ visualization_msgs__msg__Marker__fini(visualization_msgs__msg__Marker * msg) geometry_msgs__msg__Point__Sequence__fini(&msg->points); // colors std_msgs__msg__ColorRGBA__Sequence__fini(&msg->colors); + // texture_resource + rosidl_runtime_c__String__fini(&msg->texture_resource); + // texture + sensor_msgs__msg__CompressedImage__fini(&msg->texture); + // uv_coordinates + visualization_msgs__msg__UVCoordinate__Sequence__fini(&msg->uv_coordinates); // text rosidl_runtime_c__String__fini(&msg->text); // mesh_resource rosidl_runtime_c__String__fini(&msg->mesh_resource); + // mesh_file + visualization_msgs__msg__MeshFile__fini(&msg->mesh_file); // mesh_use_embedded_materials } @@ -197,6 +232,24 @@ visualization_msgs__msg__Marker__are_equal(const visualization_msgs__msg__Marker { return false; } + // texture_resource + if (!rosidl_runtime_c__String__are_equal( + &(lhs->texture_resource), &(rhs->texture_resource))) + { + return false; + } + // texture + if (!sensor_msgs__msg__CompressedImage__are_equal( + &(lhs->texture), &(rhs->texture))) + { + return false; + } + // uv_coordinates + if (!visualization_msgs__msg__UVCoordinate__Sequence__are_equal( + &(lhs->uv_coordinates), &(rhs->uv_coordinates))) + { + return false; + } // text if (!rosidl_runtime_c__String__are_equal( &(lhs->text), &(rhs->text))) @@ -209,6 +262,12 @@ visualization_msgs__msg__Marker__are_equal(const visualization_msgs__msg__Marker { return false; } + // mesh_file + if (!visualization_msgs__msg__MeshFile__are_equal( + &(lhs->mesh_file), &(rhs->mesh_file))) + { + return false; + } // mesh_use_embedded_materials if (lhs->mesh_use_embedded_materials != rhs->mesh_use_embedded_materials) { return false; @@ -280,6 +339,24 @@ visualization_msgs__msg__Marker__copy( { return false; } + // texture_resource + if (!rosidl_runtime_c__String__copy( + &(input->texture_resource), &(output->texture_resource))) + { + return false; + } + // texture + if (!sensor_msgs__msg__CompressedImage__copy( + &(input->texture), &(output->texture))) + { + return false; + } + // uv_coordinates + if (!visualization_msgs__msg__UVCoordinate__Sequence__copy( + &(input->uv_coordinates), &(output->uv_coordinates))) + { + return false; + } // text if (!rosidl_runtime_c__String__copy( &(input->text), &(output->text))) @@ -292,6 +369,12 @@ visualization_msgs__msg__Marker__copy( { return false; } + // mesh_file + if (!visualization_msgs__msg__MeshFile__copy( + &(input->mesh_file), &(output->mesh_file))) + { + return false; + } // mesh_use_embedded_materials output->mesh_use_embedded_materials = input->mesh_use_embedded_materials; return true; @@ -442,22 +525,27 @@ visualization_msgs__msg__Marker__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__Marker); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__Marker * data = - (visualization_msgs__msg__Marker *)realloc(output->data, allocation_size); + (visualization_msgs__msg__Marker *)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 (!visualization_msgs__msg__Marker__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__Marker__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; ) { - visualization_msgs__msg__Marker__fini(&data[i]); + visualization_msgs__msg__Marker__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h index ea42182c7..c6bbed8c5 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__Marker( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__Marker( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp index f6084de52..fd72241fa 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_Marker( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.h new file mode 100644 index 000000000..32cae7b31 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.h @@ -0,0 +1,220 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/Marker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'ARROW'. +enum +{ + visualization_msgs__msg__Marker__ARROW = 0l +}; + +/// Constant 'CUBE'. +enum +{ + visualization_msgs__msg__Marker__CUBE = 1l +}; + +/// Constant 'SPHERE'. +enum +{ + visualization_msgs__msg__Marker__SPHERE = 2l +}; + +/// Constant 'CYLINDER'. +enum +{ + visualization_msgs__msg__Marker__CYLINDER = 3l +}; + +/// Constant 'LINE_STRIP'. +enum +{ + visualization_msgs__msg__Marker__LINE_STRIP = 4l +}; + +/// Constant 'LINE_LIST'. +enum +{ + visualization_msgs__msg__Marker__LINE_LIST = 5l +}; + +/// Constant 'CUBE_LIST'. +enum +{ + visualization_msgs__msg__Marker__CUBE_LIST = 6l +}; + +/// Constant 'SPHERE_LIST'. +enum +{ + visualization_msgs__msg__Marker__SPHERE_LIST = 7l +}; + +/// Constant 'POINTS'. +enum +{ + visualization_msgs__msg__Marker__POINTS = 8l +}; + +/// Constant 'TEXT_VIEW_FACING'. +enum +{ + visualization_msgs__msg__Marker__TEXT_VIEW_FACING = 9l +}; + +/// Constant 'MESH_RESOURCE'. +enum +{ + visualization_msgs__msg__Marker__MESH_RESOURCE = 10l +}; + +/// Constant 'TRIANGLE_LIST'. +enum +{ + visualization_msgs__msg__Marker__TRIANGLE_LIST = 11l +}; + +/// Constant 'ADD'. +enum +{ + visualization_msgs__msg__Marker__ADD = 0l +}; + +/// Constant 'MODIFY'. +enum +{ + visualization_msgs__msg__Marker__MODIFY = 0l +}; + +/// Constant 'DELETE'. +enum +{ + visualization_msgs__msg__Marker__DELETE = 2l +}; + +/// Constant 'DELETEALL'. +enum +{ + visualization_msgs__msg__Marker__DELETEALL = 3l +}; + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.h" +// Member 'ns' +// Member 'texture_resource' +// Member 'text' +// Member 'mesh_resource' +#include "rosidl_runtime_c/string.h" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__struct.h" +// Member 'scale' +#include "geometry_msgs/msg/detail/vector3__struct.h" +// Member 'color' +// Member 'colors' +#include "std_msgs/msg/detail/color_rgba__struct.h" +// Member 'lifetime' +#include "builtin_interfaces/msg/detail/duration__struct.h" +// Member 'points' +#include "geometry_msgs/msg/detail/point__struct.h" +// Member 'texture' +#include "sensor_msgs/msg/detail/compressed_image__struct.h" +// Member 'uv_coordinates' +#include "visualization_msgs/msg/detail/uv_coordinate__struct.h" +// Member 'mesh_file' +#include "visualization_msgs/msg/detail/mesh_file__struct.h" + +/// Struct defined in msg/Marker in the package visualization_msgs. +/** + * See: + * - http://www.ros.org/wiki/rviz/DisplayTypes/Marker + * - http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes + * + * for more information on using this message with rviz. + */ +typedef struct visualization_msgs__msg__Marker +{ + /// Header for timestamp and frame id. + std_msgs__msg__Header header; + /// Namespace in which to place the object. + /// Used in conjunction with id to create a unique name for the object. + rosidl_runtime_c__String ns; + /// Object ID used in conjunction with the namespace for manipulating and deleting the object later. + int32_t id; + /// Type of object. + int32_t type; + /// Action to take; one of: + /// - 0 add/modify an object + /// - 1 (deprecated) + /// - 2 deletes an object (with the given ns and id) + /// - 3 deletes all objects (or those with the given ns if any) + int32_t action; + /// Pose of the object with respect the frame_id specified in the header. + geometry_msgs__msg__Pose pose; + /// Scale of the object; 1,1,1 means default (usually 1 meter square). + geometry_msgs__msg__Vector3 scale; + /// Color of the object; in the range: + std_msgs__msg__ColorRGBA color; + /// How long the object should last before being automatically deleted. + /// 0 indicates forever. + builtin_interfaces__msg__Duration lifetime; + /// If this marker should be frame-locked, i.e. retransformed into its frame every timestep. + bool frame_locked; + /// Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, etc.) + geometry_msgs__msg__Point__Sequence points; + /// Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, etc.) + /// The number of colors provided must either be 0 or equal to the number of points provided. + /// NOTE: alpha is not yet used + std_msgs__msg__ColorRGBA__Sequence colors; + /// Texture resource is a special URI that can either reference a texture file in + /// a format acceptable to (resource retriever) + /// or an embedded texture via a string matching the format: + /// "embedded://texture_name" + rosidl_runtime_c__String texture_resource; + /// An image to be loaded into the rendering engine as the texture for this marker. + /// This will be used iff texture_resource is set to embedded. + sensor_msgs__msg__CompressedImage texture; + /// Location of each vertex within the texture; in the range: + visualization_msgs__msg__UVCoordinate__Sequence uv_coordinates; + /// Only used for text markers + rosidl_runtime_c__String text; + /// Only used for MESH_RESOURCE markers. + /// Similar to texture_resource, mesh_resource uses resource retriever to load a mesh. + /// Optionally, a mesh file can be sent in-message via the mesh_file field. If doing so, + /// use the following format for mesh_resource: + /// "embedded://mesh_name" + rosidl_runtime_c__String mesh_resource; + visualization_msgs__msg__MeshFile mesh_file; + bool mesh_use_embedded_materials; +} visualization_msgs__msg__Marker; + +// Struct for a sequence of visualization_msgs__msg__Marker. +typedef struct visualization_msgs__msg__Marker__Sequence +{ + visualization_msgs__msg__Marker * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__Marker__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.hpp new file mode 100644 index 000000000..0bfa20c97 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__struct.hpp @@ -0,0 +1,535 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from visualization_msgs:msg/Marker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__struct.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__struct.hpp" +// Member 'scale' +#include "geometry_msgs/msg/detail/vector3__struct.hpp" +// Member 'color' +// Member 'colors' +#include "std_msgs/msg/detail/color_rgba__struct.hpp" +// Member 'lifetime' +#include "builtin_interfaces/msg/detail/duration__struct.hpp" +// Member 'points' +#include "geometry_msgs/msg/detail/point__struct.hpp" +// Member 'texture' +#include "sensor_msgs/msg/detail/compressed_image__struct.hpp" +// Member 'uv_coordinates' +#include "visualization_msgs/msg/detail/uv_coordinate__struct.hpp" +// Member 'mesh_file' +#include "visualization_msgs/msg/detail/mesh_file__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__visualization_msgs__msg__Marker __attribute__((deprecated)) +#else +# define DEPRECATED__visualization_msgs__msg__Marker __declspec(deprecated) +#endif + +namespace visualization_msgs +{ + +namespace msg +{ + +// message struct +template +struct Marker_ +{ + using Type = Marker_; + + explicit Marker_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init), + pose(_init), + scale(_init), + color(_init), + lifetime(_init), + texture(_init), + mesh_file(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->ns = ""; + this->id = 0l; + this->type = 0l; + this->action = 0l; + this->frame_locked = false; + this->texture_resource = ""; + this->text = ""; + this->mesh_resource = ""; + this->mesh_use_embedded_materials = false; + } + } + + explicit Marker_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init), + ns(_alloc), + pose(_alloc, _init), + scale(_alloc, _init), + color(_alloc, _init), + lifetime(_alloc, _init), + texture_resource(_alloc), + texture(_alloc, _init), + text(_alloc), + mesh_resource(_alloc), + mesh_file(_alloc, _init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->ns = ""; + this->id = 0l; + this->type = 0l; + this->action = 0l; + this->frame_locked = false; + this->texture_resource = ""; + this->text = ""; + this->mesh_resource = ""; + this->mesh_use_embedded_materials = false; + } + } + + // field types and members + using _header_type = + std_msgs::msg::Header_; + _header_type header; + using _ns_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _ns_type ns; + using _id_type = + int32_t; + _id_type id; + using _type_type = + int32_t; + _type_type type; + using _action_type = + int32_t; + _action_type action; + using _pose_type = + geometry_msgs::msg::Pose_; + _pose_type pose; + using _scale_type = + geometry_msgs::msg::Vector3_; + _scale_type scale; + using _color_type = + std_msgs::msg::ColorRGBA_; + _color_type color; + using _lifetime_type = + builtin_interfaces::msg::Duration_; + _lifetime_type lifetime; + using _frame_locked_type = + bool; + _frame_locked_type frame_locked; + using _points_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _points_type points; + using _colors_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _colors_type colors; + using _texture_resource_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _texture_resource_type texture_resource; + using _texture_type = + sensor_msgs::msg::CompressedImage_; + _texture_type texture; + using _uv_coordinates_type = + std::vector, typename std::allocator_traits::template rebind_alloc>>; + _uv_coordinates_type uv_coordinates; + using _text_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _text_type text; + using _mesh_resource_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _mesh_resource_type mesh_resource; + using _mesh_file_type = + visualization_msgs::msg::MeshFile_; + _mesh_file_type mesh_file; + using _mesh_use_embedded_materials_type = + bool; + _mesh_use_embedded_materials_type mesh_use_embedded_materials; + + // setters for named parameter idiom + Type & set__header( + const std_msgs::msg::Header_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__ns( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->ns = _arg; + return *this; + } + Type & set__id( + const int32_t & _arg) + { + this->id = _arg; + return *this; + } + Type & set__type( + const int32_t & _arg) + { + this->type = _arg; + return *this; + } + Type & set__action( + const int32_t & _arg) + { + this->action = _arg; + return *this; + } + Type & set__pose( + const geometry_msgs::msg::Pose_ & _arg) + { + this->pose = _arg; + return *this; + } + Type & set__scale( + const geometry_msgs::msg::Vector3_ & _arg) + { + this->scale = _arg; + return *this; + } + Type & set__color( + const std_msgs::msg::ColorRGBA_ & _arg) + { + this->color = _arg; + return *this; + } + Type & set__lifetime( + const builtin_interfaces::msg::Duration_ & _arg) + { + this->lifetime = _arg; + return *this; + } + Type & set__frame_locked( + const bool & _arg) + { + this->frame_locked = _arg; + return *this; + } + Type & set__points( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->points = _arg; + return *this; + } + Type & set__colors( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->colors = _arg; + return *this; + } + Type & set__texture_resource( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->texture_resource = _arg; + return *this; + } + Type & set__texture( + const sensor_msgs::msg::CompressedImage_ & _arg) + { + this->texture = _arg; + return *this; + } + Type & set__uv_coordinates( + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) + { + this->uv_coordinates = _arg; + return *this; + } + Type & set__text( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->text = _arg; + return *this; + } + Type & set__mesh_resource( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->mesh_resource = _arg; + return *this; + } + Type & set__mesh_file( + const visualization_msgs::msg::MeshFile_ & _arg) + { + this->mesh_file = _arg; + return *this; + } + Type & set__mesh_use_embedded_materials( + const bool & _arg) + { + this->mesh_use_embedded_materials = _arg; + return *this; + } + + // constant declarations + static constexpr int32_t ARROW = + 0; + static constexpr int32_t CUBE = + 1; + static constexpr int32_t SPHERE = + 2; + static constexpr int32_t CYLINDER = + 3; + static constexpr int32_t LINE_STRIP = + 4; + static constexpr int32_t LINE_LIST = + 5; + static constexpr int32_t CUBE_LIST = + 6; + static constexpr int32_t SPHERE_LIST = + 7; + static constexpr int32_t POINTS = + 8; + static constexpr int32_t TEXT_VIEW_FACING = + 9; + static constexpr int32_t MESH_RESOURCE = + 10; + static constexpr int32_t TRIANGLE_LIST = + 11; + static constexpr int32_t ADD = + 0; + static constexpr int32_t MODIFY = + 0; + // guard against 'DELETE' being predefined by MSVC by temporarily undefining it +#if defined(_WIN32) +# if defined(DELETE) +# pragma push_macro("DELETE") +# undef DELETE +# endif +#endif + static constexpr int32_t DELETE = + 2; +#if defined(_WIN32) +# pragma warning(suppress : 4602) +# pragma pop_macro("DELETE") +#endif + static constexpr int32_t DELETEALL = + 3; + + // pointer types + using RawPtr = + visualization_msgs::msg::Marker_ *; + using ConstRawPtr = + const visualization_msgs::msg::Marker_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__visualization_msgs__msg__Marker + std::shared_ptr> + Ptr; + typedef DEPRECATED__visualization_msgs__msg__Marker + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Marker_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->ns != other.ns) { + return false; + } + if (this->id != other.id) { + return false; + } + if (this->type != other.type) { + return false; + } + if (this->action != other.action) { + return false; + } + if (this->pose != other.pose) { + return false; + } + if (this->scale != other.scale) { + return false; + } + if (this->color != other.color) { + return false; + } + if (this->lifetime != other.lifetime) { + return false; + } + if (this->frame_locked != other.frame_locked) { + return false; + } + if (this->points != other.points) { + return false; + } + if (this->colors != other.colors) { + return false; + } + if (this->texture_resource != other.texture_resource) { + return false; + } + if (this->texture != other.texture) { + return false; + } + if (this->uv_coordinates != other.uv_coordinates) { + return false; + } + if (this->text != other.text) { + return false; + } + if (this->mesh_resource != other.mesh_resource) { + return false; + } + if (this->mesh_file != other.mesh_file) { + return false; + } + if (this->mesh_use_embedded_materials != other.mesh_use_embedded_materials) { + return false; + } + return true; + } + bool operator!=(const Marker_ & other) const + { + return !this->operator==(other); + } +}; // struct Marker_ + +// alias to use template instance with default allocator +using Marker = + visualization_msgs::msg::Marker_>; + +// constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::ARROW; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::CUBE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::SPHERE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::CYLINDER; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::LINE_STRIP; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::LINE_LIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::CUBE_LIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::SPHERE_LIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::POINTS; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::TEXT_VIEW_FACING; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::MESH_RESOURCE; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::TRIANGLE_LIST; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::ADD; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::MODIFY; +#endif // __cplusplus < 201703L +// guard against 'DELETE' being predefined by MSVC by temporarily undefining it +#if defined(_WIN32) +# if defined(DELETE) +# pragma push_macro("DELETE") +# undef DELETE +# endif +#endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::DELETE; +#endif // __cplusplus < 201703L +#if defined(_WIN32) +# pragma warning(suppress : 4602) +# pragma pop_macro("DELETE") +#endif +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 +template +constexpr int32_t Marker_::DELETEALL; +#endif // __cplusplus < 201703L + +} // namespace msg + +} // namespace visualization_msgs + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__traits.hpp new file mode 100644 index 000000000..a7684a50d --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__traits.hpp @@ -0,0 +1,489 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/Marker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/marker__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'header' +#include "std_msgs/msg/detail/header__traits.hpp" +// Member 'pose' +#include "geometry_msgs/msg/detail/pose__traits.hpp" +// Member 'scale' +#include "geometry_msgs/msg/detail/vector3__traits.hpp" +// Member 'color' +// Member 'colors' +#include "std_msgs/msg/detail/color_rgba__traits.hpp" +// Member 'lifetime' +#include "builtin_interfaces/msg/detail/duration__traits.hpp" +// Member 'points' +#include "geometry_msgs/msg/detail/point__traits.hpp" +// Member 'texture' +#include "sensor_msgs/msg/detail/compressed_image__traits.hpp" +// Member 'uv_coordinates' +#include "visualization_msgs/msg/detail/uv_coordinate__traits.hpp" +// Member 'mesh_file' +#include "visualization_msgs/msg/detail/mesh_file__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const Marker & msg, + std::ostream & out) +{ + out << "{"; + // member: header + { + out << "header: "; + to_flow_style_yaml(msg.header, out); + out << ", "; + } + + // member: ns + { + out << "ns: "; + rosidl_generator_traits::value_to_yaml(msg.ns, out); + out << ", "; + } + + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: type + { + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << ", "; + } + + // member: action + { + out << "action: "; + rosidl_generator_traits::value_to_yaml(msg.action, out); + out << ", "; + } + + // member: pose + { + out << "pose: "; + to_flow_style_yaml(msg.pose, out); + out << ", "; + } + + // member: scale + { + out << "scale: "; + to_flow_style_yaml(msg.scale, out); + out << ", "; + } + + // member: color + { + out << "color: "; + to_flow_style_yaml(msg.color, out); + out << ", "; + } + + // member: lifetime + { + out << "lifetime: "; + to_flow_style_yaml(msg.lifetime, out); + out << ", "; + } + + // member: frame_locked + { + out << "frame_locked: "; + rosidl_generator_traits::value_to_yaml(msg.frame_locked, out); + out << ", "; + } + + // member: points + { + if (msg.points.size() == 0) { + out << "points: []"; + } else { + out << "points: ["; + size_t pending_items = msg.points.size(); + for (auto item : msg.points) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: colors + { + if (msg.colors.size() == 0) { + out << "colors: []"; + } else { + out << "colors: ["; + size_t pending_items = msg.colors.size(); + for (auto item : msg.colors) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: texture_resource + { + out << "texture_resource: "; + rosidl_generator_traits::value_to_yaml(msg.texture_resource, out); + out << ", "; + } + + // member: texture + { + out << "texture: "; + to_flow_style_yaml(msg.texture, out); + out << ", "; + } + + // member: uv_coordinates + { + if (msg.uv_coordinates.size() == 0) { + out << "uv_coordinates: []"; + } else { + out << "uv_coordinates: ["; + size_t pending_items = msg.uv_coordinates.size(); + for (auto item : msg.uv_coordinates) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + out << ", "; + } + + // member: text + { + out << "text: "; + rosidl_generator_traits::value_to_yaml(msg.text, out); + out << ", "; + } + + // member: mesh_resource + { + out << "mesh_resource: "; + rosidl_generator_traits::value_to_yaml(msg.mesh_resource, out); + out << ", "; + } + + // member: mesh_file + { + out << "mesh_file: "; + to_flow_style_yaml(msg.mesh_file, out); + out << ", "; + } + + // member: mesh_use_embedded_materials + { + out << "mesh_use_embedded_materials: "; + rosidl_generator_traits::value_to_yaml(msg.mesh_use_embedded_materials, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const Marker & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: header + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "header:\n"; + to_block_style_yaml(msg.header, out, indentation + 2); + } + + // member: ns + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "ns: "; + rosidl_generator_traits::value_to_yaml(msg.ns, out); + out << "\n"; + } + + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "type: "; + rosidl_generator_traits::value_to_yaml(msg.type, out); + out << "\n"; + } + + // member: action + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "action: "; + rosidl_generator_traits::value_to_yaml(msg.action, out); + out << "\n"; + } + + // member: pose + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "pose:\n"; + to_block_style_yaml(msg.pose, out, indentation + 2); + } + + // member: scale + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "scale:\n"; + to_block_style_yaml(msg.scale, out, indentation + 2); + } + + // member: color + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "color:\n"; + to_block_style_yaml(msg.color, out, indentation + 2); + } + + // member: lifetime + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "lifetime:\n"; + to_block_style_yaml(msg.lifetime, out, indentation + 2); + } + + // member: frame_locked + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "frame_locked: "; + rosidl_generator_traits::value_to_yaml(msg.frame_locked, out); + out << "\n"; + } + + // member: points + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.points.size() == 0) { + out << "points: []\n"; + } else { + out << "points:\n"; + for (auto item : msg.points) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: colors + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.colors.size() == 0) { + out << "colors: []\n"; + } else { + out << "colors:\n"; + for (auto item : msg.colors) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: texture_resource + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "texture_resource: "; + rosidl_generator_traits::value_to_yaml(msg.texture_resource, out); + out << "\n"; + } + + // member: texture + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "texture:\n"; + to_block_style_yaml(msg.texture, out, indentation + 2); + } + + // member: uv_coordinates + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.uv_coordinates.size() == 0) { + out << "uv_coordinates: []\n"; + } else { + out << "uv_coordinates:\n"; + for (auto item : msg.uv_coordinates) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } + + // member: text + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "text: "; + rosidl_generator_traits::value_to_yaml(msg.text, out); + out << "\n"; + } + + // member: mesh_resource + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "mesh_resource: "; + rosidl_generator_traits::value_to_yaml(msg.mesh_resource, out); + out << "\n"; + } + + // member: mesh_file + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "mesh_file:\n"; + to_block_style_yaml(msg.mesh_file, out, indentation + 2); + } + + // member: mesh_use_embedded_materials + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "mesh_use_embedded_materials: "; + rosidl_generator_traits::value_to_yaml(msg.mesh_use_embedded_materials, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const Marker & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::Marker & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::Marker & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::Marker"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/Marker"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.c new file mode 100644 index 000000000..63cca04ce --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.c @@ -0,0 +1,619 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/Marker.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/marker__functions.h" +#include "visualization_msgs/msg/detail/marker__struct.h" + + +// Include directives for member types +// Member `header` +#include "std_msgs/msg/header.h" +// Member `header` +#include "std_msgs/msg/detail/header__rosidl_typesupport_introspection_c.h" +// Member `ns` +// Member `texture_resource` +// Member `text` +// Member `mesh_resource` +#include "rosidl_runtime_c/string_functions.h" +// Member `pose` +#include "geometry_msgs/msg/pose.h" +// Member `pose` +#include "geometry_msgs/msg/detail/pose__rosidl_typesupport_introspection_c.h" +// Member `scale` +#include "geometry_msgs/msg/vector3.h" +// Member `scale` +#include "geometry_msgs/msg/detail/vector3__rosidl_typesupport_introspection_c.h" +// Member `color` +// Member `colors` +#include "std_msgs/msg/color_rgba.h" +// Member `color` +// Member `colors` +#include "std_msgs/msg/detail/color_rgba__rosidl_typesupport_introspection_c.h" +// Member `lifetime` +#include "builtin_interfaces/msg/duration.h" +// Member `lifetime` +#include "builtin_interfaces/msg/detail/duration__rosidl_typesupport_introspection_c.h" +// Member `points` +#include "geometry_msgs/msg/point.h" +// Member `points` +#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h" +// Member `texture` +#include "sensor_msgs/msg/compressed_image.h" +// Member `texture` +#include "sensor_msgs/msg/detail/compressed_image__rosidl_typesupport_introspection_c.h" +// Member `uv_coordinates` +#include "visualization_msgs/msg/uv_coordinate.h" +// Member `uv_coordinates` +#include "visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_c.h" +// Member `mesh_file` +#include "visualization_msgs/msg/mesh_file.h" +// Member `mesh_file` +#include "visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_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; + visualization_msgs__msg__Marker__init(message_memory); +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_fini_function(void * message_memory) +{ + visualization_msgs__msg__Marker__fini(message_memory); +} + +size_t visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__points( + const void * untyped_member) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__points( + const void * untyped_member, size_t index) +{ + const geometry_msgs__msg__Point__Sequence * member = + (const geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__points( + void * untyped_member, size_t index) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const geometry_msgs__msg__Point * item = + ((const geometry_msgs__msg__Point *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__points(untyped_member, index)); + geometry_msgs__msg__Point * value = + (geometry_msgs__msg__Point *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + geometry_msgs__msg__Point * item = + ((geometry_msgs__msg__Point *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__points(untyped_member, index)); + const geometry_msgs__msg__Point * value = + (const geometry_msgs__msg__Point *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__points( + void * untyped_member, size_t size) +{ + geometry_msgs__msg__Point__Sequence * member = + (geometry_msgs__msg__Point__Sequence *)(untyped_member); + geometry_msgs__msg__Point__Sequence__fini(member); + return geometry_msgs__msg__Point__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__colors( + const void * untyped_member) +{ + const std_msgs__msg__ColorRGBA__Sequence * member = + (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__colors( + const void * untyped_member, size_t index) +{ + const std_msgs__msg__ColorRGBA__Sequence * member = + (const std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__colors( + void * untyped_member, size_t index) +{ + std_msgs__msg__ColorRGBA__Sequence * member = + (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__colors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const std_msgs__msg__ColorRGBA * item = + ((const std_msgs__msg__ColorRGBA *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__colors(untyped_member, index)); + std_msgs__msg__ColorRGBA * value = + (std_msgs__msg__ColorRGBA *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__colors( + void * untyped_member, size_t index, const void * untyped_value) +{ + std_msgs__msg__ColorRGBA * item = + ((std_msgs__msg__ColorRGBA *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__colors(untyped_member, index)); + const std_msgs__msg__ColorRGBA * value = + (const std_msgs__msg__ColorRGBA *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__colors( + void * untyped_member, size_t size) +{ + std_msgs__msg__ColorRGBA__Sequence * member = + (std_msgs__msg__ColorRGBA__Sequence *)(untyped_member); + std_msgs__msg__ColorRGBA__Sequence__fini(member); + return std_msgs__msg__ColorRGBA__Sequence__init(member, size); +} + +size_t visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__uv_coordinates( + const void * untyped_member) +{ + const visualization_msgs__msg__UVCoordinate__Sequence * member = + (const visualization_msgs__msg__UVCoordinate__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__uv_coordinates( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__UVCoordinate__Sequence * member = + (const visualization_msgs__msg__UVCoordinate__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__uv_coordinates( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__UVCoordinate__Sequence * member = + (visualization_msgs__msg__UVCoordinate__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__uv_coordinates( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__UVCoordinate * item = + ((const visualization_msgs__msg__UVCoordinate *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__uv_coordinates(untyped_member, index)); + visualization_msgs__msg__UVCoordinate * value = + (visualization_msgs__msg__UVCoordinate *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__uv_coordinates( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__UVCoordinate * item = + ((visualization_msgs__msg__UVCoordinate *) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__uv_coordinates(untyped_member, index)); + const visualization_msgs__msg__UVCoordinate * value = + (const visualization_msgs__msg__UVCoordinate *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__uv_coordinates( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__UVCoordinate__Sequence * member = + (visualization_msgs__msg__UVCoordinate__Sequence *)(untyped_member); + visualization_msgs__msg__UVCoordinate__Sequence__fini(member); + return visualization_msgs__msg__UVCoordinate__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[19] = { + { + "header", // 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(visualization_msgs__msg__Marker, header), // 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 + }, + { + "ns", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, ns), // 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 + }, + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, id), // 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 + }, + { + "type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, type), // 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 + }, + { + "action", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, action), // 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 + }, + { + "pose", // 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(visualization_msgs__msg__Marker, pose), // 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 + }, + { + "scale", // 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(visualization_msgs__msg__Marker, scale), // 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 + }, + { + "color", // 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(visualization_msgs__msg__Marker, color), // 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 + }, + { + "lifetime", // 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(visualization_msgs__msg__Marker, lifetime), // 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 + }, + { + "frame_locked", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, frame_locked), // 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 + }, + { + "points", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, points), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__points, // size() function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__points, // get_const(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__points, // get(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__points, // fetch(index, &value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__points, // assign(index, value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__points // resize(index) function pointer + }, + { + "colors", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, colors), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__colors, // size() function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__colors, // get_const(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__colors, // get(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__colors, // fetch(index, &value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__colors, // assign(index, value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__colors // resize(index) function pointer + }, + { + "texture_resource", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, texture_resource), // 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 + }, + { + "texture", // 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(visualization_msgs__msg__Marker, texture), // 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 + }, + { + "uv_coordinates", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, uv_coordinates), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__size_function__Marker__uv_coordinates, // size() function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_const_function__Marker__uv_coordinates, // get_const(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__get_function__Marker__uv_coordinates, // get(index) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__fetch_function__Marker__uv_coordinates, // fetch(index, &value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__assign_function__Marker__uv_coordinates, // assign(index, value) function pointer + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__resize_function__Marker__uv_coordinates // resize(index) function pointer + }, + { + "text", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, text), // 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 + }, + { + "mesh_resource", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, mesh_resource), // 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 + }, + { + "mesh_file", // 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(visualization_msgs__msg__Marker, mesh_file), // 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 + }, + { + "mesh_use_embedded_materials", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__Marker, mesh_use_embedded_materials), // 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 visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_members = { + "visualization_msgs__msg", // message namespace + "Marker", // message name + 19, // number of fields + sizeof(visualization_msgs__msg__Marker), + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array, // message members + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_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 visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle = { + 0, + &visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)() { + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, Header)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[5].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Pose)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Vector3)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[8].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, builtin_interfaces, msg, Duration)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[10].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[11].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, std_msgs, msg, ColorRGBA)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[13].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, sensor_msgs, msg, CompressedImage)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[14].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, UVCoordinate)(); + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_member_array[17].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MeshFile)(); + if (!visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__Marker__rosidl_typesupport_introspection_c__Marker_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.cpp new file mode 100644 index 000000000..258953307 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.cpp @@ -0,0 +1,550 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from visualization_msgs:msg/Marker.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 "visualization_msgs/msg/detail/marker__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 visualization_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Marker_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) visualization_msgs::msg::Marker(_init); +} + +void Marker_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Marker(); +} + +size_t size_function__Marker__points(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Marker__points(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Marker__points(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Marker__points( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Marker__points(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Marker__points( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Marker__points(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Marker__points(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__Marker__colors(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Marker__colors(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Marker__colors(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Marker__colors( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Marker__colors(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Marker__colors( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Marker__colors(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Marker__colors(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__Marker__uv_coordinates(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Marker__uv_coordinates(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Marker__uv_coordinates(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__Marker__uv_coordinates( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__Marker__uv_coordinates(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__Marker__uv_coordinates( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__Marker__uv_coordinates(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__Marker__uv_coordinates(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Marker_message_member_array[19] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, header), // 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 + }, + { + "ns", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, ns), // 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 + }, + { + "id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, id), // 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 + }, + { + "type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, type), // 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 + }, + { + "action", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, action), // 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 + }, + { + "pose", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, pose), // 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 + }, + { + "scale", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, scale), // 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 + }, + { + "color", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, color), // 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 + }, + { + "lifetime", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, lifetime), // 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 + }, + { + "frame_locked", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, frame_locked), // 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 + }, + { + "points", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, points), // bytes offset in struct + nullptr, // default value + size_function__Marker__points, // size() function pointer + get_const_function__Marker__points, // get_const(index) function pointer + get_function__Marker__points, // get(index) function pointer + fetch_function__Marker__points, // fetch(index, &value) function pointer + assign_function__Marker__points, // assign(index, value) function pointer + resize_function__Marker__points // resize(index) function pointer + }, + { + "colors", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, colors), // bytes offset in struct + nullptr, // default value + size_function__Marker__colors, // size() function pointer + get_const_function__Marker__colors, // get_const(index) function pointer + get_function__Marker__colors, // get(index) function pointer + fetch_function__Marker__colors, // fetch(index, &value) function pointer + assign_function__Marker__colors, // assign(index, value) function pointer + resize_function__Marker__colors // resize(index) function pointer + }, + { + "texture_resource", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, texture_resource), // 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 + }, + { + "texture", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, texture), // 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 + }, + { + "uv_coordinates", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, uv_coordinates), // bytes offset in struct + nullptr, // default value + size_function__Marker__uv_coordinates, // size() function pointer + get_const_function__Marker__uv_coordinates, // get_const(index) function pointer + get_function__Marker__uv_coordinates, // get(index) function pointer + fetch_function__Marker__uv_coordinates, // fetch(index, &value) function pointer + assign_function__Marker__uv_coordinates, // assign(index, value) function pointer + resize_function__Marker__uv_coordinates // resize(index) function pointer + }, + { + "text", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, text), // 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 + }, + { + "mesh_resource", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, mesh_resource), // 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 + }, + { + "mesh_file", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, mesh_file), // 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 + }, + { + "mesh_use_embedded_materials", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::Marker, mesh_use_embedded_materials), // 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 Marker_message_members = { + "visualization_msgs::msg", // message namespace + "Marker", // message name + 19, // number of fields + sizeof(visualization_msgs::msg::Marker), + Marker_message_member_array, // message members + Marker_init_function, // function to initialize message memory (memory has to be allocated) + Marker_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Marker_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Marker_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace visualization_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::Marker_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, visualization_msgs, msg, Marker)() { + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::Marker_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.hpp new file mode 100644 index 000000000..5ef61906e --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/Marker.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + Marker +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__builder.hpp similarity index 95% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__builder.hpp index 1c4d221e6..46dfa2018 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/marker_array__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/marker_array__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__functions.c similarity index 91% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__functions.c index eff24c7c6..6f38bc018 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__functions.c @@ -216,22 +216,27 @@ visualization_msgs__msg__MarkerArray__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__MarkerArray); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__MarkerArray * data = - (visualization_msgs__msg__MarkerArray *)realloc(output->data, allocation_size); + (visualization_msgs__msg__MarkerArray *)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 (!visualization_msgs__msg__MarkerArray__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__MarkerArray__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; ) { - visualization_msgs__msg__MarkerArray__fini(&data[i]); + visualization_msgs__msg__MarkerArray__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h index df2d2f1b6..c50df90a9 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__MarkerArray( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__MarkerArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp index 5d4690afc..805366573 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_MarkerArray( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.h similarity index 94% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.h index 8b388f822..c830a5ec2 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.h @@ -21,7 +21,7 @@ extern "C" // Member 'markers' #include "visualization_msgs/msg/detail/marker__struct.h" -// Struct defined in msg/MarkerArray in the package visualization_msgs. +/// Struct defined in msg/MarkerArray in the package visualization_msgs. typedef struct visualization_msgs__msg__MarkerArray { visualization_msgs__msg__Marker__Sequence markers; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.hpp similarity index 90% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.hpp index 31b64cd58..ab66ace02 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + // Include directives for member types // Member 'markers' @@ -49,12 +50,12 @@ struct MarkerArray_ // field types and members using _markers_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _markers_type markers; // setters for named parameter idiom Type & set__markers( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->markers = _arg; return *this; diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__traits.hpp new file mode 100644 index 000000000..aab143f86 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__traits.hpp @@ -0,0 +1,133 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/MarkerArray.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/marker_array__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +// Include directives for member types +// Member 'markers' +#include "visualization_msgs/msg/detail/marker__traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MarkerArray & msg, + std::ostream & out) +{ + out << "{"; + // member: markers + { + if (msg.markers.size() == 0) { + out << "markers: []"; + } else { + out << "markers: ["; + size_t pending_items = msg.markers.size(); + for (auto item : msg.markers) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MarkerArray & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: markers + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.markers.size() == 0) { + out << "markers: []\n"; + } else { + out << "markers:\n"; + for (auto item : msg.markers) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MarkerArray & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::MarkerArray & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::MarkerArray & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::MarkerArray"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/MarkerArray"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.c new file mode 100644 index 000000000..758340785 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.c @@ -0,0 +1,146 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/MarkerArray.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/marker_array__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/marker_array__functions.h" +#include "visualization_msgs/msg/detail/marker_array__struct.h" + + +// Include directives for member types +// Member `markers` +#include "visualization_msgs/msg/marker.h" +// Member `markers` +#include "visualization_msgs/msg/detail/marker__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_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; + visualization_msgs__msg__MarkerArray__init(message_memory); +} + +void visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_fini_function(void * message_memory) +{ + visualization_msgs__msg__MarkerArray__fini(message_memory); +} + +size_t visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__size_function__MarkerArray__markers( + const void * untyped_member) +{ + const visualization_msgs__msg__Marker__Sequence * member = + (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_const_function__MarkerArray__markers( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__Marker__Sequence * member = + (const visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_function__MarkerArray__markers( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__Marker__Sequence * member = + (visualization_msgs__msg__Marker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__fetch_function__MarkerArray__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__Marker * item = + ((const visualization_msgs__msg__Marker *) + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_const_function__MarkerArray__markers(untyped_member, index)); + visualization_msgs__msg__Marker * value = + (visualization_msgs__msg__Marker *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__assign_function__MarkerArray__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__Marker * item = + ((visualization_msgs__msg__Marker *) + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_function__MarkerArray__markers(untyped_member, index)); + const visualization_msgs__msg__Marker * value = + (const visualization_msgs__msg__Marker *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__resize_function__MarkerArray__markers( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__Marker__Sequence * member = + (visualization_msgs__msg__Marker__Sequence *)(untyped_member); + visualization_msgs__msg__Marker__Sequence__fini(member); + return visualization_msgs__msg__Marker__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array[1] = { + { + "markers", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MarkerArray, markers), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__size_function__MarkerArray__markers, // size() function pointer + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_const_function__MarkerArray__markers, // get_const(index) function pointer + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__get_function__MarkerArray__markers, // get(index) function pointer + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__fetch_function__MarkerArray__markers, // fetch(index, &value) function pointer + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__assign_function__MarkerArray__markers, // assign(index, value) function pointer + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__resize_function__MarkerArray__markers // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_members = { + "visualization_msgs__msg", // message namespace + "MarkerArray", // message name + 1, // number of fields + sizeof(visualization_msgs__msg__MarkerArray), + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array, // message members + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_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 visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle = { + 0, + &visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MarkerArray)() { + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, Marker)(); + if (!visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__MarkerArray__rosidl_typesupport_introspection_c__MarkerArray_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.cpp similarity index 83% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.cpp index 78820aac4..2b1d2a4d9 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.cpp @@ -57,6 +57,24 @@ void * get_function__MarkerArray__markers(void * untyped_member, size_t index) return &member[index]; } +void fetch_function__MarkerArray__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MarkerArray__markers(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MarkerArray__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MarkerArray__markers(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__MarkerArray__markers(void * untyped_member, size_t size) { auto * member = @@ -78,6 +96,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MarkerArray_m size_function__MarkerArray__markers, // size() function pointer get_const_function__MarkerArray__markers, // get_const(index) function pointer get_function__MarkerArray__markers, // get(index) function pointer + fetch_function__MarkerArray__markers, // fetch(index, &value) function pointer + assign_function__MarkerArray__markers, // assign(index, value) function pointer resize_function__MarkerArray__markers // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/marker_array__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.hpp new file mode 100644 index 000000000..1a8dc8c07 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/marker_array__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/MarkerArray.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + MarkerArray +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MARKER_ARRAY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__builder.hpp similarity index 97% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__builder.hpp index 1cbfdac4c..e87324e06 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__BUILDER_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__BUILDER_HPP_ -#include "visualization_msgs/msg/detail/menu_entry__struct.hpp" -#include #include #include +#include "visualization_msgs/msg/detail/menu_entry__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__functions.c similarity index 92% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__functions.c index 418699443..e482652c7 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__functions.c @@ -260,22 +260,27 @@ visualization_msgs__msg__MenuEntry__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__msg__MenuEntry); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__msg__MenuEntry * data = - (visualization_msgs__msg__MenuEntry *)realloc(output->data, allocation_size); + (visualization_msgs__msg__MenuEntry *)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 (!visualization_msgs__msg__MenuEntry__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__msg__MenuEntry__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; ) { - visualization_msgs__msg__MenuEntry__fini(&data[i]); + visualization_msgs__msg__MenuEntry__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h index 64f08ac4e..d81ce2f54 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__msg__MenuEntry( ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__msg__MenuEntry( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp index 46a575e08..7ebdf9b54 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_MenuEntry( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.h new file mode 100644 index 000000000..5f675098a --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.h @@ -0,0 +1,112 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/MenuEntry.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Constant 'FEEDBACK'. +/** + * Command_type stores the type of response desired when this menu + * entry is clicked. + * FEEDBACK: send an InteractiveMarkerFeedback message with menu_entry_id set to this entry's id. + * ROSRUN: execute "rosrun" with arguments given in the command field (above). + * ROSLAUNCH: execute "roslaunch" with arguments given in the command field (above). + */ +enum +{ + visualization_msgs__msg__MenuEntry__FEEDBACK = 0 +}; + +/// Constant 'ROSRUN'. +enum +{ + visualization_msgs__msg__MenuEntry__ROSRUN = 1 +}; + +/// Constant 'ROSLAUNCH'. +enum +{ + visualization_msgs__msg__MenuEntry__ROSLAUNCH = 2 +}; + +// Include directives for member types +// Member 'title' +// Member 'command' +#include "rosidl_runtime_c/string.h" + +/// Struct defined in msg/MenuEntry in the package visualization_msgs. +/** + * MenuEntry message. + * + * Each InteractiveMarker message has an array of MenuEntry messages. + * A collection of MenuEntries together describe a + * menu/submenu/subsubmenu/etc tree, though they are stored in a flat + * array. The tree structure is represented by giving each menu entry + * an ID number and a "parent_id" field. Top-level entries are the + * ones with parent_id = 0. Menu entries are ordered within their + * level the same way they are ordered in the containing array. Parent + * entries must appear before their children. + * + * Example: + * - id = 3 + * parent_id = 0 + * title = "fun" + * - id = 2 + * parent_id = 0 + * title = "robot" + * - id = 4 + * parent_id = 2 + * title = "pr2" + * - id = 5 + * parent_id = 2 + * title = "turtle" + * + * Gives a menu tree like this: + * - fun + * - robot + * - pr2 + * - turtle + */ +typedef struct visualization_msgs__msg__MenuEntry +{ + /// ID is a number for each menu entry. Must be unique within the + /// control, and should never be 0. + uint32_t id; + /// ID of the parent of this menu entry, if it is a submenu. If this + /// menu entry is a top-level entry, set parent_id to 0. + uint32_t parent_id; + /// menu / entry title + rosidl_runtime_c__String title; + /// Arguments to command indicated by command_type (below) + rosidl_runtime_c__String command; + uint8_t command_type; +} visualization_msgs__msg__MenuEntry; + +// Struct for a sequence of visualization_msgs__msg__MenuEntry. +typedef struct visualization_msgs__msg__MenuEntry__Sequence +{ + visualization_msgs__msg__MenuEntry * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__MenuEntry__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.hpp similarity index 84% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.hpp index 94a81a0d4..5445d1199 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_HPP_ #define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__visualization_msgs__msg__MenuEntry __attribute__((deprecated)) @@ -68,10 +69,10 @@ struct MenuEntry_ uint32_t; _parent_id_type parent_id; using _title_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _title_type title; using _command_type = - std::basic_string, typename ContainerAllocator::template rebind::other>; + std::basic_string, typename std::allocator_traits::template rebind_alloc>; _command_type command; using _command_type_type = uint8_t; @@ -91,13 +92,13 @@ struct MenuEntry_ return *this; } Type & set__title( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->title = _arg; return *this; } Type & set__command( - const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) { this->command = _arg; return *this; @@ -185,12 +186,21 @@ using MenuEntry = visualization_msgs::msg::MenuEntry_>; // constant definitions +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t MenuEntry_::FEEDBACK; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t MenuEntry_::ROSRUN; +#endif // __cplusplus < 201703L +#if __cplusplus < 201703L +// static constexpr member variable definitions are only needed in C++14 and below, deprecated in C++17 template constexpr uint8_t MenuEntry_::ROSLAUNCH; +#endif // __cplusplus < 201703L } // namespace msg diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__traits.hpp new file mode 100644 index 000000000..15375c3e4 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__traits.hpp @@ -0,0 +1,177 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/MenuEntry.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/menu_entry__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MenuEntry & msg, + std::ostream & out) +{ + out << "{"; + // member: id + { + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << ", "; + } + + // member: parent_id + { + out << "parent_id: "; + rosidl_generator_traits::value_to_yaml(msg.parent_id, out); + out << ", "; + } + + // member: title + { + out << "title: "; + rosidl_generator_traits::value_to_yaml(msg.title, out); + out << ", "; + } + + // member: command + { + out << "command: "; + rosidl_generator_traits::value_to_yaml(msg.command, out); + out << ", "; + } + + // member: command_type + { + out << "command_type: "; + rosidl_generator_traits::value_to_yaml(msg.command_type, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MenuEntry & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "id: "; + rosidl_generator_traits::value_to_yaml(msg.id, out); + out << "\n"; + } + + // member: parent_id + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "parent_id: "; + rosidl_generator_traits::value_to_yaml(msg.parent_id, out); + out << "\n"; + } + + // member: title + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "title: "; + rosidl_generator_traits::value_to_yaml(msg.title, out); + out << "\n"; + } + + // member: command + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "command: "; + rosidl_generator_traits::value_to_yaml(msg.command, out); + out << "\n"; + } + + // member: command_type + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "command_type: "; + rosidl_generator_traits::value_to_yaml(msg.command_type, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MenuEntry & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::MenuEntry & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::MenuEntry & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::MenuEntry"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/MenuEntry"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.c new file mode 100644 index 000000000..964197162 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.c @@ -0,0 +1,156 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/MenuEntry.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/menu_entry__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/menu_entry__functions.h" +#include "visualization_msgs/msg/detail/menu_entry__struct.h" + + +// Include directives for member types +// Member `title` +// Member `command` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_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; + visualization_msgs__msg__MenuEntry__init(message_memory); +} + +void visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_fini_function(void * message_memory) +{ + visualization_msgs__msg__MenuEntry__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_member_array[5] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MenuEntry, id), // 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 + }, + { + "parent_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MenuEntry, parent_id), // 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 + }, + { + "title", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MenuEntry, title), // 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 + }, + { + "command", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MenuEntry, command), // 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 + }, + { + "command_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MenuEntry, command_type), // 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 visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_members = { + "visualization_msgs__msg", // message namespace + "MenuEntry", // message name + 5, // number of fields + sizeof(visualization_msgs__msg__MenuEntry), + visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_member_array, // message members + visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_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 visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle = { + 0, + &visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MenuEntry)() { + if (!visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__MenuEntry__rosidl_typesupport_introspection_c__MenuEntry_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.cpp index 81106d642..541c22cc1 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MenuEntry_mes 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 }, { @@ -66,6 +68,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MenuEntry_mes 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 }, { @@ -81,6 +85,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MenuEntry_mes 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 }, { @@ -96,6 +102,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MenuEntry_mes 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 }, { @@ -111,6 +119,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember MenuEntry_mes 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 } }; diff --git a/ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/detail/menu_entry__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.hpp new file mode 100644 index 000000000..519cc8af5 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/menu_entry__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/MenuEntry.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + MenuEntry +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MENU_ENTRY__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__builder.hpp new file mode 100644 index 000000000..e8938dc9c --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__BUILDER_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__BUILDER_HPP_ + +#include +#include + +#include "visualization_msgs/msg/detail/mesh_file__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace visualization_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MeshFile_data +{ +public: + explicit Init_MeshFile_data(::visualization_msgs::msg::MeshFile & msg) + : msg_(msg) + {} + ::visualization_msgs::msg::MeshFile data(::visualization_msgs::msg::MeshFile::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::visualization_msgs::msg::MeshFile msg_; +}; + +class Init_MeshFile_filename +{ +public: + Init_MeshFile_filename() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MeshFile_data filename(::visualization_msgs::msg::MeshFile::_filename_type arg) + { + msg_.filename = std::move(arg); + return Init_MeshFile_data(msg_); + } + +private: + ::visualization_msgs::msg::MeshFile msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::visualization_msgs::msg::MeshFile>() +{ + return visualization_msgs::msg::builder::Init_MeshFile_filename(); +} + +} // namespace visualization_msgs + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.c new file mode 100644 index 000000000..b6512b40f --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.c @@ -0,0 +1,272 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice +#include "visualization_msgs/msg/detail/mesh_file__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `filename` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +visualization_msgs__msg__MeshFile__init(visualization_msgs__msg__MeshFile * msg) +{ + if (!msg) { + return false; + } + // filename + if (!rosidl_runtime_c__String__init(&msg->filename)) { + visualization_msgs__msg__MeshFile__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { + visualization_msgs__msg__MeshFile__fini(msg); + return false; + } + return true; +} + +void +visualization_msgs__msg__MeshFile__fini(visualization_msgs__msg__MeshFile * msg) +{ + if (!msg) { + return; + } + // filename + rosidl_runtime_c__String__fini(&msg->filename); + // data + rosidl_runtime_c__uint8__Sequence__fini(&msg->data); +} + +bool +visualization_msgs__msg__MeshFile__are_equal(const visualization_msgs__msg__MeshFile * lhs, const visualization_msgs__msg__MeshFile * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // filename + if (!rosidl_runtime_c__String__are_equal( + &(lhs->filename), &(rhs->filename))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +visualization_msgs__msg__MeshFile__copy( + const visualization_msgs__msg__MeshFile * input, + visualization_msgs__msg__MeshFile * output) +{ + if (!input || !output) { + return false; + } + // filename + if (!rosidl_runtime_c__String__copy( + &(input->filename), &(output->filename))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +visualization_msgs__msg__MeshFile * +visualization_msgs__msg__MeshFile__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__MeshFile * msg = (visualization_msgs__msg__MeshFile *)allocator.allocate(sizeof(visualization_msgs__msg__MeshFile), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(visualization_msgs__msg__MeshFile)); + bool success = visualization_msgs__msg__MeshFile__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +visualization_msgs__msg__MeshFile__destroy(visualization_msgs__msg__MeshFile * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + visualization_msgs__msg__MeshFile__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +visualization_msgs__msg__MeshFile__Sequence__init(visualization_msgs__msg__MeshFile__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__MeshFile * data = NULL; + + if (size) { + data = (visualization_msgs__msg__MeshFile *)allocator.zero_allocate(size, sizeof(visualization_msgs__msg__MeshFile), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = visualization_msgs__msg__MeshFile__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + visualization_msgs__msg__MeshFile__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +visualization_msgs__msg__MeshFile__Sequence__fini(visualization_msgs__msg__MeshFile__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) { + visualization_msgs__msg__MeshFile__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); + } +} + +visualization_msgs__msg__MeshFile__Sequence * +visualization_msgs__msg__MeshFile__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__MeshFile__Sequence * array = (visualization_msgs__msg__MeshFile__Sequence *)allocator.allocate(sizeof(visualization_msgs__msg__MeshFile__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = visualization_msgs__msg__MeshFile__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +visualization_msgs__msg__MeshFile__Sequence__destroy(visualization_msgs__msg__MeshFile__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + visualization_msgs__msg__MeshFile__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +visualization_msgs__msg__MeshFile__Sequence__are_equal(const visualization_msgs__msg__MeshFile__Sequence * lhs, const visualization_msgs__msg__MeshFile__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!visualization_msgs__msg__MeshFile__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +visualization_msgs__msg__MeshFile__Sequence__copy( + const visualization_msgs__msg__MeshFile__Sequence * input, + visualization_msgs__msg__MeshFile__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(visualization_msgs__msg__MeshFile); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__MeshFile * data = + (visualization_msgs__msg__MeshFile *)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 (!visualization_msgs__msg__MeshFile__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; ) { + visualization_msgs__msg__MeshFile__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!visualization_msgs__msg__MeshFile__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.h new file mode 100644 index 000000000..1344f6fc7 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__FUNCTIONS_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "visualization_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "visualization_msgs/msg/detail/mesh_file__struct.h" + +/// Initialize msg/MeshFile 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( + * visualization_msgs__msg__MeshFile + * )) before or use + * visualization_msgs__msg__MeshFile__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +bool +visualization_msgs__msg__MeshFile__init(visualization_msgs__msg__MeshFile * msg); + +/// Finalize msg/MeshFile message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__MeshFile__fini(visualization_msgs__msg__MeshFile * msg); + +/// Create msg/MeshFile message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * visualization_msgs__msg__MeshFile__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +visualization_msgs__msg__MeshFile * +visualization_msgs__msg__MeshFile__create(); + +/// Destroy msg/MeshFile message. +/** + * It calls + * visualization_msgs__msg__MeshFile__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__MeshFile__destroy(visualization_msgs__msg__MeshFile * msg); + +/// Check for msg/MeshFile 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_visualization_msgs +bool +visualization_msgs__msg__MeshFile__are_equal(const visualization_msgs__msg__MeshFile * lhs, const visualization_msgs__msg__MeshFile * rhs); + +/// Copy a msg/MeshFile 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_visualization_msgs +bool +visualization_msgs__msg__MeshFile__copy( + const visualization_msgs__msg__MeshFile * input, + visualization_msgs__msg__MeshFile * output); + +/// Initialize array of msg/MeshFile messages. +/** + * It allocates the memory for the number of elements and calls + * visualization_msgs__msg__MeshFile__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_visualization_msgs +bool +visualization_msgs__msg__MeshFile__Sequence__init(visualization_msgs__msg__MeshFile__Sequence * array, size_t size); + +/// Finalize array of msg/MeshFile messages. +/** + * It calls + * visualization_msgs__msg__MeshFile__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_visualization_msgs +void +visualization_msgs__msg__MeshFile__Sequence__fini(visualization_msgs__msg__MeshFile__Sequence * array); + +/// Create array of msg/MeshFile messages. +/** + * It allocates the memory for the array and calls + * visualization_msgs__msg__MeshFile__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_visualization_msgs +visualization_msgs__msg__MeshFile__Sequence * +visualization_msgs__msg__MeshFile__Sequence__create(size_t size); + +/// Destroy array of msg/MeshFile messages. +/** + * It calls + * visualization_msgs__msg__MeshFile__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__MeshFile__Sequence__destroy(visualization_msgs__msg__MeshFile__Sequence * array); + +/// Check for msg/MeshFile 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_visualization_msgs +bool +visualization_msgs__msg__MeshFile__Sequence__are_equal(const visualization_msgs__msg__MeshFile__Sequence * lhs, const visualization_msgs__msg__MeshFile__Sequence * rhs); + +/// Copy an array of msg/MeshFile 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_visualization_msgs +bool +visualization_msgs__msg__MeshFile__Sequence__copy( + const visualization_msgs__msg__MeshFile__Sequence * input, + visualization_msgs__msg__MeshFile__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..2f041562f --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +size_t get_serialized_size_visualization_msgs__msg__MeshFile( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +size_t max_serialized_size_visualization_msgs__msg__MeshFile( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, visualization_msgs, msg, MeshFile)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..099203aeb --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "visualization_msgs/msg/detail/mesh_file__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 visualization_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +cdr_serialize( + const visualization_msgs::msg::MeshFile & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + visualization_msgs::msg::MeshFile & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +get_serialized_size( + const visualization_msgs::msg::MeshFile & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +max_serialized_size_MeshFile( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace visualization_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, visualization_msgs, msg, MeshFile)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..ce5a1f4c0 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__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 "visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MeshFile)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..83ecbb389 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__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, visualization_msgs, msg, MeshFile)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.h new file mode 100644 index 000000000..71067e58a --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.h @@ -0,0 +1,53 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'filename' +#include "rosidl_runtime_c/string.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +/// Struct defined in msg/MeshFile in the package visualization_msgs. +/** + * Used to send raw mesh files. + */ +typedef struct visualization_msgs__msg__MeshFile +{ + /// The filename is used for both debug purposes and to provide a file extension + /// for whatever parser is used. + rosidl_runtime_c__String filename; + /// This stores the raw text of the mesh file. + rosidl_runtime_c__uint8__Sequence data; +} visualization_msgs__msg__MeshFile; + +// Struct for a sequence of visualization_msgs__msg__MeshFile. +typedef struct visualization_msgs__msg__MeshFile__Sequence +{ + visualization_msgs__msg__MeshFile * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__MeshFile__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.hpp new file mode 100644 index 000000000..c128d9979 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__struct.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__visualization_msgs__msg__MeshFile __attribute__((deprecated)) +#else +# define DEPRECATED__visualization_msgs__msg__MeshFile __declspec(deprecated) +#endif + +namespace visualization_msgs +{ + +namespace msg +{ + +// message struct +template +struct MeshFile_ +{ + using Type = MeshFile_; + + explicit MeshFile_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->filename = ""; + } + } + + explicit MeshFile_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : filename(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->filename = ""; + } + } + + // field types and members + using _filename_type = + std::basic_string, typename std::allocator_traits::template rebind_alloc>; + _filename_type filename; + using _data_type = + std::vector::template rebind_alloc>; + _data_type data; + + // setters for named parameter idiom + Type & set__filename( + const std::basic_string, typename std::allocator_traits::template rebind_alloc> & _arg) + { + this->filename = _arg; + return *this; + } + Type & set__data( + const std::vector::template rebind_alloc> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + visualization_msgs::msg::MeshFile_ *; + using ConstRawPtr = + const visualization_msgs::msg::MeshFile_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__visualization_msgs__msg__MeshFile + std::shared_ptr> + Ptr; + typedef DEPRECATED__visualization_msgs__msg__MeshFile + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MeshFile_ & other) const + { + if (this->filename != other.filename) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const MeshFile_ & other) const + { + return !this->operator==(other); + } +}; // struct MeshFile_ + +// alias to use template instance with default allocator +using MeshFile = + visualization_msgs::msg::MeshFile_>; + +// constant definitions + +} // namespace msg + +} // namespace visualization_msgs + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__traits.hpp new file mode 100644 index 000000000..15ff778f2 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__traits.hpp @@ -0,0 +1,147 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/mesh_file__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const MeshFile & msg, + std::ostream & out) +{ + out << "{"; + // member: filename + { + out << "filename: "; + rosidl_generator_traits::value_to_yaml(msg.filename, out); + out << ", "; + } + + // member: data + { + if (msg.data.size() == 0) { + out << "data: []"; + } else { + out << "data: ["; + size_t pending_items = msg.data.size(); + for (auto item : msg.data) { + rosidl_generator_traits::value_to_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const MeshFile & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: filename + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "filename: "; + rosidl_generator_traits::value_to_yaml(msg.filename, out); + out << "\n"; + } + + // member: data + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.data.size() == 0) { + out << "data: []\n"; + } else { + out << "data:\n"; + for (auto item : msg.data) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "- "; + rosidl_generator_traits::value_to_yaml(item, out); + out << "\n"; + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const MeshFile & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::MeshFile & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::MeshFile & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::MeshFile"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/MeshFile"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.c new file mode 100644 index 000000000..dacdf298a --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.c @@ -0,0 +1,161 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/mesh_file__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/mesh_file__functions.h" +#include "visualization_msgs/msg/detail/mesh_file__struct.h" + + +// Include directives for member types +// Member `filename` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_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; + visualization_msgs__msg__MeshFile__init(message_memory); +} + +void visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_fini_function(void * message_memory) +{ + visualization_msgs__msg__MeshFile__fini(message_memory); +} + +size_t visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__size_function__MeshFile__data( + const void * untyped_member) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_const_function__MeshFile__data( + const void * untyped_member, size_t index) +{ + const rosidl_runtime_c__uint8__Sequence * member = + (const rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_function__MeshFile__data( + void * untyped_member, size_t index) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__fetch_function__MeshFile__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const uint8_t * item = + ((const uint8_t *) + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_const_function__MeshFile__data(untyped_member, index)); + uint8_t * value = + (uint8_t *)(untyped_value); + *value = *item; +} + +void visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__assign_function__MeshFile__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + uint8_t * item = + ((uint8_t *) + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_function__MeshFile__data(untyped_member, index)); + const uint8_t * value = + (const uint8_t *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__resize_function__MeshFile__data( + void * untyped_member, size_t size) +{ + rosidl_runtime_c__uint8__Sequence * member = + (rosidl_runtime_c__uint8__Sequence *)(untyped_member); + rosidl_runtime_c__uint8__Sequence__fini(member); + return rosidl_runtime_c__uint8__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_member_array[2] = { + { + "filename", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MeshFile, filename), // 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 + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__MeshFile, data), // bytes offset in struct + NULL, // default value + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__size_function__MeshFile__data, // size() function pointer + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_const_function__MeshFile__data, // get_const(index) function pointer + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__get_function__MeshFile__data, // get(index) function pointer + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__fetch_function__MeshFile__data, // fetch(index, &value) function pointer + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__assign_function__MeshFile__data, // assign(index, value) function pointer + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__resize_function__MeshFile__data // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_members = { + "visualization_msgs__msg", // message namespace + "MeshFile", // message name + 2, // number of fields + sizeof(visualization_msgs__msg__MeshFile), + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_member_array, // message members + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_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 visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_type_support_handle = { + 0, + &visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, MeshFile)() { + if (!visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__MeshFile__rosidl_typesupport_introspection_c__MeshFile_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.cpp new file mode 100644 index 000000000..d955b29ee --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.cpp @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from visualization_msgs:msg/MeshFile.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 "visualization_msgs/msg/detail/mesh_file__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 visualization_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MeshFile_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) visualization_msgs::msg::MeshFile(_init); +} + +void MeshFile_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MeshFile(); +} + +size_t size_function__MeshFile__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__MeshFile__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MeshFile__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void fetch_function__MeshFile__data( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__MeshFile__data(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__MeshFile__data( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__MeshFile__data(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + +void resize_function__MeshFile__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MeshFile_message_member_array[2] = { + { + "filename", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::MeshFile, filename), // 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 + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::MeshFile, data), // bytes offset in struct + nullptr, // default value + size_function__MeshFile__data, // size() function pointer + get_const_function__MeshFile__data, // get_const(index) function pointer + get_function__MeshFile__data, // get(index) function pointer + fetch_function__MeshFile__data, // fetch(index, &value) function pointer + assign_function__MeshFile__data, // assign(index, value) function pointer + resize_function__MeshFile__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers MeshFile_message_members = { + "visualization_msgs::msg", // message namespace + "MeshFile", // message name + 2, // number of fields + sizeof(visualization_msgs::msg::MeshFile), + MeshFile_message_member_array, // message members + MeshFile_init_function, // function to initialize message memory (memory has to be allocated) + MeshFile_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MeshFile_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MeshFile_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace visualization_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::MeshFile_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, visualization_msgs, msg, MeshFile)() { + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::MeshFile_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.h new file mode 100644 index 000000000..db059c220 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + visualization_msgs, + msg, + MeshFile +)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.hpp new file mode 100644 index 000000000..e86ed1a77 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/mesh_file__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + MeshFile +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__MESH_FILE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__builder.hpp new file mode 100644 index 000000000..87d41b969 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__builder.hpp @@ -0,0 +1,72 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__BUILDER_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__BUILDER_HPP_ + +#include +#include + +#include "visualization_msgs/msg/detail/uv_coordinate__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +namespace visualization_msgs +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UVCoordinate_v +{ +public: + explicit Init_UVCoordinate_v(::visualization_msgs::msg::UVCoordinate & msg) + : msg_(msg) + {} + ::visualization_msgs::msg::UVCoordinate v(::visualization_msgs::msg::UVCoordinate::_v_type arg) + { + msg_.v = std::move(arg); + return std::move(msg_); + } + +private: + ::visualization_msgs::msg::UVCoordinate msg_; +}; + +class Init_UVCoordinate_u +{ +public: + Init_UVCoordinate_u() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UVCoordinate_v u(::visualization_msgs::msg::UVCoordinate::_u_type arg) + { + msg_.u = std::move(arg); + return Init_UVCoordinate_v(msg_); + } + +private: + ::visualization_msgs::msg::UVCoordinate msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::visualization_msgs::msg::UVCoordinate>() +{ + return visualization_msgs::msg::builder::Init_UVCoordinate_u(); +} + +} // namespace visualization_msgs + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__BUILDER_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.c new file mode 100644 index 000000000..2818fc737 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.c @@ -0,0 +1,244 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice +#include "visualization_msgs/msg/detail/uv_coordinate__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +visualization_msgs__msg__UVCoordinate__init(visualization_msgs__msg__UVCoordinate * msg) +{ + if (!msg) { + return false; + } + // u + // v + return true; +} + +void +visualization_msgs__msg__UVCoordinate__fini(visualization_msgs__msg__UVCoordinate * msg) +{ + if (!msg) { + return; + } + // u + // v +} + +bool +visualization_msgs__msg__UVCoordinate__are_equal(const visualization_msgs__msg__UVCoordinate * lhs, const visualization_msgs__msg__UVCoordinate * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // u + if (lhs->u != rhs->u) { + return false; + } + // v + if (lhs->v != rhs->v) { + return false; + } + return true; +} + +bool +visualization_msgs__msg__UVCoordinate__copy( + const visualization_msgs__msg__UVCoordinate * input, + visualization_msgs__msg__UVCoordinate * output) +{ + if (!input || !output) { + return false; + } + // u + output->u = input->u; + // v + output->v = input->v; + return true; +} + +visualization_msgs__msg__UVCoordinate * +visualization_msgs__msg__UVCoordinate__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__UVCoordinate * msg = (visualization_msgs__msg__UVCoordinate *)allocator.allocate(sizeof(visualization_msgs__msg__UVCoordinate), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(visualization_msgs__msg__UVCoordinate)); + bool success = visualization_msgs__msg__UVCoordinate__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +visualization_msgs__msg__UVCoordinate__destroy(visualization_msgs__msg__UVCoordinate * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + visualization_msgs__msg__UVCoordinate__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +visualization_msgs__msg__UVCoordinate__Sequence__init(visualization_msgs__msg__UVCoordinate__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__UVCoordinate * data = NULL; + + if (size) { + data = (visualization_msgs__msg__UVCoordinate *)allocator.zero_allocate(size, sizeof(visualization_msgs__msg__UVCoordinate), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = visualization_msgs__msg__UVCoordinate__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + visualization_msgs__msg__UVCoordinate__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +visualization_msgs__msg__UVCoordinate__Sequence__fini(visualization_msgs__msg__UVCoordinate__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) { + visualization_msgs__msg__UVCoordinate__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); + } +} + +visualization_msgs__msg__UVCoordinate__Sequence * +visualization_msgs__msg__UVCoordinate__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__UVCoordinate__Sequence * array = (visualization_msgs__msg__UVCoordinate__Sequence *)allocator.allocate(sizeof(visualization_msgs__msg__UVCoordinate__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = visualization_msgs__msg__UVCoordinate__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +visualization_msgs__msg__UVCoordinate__Sequence__destroy(visualization_msgs__msg__UVCoordinate__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + visualization_msgs__msg__UVCoordinate__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +visualization_msgs__msg__UVCoordinate__Sequence__are_equal(const visualization_msgs__msg__UVCoordinate__Sequence * lhs, const visualization_msgs__msg__UVCoordinate__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!visualization_msgs__msg__UVCoordinate__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +visualization_msgs__msg__UVCoordinate__Sequence__copy( + const visualization_msgs__msg__UVCoordinate__Sequence * input, + visualization_msgs__msg__UVCoordinate__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(visualization_msgs__msg__UVCoordinate); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + visualization_msgs__msg__UVCoordinate * data = + (visualization_msgs__msg__UVCoordinate *)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 (!visualization_msgs__msg__UVCoordinate__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; ) { + visualization_msgs__msg__UVCoordinate__fini(&output->data[i]); + } + return false; + } + } + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!visualization_msgs__msg__UVCoordinate__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.h new file mode 100644 index 000000000..4f10b4035 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__FUNCTIONS_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "visualization_msgs/msg/rosidl_generator_c__visibility_control.h" + +#include "visualization_msgs/msg/detail/uv_coordinate__struct.h" + +/// Initialize msg/UVCoordinate 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( + * visualization_msgs__msg__UVCoordinate + * )) before or use + * visualization_msgs__msg__UVCoordinate__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__init(visualization_msgs__msg__UVCoordinate * msg); + +/// Finalize msg/UVCoordinate message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__UVCoordinate__fini(visualization_msgs__msg__UVCoordinate * msg); + +/// Create msg/UVCoordinate message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * visualization_msgs__msg__UVCoordinate__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +visualization_msgs__msg__UVCoordinate * +visualization_msgs__msg__UVCoordinate__create(); + +/// Destroy msg/UVCoordinate message. +/** + * It calls + * visualization_msgs__msg__UVCoordinate__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__UVCoordinate__destroy(visualization_msgs__msg__UVCoordinate * msg); + +/// Check for msg/UVCoordinate 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_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__are_equal(const visualization_msgs__msg__UVCoordinate * lhs, const visualization_msgs__msg__UVCoordinate * rhs); + +/// Copy a msg/UVCoordinate 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_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__copy( + const visualization_msgs__msg__UVCoordinate * input, + visualization_msgs__msg__UVCoordinate * output); + +/// Initialize array of msg/UVCoordinate messages. +/** + * It allocates the memory for the number of elements and calls + * visualization_msgs__msg__UVCoordinate__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_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__Sequence__init(visualization_msgs__msg__UVCoordinate__Sequence * array, size_t size); + +/// Finalize array of msg/UVCoordinate messages. +/** + * It calls + * visualization_msgs__msg__UVCoordinate__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_visualization_msgs +void +visualization_msgs__msg__UVCoordinate__Sequence__fini(visualization_msgs__msg__UVCoordinate__Sequence * array); + +/// Create array of msg/UVCoordinate messages. +/** + * It allocates the memory for the array and calls + * visualization_msgs__msg__UVCoordinate__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_visualization_msgs +visualization_msgs__msg__UVCoordinate__Sequence * +visualization_msgs__msg__UVCoordinate__Sequence__create(size_t size); + +/// Destroy array of msg/UVCoordinate messages. +/** + * It calls + * visualization_msgs__msg__UVCoordinate__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_visualization_msgs +void +visualization_msgs__msg__UVCoordinate__Sequence__destroy(visualization_msgs__msg__UVCoordinate__Sequence * array); + +/// Check for msg/UVCoordinate 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_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__Sequence__are_equal(const visualization_msgs__msg__UVCoordinate__Sequence * lhs, const visualization_msgs__msg__UVCoordinate__Sequence * rhs); + +/// Copy an array of msg/UVCoordinate 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_visualization_msgs +bool +visualization_msgs__msg__UVCoordinate__Sequence__copy( + const visualization_msgs__msg__UVCoordinate__Sequence * input, + visualization_msgs__msg__UVCoordinate__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__FUNCTIONS_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 000000000..6fc935256 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,37 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +size_t get_serialized_size_visualization_msgs__msg__UVCoordinate( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +size_t max_serialized_size_visualization_msgs__msg__UVCoordinate( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, visualization_msgs, msg, UVCoordinate)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 000000000..40fb0f907 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,80 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "visualization_msgs/msg/detail/uv_coordinate__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 visualization_msgs +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +cdr_serialize( + const visualization_msgs::msg::UVCoordinate & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + visualization_msgs::msg::UVCoordinate & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +get_serialized_size( + const visualization_msgs::msg::UVCoordinate & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +max_serialized_size_UVCoordinate( + bool & full_bounded, + bool & is_plain, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace visualization_msgs + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, visualization_msgs, msg, UVCoordinate)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_c.h new file mode 100644 index 000000000..bd752a865 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__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 "visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, UVCoordinate)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 000000000..e1b520e51 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__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, visualization_msgs, msg, UVCoordinate)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.h new file mode 100644 index 000000000..830e7166a --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.h @@ -0,0 +1,45 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +/// Struct defined in msg/UVCoordinate in the package visualization_msgs. +/** + * Location of the pixel as a ratio of the width of a 2D texture. + * Values should be in range:. + */ +typedef struct visualization_msgs__msg__UVCoordinate +{ + float u; + float v; +} visualization_msgs__msg__UVCoordinate; + +// Struct for a sequence of visualization_msgs__msg__UVCoordinate. +typedef struct visualization_msgs__msg__UVCoordinate__Sequence +{ + visualization_msgs__msg__UVCoordinate * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} visualization_msgs__msg__UVCoordinate__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.hpp new file mode 100644 index 000000000..835989a68 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__struct.hpp @@ -0,0 +1,145 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include + +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + + +#ifndef _WIN32 +# define DEPRECATED__visualization_msgs__msg__UVCoordinate __attribute__((deprecated)) +#else +# define DEPRECATED__visualization_msgs__msg__UVCoordinate __declspec(deprecated) +#endif + +namespace visualization_msgs +{ + +namespace msg +{ + +// message struct +template +struct UVCoordinate_ +{ + using Type = UVCoordinate_; + + explicit UVCoordinate_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->u = 0.0f; + this->v = 0.0f; + } + } + + explicit UVCoordinate_(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->u = 0.0f; + this->v = 0.0f; + } + } + + // field types and members + using _u_type = + float; + _u_type u; + using _v_type = + float; + _v_type v; + + // setters for named parameter idiom + Type & set__u( + const float & _arg) + { + this->u = _arg; + return *this; + } + Type & set__v( + const float & _arg) + { + this->v = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + visualization_msgs::msg::UVCoordinate_ *; + using ConstRawPtr = + const visualization_msgs::msg::UVCoordinate_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr 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__visualization_msgs__msg__UVCoordinate + std::shared_ptr> + Ptr; + typedef DEPRECATED__visualization_msgs__msg__UVCoordinate + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UVCoordinate_ & other) const + { + if (this->u != other.u) { + return false; + } + if (this->v != other.v) { + return false; + } + return true; + } + bool operator!=(const UVCoordinate_ & other) const + { + return !this->operator==(other); + } +}; // struct UVCoordinate_ + +// alias to use template instance with default allocator +using UVCoordinate = + visualization_msgs::msg::UVCoordinate_>; + +// constant definitions + +} // namespace msg + +} // namespace visualization_msgs + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__STRUCT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__traits.hpp new file mode 100644 index 000000000..b9e90f9f5 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__traits.hpp @@ -0,0 +1,126 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TRAITS_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/msg/detail/uv_coordinate__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace visualization_msgs +{ + +namespace msg +{ + +inline void to_flow_style_yaml( + const UVCoordinate & msg, + std::ostream & out) +{ + out << "{"; + // member: u + { + out << "u: "; + rosidl_generator_traits::value_to_yaml(msg.u, out); + out << ", "; + } + + // member: v + { + out << "v: "; + rosidl_generator_traits::value_to_yaml(msg.v, out); + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const UVCoordinate & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: u + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "u: "; + rosidl_generator_traits::value_to_yaml(msg.u, out); + out << "\n"; + } + + // member: v + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "v: "; + rosidl_generator_traits::value_to_yaml(msg.v, out); + out << "\n"; + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const UVCoordinate & 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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::msg::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::msg::UVCoordinate & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::msg::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::msg::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::msg::UVCoordinate & msg) +{ + return visualization_msgs::msg::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::msg::UVCoordinate"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/msg/UVCoordinate"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.c new file mode 100644 index 000000000..47bda7a10 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.c @@ -0,0 +1,100 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/msg/detail/uv_coordinate__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/msg/detail/uv_coordinate__functions.h" +#include "visualization_msgs/msg/detail/uv_coordinate__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_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; + visualization_msgs__msg__UVCoordinate__init(message_memory); +} + +void visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_fini_function(void * message_memory) +{ + visualization_msgs__msg__UVCoordinate__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_member_array[2] = { + { + "u", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__UVCoordinate, u), // 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 + }, + { + "v", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__msg__UVCoordinate, v), // 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 visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_members = { + "visualization_msgs__msg", // message namespace + "UVCoordinate", // message name + 2, // number of fields + sizeof(visualization_msgs__msg__UVCoordinate), + visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_member_array, // message members + visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_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 visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_type_support_handle = { + 0, + &visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, UVCoordinate)() { + if (!visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_type_support_handle.typesupport_identifier) { + visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__msg__UVCoordinate__rosidl_typesupport_introspection_c__UVCoordinate_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.cpp new file mode 100644 index 000000000..6822003c4 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.cpp @@ -0,0 +1,126 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from visualization_msgs:msg/UVCoordinate.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 "visualization_msgs/msg/detail/uv_coordinate__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 visualization_msgs +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UVCoordinate_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) visualization_msgs::msg::UVCoordinate(_init); +} + +void UVCoordinate_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UVCoordinate(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UVCoordinate_message_member_array[2] = { + { + "u", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::UVCoordinate, u), // 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 + }, + { + "v", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs::msg::UVCoordinate, v), // 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 UVCoordinate_message_members = { + "visualization_msgs::msg", // message namespace + "UVCoordinate", // message name + 2, // number of fields + sizeof(visualization_msgs::msg::UVCoordinate), + UVCoordinate_message_member_array, // message members + UVCoordinate_init_function, // function to initialize message memory (memory has to be allocated) + UVCoordinate_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UVCoordinate_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UVCoordinate_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace visualization_msgs + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::UVCoordinate_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, visualization_msgs, msg, UVCoordinate)() { + return &::visualization_msgs::msg::rosidl_typesupport_introspection_cpp::UVCoordinate_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.h new file mode 100644 index 000000000..2ec1d73ef --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_H_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + visualization_msgs, + msg, + UVCoordinate +)(); + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.hpp new file mode 100644 index 000000000..b5355c597 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/detail/uv_coordinate__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + msg, + UVCoordinate +)(); +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__DETAIL__UV_COORDINATE__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/image_marker.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/image_marker.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/image_marker.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/image_marker.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/image_marker.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/image_marker.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/image_marker.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/image_marker.hpp index 298b90d11..5b8f06856 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/image_marker.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/image_marker.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/image_marker__struct.hpp" #include "visualization_msgs/msg/detail/image_marker__builder.hpp" #include "visualization_msgs/msg/detail/image_marker__traits.hpp" +#include "visualization_msgs/msg/detail/image_marker__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__IMAGE_MARKER_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker.hpp index d37692360..cd1410ad2 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_control.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_control.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_control.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_control.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_control.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_control.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_control.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_control.hpp index 00e82bb81..5217b714a 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_control.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_control.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker_control__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker_control__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker_control__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker_control__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_feedback.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_feedback.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_feedback.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_feedback.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_feedback.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_feedback.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_feedback.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_feedback.hpp index 064e909a9..3718aa2ce 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_feedback.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_feedback.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker_feedback__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker_feedback__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker_feedback__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker_feedback__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_FEEDBACK_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_init.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_init.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_init.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_init.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_init.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_init.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_init.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_init.hpp index e07050a67..c78e09513 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_init.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_init.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker_init__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker_init__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker_init__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker_init__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_INIT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_pose.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_pose.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_pose.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_pose.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_pose.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_pose.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_pose.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_pose.hpp index 668885f37..b13daefb5 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_pose.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_pose.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker_pose__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker_pose__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker_pose__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker_pose__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_POSE_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_update.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_update.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_update.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_update.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_update.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_update.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_update.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_update.hpp index 19fe6c601..82f3764ab 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/interactive_marker_update.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/interactive_marker_update.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/interactive_marker_update__struct.hpp" #include "visualization_msgs/msg/detail/interactive_marker_update__builder.hpp" #include "visualization_msgs/msg/detail/interactive_marker_update__traits.hpp" +#include "visualization_msgs/msg/detail/interactive_marker_update__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__INTERACTIVE_MARKER_UPDATE_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/marker.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/marker.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/marker.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/marker.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker.hpp index 7aff80a22..85f2d6418 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/marker.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/marker__struct.hpp" #include "visualization_msgs/msg/detail/marker__builder.hpp" #include "visualization_msgs/msg/detail/marker__traits.hpp" +#include "visualization_msgs/msg/detail/marker__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__MARKER_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/marker_array.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker_array.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/marker_array.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker_array.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/marker_array.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker_array.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/marker_array.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker_array.hpp index e8f377910..3216b1ba3 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/marker_array.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/marker_array.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/marker_array__struct.hpp" #include "visualization_msgs/msg/detail/marker_array__builder.hpp" #include "visualization_msgs/msg/detail/marker_array__traits.hpp" +#include "visualization_msgs/msg/detail/marker_array__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__MARKER_ARRAY_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/menu_entry.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/menu_entry.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/menu_entry.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/menu_entry.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/menu_entry.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/menu_entry.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/msg/menu_entry.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/menu_entry.hpp index 338f0af81..702480034 100644 --- a/ThirdParty/ros/include/visualization_msgs/msg/menu_entry.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/menu_entry.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/msg/detail/menu_entry__struct.hpp" #include "visualization_msgs/msg/detail/menu_entry__builder.hpp" #include "visualization_msgs/msg/detail/menu_entry__traits.hpp" +#include "visualization_msgs/msg/detail/menu_entry__type_support.hpp" #endif // VISUALIZATION_MSGS__MSG__MENU_ENTRY_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.h new file mode 100644 index 000000000..bd50218ba --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from visualization_msgs:msg/MeshFile.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__MESH_FILE_H_ +#define VISUALIZATION_MSGS__MSG__MESH_FILE_H_ + +#include "visualization_msgs/msg/detail/mesh_file__struct.h" +#include "visualization_msgs/msg/detail/mesh_file__functions.h" +#include "visualization_msgs/msg/detail/mesh_file__type_support.h" + +#endif // VISUALIZATION_MSGS__MSG__MESH_FILE_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.hpp new file mode 100644 index 000000000..814503070 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/mesh_file.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__MESH_FILE_HPP_ +#define VISUALIZATION_MSGS__MSG__MESH_FILE_HPP_ + +#include "visualization_msgs/msg/detail/mesh_file__struct.hpp" +#include "visualization_msgs/msg/detail/mesh_file__builder.hpp" +#include "visualization_msgs/msg/detail/mesh_file__traits.hpp" +#include "visualization_msgs/msg/detail/mesh_file__type_support.hpp" + +#endif // VISUALIZATION_MSGS__MSG__MESH_FILE_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/rosidl_generator_c__visibility_control.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_generator_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/rosidl_generator_c__visibility_control.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_generator_c__visibility_control.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_generator_cpp__visibility_control.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 000000000..e46a12138 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_generator_cpp__visibility_control.hpp @@ -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 VISUALIZATION_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define VISUALIZATION_MSGS__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_visualization_msgs __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_visualization_msgs __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_visualization_msgs __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_visualization_msgs __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_visualization_msgs + #define ROSIDL_GENERATOR_CPP_PUBLIC_visualization_msgs ROSIDL_GENERATOR_CPP_EXPORT_visualization_msgs + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_visualization_msgs ROSIDL_GENERATOR_CPP_IMPORT_visualization_msgs + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_visualization_msgs __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_visualization_msgs + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_visualization_msgs __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_visualization_msgs + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // VISUALIZATION_MSGS__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_fastrtps_c__visibility_control.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h diff --git a/ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.h new file mode 100644 index 000000000..a828673df --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from visualization_msgs:msg/UVCoordinate.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__UV_COORDINATE_H_ +#define VISUALIZATION_MSGS__MSG__UV_COORDINATE_H_ + +#include "visualization_msgs/msg/detail/uv_coordinate__struct.h" +#include "visualization_msgs/msg/detail/uv_coordinate__functions.h" +#include "visualization_msgs/msg/detail/uv_coordinate__type_support.h" + +#endif // VISUALIZATION_MSGS__MSG__UV_COORDINATE_H_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.hpp new file mode 100644 index 000000000..be24eca63 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/msg/uv_coordinate.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__MSG__UV_COORDINATE_HPP_ +#define VISUALIZATION_MSGS__MSG__UV_COORDINATE_HPP_ + +#include "visualization_msgs/msg/detail/uv_coordinate__struct.hpp" +#include "visualization_msgs/msg/detail/uv_coordinate__builder.hpp" +#include "visualization_msgs/msg/detail/uv_coordinate__traits.hpp" +#include "visualization_msgs/msg/detail/uv_coordinate__type_support.hpp" + +#endif // VISUALIZATION_MSGS__MSG__UV_COORDINATE_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp similarity index 97% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp index bb041d97f..2225c0cb5 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__builder.hpp @@ -5,11 +5,12 @@ #ifndef VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__BUILDER_HPP_ #define VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__BUILDER_HPP_ -#include "visualization_msgs/srv/detail/get_interactive_markers__struct.hpp" -#include #include #include +#include "visualization_msgs/srv/detail/get_interactive_markers__struct.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + namespace visualization_msgs { diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__functions.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__functions.c similarity index 93% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__functions.c rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__functions.c index fbb89fd29..7872e3fa3 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__functions.c +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__functions.c @@ -200,22 +200,27 @@ visualization_msgs__srv__GetInteractiveMarkers_Request__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__srv__GetInteractiveMarkers_Request); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__srv__GetInteractiveMarkers_Request * data = - (visualization_msgs__srv__GetInteractiveMarkers_Request *)realloc(output->data, allocation_size); + (visualization_msgs__srv__GetInteractiveMarkers_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 (!visualization_msgs__srv__GetInteractiveMarkers_Request__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__srv__GetInteractiveMarkers_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; ) { - visualization_msgs__srv__GetInteractiveMarkers_Request__fini(&data[i]); + visualization_msgs__srv__GetInteractiveMarkers_Request__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; @@ -443,22 +448,27 @@ visualization_msgs__srv__GetInteractiveMarkers_Response__Sequence__copy( if (output->capacity < input->size) { const size_t allocation_size = input->size * sizeof(visualization_msgs__srv__GetInteractiveMarkers_Response); + rcutils_allocator_t allocator = rcutils_get_default_allocator(); visualization_msgs__srv__GetInteractiveMarkers_Response * data = - (visualization_msgs__srv__GetInteractiveMarkers_Response *)realloc(output->data, allocation_size); + (visualization_msgs__srv__GetInteractiveMarkers_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 (!visualization_msgs__srv__GetInteractiveMarkers_Response__init(&data[i])) { - /* free currently allocated and return false */ + if (!visualization_msgs__srv__GetInteractiveMarkers_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; ) { - visualization_msgs__srv__GetInteractiveMarkers_Response__fini(&data[i]); + visualization_msgs__srv__GetInteractiveMarkers_Response__fini(&output->data[i]); } - free(data); return false; } } - output->data = data; output->capacity = input->size; } output->size = input->size; diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__functions.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__functions.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__functions.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__functions.h diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h similarity index 98% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h index 28198f145..fca257836 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_c.h @@ -23,6 +23,7 @@ size_t get_serialized_size_visualization_msgs__srv__GetInteractiveMarkers_Reques ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__srv__GetInteractiveMarkers_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs @@ -55,6 +56,7 @@ size_t get_serialized_size_visualization_msgs__srv__GetInteractiveMarkers_Respon ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs size_t max_serialized_size_visualization_msgs__srv__GetInteractiveMarkers_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_visualization_msgs diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp similarity index 99% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp index ac02e22f2..718812f1c 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_fastrtps_cpp.hpp @@ -55,6 +55,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_GetInteractiveMarkers_Request( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp @@ -131,6 +132,7 @@ size_t ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_visualization_msgs max_serialized_size_GetInteractiveMarkers_Response( bool & full_bounded, + bool & is_plain, size_t current_alignment); } // namespace typesupport_fastrtps_cpp diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_cpp.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_cpp.hpp similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_cpp.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_cpp.hpp diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.h similarity index 90% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.h index 263f094c1..cb120b6f7 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.h +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.h @@ -17,7 +17,7 @@ extern "C" // Constants defined in the message -// Struct defined in srv/GetInteractiveMarkers in the package visualization_msgs. +/// Struct defined in srv/GetInteractiveMarkers in the package visualization_msgs. typedef struct visualization_msgs__srv__GetInteractiveMarkers_Request { uint8_t structure_needs_at_least_one_member; @@ -40,10 +40,11 @@ typedef struct visualization_msgs__srv__GetInteractiveMarkers_Request__Sequence // Member 'markers' #include "visualization_msgs/msg/detail/interactive_marker__struct.h" -// Struct defined in srv/GetInteractiveMarkers in the package visualization_msgs. +/// Struct defined in srv/GetInteractiveMarkers in the package visualization_msgs. typedef struct visualization_msgs__srv__GetInteractiveMarkers_Response { uint64_t sequence_number; + /// All interactive markers provided by the server. visualization_msgs__msg__InteractiveMarker__Sequence markers; } visualization_msgs__srv__GetInteractiveMarkers_Response; diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp similarity index 95% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp index c672ec0da..d63707bbf 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__struct.hpp @@ -5,14 +5,15 @@ #ifndef VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__STRUCT_HPP_ #define VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__STRUCT_HPP_ -#include -#include #include #include #include #include #include +#include "rosidl_runtime_cpp/bounded_vector.hpp" +#include "rosidl_runtime_cpp/message_initialization.hpp" + #ifndef _WIN32 # define DEPRECATED__visualization_msgs__srv__GetInteractiveMarkers_Request __attribute__((deprecated)) @@ -167,7 +168,7 @@ struct GetInteractiveMarkers_Response_ uint64_t; _sequence_number_type sequence_number; using _markers_type = - std::vector, typename ContainerAllocator::template rebind>::other>; + std::vector, typename std::allocator_traits::template rebind_alloc>>; _markers_type markers; // setters for named parameter idiom @@ -178,7 +179,7 @@ struct GetInteractiveMarkers_Response_ return *this; } Type & set__markers( - const std::vector, typename ContainerAllocator::template rebind>::other> & _arg) + const std::vector, typename std::allocator_traits::template rebind_alloc>> & _arg) { this->markers = _arg; return *this; diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp new file mode 100644 index 000000000..cf3efd786 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__traits.hpp @@ -0,0 +1,286 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from visualization_msgs:srv/GetInteractiveMarkers.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ +#define VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ + +#include + +#include +#include +#include + +#include "visualization_msgs/srv/detail/get_interactive_markers__struct.hpp" +#include "rosidl_runtime_cpp/traits.hpp" + +namespace visualization_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetInteractiveMarkers_Request & msg, + std::ostream & out) +{ + (void)msg; + out << "null"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetInteractiveMarkers_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + (void)msg; + (void)indentation; + out << "null\n"; +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetInteractiveMarkers_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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::srv::GetInteractiveMarkers_Request & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::srv::GetInteractiveMarkers_Request & msg) +{ + return visualization_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::srv::GetInteractiveMarkers_Request"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/srv/GetInteractiveMarkers_Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +// Include directives for member types +// Member 'markers' +#include "visualization_msgs/msg/detail/interactive_marker__traits.hpp" + +namespace visualization_msgs +{ + +namespace srv +{ + +inline void to_flow_style_yaml( + const GetInteractiveMarkers_Response & msg, + std::ostream & out) +{ + out << "{"; + // member: sequence_number + { + out << "sequence_number: "; + rosidl_generator_traits::value_to_yaml(msg.sequence_number, out); + out << ", "; + } + + // member: markers + { + if (msg.markers.size() == 0) { + out << "markers: []"; + } else { + out << "markers: ["; + size_t pending_items = msg.markers.size(); + for (auto item : msg.markers) { + to_flow_style_yaml(item, out); + if (--pending_items > 0) { + out << ", "; + } + } + out << "]"; + } + } + out << "}"; +} // NOLINT(readability/fn_size) + +inline void to_block_style_yaml( + const GetInteractiveMarkers_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + // member: sequence_number + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "sequence_number: "; + rosidl_generator_traits::value_to_yaml(msg.sequence_number, out); + out << "\n"; + } + + // member: markers + { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + if (msg.markers.size() == 0) { + out << "markers: []\n"; + } else { + out << "markers:\n"; + for (auto item : msg.markers) { + if (indentation > 0) { + out << std::string(indentation, ' '); + } + out << "-\n"; + to_block_style_yaml(item, out, indentation + 2); + } + } + } +} // NOLINT(readability/fn_size) + +inline std::string to_yaml(const GetInteractiveMarkers_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 visualization_msgs + +namespace rosidl_generator_traits +{ + +[[deprecated("use visualization_msgs::srv::to_block_style_yaml() instead")]] +inline void to_yaml( + const visualization_msgs::srv::GetInteractiveMarkers_Response & msg, + std::ostream & out, size_t indentation = 0) +{ + visualization_msgs::srv::to_block_style_yaml(msg, out, indentation); +} + +[[deprecated("use visualization_msgs::srv::to_yaml() instead")]] +inline std::string to_yaml(const visualization_msgs::srv::GetInteractiveMarkers_Response & msg) +{ + return visualization_msgs::srv::to_yaml(msg); +} + +template<> +inline const char * data_type() +{ + return "visualization_msgs::srv::GetInteractiveMarkers_Response"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/srv/GetInteractiveMarkers_Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "visualization_msgs::srv::GetInteractiveMarkers"; +} + +template<> +inline const char * name() +{ + return "visualization_msgs/srv/GetInteractiveMarkers"; +} + +template<> +struct has_fixed_size + : std::integral_constant< + bool, + has_fixed_size::value && + has_fixed_size::value + > +{ +}; + +template<> +struct has_bounded_size + : std::integral_constant< + bool, + has_bounded_size::value && + has_bounded_size::value + > +{ +}; + +template<> +struct is_service + : std::true_type +{ +}; + +template<> +struct is_service_request + : std::true_type +{ +}; + +template<> +struct is_service_response + : std::true_type +{ +}; + +} // namespace rosidl_generator_traits + +#endif // VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TRAITS_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.c b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.c new file mode 100644 index 000000000..7f7421300 --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.c @@ -0,0 +1,308 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from visualization_msgs:srv/GetInteractiveMarkers.idl +// generated code does not contain a copyright notice + +#include +#include "visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h" +#include "visualization_msgs/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 "visualization_msgs/srv/detail/get_interactive_markers__functions.h" +#include "visualization_msgs/srv/detail/get_interactive_markers__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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; + visualization_msgs__srv__GetInteractiveMarkers_Request__init(message_memory); +} + +void visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_fini_function(void * message_memory) +{ + visualization_msgs__srv__GetInteractiveMarkers_Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_member_array[1] = { + { + "structure_needs_at_least_one_member", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__srv__GetInteractiveMarkers_Request, structure_needs_at_least_one_member), // 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 visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_members = { + "visualization_msgs__srv", // message namespace + "GetInteractiveMarkers_Request", // message name + 1, // number of fields + sizeof(visualization_msgs__srv__GetInteractiveMarkers_Request), + visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_member_array, // message members + visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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 visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle = { + 0, + &visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Request)() { + if (!visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle.typesupport_identifier) { + visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__srv__GetInteractiveMarkers_Request__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +// already included above +// #include +// already included above +// #include "visualization_msgs/srv/detail/get_interactive_markers__rosidl_typesupport_introspection_c.h" +// already included above +// #include "visualization_msgs/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 "visualization_msgs/srv/detail/get_interactive_markers__functions.h" +// already included above +// #include "visualization_msgs/srv/detail/get_interactive_markers__struct.h" + + +// Include directives for member types +// Member `markers` +#include "visualization_msgs/msg/interactive_marker.h" +// Member `markers` +#include "visualization_msgs/msg/detail/interactive_marker__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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; + visualization_msgs__srv__GetInteractiveMarkers_Response__init(message_memory); +} + +void visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_fini_function(void * message_memory) +{ + visualization_msgs__srv__GetInteractiveMarkers_Response__fini(message_memory); +} + +size_t visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__size_function__GetInteractiveMarkers_Response__markers( + const void * untyped_member) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return member->size; +} + +const void * visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_const_function__GetInteractiveMarkers_Response__markers( + const void * untyped_member, size_t index) +{ + const visualization_msgs__msg__InteractiveMarker__Sequence * member = + (const visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void * visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_function__GetInteractiveMarkers_Response__markers( + void * untyped_member, size_t index) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + return &member->data[index]; +} + +void visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__fetch_function__GetInteractiveMarkers_Response__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const visualization_msgs__msg__InteractiveMarker * item = + ((const visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_const_function__GetInteractiveMarkers_Response__markers(untyped_member, index)); + visualization_msgs__msg__InteractiveMarker * value = + (visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *value = *item; +} + +void visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__assign_function__GetInteractiveMarkers_Response__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + visualization_msgs__msg__InteractiveMarker * item = + ((visualization_msgs__msg__InteractiveMarker *) + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_function__GetInteractiveMarkers_Response__markers(untyped_member, index)); + const visualization_msgs__msg__InteractiveMarker * value = + (const visualization_msgs__msg__InteractiveMarker *)(untyped_value); + *item = *value; +} + +bool visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__resize_function__GetInteractiveMarkers_Response__markers( + void * untyped_member, size_t size) +{ + visualization_msgs__msg__InteractiveMarker__Sequence * member = + (visualization_msgs__msg__InteractiveMarker__Sequence *)(untyped_member); + visualization_msgs__msg__InteractiveMarker__Sequence__fini(member); + return visualization_msgs__msg__InteractiveMarker__Sequence__init(member, size); +} + +static rosidl_typesupport_introspection_c__MessageMember visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array[2] = { + { + "sequence_number", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__srv__GetInteractiveMarkers_Response, sequence_number), // 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 + }, + { + "markers", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 0, // array size + false, // is upper bound + offsetof(visualization_msgs__srv__GetInteractiveMarkers_Response, markers), // bytes offset in struct + NULL, // default value + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__size_function__GetInteractiveMarkers_Response__markers, // size() function pointer + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_const_function__GetInteractiveMarkers_Response__markers, // get_const(index) function pointer + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__get_function__GetInteractiveMarkers_Response__markers, // get(index) function pointer + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__fetch_function__GetInteractiveMarkers_Response__markers, // fetch(index, &value) function pointer + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__assign_function__GetInteractiveMarkers_Response__markers, // assign(index, value) function pointer + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__resize_function__GetInteractiveMarkers_Response__markers // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_members = { + "visualization_msgs__srv", // message namespace + "GetInteractiveMarkers_Response", // message name + 2, // number of fields + sizeof(visualization_msgs__srv__GetInteractiveMarkers_Response), + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array, // message members + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_init_function, // function to initialize message memory (memory has to be allocated) + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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 visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle = { + 0, + &visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Response)() { + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, msg, InteractiveMarker)(); + if (!visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle.typesupport_identifier) { + visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &visualization_msgs__srv__GetInteractiveMarkers_Response__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif + +#include "rosidl_runtime_c/service_type_support_struct.h" +// already included above +// #include "visualization_msgs/msg/rosidl_typesupport_introspection_c__visibility_control.h" +// already included above +// #include "visualization_msgs/srv/detail/get_interactive_markers__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 visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_members = { + "visualization_msgs__srv", // service namespace + "GetInteractiveMarkers", // service name + // these two fields are initialized below on the first access + NULL, // request message + // visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Request_message_type_support_handle, + NULL // response message + // visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_Response_message_type_support_handle +}; + +static rosidl_service_type_support_t visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle = { + 0, + &visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_Request)(); + +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers_Response)(); + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_visualization_msgs +const rosidl_service_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, visualization_msgs, srv, GetInteractiveMarkers)() { + if (!visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle.typesupport_identifier) { + visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + rosidl_typesupport_introspection_c__ServiceMembers * service_members = + (rosidl_typesupport_introspection_c__ServiceMembers *)visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_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, visualization_msgs, srv, GetInteractiveMarkers_Response)()->data; + } + + return &visualization_msgs__srv__detail__get_interactive_markers__rosidl_typesupport_introspection_c__GetInteractiveMarkers_service_type_support_handle; +} diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp similarity index 91% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp index 7fc7cc8c5..2f0c1bb2a 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.cpp @@ -51,6 +51,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInteractiv 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 } }; @@ -174,6 +176,24 @@ void * get_function__GetInteractiveMarkers_Response__markers(void * untyped_memb return &member[index]; } +void fetch_function__GetInteractiveMarkers_Response__markers( + const void * untyped_member, size_t index, void * untyped_value) +{ + const auto & item = *reinterpret_cast( + get_const_function__GetInteractiveMarkers_Response__markers(untyped_member, index)); + auto & value = *reinterpret_cast(untyped_value); + value = item; +} + +void assign_function__GetInteractiveMarkers_Response__markers( + void * untyped_member, size_t index, const void * untyped_value) +{ + auto & item = *reinterpret_cast( + get_function__GetInteractiveMarkers_Response__markers(untyped_member, index)); + const auto & value = *reinterpret_cast(untyped_value); + item = value; +} + void resize_function__GetInteractiveMarkers_Response__markers(void * untyped_member, size_t size) { auto * member = @@ -195,6 +215,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInteractiv 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 }, { @@ -210,6 +232,8 @@ static const ::rosidl_typesupport_introspection_cpp::MessageMember GetInteractiv size_function__GetInteractiveMarkers_Response__markers, // size() function pointer get_const_function__GetInteractiveMarkers_Response__markers, // get_const(index) function pointer get_function__GetInteractiveMarkers_Response__markers, // get(index) function pointer + fetch_function__GetInteractiveMarkers_Response__markers, // fetch(index, &value) function pointer + assign_function__GetInteractiveMarkers_Response__markers, // assign(index, value) function pointer resize_function__GetInteractiveMarkers_Response__markers // resize(index) function pointer } }; diff --git a/ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/srv/detail/get_interactive_markers__type_support.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.h diff --git a/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.hpp new file mode 100644 index 000000000..51f009ccc --- /dev/null +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/detail/get_interactive_markers__type_support.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from visualization_msgs:srv/GetInteractiveMarkers.idl +// generated code does not contain a copyright notice + +#ifndef VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TYPE_SUPPORT_HPP_ +#define VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "visualization_msgs/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_visualization_msgs +const rosidl_service_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + srv, + GetInteractiveMarkers +)(); +#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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + srv, + GetInteractiveMarkers_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_visualization_msgs +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + visualization_msgs, + srv, + GetInteractiveMarkers_Response +)(); +#ifdef __cplusplus +} +#endif + + +#endif // VISUALIZATION_MSGS__SRV__DETAIL__GET_INTERACTIVE_MARKERS__TYPE_SUPPORT_HPP_ diff --git a/ThirdParty/ros/include/visualization_msgs/srv/get_interactive_markers.h b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/get_interactive_markers.h similarity index 100% rename from ThirdParty/ros/include/visualization_msgs/srv/get_interactive_markers.h rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/get_interactive_markers.h diff --git a/ThirdParty/ros/include/visualization_msgs/srv/get_interactive_markers.hpp b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/get_interactive_markers.hpp similarity index 86% rename from ThirdParty/ros/include/visualization_msgs/srv/get_interactive_markers.hpp rename to ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/get_interactive_markers.hpp index 63bf2f15c..55636908d 100644 --- a/ThirdParty/ros/include/visualization_msgs/srv/get_interactive_markers.hpp +++ b/ThirdParty/ros/include/visualization_msgs/visualization_msgs/srv/get_interactive_markers.hpp @@ -7,5 +7,6 @@ #include "visualization_msgs/srv/detail/get_interactive_markers__struct.hpp" #include "visualization_msgs/srv/detail/get_interactive_markers__builder.hpp" #include "visualization_msgs/srv/detail/get_interactive_markers__traits.hpp" +#include "visualization_msgs/srv/detail/get_interactive_markers__type_support.hpp" #endif // VISUALIZATION_MSGS__SRV__GET_INTERACTIVE_MARKERS_HPP_ diff --git a/ThirdParty/ros/lib/libaction_msgs__python.so b/ThirdParty/ros/lib/libaction_msgs__python.so deleted file mode 100644 index f36f878f7..000000000 Binary files a/ThirdParty/ros/lib/libaction_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_generator_c.so index 3f345024b..f140d58d2 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_c.so index a65dbccbf..a0e3d524b 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_cpp.so index 9afa3d96a..e5389ab25 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so index 8dd1b0960..aec23fe97 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so index 9e30caa3e..8898ec2c1 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_c.so index ef25f28af..215c62500 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so index a1b3b94d5..9562ce72e 100644 Binary files a/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__python.so b/ThirdParty/ros/lib/libactionlib_msgs__python.so deleted file mode 100644 index 27ec2ac3a..000000000 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_generator_c.so index 4d0d5c235..767f7c3ce 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_c.so index 45c259243..2c0b278c2 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_cpp.so index 266e9c63f..f369d1454 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_c.so index c8881b410..9086fd135 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_cpp.so index 89b2fd55c..4efcb8fff 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_c.so index 38ff93c0b..8c980e538 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_cpp.so index c4af06aad..9c71b125e 100644 Binary files a/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libactionlib_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libament_index_cpp.so b/ThirdParty/ros/lib/libament_index_cpp.so new file mode 100644 index 000000000..85eb475ba Binary files /dev/null and b/ThirdParty/ros/lib/libament_index_cpp.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__python.so b/ThirdParty/ros/lib/libbuiltin_interfaces__python.so deleted file mode 100644 index 93bf3e6f2..000000000 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_generator_c.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_generator_c.so index 9fd5078a5..39eb4ca88 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_generator_c.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_c.so index 1c6ae72b3..1ce6cdf6b 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so index d01aed3dd..262d380e4 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so index a89d8d8e8..52a850204 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so index 35defeb9b..ffa979be6 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so index 62a129cd7..a7ebe0039 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so index 6f62dc492..bf7bafe01 100644 Binary files a/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__python.so b/ThirdParty/ros/lib/libdiagnostic_msgs__python.so deleted file mode 100644 index afb0c8174..000000000 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_generator_c.so index 5177388f4..0e68d5412 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_c.so index c30eccf32..b54920ca4 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_cpp.so index 44ad08105..37fe7e247 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_c.so index 2b5a88ccd..02c724c6f 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_cpp.so index de91b4aee..6a1a13a8f 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_c.so index acb0457ed..f9a7ec080 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_cpp.so index 4f37cd127..a052d2091 100644 Binary files a/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libdiagnostic_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__python.so b/ThirdParty/ros/lib/libexample_interfaces__python.so deleted file mode 100644 index 3d66c6b30..000000000 Binary files a/ThirdParty/ros/lib/libexample_interfaces__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_generator_c.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_generator_c.so index b3fde3f9c..c210ff141 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_generator_c.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_c.so index 60505d4d2..cf83ff306 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_cpp.so index 5ce68f6fa..fdc47bec1 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_c.so index 477907047..1456cc79f 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_cpp.so index 0d23a5b59..ef92244fd 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so index 9c04c8210..bfb5c25c8 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so index 1798b0844..debb5f716 100644 Binary files a/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libexample_interfaces__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libfastcdr.so b/ThirdParty/ros/lib/libfastcdr.so index 44e7fcf56..d3601b3e0 100644 Binary files a/ThirdParty/ros/lib/libfastcdr.so and b/ThirdParty/ros/lib/libfastcdr.so differ diff --git a/ThirdParty/ros/lib/libfastrtps.so b/ThirdParty/ros/lib/libfastrtps.so index 3d7c758f1..30d396667 100644 Binary files a/ThirdParty/ros/lib/libfastrtps.so and b/ThirdParty/ros/lib/libfastrtps.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__python.so b/ThirdParty/ros/lib/libgeometry_msgs__python.so deleted file mode 100644 index cb7b20300..000000000 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_generator_c.so index 599e7a7ba..fb9586ad1 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_c.so index 6485e1236..0e82feba7 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_cpp.so index 42194f212..24bc79b15 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so index 873853c55..87e5d1b54 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so index b30d3dc17..e99308158 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so index 32d63144d..897fcc380 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so index 9fd5c226e..50567cc59 100644 Binary files a/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_c.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_c.so new file mode 100644 index 000000000..960fe8f44 Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_py.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_py.so new file mode 100644 index 000000000..ee7510a1e Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_generator_py.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_c.so new file mode 100644 index 000000000..343532f9f Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_cpp.so new file mode 100644 index 000000000..10ecf5b06 Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so new file mode 100644 index 000000000..b5e009fd3 Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so new file mode 100644 index 000000000..f1d0a6deb Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_c.so new file mode 100644 index 000000000..5b1f84c01 Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so new file mode 100644 index 000000000..800cf920c Binary files /dev/null and b/ThirdParty/ros/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__python.so b/ThirdParty/ros/lib/libnav_msgs__python.so deleted file mode 100644 index c7a2ce966..000000000 Binary files a/ThirdParty/ros/lib/libnav_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_generator_c.so index cfc6fb9e6..ebbac80a2 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_c.so index 2b3fe924e..5c4ceb3a7 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_cpp.so index 80b8ed515..9bc8d066a 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_c.so index 93305ac14..23c567a3a 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_cpp.so index f2ca5a5c8..4a769e36f 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_c.so index e237da260..c74015cb7 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_cpp.so index 0710e7b2e..27062f5aa 100644 Binary files a/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libnav_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__python.so b/ThirdParty/ros/lib/libpcl_msgs__python.so deleted file mode 100644 index 7766c312f..000000000 Binary files a/ThirdParty/ros/lib/libpcl_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_generator_c.so index fea948199..2cf0b1892 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_c.so index 23f3bf622..0c893a664 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_cpp.so index 473353c94..f19b2d0a6 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_c.so index c955e9211..671654679 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_cpp.so index 4e43af3df..a40900d4c 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_c.so index 3dbd9931a..cd091667a 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_cpp.so index 282a28706..11d959fa2 100644 Binary files a/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libpcl_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/librcl.so b/ThirdParty/ros/lib/librcl.so index a265b6cbe..043c56f8e 100644 Binary files a/ThirdParty/ros/lib/librcl.so and b/ThirdParty/ros/lib/librcl.so differ diff --git a/ThirdParty/ros/lib/librcl_action.so b/ThirdParty/ros/lib/librcl_action.so index 2f43cc97f..756b4fc2c 100644 Binary files a/ThirdParty/ros/lib/librcl_action.so and b/ThirdParty/ros/lib/librcl_action.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_generator_c.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_generator_c.so index 5f57cf183..3794240a0 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_generator_c.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_c.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_c.so index b4740b416..3bb6046fb 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_cpp.so index 9a8d844ed..f10824b87 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so index 00bc5a93f..0df9d70c1 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so index f057a8ddc..d0242a899 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so index 01d312866..373c13d6e 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so index c2e487996..88ca4ec05 100644 Binary files a/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/librcl_logging_interface.so b/ThirdParty/ros/lib/librcl_logging_interface.so new file mode 100644 index 000000000..d00211bff Binary files /dev/null and b/ThirdParty/ros/lib/librcl_logging_interface.so differ diff --git a/ThirdParty/ros/lib/librcl_logging_spdlog.so b/ThirdParty/ros/lib/librcl_logging_spdlog.so index 4cf042b08..8ec57b1f1 100644 Binary files a/ThirdParty/ros/lib/librcl_logging_spdlog.so and b/ThirdParty/ros/lib/librcl_logging_spdlog.so differ diff --git a/ThirdParty/ros/lib/librcl_yaml_param_parser.so b/ThirdParty/ros/lib/librcl_yaml_param_parser.so index 2c87411fe..6b20702d9 100644 Binary files a/ThirdParty/ros/lib/librcl_yaml_param_parser.so and b/ThirdParty/ros/lib/librcl_yaml_param_parser.so differ diff --git a/ThirdParty/ros/lib/librclc.so b/ThirdParty/ros/lib/librclc.so index d0fc1ac7a..d4d82eaf8 100644 Binary files a/ThirdParty/ros/lib/librclc.so and b/ThirdParty/ros/lib/librclc.so differ diff --git a/ThirdParty/ros/lib/librcpputils.so b/ThirdParty/ros/lib/librcpputils.so index 17b539732..e34280d53 100644 Binary files a/ThirdParty/ros/lib/librcpputils.so and b/ThirdParty/ros/lib/librcpputils.so differ diff --git a/ThirdParty/ros/lib/librcutils.so b/ThirdParty/ros/lib/librcutils.so index 70b63b23e..538f46210 100644 Binary files a/ThirdParty/ros/lib/librcutils.so and b/ThirdParty/ros/lib/librcutils.so differ diff --git a/ThirdParty/ros/lib/librmw.so b/ThirdParty/ros/lib/librmw.so index 4351814fb..0f0d9e381 100644 Binary files a/ThirdParty/ros/lib/librmw.so and b/ThirdParty/ros/lib/librmw.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common.so b/ThirdParty/ros/lib/librmw_dds_common.so index 1f2c680e0..a3962afaf 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common.so and b/ThirdParty/ros/lib/librmw_dds_common.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_generator_c.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_generator_c.so index a0f96d21e..f000c217c 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_generator_c.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_c.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_c.so index 06c394ae3..e385dade6 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_cpp.so index 3a432cea8..332037234 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_c.so index 7a73d6822..eec05a39d 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_cpp.so index aa39a2599..83f073e2c 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_c.so index 146e88ff8..9fd55ee5f 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_cpp.so index 6e20ffd66..22f0589c3 100644 Binary files a/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/librmw_dds_common__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/librmw_fastrtps_cpp.so b/ThirdParty/ros/lib/librmw_fastrtps_cpp.so index e667e2536..e904d1612 100644 Binary files a/ThirdParty/ros/lib/librmw_fastrtps_cpp.so and b/ThirdParty/ros/lib/librmw_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/librmw_fastrtps_shared_cpp.so b/ThirdParty/ros/lib/librmw_fastrtps_shared_cpp.so index f63645252..c3ea1da81 100644 Binary files a/ThirdParty/ros/lib/librmw_fastrtps_shared_cpp.so and b/ThirdParty/ros/lib/librmw_fastrtps_shared_cpp.so differ diff --git a/ThirdParty/ros/lib/librmw_implementation.so b/ThirdParty/ros/lib/librmw_implementation.so index bcd9f8971..b2d2dcf85 100644 Binary files a/ThirdParty/ros/lib/librmw_implementation.so and b/ThirdParty/ros/lib/librmw_implementation.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__python.so b/ThirdParty/ros/lib/librosgraph_msgs__python.so deleted file mode 100644 index 8ae82092d..000000000 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_generator_c.so index 7d305b2b5..a9464ff30 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_c.so index 350852a26..10e70ac2b 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_cpp.so index 69cc62c24..33fde6c0a 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so index 62838a463..073a6e20e 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so index 31db896c5..e96568ab2 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so index d52396647..4f633455b 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so index 95e604c51..fafba45e0 100644 Binary files a/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/librosidl_runtime_c.so b/ThirdParty/ros/lib/librosidl_runtime_c.so index 66b196ab8..ec46fd4b9 100644 Binary files a/ThirdParty/ros/lib/librosidl_runtime_c.so and b/ThirdParty/ros/lib/librosidl_runtime_c.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_c.so b/ThirdParty/ros/lib/librosidl_typesupport_c.so index 6022b9fbf..d020d9ed2 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_c.so and b/ThirdParty/ros/lib/librosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_cpp.so b/ThirdParty/ros/lib/librosidl_typesupport_cpp.so index 3ef76e190..3b41b3ec3 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/librosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_c.so index 580034a65..e9a3ea31b 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_cpp.so index 668486d8e..c00540529 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/librosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/librosidl_typesupport_introspection_c.so index ecd8ebd73..6833f4dc0 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/librosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/librosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/librosidl_typesupport_introspection_cpp.so index c8e12134d..d6767e41d 100644 Binary files a/ThirdParty/ros/lib/librosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/librosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__python.so b/ThirdParty/ros/lib/libsensor_msgs__python.so deleted file mode 100644 index e04c8e947..000000000 Binary files a/ThirdParty/ros/lib/libsensor_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_generator_c.so index e3b2c771f..305d91e39 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_c.so index e3aed5370..9e3de91e0 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_cpp.so index 82a695c5b..98ef4b0ee 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so index 0b217e79c..925c77a6b 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so index db699576d..1bc8f7de6 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so index 7180a968a..ea5028923 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so index cf636b8b7..1d929855c 100644 Binary files a/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__python.so b/ThirdParty/ros/lib/libshape_msgs__python.so deleted file mode 100644 index d560be4c8..000000000 Binary files a/ThirdParty/ros/lib/libshape_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_generator_c.so index 4fc6934fc..943065d2d 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_c.so index be130283c..edbb8b8fc 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_cpp.so index c8947e02b..cac185622 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_c.so index 2e44b58f9..faf103a5b 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_cpp.so index af38afd70..453250760 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_c.so index fe2c82c6f..a142e145f 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_cpp.so index 2cc48dcd1..4c45949bd 100644 Binary files a/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libshape_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__python.so b/ThirdParty/ros/lib/libstd_msgs__python.so deleted file mode 100644 index cff65b74b..000000000 Binary files a/ThirdParty/ros/lib/libstd_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_generator_c.so index 7c3b961d3..ccb6dedb0 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_c.so index a6de5e374..0180d552c 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_cpp.so index 474f05ca2..4c382305e 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so index c4079dc85..bfd00bb49 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so index 17fcc063f..ee6afb62c 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_c.so index 379a46cef..12da59bfc 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so index a18d32895..5bb8a4cc4 100644 Binary files a/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__python.so b/ThirdParty/ros/lib/libstd_srvs__python.so deleted file mode 100644 index 66b620463..000000000 Binary files a/ThirdParty/ros/lib/libstd_srvs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_generator_c.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_generator_c.so index 6eff7ebce..54f020610 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_c.so index e9a60351f..fa96b4886 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_cpp.so index 3fad897af..782cbcaef 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so index a55a148db..0c31f7cab 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so index 2f27af911..437f9b185 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_c.so index 9deb21e62..c566b01ac 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so index b8e03e28e..332f073ac 100644 Binary files a/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__python.so b/ThirdParty/ros/lib/libstereo_msgs__python.so deleted file mode 100644 index d03329d96..000000000 Binary files a/ThirdParty/ros/lib/libstereo_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_generator_c.so index 36e9dcadd..7b05256cd 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_c.so index 83de8c2bd..c4435021f 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_cpp.so index bd88779d9..61dd5ee18 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_c.so index 80e7d8e36..962a79c10 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_cpp.so index 084441bb3..75c5dd12e 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_c.so index d21c75ab9..364f70fcc 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_cpp.so index aed32a078..47715c5ec 100644 Binary files a/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libstereo_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__python.so b/ThirdParty/ros/lib/libtf2_msgs__python.so deleted file mode 100644 index 7ff6607eb..000000000 Binary files a/ThirdParty/ros/lib/libtf2_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_generator_c.so index 6b1a79e6d..1d022d3bd 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_c.so index aa8329a15..d478c8b69 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_cpp.so index 5082146e3..bb6630b5f 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so index 562e9061e..3e75d67ab 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so index d31baa537..255ce93b7 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so index 35a117d5e..1b13e1887 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so index a9e60a6be..6923274ff 100644 Binary files a/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libtracetools.so b/ThirdParty/ros/lib/libtracetools.so index fb5b1dc83..5dc132961 100644 Binary files a/ThirdParty/ros/lib/libtracetools.so and b/ThirdParty/ros/lib/libtracetools.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__python.so b/ThirdParty/ros/lib/libtrajectory_msgs__python.so deleted file mode 100644 index ce35b0159..000000000 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_generator_c.so index 01a00926d..620ebc8be 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_c.so index dd9ae37cb..5cdb01b78 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_cpp.so index 7dd26b3ed..6a3599156 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_c.so index e327c9b9e..36e42178b 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_cpp.so index 6eb10c2be..09be3ae40 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_c.so index 8cb84745c..5196a8e5e 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_cpp.so index e788075a4..776e7c9f2 100644 Binary files a/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libtrajectory_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__python.so b/ThirdParty/ros/lib/libue_msgs__python.so deleted file mode 100644 index 8ddd1a60f..000000000 Binary files a/ThirdParty/ros/lib/libue_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libue_msgs__rosidl_generator_c.so index 7b0e05642..ca899d98f 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_c.so index 6fc629393..620450d54 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_cpp.so index d20c52370..29b43c23a 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_c.so index 223e27a27..27c70a4f5 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_cpp.so index e16bf6c1f..5cfefb017 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_c.so index 8460ef968..665ea5c2f 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_cpp.so index e1a3bd22e..156b1e8c2 100644 Binary files a/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libue_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__python.so b/ThirdParty/ros/lib/libunique_identifier_msgs__python.so deleted file mode 100644 index 107379c22..000000000 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_generator_c.so index cab41338a..b92335c84 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_c.so index 1939f2f55..156619ae5 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so index 06c2d81cd..e5d0e8cb1 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so index d53286990..973813d1a 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so index 154775fce..510d6180b 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so index d331af346..04beaddb7 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so index f25c6ccad..75fc90d09 100644 Binary files a/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__python.so b/ThirdParty/ros/lib/libvisualization_msgs__python.so deleted file mode 100644 index 67138fbcc..000000000 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__python.so and /dev/null differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_generator_c.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_generator_c.so index 2fef6372a..17e84638e 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_generator_c.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_generator_c.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_c.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_c.so index 68927e34b..7bba410b6 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_c.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_c.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_cpp.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_cpp.so index bc59c975e..3ba056715 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_cpp.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_cpp.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so index 690b706e2..49f7bbaa9 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so index c06f54dc6..57393c832 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so index a01352c9f..fe46f48f3 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so differ diff --git a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so index d5e8178ea..59b5c9d77 100644 Binary files a/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so and b/ThirdParty/ros/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so differ diff --git a/ThirdParty/ros/share/cmake/ament_cmake_export_dependencies-extras.cmake b/ThirdParty/ros/share/cmake/ament_cmake_export_dependencies-extras.cmake new file mode 100644 index 000000000..ddd18d15c --- /dev/null +++ b/ThirdParty/ros/share/cmake/ament_cmake_export_dependencies-extras.cmake @@ -0,0 +1,92 @@ +# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in + +set(_exported_dependencies "builtin_interfaces;std_msgs;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_c;rosidl_typesupport_c;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_runtime_cpp;rosidl_typesupport_c;rosidl_typesupport_cpp;rosidl_typesupport_interface;rosidl_default_runtime") + +find_package(ament_cmake_libraries QUIET REQUIRED) + +# find_package() all dependencies +# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS +# variables to guided_vr_interfaces_DEFINITIONS, guided_vr_interfaces_INCLUDE_DIRS, +# guided_vr_interfaces_LIBRARIES, and guided_vr_interfaces_LINK_FLAGS. +# Additionally collect the direct dependency names in +# guided_vr_interfaces_DEPENDENCIES as well as the recursive dependency names +# in guided_vr_interfaces_RECURSIVE_DEPENDENCIES. +if(NOT _exported_dependencies STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + set(guided_vr_interfaces_DEPENDENCIES ${_exported_dependencies}) + set(guided_vr_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(guided_vr_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(guided_vr_interfaces_DEFINITIONS "${${_dep}_DEFINITIONS}") + endif() + if(${_dep}_INCLUDE_DIRS) + list_append_unique(guided_vr_interfaces_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}") + endif() + if(${_dep}_LIBRARIES) + list(APPEND _libraries "${${_dep}_LIBRARIES}") + endif() + if(${_dep}_LINK_FLAGS) + list_append_unique(guided_vr_interfaces_LINK_FLAGS "${${_dep}_LINK_FLAGS}") + endif() + if(${_dep}_RECURSIVE_DEPENDENCIES) + list_append_unique(guided_vr_interfaces_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}") + endif() + endif() + if(_libraries) + ament_libraries_deduplicate(_libraries "${_libraries}") + list(APPEND guided_vr_interfaces_LIBRARIES "${_libraries}") + endif() + endforeach() +endif() diff --git a/ThirdParty/ros/share/cmake/ament_cmake_export_include_directories-extras.cmake b/ThirdParty/ros/share/cmake/ament_cmake_export_include_directories-extras.cmake new file mode 100644 index 000000000..8ebd39c2a --- /dev/null +++ b/ThirdParty/ros/share/cmake/ament_cmake_export_include_directories-extras.cmake @@ -0,0 +1,16 @@ +# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in + +set(_exported_include_dirs "${guided_vr_interfaces_DIR}/../../../include/guided_vr_interfaces") + +# append include directories to guided_vr_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 'guided_vr_interfaces' exports the include directory '${_exported_include_dir}' which doesn't exist") + endif() + normalize_path(_exported_include_dir "${_exported_include_dir}") + list(APPEND guided_vr_interfaces_INCLUDE_DIRS "${_exported_include_dir}") + endforeach() +endif() diff --git a/ThirdParty/ros/share/cmake/ament_cmake_export_libraries-extras.cmake b/ThirdParty/ros/share/cmake/ament_cmake_export_libraries-extras.cmake new file mode 100644 index 000000000..0101feab2 --- /dev/null +++ b/ThirdParty/ros/share/cmake/ament_cmake_export_libraries-extras.cmake @@ -0,0 +1,141 @@ +# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in + +set(_exported_libraries "guided_vr_interfaces__rosidl_generator_c;guided_vr_interfaces__rosidl_typesupport_c;guided_vr_interfaces__rosidl_typesupport_cpp") +set(_exported_library_names "") + +# populate guided_vr_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 guided_vr_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 'guided_vr_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 "${guided_vr_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 'guided_vr_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 'guided_vr_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 'guided_vr_interfaces' found the library '${_lib}' which doesn't exist") + else() + list(APPEND guided_vr_interfaces_LIBRARIES ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'guided_vr_interfaces' exports the library '${_library}' which doesn't exist") + else() + list(APPEND guided_vr_interfaces_LIBRARIES ${_cfg} "${_library}") + endif() + endif() + endwhile() +endif() + +# find_library() library names with optional LIBRARY_DIRS +# and add the libraries to guided_vr_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 guided_vr_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 'guided_vr_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 'guided_vr_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 'guided_vr_interfaces' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found") + endif() + endif() + if(_lib) + list(APPEND guided_vr_interfaces_LIBRARIES ${_cfg} "${_lib}") + endif() + endwhile() +endif() + +# TODO(dirk-thomas) deduplicate guided_vr_interfaces_LIBRARIES +# while maintaining library order +# as well as build configuration keywords +# as well as linker flags diff --git a/ThirdParty/ros/share/cmake/ament_cmake_export_targets-extras.cmake b/ThirdParty/ros/share/cmake/ament_cmake_export_targets-extras.cmake new file mode 100644 index 000000000..3231b6172 --- /dev/null +++ b/ThirdParty/ros/share/cmake/ament_cmake_export_targets-extras.cmake @@ -0,0 +1,27 @@ +# generated from ament_cmake_export_targets/cmake/ament_cmake_export_targets-extras.cmake.in + +set(_exported_targets "export_guided_vr_interfaces__rosidl_generator_c;export_guided_vr_interfaces__rosidl_typesupport_fastrtps_c;guided_vr_interfaces__rosidl_typesupport_introspection_c;guided_vr_interfaces__rosidl_typesupport_c;export_guided_vr_interfaces__rosidl_generator_cpp;export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp;guided_vr_interfaces__rosidl_typesupport_introspection_cpp;guided_vr_interfaces__rosidl_typesupport_cpp;export_guided_vr_interfaces__rosidl_generator_py") + +# include all exported targets +if(NOT _exported_targets STREQUAL "") + foreach(_target ${_exported_targets}) + set(_export_file "${guided_vr_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 guided_vr_interfaces_TARGETS ${_targets}) + endforeach() +endif() diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport-noconfig.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport-noconfig.cmake new file mode 100644 index 000000000..03c0be618 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_generator_c.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_generator_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_generator_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport.cmake new file mode 100644 index 000000000..20db7787f --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cExport.cmake @@ -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 guided_vr_interfaces::guided_vr_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "builtin_interfaces::builtin_interfaces__rosidl_generator_c;std_msgs::std_msgs__rosidl_generator_c;geometry_msgs::geometry_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_guided_vr_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) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cppExport.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cppExport.cmake new file mode 100644 index 000000000..afc79ee68 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_cppExport.cmake @@ -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 guided_vr_interfaces::guided_vr_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp INTERFACE IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_generator_cpp;geometry_msgs::geometry_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_guided_vr_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) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport-noconfig.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport-noconfig.cmake new file mode 100644 index 000000000..b705a1535 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_generator_py.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_generator_py.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_generator_py.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport.cmake new file mode 100644 index 000000000..0e8f3c5b0 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_generator_pyExport.cmake @@ -0,0 +1,114 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py) + 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_py PROPERTIES + INTERFACE_LINK_LIBRARIES "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c;/usr/lib/x86_64-linux-gnu/libpython3.10.so;guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_py;std_msgs::std_msgs__rosidl_generator_py;geometry_msgs::geometry_msgs__rosidl_generator_py" +) + +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_guided_vr_interfaces__rosidl_generator_pyExport-*.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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c" "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport-noconfig.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport-noconfig.cmake new file mode 100644 index 000000000..902685554 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport.cmake new file mode 100644 index 000000000..ae57b5cc9 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cExport.cmake @@ -0,0 +1,115 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "fastcdr;rosidl_runtime_c::rosidl_runtime_c;rosidl_runtime_cpp::rosidl_runtime_cpp;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_fastrtps_cpp::rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_fastrtps_c::rosidl_typesupport_fastrtps_c;guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_fastrtps_c;std_msgs::std_msgs__rosidl_typesupport_fastrtps_c;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_c" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport-noconfig.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport-noconfig.cmake new file mode 100644 index 000000000..487d70f37 --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_fastrtps_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake new file mode 100644 index 000000000..30b99f90e --- /dev/null +++ b/ThirdParty/ros/share/cmake/export_guided_vr_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake @@ -0,0 +1,115 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "fastcdr;rmw::rmw;rosidl_runtime_c::rosidl_runtime_c;rosidl_runtime_cpp::rosidl_runtime_cpp;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_fastrtps_cpp::rosidl_typesupport_fastrtps_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_fastrtps_cpp;std_msgs::std_msgs__rosidl_typesupport_fastrtps_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_cpp;guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp" +) + +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_guided_vr_interfaces__rosidl_typesupport_fastrtps_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig-version.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig-version.cmake new file mode 100644 index 000000000..7beb73288 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig.cmake new file mode 100644 index 000000000..db693b53a --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfacesConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_guided_vr_interfaces_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED guided_vr_interfaces_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(guided_vr_interfaces_FOUND FALSE) + elseif(NOT guided_vr_interfaces_FOUND) + # use separate condition to avoid uninitialized variable warning + set(guided_vr_interfaces_FOUND FALSE) + endif() + return() +endif() +set(_guided_vr_interfaces_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT guided_vr_interfaces_FIND_QUIETLY) + message(STATUS "Found guided_vr_interfaces: 0.0.0 (${guided_vr_interfaces_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'guided_vr_interfaces' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${guided_vr_interfaces_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(guided_vr_interfaces_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "rosidl_cmake-extras.cmake;ament_cmake_export_dependencies-extras.cmake;ament_cmake_export_include_directories-extras.cmake;ament_cmake_export_libraries-extras.cmake;ament_cmake_export_targets-extras.cmake;rosidl_cmake_export_typesupport_targets-extras.cmake;rosidl_cmake_export_typesupport_libraries-extras.cmake") +foreach(_extra ${_extras}) + include("${guided_vr_interfaces_DIR}/${_extra}") +endforeach() diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport-noconfig.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport-noconfig.cmake new file mode 100644 index 000000000..9267a3ce1 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport-noconfig.cmake @@ -0,0 +1,20 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c PROPERTIES + IMPORTED_LINK_DEPENDENT_LIBRARIES_NOCONFIG "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_c::rosidl_typesupport_c" + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_c.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport.cmake new file mode 100644 index 000000000..13734023d --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cExport.cmake @@ -0,0 +1,114 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_c PROPERTIES + INTERFACE_LINK_LIBRARIES "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/guided_vr_interfaces__rosidl_typesupport_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport-noconfig.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport-noconfig.cmake new file mode 100644 index 000000000..6ec6cdb63 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport-noconfig.cmake @@ -0,0 +1,20 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp PROPERTIES + IMPORTED_LINK_DEPENDENT_LIBRARIES_NOCONFIG "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_cpp::rosidl_typesupport_cpp;rosidl_typesupport_c::rosidl_typesupport_c" + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_cpp.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport.cmake new file mode 100644 index 000000000..b04106661 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_cppExport.cmake @@ -0,0 +1,114 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_cpp PROPERTIES + INTERFACE_LINK_LIBRARIES "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp" +) + +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}/guided_vr_interfaces__rosidl_typesupport_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport-noconfig.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport-noconfig.cmake new file mode 100644 index 000000000..3abbfe47b --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_c.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_introspection_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport.cmake new file mode 100644 index 000000000..e3028ae21 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cExport.cmake @@ -0,0 +1,115 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c;rosidl_typesupport_introspection_c::rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/guided_vr_interfaces__rosidl_typesupport_introspection_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport-noconfig.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport-noconfig.cmake new file mode 100644 index 000000000..c9f76f6b9 --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport-noconfig.cmake @@ -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 "guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp" for configuration "" +set_property(TARGET guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so" + IMPORTED_SONAME_NOCONFIG "libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp "${_IMPORT_PREFIX}/lib/libguided_vr_interfaces__rosidl_typesupport_introspection_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport.cmake b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport.cmake new file mode 100644 index 000000000..102e2dc8c --- /dev/null +++ b/ThirdParty/ros/share/cmake/guided_vr_interfaces__rosidl_typesupport_introspection_cppExport.cmake @@ -0,0 +1,115 @@ +# 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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_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 guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp +add_library(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp SHARED IMPORTED) + +set_target_properties(guided_vr_interfaces::guided_vr_interfaces__rosidl_typesupport_introspection_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/guided_vr_interfaces" + INTERFACE_LINK_LIBRARIES "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp;rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_introspection_cpp::rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp" +) + +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}/guided_vr_interfaces__rosidl_typesupport_introspection_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) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "guided_vr_interfaces::guided_vr_interfaces__rosidl_generator_cpp" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/ThirdParty/ros/share/cmake/rosidl_cmake-extras.cmake b/ThirdParty/ros/share/cmake/rosidl_cmake-extras.cmake new file mode 100644 index 000000000..73ce3be77 --- /dev/null +++ b/ThirdParty/ros/share/cmake/rosidl_cmake-extras.cmake @@ -0,0 +1,4 @@ +# generated from rosidl_cmake/cmake/rosidl_cmake-extras.cmake.in + +set(guided_vr_interfaces_IDL_FILES "msg/Notification2D.idl") +set(guided_vr_interfaces_INTERFACE_FILES "") diff --git a/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake b/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake new file mode 100644 index 000000000..dfbfa5e6c --- /dev/null +++ b/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake @@ -0,0 +1,49 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_libraries.cmake.in + +set(_exported_typesupport_libraries + "__rosidl_typesupport_fastrtps_c:guided_vr_interfaces__rosidl_typesupport_fastrtps_c;__rosidl_typesupport_fastrtps_cpp:guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp") + +# populate guided_vr_interfaces_LIBRARIES_ +if(NOT _exported_typesupport_libraries STREQUAL "") + # loop over typesupport libraries + foreach(_tuple ${_exported_typesupport_libraries}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _library) + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${guided_vr_interfaces_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # the library wasn't found + message(FATAL_ERROR + "Package 'guided_vr_interfaces' exports the typesupport library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR + "Package 'guided_vr_interfaces' found the typesupport library '${_library}' at '${_lib}' " + "which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'guided_vr_interfaces' found the typesupport library '${_lib}' which doesn't exist") + else() + list(APPEND guided_vr_interfaces_LIBRARIES${_suffix} ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'guided_vr_interfaces' exports the typesupport library '${_library}' which doesn't exist") + else() + list(APPEND guided_vr_interfaces_LIBRARIES${_suffix} "${_library}") + endif() + endif() + endforeach() +endif() diff --git a/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake b/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake new file mode 100644 index 000000000..58d24d5ad --- /dev/null +++ b/ThirdParty/ros/share/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake @@ -0,0 +1,23 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_targets.cmake.in + +set(_exported_typesupport_targets + "__rosidl_generator_c:guided_vr_interfaces__rosidl_generator_c;__rosidl_typesupport_fastrtps_c:guided_vr_interfaces__rosidl_typesupport_fastrtps_c;__rosidl_typesupport_introspection_c:guided_vr_interfaces__rosidl_typesupport_introspection_c;__rosidl_typesupport_c:guided_vr_interfaces__rosidl_typesupport_c;__rosidl_generator_cpp:guided_vr_interfaces__rosidl_generator_cpp;__rosidl_typesupport_fastrtps_cpp:guided_vr_interfaces__rosidl_typesupport_fastrtps_cpp;__rosidl_typesupport_introspection_cpp:guided_vr_interfaces__rosidl_typesupport_introspection_cpp;__rosidl_typesupport_cpp:guided_vr_interfaces__rosidl_typesupport_cpp;__rosidl_generator_py:guided_vr_interfaces__rosidl_generator_py") + +# populate guided_vr_interfaces_TARGETS_ +if(NOT _exported_typesupport_targets STREQUAL "") + # loop over typesupport targets + foreach(_tuple ${_exported_typesupport_targets}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _target) + + set(_target "guided_vr_interfaces::${_target}") + if(NOT TARGET "${_target}") + # the exported target must exist + message(WARNING "Package 'guided_vr_interfaces' exports the typesupport target '${_target}' which doesn't exist") + else() + list(APPEND guided_vr_interfaces_TARGETS${_suffix} "${_target}") + endif() + endforeach() +endif() diff --git a/ThirdParty/ros/share/environment/ament_prefix_path.dsv b/ThirdParty/ros/share/environment/ament_prefix_path.dsv new file mode 100644 index 000000000..79d4c95b5 --- /dev/null +++ b/ThirdParty/ros/share/environment/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/ThirdParty/ros/share/environment/ament_prefix_path.sh b/ThirdParty/ros/share/environment/ament_prefix_path.sh new file mode 100644 index 000000000..02e441b75 --- /dev/null +++ b/ThirdParty/ros/share/environment/ament_prefix_path.sh @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/ThirdParty/ros/share/environment/library_path.dsv b/ThirdParty/ros/share/environment/library_path.dsv new file mode 100644 index 000000000..89bec935b --- /dev/null +++ b/ThirdParty/ros/share/environment/library_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/ThirdParty/ros/share/environment/library_path.sh b/ThirdParty/ros/share/environment/library_path.sh new file mode 100644 index 000000000..292e518f1 --- /dev/null +++ b/ThirdParty/ros/share/environment/library_path.sh @@ -0,0 +1,16 @@ +# copied from ament_package/template/environment_hook/library_path.sh + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +if [ $_IS_DARWIN -eq 0 ]; then + ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +else + ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +fi +unset _IS_DARWIN diff --git a/ThirdParty/ros/share/environment/path.dsv b/ThirdParty/ros/share/environment/path.dsv new file mode 100644 index 000000000..b94426af0 --- /dev/null +++ b/ThirdParty/ros/share/environment/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/ThirdParty/ros/share/environment/path.sh b/ThirdParty/ros/share/environment/path.sh new file mode 100644 index 000000000..e59b749a8 --- /dev/null +++ b/ThirdParty/ros/share/environment/path.sh @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/ThirdParty/ros/share/environment/pythonpath.dsv b/ThirdParty/ros/share/environment/pythonpath.dsv new file mode 100644 index 000000000..240760551 --- /dev/null +++ b/ThirdParty/ros/share/environment/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;local/lib/python3.10/dist-packages diff --git a/ThirdParty/ros/share/environment/pythonpath.sh b/ThirdParty/ros/share/environment/pythonpath.sh new file mode 100644 index 000000000..579f26941 --- /dev/null +++ b/ThirdParty/ros/share/environment/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from ament_package/template/environment_hook/pythonpath.sh.in + +ament_prepend_unique_value PYTHONPATH "$AMENT_CURRENT_PREFIX/local/lib/python3.10/dist-packages" diff --git a/ThirdParty/ros/share/hook/catkin_pythonpath.dsv b/ThirdParty/ros/share/hook/catkin_pythonpath.dsv new file mode 100644 index 000000000..240760551 --- /dev/null +++ b/ThirdParty/ros/share/hook/catkin_pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;local/lib/python3.10/dist-packages diff --git a/ThirdParty/ros/share/hook/catkin_pythonpath.ps1 b/ThirdParty/ros/share/hook/catkin_pythonpath.ps1 new file mode 100644 index 000000000..32e3283fe --- /dev/null +++ b/ThirdParty/ros/share/hook/catkin_pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\local/lib/python3.10/dist-packages" diff --git a/ThirdParty/ros/share/hook/catkin_pythonpath.sh b/ThirdParty/ros/share/hook/catkin_pythonpath.sh new file mode 100644 index 000000000..1327bfc81 --- /dev/null +++ b/ThirdParty/ros/share/hook/catkin_pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/local/lib/python3.10/dist-packages" diff --git a/ThirdParty/ros/share/hook/cmake_prefix_path.dsv b/ThirdParty/ros/share/hook/cmake_prefix_path.dsv new file mode 100644 index 000000000..e119f32cb --- /dev/null +++ b/ThirdParty/ros/share/hook/cmake_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/ThirdParty/ros/share/hook/cmake_prefix_path.ps1 b/ThirdParty/ros/share/hook/cmake_prefix_path.ps1 new file mode 100644 index 000000000..d03facc1a --- /dev/null +++ b/ThirdParty/ros/share/hook/cmake_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/ThirdParty/ros/share/hook/cmake_prefix_path.sh b/ThirdParty/ros/share/hook/cmake_prefix_path.sh new file mode 100644 index 000000000..a948e685b --- /dev/null +++ b/ThirdParty/ros/share/hook/cmake_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/ThirdParty/ros/share/hook/ld_library_path_lib.dsv b/ThirdParty/ros/share/hook/ld_library_path_lib.dsv new file mode 100644 index 000000000..89bec935b --- /dev/null +++ b/ThirdParty/ros/share/hook/ld_library_path_lib.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/ThirdParty/ros/share/hook/ld_library_path_lib.ps1 b/ThirdParty/ros/share/hook/ld_library_path_lib.ps1 new file mode 100644 index 000000000..f6df601d0 --- /dev/null +++ b/ThirdParty/ros/share/hook/ld_library_path_lib.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value LD_LIBRARY_PATH "$env:COLCON_CURRENT_PREFIX\lib" diff --git a/ThirdParty/ros/share/hook/ld_library_path_lib.sh b/ThirdParty/ros/share/hook/ld_library_path_lib.sh new file mode 100644 index 000000000..ca3c1020b --- /dev/null +++ b/ThirdParty/ros/share/hook/ld_library_path_lib.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value LD_LIBRARY_PATH "$COLCON_CURRENT_PREFIX/lib" diff --git a/ThirdParty/ros/share/hook/pkg_config_path.dsv b/ThirdParty/ros/share/hook/pkg_config_path.dsv new file mode 100644 index 000000000..858288c51 --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PKG_CONFIG_PATH;lib/pkgconfig diff --git a/ThirdParty/ros/share/hook/pkg_config_path.ps1 b/ThirdParty/ros/share/hook/pkg_config_path.ps1 new file mode 100644 index 000000000..5b098df4d --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PKG_CONFIG_PATH "$env:COLCON_CURRENT_PREFIX\lib/pkgconfig" diff --git a/ThirdParty/ros/share/hook/pkg_config_path.sh b/ThirdParty/ros/share/hook/pkg_config_path.sh new file mode 100644 index 000000000..e452798d4 --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PKG_CONFIG_PATH "$COLCON_CURRENT_PREFIX/lib/pkgconfig" diff --git a/ThirdParty/ros/share/hook/pkg_config_path_multiarch.dsv b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.dsv new file mode 100644 index 000000000..720ef6488 --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PKG_CONFIG_PATH;lib/x86_64-linux-gnu/pkgconfig diff --git a/ThirdParty/ros/share/hook/pkg_config_path_multiarch.ps1 b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.ps1 new file mode 100644 index 000000000..498c167b8 --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PKG_CONFIG_PATH "$env:COLCON_CURRENT_PREFIX\lib/x86_64-linux-gnu/pkgconfig" diff --git a/ThirdParty/ros/share/hook/pkg_config_path_multiarch.sh b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.sh new file mode 100644 index 000000000..ed2d31792 --- /dev/null +++ b/ThirdParty/ros/share/hook/pkg_config_path_multiarch.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PKG_CONFIG_PATH "$COLCON_CURRENT_PREFIX/lib/x86_64-linux-gnu/pkgconfig" diff --git a/ThirdParty/ros/share/hook/ros_package_path.dsv b/ThirdParty/ros/share/hook/ros_package_path.dsv new file mode 100644 index 000000000..86df3c371 --- /dev/null +++ b/ThirdParty/ros/share/hook/ros_package_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;ROS_PACKAGE_PATH;share diff --git a/ThirdParty/ros/share/hook/ros_package_path.ps1 b/ThirdParty/ros/share/hook/ros_package_path.ps1 new file mode 100644 index 000000000..541e60204 --- /dev/null +++ b/ThirdParty/ros/share/hook/ros_package_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value ROS_PACKAGE_PATH "$env:COLCON_CURRENT_PREFIX\share" diff --git a/ThirdParty/ros/share/hook/ros_package_path.sh b/ThirdParty/ros/share/hook/ros_package_path.sh new file mode 100644 index 000000000..e142311ad --- /dev/null +++ b/ThirdParty/ros/share/hook/ros_package_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value ROS_PACKAGE_PATH "$COLCON_CURRENT_PREFIX/share" diff --git a/ThirdParty/ros/share/local_setup.bash b/ThirdParty/ros/share/local_setup.bash new file mode 100644 index 000000000..49782f246 --- /dev/null +++ b/ThirdParty/ros/share/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/ThirdParty/ros/share/local_setup.dsv b/ThirdParty/ros/share/local_setup.dsv new file mode 100644 index 000000000..1711344db --- /dev/null +++ b/ThirdParty/ros/share/local_setup.dsv @@ -0,0 +1,4 @@ +source;share/guided_vr_interfaces/environment/ament_prefix_path.sh +source;share/guided_vr_interfaces/environment/library_path.sh +source;share/guided_vr_interfaces/environment/path.sh +source;share/guided_vr_interfaces/environment/pythonpath.sh diff --git a/ThirdParty/ros/share/local_setup.sh b/ThirdParty/ros/share/local_setup.sh new file mode 100644 index 000000000..b59ac6da7 --- /dev/null +++ b/ThirdParty/ros/share/local_setup.sh @@ -0,0 +1,186 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/intermodalics/ros2_ws/install/guided_vr_interfaces"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to append non-duplicate values to environment variables +# using colons as separators and avoiding leading separators +ament_append_unique_value() { + # arguments + _listname=$1 + _value=$2 + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\$$_listname + _duplicate= + _ament_append_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ $_item = $_value ]; then + _duplicate=1 + fi + done + unset _item + + # append only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid leading separator + if [ -z "$_values" ]; then + eval $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + fi + fi + IFS=$_ament_append_unique_value_IFS + unset _ament_append_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/guided_vr_interfaces/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/guided_vr_interfaces/environment/library_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/guided_vr_interfaces/environment/path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/guided_vr_interfaces/environment/pythonpath.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/ThirdParty/ros/share/local_setup.zsh b/ThirdParty/ros/share/local_setup.zsh new file mode 100644 index 000000000..fe161be53 --- /dev/null +++ b/ThirdParty/ros/share/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/ThirdParty/ros/share/msg/Notification2D.idl b/ThirdParty/ros/share/msg/Notification2D.idl new file mode 100644 index 000000000..be6cd1b9f --- /dev/null +++ b/ThirdParty/ros/share/msg/Notification2D.idl @@ -0,0 +1,18 @@ +#include "builtin_interfaces/msg/Time.idl" +#include "std_msgs/msg/String.idl" +#include "std_msgs/msg/UInt8.idl" +#include "geometry_msgs/msg/Point.idl" + +module guided_vr_interfaces { + module msg { + struct Notification2D + { + std_msgs::msg::String source; + std_msgs::msg::String desc; + std_msgs::msg::UInt8 level; + builtin_interfaces::msg::Time stamp; + uint32 id; + sequence polygon; + }; + }; +}; diff --git a/ThirdParty/ros/share/package.bash b/ThirdParty/ros/share/package.bash new file mode 100644 index 000000000..f0ddc9039 --- /dev/null +++ b/ThirdParty/ros/share/package.bash @@ -0,0 +1,31 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/package.sh" + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/ThirdParty/ros/share/package.dsv b/ThirdParty/ros/share/package.dsv new file mode 100644 index 000000000..f35f5f9ba --- /dev/null +++ b/ThirdParty/ros/share/package.dsv @@ -0,0 +1,18 @@ +source;share/guided_vr_interfaces/hook/cmake_prefix_path.ps1 +source;share/guided_vr_interfaces/hook/cmake_prefix_path.dsv +source;share/guided_vr_interfaces/hook/cmake_prefix_path.sh +source;share/guided_vr_interfaces/hook/ld_library_path_lib.ps1 +source;share/guided_vr_interfaces/hook/ld_library_path_lib.dsv +source;share/guided_vr_interfaces/hook/ld_library_path_lib.sh +source;share/guided_vr_interfaces/hook/ros_package_path.ps1 +source;share/guided_vr_interfaces/hook/ros_package_path.dsv +source;share/guided_vr_interfaces/hook/ros_package_path.sh +source;share/guided_vr_interfaces/hook/catkin_pythonpath.ps1 +source;share/guided_vr_interfaces/hook/catkin_pythonpath.dsv +source;share/guided_vr_interfaces/hook/catkin_pythonpath.sh +source;share/guided_vr_interfaces/hook/pkg_config_path.ps1 +source;share/guided_vr_interfaces/hook/pkg_config_path.dsv +source;share/guided_vr_interfaces/hook/pkg_config_path.sh +source;share/guided_vr_interfaces/hook/pkg_config_path_multiarch.ps1 +source;share/guided_vr_interfaces/hook/pkg_config_path_multiarch.dsv +source;share/guided_vr_interfaces/hook/pkg_config_path_multiarch.sh diff --git a/ThirdParty/ros/share/package.ps1 b/ThirdParty/ros/share/package.ps1 new file mode 100644 index 000000000..7fee94e89 --- /dev/null +++ b/ThirdParty/ros/share/package.ps1 @@ -0,0 +1,120 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/cmake_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/ld_library_path_lib.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/ros_package_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/catkin_pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/pkg_config_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/guided_vr_interfaces/hook/pkg_config_path_multiarch.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/ThirdParty/ros/share/package.sh b/ThirdParty/ros/share/package.sh new file mode 100644 index 000000000..74fccc654 --- /dev/null +++ b/ThirdParty/ros/share/package.sh @@ -0,0 +1,91 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/intermodalics/ros2_ws/install/guided_vr_interfaces" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/cmake_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/ld_library_path_lib.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/ros_package_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/catkin_pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/pkg_config_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/hook/pkg_config_path_multiarch.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/ThirdParty/ros/share/package.xml b/ThirdParty/ros/share/package.xml new file mode 100644 index 000000000..7c99ff5e5 --- /dev/null +++ b/ThirdParty/ros/share/package.xml @@ -0,0 +1,25 @@ + + + guided_vr_interfaces + 0.0.0 + Message definitions for my project + + Milo Knockaert + Apache-2.0 + + ament_cmake + + rosidl_default_generators + builtin_interfaces + std_msgs + geometry_msgs + + rosidl_default_runtime + builtin_interfaces + std_msgs + geometry_msgs + + + rosidl_interface_packages + + diff --git a/ThirdParty/ros/share/package.zsh b/ThirdParty/ros/share/package.zsh new file mode 100644 index 000000000..fa396c017 --- /dev/null +++ b/ThirdParty/ros/share/package.zsh @@ -0,0 +1,42 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/guided_vr_interfaces/package.sh" +unset convert_zsh_to_array + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/docs/Doxyfile b/docs/Doxyfile index bfb7d1f8b..b3e6790bf 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = source/_build/html/doxygen_generated +OUTPUT_DIRECTORY = source/../../_readthedocs/html/doxygen_generated # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and diff --git a/docs/Makefile b/docs/Makefile index 821013680..5ce0dd06d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source -BUILDDIR = _build +BUILDDIR = ../../_readthedocs # Put it first so that "make" without argument is like "make help". help: @@ -22,7 +22,7 @@ help: html: #mkdir -p $(BUILDDIR)/doxygen_generated #doxygen - cd $(SOURCEDIR) && $(SPHINXBUILD) -T -E -b html -d _build/doctrees -D language=en . $(BUILDDIR)/html + cd $(SOURCEDIR) && $(SPHINXBUILD) -T -E -b html -d ../../_readthedocs/doctrees -D language=en . $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." cd .. \ No newline at end of file diff --git a/docs/filter.py b/docs/filter.py index 238361ad8..bab726cfd 100755 --- a/docs/filter.py +++ b/docs/filter.py @@ -2,13 +2,13 @@ import sys import re -URL_BASE = 'https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/' +URL_BASE = 'https://docs.unrealengine.com/5.1/en-US/ProgrammingAndScripting/' URL_GAMEARCHITECTURE = URL_BASE + 'GameplayArchitecture/' UE_MACROS = { - 'UCLASS' : URL_BASE + 'ProgrammingWithCPP/UnrealArchitecture/Objects/', - 'UINTERFACE': URL_GAMEARCHITECTURE + 'Interfaces/', - 'USTRUCT' : URL_GAMEARCHITECTURE + 'Structs/', - 'UFUNCTION' : URL_GAMEARCHITECTURE + 'Functions/', + 'UCLASS' : URL_BASE + 'ProgrammingWithCPP/UnrealArchitecture/Objects/', + 'UINTERFACE': URL_GAMEARCHITECTURE + 'Interfaces/', + 'USTRUCT' : URL_GAMEARCHITECTURE + 'Structs/', + 'UFUNCTION' : URL_GAMEARCHITECTURE + 'Functions/', 'UPROPERTY' : URL_GAMEARCHITECTURE + 'Properties/', 'UENUM' : URL_GAMEARCHITECTURE + 'Properties/' } @@ -16,7 +16,7 @@ filename = sys.argv[1] # Exclude Generated Action/Srv/Msg -InterfacePattern = '(Actions|Srvs|Msgs)/ROS2.+(Action|Srv|Msg).h' +InterfacePattern = '(Actions|Srvs|Msgs)/ROS2.+.h' GeneratedInterfacePattern = '(Actions|Srvs|Msgs)/ROS2Generic(Action|Srv|Msg).h' if re.search(pattern=InterfacePattern, string=filename) and \ not re.search(pattern=GeneratedInterfacePattern, string=filename): @@ -30,7 +30,7 @@ for key in UE_MACROS: if line.lstrip().startswith(key): line = ''' - /*! + /*! * [{}]({}) */ '''.format(line.strip(), UE_MACROS[key]) diff --git a/docs/requirements.txt b/docs/requirements.txt index e0f5fdd85..eed9deebf 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,4 @@ breathe -myst-parser \ No newline at end of file +myst-parser +sphinxcontrib-video +sphinx-rtd-theme \ No newline at end of file diff --git a/docs/source/_static/css/style.css b/docs/source/_static/css/style.css new file mode 100644 index 000000000..9f5f2e744 --- /dev/null +++ b/docs/source/_static/css/style.css @@ -0,0 +1,5 @@ +@import url("theme.css"); + +.wy-nav-content { + max-width: none; +} diff --git a/docs/source/api/bp.rst b/docs/source/api/bp.rst deleted file mode 100644 index 89e84334c..000000000 --- a/docs/source/api/bp.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _api_bp: - -Blueprint -********* - -todo \ No newline at end of file diff --git a/docs/source/api/cpp.rst b/docs/source/api/cpp.rst deleted file mode 100644 index 2bcb949d5..000000000 --- a/docs/source/api/cpp.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. _api_cpp: - -C++ -********* -`Original Doxygen Generatd <../doxygen_generated/html/index.html>`_ - -ROS2Node --------- -.. doxygenfile:: Public/ROS2Node.h - :project: rclUE - :allow-dot-graphs: - -ROS2Action ----------- -.. doxygenfile:: Public/ROS2Action.h - :project: rclUE - :allow-dot-graphs: diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst deleted file mode 100644 index 61b1edafa..000000000 --- a/docs/source/api/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _api: - -API -=== - -.. toctree:: - cpp - bp \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index e090d592f..9b657f8ed 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -8,8 +8,8 @@ print('conf.py') print('****************************************') -read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' -#if read_the_docs_build: +read_the_docs_readthedocs = os.environ.get('READTHEDOCS', None) == 'True' +#if read_the_docs_readthedocs: # pass #else : # pass @@ -17,12 +17,12 @@ # -- Doxygen and breath subprocess.call('ln -s ../../README.md README.md;', shell=True) -subprocess.call('mkdir -p _build/html/; cd ..; doxygen', shell=True) -breathe_projects = { "rclUE": "_build/html/doxygen_generated/xml" } +subprocess.call('mkdir -p ../../_readthedocs/html/; cd ..; doxygen', shell=True) +# breathe_projects = { "rclUE": "../../_readthedocs/html/doxygen_generated/xml" } # breathe_projects_source = { # "auto" : ( "../Private/rclUE", ["*.h"] ) # } -breathe_default_project = "rclUE" +# breathe_default_project = "rclUE" # -- Project information @@ -59,6 +59,8 @@ # -- Options for HTML output html_theme = 'sphinx_rtd_theme' +# html_style = 'css/style.css' +html_static_path = ['_static'] # -- Options for EPUB output epub_show_urls = 'footnote' @@ -68,4 +70,7 @@ source_suffix = { '.rst': 'restructuredtext', '.md': 'markdown', -} \ No newline at end of file +} + +def setup(app): + app.add_css_file('css/style.css') diff --git a/docs/source/design.rst b/docs/source/design.rst index a5b13f0e8..d91a5ef28 100644 --- a/docs/source/design.rst +++ b/docs/source/design.rst @@ -1,83 +1,87 @@ rclUE Design ============ -Unreal Architecture +Unreal Architecture -------------------- -One of the core features of Unreal Engine is the ability to -create new objects and expose properties and functions to -the editor by way of panel integration (i.e. for changing data properties) +One of the core features of Unreal Engine is the ability to +create new objects and expose properties and functions to +the editor by way of panel integration (i.e. for changing data properties) or Blueprint, for scripting logic. Unreal’s type system favors inheritance over composition, -and requires that (ultimately) all classes that work with -these features derive from a base UObject class. These UObjects are managed memory, +and requires that (ultimately) all classes that work with +these features derive from a base UObject class. These UObjects are managed by memory, similar to Java objects, and Unreal has a built-in garbage collector to service them. -To further empower the system, data structures such as arrays, maps, -and many functionalities which exist inside the C++ STL have a custom implementation -to also support such serialization. While it is possible to use STL, the preference +To further empower the system, data structures such as arrays, maps, +and many functionalities which exist inside the C++ STL have a custom implementation +to also support such serialization. While it is possible to use STL, the preference in Unreal is to use the built-in equivalent functionality. Previous works for UE4-ROS integration -------------------------------------- -`ROSIntegration `_ is a UE4’s plugin to enable communication between ROS1 and UE4 through rosbridge. -`CARLA `_ , a simulator for autonomous driving research, -is based on a fork of UE4 and has its own ROS bridge +`ROSIntegration `_ is a UE4’s plugin to enable communication between ROS1 and UE4 through rosbridge. +`CARLA `_ , a simulator for autonomous driving research, +is based on a fork of UE4 and has its own ROS bridge to enable communication between ROS (including ROS2) and itself. -`AirSim `_ is a simulation software designed for drones and wheeled vehicles, -and integrates with ROS through a wrapper composed of 2 nodes: one for the C++ +`AirSim `_ is a simulation software designed for drones and wheeled vehicles, +and integrates with ROS through a wrapper composed of 2 nodes: one for the C++ multirotor client library and one for the PD position controller. -Both CARLA Sim and AirSim take advantage of Unreal Engine’s rendering -capabilities to perform machine learning tasks related to autonomous driving. +Both CARLA Sim and AirSim take advantage of Unreal Engine’s rendering +capabilities to perform machine learning tasks related to autonomous driving. -In contrast to the integrations done in AirSim and CARLA, -rclUE is designed to be simple and portable. For this, we implement -the required ROS2 functionalities in a UE4 plugin (similarly to ROSIntegration), -so that it can be easily included in different UE4 projects and is therefore more +In contrast to the integrations done in AirSim and CARLA, +rclUE is designed to be simple and portable. For this, we implement +the required ROS2 functionalities in a UE plugin (similarly to ROSIntegration), +so that it can be easily included in different UE projects and is therefore more accessible for the community. -Additionally, our tool integrates with UE4’s architecture, -mapping ROS2 elements to UE4 types (e.g. Nodes as Actors, Publishers as ActorComponents) -and the editing of parameters from UE4’s interface and extension through Blueprint visual +Additionally, our tool integrates with UE’s architecture, +mapping ROS2 elements to UE types (e.g. Nodes as Actors, Publishers as ActorComponents) +and the editing of parameters from UE’s interface and extension through Blueprint visual scripting language. -It is our hope that the rclUE plugin will also allow non-ROS developers to leverage ROS2 -software in UE4 with minimal effort, thus inviting contributions from specialists outside -of robotics fields. +It is our hope that the rclUE plugin will also allow non-ROS developers to leverage ROS2 +software in UE with minimal effort, thus inviting contributions from specialists outside +of robotics fields. rclUE Architecture ------------------ -Because of Unreal’s opinionated architecture, a clean implementation must follow the general -practices of the engine, and cannot itself bring design opinions. -Therefore it makes sense to choose a ROS2 client library written in C (rcl, rclc), -rather than C++ (rclcpp). In particular, rclcpp is built on fundamentals of -inheritance which can directly conflict with UE4’s version of inheritance necessary +Because of Unreal’s opinionated architecture, a clean implementation must follow the general +practices of the engine, and cannot itself bring design opinions. +Therefore it makes sense to choose a ROS2 client library written in C (rcl, rclc), +rather than C++ (rclcpp). In particular, rclcpp is built on fundamentals of +inheritance which can directly conflict with UE4’s version of inheritance necessary to work with serialization and garbage collection. The picture below shows how our rclUE layer fits in the overall architecture. .. image:: images/rclUE_position.png -Hereafter we discuss some implementation details for ROS2 nodes, publishers and subscribers, +Hereafter we discuss some implementation details for ROS2 nodes, publishers and subscribers, with other components (services, actions) following the same principles. ROS2 Node ^^^^^^^^^ -ROS2Node is implemented as UE4 Actor, the base class for objects that can be placed in a level -(i.e. the simulation world). The ROS2Node tracks and manages publishers, subscribers, -service clients and services (and thus contains a simplified equivalent of rclcpp’s executor). - -ROS2 Publisher -^^^^^^^^^^^^^^ -ROS2Pulisher is implemented as an ActorComponent, the base class for components that define -reusable behavior that can be added to different types of Actors. As an ActorComponent, -it can be attached to any actor that requires a publisher. - -ROS2 Subscriber -^^^^^^^^^^^^^^^ -Topic subscription is implemented as a method of ROS2Node and is bound to a callback method -through a UE4 delegate. An Actor that wants to subscribe to a topic therefore registers -its callback function to a ROS2Node. - +`ROS2Node `_ +is implemented as UE ActorComponent, the base class for objects +that can be attached to the UE `Actor `_ +such as Robot. +The ROS2Node tracks and manages publishers, subscribers, service clients and servers, action clients and servers +(and thus contains a simplified equivalent of rclcpp’s executor). + +ROS2 Publisher(Service/Action Client) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +`ROS2Publisher `_ +is implemented as an `UObject `_, +the base class for all UE objects. Publisher is handled by ROS2Node and associated with Actor via ROS2Node. +There is a ActorComponent implementation as well for easy integration with BP. + +ROS2 Subscriber(Service/Action Server) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +`ROS2Subscriber `_ +is implemented as UObject and user defined function is bound to a callback method +through a UE delegate. +There is a ActorComponent implementation as well for easy integration with BP. \ No newline at end of file diff --git a/docs/source/examples.rst b/docs/source/examples.rst index db9a9702f..027fbfc12 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -1,10 +1,19 @@ Examples -======== -\* The content presented here can be found in the `Pubsub in the turtlebot3-UE `_ sample code. +--------- +You can find ROS2 Topic, Service and Action examples in +`turtlebot3-UE `_ -Setup and run ---------------- -1. Setup UE4 in Linux by following `Linux Quick Start `_ +This is a simple example of how to use ROS2 Topic, Service and Action in Unreal Engine 5. +Please check `documentation of RapyutaSimulationPlugins `_ +to learn about how to create ROS enabled robots in Unreal Engine 5. + + +.. _setup_and_run_ue_project: + +^^^^^^^^^^^^^^^^^^^^^^^^ +Setup and run UE Project +^^^^^^^^^^^^^^^^^^^^^^^^ +1. Download the lastest UE5 for Linux by following `Unreal Engine for Linux `_. 2. Clone and build .. code-block:: shell @@ -20,76 +29,32 @@ Setup and run ./run_editor.sh -4. Open `turtlebot3-UE/Content/Maps/PubSub.umap` and Play. - -PubSub Example (Unreal C++) ---------------------------- - -.. raw:: html - - - - -.. raw:: html - - - +4. Open `turtlebot3-UE/Content/Maps/ROS2Examples.umap` and Play. -On a ROS2Node Actor, after initializing it, we initialize -the ActorComponent StringPublisher with NewObject, - will initialize publisher and add publisher to node(this). +Since the prooject is set to use +`ROS2 with Discovery Server `_ +to communicate with ROS2 Node in UE, you needs to execute `source turtlebot3_UE/fastdds_setup.sh`. -Subsequently we call InitializeWithROS2(this) which will add the publisher to node and initialize it. +\* In `jammy` branch, you can execute `./run_editor false` to run project without Discovery Server. -Note that we set up the publisher in BeginPlay, -a method for Actors that gets called when we start the simulation, -instead of doing it in the constructor, which only gets called when -the actor is added to the scene or when the executable is compiled. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Topic/Service/Action Examples +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -An important distinction is that by initializing things in BeginPlay, -variables (such as publication frequency) can be set in the editor -and their change will be reflected when running the simulation. -If, in contrast, we initialize things in the constructor, -variables changed in the editor would not reflect in the simulation, -unless we restart the editor. +Blueprint classes are in `turtlebot3-UE/Content/Blueprints/ROS2Examples `_. -.. raw:: html - - +C++ classes are in `turtlebot3-UE/Source/turtlebot3/ROS2Examples `_. -To add a subscription, after the node is initialized, -we bind a callback function to the object of type -FSubscriptionCallback and call AddSubscription. - -In this example, we used a publisher and a subscriber node -to keep it simple, but in practical use cases, -the elements presented should be integrated +In the following examples, we used communication components and node +to keep it simple, but in practical use cases, +the elements presented should be integrated in the actors that need these functionalities. -PubSub Example (Blueprint) --------------------------- - -.. raw:: html - - - -.. image:: images/publisher_bp.png - -Setup of a ROS2 Node with a string publisher: initialize -the Actor ROS2Node actor, then add the ActorComponent -Publisher and initialize it on the node that will publish the message. -The node and publisher parameters (node name, message type, -topic name and publication frequency) are set in the Details panel -(note that the red line connects to the callback function shown at the bottom). - -.. image:: images/subscriber_bp.png - -Setup of a ROS2 Node with a string subscriber: initialize the Actor ROS2Node actor, -then add the subscription and bind callback function which -prints the logs on the window (note that the red line connects -to the callback function shown at the bottom). - -Note that this is only one of the many ways in which a pubsub can be set up. - - +.. toctree:: + examples/publisher_example + examples/subscriber_example + examples/service_client_example + examples/service_server_example + examples/action_client_example + examples/action_server_example diff --git a/docs/source/examples/action_client_example.rst b/docs/source/examples/action_client_example.rst new file mode 100644 index 000000000..e656726f5 --- /dev/null +++ b/docs/source/examples/action_client_example.rst @@ -0,0 +1,429 @@ + +============================= +Action Client Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project +and open `ROS2ActionExample.umap `_. + +----------------------------- +C++ Action Client +----------------------------- + +This example send next action goal when received action result. + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2ActionClientNode.h + + UCLASS() + class TURTLEBOT3_API AROS2ActionClientNode : public AActor + { + GENERATED_BODY() + + public: + AROS2ActionClientNode(); + + virtual void BeginPlay() override; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ActionClient* FibonacciActionClient = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ActionName = TEXT("fibonacci_action"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int Order = 3; + + UPROPERTY() + FTimerHandle ActionTimerHandle; + + UFUNCTION() + void FeedbackCallback(UROS2GenericAction* InAction); + UFUNCTION() + void ResultCallback(UROS2GenericAction* InAction); + UFUNCTION() + void GoalResponseCallback(UROS2GenericAction* InAction); + UFUNCTION() + void CancelCallback(); + + UFUNCTION() + void SendGoal(); + + private: + FROSFibonacciFB FeedbackMsg; + FROSFibonacciSGReq GoalRequest; + }; + + + + +.. code-block:: C++ + + //AROS2ActionClientNode.cpp + + AROS2ActionClientNode::AROS2ActionClientNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("action_client_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2ActionClientNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + ROS2_CREATE_ACTION_CLIENT(Node, + this, + ActionName, + UROS2FibonacciAction::StaticClass(), + &AROS2ActionClientNode::GoalResponseCallback, + &AROS2ActionClientNode::ResultCallback, + &AROS2ActionClientNode::FeedbackCallback, + &AROS2ActionClientNode::CancelCallback, + FibonacciActionClient); + + SendGoal(); + } + + void AROS2ActionClientNode::SendGoal() + { + // Create goal + UROS2FibonacciAction* FibonacciAction = Cast(FibonacciActionClient->Action); + FROSFibonacciSGReq goalRequest; + goalRequest.Order = Order; + FibonacciAction->SetGoalRequest(goalRequest); + + // send goal + if (!FibonacciActionClient->SendGoal()) + { + // if it failes, retry after 1s + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Warning, TEXT("[%s][C++][send goal] failed to sendo goal. retry in 1s..."), *ActionName); + GetWorld()->GetTimerManager().SetTimer(ActionTimerHandle, this, &AROS2ActionClientNode::SendGoal, 1.f, false); + } + else + { + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][send goal] order: %i"), *ActionName, Order); + } + } + + void AROS2ActionClientNode::FeedbackCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciFB feedback; + FibonacciAction->GetFeedback(feedback); + + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, + Log, + TEXT("[%s][C++][received feedback callback] last element of feedback sequence: %d"), + *ActionName, + feedback.Sequence.Last(0)); + } + + void AROS2ActionClientNode::ResultCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciGRRes resultResponse; + FibonacciAction->GetResultResponse(resultResponse); + + // Log request and response + FString resultString; + for (int s : resultResponse.Sequence) + { + resultString += FString::FromInt(s) + ", "; + } + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received result callback] result is: %s"), *ActionName, *resultString); + + // update order and send next goal + Order++; + SendGoal(); + } + + void AROS2ActionClientNode::GoalResponseCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciSGRes goalResponse; + FibonacciAction->GetGoalResponse(goalResponse); + + if (!goalResponse.bAccepted) + { + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, + Warning, + TEXT("[%s][C++][receive goal response callback] goal request is rejected. retry in 1s..."), + *ActionName); + } + else + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][receive goal response callback] goal request is accepted."), *ActionName); + FibonacciActionClient->SendResultRequest(); + } + } + + void AROS2ActionClientNode::CancelCallback() + { + int cancelResult = FibonacciActionClient->Action->GetCancelResponseReturnCode(); + if (cancelResult != FROSCancelGoalRes::ERROR_NONE) + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received cancel response callback] failed to cancel action"), *ActionName); + } + else + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received cancel response callback] succeeded to cancel action"), *ActionName); + } + } + +^^^^^^^^^^^^^^^^^^ +Examin the code +^^^^^^^^^^^^^^^^^^ + +On an AROS2ActionClientNode Actor, similar to the AROS2PublisherrNode, +NodeComponent is created and initialized in the constructor but ROS2 Node is not created here. +Please check :ref:`publisher_examin_code` for the reason. + +.. code-block:: C++ + + AROS2ActionClientNode::AROS2ActionClientNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("action_client_node"); + Node->Namespace = TEXT("cpp"); + } + + +When the simulation starts, BeginPlay is called. +In BeginPlay, firstly create and initialize the ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2ActionClientNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + +You can create a action client by using the +`ROS2_CREATE_ACTION_CLIENT <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#a30eccbd1f974516738d153b76d565fd8>`_ +macro, which creates a action client and adds it to the node. +This macro bound GoalResponse, Result, Feedback and Cancel callback functions to the action client. + + +.. code-block:: C++ + + // Create Action client + ROS2_CREATE_ACTION_CLIENT(Node, + this, + ActionName, + UROS2FibonacciAction::StaticClass(), + &AROS2ActionClientNode::GoalResponseCallback, + &AROS2ActionClientNode::ResultCallback, + &AROS2ActionClientNode::FeedbackCallback, + &AROS2ActionClientNode::CancelCallback, + FibonacciActionClient); + +The implementation of ROS2_CREATE_ACTION_CLIENT is as follows. +It uses Unreal Engine's dynamic delegate to call the bound function +when the node receives the message. +You can find more information about Unreal Engine's dynamic delegate . +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FActionCallback, UROS2GenericAction*, InAction /*Action*/); + + #define ROS2_CREATE_ACTION_CLIENT(InROS2Node, \ + InUserObject, \ + InActionName, \ + InActionClass, \ + InGoalResponseDelegate, \ + InResultResponseDelegate, \ + InFeedbackDelegate, \ + InCancelResponseDelegate, \ + OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Feedback, Result, Goal; \ + FSimpleCallback Cancel; \ + Goal.BindDynamic(InUserObject, InGoalResponseDelegate); \ + Result.BindDynamic(InUserObject, InResultResponseDelegate); \ + Feedback.BindDynamic(InUserObject, InFeedbackDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelResponseDelegate); \ + OutClient = InROS2Node->CreateActionClient(InActionName, InActionClass, Goal, Result, Feedback, Cancel); \ + } + +After we create action client, we call SendGal() to send the first goal. + +.. code-block:: C++ + + SendGoal(); + + +When the node receives a action Feedback/Result/GoalResponse/Cancel, corresponding callback function is called. + +To retrieve the Feedback/Result/GoalResponse, +you need to create a structure (FROSFibonacciFB/FROSFibonacciGRRes/FROSFibonacciSGRes) +for the corresponding action (UROS2FibonacciAction) and +retrieve the request by calling GetFeedback/GetResultResponse/GetGoalResponse. + +FeedbackCallback simply print the feedback. + +.. code-block:: C++ + + void AROS2ActionClientNode::FeedbackCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciFB feedback; + FibonacciAction->GetFeedback(feedback); + + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, + Log, + TEXT("[%s][C++][received feedback callback] last element of feedback sequence: %d"), + *ActionName, + feedback.Sequence.Last(0)); + } + +ResultCallback print the result and send next goal by calling SnedGoal() after increment order. + +.. code-block:: C++ + + void AROS2ActionClientNode::ResultCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciGRRes resultResponse; + FibonacciAction->GetResultResponse(resultResponse); + + // Log request and response + FString resultString; + for (int s : resultResponse.Sequence) + { + resultString += FString::FromInt(s) + ", "; + } + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received result callback] result is: %s"), *ActionName, *resultString); + + // update order and send next goal + Order++; + SendGoal(); + } + +GoalResponseCallback send result request by calling SendResultRequest if the goal is accepted. + +.. code-block:: C++ + + void AROS2ActionClientNode::GoalResponseCallback(UROS2GenericAction* InAction) + { + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FROSFibonacciSGRes goalResponse; + FibonacciAction->GetGoalResponse(goalResponse); + + if (!goalResponse.bAccepted) + { + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, + Warning, + TEXT("[%s][C++][receive goal response callback] goal request is rejected. retry in 1s..."), + *ActionName); + } + else + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][receive goal response callback] goal request is accepted."), *ActionName); + FibonacciActionClient->SendResultRequest(); + } + } + +You can get cancel response by calling GetCancelResponseReturnCode(). +CancelCallback print the result of cancel request. + +.. code-block:: C++ + + void AROS2ActionClientNode::CancelCallback() + { + int cancelResult = FibonacciActionClient->Action->GetCancelResponseReturnCode(); + if (cancelResult != FROSCancelGoalRes::ERROR_NONE) + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received cancel response callback] failed to cancel action"), *ActionName); + } + else + { + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][received cancel response callback] succeeded to cancel action"), *ActionName); + } + } + + + +----------------------------- +BP Action Client +----------------------------- + +Blueprint implementation of a action client is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add component such as UROS2Publisher from `Components` panel in the editor(left side in the fig below) +and set each component parameters in `Details` panel in the editor(right side in the fig below). + +The main difference from the C++ implementation is that it uses +`UROS2ActionClientComponent <../doxygen_generated/html/d0/ddc/class_u_r_o_s2_action_client_component.html>`_ +instead of UROS2ActionClient. +As UROS2ActionClientComponent is a child class of +`UActorComponent `_ +and has UROS2ActionClient as a member variable, you can easily add it to the Actor and set parameters from the editor. + +.. image:: ../images/action_client_overview.png + +The Action client component is attached to an Actor, which is displayed in the `Components` panel on the left. + +.. image:: ../images/action_client_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Compared to C++, which uses ROS2_CREATE_ACTION_CLIENT, +in Blueprint, the action client is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddActionClient <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a553335d8ae0eaa9dd0d0ceaac63c08cf>`_ +to initialize the UROS2ActionClient and +`UROS2ActionClient::SetDelegates <../doxygen_generated/html/d1/d5b/class_u_r_o_s2_action_client.html#a56b444c33e5864ab4d120b9214701149>`_ +to bind callback methods instead. +The ROS2_CREATE_ACTION_CLIENT macro in C++ internally calls CreateActionServer which calls AddActionClient and SetDelegates. + +In this example, SendGoal is called to send goal after ActionClient is created. + +.. image:: ../images/action_client_feedback.png + +Feedback Callback method simply prints the received feedback in this example. + +.. image:: ../images/action_client_res.png + +Result Response Callback method prints the received result and send next goal by calling SnedGoal() after increment order. + +.. image:: ../images/action_client_goal.png + +GoalResponseCallback send result request by calling SendResultRequest if the goal is accepted. + +.. image:: ../images/action_client_cancel.png + +CancelCallback print the result of cancel request. + +.. image:: ../images/action_client_sendgoal.png + +SendGoal function in BP send goal by calling SendGoal which is defined in C++. \ No newline at end of file diff --git a/docs/source/examples/action_server_example.rst b/docs/source/examples/action_server_example.rst new file mode 100644 index 000000000..6ce4399b3 --- /dev/null +++ b/docs/source/examples/action_server_example.rst @@ -0,0 +1,428 @@ + +============================= +Action Server Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project +and open `ROS2ActionExample.umap `_. + +----------------------------- +C++ Action Server +----------------------------- + +This example send next action goal when received action result. + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2ActionServerNode.h + + UCLASS() + class TURTLEBOT3_API AROS2ActionServerNode : public AActor + { + GENERATED_BODY() + + public: + AROS2ActionServerNode(); + + virtual void BeginPlay() override; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ActionServer* FibonacciActionServer = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ActionName = TEXT("fibonacci_action"); + + UPROPERTY() + FTimerHandle ActionTimerHandle; + + UFUNCTION() + void Execute(); + + UFUNCTION() + void GoalCallback(UROS2GenericAction* InAction); + UFUNCTION() + void CancelCallback(); + UFUNCTION() + void ResultCallback(); + + private: + FROSFibonacciFB FeedbackMsg; + FROSFibonacciSGReq GoalRequest; + int Count = 0; + }; + + + + + +.. code-block:: C++ + + //AROS2ActionServerNode.cpp + + AROS2ActionServerNode::AROS2ActionServerNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("action_server_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2ActionServerNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + ROS2_CREATE_ACTION_SERVER(Node, + this, + ActionName, + UROS2FibonacciAction::StaticClass(), + &AROS2ActionServerNode::GoalCallback, + &AROS2ActionServerNode::ResultCallback, + &AROS2ActionServerNode::CancelCallback, + FibonacciActionServer); + } + + void AROS2ActionServerNode::Execute() + { + UROS2FibonacciAction* FibonacciAction = Cast(FibonacciActionServer->Action); + + // send feedback + if (Count++ <= GoalRequest.Order) + { + FeedbackMsg.Sequence.Add(FeedbackMsg.Sequence[Count] + FeedbackMsg.Sequence[Count - 1]); + FibonacciAction->SetFeedback(FeedbackMsg); + // Log request and response + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][update feedback] added %d"), *ActionName, FeedbackMsg.Sequence.Last(0)); + FibonacciActionServer->SendFeedback(); + } + // send result when finish by UpdateAndSendResult + else + { + // for log + FString resultString; + + // set result + FROSFibonacciGRRes ResultResponse; + ResultResponse.GRResStatus = GOAL_STATE_SUCCEEDED; + for (auto s : FeedbackMsg.Sequence) + { + ResultResponse.Sequence.Add(s); + resultString += FString::FromInt(s) + ", "; + } + FibonacciAction->SetResultResponse(ResultResponse); + FibonacciActionServer->SendResultResponse(); + + // stop timer + GetWorld()->GetTimerManager().ClearTimer(ActionTimerHandle); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][send result] result is: %s"), *ActionName, *resultString); + ; + } + } + + void AROS2ActionServerNode::GoalCallback(UROS2GenericAction* InAction) + { + // retrieve goal request value + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FibonacciAction->GetGoalRequest(GoalRequest); + + // set and send goal response + FROSFibonacciSGRes goalResponse; + goalResponse.bAccepted = true; // always accept goal + goalResponse.Stamp = UGameplayStatics::GetTimeSeconds(reinterpret_cast(GetWorld())); + Cast(FibonacciActionServer->Action)->SetGoalResponse(goalResponse); + FibonacciActionServer->SendGoalResponse(); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][goal callback]"), *ActionName); + } + + void AROS2ActionServerNode::CancelCallback() + { + // stop execution timer + GetWorld()->GetTimerManager().ClearTimer(ActionTimerHandle); + + // send cancel response. always success + FibonacciActionServer->ProcessAndSendCancelResponse(FROSCancelGoalRes::ERROR_NONE); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][cancle callback]"), *ActionName); + } + + void AROS2ActionServerNode::ResultCallback() + { + // initialize feedback msg + Cast(FibonacciActionServer->Action)->SetGoalIdToFeedback(FeedbackMsg); + FeedbackMsg.Sequence.Empty(); + FeedbackMsg.Sequence.Add(0); + FeedbackMsg.Sequence.Add(1); + Count = 0; + + // set timer to execute action. + GetWorld()->GetTimerManager().SetTimer(ActionTimerHandle, this, &AROS2ActionServerNode::Execute, 1.f, true); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][result callback] Start fibonacci calculation"), *ActionName); + } + + +^^^^^^^^^^^^^^^^^^ +Examin the code +^^^^^^^^^^^^^^^^^^ + +On an AROS2ActionServerNode Actor, similar to the AROS2PublisherrNode, +NodeComponent is created and initialized in the constructor but ROS2 Node is not created here. +Please check :ref:`publisher_examin_code` for the reason. + +.. code-block:: C++ + + AROS2ActionServerNode::AROS2ActionServerNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("action_server_node"); + Node->Namespace = TEXT("cpp"); + } + + +When the simulation starts, BeginPlay is called. +In BeginPlay, firstly create and initialize the ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2ActionServerNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + +You can create a action server by using the +`ROS2_CREATE_ACTION_SERVER <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#a87d0edc6f7bfde247b8ef211c4b43682>`_ +macro, which creates a action server and adds it to the node. +This macro bound Goal, Result and Cancel callback functions to the action server. + +.. code-block:: C++ + + // Create Action server + ROS2_CREATE_ACTION_SERVER(Node, + this, + ActionName, + UROS2FibonacciAction::StaticClass(), + &AROS2ActionServerNode::GoalCallback, + &AROS2ActionServerNode::ResultCallback, + &AROS2ActionServerNode::CancelCallback, + FibonacciActionServer); + +The implementation of ROS2_CREATE_ACTION_SERVER is as follows. +It uses Unreal Engine's dynamic delegate to call the bound function +when the node receives the message. +You can find more information about Unreal Engine's dynamic delegate . +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FActionCallback, UROS2GenericAction*, InAction /*Action*/); + + #define ROS2_CREATE_ACTION_SERVER( \ + InROS2Node, InUserObject, InActionName, InActionClass, InGoalDelegate, InResultDelegate, InCancelDelegate, OutServer) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FActionCallback Goal; \ + FSimpleCallback Result, Cancel; \ + Goal.BindDynamic(InUserObject, InGoalDelegate); \ + Result.BindDynamic(InUserObject, InResultDelegate); \ + Cancel.BindDynamic(InUserObject, InCancelDelegate); \ + OutServer = InROS2Node->CreateActionServer(InActionName, InActionClass, Goal, Result, Cancel); \ + } + + + +AROS2ActionServerNode has GoalRequest and FeedbackMsg variables use data in Execute method. + +.. code-block:: C++ + + private: + FROSFibonacciFB FeedbackMsg; + FROSFibonacciSGReq GoalRequest; + int Count = 0; + +When the node receives a action Result/Goal/Cancel, corresponding callback function is called. +for the corresponding action (UROS2FibonacciAction) and +retrieve the goal by calling GetGoalRequest. + +After setting response, send goal response by calling SendGoalResponse. +In this example goal is always accepted. + +.. code-block:: C++ + + void AROS2ActionServerNode::GoalCallback(UROS2GenericAction* InAction) + { + // retrieve goal request value + UROS2FibonacciAction* FibonacciAction = Cast(InAction); + FibonacciAction->GetGoalRequest(GoalRequest); + + // set and send goal response + FROSFibonacciSGRes goalResponse; + goalResponse.bAccepted = true; // always accept goal + goalResponse.Stamp = UGameplayStatics::GetTimeSeconds(reinterpret_cast(GetWorld())); + Cast(FibonacciActionServer->Action)->SetGoalResponse(goalResponse); + FibonacciActionServer->SendGoalResponse(); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][goal callback]"), *ActionName); + } + + +ResultCallback intialize Feedback and Count and set timer to execute action. + +.. code-block:: C++ + + void AROS2ActionServerNode::ResultCallback() + { + // initialize feedback msg + Cast(FibonacciActionServer->Action)->SetGoalIdToFeedback(FeedbackMsg); + FeedbackMsg.Sequence.Empty(); + FeedbackMsg.Sequence.Add(0); + FeedbackMsg.Sequence.Add(1); + Count = 0; + + // set timer to execute action. + GetWorld()->GetTimerManager().SetTimer(ActionTimerHandle, this, &AROS2ActionServerNode::Execute, 1.f, true); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][result callback] Start fibonacci calculation"), *ActionName); + } + +Execute is periodically called by timer started by ResultCallback. +In Execute, If Count is less than Order, execute fibonacci calculation, send feedback and increment Count. +If Count reach Order, send result response by calling SendResultResponse and stop timer. + +.. code-block:: C++ + + void AROS2ActionServerNode::Execute() + { + UROS2FibonacciAction* FibonacciAction = Cast(FibonacciActionServer->Action); + + // send feedback + if (Count++ <= GoalRequest.Order) + { + FeedbackMsg.Sequence.Add(FeedbackMsg.Sequence[Count] + FeedbackMsg.Sequence[Count - 1]); + FibonacciAction->SetFeedback(FeedbackMsg); + // Log request and response + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][update feedback] added %d"), *ActionName, FeedbackMsg.Sequence.Last(0)); + FibonacciActionServer->SendFeedback(); + } + // send result when finish by UpdateAndSendResult + else + { + // for log + FString resultString; + + // set result + FROSFibonacciGRRes ResultResponse; + ResultResponse.GRResStatus = GOAL_STATE_SUCCEEDED; + for (auto s : FeedbackMsg.Sequence) + { + ResultResponse.Sequence.Add(s); + resultString += FString::FromInt(s) + ", "; + } + FibonacciAction->SetResultResponse(ResultResponse); + FibonacciActionServer->SendResultResponse(); + + // stop timer + GetWorld()->GetTimerManager().ClearTimer(ActionTimerHandle); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][send result] result is: %s"), *ActionName, *resultString); + ; + } + } + +When cancel request is received, stop timer and send cancel response. + +.. code-block:: C++ + + void AROS2ActionServerNode::CancelCallback() + { + // stop execution timer + GetWorld()->GetTimerManager().ClearTimer(ActionTimerHandle); + + // send cancel response. always success + FibonacciActionServer->ProcessAndSendCancelResponse(FROSCancelGoalRes::ERROR_NONE); + + // Log request and response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][cancle callback]"), *ActionName); + } + + + +----------------------------- +BP Action Server +----------------------------- + +Blueprint implementation of a action server is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add component such as UROS2Publisher from `Components` panel in the editor(left side in the fig below) +and set each component parameters in `Details` panel in the editor(right side in the fig below). + +The main difference from the C++ implementation is that it uses +`UROS2ActionServerComponent <../doxygen_generated/html/d2/d74/class_u_r_o_s2_action_server_component.html>`_ +instead of UROS2ActionServer. +As UROS2ActionServerComponent is a child class of +`UActorComponent `_ +and has UROS2ActionServer as a member variable, you can easily add it to the Actor and set parameters from the editor. + +.. image:: ../images/action_server_overview.png + +The Action server component is attached to an Actor, which is displayed in the `Components` panel on the left. + +.. image:: ../images/action_server_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Compared to C++, which uses ROS2_CREATE_ACTION_SERVER, +in Blueprint, the action server is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddActionServer <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a83cd0ecbdb3d6b97e3b2b7171408e2ad>`_ +to initialize the Subscriber and +`UROS2ActionServer::SetDelegates <../doxygen_generated/html/d8/d1f/class_u_r_o_s2_action_server.html#a533811c5b7bed9042085bf13b76066f5>`_ +to bind callback methods instead. +The ROS2_CREATE_ACTION_SERVER macro in C++ internally calls CreateActionServer which calls AddActionServer and SetDelegates. + +.. image:: ../images/action_server_goal.png + +GoalCallback send goal response by calling SendGoalResponse. In this example goal is always accepted. + +.. image:: ../images/action_server_res.png + +Result Callback method initialize the feedback and start timer to periodically calls Execute function. + +.. image:: ../images/action_server_execute.png + +Execute function update fibonacci sequence and send feedback or result. +Top white block, update fibonacci sequence, + +Center SendFeedback block is executed if current count is less than order. + +Bottom SendResult is executed if current count is equal to order. + + +.. image:: ../images/action_server_cancel.png + +CancelCallback clear the timer and send cancel response. \ No newline at end of file diff --git a/docs/source/examples/publisher_example.rst b/docs/source/examples/publisher_example.rst new file mode 100644 index 000000000..6f2a9ec1b --- /dev/null +++ b/docs/source/examples/publisher_example.rst @@ -0,0 +1,377 @@ + +============================= +Publisher Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to set up the UE project +and open `ROS2TopicExample.umap `_. + +----------------------------- +C++ Publisher +----------------------------- + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2PublisherNode.h + + UCLASS() + class TURTLEBOT3_API AROS2PublisherNode : public AActor + { + GENERATED_BODY() + + public: + AROS2PublisherNode(); + + virtual void BeginPlay() override; + + UFUNCTION() + void UpdateMessage(UROS2GenericMsg* InMessage); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2Publisher* Publisher = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2Publisher* LoopPublisher = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + URRROS2StringPublisher* StringPublisher = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName = TEXT("test_topic"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float PublicationFrequencyHz = 1.f; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString Message = TEXT("Hello from C++"); + + UPROPERTY() + int32 Count = 0; + }; + + +.. code-block:: C++ + + //ROS2PublisherNode.cpp + + AROS2PublisherNode::AROS2PublisherNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("publisher_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2PublisherNode::BeginPlay() + { + Super::BeginPlay(); + + Node->Init(); + + // Create publisher with 3 different ways. + // 1. Non Loop Publisher + // 2. Loop Publisher + // 3. Custom Publisher class + + // 1. Non Loop Publisher + // 1.1 Create publisher + Publisher = Node->CreatePublisher(TopicName, UROS2Publisher::StaticClass(), UROS2StrMsg::StaticClass(), UROS2QoS::KeepLast); + + // 1.2 Create msg + FROSStr msg; + msg.Data = FString::Printf(TEXT("%s from non loop publisher"), *Message); + CastChecked(Publisher->TopicMessage)->SetMsg(msg); + + // 1.3 publish + Publisher->Publish(); + + // 2. Loop Publisher + ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS(Node, + this, + TopicName, + UROS2Publisher::StaticClass(), + UROS2StrMsg::StaticClass(), + PublicationFrequencyHz, + &AROS2PublisherNode::UpdateMessage, + UROS2QoS::Default, + LoopPublisher); + + // 3. Use Custom Publisher class + // UpdateMessage is overriden in child class. + StringPublisher = CastChecked( + Node->CreateLoopPublisherWithClass(TopicName, URRROS2StringPublisher::StaticClass(), 1.f)); + StringPublisher->Message = FString::Printf(TEXT("%s from custom class"), *Message); + } + + void AROS2PublisherNode::UpdateMessage(UROS2GenericMsg* InMessage) + { + FROSStr msg; + msg.Data = FString::Printf(TEXT("%s %d"), *Message, Count++); + CastChecked(InMessage)->SetMsg(msg); + } + + +.. _publisher_examin_code: + +^^^^^^^^^^^^^^^^^^ +Code explanations +^^^^^^^^^^^^^^^^^^ + +In the constructor, +the `UROS2NodeComponent <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html>`_ +is created using +`CreateDefaultSubobject `_ +and its parameters such as Node Name and Namespace are set. + +Although the UROS2NodeComponent is created, +the ROS2 Node is not yet initialized at this point. +Initialization of the ROS2 Node occurs during the +`BeginPlay `_ +method, which is called when the simulation starts. + +One reason to initialize in BeginPlay is to create a ROS2 Node when the simulation starts. +It is important to note that the UE Class constructor may also be called before simulation starts, for example, +when an Actor is placed in the level. For a better understanding of Actor Lifecycle, please refer to the +`UE Actor LifeCycle `_ +However, understanding the entire lifecycle is not necessary to use rclUE. + +Another significant difference is that by initializing in BeginPlay, +variables such as publication frequency can be set in the editor and +their changes will be reflected when running the simulation. +If, in contrast, we initialize things in the constructor, +variables changed in the editor would not reflect in the simulation, +unless we restart the editor. + +.. code-block:: C++ + + AROS2PublisherNode::AROS2PublisherNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("publisher_node"); + Node->Namespace = TEXT("cpp"); + } + +When simulation starts, BeginPlay is called. In the BeginPlay, +firstly create and initialize ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2PublisherNode::BeginPlay() + { + Super::BeginPlay(); + + Node->Init(); + +then starts adding publishers. We introduce 3 ways to add publisher here. + + +Non Loop Publisher +~~~~~~~~~~~~~~~~~~~~~~ + +This will create a publisher and publish a message once. +It is a straightforward way to publish a message, +involving creating a publisher, creating a message, and publishing the message. + +To create a publisher, use +`UROS2NodeComponent::CreatePublisher <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a5a7cb19de75e1970894efe2dcb4ac57c>`_ + +Create a structure (FROSStr) for the contrasting message (UROSStrMsg) and +assign characters to the Data field. +Then, assign the structure to the message using the SetMsg method. + +Finally, call the +`UROS2Publisher::Publish <../doxygen_generated/html/d6/dd4/class_u_r_o_s2_publisher.html#a1c80608e01c7bdeb74ffe3bb82112222>`_ +method to publish the topic. + +.. code-block:: C++ + + // 1. Non Loop Publisher + // 1.1 Create publisher + Publisher = Node->CreatePublisher(TopicName, UROS2Publisher::StaticClass(), UROS2StrMsg::StaticClass(), UROS2QoS::KeepLast); + + // 1.2 Create msg + FROSStr msg; + msg.Data = FString::Printf(TEXT("%s from non loop publisher"), *Message); + CastChecked(Publisher->TopicMessage)->SetMsg(msg); + + // 1.3 publish + Publisher->Publish(); + +Loop Publisher +~~~~~~~~~~~~~~~~~~~~~~ + +You can create a loop publisher by using the +`ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#aa037d93e1d31d5436f12553248889060>`_ +macro. +This macro creates a publisher and adds it to the node, +and then it periodically calls the AROS2PublisherNode::UpdateMessage method. + +.. code-block:: C++ + + // 2. Loop Publisher + ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS(Node, + this, + TopicName, + UROS2Publisher::StaticClass(), + UROS2StrMsg::StaticClass(), + PublicationFrequencyHz, + &AROS2PublisherNode::UpdateMessage, + UROS2QoS::Default, + LoopPublisher); + +UpdateMessage method does similar things as a non-loop publisher. +Since the loop publisher automatically calls the "Publish()" method, +you only need to create and set the message. + +.. code-block:: C++ + + void AROS2PublisherNode::UpdateMessage(UROS2GenericMsg* InMessage) + { + FROSStr msg; + msg.Data = FString::Printf(TEXT("%s %d"), *Message, Count++); + CastChecked(InMessage)->SetMsg(msg); + } + +The implementation of ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS is as follows. +It uses Unreal Engine's dynamic delegate to call a bound function periodically. +You can find more information about Unreal Engine's dynamic delegate +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FTopicCallback, UROS2GenericMsg*, InTopicMessage); + + #define ROS2_CREATE_LOOP_PUBLISHER_WITH_QOS( \ + InROS2Node, InUserObject, InTopicName, InPublisherClass, InMsgClass, InPubFrequency, InCallback, InQoS, OutPublisher) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FTopicCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + OutPublisher = InROS2Node->CreateLoopPublisher(InTopicName, InPublisherClass, InMsgClass, InPubFrequency, cb, InQoS); \ + } + + +Custom Publisher class +~~~~~~~~~~~~~~~~~~~~~~ + +You can create a publisher by defining a child class of UROS2Publisher. +This is useful when you want to add some custom logic to the publisher that will be used in multiple places. + +.. code-block:: C++ + + // 3. Use Custom Publisher class + // UpdateMessage is overriden in child class. + StringPublisher = CastChecked( + Node->CreateLoopPublisherWithClass(TopicName, URRROS2StringPublisher::StaticClass(), 1.f)); + StringPublisher->Message = FString::Printf(TEXT("%s from custom class"), *Message); + +The implementation of UROS2StringPublisher is as follows. +UROS2StringPublisher is a child class of UROS2Publisher. + +The constructor is used to set default publisher settings. +You can add user-defined logic by overriding the UpdateMessage method, +which is called periodically if PublicationFrequencyHz > 0. + +.. code-block:: C++ + + // RRROS2StringPublisher.cpp + #include "Msgs/ROS2Str.h" + + URRROS2StringPublisher::URRROS2StringPublisher() + { + MsgClass = UROS2StrMsg::StaticClass(); + PublicationFrequencyHz = 1; + QoS = UROS2QoS::DynamicBroadcaster; + SetDefaultDelegates(); //use UpdateMessage as update delegate + } + + void URRROS2StringPublisher::UpdateMessage(UROS2GenericMsg* InMessage) + { + FROSStr msg; + msg.Data = Message; + CastChecked(InMessage)->SetMsg(msg); + } + + + + +----------------------------- +BP Publisher +----------------------------- + +Blueprint implementation of a publisher is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add component such as UROS2Publisher from `Components` panel in the editor(left side in the fig below) +and set each component parameters in `Details` panel in the editor(right side in the fig below). + +\* Please enlarge the image if the font is too small, or open the BP class in the editor. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Overview of BP Publisher +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. image:: ../images/publisher_overview.png + + +Similar to the C++ implementation, the BP class has three types of publishers: +Non-Loop Publisher, Loop Publisher, and Custom Publisher. + +The main difference from the C++ implementation is that it uses +`UROS2PublisherComponent <../doxygen_generated/html/db/d27/class_u_r_o_s2_publisher_component.html>`_ +instead of UROS2Publisher. +As UROS2PublisherComponent is a child class of `UActorComponent `_ +and has UROS2Publisher as a member variable, you can easily add it to the Actor and set parameters from the editor. + +Each publisher is attached to an Actor, which is displayed in the `Components` panel on the left. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Details of BP Publisher +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. image:: ../images/publisher_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Non Loop Publisher +~~~~~~~~~~~~~~~~~~~~~~ + +.. image:: ../images/publisher_non_loop.png + +Compared to C++, which uses CreatePublisher(), +in Blueprint, the Publisher is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddPublisher <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a582299af64efaaa34b046c00b1c96828>`_ +to initialize the Publisher instead. +The CreatePublisher function in C++ internally calls AddPublisher. + +You can see that parameters such as Topic Name, Publisher Class, and Msg Class are set in the right `Details` panel. + +Loop Publisher +~~~~~~~~~~~~~~~~~~~~~~ + +.. image:: ../images/publisher_loop.png + +Callback function is bound to a custom event, indicated by the red node in the center. +This callback function is executed at regular intervals with a specified frequency. + +Custom Publisher class +~~~~~~~~~~~~~~~~~~~~~~ + +.. image:: ../images/publisher_custom.png + +Since custom publisher class is alreay set class, callbak and etc, we just need to add it to the node. diff --git a/docs/source/examples/service_client_example.rst b/docs/source/examples/service_client_example.rst new file mode 100644 index 000000000..46ff889e3 --- /dev/null +++ b/docs/source/examples/service_client_example.rst @@ -0,0 +1,296 @@ + +============================= +Service Client Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project +and open `ROS2ServiceExample.umap `_. + +----------------------------- +C++ Service Client +----------------------------- + +This example sends service request every 1 second. + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2ServiceClientNode.h + + UCLASS() + class TURTLEBOT3_API AROS2ServiceClientNode : public AActor + { + GENERATED_BODY() + + protected: + AROS2ServiceClientNode(); + + virtual void BeginPlay() override; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2ServiceClient* AddTwoIntsSrvClient = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ServiceName = TEXT("add_two_ints"); + + //! AddTwoInts input + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int A = 1; + + //! AddTwoInts input + UPROPERTY(EditAnywhere, BlueprintReadWrite) + int B = 2; + + /** + * @brief + * This method is bounded with AddTwoIntsSrvClient::RequestDelegate in #BeginPlay + * and called when receive response. + * @param InService + */ + UFUNCTION() + void ReceiveResponse(UROS2GenericSrv* InService); + + UPROPERTY() + FTimerHandle TimerHandle; + }; + + + +.. code-block:: C++ + + //AROS2ServiceClientNode.cpp + + AROS2ServiceClientNode::AROS2ServiceClientNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("service_client_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2ServiceClientNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + // Create Service client + ROS2_CREATE_SERVICE_CLIENT_WITH_QOS(Node, + this, + ServiceName, + UROS2AddTwoIntsSrv::StaticClass(), + &AROS2ServiceClientNode::ReceiveResponse, // Callback for response + UROS2QoS::DynamicBroadcaster, + AddTwoIntsSrvClient) + + // set timer to periodically calling service. + FTimerDelegate sendRequest = FTimerDelegate::CreateLambda( + [this] + { + // Create request + FROSAddTwoIntsReq req; + req.A = A++; + req.B = B++; + CastChecked(AddTwoIntsSrvClient->Service)->SetRequest(req); + + // SendRequest + AddTwoIntsSrvClient->SendRequest(); + + // Log request + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][send request] a:%d, b:%d"), *ServiceName, req.A, req.B); + }); + + GetWorld()->GetTimerManager().SetTimer(TimerHandle, sendRequest, 1.0f, true); + } + + void AROS2ServiceClientNode::ReceiveResponse(UROS2GenericSrv* InService) + { + UROS2AddTwoIntsSrv* AddTwoIntsService = Cast(InService); + + FROSAddTwoIntsRes res; + AddTwoIntsService->GetResponse(res); + + // Log response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][receive response] sum:%d"), *ServiceName, res.Sum); + } + +^^^^^^^^^^^^^^^^^^ +Examining the code +^^^^^^^^^^^^^^^^^^ + +On an AROS2ServiceClientNode Actor, similar to the AROS2PublisherNode, +NodeComponent is created and initialized in the constructor but ROS2 Node is not created here. +Please check :ref:`publisher_examin_code` for the reason. + +.. code-block:: C++ + + AROS2ServiceClientNode::AROS2ServiceClientNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("service_client_node"); + Node->Namespace = TEXT("cpp"); + } + + +When the simulation starts, BeginPlay is called. +In BeginPlay, firstly create and initialize the ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2ServiceClientNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + +You can create a service client by using the +`ROS2_CREATE_SERVICE_CLIENT_WITH_QOS <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#afc35f3065562037d23b39eb0baa32f0d>`_ +macro, which creates a service client and adds it to the node. +When the node receives a service response, AROS2ServiceClientNode::ReceiveResponse is called. + + +.. code-block:: C++ + + // Create Service client + ROS2_CREATE_SERVICE_CLIENT_WITH_QOS(Node, + this, + ServiceName, + UROS2AddTwoIntsSrv::StaticClass(), + &AROS2ServiceClientNode::ReceiveResponse, // Callback for response + UROS2QoS::DynamicBroadcaster, + AddTwoIntsSrvClient) + +The implementation of ROS2_CREATE_SERVICE_CLIENT_WITH_QOS is as follows. +It uses Unreal Engine's dynamic delegate to call the bound function +when the node receives the message. +You can find more information about Unreal Engine's dynamic delegate . +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FServiceCallback, UROS2GenericSrv*, InService /*Service*/); + + #define ROS2_CREATE_SERVICE_CLIENT_WITH_QOS( \ + InROS2Node, InUserObject, InServiceName, InSrvClass, InRequestCallback, InQoS, OutClient) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback req; \ + req.BindDynamic(InUserObject, InRequestCallback); \ + OutClient = InROS2Node->CreateServiceClient(InServiceName, InSrvClass, req, InQoS); \ + } + +In this example, service client is set to send request periodically by create +`UE Timer `_ +. + +We create a FTimerDelegate +with a lambda function that will be called by the timer. +Inside the lambda function, create the request structure (FROSAddTwoIntsReq) +for the corresponding service (UROS2AddTwoIntsSrv). +Set the value of the request structure, and then send the request by calling SendRequest(). + +.. code-block:: C++ + + // set timer to periodically calling service. + FTimerDelegate sendRequest = FTimerDelegate::CreateLambda( + [this] + { + // Create request + FROSAddTwoIntsReq req; + req.A = A++; + req.B = B++; + CastChecked(AddTwoIntsSrvClient->Service)->SetRequest(req); + + // SendRequest + AddTwoIntsSrvClient->SendRequest(); + + // Log request + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][send request] a:%d, b:%d"), *ServiceName, req.A, req.B); + }); + + + +Then start a timer to call the sendRequest method every 1 second. + +.. code-block:: C++ + + GetWorld()->GetTimerManager().SetTimer(TimerHandle, sendRequest, 1.0f, true); + + +When the node receives a service response, AROS2ServiceClientNode::ReceiveResponse is called. + +To retrieve the response, you need to create a response structure (FROSAddTwoIntsRes) +for the corresponding service (UROS2AddTwoIntsSrv) and retrieve the request by calling GetResponse(). + +ReceiveResponse method simply prints the received response in this example. + +.. code-block:: C++ + + void AROS2ServiceClientNode::ReceiveResponse(UROS2GenericSrv* InService) + { + UROS2AddTwoIntsSrv* AddTwoIntsService = Cast(InService); + + FROSAddTwoIntsRes res; + AddTwoIntsService->GetResponse(res); + + // Log response + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("[%s][C++][receive response] sum:%d"), *ServiceName, res.Sum); + } + + +----------------------------- +BP Service Client +----------------------------- + +Blueprint implementation of a service client is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add components such as UROS2Publisher from `Components` panel in the editor (left side in the fig below) +and set each component parameters in `Details` panel in the editor (right side in the fig below). + +The main difference from the C++ implementation is that it uses +`UROS2ServiceClientComponent <../doxygen_generated/html/d1/db9/class_u_r_o_s2_service_client_component.html>`_ +instead of UROS2ServiceClient. +As UROS2ServiceClientComponent is a child class of +`UActorComponent `_ +and has UROS2ServiceClient as a member variable, you can easily add it to the Actor and set parameters from the editor. + +.. image:: ../images/service_client_overview.png + +The Service client component is attached to an Actor, which is displayed in the `Components` panel on the left. + +.. image:: ../images/service_client_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Compared to C++, which uses ROS2_CREATE_SERVICE_CLIENT_WITH_QOS, +in Blueprint, the service client is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddServiceClient <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a5e52bd6256f3c5db5c0392cee93d7156>`_ +to initialize the UROS2ServiceClient and +`UROS2ServiceClient::SetDelegates <../doxygen_generated/html/d7/df5/class_u_r_o_s2_service_client.html#ae965105e696c1662ce1655249b9d864b>`_ +to bind callback method instead. +The ROS2_CREATE_SERVICE_CLIENT_WITH_QOS macro in C++ internally calls CreateServiceClient which calls AddServiceClient and SetDelegates. + +We also create a UE Timer to send request every 1 second. + +.. image:: ../images/service_client_req.png + +In the timer event, SendRequest is called to send request. +Then increment the value of A and B and print those. + +.. image:: ../images/service_client_res.png + +Callback function is bound to a custom event, indicated by the red node on the left. +This callback function is called when the node receives a response. diff --git a/docs/source/examples/service_server_example.rst b/docs/source/examples/service_server_example.rst new file mode 100644 index 000000000..e1e0caca6 --- /dev/null +++ b/docs/source/examples/service_server_example.rst @@ -0,0 +1,222 @@ + +============================= +Service Server Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project +and open `ROS2ServiceExample.umap `_. + +----------------------------- +C++ Service Server +----------------------------- + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2ServiceServerNode.h + + UCLASS() + class TURTLEBOT3_API AROS2ServiceServerNode : public AActor + { + GENERATED_BODY() + + public: + AROS2ServiceServerNode(); + + virtual void BeginPlay() override; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString ServiceName = TEXT("add_two_ints"); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + /** + * @brief Service callback function + * + * @param Service + */ + UFUNCTION() + void SrvCallback(UROS2GenericSrv* InService); + }; + + +.. code-block:: C++ + + //AROS2ServiceServerNode.cpp + + AROS2ServiceServerNode::AROS2ServiceServerNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("service_server_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2ServiceServerNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + ROS2_CREATE_SERVICE_SERVER(Node, this, ServiceName, UROS2AddTwoIntsSrv::StaticClass(), &AROS2ServiceServerNode::SrvCallback); + } + + void AROS2ServiceServerNode::SrvCallback(UROS2GenericSrv* InService) + { + UROS2AddTwoIntsSrv* AddTwoIntsService = Cast(InService); + + FROSAddTwoIntsReq req; + AddTwoIntsService->GetRequest(req); + + // Add two ints. + FROSAddTwoIntsRes res; + res.Sum = req.A + req.B; + + // Set response. + AddTwoIntsService->SetResponse(res); + + // Log request and response + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][receive request] %d + %d = %d"), *ServiceName, req.A, req.B, res.Sum); + } + + + +^^^^^^^^^^^^^^^^^^ +Code explanations +^^^^^^^^^^^^^^^^^^ + +On an AROS2ServiceServerNode Actor, similar to the AROS2PublisherNode, +NodeComponent is created and initialized in the constructor but ROS2 Node is not created here. +Please check :ref:`publisher_examin_code` for the reason. + +.. code-block:: C++ + + AROS2ServiceServerNode::AROS2ServiceServerNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("service_server_node"); + Node->Namespace = TEXT("cpp"); + } + + +When the simulation starts, BeginPlay is called. +In BeginPlay, firstly create and initialize the ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2ServiceServerNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + +You can create a service server by using the +`ROS2_CREATE_SERVICE_SERVER <../doxygen_generated/html/d1/d79/_r_o_s2_node_component_8h.html#a02e1393eb5718c2b10fe60f4498f738b>`_ +macro, which creates a service server and adds it to the node. +When the node receives a service request, AROS2ServiceServerNode::SrvCallback is called. + + +.. code-block:: C++ + + ROS2_CREATE_SERVICE_SERVER(Node, this, ServiceName, UROS2AddTwoIntsSrv::StaticClass(), &AROS2ServiceServerNode::SrvCallback); + +The SrvCallback method adds two integers and sets the result to the response. + +To retrieve the request, you need to create a request structure (FROSAddTwoIntsReq) +for the corresponding service (UROS2AddTwoIntsSrv) and retrieve the request by calling GetRequest(). + +To set the response, you need to create a response structure (FROSAddTwoIntsResp) +for the corresponding service (UROS2AddTwoIntsSrv) and set the response to the structure. +Then, call SetResponse() to set the structure to the response. + +Finally, log the request and the response. + +.. code-block:: C++ + + void AROS2ServiceServerNode::SrvCallback(UROS2GenericSrv* InService) + { + UROS2AddTwoIntsSrv* AddTwoIntsService = Cast(InService); + + FROSAddTwoIntsReq req; + AddTwoIntsService->GetRequest(req); + + // Add two ints. + FROSAddTwoIntsRes res; + res.Sum = req.A + req.B; + + // Set response. + AddTwoIntsService->SetResponse(res); + + // Log request and response + UE_LOG_WITH_INFO_NAMED( + LogTurtlebot3, Log, TEXT("[%s][C++][receive request] %d + %d = %d"), *ServiceName, req.A, req.B, res.Sum); + } + +The implementation of ROS2_CREATE_SERVICE_SERVER is as follows. +It uses Unreal Engine's dynamic delegate to call the bound function +when the node receives the message. +You can find more information about Unreal Engine's dynamic delegate +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FServiceCallback, UROS2GenericSrv*, InService /*Service*/); + + #define ROS2_CREATE_SERVICE_SERVER(InROS2Node, InUserObject, InServiceName, InSrvClass, InResponseCallback) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FServiceCallback res; \ + res.BindDynamic(InUserObject, InResponseCallback); \ + InROS2Node->CreateServiceServer(InServiceName, InSrvClass, res); \ + } + + +----------------------------- +BP Service Server +----------------------------- + +Blueprint implementation of a service server is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add component such as UROS2Publisher from `Components` panel in the editor(left side in the fig below) +and set each component parameters in `Details` panel in the editor(right side in the fig below). + +The main difference from the C++ implementation is that it uses +`UROS2ServiceServerComponent <../doxygen_generated/html/d1/db9/class_u_r_o_s2_service_server_component.html>`_ +instead of UROS2ServiceServer. +As UROS2ServiceServerComponent is a child class of +`UActorComponent `_ +and has UROS2ServiceServer as a member variable, you can easily add it to the Actor and set parameters from the editor. + +.. image:: ../images/service_server_overview.png + +The Service server component is attached to an Actor, which is displayed in the `Components` panel on the left. + +.. image:: ../images/service_server_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Compared to C++, which uses ROS2_CREATE_SUBSCRIBER, +in Blueprint, the Subscriber is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddServiceServer <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a88c4ddd3037e78b68f62c142015ea91e>`_ +to initialize the UROS2ServiceServer and +`UROS2ServiceServer::SetDelegates <../doxygen_generated/html/d8/d6e/class_u_r_o_s2_service_server.html#a3071892b4f131d18e9f5010077cad485>`_ +to bind callback method instead. +The ROS2_CREATE_SERVICE_SERVER macro in C++ internally calls CreateServiceServer which calls AddServiceServer and SetDelegates. + +.. image:: ../images/service_server_req.png + +Callback function is bound to a custom event, indicated by the red node on the left. +This callback function is called when the node receives a request and send response. + diff --git a/docs/source/examples/subscriber_example.rst b/docs/source/examples/subscriber_example.rst new file mode 100644 index 000000000..73f9ccfe6 --- /dev/null +++ b/docs/source/examples/subscriber_example.rst @@ -0,0 +1,195 @@ + +============================= +Subscriber Example +============================= + +Please follow the instructions in :ref:`setup_and_run_ue_project` to setup the UE project +and open `ROS2TopicExample.umap `_. + +----------------------------- +C++ Subscriber +----------------------------- + +^^^^^^^^^^^^^^^^^^ +Code +^^^^^^^^^^^^^^^^^^ + +.. code-block:: C++ + + //ROS2SubscriberNode.h + + UCLASS() + class TURTLEBOT3_API AROS2SubscriberNode : public AActor + { + GENERATED_BODY() + + public: + AROS2SubscriberNode(); + + virtual void BeginPlay() override; + + UFUNCTION() + void MsgCallback(const UROS2GenericMsg* InMsg); + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + UROS2NodeComponent* Node = nullptr; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + FString TopicName = TEXT("test_topic"); + }; + +.. code-block:: C++ + + //ROS2SubscriberNode.cpp + + AROS2SubscriberNode::AROS2SubscriberNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("subscriber_node"); + Node->Namespace = TEXT("cpp"); + } + + void AROS2SubscriberNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + ROS2_CREATE_SUBSCRIBER(Node, this, TopicName, UROS2StrMsg::StaticClass(), &AROS2SubscriberNode::MsgCallback); + } + + void AROS2SubscriberNode::MsgCallback(const UROS2GenericMsg* InMsg) + { + const UROS2StrMsg* stringMsg = Cast(InMsg); + if (stringMsg) + { + FROSStr msg; + stringMsg->GetMsg(msg); + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("%s"), *msg.Data); + } + } + + +^^^^^^^^^^^^^^^^^^ +Code explanations +^^^^^^^^^^^^^^^^^^ + +On an AROS2SubscriberNode Actor, similar to the AROS2PublisherNode, +NodeComponent is created and initialized in the constructor but ROS2 Node is not created here. +Please check :ref:`publisher_examin_code` for the reason. + +.. code-block:: C++ + + AROS2SubscriberNode::AROS2SubscriberNode() + { + Node = CreateDefaultSubobject(TEXT("ROS2NodeComponent")); + + // these parameters can be change from BP + Node->Name = TEXT("subscriber_node"); + Node->Namespace = TEXT("cpp"); + } + + +When the simulation starts, BeginPlay is called. +In BeginPlay, firstly create and initialize the ROS2 Node by calling +`UROS2NodeComponent::Init <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#ab9b7b990c4ca38eb60acf8e0a53c3e52>`_ +. + +.. code-block:: C++ + + void AROS2SubscriberNode::BeginPlay() + { + Super::BeginPlay(); + Node->Init(); + + +You can create a subscriber by using the +`ROS2_CREATE_SUBSCRIBER `_ +macro, which creates a subscriber and adds it to the node. +When the node receives a message, AROS2SubscriberNode::MsgCallback is called. + + +.. code-block:: C++ + + ROS2_CREATE_SUBSCRIBER(Node, this, TopicName, UROS2StrMsg::StaticClass(), &AROS2SubscriberNode::MsgCallback); + + +To retrieve the message, you need to create a message structure (FROSStr) +for the corresponding message (UROS2StrMsg) and retrieve the message by calling GetMsg(). + +MsgCallback method simply prints the received message in this example. + +.. code-block:: C++ + + void AROS2SubscriberNode::MsgCallback(const UROS2GenericMsg* InMsg) + { + const UROS2StrMsg* stringMsg = Cast(InMsg); + if (stringMsg) + { + FROSStr msg; + stringMsg->GetMsg(msg); + UE_LOG_WITH_INFO_NAMED(LogTurtlebot3, Log, TEXT("%s"), *msg.Data); + } + } + +The implementation of ROS2_CREATE_SUBSCRIBER is as follows. +It uses Unreal Engine's dynamic delegate to call the bound function +when the node receives the message. +You can find more information about Unreal Engine's dynamic delegate +`here `_. + +.. code-block:: C++ + + DECLARE_DYNAMIC_DELEGATE_OneParam(FSubscriptionCallback, const UROS2GenericMsg*, InMessage); + + #define ROS2_CREATE_SUBSCRIBER(InROS2Node, InUserObject, InTopicName, InMsgClass, InCallback) \ + if (ensure(IsValid(InROS2Node))) \ + { \ + FSubscriptionCallback cb; \ + cb.BindDynamic(InUserObject, InCallback); \ + InROS2Node->CreateSubscriber(InTopicName, InMsgClass, cb); \ + } + + +----------------------------- +BP Subscriber +----------------------------- + +Blueprint implementation of a subscriber is very similar to a C++ implementation. +Blueprints allow you to set logic/processes, parameters, and other details from the editor. + +You can add component such as UROS2Publisher from `Components` panel in the editor(left side in the fig below) +and set each component parameters in `Details` panel in the editor (right side in the fig below). + +The main difference from the C++ implementation is that it uses +`UROS2SubscriberComponent <../doxygen_generated/html/d5/d73/class_u_r_o_s2_subscriber_component.html>`_ +instead of UROS2Subscriber. +As UROS2SubscriberComponent is a child class of +`UActorComponent `_ +and has UROS2Subscriber as a member variable, you can easily add it to the Actor and set parameters from the editor. + +.. image:: ../images/subscriber_overview.png + +The Subscriber component is attached to an Actor, which is displayed in the `Components` panel on the left. + +.. image:: ../images/subscriber_node.png + +Initialize the ROS2 Node using the BeginPlay event. +You can set the ROSNode parameters, such as Name and Namespace, +from the `Details` panel on the right. + +Compared to C++, which uses ROS2_CREATE_SUBSCRIBER, +in Blueprint, the Subscriber is already generated as a Component before BeginPlay. +Therefore, we use +`UROS2NodeComponent::AddSubscription <../doxygen_generated/html/d7/d68/class_u_r_o_s2_node_component.html#a107bc4e732b592facd873ae0a37efe66>`_ +to initialize the UROS2Subscriber and +`UROS2Subscriber::SetDelegates <../doxygen_generated/html/de/d83/class_u_r_o_s2_subscriber.html#a1733472ccb6983bd0821d661419b379c>`_ +to bind callback method instead. +The ROS2_CREATE_SUBSCRIBER macro in C++ internally calls CreateSubscriber which calls AddSubscriber and SetDelegates. + +.. image:: ../images/subscriber_component.png + +Callback function is bound to a custom event, indicated by the red node in the center. +This callback function is called when the node receives a message. + diff --git a/docs/source/images/action_client_cancel.png b/docs/source/images/action_client_cancel.png new file mode 100644 index 000000000..71bf3158c Binary files /dev/null and b/docs/source/images/action_client_cancel.png differ diff --git a/docs/source/images/action_client_feedback.png b/docs/source/images/action_client_feedback.png new file mode 100644 index 000000000..43cb926c9 Binary files /dev/null and b/docs/source/images/action_client_feedback.png differ diff --git a/docs/source/images/action_client_goal.png b/docs/source/images/action_client_goal.png new file mode 100644 index 000000000..b017d0753 Binary files /dev/null and b/docs/source/images/action_client_goal.png differ diff --git a/docs/source/images/action_client_node.png b/docs/source/images/action_client_node.png new file mode 100644 index 000000000..d9fe70037 Binary files /dev/null and b/docs/source/images/action_client_node.png differ diff --git a/docs/source/images/action_client_overview.png b/docs/source/images/action_client_overview.png new file mode 100644 index 000000000..62f31473a Binary files /dev/null and b/docs/source/images/action_client_overview.png differ diff --git a/docs/source/images/action_client_res.png b/docs/source/images/action_client_res.png new file mode 100644 index 000000000..c5c0d1bb5 Binary files /dev/null and b/docs/source/images/action_client_res.png differ diff --git a/docs/source/images/action_client_sendgoal.png b/docs/source/images/action_client_sendgoal.png new file mode 100644 index 000000000..96ab2f343 Binary files /dev/null and b/docs/source/images/action_client_sendgoal.png differ diff --git a/docs/source/images/action_server_cancel.png b/docs/source/images/action_server_cancel.png new file mode 100644 index 000000000..1577c6cc2 Binary files /dev/null and b/docs/source/images/action_server_cancel.png differ diff --git a/docs/source/images/action_server_execute.png b/docs/source/images/action_server_execute.png new file mode 100644 index 000000000..e9de95805 Binary files /dev/null and b/docs/source/images/action_server_execute.png differ diff --git a/docs/source/images/action_server_goal.png b/docs/source/images/action_server_goal.png new file mode 100644 index 000000000..19dd54c45 Binary files /dev/null and b/docs/source/images/action_server_goal.png differ diff --git a/docs/source/images/action_server_node.png b/docs/source/images/action_server_node.png new file mode 100644 index 000000000..67468a4b8 Binary files /dev/null and b/docs/source/images/action_server_node.png differ diff --git a/docs/source/images/action_server_overview.png b/docs/source/images/action_server_overview.png new file mode 100644 index 000000000..986db3a27 Binary files /dev/null and b/docs/source/images/action_server_overview.png differ diff --git a/docs/source/images/action_server_res.png b/docs/source/images/action_server_res.png new file mode 100644 index 000000000..71fbc0871 Binary files /dev/null and b/docs/source/images/action_server_res.png differ diff --git a/docs/source/images/features.png b/docs/source/images/features.png index 6ae232657..e3b36c2e6 100644 Binary files a/docs/source/images/features.png and b/docs/source/images/features.png differ diff --git a/docs/source/images/publisher_bp.png b/docs/source/images/publisher_bp.png deleted file mode 100644 index a04697ad6..000000000 Binary files a/docs/source/images/publisher_bp.png and /dev/null differ diff --git a/docs/source/images/publisher_custom.png b/docs/source/images/publisher_custom.png new file mode 100644 index 000000000..c5af061c7 Binary files /dev/null and b/docs/source/images/publisher_custom.png differ diff --git a/docs/source/images/publisher_loop.png b/docs/source/images/publisher_loop.png new file mode 100644 index 000000000..3bc6fa2f4 Binary files /dev/null and b/docs/source/images/publisher_loop.png differ diff --git a/docs/source/images/publisher_node.png b/docs/source/images/publisher_node.png new file mode 100644 index 000000000..2531e1dd3 Binary files /dev/null and b/docs/source/images/publisher_node.png differ diff --git a/docs/source/images/publisher_non_loop.png b/docs/source/images/publisher_non_loop.png new file mode 100644 index 000000000..6e56b68c4 Binary files /dev/null and b/docs/source/images/publisher_non_loop.png differ diff --git a/docs/source/images/publisher_overview.png b/docs/source/images/publisher_overview.png new file mode 100644 index 000000000..c3aae8389 Binary files /dev/null and b/docs/source/images/publisher_overview.png differ diff --git a/docs/source/images/rclUE_position.png b/docs/source/images/rclUE_position.png index 3f8b2fc3e..2ce9ffefa 100644 Binary files a/docs/source/images/rclUE_position.png and b/docs/source/images/rclUE_position.png differ diff --git a/docs/source/images/repositories.png b/docs/source/images/repositories.png index d5c535321..e03d62903 100644 Binary files a/docs/source/images/repositories.png and b/docs/source/images/repositories.png differ diff --git a/docs/source/images/service_client_node.png b/docs/source/images/service_client_node.png new file mode 100644 index 000000000..32b4e6e2a Binary files /dev/null and b/docs/source/images/service_client_node.png differ diff --git a/docs/source/images/service_client_overview.png b/docs/source/images/service_client_overview.png new file mode 100644 index 000000000..71c2c72c6 Binary files /dev/null and b/docs/source/images/service_client_overview.png differ diff --git a/docs/source/images/service_client_req.png b/docs/source/images/service_client_req.png new file mode 100644 index 000000000..3df43eec6 Binary files /dev/null and b/docs/source/images/service_client_req.png differ diff --git a/docs/source/images/service_client_res.png b/docs/source/images/service_client_res.png new file mode 100644 index 000000000..7e453982a Binary files /dev/null and b/docs/source/images/service_client_res.png differ diff --git a/docs/source/images/service_server_node.png b/docs/source/images/service_server_node.png new file mode 100644 index 000000000..0cc92d715 Binary files /dev/null and b/docs/source/images/service_server_node.png differ diff --git a/docs/source/images/service_server_overview.png b/docs/source/images/service_server_overview.png new file mode 100644 index 000000000..b77c9cde9 Binary files /dev/null and b/docs/source/images/service_server_overview.png differ diff --git a/docs/source/images/service_server_req.png b/docs/source/images/service_server_req.png new file mode 100644 index 000000000..00dc7e946 Binary files /dev/null and b/docs/source/images/service_server_req.png differ diff --git a/docs/source/images/subscriber_bp.png b/docs/source/images/subscriber_bp.png deleted file mode 100644 index fd15d38ee..000000000 Binary files a/docs/source/images/subscriber_bp.png and /dev/null differ diff --git a/docs/source/images/subscriber_component.png b/docs/source/images/subscriber_component.png new file mode 100644 index 000000000..a2ee66e8f Binary files /dev/null and b/docs/source/images/subscriber_component.png differ diff --git a/docs/source/images/subscriber_node.png b/docs/source/images/subscriber_node.png new file mode 100644 index 000000000..00dcf2724 Binary files /dev/null and b/docs/source/images/subscriber_node.png differ diff --git a/docs/source/images/subscriber_overview.png b/docs/source/images/subscriber_overview.png new file mode 100644 index 000000000..4e7b70ecd Binary files /dev/null and b/docs/source/images/subscriber_overview.png differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 5de432f04..0d9661f49 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,18 +1,18 @@ Welcome to rclUE's documentation! =================================== -**rclUE** is a `ROS2 `_ +**rclUE** is a `ROS2 `_ client library for Unreal Engine. -rclUE is a UE4 Plugin whih bridges `Unreal Engine `_ -and ROS2, opening UE4’s tools to ROS developers through a C++ interface. -Furthermore non-ROS engineers should be able to quickly set up robot simulations -through UE4’s blueprint visual scripting language by using the instruments -that ROS developers and the plugin exposed. +rclUE is a UE Plugin which bridges `Unreal Engine `_ +and ROS2, opening UE’s tools to ROS developers through a C++ interface. +Furthermore non-ROS engineers should be able to quickly set up robot simulations +through UE’s blueprint visual scripting language by using the instruments +that ROS developers and the plugin exposed. This document includes not only rclUE but also an overview of its stakeholders from various repositories. Please check the :doc:`overview`. -A demo of our tool can be found in our port of the `turtlebot examples to UE4 `_. +A demo of our tool can be found in our port of the `turtlebot examples to UE `_. .. raw:: html diff --git a/docs/source/overview.rst b/docs/source/overview.rst index bf62d5224..e70abfce4 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -1,5 +1,5 @@ Overview of a group of **rclUE** software -===================================== +========================================== Features -------- @@ -11,30 +11,43 @@ Repositories .. image:: images/repositories.png -Above figure shows overview of related repositories. Please reference this structure when you create your own ROS2 UE4 simulations. +Above figure shows overview of related repositories. Please reference this structure when you create your own ROS2 UE simulations. -`turtlebot3-UE `_ +`turtlebot3-UE `_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Example repository of ROS2 UE4 simulation. +Basic example repository of ROS2 UE simulation. -rclUE(this repository) -^^^^^^^^^^^^^^^^^^^^^^^^^^ + +`rclUE(this repository) `_ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ROS2 integration features such as creating ROS2 Node, publisher/subscriber and etc. `RapyutaSimulationPlugins `_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Provides feature to create ROS2 controllable actor, e.g. robot and sensors. Most of the features in top figure are provided by this repository. -Please check `overview of RapyutaSimulationPlugins `_ +Please check `overview of RapyutaSimulationPlugins `_ `UE_tools `_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Provides non UE4 plugin tools such as custom msg generation for UE4. +Provides non UE plugin tools such as custom msg generation for UE. Please follow README to add new msgs to rclUE. -\* todo: support adding msg to other place than rclUE. +\* *Please check [CustomMsgExample](https://github.com/yuokamoto/rclUE-Examples/blob/custom_msg_example/Plugins/CustomMsgExample/README.md) as a example of custom msg in different plugin then rclUE. `UE_msgs `_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Includes ROS2 msg/srv/action files. Please use `UE_tools `_ -to generate necessary C++ files for UE4 plugins. +Includes ROS2 msg/srv/action files. Please use `UE_tools `_ +to generate necessary C++ files for UE plugins. + + +Other example repositories +-------------------------- + +`rclUE-Examples `_ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Complicated example repository of ROS2 UE simulation including warehouse, human character, etc. + +`rclUE_client_example `_ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +ROS2 Client example repository to control rclUE-Example project. diff --git a/docs/source/usage.rst b/docs/source/usage.rst deleted file mode 100644 index d240cb57f..000000000 --- a/docs/source/usage.rst +++ /dev/null @@ -1,14 +0,0 @@ -Usage -===== - -.. _installation: - -Installation ------------- - -todo - -Creating recipes ----------------- - -